Avoid a couple possible NullPointerExceptions
This commit is contained in:
parent
10fa5108da
commit
00a0f4399f
@ -378,11 +378,13 @@ public class DB {
|
||||
StringBuilder logMsg = new StringBuilder();
|
||||
logMsg.append("Available device features:");
|
||||
features = new HashSet<String>();
|
||||
if (pm != null) {
|
||||
for (FeatureInfo fi : pm.getSystemAvailableFeatures()) {
|
||||
features.add(fi.name);
|
||||
logMsg.append('\n');
|
||||
logMsg.append(fi.name);
|
||||
}
|
||||
}
|
||||
|
||||
cpuAbis = new ArrayList<String>();
|
||||
if (hasApi(8))
|
||||
@ -866,8 +868,10 @@ public class DB {
|
||||
if (app.installedVersion == null)
|
||||
app.installedVersion = "null";
|
||||
app.installedVerCode = sysapk.versionCode;
|
||||
if (sysapk.applicationInfo != null) {
|
||||
app.userInstalled = ((sysapk.applicationInfo.flags
|
||||
& ApplicationInfo.FLAG_SYSTEM) != 1);
|
||||
}
|
||||
} else {
|
||||
app.installedVersion = null;
|
||||
app.installedVerCode = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user