Merge "Fixes NPE and adds @Nullable to PackageSetting.pkg" into rvc-dev am: 697c8e9546
Change-Id: I4feace860fb6cd865304f0d2b64ebc7c429d3b39
This commit is contained in:
@@ -674,7 +674,8 @@ public class AppsFilter {
|
|||||||
Trace.endSection();
|
Trace.endSection();
|
||||||
|
|
||||||
if (callingPkgSetting != null) {
|
if (callingPkgSetting != null) {
|
||||||
if (!mFeatureConfig.packageIsEnabled(callingPkgSetting.pkg)) {
|
if (callingPkgSetting.pkg != null
|
||||||
|
&& !mFeatureConfig.packageIsEnabled(callingPkgSetting.pkg)) {
|
||||||
if (DEBUG_LOGGING) {
|
if (DEBUG_LOGGING) {
|
||||||
log(callingSetting, targetPkgSetting, "DISABLED");
|
log(callingSetting, targetPkgSetting, "DISABLED");
|
||||||
}
|
}
|
||||||
@@ -682,7 +683,8 @@ public class AppsFilter {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
for (int i = callingSharedPkgSettings.size() - 1; i >= 0; i--) {
|
for (int i = callingSharedPkgSettings.size() - 1; i >= 0; i--) {
|
||||||
if (!mFeatureConfig.packageIsEnabled(callingSharedPkgSettings.valueAt(i).pkg)) {
|
final AndroidPackage pkg = callingSharedPkgSettings.valueAt(i).pkg;
|
||||||
|
if (pkg != null && !mFeatureConfig.packageIsEnabled(pkg)) {
|
||||||
if (DEBUG_LOGGING) {
|
if (DEBUG_LOGGING) {
|
||||||
log(callingSetting, targetPkgSetting, "DISABLED");
|
log(callingSetting, targetPkgSetting, "DISABLED");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ import java.util.Set;
|
|||||||
public class PackageSetting extends PackageSettingBase {
|
public class PackageSetting extends PackageSettingBase {
|
||||||
int appId;
|
int appId;
|
||||||
|
|
||||||
|
@Nullable
|
||||||
public AndroidPackage pkg;
|
public AndroidPackage pkg;
|
||||||
/**
|
/**
|
||||||
* WARNING. The object reference is important. We perform integer equality and NOT
|
* WARNING. The object reference is important. We perform integer equality and NOT
|
||||||
|
|||||||
Reference in New Issue
Block a user