Skip to content
Snippets Groups Projects
Commit ca9056eb authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Use updatable sysprop to for enabling APEX mgmt" into qt-dev

parents ec554bdd 2ce84341
No related branches found
No related tags found
No related merge requests found
......@@ -687,6 +687,7 @@ java_defaults {
"core/java/com/android/server/DropboxLogTags.logtags",
"core/java/org/chromium/arc/EventLogTags.logtags",
":apex-properties",
":platform-properties",
":framework-statslog-gen",
......@@ -1834,4 +1835,4 @@ aidl_mapping {
name: "framework-aidl-mappings",
srcs: [":framework-defaults"],
output: "framework-aidl-mappings.txt"
}
\ No newline at end of file
}
......@@ -33,6 +33,7 @@ import android.content.pm.PackageParser.PackageParserException;
import android.os.RemoteException;
import android.os.ServiceManager;
import android.os.ServiceManager.ServiceNotFoundException;
import android.sysprop.ApexProperties;
import android.util.Slog;
import com.android.internal.annotations.GuardedBy;
......@@ -237,11 +238,7 @@ class ApexManager {
* @return true if APEX packages can be managed on this device, false otherwise.
*/
boolean isApexSupported() {
populateActivePackagesCacheIfNeeded();
// There is no system-wide property available to check if APEX are flattened and hence can't
// be updated. In absence of such property, we assume that if we didn't index APEX packages
// since they were flattened, no APEX management should be possible.
return !mActivePackagesCache.isEmpty();
return ApexProperties.updatable().orElse(false);
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment