Merge "Revert "Update checking of flag MATCH_HIDDEN_UNTIL_INSTALLED_COMPONENTS"" into pi-dev

This commit is contained in:
TreeHugger Robot
2018-06-04 23:27:42 +00:00
committed by Android (Google) Code Review

View File

@@ -95,7 +95,6 @@ import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.os.ClassLoaderFactory;
import com.android.internal.util.ArrayUtils;
import com.android.internal.util.XmlUtils;
import com.android.server.SystemConfig;
import libcore.io.IoUtils;
import libcore.util.EmptyArray;
@@ -641,12 +640,9 @@ public class PackageParser {
private static boolean checkUseInstalledOrHidden(int flags, PackageUserState state,
ApplicationInfo appInfo) {
// Returns false if the package is hidden system app until installed.
final ArraySet<String> hiddenSystemApps =
SystemConfig.getInstance().getDisabledUntilUsedPreinstalledCarrierApps();
if (!state.installed
&& appInfo != null && appInfo.isSystemApp()
&& hiddenSystemApps.contains(appInfo.packageName)
&& (flags & PackageManager.MATCH_HIDDEN_UNTIL_INSTALLED_COMPONENTS) == 0) {
if ((flags & PackageManager.MATCH_HIDDEN_UNTIL_INSTALLED_COMPONENTS) == 0
&& !state.installed
&& appInfo != null && appInfo.isSystemApp()) {
return false;
}