diff options
| author | 2023-02-24 00:05:45 +0000 | |
|---|---|---|
| committer | 2023-03-23 20:22:07 +0000 | |
| commit | 40e6cdf57ded5abdf2922479624dba937040dcef (patch) | |
| tree | 093bfa290bdc6d70d74d0ff2191ea5c6794dff4d | |
| parent | 9bbcd6e11ef15a87ad0a01c834e9e0b6fbca571a (diff) | |
Add new capability name.
Rename PROCESS_CAPABILITY_NETWORK to PROCESS_CAPABILITY_POWER_RESTRICTED_NETWORK so it's clearer what the capability grants.
Bug: 261999509
Test: CTS
Change-Id: Ia8b152ff5fdc348178e56dff45cfe51451f48b94
Merged-In: Ie0cc529c9154d6e3ac69d2d9e5a760a62bd7fe92
Merged-In: I9e366408851b310ada5c2b763788584ed223594c
| -rw-r--r-- | core/api/test-current.txt | 3 | ||||
| -rw-r--r-- | core/java/android/app/ActivityManager.java | 12 |
2 files changed, 12 insertions, 3 deletions
diff --git a/core/api/test-current.txt b/core/api/test-current.txt index 7cfb66a3dcc6..6a5ef3a67488 100644 --- a/core/api/test-current.txt +++ b/core/api/test-current.txt @@ -141,8 +141,9 @@ package android.app { field public static final int PROCESS_CAPABILITY_FOREGROUND_CAMERA = 2; // 0x2 field public static final int PROCESS_CAPABILITY_FOREGROUND_LOCATION = 1; // 0x1 field public static final int PROCESS_CAPABILITY_FOREGROUND_MICROPHONE = 4; // 0x4 - field public static final int PROCESS_CAPABILITY_NETWORK = 8; // 0x8 + field @Deprecated public static final int PROCESS_CAPABILITY_NETWORK = 8; // 0x8 field public static final int PROCESS_CAPABILITY_NONE = 0; // 0x0 + field public static final int PROCESS_CAPABILITY_POWER_RESTRICTED_NETWORK = 8; // 0x8 field public static final int PROCESS_STATE_FOREGROUND_SERVICE = 4; // 0x4 field public static final int PROCESS_STATE_TOP = 2; // 0x2 field public static final int STOP_USER_ON_SWITCH_DEFAULT = -1; // 0xffffffff diff --git a/core/java/android/app/ActivityManager.java b/core/java/android/app/ActivityManager.java index eadf758e2b99..d328b34a2a8f 100644 --- a/core/java/android/app/ActivityManager.java +++ b/core/java/android/app/ActivityManager.java @@ -643,9 +643,17 @@ public class ActivityManager { @TestApi public static final int PROCESS_CAPABILITY_FOREGROUND_MICROPHONE = 1 << 2; - /** @hide Process can access network despite any power saving resrictions */ + /** @hide Process can access network despite any power saving restrictions */ @TestApi - public static final int PROCESS_CAPABILITY_NETWORK = 1 << 3; + public static final int PROCESS_CAPABILITY_POWER_RESTRICTED_NETWORK = 1 << 3; + /** + * @hide + * @deprecated Use {@link #PROCESS_CAPABILITY_POWER_RESTRICTED_NETWORK} instead. + */ + @TestApi + @Deprecated + public static final int PROCESS_CAPABILITY_NETWORK = + PROCESS_CAPABILITY_POWER_RESTRICTED_NETWORK; /** @hide all capabilities, the ORing of all flags in {@link ProcessCapability}*/ @TestApi |