Loading SQLITE_OWNERS +7 −0 Original line number Diff line number Diff line # Android platform SQLite owners are responsible for: # 1. Periodically updating libsqlite from upstream sqlite.org. # 2. Escalating libsqlite bug reports to upstream sqlite.org. # 3. Addressing bugs, performance regressions, and feature requests # in Android SDK SQLite wrappers (android.database.sqlite.*). # 4. Reviewing proposed changes to said Android SDK SQLite wrappers. shayba@google.com shombert@google.com apex/jobscheduler/service/java/com/android/server/alarm/AlarmManagerService.java +0 −9 Original line number Diff line number Diff line Loading @@ -4925,7 +4925,6 @@ public class AlarmManagerService extends SystemService { sdFilter.addAction(Intent.ACTION_EXTERNAL_APPLICATIONS_UNAVAILABLE); sdFilter.addAction(Intent.ACTION_USER_STOPPED); if (mStartUserBeforeScheduledAlarms) { sdFilter.addAction(Intent.ACTION_LOCKED_BOOT_COMPLETED); sdFilter.addAction(Intent.ACTION_USER_REMOVED); } sdFilter.addAction(Intent.ACTION_UID_REMOVED); Loading Loading @@ -4958,14 +4957,6 @@ public class AlarmManagerService extends SystemService { mTemporaryQuotaReserve.removeForUser(userHandle); } return; case Intent.ACTION_LOCKED_BOOT_COMPLETED: final int handle = intent.getIntExtra(Intent.EXTRA_USER_HANDLE, -1); if (handle >= 0) { if (mStartUserBeforeScheduledAlarms) { mUserWakeupStore.onUserStarted(handle); } } return; case Intent.ACTION_USER_REMOVED: final int user = intent.getIntExtra(Intent.EXTRA_USER_HANDLE, -1); if (user >= 0) { Loading apex/jobscheduler/service/java/com/android/server/alarm/UserWakeupStore.java +7 −55 Original line number Diff line number Diff line Loading @@ -98,12 +98,7 @@ public class UserWakeupStore { */ @GuardedBy("mUserWakeupLock") private final SparseLongArray mUserStarts = new SparseLongArray(); /** * A list of users that are in a phase after they have been started but before alarms were * initialized. */ @GuardedBy("mUserWakeupLock") private final SparseLongArray mStartingUsers = new SparseLongArray(); private Executor mBackgroundExecutor; private static final File USER_WAKEUP_DIR = new File(Environment.getDataSystemDirectory(), ROOT_DIR_NAME); Loading @@ -124,9 +119,6 @@ public class UserWakeupStore { */ public void addUserWakeup(int userId, long alarmTime) { synchronized (mUserWakeupLock) { // This should not be needed, but if an app in the user is scheduling an alarm clock, we // consider the user start complete. There is a dedicated removal when user is started. mStartingUsers.delete(userId); mUserStarts.put(userId, alarmTime - BUFFER_TIME_MS + getUserWakeupOffset()); } updateUserListFile(); Loading Loading @@ -192,23 +184,10 @@ public class UserWakeupStore { } /** * Move user from wakeup list to starting user list. * Remove scheduled user wakeup from the list when it is started. */ public void onUserStarting(int userId) { synchronized (mUserWakeupLock) { final long wakeup = getWakeupTimeForUser(userId); if (wakeup >= 0) { mStartingUsers.put(userId, wakeup); mUserStarts.delete(userId); } } } /** * Remove userId from starting user list once start is complete. */ public void onUserStarted(int userId) { if (deleteWakeupFromStartingUsers(userId)) { if (deleteWakeupFromUserStarts(userId)) { updateUserListFile(); } } Loading @@ -217,7 +196,7 @@ public class UserWakeupStore { * Remove userId from the store when the user is removed. */ public void onUserRemoved(int userId) { if (deleteWakeupFromUserStarts(userId) || deleteWakeupFromStartingUsers(userId)) { if (deleteWakeupFromUserStarts(userId)) { updateUserListFile(); } } Loading @@ -227,29 +206,14 @@ public class UserWakeupStore { * @return true if an entry is found and the list of wakeups changes. */ private boolean deleteWakeupFromUserStarts(int userId) { int index; synchronized (mUserWakeupLock) { index = mUserStarts.indexOfKey(userId); final int index = mUserStarts.indexOfKey(userId); if (index >= 0) { mUserStarts.removeAt(index); return true; } return false; } return index >= 0; } /** * Remove wakeup for a given userId from mStartingUsers. * @return true if an entry is found and the list of wakeups changes. */ private boolean deleteWakeupFromStartingUsers(int userId) { int index; synchronized (mUserWakeupLock) { index = mStartingUsers.indexOfKey(userId); if (index >= 0) { mStartingUsers.removeAt(index); } } return index >= 0; } /** Loading Loading @@ -299,9 +263,6 @@ public class UserWakeupStore { for (int i = 0; i < mUserStarts.size(); i++) { listOfUsers.add(new Pair<>(mUserStarts.keyAt(i), mUserStarts.valueAt(i))); } for (int i = 0; i < mStartingUsers.size(); i++) { listOfUsers.add(new Pair<>(mStartingUsers.keyAt(i), mStartingUsers.valueAt(i))); } } Collections.sort(listOfUsers, Comparator.comparingLong(pair -> pair.second)); for (int i = 0; i < listOfUsers.size(); i++) { Loading Loading @@ -329,7 +290,6 @@ public class UserWakeupStore { } synchronized (mUserWakeupLock) { mUserStarts.clear(); mStartingUsers.clear(); } try (FileInputStream fis = userWakeupFile.openRead()) { final TypedXmlPullParser parser = Xml.resolvePullParser(fis); Loading Loading @@ -396,14 +356,6 @@ public class UserWakeupStore { TimeUtils.formatDuration(mUserStarts.valueAt(i), nowELAPSED, pw); pw.println(); } pw.println(mStartingUsers.size() + " starting users: "); for (int i = 0; i < mStartingUsers.size(); i++) { pw.print("UserId: "); pw.print(mStartingUsers.keyAt(i)); pw.print(", userStartTime: "); TimeUtils.formatDuration(mStartingUsers.valueAt(i), nowELAPSED, pw); pw.println(); } pw.decreaseIndent(); } } Loading api/Android.bp +10 −8 Original line number Diff line number Diff line Loading @@ -157,6 +157,7 @@ genrule { genrule { name: "frameworks-base-api-system-current-compat", srcs: [ ":android.api.public.latest", ":android.api.system.latest", ":android-incompatibilities.api.system.latest", ":frameworks-base-api-current.txt", Loading @@ -165,33 +166,35 @@ genrule { out: ["updated-baseline.txt"], tools: ["metalava"], cmd: metalava_cmd + "--check-compatibility:api:released $(location :android.api.public.latest) " + "--check-compatibility:api:released $(location :android.api.system.latest) " + "--check-compatibility:base $(location :frameworks-base-api-current.txt) " + "--baseline:compatibility:released $(location :android-incompatibilities.api.system.latest) " + "--update-baseline:compatibility:released $(genDir)/updated-baseline.txt " + "$(location :frameworks-base-api-current.txt) " + "$(location :frameworks-base-api-system-current.txt)", } genrule { name: "frameworks-base-api-module-lib-current-compat", srcs: [ ":android.api.public.latest", ":android.api.system.latest", ":android.api.module-lib.latest", ":android-incompatibilities.api.module-lib.latest", ":frameworks-base-api-current.txt", ":frameworks-base-api-system-current.txt", ":frameworks-base-api-module-lib-current.txt", ], out: ["updated-baseline.txt"], tools: ["metalava"], cmd: metalava_cmd + "--check-compatibility:api:released $(location :android.api.public.latest) " + "--check-compatibility:api:released $(location :android.api.system.latest) " + "--check-compatibility:api:released $(location :android.api.module-lib.latest) " + // Note: having "public" be the base of module-lib is not perfect -- it should // ideally be a merged public+system (which metalava is not currently able to generate). // This "base" will help when migrating from MODULE_LIBS -> public, but not when // migrating from MODULE_LIBS -> system (where it needs to instead be listed as // an incompatibility). "--check-compatibility:base $(location :frameworks-base-api-current.txt) " + "--baseline:compatibility:released $(location :android-incompatibilities.api.module-lib.latest) " + "--update-baseline:compatibility:released $(genDir)/updated-baseline.txt " + "$(location :frameworks-base-api-current.txt) " + "$(location :frameworks-base-api-system-current.txt) " + "$(location :frameworks-base-api-module-lib-current.txt)", } Loading Loading @@ -373,7 +376,6 @@ stubs_defaults { high_mem: true, // Lots of sources => high memory use, see b/170701554 installable: false, annotations_enabled: true, previous_api: ":android.api.public.latest", merge_annotations_dirs: ["metalava-manual"], defaults_visibility: ["//frameworks/base/api"], visibility: [ Loading api/StubLibraries.bp +27 −1 Original line number Diff line number Diff line Loading @@ -38,6 +38,9 @@ non_updatable_exportable_droidstubs { "android-non-updatable-stubs-defaults", "module-classpath-stubs-defaults", ], // Use full Android API not just the non-updatable API as the latter is incomplete // and can result in incorrect behavior. previous_api: ":android.api.combined.public.latest", check_api: { current: { api_file: ":non-updatable-current.txt", Loading Loading @@ -118,6 +121,9 @@ non_updatable_exportable_droidstubs { "module-classpath-stubs-defaults", ], flags: priv_apps, // Use full Android API not just the non-updatable API as the latter is incomplete // and can result in incorrect behavior. previous_api: ":android.api.combined.system.latest", check_api: { current: { api_file: ":non-updatable-system-current.txt", Loading Loading @@ -178,6 +184,9 @@ non_updatable_exportable_droidstubs { "module-classpath-stubs-defaults", ], flags: test + priv_apps_in_stubs, // Use full Android API not just the non-updatable API as the latter is incomplete // and can result in incorrect behavior. previous_api: ":android.api.combined.test.latest", check_api: { current: { api_file: ":non-updatable-test-current.txt", Loading Loading @@ -257,6 +266,9 @@ non_updatable_exportable_droidstubs { "module-classpath-stubs-defaults", ], flags: priv_apps_in_stubs + module_libs, // Use full Android API not just the non-updatable API as the latter is incomplete // and can result in incorrect behavior. previous_api: ":android.api.combined.module-lib.latest", check_api: { current: { api_file: ":non-updatable-module-lib-current.txt", Loading Loading @@ -571,6 +583,9 @@ java_api_library { ], defaults: ["android-non-updatable_everything_from_text_defaults"], full_api_surface_stub: "android_stubs_current.from-text", // Use full Android API not just the non-updatable API as the latter is incomplete // and can result in incorrect behavior. previous_api: ":android.api.combined.public.latest", } java_api_library { Loading @@ -582,6 +597,9 @@ java_api_library { ], defaults: ["android-non-updatable_everything_from_text_defaults"], full_api_surface_stub: "android_system_stubs_current.from-text", // Use full Android API not just the non-updatable API as the latter is incomplete // and can result in incorrect behavior. previous_api: ":android.api.combined.system.latest", } java_api_library { Loading @@ -594,6 +612,9 @@ java_api_library { ], defaults: ["android-non-updatable_everything_from_text_defaults"], full_api_surface_stub: "android_test_stubs_current.from-text", // Use full Android API not just the non-updatable API as the latter is incomplete // and can result in incorrect behavior. previous_api: ":android.api.combined.test.latest", } java_api_library { Loading @@ -606,6 +627,9 @@ java_api_library { ], defaults: ["android-non-updatable_everything_from_text_defaults"], full_api_surface_stub: "android_module_lib_stubs_current_full.from-text", // Use full Android API not just the non-updatable API as the latter is incomplete // and can result in incorrect behavior. previous_api: ":android.api.combined.module-lib.latest", } // This module generates a stub jar that is a union of the test and module lib Loading @@ -623,6 +647,8 @@ java_api_library { defaults: ["android-non-updatable_everything_from_text_defaults"], full_api_surface_stub: "android_test_module_lib_stubs_current.from-text", // No need to specify previous_api as this is not used for compiling against. // This module is only used for hiddenapi, and other modules should not // depend on this module. visibility: ["//visibility:private"], Loading Loading @@ -922,7 +948,7 @@ java_defaults { "i18n.module.public.api.stubs.source.system.api.contribution", "i18n.module.public.api.stubs.source.module_lib.api.contribution", ], previous_api: ":android.api.public.latest", previous_api: ":android.api.combined.module-lib.latest", } // Java API library definitions per API surface Loading Loading
SQLITE_OWNERS +7 −0 Original line number Diff line number Diff line # Android platform SQLite owners are responsible for: # 1. Periodically updating libsqlite from upstream sqlite.org. # 2. Escalating libsqlite bug reports to upstream sqlite.org. # 3. Addressing bugs, performance regressions, and feature requests # in Android SDK SQLite wrappers (android.database.sqlite.*). # 4. Reviewing proposed changes to said Android SDK SQLite wrappers. shayba@google.com shombert@google.com
apex/jobscheduler/service/java/com/android/server/alarm/AlarmManagerService.java +0 −9 Original line number Diff line number Diff line Loading @@ -4925,7 +4925,6 @@ public class AlarmManagerService extends SystemService { sdFilter.addAction(Intent.ACTION_EXTERNAL_APPLICATIONS_UNAVAILABLE); sdFilter.addAction(Intent.ACTION_USER_STOPPED); if (mStartUserBeforeScheduledAlarms) { sdFilter.addAction(Intent.ACTION_LOCKED_BOOT_COMPLETED); sdFilter.addAction(Intent.ACTION_USER_REMOVED); } sdFilter.addAction(Intent.ACTION_UID_REMOVED); Loading Loading @@ -4958,14 +4957,6 @@ public class AlarmManagerService extends SystemService { mTemporaryQuotaReserve.removeForUser(userHandle); } return; case Intent.ACTION_LOCKED_BOOT_COMPLETED: final int handle = intent.getIntExtra(Intent.EXTRA_USER_HANDLE, -1); if (handle >= 0) { if (mStartUserBeforeScheduledAlarms) { mUserWakeupStore.onUserStarted(handle); } } return; case Intent.ACTION_USER_REMOVED: final int user = intent.getIntExtra(Intent.EXTRA_USER_HANDLE, -1); if (user >= 0) { Loading
apex/jobscheduler/service/java/com/android/server/alarm/UserWakeupStore.java +7 −55 Original line number Diff line number Diff line Loading @@ -98,12 +98,7 @@ public class UserWakeupStore { */ @GuardedBy("mUserWakeupLock") private final SparseLongArray mUserStarts = new SparseLongArray(); /** * A list of users that are in a phase after they have been started but before alarms were * initialized. */ @GuardedBy("mUserWakeupLock") private final SparseLongArray mStartingUsers = new SparseLongArray(); private Executor mBackgroundExecutor; private static final File USER_WAKEUP_DIR = new File(Environment.getDataSystemDirectory(), ROOT_DIR_NAME); Loading @@ -124,9 +119,6 @@ public class UserWakeupStore { */ public void addUserWakeup(int userId, long alarmTime) { synchronized (mUserWakeupLock) { // This should not be needed, but if an app in the user is scheduling an alarm clock, we // consider the user start complete. There is a dedicated removal when user is started. mStartingUsers.delete(userId); mUserStarts.put(userId, alarmTime - BUFFER_TIME_MS + getUserWakeupOffset()); } updateUserListFile(); Loading Loading @@ -192,23 +184,10 @@ public class UserWakeupStore { } /** * Move user from wakeup list to starting user list. * Remove scheduled user wakeup from the list when it is started. */ public void onUserStarting(int userId) { synchronized (mUserWakeupLock) { final long wakeup = getWakeupTimeForUser(userId); if (wakeup >= 0) { mStartingUsers.put(userId, wakeup); mUserStarts.delete(userId); } } } /** * Remove userId from starting user list once start is complete. */ public void onUserStarted(int userId) { if (deleteWakeupFromStartingUsers(userId)) { if (deleteWakeupFromUserStarts(userId)) { updateUserListFile(); } } Loading @@ -217,7 +196,7 @@ public class UserWakeupStore { * Remove userId from the store when the user is removed. */ public void onUserRemoved(int userId) { if (deleteWakeupFromUserStarts(userId) || deleteWakeupFromStartingUsers(userId)) { if (deleteWakeupFromUserStarts(userId)) { updateUserListFile(); } } Loading @@ -227,29 +206,14 @@ public class UserWakeupStore { * @return true if an entry is found and the list of wakeups changes. */ private boolean deleteWakeupFromUserStarts(int userId) { int index; synchronized (mUserWakeupLock) { index = mUserStarts.indexOfKey(userId); final int index = mUserStarts.indexOfKey(userId); if (index >= 0) { mUserStarts.removeAt(index); return true; } return false; } return index >= 0; } /** * Remove wakeup for a given userId from mStartingUsers. * @return true if an entry is found and the list of wakeups changes. */ private boolean deleteWakeupFromStartingUsers(int userId) { int index; synchronized (mUserWakeupLock) { index = mStartingUsers.indexOfKey(userId); if (index >= 0) { mStartingUsers.removeAt(index); } } return index >= 0; } /** Loading Loading @@ -299,9 +263,6 @@ public class UserWakeupStore { for (int i = 0; i < mUserStarts.size(); i++) { listOfUsers.add(new Pair<>(mUserStarts.keyAt(i), mUserStarts.valueAt(i))); } for (int i = 0; i < mStartingUsers.size(); i++) { listOfUsers.add(new Pair<>(mStartingUsers.keyAt(i), mStartingUsers.valueAt(i))); } } Collections.sort(listOfUsers, Comparator.comparingLong(pair -> pair.second)); for (int i = 0; i < listOfUsers.size(); i++) { Loading Loading @@ -329,7 +290,6 @@ public class UserWakeupStore { } synchronized (mUserWakeupLock) { mUserStarts.clear(); mStartingUsers.clear(); } try (FileInputStream fis = userWakeupFile.openRead()) { final TypedXmlPullParser parser = Xml.resolvePullParser(fis); Loading Loading @@ -396,14 +356,6 @@ public class UserWakeupStore { TimeUtils.formatDuration(mUserStarts.valueAt(i), nowELAPSED, pw); pw.println(); } pw.println(mStartingUsers.size() + " starting users: "); for (int i = 0; i < mStartingUsers.size(); i++) { pw.print("UserId: "); pw.print(mStartingUsers.keyAt(i)); pw.print(", userStartTime: "); TimeUtils.formatDuration(mStartingUsers.valueAt(i), nowELAPSED, pw); pw.println(); } pw.decreaseIndent(); } } Loading
api/Android.bp +10 −8 Original line number Diff line number Diff line Loading @@ -157,6 +157,7 @@ genrule { genrule { name: "frameworks-base-api-system-current-compat", srcs: [ ":android.api.public.latest", ":android.api.system.latest", ":android-incompatibilities.api.system.latest", ":frameworks-base-api-current.txt", Loading @@ -165,33 +166,35 @@ genrule { out: ["updated-baseline.txt"], tools: ["metalava"], cmd: metalava_cmd + "--check-compatibility:api:released $(location :android.api.public.latest) " + "--check-compatibility:api:released $(location :android.api.system.latest) " + "--check-compatibility:base $(location :frameworks-base-api-current.txt) " + "--baseline:compatibility:released $(location :android-incompatibilities.api.system.latest) " + "--update-baseline:compatibility:released $(genDir)/updated-baseline.txt " + "$(location :frameworks-base-api-current.txt) " + "$(location :frameworks-base-api-system-current.txt)", } genrule { name: "frameworks-base-api-module-lib-current-compat", srcs: [ ":android.api.public.latest", ":android.api.system.latest", ":android.api.module-lib.latest", ":android-incompatibilities.api.module-lib.latest", ":frameworks-base-api-current.txt", ":frameworks-base-api-system-current.txt", ":frameworks-base-api-module-lib-current.txt", ], out: ["updated-baseline.txt"], tools: ["metalava"], cmd: metalava_cmd + "--check-compatibility:api:released $(location :android.api.public.latest) " + "--check-compatibility:api:released $(location :android.api.system.latest) " + "--check-compatibility:api:released $(location :android.api.module-lib.latest) " + // Note: having "public" be the base of module-lib is not perfect -- it should // ideally be a merged public+system (which metalava is not currently able to generate). // This "base" will help when migrating from MODULE_LIBS -> public, but not when // migrating from MODULE_LIBS -> system (where it needs to instead be listed as // an incompatibility). "--check-compatibility:base $(location :frameworks-base-api-current.txt) " + "--baseline:compatibility:released $(location :android-incompatibilities.api.module-lib.latest) " + "--update-baseline:compatibility:released $(genDir)/updated-baseline.txt " + "$(location :frameworks-base-api-current.txt) " + "$(location :frameworks-base-api-system-current.txt) " + "$(location :frameworks-base-api-module-lib-current.txt)", } Loading Loading @@ -373,7 +376,6 @@ stubs_defaults { high_mem: true, // Lots of sources => high memory use, see b/170701554 installable: false, annotations_enabled: true, previous_api: ":android.api.public.latest", merge_annotations_dirs: ["metalava-manual"], defaults_visibility: ["//frameworks/base/api"], visibility: [ Loading
api/StubLibraries.bp +27 −1 Original line number Diff line number Diff line Loading @@ -38,6 +38,9 @@ non_updatable_exportable_droidstubs { "android-non-updatable-stubs-defaults", "module-classpath-stubs-defaults", ], // Use full Android API not just the non-updatable API as the latter is incomplete // and can result in incorrect behavior. previous_api: ":android.api.combined.public.latest", check_api: { current: { api_file: ":non-updatable-current.txt", Loading Loading @@ -118,6 +121,9 @@ non_updatable_exportable_droidstubs { "module-classpath-stubs-defaults", ], flags: priv_apps, // Use full Android API not just the non-updatable API as the latter is incomplete // and can result in incorrect behavior. previous_api: ":android.api.combined.system.latest", check_api: { current: { api_file: ":non-updatable-system-current.txt", Loading Loading @@ -178,6 +184,9 @@ non_updatable_exportable_droidstubs { "module-classpath-stubs-defaults", ], flags: test + priv_apps_in_stubs, // Use full Android API not just the non-updatable API as the latter is incomplete // and can result in incorrect behavior. previous_api: ":android.api.combined.test.latest", check_api: { current: { api_file: ":non-updatable-test-current.txt", Loading Loading @@ -257,6 +266,9 @@ non_updatable_exportable_droidstubs { "module-classpath-stubs-defaults", ], flags: priv_apps_in_stubs + module_libs, // Use full Android API not just the non-updatable API as the latter is incomplete // and can result in incorrect behavior. previous_api: ":android.api.combined.module-lib.latest", check_api: { current: { api_file: ":non-updatable-module-lib-current.txt", Loading Loading @@ -571,6 +583,9 @@ java_api_library { ], defaults: ["android-non-updatable_everything_from_text_defaults"], full_api_surface_stub: "android_stubs_current.from-text", // Use full Android API not just the non-updatable API as the latter is incomplete // and can result in incorrect behavior. previous_api: ":android.api.combined.public.latest", } java_api_library { Loading @@ -582,6 +597,9 @@ java_api_library { ], defaults: ["android-non-updatable_everything_from_text_defaults"], full_api_surface_stub: "android_system_stubs_current.from-text", // Use full Android API not just the non-updatable API as the latter is incomplete // and can result in incorrect behavior. previous_api: ":android.api.combined.system.latest", } java_api_library { Loading @@ -594,6 +612,9 @@ java_api_library { ], defaults: ["android-non-updatable_everything_from_text_defaults"], full_api_surface_stub: "android_test_stubs_current.from-text", // Use full Android API not just the non-updatable API as the latter is incomplete // and can result in incorrect behavior. previous_api: ":android.api.combined.test.latest", } java_api_library { Loading @@ -606,6 +627,9 @@ java_api_library { ], defaults: ["android-non-updatable_everything_from_text_defaults"], full_api_surface_stub: "android_module_lib_stubs_current_full.from-text", // Use full Android API not just the non-updatable API as the latter is incomplete // and can result in incorrect behavior. previous_api: ":android.api.combined.module-lib.latest", } // This module generates a stub jar that is a union of the test and module lib Loading @@ -623,6 +647,8 @@ java_api_library { defaults: ["android-non-updatable_everything_from_text_defaults"], full_api_surface_stub: "android_test_module_lib_stubs_current.from-text", // No need to specify previous_api as this is not used for compiling against. // This module is only used for hiddenapi, and other modules should not // depend on this module. visibility: ["//visibility:private"], Loading Loading @@ -922,7 +948,7 @@ java_defaults { "i18n.module.public.api.stubs.source.system.api.contribution", "i18n.module.public.api.stubs.source.module_lib.api.contribution", ], previous_api: ":android.api.public.latest", previous_api: ":android.api.combined.module-lib.latest", } // Java API library definitions per API surface Loading