Loading Android.bp +4 −7 Original line number Diff line number Diff line Loading @@ -606,7 +606,7 @@ filegroup { "core/java/**/*.logtags", "**/package.html", ], visibility: ["//visibility:private"], visibility: ["//frameworks/base/api"], } // Defaults for all stubs that include the non-updatable framework. These defaults do not include Loading @@ -620,12 +620,10 @@ stubs_defaults { java_version: "1.8", arg_files: [":frameworks-base-core-AndroidManifest.xml"], aidl: { local_include_dirs: [ "media/aidl", "telephony/java", ], include_dirs: [ "frameworks/av/aidl", "frameworks/base/media/aidl", "frameworks/base/telephony/java", "frameworks/native/libs/permission/aidl", "packages/modules/Bluetooth/framework/aidl-export", "packages/modules/Connectivity/framework/aidl-export", Loading Loading @@ -661,7 +659,7 @@ stubs_defaults { annotations_enabled: true, previous_api: ":android.api.public.latest", merge_annotations_dirs: ["metalava-manual"], defaults_visibility: ["//visibility:private"], defaults_visibility: ["//frameworks/base/api"], visibility: ["//frameworks/base/api"], } Loading Loading @@ -689,7 +687,6 @@ stubs_defaults { // NOTE: The below can be removed once the prebuilt stub contains IKE. "sdk_system_current_android.net.ipsec.ike", ], defaults_visibility: ["//visibility:private"], } build = [ Loading ApiDocs.bp +5 −5 Original line number Diff line number Diff line Loading @@ -182,10 +182,10 @@ droidstubs { // using droiddoc ///////////////////////////////////////////////////////////////////// framework_docs_only_args = " -android -manifest $(location core/res/AndroidManifest.xml) " + framework_docs_only_args = " -android -manifest $(location :frameworks-base-core-AndroidManifest.xml) " + "-metalavaApiSince " + "-werror -lerror -hide 111 -hide 113 -hide 125 -hide 126 -hide 127 -hide 128 " + "-overview $(location core/java/overview.html) " + "-overview $(location :frameworks-base-java-overview) " + // Federate Support Library references against local API file. "-federate SupportLib https://developer.android.com " + "-federationapi SupportLib $(location :current-support-api) " + Loading Loading @@ -218,16 +218,16 @@ doc_defaults { "sdk.preview 0", ], arg_files: [ "core/res/AndroidManifest.xml", "core/java/overview.html", ":frameworks-base-core-AndroidManifest.xml", ":frameworks-base-java-overview", ":current-support-api", ":current-androidx-api", ], // TODO(b/169090544): remove below aidl includes. aidl: { local_include_dirs: ["media/aidl"], include_dirs: [ "frameworks/av/aidl", "frameworks/base/media/aidl", "frameworks/native/libs/permission/aidl", ], }, Loading StubLibraries.bp +1 −0 Original line number Diff line number Diff line Loading @@ -515,6 +515,7 @@ droidstubs { ], api_levels_sdk_type: "public", extensions_info_file: ":sdk-extensions-info", visibility: ["//frameworks/base"], } droidstubs { Loading apex/jobscheduler/service/java/com/android/server/DeviceIdleController.java +9 −0 Original line number Diff line number Diff line Loading @@ -100,6 +100,7 @@ import com.android.internal.util.ArrayUtils; import com.android.internal.util.DumpUtils; import com.android.internal.util.FastXmlSerializer; import com.android.internal.util.XmlUtils; import com.android.modules.expresslog.Counter; import com.android.server.am.BatteryStatsService; import com.android.server.deviceidle.ConstraintController; import com.android.server.deviceidle.DeviceIdleConstraintTracker; Loading Loading @@ -300,6 +301,12 @@ public class DeviceIdleController extends SystemService implements AnyMotionDetector.DeviceIdleCallback { private static final String TAG = "DeviceIdleController"; private static final String USER_ALLOWLIST_ADDITION_METRIC_ID = "battery.value_app_added_to_power_allowlist"; private static final String USER_ALLOWLIST_REMOVAL_METRIC_ID = "battery.value_app_removed_from_power_allowlist"; private static final boolean DEBUG = false; private static final boolean COMPRESS_TIME = false; Loading Loading @@ -2805,6 +2812,7 @@ public class DeviceIdleController extends SystemService if (mPowerSaveWhitelistUserApps.put(name, UserHandle.getAppId(ai.uid)) == null) { numAdded++; Counter.logIncrement(USER_ALLOWLIST_ADDITION_METRIC_ID); } } catch (PackageManager.NameNotFoundException e) { Slog.e(TAG, "Tried to add unknown package to power save whitelist: " + name); Loading @@ -2826,6 +2834,7 @@ public class DeviceIdleController extends SystemService reportPowerSaveWhitelistChangedLocked(); updateWhitelistAppIdsLocked(); writeConfigFileLocked(); Counter.logIncrement(USER_ALLOWLIST_REMOVAL_METRIC_ID); return true; } } Loading apex/jobscheduler/service/java/com/android/server/job/JobSchedulerService.java +13 −0 Original line number Diff line number Diff line Loading @@ -1443,6 +1443,9 @@ public class JobSchedulerService extends com.android.server.SystemService if (mActivityManagerInternal.isAppStartModeDisabled(uId, servicePkg)) { Slog.w(TAG, "Not scheduling job " + uId + ":" + job.toString() + " -- package not allowed to start"); Counter.logIncrementWithUid( "job_scheduler.value_cntr_w_uid_schedule_failure_app_start_mode_disabled", uId); return JobScheduler.RESULT_FAILURE; } Loading Loading @@ -1519,6 +1522,9 @@ public class JobSchedulerService extends com.android.server.SystemService if ((mConstants.USE_TARE_POLICY && !mTareController.canScheduleEJ(jobStatus)) || (!mConstants.USE_TARE_POLICY && !mQuotaController.isWithinEJQuotaLocked(jobStatus))) { Counter.logIncrementWithUid( "job_scheduler.value_cntr_w_uid_schedule_failure_ej_out_of_quota", uId); return JobScheduler.RESULT_FAILURE; } } Loading Loading @@ -4083,6 +4089,9 @@ public class JobSchedulerService extends com.android.server.SystemService if (!isInStateToScheduleUiJobSource && !isInStateToScheduleUiJobCalling) { Slog.e(TAG, "Uid(s) " + sourceUid + "/" + callingUid + " not in a state to schedule user-initiated jobs"); Counter.logIncrementWithUid( "job_scheduler.value_cntr_w_uid_schedule_failure_uij_invalid_state", callingUid); return JobScheduler.RESULT_FAILURE; } } Loading Loading @@ -4136,10 +4145,14 @@ public class JobSchedulerService extends com.android.server.SystemService private int validateRunUserInitiatedJobsPermission(int uid, String packageName) { final int state = getRunUserInitiatedJobsPermissionState(uid, packageName); if (state == PermissionChecker.PERMISSION_HARD_DENIED) { Counter.logIncrementWithUid( "job_scheduler.value_cntr_w_uid_schedule_failure_uij_no_permission", uid); throw new SecurityException(android.Manifest.permission.RUN_USER_INITIATED_JOBS + " required to schedule user-initiated jobs."); } if (state == PermissionChecker.PERMISSION_SOFT_DENIED) { Counter.logIncrementWithUid( "job_scheduler.value_cntr_w_uid_schedule_failure_uij_no_permission", uid); return JobScheduler.RESULT_FAILURE; } return JobScheduler.RESULT_SUCCESS; Loading Loading
Android.bp +4 −7 Original line number Diff line number Diff line Loading @@ -606,7 +606,7 @@ filegroup { "core/java/**/*.logtags", "**/package.html", ], visibility: ["//visibility:private"], visibility: ["//frameworks/base/api"], } // Defaults for all stubs that include the non-updatable framework. These defaults do not include Loading @@ -620,12 +620,10 @@ stubs_defaults { java_version: "1.8", arg_files: [":frameworks-base-core-AndroidManifest.xml"], aidl: { local_include_dirs: [ "media/aidl", "telephony/java", ], include_dirs: [ "frameworks/av/aidl", "frameworks/base/media/aidl", "frameworks/base/telephony/java", "frameworks/native/libs/permission/aidl", "packages/modules/Bluetooth/framework/aidl-export", "packages/modules/Connectivity/framework/aidl-export", Loading Loading @@ -661,7 +659,7 @@ stubs_defaults { annotations_enabled: true, previous_api: ":android.api.public.latest", merge_annotations_dirs: ["metalava-manual"], defaults_visibility: ["//visibility:private"], defaults_visibility: ["//frameworks/base/api"], visibility: ["//frameworks/base/api"], } Loading Loading @@ -689,7 +687,6 @@ stubs_defaults { // NOTE: The below can be removed once the prebuilt stub contains IKE. "sdk_system_current_android.net.ipsec.ike", ], defaults_visibility: ["//visibility:private"], } build = [ Loading
ApiDocs.bp +5 −5 Original line number Diff line number Diff line Loading @@ -182,10 +182,10 @@ droidstubs { // using droiddoc ///////////////////////////////////////////////////////////////////// framework_docs_only_args = " -android -manifest $(location core/res/AndroidManifest.xml) " + framework_docs_only_args = " -android -manifest $(location :frameworks-base-core-AndroidManifest.xml) " + "-metalavaApiSince " + "-werror -lerror -hide 111 -hide 113 -hide 125 -hide 126 -hide 127 -hide 128 " + "-overview $(location core/java/overview.html) " + "-overview $(location :frameworks-base-java-overview) " + // Federate Support Library references against local API file. "-federate SupportLib https://developer.android.com " + "-federationapi SupportLib $(location :current-support-api) " + Loading Loading @@ -218,16 +218,16 @@ doc_defaults { "sdk.preview 0", ], arg_files: [ "core/res/AndroidManifest.xml", "core/java/overview.html", ":frameworks-base-core-AndroidManifest.xml", ":frameworks-base-java-overview", ":current-support-api", ":current-androidx-api", ], // TODO(b/169090544): remove below aidl includes. aidl: { local_include_dirs: ["media/aidl"], include_dirs: [ "frameworks/av/aidl", "frameworks/base/media/aidl", "frameworks/native/libs/permission/aidl", ], }, Loading
StubLibraries.bp +1 −0 Original line number Diff line number Diff line Loading @@ -515,6 +515,7 @@ droidstubs { ], api_levels_sdk_type: "public", extensions_info_file: ":sdk-extensions-info", visibility: ["//frameworks/base"], } droidstubs { Loading
apex/jobscheduler/service/java/com/android/server/DeviceIdleController.java +9 −0 Original line number Diff line number Diff line Loading @@ -100,6 +100,7 @@ import com.android.internal.util.ArrayUtils; import com.android.internal.util.DumpUtils; import com.android.internal.util.FastXmlSerializer; import com.android.internal.util.XmlUtils; import com.android.modules.expresslog.Counter; import com.android.server.am.BatteryStatsService; import com.android.server.deviceidle.ConstraintController; import com.android.server.deviceidle.DeviceIdleConstraintTracker; Loading Loading @@ -300,6 +301,12 @@ public class DeviceIdleController extends SystemService implements AnyMotionDetector.DeviceIdleCallback { private static final String TAG = "DeviceIdleController"; private static final String USER_ALLOWLIST_ADDITION_METRIC_ID = "battery.value_app_added_to_power_allowlist"; private static final String USER_ALLOWLIST_REMOVAL_METRIC_ID = "battery.value_app_removed_from_power_allowlist"; private static final boolean DEBUG = false; private static final boolean COMPRESS_TIME = false; Loading Loading @@ -2805,6 +2812,7 @@ public class DeviceIdleController extends SystemService if (mPowerSaveWhitelistUserApps.put(name, UserHandle.getAppId(ai.uid)) == null) { numAdded++; Counter.logIncrement(USER_ALLOWLIST_ADDITION_METRIC_ID); } } catch (PackageManager.NameNotFoundException e) { Slog.e(TAG, "Tried to add unknown package to power save whitelist: " + name); Loading @@ -2826,6 +2834,7 @@ public class DeviceIdleController extends SystemService reportPowerSaveWhitelistChangedLocked(); updateWhitelistAppIdsLocked(); writeConfigFileLocked(); Counter.logIncrement(USER_ALLOWLIST_REMOVAL_METRIC_ID); return true; } } Loading
apex/jobscheduler/service/java/com/android/server/job/JobSchedulerService.java +13 −0 Original line number Diff line number Diff line Loading @@ -1443,6 +1443,9 @@ public class JobSchedulerService extends com.android.server.SystemService if (mActivityManagerInternal.isAppStartModeDisabled(uId, servicePkg)) { Slog.w(TAG, "Not scheduling job " + uId + ":" + job.toString() + " -- package not allowed to start"); Counter.logIncrementWithUid( "job_scheduler.value_cntr_w_uid_schedule_failure_app_start_mode_disabled", uId); return JobScheduler.RESULT_FAILURE; } Loading Loading @@ -1519,6 +1522,9 @@ public class JobSchedulerService extends com.android.server.SystemService if ((mConstants.USE_TARE_POLICY && !mTareController.canScheduleEJ(jobStatus)) || (!mConstants.USE_TARE_POLICY && !mQuotaController.isWithinEJQuotaLocked(jobStatus))) { Counter.logIncrementWithUid( "job_scheduler.value_cntr_w_uid_schedule_failure_ej_out_of_quota", uId); return JobScheduler.RESULT_FAILURE; } } Loading Loading @@ -4083,6 +4089,9 @@ public class JobSchedulerService extends com.android.server.SystemService if (!isInStateToScheduleUiJobSource && !isInStateToScheduleUiJobCalling) { Slog.e(TAG, "Uid(s) " + sourceUid + "/" + callingUid + " not in a state to schedule user-initiated jobs"); Counter.logIncrementWithUid( "job_scheduler.value_cntr_w_uid_schedule_failure_uij_invalid_state", callingUid); return JobScheduler.RESULT_FAILURE; } } Loading Loading @@ -4136,10 +4145,14 @@ public class JobSchedulerService extends com.android.server.SystemService private int validateRunUserInitiatedJobsPermission(int uid, String packageName) { final int state = getRunUserInitiatedJobsPermissionState(uid, packageName); if (state == PermissionChecker.PERMISSION_HARD_DENIED) { Counter.logIncrementWithUid( "job_scheduler.value_cntr_w_uid_schedule_failure_uij_no_permission", uid); throw new SecurityException(android.Manifest.permission.RUN_USER_INITIATED_JOBS + " required to schedule user-initiated jobs."); } if (state == PermissionChecker.PERMISSION_SOFT_DENIED) { Counter.logIncrementWithUid( "job_scheduler.value_cntr_w_uid_schedule_failure_uij_no_permission", uid); return JobScheduler.RESULT_FAILURE; } return JobScheduler.RESULT_SUCCESS; Loading