Loading api/test-current.txt +3 −0 Original line number Diff line number Diff line Loading @@ -183,6 +183,9 @@ package android.app { field public static final int HISTORICAL_MODE_DISABLED = 0; // 0x0 field public static final int HISTORICAL_MODE_ENABLED_ACTIVE = 1; // 0x1 field public static final int HISTORICAL_MODE_ENABLED_PASSIVE = 2; // 0x2 field public static final String KEY_BG_STATE_SETTLE_TIME = "bg_state_settle_time"; field public static final String KEY_FG_SERVICE_STATE_SETTLE_TIME = "fg_service_state_settle_time"; field public static final String KEY_TOP_STATE_SETTLE_TIME = "top_state_settle_time"; field public static final String OPSTR_ACCEPT_HANDOVER = "android:accept_handover"; field public static final String OPSTR_ACCESS_NOTIFICATIONS = "android:access_notifications"; field public static final String OPSTR_ACTIVATE_VPN = "android:activate_vpn"; Loading core/java/android/app/AppOpsManager.java +32 −0 Original line number Diff line number Diff line Loading @@ -161,6 +161,38 @@ public class AppOpsManager { static IBinder sClientId; /** * How many seconds we want for a drop in uid state from top to settle before applying it. * * <>Set a parameter to {@link android.provider.Settings.Global#APP_OPS_CONSTANTS} * * @hide */ @TestApi public static final String KEY_TOP_STATE_SETTLE_TIME = "top_state_settle_time"; /** * How many second we want for a drop in uid state from foreground to settle before applying it. * * <>Set a parameter to {@link android.provider.Settings.Global#APP_OPS_CONSTANTS} * * @hide */ @TestApi public static final String KEY_FG_SERVICE_STATE_SETTLE_TIME = "fg_service_state_settle_time"; /** * How many seconds we want for a drop in uid state from background to settle before applying * it. * * <>Set a parameter to {@link android.provider.Settings.Global#APP_OPS_CONSTANTS} * * @hide */ @TestApi public static final String KEY_BG_STATE_SETTLE_TIME = "bg_state_settle_time"; /** @hide */ @Retention(RetentionPolicy.SOURCE) @IntDef(flag = true, prefix = { "HISTORICAL_MODE_" }, value = { Loading services/core/java/com/android/server/appop/AppOpsService.java +6 −8 Original line number Diff line number Diff line Loading @@ -25,6 +25,9 @@ import static android.app.AppOpsManager.FILTER_BY_OP_NAMES; import static android.app.AppOpsManager.FILTER_BY_PACKAGE_NAME; import static android.app.AppOpsManager.FILTER_BY_UID; import static android.app.AppOpsManager.HistoricalOpsRequestFilter; import static android.app.AppOpsManager.KEY_BG_STATE_SETTLE_TIME; import static android.app.AppOpsManager.KEY_FG_SERVICE_STATE_SETTLE_TIME; import static android.app.AppOpsManager.KEY_TOP_STATE_SETTLE_TIME; import static android.app.AppOpsManager.MODE_ALLOWED; import static android.app.AppOpsManager.NoteOpEvent; import static android.app.AppOpsManager.OP_CAMERA; Loading Loading @@ -352,30 +355,25 @@ public class AppOpsService extends IAppOpsService.Stub { */ @VisibleForTesting final class Constants extends ContentObserver { // Key names stored in the settings value. private static final String KEY_TOP_STATE_SETTLE_TIME = "top_state_settle_time"; private static final String KEY_FG_SERVICE_STATE_SETTLE_TIME = "fg_service_state_settle_time"; private static final String KEY_BG_STATE_SETTLE_TIME = "bg_state_settle_time"; /** * How long we want for a drop in uid state from top to settle before applying it. * @see Settings.Global#APP_OPS_CONSTANTS * @see #KEY_TOP_STATE_SETTLE_TIME * @see AppOpsManager#KEY_TOP_STATE_SETTLE_TIME */ public long TOP_STATE_SETTLE_TIME; /** * How long we want for a drop in uid state from foreground to settle before applying it. * @see Settings.Global#APP_OPS_CONSTANTS * @see #KEY_FG_SERVICE_STATE_SETTLE_TIME * @see AppOpsManager#KEY_FG_SERVICE_STATE_SETTLE_TIME */ public long FG_SERVICE_STATE_SETTLE_TIME; /** * How long we want for a drop in uid state from background to settle before applying it. * @see Settings.Global#APP_OPS_CONSTANTS * @see #KEY_BG_STATE_SETTLE_TIME * @see AppOpsManager#KEY_BG_STATE_SETTLE_TIME */ public long BG_STATE_SETTLE_TIME; Loading Loading
api/test-current.txt +3 −0 Original line number Diff line number Diff line Loading @@ -183,6 +183,9 @@ package android.app { field public static final int HISTORICAL_MODE_DISABLED = 0; // 0x0 field public static final int HISTORICAL_MODE_ENABLED_ACTIVE = 1; // 0x1 field public static final int HISTORICAL_MODE_ENABLED_PASSIVE = 2; // 0x2 field public static final String KEY_BG_STATE_SETTLE_TIME = "bg_state_settle_time"; field public static final String KEY_FG_SERVICE_STATE_SETTLE_TIME = "fg_service_state_settle_time"; field public static final String KEY_TOP_STATE_SETTLE_TIME = "top_state_settle_time"; field public static final String OPSTR_ACCEPT_HANDOVER = "android:accept_handover"; field public static final String OPSTR_ACCESS_NOTIFICATIONS = "android:access_notifications"; field public static final String OPSTR_ACTIVATE_VPN = "android:activate_vpn"; Loading
core/java/android/app/AppOpsManager.java +32 −0 Original line number Diff line number Diff line Loading @@ -161,6 +161,38 @@ public class AppOpsManager { static IBinder sClientId; /** * How many seconds we want for a drop in uid state from top to settle before applying it. * * <>Set a parameter to {@link android.provider.Settings.Global#APP_OPS_CONSTANTS} * * @hide */ @TestApi public static final String KEY_TOP_STATE_SETTLE_TIME = "top_state_settle_time"; /** * How many second we want for a drop in uid state from foreground to settle before applying it. * * <>Set a parameter to {@link android.provider.Settings.Global#APP_OPS_CONSTANTS} * * @hide */ @TestApi public static final String KEY_FG_SERVICE_STATE_SETTLE_TIME = "fg_service_state_settle_time"; /** * How many seconds we want for a drop in uid state from background to settle before applying * it. * * <>Set a parameter to {@link android.provider.Settings.Global#APP_OPS_CONSTANTS} * * @hide */ @TestApi public static final String KEY_BG_STATE_SETTLE_TIME = "bg_state_settle_time"; /** @hide */ @Retention(RetentionPolicy.SOURCE) @IntDef(flag = true, prefix = { "HISTORICAL_MODE_" }, value = { Loading
services/core/java/com/android/server/appop/AppOpsService.java +6 −8 Original line number Diff line number Diff line Loading @@ -25,6 +25,9 @@ import static android.app.AppOpsManager.FILTER_BY_OP_NAMES; import static android.app.AppOpsManager.FILTER_BY_PACKAGE_NAME; import static android.app.AppOpsManager.FILTER_BY_UID; import static android.app.AppOpsManager.HistoricalOpsRequestFilter; import static android.app.AppOpsManager.KEY_BG_STATE_SETTLE_TIME; import static android.app.AppOpsManager.KEY_FG_SERVICE_STATE_SETTLE_TIME; import static android.app.AppOpsManager.KEY_TOP_STATE_SETTLE_TIME; import static android.app.AppOpsManager.MODE_ALLOWED; import static android.app.AppOpsManager.NoteOpEvent; import static android.app.AppOpsManager.OP_CAMERA; Loading Loading @@ -352,30 +355,25 @@ public class AppOpsService extends IAppOpsService.Stub { */ @VisibleForTesting final class Constants extends ContentObserver { // Key names stored in the settings value. private static final String KEY_TOP_STATE_SETTLE_TIME = "top_state_settle_time"; private static final String KEY_FG_SERVICE_STATE_SETTLE_TIME = "fg_service_state_settle_time"; private static final String KEY_BG_STATE_SETTLE_TIME = "bg_state_settle_time"; /** * How long we want for a drop in uid state from top to settle before applying it. * @see Settings.Global#APP_OPS_CONSTANTS * @see #KEY_TOP_STATE_SETTLE_TIME * @see AppOpsManager#KEY_TOP_STATE_SETTLE_TIME */ public long TOP_STATE_SETTLE_TIME; /** * How long we want for a drop in uid state from foreground to settle before applying it. * @see Settings.Global#APP_OPS_CONSTANTS * @see #KEY_FG_SERVICE_STATE_SETTLE_TIME * @see AppOpsManager#KEY_FG_SERVICE_STATE_SETTLE_TIME */ public long FG_SERVICE_STATE_SETTLE_TIME; /** * How long we want for a drop in uid state from background to settle before applying it. * @see Settings.Global#APP_OPS_CONSTANTS * @see #KEY_BG_STATE_SETTLE_TIME * @see AppOpsManager#KEY_BG_STATE_SETTLE_TIME */ public long BG_STATE_SETTLE_TIME; Loading