Loading api/current.txt +1 −1 Original line number Diff line number Diff line Loading @@ -3943,7 +3943,7 @@ package android.app { field public static final int IMPORTANCE_FOREGROUND_SERVICE = 125; // 0x7d field public static final int IMPORTANCE_GONE = 1000; // 0x3e8 field public static final int IMPORTANCE_PERCEPTIBLE = 230; // 0xe6 field public static final deprecated int IMPORTANCE_PERCEPTIBLE_DEPRECATED = 130; // 0x82 field public static final int IMPORTANCE_PERCEPTIBLE_PRE_26 = 130; // 0x82 field public static final int IMPORTANCE_SERVICE = 300; // 0x12c field public static final int IMPORTANCE_TOP_SLEEPING = 150; // 0x96 field public static final int IMPORTANCE_VISIBLE = 200; // 0xc8 api/system-current.txt +1 −1 Original line number Diff line number Diff line Loading @@ -4092,7 +4092,7 @@ package android.app { field public static final int IMPORTANCE_FOREGROUND_SERVICE = 125; // 0x7d field public static final int IMPORTANCE_GONE = 1000; // 0x3e8 field public static final int IMPORTANCE_PERCEPTIBLE = 230; // 0xe6 field public static final deprecated int IMPORTANCE_PERCEPTIBLE_DEPRECATED = 130; // 0x82 field public static final int IMPORTANCE_PERCEPTIBLE_PRE_26 = 130; // 0x82 field public static final int IMPORTANCE_SERVICE = 300; // 0x12c field public static final int IMPORTANCE_TOP_SLEEPING = 150; // 0x96 field public static final int IMPORTANCE_VISIBLE = 200; // 0xc8 api/test-current.txt +1 −1 Original line number Diff line number Diff line Loading @@ -3953,7 +3953,7 @@ package android.app { field public static final int IMPORTANCE_FOREGROUND_SERVICE = 125; // 0x7d field public static final int IMPORTANCE_GONE = 1000; // 0x3e8 field public static final int IMPORTANCE_PERCEPTIBLE = 230; // 0xe6 field public static final deprecated int IMPORTANCE_PERCEPTIBLE_DEPRECATED = 130; // 0x82 field public static final int IMPORTANCE_PERCEPTIBLE_PRE_26 = 130; // 0x82 field public static final int IMPORTANCE_SERVICE = 300; // 0x12c field public static final int IMPORTANCE_TOP_SLEEPING = 150; // 0x96 field public static final int IMPORTANCE_VISIBLE = 200; // 0xc8 core/java/android/app/ActivityManager.java +30 −9 Original line number Diff line number Diff line Loading @@ -3159,10 +3159,15 @@ public class ActivityManager { * before {@link Build.VERSION_CODES#O}. Since the {@link Build.VERSION_CODES#O} SDK, * the value of {@link #IMPORTANCE_PERCEPTIBLE} has been fixed. * * @deprecated Use {@link #IMPORTANCE_PERCEPTIBLE} instead. * <p>The system will return this value instead of {@link #IMPORTANCE_PERCEPTIBLE} * on Android versions below {@link Build.VERSION_CODES#O}. * * <p>On Android version {@link Build.VERSION_CODES#O} and later, this value will still be * returned for apps with the target API level below {@link Build.VERSION_CODES#O}. * For apps targeting version {@link Build.VERSION_CODES#O} and later, * the correct value {@link #IMPORTANCE_PERCEPTIBLE} will be returned. */ @Deprecated public static final int IMPORTANCE_PERCEPTIBLE_DEPRECATED = 130; public static final int IMPORTANCE_PERCEPTIBLE_PRE_26 = 130; /** * Constant for {@link #importance}: This process is not something the user Loading @@ -3176,11 +3181,17 @@ public class ActivityManager { * before {@link Build.VERSION_CODES#O}. Since the {@link Build.VERSION_CODES#O} SDK, * the value of {@link #IMPORTANCE_CANT_SAVE_STATE} has been fixed. * * @deprecated Use {@link #IMPORTANCE_CANT_SAVE_STATE} instead. * <p>The system will return this value instead of {@link #IMPORTANCE_CANT_SAVE_STATE} * on Android versions below {@link Build.VERSION_CODES#O}. * * <p>On Android version {@link Build.VERSION_CODES#O} after, this value will still be * returned for apps with the target API level below {@link Build.VERSION_CODES#O}. * For apps targeting version {@link Build.VERSION_CODES#O} and later, * the correct value {@link #IMPORTANCE_CANT_SAVE_STATE} will be returned. * * @hide */ @Deprecated public static final int IMPORTANCE_CANT_SAVE_STATE_DEPRECATED = 170; public static final int IMPORTANCE_CANT_SAVE_STATE_PRE_26 = 170; /** * Constant for {@link #importance}: This process is running an Loading Loading @@ -3260,15 +3271,25 @@ public class ActivityManager { */ public static @Importance int procStateToImportanceForClient(int procState, Context clientContext) { return procStateToImportanceForTargetSdk(procState, clientContext.getApplicationInfo().targetSdkVersion); } /** * See {@link #procStateToImportanceForClient}. * @hide */ public static @Importance int procStateToImportanceForTargetSdk(int procState, int targetSdkVersion) { final int importance = procStateToImportance(procState); // For pre O apps, convert to the old, wrong values. if (clientContext.getApplicationInfo().targetSdkVersion < VERSION_CODES.O) { if (targetSdkVersion < VERSION_CODES.O) { switch (importance) { case IMPORTANCE_PERCEPTIBLE: return IMPORTANCE_PERCEPTIBLE_DEPRECATED; return IMPORTANCE_PERCEPTIBLE_PRE_26; case IMPORTANCE_CANT_SAVE_STATE: return IMPORTANCE_CANT_SAVE_STATE_DEPRECATED; return IMPORTANCE_CANT_SAVE_STATE_PRE_26; } } return importance; Loading core/java/android/content/pm/PackageManagerInternal.java +5 −0 Original line number Diff line number Diff line Loading @@ -336,4 +336,9 @@ public abstract class PackageManagerInternal { * @param isolatedUid isolated uid that is no longer being used. */ public abstract void removeIsolatedUid(int isolatedUid); /** * Return the taget SDK version for the app with the given UID. */ public abstract int getUidTargetSdkVersion(int uid); } Loading
api/current.txt +1 −1 Original line number Diff line number Diff line Loading @@ -3943,7 +3943,7 @@ package android.app { field public static final int IMPORTANCE_FOREGROUND_SERVICE = 125; // 0x7d field public static final int IMPORTANCE_GONE = 1000; // 0x3e8 field public static final int IMPORTANCE_PERCEPTIBLE = 230; // 0xe6 field public static final deprecated int IMPORTANCE_PERCEPTIBLE_DEPRECATED = 130; // 0x82 field public static final int IMPORTANCE_PERCEPTIBLE_PRE_26 = 130; // 0x82 field public static final int IMPORTANCE_SERVICE = 300; // 0x12c field public static final int IMPORTANCE_TOP_SLEEPING = 150; // 0x96 field public static final int IMPORTANCE_VISIBLE = 200; // 0xc8
api/system-current.txt +1 −1 Original line number Diff line number Diff line Loading @@ -4092,7 +4092,7 @@ package android.app { field public static final int IMPORTANCE_FOREGROUND_SERVICE = 125; // 0x7d field public static final int IMPORTANCE_GONE = 1000; // 0x3e8 field public static final int IMPORTANCE_PERCEPTIBLE = 230; // 0xe6 field public static final deprecated int IMPORTANCE_PERCEPTIBLE_DEPRECATED = 130; // 0x82 field public static final int IMPORTANCE_PERCEPTIBLE_PRE_26 = 130; // 0x82 field public static final int IMPORTANCE_SERVICE = 300; // 0x12c field public static final int IMPORTANCE_TOP_SLEEPING = 150; // 0x96 field public static final int IMPORTANCE_VISIBLE = 200; // 0xc8
api/test-current.txt +1 −1 Original line number Diff line number Diff line Loading @@ -3953,7 +3953,7 @@ package android.app { field public static final int IMPORTANCE_FOREGROUND_SERVICE = 125; // 0x7d field public static final int IMPORTANCE_GONE = 1000; // 0x3e8 field public static final int IMPORTANCE_PERCEPTIBLE = 230; // 0xe6 field public static final deprecated int IMPORTANCE_PERCEPTIBLE_DEPRECATED = 130; // 0x82 field public static final int IMPORTANCE_PERCEPTIBLE_PRE_26 = 130; // 0x82 field public static final int IMPORTANCE_SERVICE = 300; // 0x12c field public static final int IMPORTANCE_TOP_SLEEPING = 150; // 0x96 field public static final int IMPORTANCE_VISIBLE = 200; // 0xc8
core/java/android/app/ActivityManager.java +30 −9 Original line number Diff line number Diff line Loading @@ -3159,10 +3159,15 @@ public class ActivityManager { * before {@link Build.VERSION_CODES#O}. Since the {@link Build.VERSION_CODES#O} SDK, * the value of {@link #IMPORTANCE_PERCEPTIBLE} has been fixed. * * @deprecated Use {@link #IMPORTANCE_PERCEPTIBLE} instead. * <p>The system will return this value instead of {@link #IMPORTANCE_PERCEPTIBLE} * on Android versions below {@link Build.VERSION_CODES#O}. * * <p>On Android version {@link Build.VERSION_CODES#O} and later, this value will still be * returned for apps with the target API level below {@link Build.VERSION_CODES#O}. * For apps targeting version {@link Build.VERSION_CODES#O} and later, * the correct value {@link #IMPORTANCE_PERCEPTIBLE} will be returned. */ @Deprecated public static final int IMPORTANCE_PERCEPTIBLE_DEPRECATED = 130; public static final int IMPORTANCE_PERCEPTIBLE_PRE_26 = 130; /** * Constant for {@link #importance}: This process is not something the user Loading @@ -3176,11 +3181,17 @@ public class ActivityManager { * before {@link Build.VERSION_CODES#O}. Since the {@link Build.VERSION_CODES#O} SDK, * the value of {@link #IMPORTANCE_CANT_SAVE_STATE} has been fixed. * * @deprecated Use {@link #IMPORTANCE_CANT_SAVE_STATE} instead. * <p>The system will return this value instead of {@link #IMPORTANCE_CANT_SAVE_STATE} * on Android versions below {@link Build.VERSION_CODES#O}. * * <p>On Android version {@link Build.VERSION_CODES#O} after, this value will still be * returned for apps with the target API level below {@link Build.VERSION_CODES#O}. * For apps targeting version {@link Build.VERSION_CODES#O} and later, * the correct value {@link #IMPORTANCE_CANT_SAVE_STATE} will be returned. * * @hide */ @Deprecated public static final int IMPORTANCE_CANT_SAVE_STATE_DEPRECATED = 170; public static final int IMPORTANCE_CANT_SAVE_STATE_PRE_26 = 170; /** * Constant for {@link #importance}: This process is running an Loading Loading @@ -3260,15 +3271,25 @@ public class ActivityManager { */ public static @Importance int procStateToImportanceForClient(int procState, Context clientContext) { return procStateToImportanceForTargetSdk(procState, clientContext.getApplicationInfo().targetSdkVersion); } /** * See {@link #procStateToImportanceForClient}. * @hide */ public static @Importance int procStateToImportanceForTargetSdk(int procState, int targetSdkVersion) { final int importance = procStateToImportance(procState); // For pre O apps, convert to the old, wrong values. if (clientContext.getApplicationInfo().targetSdkVersion < VERSION_CODES.O) { if (targetSdkVersion < VERSION_CODES.O) { switch (importance) { case IMPORTANCE_PERCEPTIBLE: return IMPORTANCE_PERCEPTIBLE_DEPRECATED; return IMPORTANCE_PERCEPTIBLE_PRE_26; case IMPORTANCE_CANT_SAVE_STATE: return IMPORTANCE_CANT_SAVE_STATE_DEPRECATED; return IMPORTANCE_CANT_SAVE_STATE_PRE_26; } } return importance; Loading
core/java/android/content/pm/PackageManagerInternal.java +5 −0 Original line number Diff line number Diff line Loading @@ -336,4 +336,9 @@ public abstract class PackageManagerInternal { * @param isolatedUid isolated uid that is no longer being used. */ public abstract void removeIsolatedUid(int isolatedUid); /** * Return the taget SDK version for the app with the given UID. */ public abstract int getUidTargetSdkVersion(int uid); }