diff options
| author | 2021-03-02 10:02:14 -0800 | |
|---|---|---|
| committer | 2021-03-02 10:26:20 -0800 | |
| commit | 78c789d33fffe6fe13c632fb6cd53757ea2fc4c0 (patch) | |
| tree | 5e5db7217a3a50a93ab129dc05e0608cbc87b9e1 | |
| parent | b8d3b7d210dee38195a18631194b7f1bcbde24db (diff) | |
Remove INCREMENTAL_VERSION and add version to INCREMENTAL feature.
This is addressing the API feedback.
Bug: 181015045
Fixes: 181015045
Test: atest PackageManagerShellCommandTest PackageManagerShellCommandIncrementalTest IncrementalServiceTest PackageManagerServiceTest ChecksumsTest
Change-Id: I3ea745a4f0f0a0d9ae90f0625dfce61a8649a76d
| -rw-r--r-- | core/api/system-current.txt | 3 | ||||
| -rw-r--r-- | core/java/android/content/pm/PackageManager.java | 18 | ||||
| -rw-r--r-- | core/java/com/android/server/SystemConfig.java | 3 |
3 files changed, 5 insertions, 19 deletions
diff --git a/core/api/system-current.txt b/core/api/system-current.txt index c7744a415db5..fc7f03d6e4b2 100644 --- a/core/api/system-current.txt +++ b/core/api/system-current.txt @@ -2552,8 +2552,7 @@ package android.content.pm { field public static final String FEATURE_BROADCAST_RADIO = "android.hardware.broadcastradio"; field public static final String FEATURE_CAMERA_TOGGLE = "android.hardware.camera.toggle"; field public static final String FEATURE_CONTEXT_HUB = "android.hardware.context_hub"; - field @Deprecated public static final String FEATURE_INCREMENTAL_DELIVERY = "android.software.incremental_delivery"; - field public static final String FEATURE_INCREMENTAL_DELIVERY_VERSION = "android.software.incremental_delivery_version"; + field public static final String FEATURE_INCREMENTAL_DELIVERY = "android.software.incremental_delivery"; field public static final String FEATURE_MICROPHONE_TOGGLE = "android.hardware.microphone.toggle"; field public static final String FEATURE_REBOOT_ESCROW = "android.hardware.reboot_escrow"; field public static final String FEATURE_TELEPHONY_CARRIERLOCK = "android.hardware.telephony.carrierlock"; diff --git a/core/java/android/content/pm/PackageManager.java b/core/java/android/content/pm/PackageManager.java index 3bc61444f1d1..7b62f3b2f1a2 100644 --- a/core/java/android/content/pm/PackageManager.java +++ b/core/java/android/content/pm/PackageManager.java @@ -3584,30 +3584,18 @@ 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#isFeatureEnabled - * @hide - * - * @deprecated Use {@link #FEATURE_INCREMENTAL_DELIVERY_VERSION} instead. - */ - @Deprecated - @SystemApi - @SdkConstant(SdkConstantType.FEATURE) - public static final String FEATURE_INCREMENTAL_DELIVERY = - "android.software.incremental_delivery"; - - /** - * 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 * @see IncrementalManager#getVersion() * @hide */ @SystemApi @SdkConstant(SdkConstantType.FEATURE) - public static final String FEATURE_INCREMENTAL_DELIVERY_VERSION = - "android.software.incremental_delivery_version"; + public static final String FEATURE_INCREMENTAL_DELIVERY = + "android.software.incremental_delivery"; /** * Feature for {@link #getSystemAvailableFeatures} and {@link #hasSystemFeature}: diff --git a/core/java/com/android/server/SystemConfig.java b/core/java/com/android/server/SystemConfig.java index 58df2be2b944..bac6bbe43c91 100644 --- a/core/java/com/android/server/SystemConfig.java +++ b/core/java/com/android/server/SystemConfig.java @@ -1234,8 +1234,7 @@ public class SystemConfig { final int incrementalVersion = IncrementalManager.getVersion(); if (incrementalVersion > 0) { - addFeature(PackageManager.FEATURE_INCREMENTAL_DELIVERY, 0); - addFeature(PackageManager.FEATURE_INCREMENTAL_DELIVERY_VERSION, incrementalVersion); + addFeature(PackageManager.FEATURE_INCREMENTAL_DELIVERY, incrementalVersion); } if (PackageManager.APP_ENUMERATION_ENABLED_BY_DEFAULT) { |