diff options
| author | TreeHugger Robot <treehugger-gerrit@google.com> | 2021-02-12 16:37:01 +0000 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2021-02-12 16:37:01 +0000 |
| commit | 6516885e881418e28bfc9027da130500bcf27e0d (patch) | |
| tree | 406710e7e6189aac96ed00482883e0fc34f75287 /core/java/android | |
| parent | 08c619d66506fb1e64093fbc436b68a60250f464 (diff) | |
| parent | 50bc17cdaa9d092b10c389ade52116e252e58e94 (diff) | |
Merge "Add a new feature to store IncFs version." into sc-dev
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/content/pm/PackageManager.java | 19 | ||||
| -rw-r--r-- | core/java/android/os/incremental/IncrementalManager.java | 8 |
2 files changed, 26 insertions, 1 deletions
diff --git a/core/java/android/content/pm/PackageManager.java b/core/java/android/content/pm/PackageManager.java index 6cfcce3f7661..a3c3500f742f 100644 --- a/core/java/android/content/pm/PackageManager.java +++ b/core/java/android/content/pm/PackageManager.java @@ -3592,9 +3592,12 @@ public abstract class PackageManager { * Feature for {@link #getSystemAvailableFeatures} and {@link #hasSystemFeature}: The device has * the requisite kernel support to support incremental delivery aka Incremental FileSystem. * - * @see IncrementalManager#isEnabled + * @see IncrementalManager#isFeatureEnabled * @hide + * + * @deprecated Use {@link #FEATURE_INCREMENTAL_DELIVERY_VERSION} instead. */ + @Deprecated @SystemApi @SdkConstant(SdkConstantType.FEATURE) public static final String FEATURE_INCREMENTAL_DELIVERY = @@ -3602,6 +3605,20 @@ public abstract class PackageManager { /** * Feature for {@link #getSystemAvailableFeatures} and {@link #hasSystemFeature}: + * feature not present - IncFs is not present on the device. + * 1 - IncFs v1, core features, no PerUid support. Optional in R. + * 2 - IncFs v2, PerUid support, fs-verity support. Required in S. + * + * @see IncrementalManager#isFeatureEnabled and IncrementalManager#isV2() + * @hide + */ + @SystemApi + @SdkConstant(SdkConstantType.FEATURE) + public static final String FEATURE_INCREMENTAL_DELIVERY_VERSION = + "android.software.incremental_delivery_version"; + + /** + * Feature for {@link #getSystemAvailableFeatures} and {@link #hasSystemFeature}: * The device has tuner hardware to support tuner operations. * * <p>This feature implies that the device has the tuner HAL implementation. diff --git a/core/java/android/os/incremental/IncrementalManager.java b/core/java/android/os/incremental/IncrementalManager.java index 0ff68fc582d8..05899947c3df 100644 --- a/core/java/android/os/incremental/IncrementalManager.java +++ b/core/java/android/os/incremental/IncrementalManager.java @@ -241,6 +241,13 @@ public final class IncrementalManager { } /** + * Checks if device supports V2 calls (e.g. PerUid). + */ + public static boolean isV2Available() { + return nativeIsV2Available(); + } + + /** * Checks if Incremental installations are allowed. * A developer can disable Incremental installations by setting the property. */ @@ -439,6 +446,7 @@ public final class IncrementalManager { /* Native methods */ private static native boolean nativeIsEnabled(); + private static native boolean nativeIsV2Available(); private static native boolean nativeIsIncrementalPath(@NonNull String path); private static native byte[] nativeUnsafeGetFileSignature(@NonNull String path); } |
