Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9dfac678 authored by Dario Freni's avatar Dario Freni Committed by android-build-merger
Browse files

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

am: ca9056eb

Change-Id: Ia490a3dd493c65c2b8cc71659d9dabbd404adff9
parents b60d7f4f ca9056eb
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -687,6 +687,7 @@ java_defaults {
        "core/java/com/android/server/DropboxLogTags.logtags",
        "core/java/com/android/server/DropboxLogTags.logtags",
        "core/java/org/chromium/arc/EventLogTags.logtags",
        "core/java/org/chromium/arc/EventLogTags.logtags",


        ":apex-properties",
        ":platform-properties",
        ":platform-properties",


        ":framework-statslog-gen",
        ":framework-statslog-gen",
+2 −5
Original line number Original line Diff line number Diff line
@@ -33,6 +33,7 @@ import android.content.pm.PackageParser.PackageParserException;
import android.os.RemoteException;
import android.os.RemoteException;
import android.os.ServiceManager;
import android.os.ServiceManager;
import android.os.ServiceManager.ServiceNotFoundException;
import android.os.ServiceManager.ServiceNotFoundException;
import android.sysprop.ApexProperties;
import android.util.Slog;
import android.util.Slog;


import com.android.internal.annotations.GuardedBy;
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.
     * @return true if APEX packages can be managed on this device, false otherwise.
     */
     */
    boolean isApexSupported() {
    boolean isApexSupported() {
        populateActivePackagesCacheIfNeeded();
        return ApexProperties.updatable().orElse(false);
        // 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();
    }
    }


    /**
    /**