summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apct-tests/perftests/core/src/android/os/BinderCallsStatsPerfTest.java5
-rw-r--r--api/current.txt6
-rw-r--r--api/test-current.txt2
-rw-r--r--core/java/android/app/ActivityManagerInternal.java13
-rw-r--r--core/java/android/app/AppOpsManager.java2
-rw-r--r--core/java/android/app/AppOpsManagerInternal.java43
-rw-r--r--core/java/android/app/IActivityManager.aidl15
-rw-r--r--core/java/android/app/IUiAutomationConnection.aidl3
-rw-r--r--core/java/android/app/UiAutomation.java60
-rw-r--r--core/java/android/app/UiAutomationConnection.java35
-rw-r--r--core/java/android/content/pm/PackageManager.java2
-rw-r--r--core/java/android/content/pm/PackageManagerInternal.java43
-rw-r--r--core/java/android/os/BatteryStats.java4
-rw-r--r--core/java/android/os/Binder.java43
-rw-r--r--core/java/android/provider/Settings.java58
-rw-r--r--core/java/android/util/Half.java4
-rw-r--r--core/java/android/util/IntArray.java18
-rw-r--r--core/java/android/util/LongArray.java14
-rw-r--r--core/java/android/view/InputEvent.java13
-rw-r--r--core/java/android/view/KeyEvent.java41
-rw-r--r--core/java/android/view/MotionEvent.java2
-rw-r--r--core/java/android/view/WindowManager.java15
-rw-r--r--core/java/com/android/internal/app/IAppOpsService.aidl2
-rw-r--r--core/java/com/android/internal/net/NetworkStatsFactory.java12
-rw-r--r--core/java/com/android/internal/os/BatteryStatsImpl.java2
-rw-r--r--core/java/com/android/internal/os/BinderCallsStats.java131
-rw-r--r--core/java/com/android/internal/util/ArrayUtils.java13
-rw-r--r--core/jni/android_util_Binder.cpp52
-rw-r--r--core/jni/android_view_InputEventSender.cpp7
-rw-r--r--core/jni/android_view_KeyEvent.cpp10
-rw-r--r--core/proto/android/server/windowmanagerservice.proto2
-rw-r--r--core/res/res/values-night/values.xml34
-rw-r--r--core/res/res/values/attrs.xml4
-rw-r--r--core/res/res/values/config.xml10
-rw-r--r--core/tests/coretests/src/android/provider/SettingsBackupTest.java5
-rw-r--r--core/tests/coretests/src/android/view/KeyEventTest.java71
-rw-r--r--core/tests/coretests/src/com/android/internal/os/BinderCallsStatsTest.java138
-rw-r--r--libs/hwui/renderthread/CacheManager.cpp1
-rw-r--r--media/java/android/media/MediaPlayer2Impl.java66
-rw-r--r--media/java/android/media/tv/TvInputManager.java4
-rw-r--r--packages/SettingsLib/res/values-bs/arrays.xml50
-rw-r--r--packages/SettingsLib/res/values-bs/strings.xml64
-rw-r--r--packages/SettingsLib/res/values-es/strings.xml6
-rw-r--r--packages/SettingsLib/res/values-fa/strings.xml2
-rw-r--r--packages/SettingsLib/res/values-gl/arrays.xml8
-rw-r--r--packages/SettingsLib/res/values-gl/strings.xml10
-rw-r--r--packages/SettingsLib/res/values-ja/strings.xml2
-rw-r--r--packages/SettingsLib/res/values-nb/strings.xml2
-rw-r--r--packages/SettingsLib/res/values-pl/strings.xml2
-rw-r--r--packages/SettingsLib/res/values-pt-rBR/arrays.xml10
-rw-r--r--packages/SettingsLib/res/values-pt-rBR/strings.xml4
-rw-r--r--packages/SettingsLib/res/values-pt/arrays.xml10
-rw-r--r--packages/SettingsLib/res/values-pt/strings.xml4
-rw-r--r--packages/SystemUI/res-keyguard/values/strings.xml2
-rw-r--r--packages/SystemUI/res/color-night/qs_detail_progress_track.xml (renamed from packages/overlays/SysuiDarkThemeOverlay/res/color/qs_detail_progress_track.xml)0
-rw-r--r--packages/SystemUI/res/values/styles.xml7
-rw-r--r--packages/SystemUI/src/com/android/systemui/AutoReinflateContainer.java5
-rw-r--r--packages/SystemUI/src/com/android/systemui/HardwareUiLayout.java97
-rw-r--r--packages/SystemUI/src/com/android/systemui/Interpolators.java14
-rw-r--r--packages/SystemUI/src/com/android/systemui/doze/DozeUi.java3
-rw-r--r--packages/SystemUI/src/com/android/systemui/fragments/FragmentHostManager.java3
-rw-r--r--packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialog.java6
-rwxr-xr-x[-rw-r--r--]packages/SystemUI/src/com/android/systemui/pip/tv/PipManager.java11
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/tiles/NightDisplayTile.java22
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java23
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/BiometricUnlockController.java33
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/ConfigurationControllerImpl.java13
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java53
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java70
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowManager.java10
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/policy/BrightnessMirrorController.java9
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/policy/ConfigurationController.java1
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java113
-rw-r--r--packages/SystemUI/src/com/android/systemui/volume/VolumeDialogComponent.java2
-rw-r--r--packages/overlays/SysuiDarkThemeOverlay/Android.mk14
-rw-r--r--packages/overlays/SysuiDarkThemeOverlay/AndroidManifest.xml8
-rw-r--r--packages/overlays/SysuiDarkThemeOverlay/res/values-af/strings.xml23
-rw-r--r--packages/overlays/SysuiDarkThemeOverlay/res/values-am/strings.xml23
-rw-r--r--packages/overlays/SysuiDarkThemeOverlay/res/values-ar/strings.xml23
-rw-r--r--packages/overlays/SysuiDarkThemeOverlay/res/values-as/strings.xml23
-rw-r--r--packages/overlays/SysuiDarkThemeOverlay/res/values-az/strings.xml23
-rw-r--r--packages/overlays/SysuiDarkThemeOverlay/res/values-b+sr+Latn/strings.xml23
-rw-r--r--packages/overlays/SysuiDarkThemeOverlay/res/values-be/strings.xml23
-rw-r--r--packages/overlays/SysuiDarkThemeOverlay/res/values-bg/strings.xml23
-rw-r--r--packages/overlays/SysuiDarkThemeOverlay/res/values-bn/strings.xml23
-rw-r--r--packages/overlays/SysuiDarkThemeOverlay/res/values-bs/strings.xml23
-rw-r--r--packages/overlays/SysuiDarkThemeOverlay/res/values-ca/strings.xml23
-rw-r--r--packages/overlays/SysuiDarkThemeOverlay/res/values-cs/strings.xml23
-rw-r--r--packages/overlays/SysuiDarkThemeOverlay/res/values-da/strings.xml23
-rw-r--r--packages/overlays/SysuiDarkThemeOverlay/res/values-de/strings.xml23
-rw-r--r--packages/overlays/SysuiDarkThemeOverlay/res/values-el/strings.xml23
-rw-r--r--packages/overlays/SysuiDarkThemeOverlay/res/values-en-rAU/strings.xml23
-rw-r--r--packages/overlays/SysuiDarkThemeOverlay/res/values-en-rCA/strings.xml23
-rw-r--r--packages/overlays/SysuiDarkThemeOverlay/res/values-en-rGB/strings.xml23
-rw-r--r--packages/overlays/SysuiDarkThemeOverlay/res/values-en-rIN/strings.xml23
-rw-r--r--packages/overlays/SysuiDarkThemeOverlay/res/values-en-rXC/strings.xml23
-rw-r--r--packages/overlays/SysuiDarkThemeOverlay/res/values-es-rUS/strings.xml23
-rw-r--r--packages/overlays/SysuiDarkThemeOverlay/res/values-es/strings.xml23
-rw-r--r--packages/overlays/SysuiDarkThemeOverlay/res/values-et/strings.xml23
-rw-r--r--packages/overlays/SysuiDarkThemeOverlay/res/values-eu/strings.xml23
-rw-r--r--packages/overlays/SysuiDarkThemeOverlay/res/values-fa/strings.xml23
-rw-r--r--packages/overlays/SysuiDarkThemeOverlay/res/values-fi/strings.xml23
-rw-r--r--packages/overlays/SysuiDarkThemeOverlay/res/values-fr-rCA/strings.xml23
-rw-r--r--packages/overlays/SysuiDarkThemeOverlay/res/values-fr/strings.xml23
-rw-r--r--packages/overlays/SysuiDarkThemeOverlay/res/values-gl/strings.xml23
-rw-r--r--packages/overlays/SysuiDarkThemeOverlay/res/values-gu/strings.xml23
-rw-r--r--packages/overlays/SysuiDarkThemeOverlay/res/values-hi/strings.xml23
-rw-r--r--packages/overlays/SysuiDarkThemeOverlay/res/values-hr/strings.xml23
-rw-r--r--packages/overlays/SysuiDarkThemeOverlay/res/values-hu/strings.xml23
-rw-r--r--packages/overlays/SysuiDarkThemeOverlay/res/values-hy/strings.xml23
-rw-r--r--packages/overlays/SysuiDarkThemeOverlay/res/values-in/strings.xml23
-rw-r--r--packages/overlays/SysuiDarkThemeOverlay/res/values-is/strings.xml23
-rw-r--r--packages/overlays/SysuiDarkThemeOverlay/res/values-it/strings.xml23
-rw-r--r--packages/overlays/SysuiDarkThemeOverlay/res/values-iw/strings.xml23
-rw-r--r--packages/overlays/SysuiDarkThemeOverlay/res/values-ja/strings.xml23
-rw-r--r--packages/overlays/SysuiDarkThemeOverlay/res/values-ka/strings.xml23
-rw-r--r--packages/overlays/SysuiDarkThemeOverlay/res/values-kk/strings.xml23
-rw-r--r--packages/overlays/SysuiDarkThemeOverlay/res/values-km/strings.xml23
-rw-r--r--packages/overlays/SysuiDarkThemeOverlay/res/values-kn/strings.xml23
-rw-r--r--packages/overlays/SysuiDarkThemeOverlay/res/values-ko/strings.xml23
-rw-r--r--packages/overlays/SysuiDarkThemeOverlay/res/values-ky/strings.xml23
-rw-r--r--packages/overlays/SysuiDarkThemeOverlay/res/values-lo/strings.xml23
-rw-r--r--packages/overlays/SysuiDarkThemeOverlay/res/values-lt/strings.xml23
-rw-r--r--packages/overlays/SysuiDarkThemeOverlay/res/values-lv/strings.xml23
-rw-r--r--packages/overlays/SysuiDarkThemeOverlay/res/values-mk/strings.xml23
-rw-r--r--packages/overlays/SysuiDarkThemeOverlay/res/values-ml/strings.xml23
-rw-r--r--packages/overlays/SysuiDarkThemeOverlay/res/values-mn/strings.xml23
-rw-r--r--packages/overlays/SysuiDarkThemeOverlay/res/values-mr/strings.xml23
-rw-r--r--packages/overlays/SysuiDarkThemeOverlay/res/values-ms/strings.xml23
-rw-r--r--packages/overlays/SysuiDarkThemeOverlay/res/values-my/strings.xml23
-rw-r--r--packages/overlays/SysuiDarkThemeOverlay/res/values-nb/strings.xml23
-rw-r--r--packages/overlays/SysuiDarkThemeOverlay/res/values-ne/strings.xml23
-rw-r--r--packages/overlays/SysuiDarkThemeOverlay/res/values-nl/strings.xml23
-rw-r--r--packages/overlays/SysuiDarkThemeOverlay/res/values-or/strings.xml23
-rw-r--r--packages/overlays/SysuiDarkThemeOverlay/res/values-pa/strings.xml23
-rw-r--r--packages/overlays/SysuiDarkThemeOverlay/res/values-pl/strings.xml23
-rw-r--r--packages/overlays/SysuiDarkThemeOverlay/res/values-pt-rBR/strings.xml23
-rw-r--r--packages/overlays/SysuiDarkThemeOverlay/res/values-pt-rPT/strings.xml23
-rw-r--r--packages/overlays/SysuiDarkThemeOverlay/res/values-pt/strings.xml23
-rw-r--r--packages/overlays/SysuiDarkThemeOverlay/res/values-ro/strings.xml23
-rw-r--r--packages/overlays/SysuiDarkThemeOverlay/res/values-ru/strings.xml23
-rw-r--r--packages/overlays/SysuiDarkThemeOverlay/res/values-si/strings.xml23
-rw-r--r--packages/overlays/SysuiDarkThemeOverlay/res/values-sk/strings.xml23
-rw-r--r--packages/overlays/SysuiDarkThemeOverlay/res/values-sl/strings.xml23
-rw-r--r--packages/overlays/SysuiDarkThemeOverlay/res/values-sq/strings.xml23
-rw-r--r--packages/overlays/SysuiDarkThemeOverlay/res/values-sr/strings.xml23
-rw-r--r--packages/overlays/SysuiDarkThemeOverlay/res/values-sv/strings.xml23
-rw-r--r--packages/overlays/SysuiDarkThemeOverlay/res/values-sw/strings.xml23
-rw-r--r--packages/overlays/SysuiDarkThemeOverlay/res/values-ta/strings.xml23
-rw-r--r--packages/overlays/SysuiDarkThemeOverlay/res/values-te/strings.xml23
-rw-r--r--packages/overlays/SysuiDarkThemeOverlay/res/values-th/strings.xml23
-rw-r--r--packages/overlays/SysuiDarkThemeOverlay/res/values-tl/strings.xml23
-rw-r--r--packages/overlays/SysuiDarkThemeOverlay/res/values-tr/strings.xml23
-rw-r--r--packages/overlays/SysuiDarkThemeOverlay/res/values-uk/strings.xml23
-rw-r--r--packages/overlays/SysuiDarkThemeOverlay/res/values-ur/strings.xml23
-rw-r--r--packages/overlays/SysuiDarkThemeOverlay/res/values-uz/strings.xml23
-rw-r--r--packages/overlays/SysuiDarkThemeOverlay/res/values-vi/strings.xml23
-rw-r--r--packages/overlays/SysuiDarkThemeOverlay/res/values-zh-rCN/strings.xml23
-rw-r--r--packages/overlays/SysuiDarkThemeOverlay/res/values-zh-rHK/strings.xml23
-rw-r--r--packages/overlays/SysuiDarkThemeOverlay/res/values-zh-rTW/strings.xml23
-rw-r--r--packages/overlays/SysuiDarkThemeOverlay/res/values-zu/strings.xml23
-rw-r--r--packages/overlays/SysuiDarkThemeOverlay/res/values/strings.xml24
-rw-r--r--packages/overlays/SysuiDarkThemeOverlay/res/values/styles.xml12
-rw-r--r--services/core/java/com/android/server/AlarmManagerService.java4
-rw-r--r--services/core/java/com/android/server/AppOpsService.java90
-rw-r--r--services/core/java/com/android/server/BinderCallsStatsService.java101
-rw-r--r--services/core/java/com/android/server/am/ActivityManagerService.java429
-rw-r--r--services/core/java/com/android/server/am/ActivityRecord.java4
-rw-r--r--services/core/java/com/android/server/am/ActivityStack.java7
-rw-r--r--services/core/java/com/android/server/am/ActivityStackSupervisor.java8
-rw-r--r--services/core/java/com/android/server/am/ActivityStartController.java2
-rw-r--r--services/core/java/com/android/server/am/ActivityStartInterceptor.java8
-rw-r--r--services/core/java/com/android/server/am/ActivityTaskManagerService.java4
-rw-r--r--services/core/java/com/android/server/am/ProcessRecord.java7
-rw-r--r--services/core/java/com/android/server/am/RecentTasks.java34
-rw-r--r--services/core/java/com/android/server/am/UserController.java31
-rw-r--r--services/core/java/com/android/server/am/WindowProcessController.java5
-rw-r--r--services/core/java/com/android/server/am/WindowProcessListener.java3
-rw-r--r--services/core/java/com/android/server/input/InputForwarder.java5
-rw-r--r--services/core/java/com/android/server/notification/ZenModeHelper.java8
-rw-r--r--services/core/java/com/android/server/pm/PackageManagerService.java55
-rw-r--r--services/core/java/com/android/server/pm/permission/PermissionManagerInternal.java8
-rw-r--r--services/core/java/com/android/server/policy/BarController.java2
-rw-r--r--services/core/java/com/android/server/policy/PhoneWindowManager.java11
-rw-r--r--services/core/java/com/android/server/wallpaper/WallpaperManagerService.java148
-rw-r--r--services/core/java/com/android/server/wm/BoundsAnimationController.java30
-rw-r--r--services/core/java/com/android/server/wm/BoundsAnimationTarget.java3
-rw-r--r--services/core/java/com/android/server/wm/TaskStack.java60
-rw-r--r--services/core/jni/Android.bp2
-rw-r--r--services/java/com/android/server/SystemServer.java2
-rw-r--r--services/net/java/android/net/netlink/NetlinkSocket.java7
-rw-r--r--services/tests/servicestests/src/com/android/server/am/ActivityStartInterceptorTest.java15
-rw-r--r--services/tests/servicestests/src/com/android/server/am/ActivityTestsBase.java8
-rw-r--r--services/tests/servicestests/src/com/android/server/am/RecentTasksTest.java63
-rw-r--r--services/tests/servicestests/src/com/android/server/wm/BoundsAnimationControllerTests.java4
-rw-r--r--services/tests/servicestests/src/com/android/server/wm/TaskSnapshotSurfaceTest.java2
-rw-r--r--services/usage/java/com/android/server/usage/IntervalStats.java10
-rw-r--r--services/usage/java/com/android/server/usage/UsageStatsDatabase.java4
-rw-r--r--telephony/java/android/telephony/TelephonyManager.java54
-rw-r--r--telephony/java/android/telephony/ims/ImsExternalCallState.java8
-rw-r--r--telephony/java/com/android/internal/telephony/ITelephony.aidl14
-rw-r--r--tests/UsageStatsPerfTests/Android.mk34
-rw-r--r--tests/UsageStatsPerfTests/AndroidManifest.xml29
-rw-r--r--tests/UsageStatsPerfTests/AndroidTest.xml28
-rw-r--r--tests/UsageStatsPerfTests/src/com/android/frameworks/perftests/usage/tests/UsageStatsDatabasePerfTest.java183
-rw-r--r--wifi/OWNERS3
206 files changed, 2225 insertions, 3001 deletions
diff --git a/apct-tests/perftests/core/src/android/os/BinderCallsStatsPerfTest.java b/apct-tests/perftests/core/src/android/os/BinderCallsStatsPerfTest.java
index e4a850335aad..e126fb807b99 100644
--- a/apct-tests/perftests/core/src/android/os/BinderCallsStatsPerfTest.java
+++ b/apct-tests/perftests/core/src/android/os/BinderCallsStatsPerfTest.java
@@ -45,7 +45,7 @@ public class BinderCallsStatsPerfTest {
@Before
public void setUp() {
- mBinderCallsStats = new BinderCallsStats(true);
+ mBinderCallsStats = new BinderCallsStats();
}
@After
@@ -54,6 +54,7 @@ public class BinderCallsStatsPerfTest {
@Test
public void timeCallSession() {
+ mBinderCallsStats.setDetailedTracking(true);
final BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
Binder b = new Binder();
int i = 0;
@@ -66,9 +67,9 @@ public class BinderCallsStatsPerfTest {
@Test
public void timeCallSessionTrackingDisabled() {
+ mBinderCallsStats.setDetailedTracking(false);
final BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
Binder b = new Binder();
- mBinderCallsStats = new BinderCallsStats(false);
while (state.keepRunning()) {
BinderCallsStats.CallSession s = mBinderCallsStats.callStarted(b, 0);
mBinderCallsStats.callEnded(s, 0, 0);
diff --git a/api/current.txt b/api/current.txt
index f90ab4bf01a1..bad0e79cbc54 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -6120,8 +6120,10 @@ package android.app {
}
public final class UiAutomation {
+ method public void adoptShellPermissionIdentity();
method public void clearWindowAnimationFrameStats();
method public boolean clearWindowContentFrameStats(int);
+ method public void dropShellPermissionIdentity();
method public android.view.accessibility.AccessibilityEvent executeAndWaitForEvent(java.lang.Runnable, android.app.UiAutomation.AccessibilityEventFilter, long) throws java.util.concurrent.TimeoutException;
method public android.os.ParcelFileDescriptor executeShellCommand(java.lang.String);
method public android.view.accessibility.AccessibilityNodeInfo findFocus(int);
@@ -42506,9 +42508,13 @@ package android.telephony {
method public java.lang.String getIccAuthentication(int, int, java.lang.String);
method public java.lang.String getImei();
method public java.lang.String getImei(int);
+ method public java.lang.String getTypeAllocationCode();
+ method public java.lang.String getTypeAllocationCode(int);
method public java.lang.String getLine1Number();
method public java.lang.String getMeid();
method public java.lang.String getMeid(int);
+ method public java.lang.String getManufacturerCode();
+ method public java.lang.String getManufacturerCode(int);
method public java.lang.String getMmsUAProfUrl();
method public java.lang.String getMmsUserAgent();
method public java.lang.String getNai();
diff --git a/api/test-current.txt b/api/test-current.txt
index e05257818bc7..e5061ed32a9e 100644
--- a/api/test-current.txt
+++ b/api/test-current.txt
@@ -274,7 +274,9 @@ package android.content.pm {
method public abstract java.lang.String getPermissionControllerPackageName();
method public abstract java.lang.String getServicesSystemSharedLibraryPackageName();
method public abstract java.lang.String getSharedSystemSharedLibraryPackageName();
+ method public abstract void grantRuntimePermission(java.lang.String, java.lang.String, android.os.UserHandle);
method public abstract boolean isPermissionReviewModeEnabled();
+ method public abstract void revokeRuntimePermission(java.lang.String, java.lang.String, android.os.UserHandle);
field public static final java.lang.String FEATURE_ADOPTABLE_STORAGE = "android.software.adoptable_storage";
field public static final java.lang.String FEATURE_FILE_BASED_ENCRYPTION = "android.software.file_based_encryption";
field public static final int MATCH_FACTORY_ONLY = 2097152; // 0x200000
diff --git a/core/java/android/app/ActivityManagerInternal.java b/core/java/android/app/ActivityManagerInternal.java
index ed06f2aaf12e..7a9a553bb287 100644
--- a/core/java/android/app/ActivityManagerInternal.java
+++ b/core/java/android/app/ActivityManagerInternal.java
@@ -22,6 +22,7 @@ import android.content.ComponentName;
import android.content.IIntentSender;
import android.content.Intent;
import android.content.pm.ApplicationInfo;
+import android.content.pm.UserInfo;
import android.content.res.Configuration;
import android.os.Bundle;
import android.os.IBinder;
@@ -216,4 +217,16 @@ public abstract class ActivityManagerInternal {
public abstract void updateOomAdj();
public abstract void sendForegroundProfileChanged(int userId);
+
+ /**
+ * Returns whether the given user requires credential entry at this time. This is used to
+ * intercept activity launches for work apps when the Work Challenge is present.
+ */
+ public abstract boolean shouldConfirmCredentials(int userId);
+ public abstract int[] getCurrentProfileIds();
+ public abstract UserInfo getCurrentUser();
+ public abstract void ensureNotSpecialUser(int userId);
+ public abstract boolean isCurrentProfile(int userId);
+ public abstract boolean hasStartedUserState(int userId);
+ public abstract void finishUserSwitch(Object uss);
}
diff --git a/core/java/android/app/AppOpsManager.java b/core/java/android/app/AppOpsManager.java
index 8b3396392c3f..c3404a5c79e2 100644
--- a/core/java/android/app/AppOpsManager.java
+++ b/core/java/android/app/AppOpsManager.java
@@ -2487,7 +2487,7 @@ public class AppOpsManager {
*/
public int noteProxyOpNoThrow(int op, String proxiedPackageName) {
try {
- return mService.noteProxyOperation(op, mContext.getOpPackageName(),
+ return mService.noteProxyOperation(op, Process.myUid(), mContext.getOpPackageName(),
Binder.getCallingUid(), proxiedPackageName);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
diff --git a/core/java/android/app/AppOpsManagerInternal.java b/core/java/android/app/AppOpsManagerInternal.java
index 24c5d234c120..f5d5e6e9a950 100644
--- a/core/java/android/app/AppOpsManagerInternal.java
+++ b/core/java/android/app/AppOpsManagerInternal.java
@@ -18,12 +18,55 @@ package android.app;
import android.util.SparseIntArray;
+import com.android.internal.util.function.QuadFunction;
+import com.android.internal.util.function.TriFunction;
+
/**
* App ops service local interface.
*
* @hide Only for use within the system server.
*/
public abstract class AppOpsManagerInternal {
+ /** Interface to override app ops checks via composition */
+ public interface CheckOpsDelegate {
+ /**
+ * Allows overriding check operation behavior.
+ *
+ * @param code The op code to check.
+ * @param uid The UID for which to check.
+ * @param packageName The package for which to check.
+ * @param superImpl The super implementation.
+ * @return The app op check result.
+ */
+ int checkOperation(int code, int uid, String packageName,
+ TriFunction<Integer, Integer, String, Integer> superImpl);
+
+ /**
+ * Allows overriding check audio operation behavior.
+ *
+ * @param code The op code to check.
+ * @param usage The audio op usage.
+ * @param uid The UID for which to check.
+ * @param packageName The package for which to check.
+ * @param superImpl The super implementation.
+ * @return The app op check result.
+ */
+ int checkAudioOperation(int code, int usage, int uid, String packageName,
+ QuadFunction<Integer, Integer, Integer, String, Integer> superImpl);
+
+ /**
+ * Allows overriding note operation behavior.
+ *
+ * @param code The op code to note.
+ * @param uid The UID for which to note.
+ * @param packageName The package for which to note.
+ * @param superImpl The super implementation.
+ * @return The app op note result.
+ */
+ int noteOperation(int code, int uid, String packageName,
+ TriFunction<Integer, Integer, String, Integer> superImpl);
+ }
+
/**
* Set the currently configured device and profile owners. Specifies the package uid (value)
* that has been configured for each user (key) that has one. These will be allowed privileged
diff --git a/core/java/android/app/IActivityManager.aidl b/core/java/android/app/IActivityManager.aidl
index 76244ea3180c..f9c39165b2c8 100644
--- a/core/java/android/app/IActivityManager.aidl
+++ b/core/java/android/app/IActivityManager.aidl
@@ -498,4 +498,19 @@ interface IActivityManager {
* user unlock progress.
*/
boolean startUserInBackgroundWithListener(int userid, IProgressListener unlockProgressListener);
+
+ /**
+ * Method for the shell UID to start deletating its permission identity to an
+ * active instrumenation. The shell can delegate permissions only to one active
+ * instrumentation at a time. An active instrumentation is one running and
+ * started from the shell.
+ */
+ void startDelegateShellPermissionIdentity(int uid);
+
+ /**
+ * Method for the shell UID to stop deletating its permission identity to an
+ * active instrumenation. An active instrumentation is one running and
+ * started from the shell.
+ */
+ void stopDelegateShellPermissionIdentity();
}
diff --git a/core/java/android/app/IUiAutomationConnection.aidl b/core/java/android/app/IUiAutomationConnection.aidl
index d01938b123b1..ac4bf7d9c2c5 100644
--- a/core/java/android/app/IUiAutomationConnection.aidl
+++ b/core/java/android/app/IUiAutomationConnection.aidl
@@ -47,7 +47,8 @@ interface IUiAutomationConnection {
in ParcelFileDescriptor source);
void grantRuntimePermission(String packageName, String permission, int userId);
void revokeRuntimePermission(String packageName, String permission, int userId);
-
+ void adoptShellPermissionIdentity(int uid);
+ void dropShellPermissionIdentity();
// Called from the system process.
oneway void shutdown();
}
diff --git a/core/java/android/app/UiAutomation.java b/core/java/android/app/UiAutomation.java
index 5662aeae8110..44f2879601b8 100644
--- a/core/java/android/app/UiAutomation.java
+++ b/core/java/android/app/UiAutomation.java
@@ -33,6 +33,7 @@ import android.os.HandlerThread;
import android.os.IBinder;
import android.os.Looper;
import android.os.ParcelFileDescriptor;
+import android.os.Process;
import android.os.RemoteException;
import android.os.SystemClock;
import android.os.UserHandle;
@@ -50,6 +51,7 @@ import android.view.accessibility.AccessibilityWindowInfo;
import android.view.accessibility.IAccessibilityInteractionConnection;
import com.android.internal.util.function.pooled.PooledLambda;
+
import libcore.io.IoUtils;
import java.io.IOException;
@@ -347,6 +349,46 @@ public final class UiAutomation {
}
/**
+ * Adopt the permission identity of the shell UID. This allows you to call APIs protected
+ * permissions which normal apps cannot hold but are granted to the shell UID. If you
+ * already adopted the shell permission identity this method would be a no-op.
+ * Note that your permission state becomes that of the shell UID and it is not a
+ * combination of your and the shell UID permissions.
+ *
+ * @see #dropShellPermissionIdentity()
+ */
+ public void adoptShellPermissionIdentity() {
+ synchronized (mLock) {
+ throwIfNotConnectedLocked();
+ }
+ try {
+ // Calling out without a lock held.
+ mUiAutomationConnection.adoptShellPermissionIdentity(Process.myUid());
+ } catch (RemoteException re) {
+ Log.e(LOG_TAG, "Error executing adopting shell permission identity!", re);
+ }
+ }
+
+ /**
+ * Drop the shell permission identity adopted by a previous call to
+ * {@link #adoptShellPermissionIdentity()}. If you did not adopt the shell permission
+ * identity this method would be a no-op.
+ *
+ * @see #adoptShellPermissionIdentity()
+ */
+ public void dropShellPermissionIdentity() {
+ synchronized (mLock) {
+ throwIfNotConnectedLocked();
+ }
+ try {
+ // Calling out without a lock held.
+ mUiAutomationConnection.dropShellPermissionIdentity();
+ } catch (RemoteException re) {
+ Log.e(LOG_TAG, "Error executing dropping shell permission identity!", re);
+ }
+ }
+
+ /**
* Performs a global action. Such an action can be performed at any moment
* regardless of the current application or user location in that application.
* For example going back, going home, opening recents, etc.
@@ -999,6 +1041,8 @@ public final class UiAutomation {
*
* @param command The command to execute.
* @return A file descriptor to the standard output stream.
+ *
+ * @see #adoptShellPermissionIdentity()
*/
public ParcelFileDescriptor executeShellCommand(String command) {
synchronized (mLock) {
@@ -1081,22 +1125,6 @@ public final class UiAutomation {
return result;
}
- private static float getDegreesForRotation(int value) {
- switch (value) {
- case Surface.ROTATION_90: {
- return 360f - 90f;
- }
- case Surface.ROTATION_180: {
- return 360f - 180f;
- }
- case Surface.ROTATION_270: {
- return 360f - 270f;
- } default: {
- return 0;
- }
- }
- }
-
private boolean isConnectedLocked() {
return mConnectionId != CONNECTION_ID_UNDEFINED;
}
diff --git a/core/java/android/app/UiAutomationConnection.java b/core/java/android/app/UiAutomationConnection.java
index d3828ab47883..ac3f2e7a14d0 100644
--- a/core/java/android/app/UiAutomationConnection.java
+++ b/core/java/android/app/UiAutomationConnection.java
@@ -30,6 +30,7 @@ import android.os.Process;
import android.os.RemoteException;
import android.os.ServiceManager;
import android.os.UserHandle;
+import android.util.Log;
import android.view.IWindowManager;
import android.view.InputEvent;
import android.view.SurfaceControl;
@@ -37,7 +38,6 @@ import android.view.WindowAnimationFrameStats;
import android.view.WindowContentFrameStats;
import android.view.accessibility.AccessibilityEvent;
import android.view.accessibility.IAccessibilityManager;
-import android.util.Log;
import libcore.io.IoUtils;
@@ -71,6 +71,9 @@ public final class UiAutomationConnection extends IUiAutomationConnection.Stub {
private final IPackageManager mPackageManager = IPackageManager.Stub
.asInterface(ServiceManager.getService("package"));
+ private final IActivityManager mActivityManager = IActivityManager.Stub
+ .asInterface(ServiceManager.getService("activity"));
+
private final Object mLock = new Object();
private final Binder mToken = new Binder();
@@ -274,6 +277,36 @@ public final class UiAutomationConnection extends IUiAutomationConnection.Stub {
}
}
+ @Override
+ public void adoptShellPermissionIdentity(int uid) throws RemoteException {
+ synchronized (mLock) {
+ throwIfCalledByNotTrustedUidLocked();
+ throwIfShutdownLocked();
+ throwIfNotConnectedLocked();
+ }
+ final long identity = Binder.clearCallingIdentity();
+ try {
+ mActivityManager.startDelegateShellPermissionIdentity(uid);
+ } finally {
+ Binder.restoreCallingIdentity(identity);
+ }
+ }
+
+ @Override
+ public void dropShellPermissionIdentity() throws RemoteException {
+ synchronized (mLock) {
+ throwIfCalledByNotTrustedUidLocked();
+ throwIfShutdownLocked();
+ throwIfNotConnectedLocked();
+ }
+ final long identity = Binder.clearCallingIdentity();
+ try {
+ mActivityManager.stopDelegateShellPermissionIdentity();
+ } finally {
+ Binder.restoreCallingIdentity(identity);
+ }
+ }
+
public class Repeater implements Runnable {
// Continuously read readFrom and write back to writeTo until EOF is encountered
private final InputStream readFrom;
diff --git a/core/java/android/content/pm/PackageManager.java b/core/java/android/content/pm/PackageManager.java
index a622af8f7660..ce551ee6d5ae 100644
--- a/core/java/android/content/pm/PackageManager.java
+++ b/core/java/android/content/pm/PackageManager.java
@@ -3582,6 +3582,7 @@ public abstract class PackageManager {
*
* @hide
*/
+ @TestApi
@SystemApi
@RequiresPermission(android.Manifest.permission.GRANT_RUNTIME_PERMISSIONS)
public abstract void grantRuntimePermission(@NonNull String packageName,
@@ -3608,6 +3609,7 @@ public abstract class PackageManager {
*
* @hide
*/
+ @TestApi
@SystemApi
@RequiresPermission(android.Manifest.permission.REVOKE_RUNTIME_PERMISSIONS)
public abstract void revokeRuntimePermission(@NonNull String packageName,
diff --git a/core/java/android/content/pm/PackageManagerInternal.java b/core/java/android/content/pm/PackageManagerInternal.java
index f30b3fee7f46..ee752f8b8186 100644
--- a/core/java/android/content/pm/PackageManagerInternal.java
+++ b/core/java/android/content/pm/PackageManagerInternal.java
@@ -29,9 +29,12 @@ import android.os.Bundle;
import android.os.PersistableBundle;
import android.util.SparseArray;
+import com.android.internal.util.function.TriFunction;
+
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.util.List;
+import java.util.function.BiFunction;
/**
* Package manager local system service interface.
@@ -64,6 +67,32 @@ public abstract class PackageManagerInternal {
void onPackageRemoved(@NonNull String packageName);
}
+ /** Interface to override permission checks via composition */
+ public interface CheckPermissionDelegate {
+ /**
+ * Allows overriding check permission behavior.
+ *
+ * @param permName The permission to check.
+ * @param pkgName The package for which to check.
+ * @param userId The user for which to check.
+ * @param superImpl The super implementation.
+ * @return The check permission result.
+ */
+ int checkPermission(String permName, String pkgName, int userId,
+ TriFunction<String, String, Integer, Integer> superImpl);
+
+ /**
+ * Allows overriding check UID permission behavior.
+ *
+ * @param permName The permission to check.
+ * @param uid The UID for which to check.
+ * @param superImpl The super implementation.
+ * @return The check permission result.
+ */
+ int checkUidPermission(String permName, int uid,
+ BiFunction<String, Integer, Integer> superImpl);
+ }
+
/**
* Provider for package names.
*/
@@ -628,4 +657,18 @@ public abstract class PackageManagerInternal {
*/
public abstract boolean hasSignatureCapability(int serverUid, int clientUid,
@PackageParser.SigningDetails.CertCapabilities int capability);
+
+ /**
+ * Get the delegate to influence permission checking.
+ *
+ * @return The delegate instance or null to clear.
+ */
+ public abstract @Nullable CheckPermissionDelegate getCheckPermissionDelegate();
+
+ /**
+ * Set a delegate to influence permission checking.
+ *
+ * @param delegate A delegate instance or null to clear.
+ */
+ public abstract void setCheckPermissionDelegate(@Nullable CheckPermissionDelegate delegate);
}
diff --git a/core/java/android/os/BatteryStats.java b/core/java/android/os/BatteryStats.java
index 221abed92f81..9cf7de586d17 100644
--- a/core/java/android/os/BatteryStats.java
+++ b/core/java/android/os/BatteryStats.java
@@ -247,8 +247,10 @@ public abstract class BatteryStats implements Parcelable {
* - Deferred job metrics.
* New in version 32:
* - Ambient display properly output in data dump.
+ * New in version 33:
+ * - Fixed bug in min learned capacity updating process.
*/
- static final int CHECKIN_VERSION = 32;
+ static final int CHECKIN_VERSION = 33;
/**
* Old version, we hit 9 and ran out of room, need to remove.
diff --git a/core/java/android/os/Binder.java b/core/java/android/os/Binder.java
index ac871055dc4a..f31130f8645d 100644
--- a/core/java/android/os/Binder.java
+++ b/core/java/android/os/Binder.java
@@ -23,6 +23,7 @@ import android.util.Log;
import android.util.Slog;
import android.util.SparseIntArray;
+import com.android.internal.annotations.GuardedBy;
import com.android.internal.os.BinderCallsStats;
import com.android.internal.os.BinderInternal;
import com.android.internal.util.FastPrintWriter;
@@ -730,7 +731,7 @@ public class Binder implements IBinder {
}
res = onTransact(code, data, reply, flags);
} catch (RemoteException|RuntimeException e) {
- binderCallsStats.callThrewException(callSession);
+ binderCallsStats.callThrewException(callSession, e);
if (LOG_RUNTIME_EXCEPTION) {
Log.w(TAG, "Caught a RuntimeException from the binder stub implementation.", e);
}
@@ -1027,19 +1028,19 @@ final class BinderProxy implements IBinder {
new ArrayList[MAIN_INDEX_SIZE];
}
- private static ProxyMap sProxyMap = new ProxyMap();
+ @GuardedBy("sProxyMap")
+ private static final ProxyMap sProxyMap = new ProxyMap();
/**
* Dump proxy debug information.
*
- * Note: this method is not thread-safe; callers must serialize with other
- * accesses to sProxyMap, in particular {@link #getInstance(long, long)}.
- *
* @hide
*/
private static void dumpProxyDebugInfo() {
if (Build.IS_DEBUGGABLE) {
- sProxyMap.dumpProxyInterfaceCounts();
+ synchronized (sProxyMap) {
+ sProxyMap.dumpProxyInterfaceCounts();
+ }
// Note that we don't call dumpPerUidProxyCounts(); this is because this
// method may be called as part of the uid limit being hit, and calling
// back into the UID tracking code would cause us to try to acquire a mutex
@@ -1049,8 +1050,6 @@ final class BinderProxy implements IBinder {
/**
* Return a BinderProxy for IBinder.
- * This method is thread-hostile! The (native) caller serializes getInstance() calls using
- * gProxyLock.
* If we previously returned a BinderProxy bp for the same iBinder, and bp is still
* in use, then we return the same bp.
*
@@ -1062,21 +1061,23 @@ final class BinderProxy implements IBinder {
*/
private static BinderProxy getInstance(long nativeData, long iBinder) {
BinderProxy result;
- try {
- result = sProxyMap.get(iBinder);
- if (result != null) {
- return result;
+ synchronized (sProxyMap) {
+ try {
+ result = sProxyMap.get(iBinder);
+ if (result != null) {
+ return result;
+ }
+ result = new BinderProxy(nativeData);
+ } catch (Throwable e) {
+ // We're throwing an exception (probably OOME); don't drop nativeData.
+ NativeAllocationRegistry.applyFreeFunction(NoImagePreloadHolder.sNativeFinalizer,
+ nativeData);
+ throw e;
}
- result = new BinderProxy(nativeData);
- } catch (Throwable e) {
- // We're throwing an exception (probably OOME); don't drop nativeData.
- NativeAllocationRegistry.applyFreeFunction(NoImagePreloadHolder.sNativeFinalizer,
- nativeData);
- throw e;
+ NoImagePreloadHolder.sRegistry.registerNativeAllocation(result, nativeData);
+ // The registry now owns nativeData, even if registration threw an exception.
+ sProxyMap.set(iBinder, result);
}
- NoImagePreloadHolder.sRegistry.registerNativeAllocation(result, nativeData);
- // The registry now owns nativeData, even if registration threw an exception.
- sProxyMap.set(iBinder, result);
return result;
}
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index 13d4d089ffdf..82b66d7b7925 100644
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -6991,8 +6991,6 @@ public final class Settings {
*/
public static final String SELECTED_SPELL_CHECKER = "selected_spell_checker";
- private static final Validator SELECTED_SPELL_CHECKER_VALIDATOR = COMPONENT_NAME_VALIDATOR;
-
/**
* {@link android.view.textservice.SpellCheckerSubtype#hashCode()} of the selected subtype
* of the selected spell checker service which is one of the services managed by the text
@@ -7003,9 +7001,6 @@ public final class Settings {
public static final String SELECTED_SPELL_CHECKER_SUBTYPE =
"selected_spell_checker_subtype";
- private static final Validator SELECTED_SPELL_CHECKER_SUBTYPE_VALIDATOR =
- ANY_INTEGER_VALIDATOR;
-
/**
* Whether spell checker is enabled or not.
*
@@ -7013,8 +7008,6 @@ public final class Settings {
*/
public static final String SPELL_CHECKER_ENABLED = "spell_checker_enabled";
- private static final Validator SPELL_CHECKER_ENABLED_VALIDATOR = BOOLEAN_VALIDATOR;
-
/**
* What happens when the user presses the Power button while in-call
* and the screen is on.<br/>
@@ -7133,35 +7126,6 @@ public final class Settings {
public static final String UI_NIGHT_MODE = "ui_night_mode";
/**
- * The current device UI theme mode effect SystemUI and Launcher.<br/>
- * <b>Values:</b><br/>
- * 0 - The mode that theme will controlled by wallpaper color.<br/>
- * 1 - The mode that will always light theme.<br/>
- * 2 - The mode that will always dark theme.<br/>
- *
- * @hide
- */
- public static final String THEME_MODE = "theme_mode";
-
- /**
- * THEME_MODE value for wallpaper mode.
- * @hide
- */
- public static final int THEME_MODE_WALLPAPER = 0;
-
- /**
- * THEME_MODE value for light theme mode.
- * @hide
- */
- public static final int THEME_MODE_LIGHT = 1;
-
- /**
- * THEME_MODE value for dark theme mode.
- * @hide
- */
- public static final int THEME_MODE_DARK = 2;
-
- /**
* Whether screensavers are enabled.
* @hide
*/
@@ -8007,9 +7971,6 @@ public final class Settings {
WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON, // moved to global
WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY, // moved to global
WIFI_NUM_OPEN_NETWORKS_KEPT, // moved to global
- SELECTED_SPELL_CHECKER,
- SELECTED_SPELL_CHECKER_SUBTYPE,
- SPELL_CHECKER_ENABLED,
MOUNT_PLAY_NOTIFICATION_SND,
MOUNT_UMS_AUTOSTART,
MOUNT_UMS_PROMPT,
@@ -8134,10 +8095,6 @@ public final class Settings {
VALIDATORS.put(WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY,
WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY_VALIDATOR);
VALIDATORS.put(WIFI_NUM_OPEN_NETWORKS_KEPT, WIFI_NUM_OPEN_NETWORKS_KEPT_VALIDATOR);
- VALIDATORS.put(SELECTED_SPELL_CHECKER, SELECTED_SPELL_CHECKER_VALIDATOR);
- VALIDATORS.put(SELECTED_SPELL_CHECKER_SUBTYPE,
- SELECTED_SPELL_CHECKER_SUBTYPE_VALIDATOR);
- VALIDATORS.put(SPELL_CHECKER_ENABLED, SPELL_CHECKER_ENABLED_VALIDATOR);
VALIDATORS.put(MOUNT_PLAY_NOTIFICATION_SND, MOUNT_PLAY_NOTIFICATION_SND_VALIDATOR);
VALIDATORS.put(MOUNT_UMS_AUTOSTART, MOUNT_UMS_AUTOSTART_VALIDATOR);
VALIDATORS.put(MOUNT_UMS_PROMPT, MOUNT_UMS_PROMPT_VALIDATOR);
@@ -13022,6 +12979,21 @@ public final class Settings {
*/
public static final String GNSS_HAL_LOCATION_REQUEST_DURATION_MILLIS =
"gnss_hal_location_request_duration_millis";
+
+ /**
+ * Binder call stats settings.
+ *
+ * The following strings are supported as keys:
+ * <pre>
+ * enabled (boolean)
+ * detailed_tracking (boolean)
+ * upload_data (boolean)
+ * sampling_interval (int)
+ * </pre>
+ *
+ * @hide
+ */
+ public static final String BINDER_CALLS_STATS = "binder_calls_stats";
}
/**
diff --git a/core/java/android/util/Half.java b/core/java/android/util/Half.java
index 84c2e8302e89..5718d994620d 100644
--- a/core/java/android/util/Half.java
+++ b/core/java/android/util/Half.java
@@ -20,8 +20,6 @@ import android.annotation.HalfFloat;
import android.annotation.NonNull;
import android.annotation.Nullable;
-import sun.misc.FloatingDecimal;
-
/**
* <p>The {@code Half} class is a wrapper and a utility class to manipulate half-precision 16-bit
* <a href="https://en.wikipedia.org/wiki/Half-precision_floating-point_format">IEEE 754</a>
@@ -1026,7 +1024,7 @@ public final class Half extends Number implements Comparable<Half> {
* half-precision float value
*/
public static @HalfFloat short parseHalf(@NonNull String s) throws NumberFormatException {
- return toHalf(FloatingDecimal.parseFloat(s));
+ return toHalf(Float.parseFloat(s));
}
/**
diff --git a/core/java/android/util/IntArray.java b/core/java/android/util/IntArray.java
index 3617aa7212dc..5a74ec0e52c0 100644
--- a/core/java/android/util/IntArray.java
+++ b/core/java/android/util/IntArray.java
@@ -18,9 +18,11 @@ package android.util;
import com.android.internal.util.ArrayUtils;
import com.android.internal.util.Preconditions;
-import java.util.Arrays;
+
import libcore.util.EmptyArray;
+import java.util.Arrays;
+
/**
* Implements a growing array of int primitives.
*
@@ -102,7 +104,7 @@ public class IntArray implements Cloneable {
ensureCapacity(1);
int rightSegment = mSize - index;
mSize++;
- checkBounds(index);
+ ArrayUtils.checkBounds(mSize, index);
if (rightSegment != 0) {
// Move by 1 all values from the right of 'index'
@@ -175,7 +177,7 @@ public class IntArray implements Cloneable {
* Returns the value at the specified position in this array.
*/
public int get(int index) {
- checkBounds(index);
+ ArrayUtils.checkBounds(mSize, index);
return mValues[index];
}
@@ -183,7 +185,7 @@ public class IntArray implements Cloneable {
* Sets the value at the specified position in this array.
*/
public void set(int index, int value) {
- checkBounds(index);
+ ArrayUtils.checkBounds(mSize, index);
mValues[index] = value;
}
@@ -205,7 +207,7 @@ public class IntArray implements Cloneable {
* Removes the value at the specified index from this array.
*/
public void remove(int index) {
- checkBounds(index);
+ ArrayUtils.checkBounds(mSize, index);
System.arraycopy(mValues, index + 1, mValues, index, mSize - index - 1);
mSize--;
}
@@ -223,10 +225,4 @@ public class IntArray implements Cloneable {
public int[] toArray() {
return Arrays.copyOf(mValues, mSize);
}
-
- private void checkBounds(int index) {
- if (index < 0 || mSize <= index) {
- throw new ArrayIndexOutOfBoundsException(mSize, index);
- }
- }
}
diff --git a/core/java/android/util/LongArray.java b/core/java/android/util/LongArray.java
index fa980966802f..5ed1c8c05cba 100644
--- a/core/java/android/util/LongArray.java
+++ b/core/java/android/util/LongArray.java
@@ -106,7 +106,7 @@ public class LongArray implements Cloneable {
ensureCapacity(1);
int rightSegment = mSize - index;
mSize++;
- checkBounds(index);
+ ArrayUtils.checkBounds(mSize, index);
if (rightSegment != 0) {
// Move by 1 all values from the right of 'index'
@@ -166,7 +166,7 @@ public class LongArray implements Cloneable {
* Returns the value at the specified position in this array.
*/
public long get(int index) {
- checkBounds(index);
+ ArrayUtils.checkBounds(mSize, index);
return mValues[index];
}
@@ -174,7 +174,7 @@ public class LongArray implements Cloneable {
* Sets the value at the specified position in this array.
*/
public void set(int index, long value) {
- checkBounds(index);
+ ArrayUtils.checkBounds(mSize, index);
mValues[index] = value;
}
@@ -196,7 +196,7 @@ public class LongArray implements Cloneable {
* Removes the value at the specified index from this array.
*/
public void remove(int index) {
- checkBounds(index);
+ ArrayUtils.checkBounds(mSize, index);
System.arraycopy(mValues, index + 1, mValues, index, mSize - index - 1);
mSize--;
}
@@ -215,12 +215,6 @@ public class LongArray implements Cloneable {
return Arrays.copyOf(mValues, mSize);
}
- private void checkBounds(int index) {
- if (index < 0 || mSize <= index) {
- throw new ArrayIndexOutOfBoundsException(mSize, index);
- }
- }
-
/**
* Test if each element of {@code a} equals corresponding element from {@code b}
*/
diff --git a/core/java/android/view/InputEvent.java b/core/java/android/view/InputEvent.java
index 1f2aab94958c..c25736495b0e 100644
--- a/core/java/android/view/InputEvent.java
+++ b/core/java/android/view/InputEvent.java
@@ -95,6 +95,19 @@ public abstract class InputEvent implements Parcelable {
}
/**
+ * Gets the display id of the event.
+ * @return The display id associated with the event.
+ * @hide
+ */
+ public abstract int getDisplayId();
+
+ /**
+ * Modifies the display id associated with the event
+ * @param displayId
+ * @hide
+ */
+ public abstract void setDisplayId(int displayId);
+ /**
* Copies the event.
*
* @return A deep copy of the event.
diff --git a/core/java/android/view/KeyEvent.java b/core/java/android/view/KeyEvent.java
index 35546f8bf186..2c00391e7450 100644
--- a/core/java/android/view/KeyEvent.java
+++ b/core/java/android/view/KeyEvent.java
@@ -16,6 +16,8 @@
package android.view;
+import static android.view.Display.INVALID_DISPLAY;
+
import android.annotation.NonNull;
import android.annotation.TestApi;
import android.os.Parcel;
@@ -1246,6 +1248,7 @@ public class KeyEvent extends InputEvent implements Parcelable {
private int mDeviceId;
private int mSource;
+ private int mDisplayId;
private int mMetaState;
private int mAction;
private int mKeyCode;
@@ -1473,6 +1476,7 @@ public class KeyEvent extends InputEvent implements Parcelable {
mScanCode = scancode;
mFlags = flags;
mSource = source;
+ mDisplayId = INVALID_DISPLAY;
}
/**
@@ -1497,6 +1501,7 @@ public class KeyEvent extends InputEvent implements Parcelable {
mDeviceId = deviceId;
mFlags = flags;
mSource = InputDevice.SOURCE_KEYBOARD;
+ mDisplayId = INVALID_DISPLAY;
}
/**
@@ -1511,6 +1516,7 @@ public class KeyEvent extends InputEvent implements Parcelable {
mMetaState = origEvent.mMetaState;
mDeviceId = origEvent.mDeviceId;
mSource = origEvent.mSource;
+ mDisplayId = origEvent.mDisplayId;
mScanCode = origEvent.mScanCode;
mFlags = origEvent.mFlags;
mCharacters = origEvent.mCharacters;
@@ -1537,6 +1543,7 @@ public class KeyEvent extends InputEvent implements Parcelable {
mMetaState = origEvent.mMetaState;
mDeviceId = origEvent.mDeviceId;
mSource = origEvent.mSource;
+ mDisplayId = origEvent.mDisplayId;
mScanCode = origEvent.mScanCode;
mFlags = origEvent.mFlags;
mCharacters = origEvent.mCharacters;
@@ -1564,7 +1571,7 @@ public class KeyEvent extends InputEvent implements Parcelable {
*/
public static KeyEvent obtain(long downTime, long eventTime, int action,
int code, int repeat, int metaState,
- int deviceId, int scancode, int flags, int source, String characters) {
+ int deviceId, int scancode, int flags, int source, int displayId, String characters) {
KeyEvent ev = obtain();
ev.mDownTime = downTime;
ev.mEventTime = eventTime;
@@ -1576,11 +1583,26 @@ public class KeyEvent extends InputEvent implements Parcelable {
ev.mScanCode = scancode;
ev.mFlags = flags;
ev.mSource = source;
+ ev.mDisplayId = displayId;
ev.mCharacters = characters;
return ev;
}
/**
+ * Obtains a (potentially recycled) key event.
+ *
+ * @hide
+ */
+ public static KeyEvent obtain(long downTime, long eventTime, int action,
+ int code, int repeat, int metaState,
+ int deviceId, int scancode, int flags, int source, String characters) {
+ return obtain(downTime, eventTime, action, code, repeat, metaState, deviceId, scancode,
+ flags, source, INVALID_DISPLAY, characters);
+ }
+
+ /**
+
+ /**
* Obtains a (potentially recycled) copy of another key event.
*
* @hide
@@ -1597,6 +1619,7 @@ public class KeyEvent extends InputEvent implements Parcelable {
ev.mScanCode = other.mScanCode;
ev.mFlags = other.mFlags;
ev.mSource = other.mSource;
+ ev.mDisplayId = other.mDisplayId;
ev.mCharacters = other.mCharacters;
return ev;
}
@@ -1683,6 +1706,7 @@ public class KeyEvent extends InputEvent implements Parcelable {
mMetaState = origEvent.mMetaState;
mDeviceId = origEvent.mDeviceId;
mSource = origEvent.mSource;
+ mDisplayId = origEvent.mDisplayId;
mScanCode = origEvent.mScanCode;
mFlags = origEvent.mFlags;
// Don't copy mCharacters, since one way or the other we'll lose it
@@ -1917,6 +1941,18 @@ public class KeyEvent extends InputEvent implements Parcelable {
mSource = source;
}
+ /** @hide */
+ @Override
+ public final int getDisplayId() {
+ return mDisplayId;
+ }
+
+ /** @hide */
+ @Override
+ public final void setDisplayId(int displayId) {
+ mDisplayId = displayId;
+ }
+
/**
* <p>Returns the state of the meta keys.</p>
*
@@ -2852,6 +2888,7 @@ public class KeyEvent extends InputEvent implements Parcelable {
msg.append(", downTime=").append(mDownTime);
msg.append(", deviceId=").append(mDeviceId);
msg.append(", source=0x").append(Integer.toHexString(mSource));
+ msg.append(", displayId=").append(mDisplayId);
msg.append(" }");
return msg.toString();
}
@@ -2983,6 +3020,7 @@ public class KeyEvent extends InputEvent implements Parcelable {
private KeyEvent(Parcel in) {
mDeviceId = in.readInt();
mSource = in.readInt();
+ mDisplayId = in.readInt();
mAction = in.readInt();
mKeyCode = in.readInt();
mRepeatCount = in.readInt();
@@ -2999,6 +3037,7 @@ public class KeyEvent extends InputEvent implements Parcelable {
out.writeInt(mDeviceId);
out.writeInt(mSource);
+ out.writeInt(mDisplayId);
out.writeInt(mAction);
out.writeInt(mKeyCode);
out.writeInt(mRepeatCount);
diff --git a/core/java/android/view/MotionEvent.java b/core/java/android/view/MotionEvent.java
index 9148c27f6006..344806aa4d50 100644
--- a/core/java/android/view/MotionEvent.java
+++ b/core/java/android/view/MotionEvent.java
@@ -1943,11 +1943,13 @@ public final class MotionEvent extends InputEvent implements Parcelable {
}
/** @hide */
+ @Override
public int getDisplayId() {
return nativeGetDisplayId(mNativePtr);
}
/** @hide */
+ @Override
public void setDisplayId(int displayId) {
nativeSetDisplayId(mNativePtr, displayId);
}
diff --git a/core/java/android/view/WindowManager.java b/core/java/android/view/WindowManager.java
index 4d7b73cb7c08..8c7ac731b3e3 100644
--- a/core/java/android/view/WindowManager.java
+++ b/core/java/android/view/WindowManager.java
@@ -1692,6 +1692,15 @@ public interface WindowManager extends ViewManager {
public static final int PRIVATE_FLAG_IS_SCREEN_DECOR = 0x00400000;
/**
+ * Flag to indicate that the status bar window is now in an explicit expanded state, meaning
+ * that status bar will not be hidden by any window with flag {@link #FLAG_FULLSCREEN} or
+ * {@link View#SYSTEM_UI_FLAG_FULLSCREEN} set.
+ * This can only be set by {@link LayoutParams#TYPE_STATUS_BAR}.
+ * @hide
+ */
+ public static final int PRIVATE_FLAG_STATUS_BAR_EXPANDED = 0x00800000;
+
+ /**
* Control flags that are private to the platform.
* @hide
*/
@@ -1779,7 +1788,11 @@ public interface WindowManager extends ViewManager {
@ViewDebug.FlagToString(
mask = PRIVATE_FLAG_IS_SCREEN_DECOR,
equals = PRIVATE_FLAG_IS_SCREEN_DECOR,
- name = "IS_SCREEN_DECOR")
+ name = "IS_SCREEN_DECOR"),
+ @ViewDebug.FlagToString(
+ mask = PRIVATE_FLAG_STATUS_BAR_EXPANDED,
+ equals = PRIVATE_FLAG_STATUS_BAR_EXPANDED,
+ name = "STATUS_BAR_EXPANDED")
})
@TestApi
public int privateFlags;
diff --git a/core/java/com/android/internal/app/IAppOpsService.aidl b/core/java/com/android/internal/app/IAppOpsService.aidl
index 0ed972477123..768dddd35a6d 100644
--- a/core/java/com/android/internal/app/IAppOpsService.aidl
+++ b/core/java/com/android/internal/app/IAppOpsService.aidl
@@ -33,7 +33,7 @@ interface IAppOpsService {
void stopWatchingMode(IAppOpsCallback callback);
IBinder getToken(IBinder clientToken);
int permissionToOpCode(String permission);
- int noteProxyOperation(int code, String proxyPackageName,
+ int noteProxyOperation(int code, int proxyUid, String proxyPackageName,
int callingUid, String callingPackageName);
// Remaining methods are only used in Java.
diff --git a/core/java/com/android/internal/net/NetworkStatsFactory.java b/core/java/com/android/internal/net/NetworkStatsFactory.java
index c4d08c7dc5d6..d1c279918bb4 100644
--- a/core/java/com/android/internal/net/NetworkStatsFactory.java
+++ b/core/java/com/android/internal/net/NetworkStatsFactory.java
@@ -194,7 +194,7 @@ public class NetworkStatsFactory {
reader.finishLine();
}
} catch (NullPointerException|NumberFormatException e) {
- throw new ProtocolException("problem parsing stats", e);
+ throw protocolExceptionWithCause("problem parsing stats", e);
} finally {
IoUtils.closeQuietly(reader);
StrictMode.setThreadPolicy(savedPolicy);
@@ -244,7 +244,7 @@ public class NetworkStatsFactory {
reader.finishLine();
}
} catch (NullPointerException|NumberFormatException e) {
- throw new ProtocolException("problem parsing stats", e);
+ throw protocolExceptionWithCause("problem parsing stats", e);
} finally {
IoUtils.closeQuietly(reader);
StrictMode.setThreadPolicy(savedPolicy);
@@ -341,7 +341,7 @@ public class NetworkStatsFactory {
reader.finishLine();
}
} catch (NullPointerException|NumberFormatException e) {
- throw new ProtocolException("problem parsing idx " + idx, e);
+ throw protocolExceptionWithCause("problem parsing idx " + idx, e);
} finally {
IoUtils.closeQuietly(reader);
StrictMode.setThreadPolicy(savedPolicy);
@@ -378,4 +378,10 @@ public class NetworkStatsFactory {
@VisibleForTesting
public static native int nativeReadNetworkStatsDev(NetworkStats stats);
+
+ private static ProtocolException protocolExceptionWithCause(String message, Throwable cause) {
+ ProtocolException pe = new ProtocolException(message);
+ pe.initCause(cause);
+ return pe;
+ }
}
diff --git a/core/java/com/android/internal/os/BatteryStatsImpl.java b/core/java/com/android/internal/os/BatteryStatsImpl.java
index 79d2570256fd..df59f79b0f20 100644
--- a/core/java/com/android/internal/os/BatteryStatsImpl.java
+++ b/core/java/com/android/internal/os/BatteryStatsImpl.java
@@ -12709,7 +12709,7 @@ public class BatteryStatsImpl extends BatteryStats {
if (mMinLearnedBatteryCapacity == -1) {
mMinLearnedBatteryCapacity = chargeFullUAh;
} else {
- Math.min(mMinLearnedBatteryCapacity, chargeFullUAh);
+ mMinLearnedBatteryCapacity = Math.min(mMinLearnedBatteryCapacity, chargeFullUAh);
}
mMaxLearnedBatteryCapacity = Math.max(mMaxLearnedBatteryCapacity, chargeFullUAh);
}
diff --git a/core/java/com/android/internal/os/BinderCallsStats.java b/core/java/com/android/internal/os/BinderCallsStats.java
index 75d714f3ba4c..20eab92d018b 100644
--- a/core/java/com/android/internal/os/BinderCallsStats.java
+++ b/core/java/com/android/internal/os/BinderCallsStats.java
@@ -21,6 +21,8 @@ import android.os.SystemClock;
import android.os.UserHandle;
import android.text.format.DateFormat;
import android.util.ArrayMap;
+import android.util.Log;
+import android.util.Pair;
import android.util.SparseArray;
import com.android.internal.annotations.GuardedBy;
@@ -29,10 +31,12 @@ import com.android.internal.util.Preconditions;
import java.io.PrintWriter;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.Map;
import java.util.Queue;
+import java.util.Set;
import java.util.concurrent.ConcurrentLinkedQueue;
import java.util.function.ToDoubleFunction;
@@ -41,25 +45,33 @@ import java.util.function.ToDoubleFunction;
* per thread, uid or call description.
*/
public class BinderCallsStats {
+ public static final boolean ENABLED_DEFAULT = true;
+ public static final boolean DETAILED_TRACKING_DEFAULT = true;
+ public static final int PERIODIC_SAMPLING_INTERVAL_DEFAULT = 10;
+
+ private static final String TAG = "BinderCallsStats";
private static final int CALL_SESSIONS_POOL_SIZE = 100;
private static final int PERIODIC_SAMPLING_INTERVAL = 10;
+ private static final int MAX_EXCEPTION_COUNT_SIZE = 50;
+ private static final String EXCEPTION_COUNT_OVERFLOW_NAME = "overflow";
+ private static final CallSession NOT_ENABLED = new CallSession();
private static final BinderCallsStats sInstance = new BinderCallsStats();
- private volatile boolean mDetailedTracking = false;
+ private volatile boolean mEnabled = ENABLED_DEFAULT;
+ private volatile boolean mDetailedTracking = DETAILED_TRACKING_DEFAULT;
+ private volatile int mPeriodicSamplingInterval = PERIODIC_SAMPLING_INTERVAL_DEFAULT;
@GuardedBy("mLock")
private final SparseArray<UidEntry> mUidEntries = new SparseArray<>();
+ @GuardedBy("mLock")
+ private final ArrayMap<String, Integer> mExceptionCounts = new ArrayMap<>();
private final Queue<CallSession> mCallSessionsPool = new ConcurrentLinkedQueue<>();
private final Object mLock = new Object();
private long mStartTime = System.currentTimeMillis();
@GuardedBy("mLock")
private UidEntry mSampledEntries = new UidEntry(-1);
- private BinderCallsStats() {
- }
-
- @VisibleForTesting
- public BinderCallsStats(boolean detailedTracking) {
- mDetailedTracking = detailedTracking;
+ @VisibleForTesting // Use getInstance() instead.
+ public BinderCallsStats() {
}
public CallSession callStarted(Binder binder, int code) {
@@ -67,10 +79,15 @@ public class BinderCallsStats {
}
private CallSession callStarted(String className, int code) {
+ if (!mEnabled) {
+ return NOT_ENABLED;
+ }
+
CallSession s = mCallSessionsPool.poll();
if (s == null) {
s = new CallSession();
}
+
s.callStat.className = className;
s.callStat.msg = code;
s.exceptionThrown = false;
@@ -83,7 +100,7 @@ public class BinderCallsStats {
s.timeStarted = getElapsedRealtimeMicro();
} else {
s.sampledCallStat = mSampledEntries.getOrCreate(s.callStat);
- if (s.sampledCallStat.callCount % PERIODIC_SAMPLING_INTERVAL == 0) {
+ if (s.sampledCallStat.callCount % mPeriodicSamplingInterval == 0) {
s.cpuTimeStarted = getThreadTimeMicro();
s.timeStarted = getElapsedRealtimeMicro();
}
@@ -94,7 +111,23 @@ public class BinderCallsStats {
public void callEnded(CallSession s, int parcelRequestSize, int parcelReplySize) {
Preconditions.checkNotNull(s);
+ if (s == NOT_ENABLED) {
+ return;
+ }
+
+ processCallEnded(s, parcelRequestSize, parcelReplySize);
+
+ if (mCallSessionsPool.size() < CALL_SESSIONS_POOL_SIZE) {
+ mCallSessionsPool.add(s);
+ }
+ }
+
+ private void processCallEnded(CallSession s, int parcelRequestSize, int parcelReplySize) {
synchronized (mLock) {
+ if (!mEnabled) {
+ return;
+ }
+
long duration;
long latencyDuration;
if (mDetailedTracking) {
@@ -108,7 +141,7 @@ public class BinderCallsStats {
latencyDuration = getElapsedRealtimeMicro() - s.timeStarted;
} else {
// callCount is always incremented, but time only once per sampling interval
- long samplesCount = cs.callCount / PERIODIC_SAMPLING_INTERVAL + 1;
+ long samplesCount = cs.callCount / mPeriodicSamplingInterval + 1;
duration = cs.cpuTimeMicros / samplesCount;
latencyDuration = cs.latencyMicros / samplesCount;
}
@@ -146,9 +179,6 @@ public class BinderCallsStats {
uidEntry.cpuTimeMicros += duration;
uidEntry.callCount++;
}
- if (mCallSessionsPool.size() < CALL_SESSIONS_POOL_SIZE) {
- mCallSessionsPool.add(s);
- }
}
/**
@@ -158,9 +188,25 @@ public class BinderCallsStats {
* <li>Do not throw an exception in this method, it will swallow the original exception thrown
* by the binder transaction.
*/
- public void callThrewException(CallSession s) {
+ public void callThrewException(CallSession s, Exception exception) {
Preconditions.checkNotNull(s);
+ if (!mEnabled) {
+ return;
+ }
s.exceptionThrown = true;
+ try {
+ String className = exception.getClass().getName();
+ synchronized (mLock) {
+ if (mExceptionCounts.size() >= MAX_EXCEPTION_COUNT_SIZE) {
+ className = EXCEPTION_COUNT_OVERFLOW_NAME;
+ }
+ Integer count = mExceptionCounts.get(className);
+ mExceptionCounts.put(className, count == null ? 1 : count + 1);
+ }
+ } catch (RuntimeException e) {
+ // Do not propagate the exception. We do not want to swallow original exception.
+ Log.wtf(TAG, "Unexpected exception while updating mExceptionCounts", e);
+ }
}
public void dump(PrintWriter pw, Map<Integer,String> appIdToPkgNameMap, boolean verbose) {
@@ -170,6 +216,11 @@ public class BinderCallsStats {
}
private void dumpLocked(PrintWriter pw, Map<Integer,String> appIdToPkgNameMap, boolean verbose) {
+ if (!mEnabled) {
+ pw.println("Binder calls stats disabled.");
+ return;
+ }
+
long totalCallsCount = 0;
long totalCpuTime = 0;
pw.print("Start time: ");
@@ -189,16 +240,16 @@ public class BinderCallsStats {
StringBuilder sb = new StringBuilder();
if (mDetailedTracking) {
pw.println("Per-UID raw data " + datasetSizeDesc
- + "(uid, call_desc, cpu_time_micros, max_cpu_time_micros, latency_time_micros, "
- + "max_latency_time_micros, exception_count, max_request_size_bytes, "
- + "max_reply_size_bytes, call_count):");
+ + "(package/uid, call_desc, cpu_time_micros, max_cpu_time_micros, "
+ + "latency_time_micros, max_latency_time_micros, exception_count, "
+ + "max_request_size_bytes, max_reply_size_bytes, call_count):");
List<UidEntry> topEntries = verbose ? entries
: getHighestValues(entries, value -> value.cpuTimeMicros, 0.9);
for (UidEntry uidEntry : topEntries) {
for (CallStat e : uidEntry.getCallStatsList()) {
sb.setLength(0);
sb.append(" ")
- .append(uidEntry.uid).append(",").append(e)
+ .append(uidToString(uidEntry.uid, appIdToPkgNameMap))
.append(',').append(e.cpuTimeMicros)
.append(',').append(e.maxCpuTimeMicros)
.append(',').append(e.latencyMicros)
@@ -223,7 +274,7 @@ public class BinderCallsStats {
for (CallStat e : sampledStatsList) {
sb.setLength(0);
sb.append(" ").append(e)
- .append(',').append(e.cpuTimeMicros * PERIODIC_SAMPLING_INTERVAL)
+ .append(',').append(e.cpuTimeMicros * mPeriodicSamplingInterval)
.append(',').append(e.callCount)
.append(',').append(e.exceptionCount);
pw.println(sb);
@@ -244,6 +295,18 @@ public class BinderCallsStats {
pw.println(String.format(" Summary: total_cpu_time=%d, "
+ "calls_count=%d, avg_call_cpu_time=%.0f",
totalCpuTime, totalCallsCount, (double)totalCpuTime / totalCallsCount));
+ pw.println();
+
+ pw.println("Exceptions thrown (exception_count, class_name):");
+ List<Pair<String, Integer>> exceptionEntries = new ArrayList<>();
+ // We cannot use new ArrayList(Collection) constructor because MapCollections does not
+ // implement toArray method.
+ mExceptionCounts.entrySet().iterator().forEachRemaining(
+ (e) -> exceptionEntries.add(Pair.create(e.getKey(), e.getValue())));
+ exceptionEntries.sort((e1, e2) -> Integer.compare(e2.second, e1.second));
+ for (Pair<String, Integer> entry : exceptionEntries) {
+ pw.println(String.format(" %6d %s", entry.second, entry.first));
+ }
}
private static String uidToString(int uid, Map<Integer, String> pkgNameMap) {
@@ -270,15 +333,36 @@ public class BinderCallsStats {
}
public void setDetailedTracking(boolean enabled) {
- if (enabled != mDetailedTracking) {
- reset();
- mDetailedTracking = enabled;
+ synchronized (mLock) {
+ if (enabled != mDetailedTracking) {
+ mDetailedTracking = enabled;
+ reset();
+ }
+ }
+ }
+
+ public void setEnabled(boolean enabled) {
+ synchronized (mLock) {
+ if (enabled != mEnabled) {
+ mEnabled = enabled;
+ reset();
+ }
+ }
+ }
+
+ public void setSamplingInterval(int samplingInterval) {
+ synchronized (mLock) {
+ if (samplingInterval != mPeriodicSamplingInterval) {
+ mPeriodicSamplingInterval = samplingInterval;
+ reset();
+ }
}
}
public void reset() {
synchronized (mLock) {
mUidEntries.clear();
+ mExceptionCounts.clear();
mSampledEntries.mCallStats.clear();
mStartTime = System.currentTimeMillis();
}
@@ -414,6 +498,11 @@ public class BinderCallsStats {
}
@VisibleForTesting
+ public ArrayMap<String, Integer> getExceptionCounts() {
+ return mExceptionCounts;
+ }
+
+ @VisibleForTesting
public static <T> List<T> getHighestValues(List<T> list, ToDoubleFunction<T> toDouble,
double percentile) {
List<T> sortedList = new ArrayList<>(list);
diff --git a/core/java/com/android/internal/util/ArrayUtils.java b/core/java/com/android/internal/util/ArrayUtils.java
index 621619c5134d..be645fe707c6 100644
--- a/core/java/com/android/internal/util/ArrayUtils.java
+++ b/core/java/com/android/internal/util/ArrayUtils.java
@@ -626,4 +626,17 @@ public class ArrayUtils {
public static @NonNull String[] defeatNullable(@Nullable String[] val) {
return (val != null) ? val : EmptyArray.STRING;
}
+
+ /**
+ * Throws {@link ArrayIndexOutOfBoundsException} if the index is out of bounds.
+ *
+ * @param len length of the array. Must be non-negative
+ * @param index the index to check
+ * @throws ArrayIndexOutOfBoundsException if the {@code index} is out of bounds of the array
+ */
+ public static void checkBounds(int len, int index) {
+ if (index < 0 || len <= index) {
+ throw new ArrayIndexOutOfBoundsException("length=" + len + "; index=" + index);
+ }
+ }
}
diff --git a/core/jni/android_util_Binder.cpp b/core/jni/android_util_Binder.cpp
index c3ba9ba82826..7e2bad2f7946 100644
--- a/core/jni/android_util_Binder.cpp
+++ b/core/jni/android_util_Binder.cpp
@@ -155,9 +155,8 @@ static struct thread_dispatch_offsets_t
static constexpr int32_t PROXY_WARN_INTERVAL = 5000;
static constexpr uint32_t GC_INTERVAL = 1000;
-// Protected by gProxyLock. We warn if this gets too large.
-static int32_t gNumProxies = 0;
-static int32_t gProxiesWarned = 0;
+static std::atomic<uint32_t> gNumProxies(0);
+static std::atomic<uint32_t> gProxiesWarned(0);
// Number of GlobalRefs held by JavaBBinders.
static std::atomic<uint32_t> gNumLocalRefsCreated(0);
@@ -632,12 +631,6 @@ BinderProxyNativeData* getBPNativeData(JNIEnv* env, jobject obj) {
return (BinderProxyNativeData *) env->GetLongField(obj, gBinderProxyOffsets.mNativeData);
}
-static Mutex gProxyLock;
-
-// We may cache a single BinderProxyNativeData node to avoid repeat allocation.
-// All fields are null. Protected by gProxyLock.
-static BinderProxyNativeData *gNativeDataCache;
-
// If the argument is a JavaBBinder, return the Java object that was used to create it.
// Otherwise return a BinderProxy for the IBinder. If a previous call was passed the
// same IBinder, and the original BinderProxy is still alive, return the same BinderProxy.
@@ -652,36 +645,31 @@ jobject javaObjectForIBinder(JNIEnv* env, const sp<IBinder>& val)
return object;
}
- // For the rest of the function we will hold this lock, to serialize
- // looking/creation/destruction of Java proxies for native Binder proxies.
- AutoMutex _l(gProxyLock);
+ BinderProxyNativeData* nativeData = new BinderProxyNativeData();
+ nativeData->mOrgue = new DeathRecipientList;
+ nativeData->mObject = val;
- BinderProxyNativeData* nativeData = gNativeDataCache;
- if (nativeData == nullptr) {
- nativeData = new BinderProxyNativeData();
- }
- // gNativeDataCache is now logically empty.
jobject object = env->CallStaticObjectMethod(gBinderProxyOffsets.mClass,
gBinderProxyOffsets.mGetInstance, (jlong) nativeData, (jlong) val.get());
if (env->ExceptionCheck()) {
// In the exception case, getInstance still took ownership of nativeData.
- gNativeDataCache = nullptr;
return NULL;
}
BinderProxyNativeData* actualNativeData = getBPNativeData(env, object);
if (actualNativeData == nativeData) {
- // New BinderProxy; we still have exclusive access.
- nativeData->mOrgue = new DeathRecipientList;
- nativeData->mObject = val;
- gNativeDataCache = nullptr;
- ++gNumProxies;
- if (gNumProxies >= gProxiesWarned + PROXY_WARN_INTERVAL) {
- ALOGW("Unexpectedly many live BinderProxies: %d\n", gNumProxies);
- gProxiesWarned = gNumProxies;
+ // Created a new Proxy
+ uint32_t numProxies = gNumProxies.fetch_add(1, std::memory_order_relaxed);
+ uint32_t numLastWarned = gProxiesWarned.load(std::memory_order_relaxed);
+ if (numProxies >= numLastWarned + PROXY_WARN_INTERVAL) {
+ // Multiple threads can get here, make sure only one of them gets to
+ // update the warn counter.
+ if (gProxiesWarned.compare_exchange_strong(numLastWarned,
+ numLastWarned + PROXY_WARN_INTERVAL, std::memory_order_relaxed)) {
+ ALOGW("Unexpectedly many live BinderProxies: %d\n", numProxies);
+ }
}
} else {
- // nativeData wasn't used. Reuse it the next time.
- gNativeDataCache = nativeData;
+ delete nativeData;
}
return object;
@@ -959,8 +947,7 @@ jint android_os_Debug_getLocalObjectCount(JNIEnv* env, jobject clazz)
jint android_os_Debug_getProxyObjectCount(JNIEnv* env, jobject clazz)
{
- AutoMutex _l(gProxyLock);
- return gNumProxies;
+ return gNumProxies.load();
}
jint android_os_Debug_getDeathObjectCount(JNIEnv* env, jobject clazz)
@@ -1008,8 +995,6 @@ static void android_os_BinderInternal_proxyLimitcallback(int uid)
{
JNIEnv *env = AndroidRuntime::getJNIEnv();
{
- // Calls into BinderProxy must be serialized
- AutoMutex _l(gProxyLock);
env->CallStaticObjectMethod(gBinderProxyOffsets.mClass,
gBinderProxyOffsets.mDumpProxyDebugInfo);
}
@@ -1367,9 +1352,6 @@ static jboolean android_os_BinderProxy_unlinkToDeath(JNIEnv* env, jobject obj,
static void BinderProxy_destroy(void* rawNativeData)
{
- // Don't race with construction/initialization
- AutoMutex _l(gProxyLock);
-
BinderProxyNativeData * nativeData = (BinderProxyNativeData *) rawNativeData;
LOGDEATH("Destroying BinderProxy: binder=%p drl=%p\n",
nativeData->mObject.get(), nativeData->mOrgue.get());
diff --git a/core/jni/android_view_InputEventSender.cpp b/core/jni/android_view_InputEventSender.cpp
index 095252c28332..10da89227f51 100644
--- a/core/jni/android_view_InputEventSender.cpp
+++ b/core/jni/android_view_InputEventSender.cpp
@@ -114,8 +114,8 @@ status_t NativeInputEventSender::sendKeyEvent(uint32_t seq, const KeyEvent* even
uint32_t publishedSeq = mNextPublishedSeq++;
status_t status = mInputPublisher.publishKeyEvent(publishedSeq,
- event->getDeviceId(), event->getSource(), event->getAction(), event->getFlags(),
- event->getKeyCode(), event->getScanCode(), event->getMetaState(),
+ event->getDeviceId(), event->getSource(), event->getDisplayId(), event->getAction(),
+ event->getFlags(), event->getKeyCode(), event->getScanCode(), event->getMetaState(),
event->getRepeatCount(), event->getDownTime(), event->getEventTime());
if (status) {
ALOGW("Failed to send key event on channel '%s'. status=%d",
@@ -135,8 +135,7 @@ status_t NativeInputEventSender::sendMotionEvent(uint32_t seq, const MotionEvent
for (size_t i = 0; i <= event->getHistorySize(); i++) {
publishedSeq = mNextPublishedSeq++;
status_t status = mInputPublisher.publishMotionEvent(publishedSeq,
- event->getDeviceId(), event->getSource(),
- event->getDisplayId(),
+ event->getDeviceId(), event->getSource(), event->getDisplayId(),
event->getAction(), event->getActionButton(), event->getFlags(),
event->getEdgeFlags(), event->getMetaState(), event->getButtonState(),
event->getXOffset(), event->getYOffset(),
diff --git a/core/jni/android_view_KeyEvent.cpp b/core/jni/android_view_KeyEvent.cpp
index 8a6e745b60a8..f0107723a43e 100644
--- a/core/jni/android_view_KeyEvent.cpp
+++ b/core/jni/android_view_KeyEvent.cpp
@@ -39,6 +39,7 @@ static struct {
jfieldID mDeviceId;
jfieldID mSource;
+ jfieldID mDisplayId;
jfieldID mMetaState;
jfieldID mAction;
jfieldID mKeyCode;
@@ -65,6 +66,7 @@ jobject android_view_KeyEvent_fromNative(JNIEnv* env, const KeyEvent* event) {
event->getScanCode(),
event->getFlags(),
event->getSource(),
+ event->getDisplayId(),
NULL);
if (env->ExceptionCheck()) {
ALOGE("An exception occurred while obtaining a key event.");
@@ -79,6 +81,7 @@ status_t android_view_KeyEvent_toNative(JNIEnv* env, jobject eventObj,
KeyEvent* event) {
jint deviceId = env->GetIntField(eventObj, gKeyEventClassInfo.mDeviceId);
jint source = env->GetIntField(eventObj, gKeyEventClassInfo.mSource);
+ jint displayId = env->GetIntField(eventObj, gKeyEventClassInfo.mDisplayId);
jint metaState = env->GetIntField(eventObj, gKeyEventClassInfo.mMetaState);
jint action = env->GetIntField(eventObj, gKeyEventClassInfo.mAction);
jint keyCode = env->GetIntField(eventObj, gKeyEventClassInfo.mKeyCode);
@@ -88,7 +91,8 @@ status_t android_view_KeyEvent_toNative(JNIEnv* env, jobject eventObj,
jlong downTime = env->GetLongField(eventObj, gKeyEventClassInfo.mDownTime);
jlong eventTime = env->GetLongField(eventObj, gKeyEventClassInfo.mEventTime);
- event->initialize(deviceId, source, action, flags, keyCode, scanCode, metaState, repeatCount,
+ event->initialize(deviceId, source, displayId, action, flags, keyCode, scanCode, metaState,
+ repeatCount,
milliseconds_to_nanoseconds(downTime),
milliseconds_to_nanoseconds(eventTime));
return OK;
@@ -131,12 +135,14 @@ int register_android_view_KeyEvent(JNIEnv* env) {
gKeyEventClassInfo.clazz = MakeGlobalRefOrDie(env, clazz);
gKeyEventClassInfo.obtain = GetStaticMethodIDOrDie(env, gKeyEventClassInfo.clazz,
- "obtain", "(JJIIIIIIIILjava/lang/String;)Landroid/view/KeyEvent;");
+ "obtain", "(JJIIIIIIIIILjava/lang/String;)Landroid/view/KeyEvent;");
gKeyEventClassInfo.recycle = GetMethodIDOrDie(env, gKeyEventClassInfo.clazz,
"recycle", "()V");
gKeyEventClassInfo.mDeviceId = GetFieldIDOrDie(env, gKeyEventClassInfo.clazz, "mDeviceId", "I");
gKeyEventClassInfo.mSource = GetFieldIDOrDie(env, gKeyEventClassInfo.clazz, "mSource", "I");
+ gKeyEventClassInfo.mDisplayId = GetFieldIDOrDie(env, gKeyEventClassInfo.clazz, "mDisplayId",
+ "I");
gKeyEventClassInfo.mMetaState = GetFieldIDOrDie(env, gKeyEventClassInfo.clazz, "mMetaState",
"I");
gKeyEventClassInfo.mAction = GetFieldIDOrDie(env, gKeyEventClassInfo.clazz, "mAction", "I");
diff --git a/core/proto/android/server/windowmanagerservice.proto b/core/proto/android/server/windowmanagerservice.proto
index 7467d8f2e961..2de53b97312a 100644
--- a/core/proto/android/server/windowmanagerservice.proto
+++ b/core/proto/android/server/windowmanagerservice.proto
@@ -319,6 +319,8 @@ message WindowStateProto {
optional bool removed = 36;
optional bool is_on_screen = 37;
optional bool is_visible = 38;
+ optional bool pending_forced_seamless_rotation = 39;
+ optional int64 finished_forced_seamless_rotation_frame = 40;
}
message IdentifierProto {
diff --git a/core/res/res/values-night/values.xml b/core/res/res/values-night/values.xml
new file mode 100644
index 000000000000..23b0a24fff98
--- /dev/null
+++ b/core/res/res/values-night/values.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ Copyright (C) 2018 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License
+ -->
+
+<resources>
+ <style name="Theme.DeviceDefault.QuickSettings" parent="android:Theme.DeviceDefault">
+ <!-- Color palette -->
+ <item name="colorPrimaryDark">@color/primary_dark_device_default_settings</item>
+ <item name="colorSecondary">@color/secondary_device_default_settings</item>
+ <item name="colorAccent">@color/accent_device_default_dark</item>
+ <item name="colorError">@color/error_color_device_default_dark</item>
+ <item name="colorControlNormal">?attr/textColorPrimary</item>
+ <item name="alertDialogTheme">@style/Theme.DeviceDefault.Dialog.Alert</item>
+
+ <!-- QS panel background -->
+ <item name="colorBackgroundFloating">@color/material_grey_900</item>
+
+ <!-- volume background -->
+ <item name="panelColorBackground">@color/material_grey_800</item>
+ </style>
+</resources> \ No newline at end of file
diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml
index d2684ce28ff2..44eea30cf09f 100644
--- a/core/res/res/values/attrs.xml
+++ b/core/res/res/values/attrs.xml
@@ -1477,7 +1477,7 @@
used for, typically, account ID or password input. It is expected that IMEs
normally are able to input ASCII even without being told so (such IMEs
already respect this flag in a sense), but there could be some cases they
- aren't when, for instance, only non-ASCII input languagaes like Arabic,
+ aren't when, for instance, only non-ASCII input languages like Arabic,
Greek, Hebrew, Russian are enabled in the IME. Applications need to be
aware that the flag is not a guarantee, and not all IMEs will respect it.
However, it is strongly recommended for IME authors to respect this flag
@@ -3161,7 +3161,7 @@
enabled by a ViewGroup for all its children in specific situations (for
instance during a scrolling.) This property lets you persist the cache
in memory after its initial usage. Persisting the cache consumes more
- memory but may prevent frequent garbage collection is the cache is created
+ memory but may prevent frequent garbage collection if the cache is created
over and over again. By default the persistence is set to scrolling.
Deprecated: The view drawing cache was largely made obsolete with the introduction of
hardware-accelerated rendering in API 11. -->
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index fae4b10b2cb3..18624370ccfa 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -583,12 +583,14 @@
<integer translatable="false" name="config_wifi_framework_min_rx_rate_for_staying_on_network">16</integer>
<!-- Integer parameters of the wifi to cellular handover feature
wifi should not stick to bad networks -->
- <integer translatable="false" name="config_wifi_framework_wifi_score_bad_rssi_threshold_5GHz">-82</integer>
- <integer translatable="false" name="config_wifi_framework_wifi_score_entry_rssi_threshold_5GHz">-82</integer>
+ <!-- Integer threshold for low network score, should be somewhat less than the entry threshhold -->
+ <integer translatable="false" name="config_wifi_framework_wifi_score_bad_rssi_threshold_5GHz">-80</integer>
+ <!-- Integer threshold, do not connect to APs with RSSI lower than the entry threshold -->
+ <integer translatable="false" name="config_wifi_framework_wifi_score_entry_rssi_threshold_5GHz">-77</integer>
<integer translatable="false" name="config_wifi_framework_wifi_score_low_rssi_threshold_5GHz">-70</integer>
<integer translatable="false" name="config_wifi_framework_wifi_score_good_rssi_threshold_5GHz">-57</integer>
- <integer translatable="false" name="config_wifi_framework_wifi_score_bad_rssi_threshold_24GHz">-85</integer>
- <integer translatable="false" name="config_wifi_framework_wifi_score_entry_rssi_threshold_24GHz">-85</integer>
+ <integer translatable="false" name="config_wifi_framework_wifi_score_bad_rssi_threshold_24GHz">-83</integer>
+ <integer translatable="false" name="config_wifi_framework_wifi_score_entry_rssi_threshold_24GHz">-80</integer>
<integer translatable="false" name="config_wifi_framework_wifi_score_low_rssi_threshold_24GHz">-73</integer>
<integer translatable="false" name="config_wifi_framework_wifi_score_good_rssi_threshold_24GHz">-60</integer>
<integer translatable="false" name="config_wifi_framework_wifi_score_bad_link_speed_24">6</integer>
diff --git a/core/tests/coretests/src/android/provider/SettingsBackupTest.java b/core/tests/coretests/src/android/provider/SettingsBackupTest.java
index 7d489874f742..f91d14988d29 100644
--- a/core/tests/coretests/src/android/provider/SettingsBackupTest.java
+++ b/core/tests/coretests/src/android/provider/SettingsBackupTest.java
@@ -124,6 +124,7 @@ public class SettingsBackupTest {
Settings.Global.BATTERY_DISCHARGE_THRESHOLD,
Settings.Global.BATTERY_SAVER_DEVICE_SPECIFIC_CONSTANTS,
Settings.Global.BATTERY_STATS_CONSTANTS,
+ Settings.Global.BINDER_CALLS_STATS,
Settings.Global.BLE_SCAN_ALWAYS_AVAILABLE,
Settings.Global.BLE_SCAN_LOW_POWER_WINDOW_MS,
Settings.Global.BLE_SCAN_LOW_POWER_INTERVAL_MS,
@@ -596,13 +597,15 @@ public class SettingsBackupTest {
Settings.Secure.SEARCH_THREAD_KEEPALIVE_SECONDS,
Settings.Secure.SEARCH_WEB_RESULTS_OVERRIDE_LIMIT,
Settings.Secure.SELECTED_INPUT_METHOD_SUBTYPE,
+ Settings.Secure.SELECTED_SPELL_CHECKER, // Intentionally removed in Q
+ Settings.Secure.SELECTED_SPELL_CHECKER_SUBTYPE, // Intentionally removed in Q
Settings.Secure.SETTINGS_CLASSNAME,
Settings.Secure.SHOW_NOTE_ABOUT_NOTIFICATION_HIDING, // candidate?
Settings.Secure.SHOW_ROTATION_SUGGESTIONS,
Settings.Secure.SKIP_FIRST_USE_HINTS, // candidate?
Settings.Secure.SLEEP_TIMEOUT,
Settings.Secure.SMS_DEFAULT_APPLICATION,
- Settings.Secure.THEME_MODE,
+ Settings.Secure.SPELL_CHECKER_ENABLED, // Intentionally removed in Q
Settings.Secure.TRUST_AGENTS_INITIALIZED,
Settings.Secure.TV_INPUT_CUSTOM_LABELS,
Settings.Secure.TV_INPUT_HIDDEN_INPUTS,
diff --git a/core/tests/coretests/src/android/view/KeyEventTest.java b/core/tests/coretests/src/android/view/KeyEventTest.java
index aabf81606864..b9d95e542f11 100644
--- a/core/tests/coretests/src/android/view/KeyEventTest.java
+++ b/core/tests/coretests/src/android/view/KeyEventTest.java
@@ -16,6 +16,8 @@
package android.view;
+import static android.view.Display.INVALID_DISPLAY;
+
import static org.junit.Assert.assertEquals;
import android.support.test.filters.SmallTest;
@@ -28,12 +30,71 @@ import org.junit.runner.RunWith;
@RunWith(AndroidJUnit4.class)
public class KeyEventTest {
+ private static final int DOWN_TIME = 50;
+ private static final long EVENT_TIME = 100;
+ private static final int ACTION = KeyEvent.ACTION_DOWN;
+ private static final int KEYCODE = KeyEvent.KEYCODE_0;
+ private static final int REPEAT = 0;
+ private static final int METASTATE = 0;
+ private static final int DEVICE_ID = 0;
+ private static final int SCAN_CODE = 0;
+ private static final int FLAGS = 0;
+ private static final int SOURCE = InputDevice.SOURCE_KEYBOARD;
+ private static final String CHARACTERS = null;
+
@Test
public void testObtain() {
- KeyEvent keyEvent = KeyEvent.obtain(0, 0, KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_0,
- 0, 0, 0, 0, 0, InputDevice.SOURCE_KEYBOARD, null);
- assertEquals(KeyEvent.ACTION_DOWN, keyEvent.getAction());
- assertEquals(KeyEvent.KEYCODE_0, keyEvent.getKeyCode());
- assertEquals(InputDevice.SOURCE_KEYBOARD, keyEvent.getSource());
+ KeyEvent keyEvent = KeyEvent.obtain(DOWN_TIME, EVENT_TIME, ACTION, KEYCODE, REPEAT,
+ METASTATE, DEVICE_ID, SCAN_CODE, FLAGS, SOURCE, CHARACTERS);
+ assertEquals(DOWN_TIME, keyEvent.getDownTime());
+ assertEquals(EVENT_TIME, keyEvent.getEventTime());
+ assertEquals(ACTION, keyEvent.getAction());
+ assertEquals(KEYCODE, keyEvent.getKeyCode());
+ assertEquals(REPEAT, keyEvent.getRepeatCount());
+ assertEquals(METASTATE, keyEvent.getMetaState());
+ assertEquals(DEVICE_ID, keyEvent.getDeviceId());
+ assertEquals(SCAN_CODE, keyEvent.getScanCode());
+ assertEquals(FLAGS, keyEvent.getFlags());
+ assertEquals(SOURCE, keyEvent.getSource());
+ assertEquals(INVALID_DISPLAY, keyEvent.getDisplayId());
+ assertEquals(CHARACTERS, keyEvent.getCharacters());
+ }
+
+ @Test
+ public void testObtainFromKeyEvent() {
+ KeyEvent keyEvent = KeyEvent.obtain(DOWN_TIME, EVENT_TIME, ACTION, KEYCODE, REPEAT,
+ METASTATE, DEVICE_ID, SCAN_CODE, FLAGS, SOURCE, CHARACTERS);
+ KeyEvent keyEvent2 = KeyEvent.obtain(keyEvent);
+ assertEquals(keyEvent.getDownTime(), keyEvent2.getDownTime());
+ assertEquals(keyEvent.getEventTime(), keyEvent2.getEventTime());
+ assertEquals(keyEvent.getAction(), keyEvent2.getAction());
+ assertEquals(keyEvent.getKeyCode(), keyEvent2.getKeyCode());
+ assertEquals(keyEvent.getRepeatCount(), keyEvent2.getRepeatCount());
+ assertEquals(keyEvent.getMetaState(), keyEvent2.getMetaState());
+ assertEquals(keyEvent.getDeviceId(), keyEvent2.getDeviceId());
+ assertEquals(keyEvent.getScanCode(), keyEvent2.getScanCode());
+ assertEquals(keyEvent.getFlags(), keyEvent2.getFlags());
+ assertEquals(keyEvent.getSource(), keyEvent2.getSource());
+ assertEquals(keyEvent.getDisplayId(), keyEvent2.getDisplayId());
+ assertEquals(keyEvent.getCharacters(), keyEvent2.getCharacters());
+ }
+
+ @Test
+ public void testObtainWithDisplayId() {
+ final int displayId = 5;
+ KeyEvent keyEvent = KeyEvent.obtain(DOWN_TIME, EVENT_TIME, ACTION, KEYCODE, REPEAT,
+ METASTATE, DEVICE_ID, SCAN_CODE, FLAGS, SOURCE, displayId, CHARACTERS);
+ assertEquals(DOWN_TIME, keyEvent.getDownTime());
+ assertEquals(EVENT_TIME, keyEvent.getEventTime());
+ assertEquals(ACTION, keyEvent.getAction());
+ assertEquals(KEYCODE, keyEvent.getKeyCode());
+ assertEquals(REPEAT, keyEvent.getRepeatCount());
+ assertEquals(METASTATE, keyEvent.getMetaState());
+ assertEquals(DEVICE_ID, keyEvent.getDeviceId());
+ assertEquals(SCAN_CODE, keyEvent.getScanCode());
+ assertEquals(FLAGS, keyEvent.getFlags());
+ assertEquals(SOURCE, keyEvent.getSource());
+ assertEquals(displayId, keyEvent.getDisplayId());
+ assertEquals(CHARACTERS, keyEvent.getCharacters());
}
}
diff --git a/core/tests/coretests/src/com/android/internal/os/BinderCallsStatsTest.java b/core/tests/coretests/src/com/android/internal/os/BinderCallsStatsTest.java
index 18263ab0fa17..914fb7409c74 100644
--- a/core/tests/coretests/src/com/android/internal/os/BinderCallsStatsTest.java
+++ b/core/tests/coretests/src/com/android/internal/os/BinderCallsStatsTest.java
@@ -20,14 +20,19 @@ import android.os.Binder;
import android.platform.test.annotations.Presubmit;
import android.support.test.filters.SmallTest;
import android.support.test.runner.AndroidJUnit4;
+import android.util.ArrayMap;
import android.util.SparseArray;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
+import java.io.PrintWriter;
+import java.io.StringWriter;
import java.util.Arrays;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
import static org.junit.Assert.assertEquals;
@@ -41,7 +46,9 @@ public class BinderCallsStatsTest {
@Test
public void testDetailedOff() {
- TestBinderCallsStats bcs = new TestBinderCallsStats(false);
+ TestBinderCallsStats bcs = new TestBinderCallsStats();
+ bcs.setDetailedTracking(false);
+
Binder binder = new Binder();
BinderCallsStats.CallSession callSession = bcs.callStarted(binder, 1);
bcs.time += 10;
@@ -93,7 +100,9 @@ public class BinderCallsStatsTest {
@Test
public void testDetailedOn() {
- TestBinderCallsStats bcs = new TestBinderCallsStats(true);
+ TestBinderCallsStats bcs = new TestBinderCallsStats();
+ bcs.setDetailedTracking(true);
+
Binder binder = new Binder();
BinderCallsStats.CallSession callSession = bcs.callStarted(binder, 1);
bcs.time += 10;
@@ -140,8 +149,86 @@ public class BinderCallsStatsTest {
}
@Test
+ public void testDisabled() {
+ TestBinderCallsStats bcs = new TestBinderCallsStats();
+ bcs.setEnabled(false);
+
+ Binder binder = new Binder();
+ BinderCallsStats.CallSession callSession = bcs.callStarted(binder, 1);
+ bcs.time += 10;
+ bcs.callEnded(callSession, REQUEST_SIZE, REPLY_SIZE);
+
+ SparseArray<BinderCallsStats.UidEntry> uidEntries = bcs.getUidEntries();
+ assertEquals(0, uidEntries.size());
+ }
+
+ @Test
+ public void testDisableInBetweenCall() {
+ TestBinderCallsStats bcs = new TestBinderCallsStats();
+ bcs.setEnabled(true);
+
+ Binder binder = new Binder();
+ BinderCallsStats.CallSession callSession = bcs.callStarted(binder, 1);
+ bcs.time += 10;
+ bcs.setEnabled(false);
+ bcs.callEnded(callSession, REQUEST_SIZE, REPLY_SIZE);
+
+ SparseArray<BinderCallsStats.UidEntry> uidEntries = bcs.getUidEntries();
+ assertEquals(0, uidEntries.size());
+ }
+
+ @Test
+ public void testEnableInBetweenCall() {
+ TestBinderCallsStats bcs = new TestBinderCallsStats();
+ bcs.setEnabled(false);
+
+ Binder binder = new Binder();
+ BinderCallsStats.CallSession callSession = bcs.callStarted(binder, 1);
+ bcs.time += 10;
+ bcs.setEnabled(true);
+ bcs.callEnded(callSession, REQUEST_SIZE, REPLY_SIZE);
+
+ SparseArray<BinderCallsStats.UidEntry> uidEntries = bcs.getUidEntries();
+ assertEquals(0, uidEntries.size());
+ }
+
+ @Test
+ public void testSampling() {
+ TestBinderCallsStats bcs = new TestBinderCallsStats();
+ bcs.setDetailedTracking(false);
+ bcs.setSamplingInterval(2);
+
+ Binder binder = new Binder();
+ BinderCallsStats.CallSession callSession = bcs.callStarted(binder, 1);
+ bcs.time += 10;
+ bcs.callEnded(callSession, REQUEST_SIZE, REPLY_SIZE);
+
+ callSession = bcs.callStarted(binder, 1);
+ bcs.time += 1000; // shoud be ignored.
+ bcs.callEnded(callSession, REQUEST_SIZE, REPLY_SIZE);
+
+ callSession = bcs.callStarted(binder, 1);
+ bcs.time += 50;
+ bcs.callEnded(callSession, REQUEST_SIZE, REPLY_SIZE);
+
+ SparseArray<BinderCallsStats.UidEntry> uidEntries = bcs.getUidEntries();
+ assertEquals(1, uidEntries.size());
+ BinderCallsStats.UidEntry uidEntry = uidEntries.get(TEST_UID);
+ Assert.assertNotNull(uidEntry);
+ assertEquals(3, uidEntry.callCount);
+ assertEquals(70, uidEntry.cpuTimeMicros);
+ assertEquals("Detailed tracking off - no entries should be returned",
+ 0, uidEntry.getCallStatsList().size());
+
+ BinderCallsStats.UidEntry sampledEntries = bcs.getSampledEntries();
+ List<BinderCallsStats.CallStat> sampledCallStatsList = sampledEntries.getCallStatsList();
+ assertEquals(1, sampledCallStatsList.size());
+ }
+
+ @Test
public void testParcelSize() {
- TestBinderCallsStats bcs = new TestBinderCallsStats(true);
+ TestBinderCallsStats bcs = new TestBinderCallsStats();
+ bcs.setDetailedTracking(true);
Binder binder = new Binder();
BinderCallsStats.CallSession callSession = bcs.callStarted(binder, 1);
bcs.time += 10;
@@ -156,7 +243,8 @@ public class BinderCallsStatsTest {
@Test
public void testMaxCpu() {
- TestBinderCallsStats bcs = new TestBinderCallsStats(true);
+ TestBinderCallsStats bcs = new TestBinderCallsStats();
+ bcs.setDetailedTracking(true);
Binder binder = new Binder();
BinderCallsStats.CallSession callSession = bcs.callStarted(binder, 1);
bcs.time += 50;
@@ -174,7 +262,8 @@ public class BinderCallsStatsTest {
@Test
public void testMaxLatency() {
- TestBinderCallsStats bcs = new TestBinderCallsStats(true);
+ TestBinderCallsStats bcs = new TestBinderCallsStats();
+ bcs.setDetailedTracking(true);
Binder binder = new Binder();
BinderCallsStats.CallSession callSession = bcs.callStarted(binder, 1);
bcs.elapsedTime += 5;
@@ -198,13 +287,48 @@ public class BinderCallsStatsTest {
assertEquals(Arrays.asList(4, 3, 2), highestValues);
}
+ @Test
+ public void testExceptionCount() {
+ TestBinderCallsStats bcs = new TestBinderCallsStats();
+ bcs.setDetailedTracking(true);
+ Binder binder = new Binder();
+ BinderCallsStats.CallSession callSession = bcs.callStarted(binder, 1);
+ bcs.callThrewException(callSession, new IllegalStateException());
+ bcs.callEnded(callSession, REQUEST_SIZE, REPLY_SIZE);
+
+ callSession = bcs.callStarted(binder, 1);
+ bcs.callThrewException(callSession, new IllegalStateException());
+ bcs.callEnded(callSession, REQUEST_SIZE, REPLY_SIZE);
+
+ callSession = bcs.callStarted(binder, 1);
+ bcs.callThrewException(callSession, new RuntimeException());
+ bcs.callEnded(callSession, REQUEST_SIZE, REPLY_SIZE);
+
+ ArrayMap<String, Integer> expected = new ArrayMap<>();
+ expected.put("java.lang.IllegalStateException", 2);
+ expected.put("java.lang.RuntimeException", 1);
+ assertEquals(expected, bcs.getExceptionCounts());
+ }
+
+ @Test
+ public void testDumpDoesNotThrowException() {
+ TestBinderCallsStats bcs = new TestBinderCallsStats();
+ bcs.setDetailedTracking(true);
+ Binder binder = new Binder();
+ BinderCallsStats.CallSession callSession = bcs.callStarted(binder, 1);
+ bcs.callThrewException(callSession, new IllegalStateException());
+ bcs.callEnded(callSession, REQUEST_SIZE, REPLY_SIZE);
+
+ PrintWriter pw = new PrintWriter(new StringWriter());
+ bcs.dump(pw, new HashMap<>(), true);
+ }
+
static class TestBinderCallsStats extends BinderCallsStats {
int callingUid = TEST_UID;
long time = 1234;
long elapsedTime = 0;
- TestBinderCallsStats(boolean detailedTracking) {
- super(detailedTracking);
+ TestBinderCallsStats() {
}
@Override
diff --git a/libs/hwui/renderthread/CacheManager.cpp b/libs/hwui/renderthread/CacheManager.cpp
index b07fb2d7ae0f..bec80b1e6011 100644
--- a/libs/hwui/renderthread/CacheManager.cpp
+++ b/libs/hwui/renderthread/CacheManager.cpp
@@ -134,6 +134,7 @@ void CacheManager::configureContext(GrContextOptions* contextOptions) {
}
contextOptions->fPersistentCache = &skiapipeline::ShaderCache::get();
+ contextOptions->fGpuPathRenderers &= ~GpuPathRenderers::kCoverageCounting;
}
void CacheManager::trimMemory(TrimMemoryMode mode) {
diff --git a/media/java/android/media/MediaPlayer2Impl.java b/media/java/android/media/MediaPlayer2Impl.java
index 283b8ec9eec9..5a71afd4625e 100644
--- a/media/java/android/media/MediaPlayer2Impl.java
+++ b/media/java/android/media/MediaPlayer2Impl.java
@@ -97,7 +97,6 @@ public final class MediaPlayer2Impl extends MediaPlayer2 {
private long mNativeSurfaceTexture; // accessed by native methods
private int mListenerContext; // accessed by native methods
private SurfaceHolder mSurfaceHolder;
- private EventHandler mEventHandler;
private PowerManager.WakeLock mWakeLock = null;
private boolean mScreenOnWhilePlaying;
private boolean mStayAwake;
@@ -135,7 +134,7 @@ public final class MediaPlayer2Impl extends MediaPlayer2 {
//--- guarded by |mDrmLock| end
private HandlerThread mHandlerThread;
- private final Handler mTaskHandler;
+ private final TaskHandler mTaskHandler;
private final Object mTaskLock = new Object();
@GuardedBy("mTaskLock")
private final List<Task> mPendingTasks = new LinkedList<>();
@@ -149,19 +148,10 @@ public final class MediaPlayer2Impl extends MediaPlayer2 {
* result in an exception.</p>
*/
public MediaPlayer2Impl() {
- Looper looper;
- if ((looper = Looper.myLooper()) != null) {
- mEventHandler = new EventHandler(this, looper);
- } else if ((looper = Looper.getMainLooper()) != null) {
- mEventHandler = new EventHandler(this, looper);
- } else {
- mEventHandler = null;
- }
-
mHandlerThread = new HandlerThread("MediaPlayer2TaskThread");
mHandlerThread.start();
- looper = mHandlerThread.getLooper();
- mTaskHandler = new Handler(looper);
+ Looper looper = mHandlerThread.getLooper();
+ mTaskHandler = new TaskHandler(this, looper);
mTimeProvider = new TimeProvider(this);
mOpenSubtitleSources = new Vector<InputStream>();
@@ -934,13 +924,13 @@ public final class MediaPlayer2Impl extends MediaPlayer2 {
mNextSourceState = NEXT_SOURCE_STATE_PREPARING;
handleDataSource(false /* isCurrent */, mNextDSDs.get(0), mNextSrcId);
} catch (Exception e) {
- Message msg2 = mEventHandler.obtainMessage(
+ Message msg2 = mTaskHandler.obtainMessage(
MEDIA_ERROR, MEDIA_ERROR_UNKNOWN, MEDIA_ERROR_UNSUPPORTED, null);
final long nextSrcId = mNextSrcId;
- mEventHandler.post(new Runnable() {
+ mTaskHandler.post(new Runnable() {
@Override
public void run() {
- mEventHandler.handleMessage(msg2, nextSrcId);
+ mTaskHandler.handleMessage(msg2, nextSrcId);
}
});
}
@@ -967,12 +957,12 @@ public final class MediaPlayer2Impl extends MediaPlayer2 {
try {
nativePlayNextDataSource(srcId);
} catch (Exception e) {
- Message msg2 = mEventHandler.obtainMessage(
+ Message msg2 = mTaskHandler.obtainMessage(
MEDIA_ERROR, MEDIA_ERROR_UNKNOWN, MEDIA_ERROR_UNSUPPORTED, null);
- mEventHandler.post(new Runnable() {
+ mTaskHandler.post(new Runnable() {
@Override
public void run() {
- mEventHandler.handleMessage(msg2, srcId);
+ mTaskHandler.handleMessage(msg2, srcId);
}
});
}
@@ -1095,7 +1085,7 @@ public final class MediaPlayer2Impl extends MediaPlayer2 {
enableNativeRoutingCallbacksLocked(true);
mRoutingChangeListeners.put(
listener, new NativeRoutingEventHandlerDelegate(this, listener,
- handler != null ? handler : mEventHandler));
+ handler != null ? handler : mTaskHandler));
}
}
}
@@ -1619,8 +1609,8 @@ public final class MediaPlayer2Impl extends MediaPlayer2 {
stayAwake(false);
_reset();
// make sure none of the listeners get called anymore
- if (mEventHandler != null) {
- mEventHandler.removeCallbacksAndMessages(null);
+ if (mTaskHandler != null) {
+ mTaskHandler.removeCallbacksAndMessages(null);
}
synchronized (mIndexTrackPairs) {
@@ -2091,7 +2081,7 @@ public final class MediaPlayer2Impl extends MediaPlayer2 {
selectOrDeselectInbandTrack(mSelectedSubtitleTrackIndex, true);
} catch (IllegalStateException e) {
}
- final Executor executor = (runnable) -> mEventHandler.post(runnable);
+ final Executor executor = (runnable) -> mTaskHandler.post(runnable);
registerEventCallback(executor, mSubtitleDataCallback);
}
// no need to select out-of-band tracks
@@ -2154,9 +2144,9 @@ public final class MediaPlayer2Impl extends MediaPlayer2 {
public void run() {
int res = addTrack();
- if (mEventHandler != null) {
- Message m = mEventHandler.obtainMessage(MEDIA_INFO, res, 0, null);
- mEventHandler.sendMessage(m);
+ if (mTaskHandler != null) {
+ Message m = mTaskHandler.obtainMessage(MEDIA_INFO, res, 0, null);
+ mTaskHandler.sendMessage(m);
}
thread.getLooper().quitSafely();
}
@@ -2344,7 +2334,7 @@ public final class MediaPlayer2Impl extends MediaPlayer2 {
if (!mSubtitleController.hasRendererFor(fFormat)) {
// test and add not atomic
Context context = ActivityThread.currentApplication();
- mSubtitleController.registerRenderer(new SRTRenderer(context, mEventHandler));
+ mSubtitleController.registerRenderer(new SRTRenderer(context, mTaskHandler));
}
final SubtitleTrack track = mSubtitleController.addTrack(fFormat);
synchronized (mIndexTrackPairs) {
@@ -2397,9 +2387,9 @@ public final class MediaPlayer2Impl extends MediaPlayer2 {
public void run() {
int res = addTrack();
- if (mEventHandler != null) {
- Message m = mEventHandler.obtainMessage(MEDIA_INFO, res, 0, null);
- mEventHandler.sendMessage(m);
+ if (mTaskHandler != null) {
+ Message m = mTaskHandler.obtainMessage(MEDIA_INFO, res, 0, null);
+ mTaskHandler.sendMessage(m);
}
thread.getLooper().quitSafely();
}
@@ -2661,10 +2651,10 @@ public final class MediaPlayer2Impl extends MediaPlayer2 {
return mTimeProvider;
}
- private class EventHandler extends Handler {
+ private class TaskHandler extends Handler {
private MediaPlayer2Impl mMediaPlayer;
- public EventHandler(MediaPlayer2Impl mp, Looper looper) {
+ public TaskHandler(MediaPlayer2Impl mp, Looper looper) {
super(looper);
mMediaPlayer = mp;
}
@@ -3026,7 +3016,7 @@ public final class MediaPlayer2Impl extends MediaPlayer2 {
/*
* Called from native code when an interesting event happens. This method
- * just uses the EventHandler system to post the event back to the main app thread.
+ * just uses the TaskHandler system to post the event back to the main app thread.
* We use a weak reference to the original MediaPlayer2 object so that the native
* code is safe from the object disappearing from underneath it. (This is
* the cookie passed to native_setup().)
@@ -3055,7 +3045,7 @@ public final class MediaPlayer2Impl extends MediaPlayer2 {
case MEDIA_DRM_INFO:
// We need to derive mDrmInfoImpl before prepare() returns so processing it here
- // before the notification is sent to EventHandler below. EventHandler runs in the
+ // before the notification is sent to TaskHandler below. TaskHandler runs in the
// notification looper so its handleMessage might process the event after prepare()
// has returned.
Log.v(TAG, "postEventFromNative MEDIA_DRM_INFO");
@@ -3082,13 +3072,13 @@ public final class MediaPlayer2Impl extends MediaPlayer2 {
}
- if (mp.mEventHandler != null) {
- Message m = mp.mEventHandler.obtainMessage(what, arg1, arg2, obj);
+ if (mp.mTaskHandler != null) {
+ Message m = mp.mTaskHandler.obtainMessage(what, arg1, arg2, obj);
- mp.mEventHandler.post(new Runnable() {
+ mp.mTaskHandler.post(new Runnable() {
@Override
public void run() {
- mp.mEventHandler.handleMessage(m, srcId);
+ mp.mTaskHandler.handleMessage(m, srcId);
}
});
}
diff --git a/media/java/android/media/tv/TvInputManager.java b/media/java/android/media/tv/TvInputManager.java
index 143182f83ace..ec2d9bab5107 100644
--- a/media/java/android/media/tv/TvInputManager.java
+++ b/media/java/android/media/tv/TvInputManager.java
@@ -888,6 +888,8 @@ public final class TvInputManager {
if (token != null) {
session = new Session(token, channel, mService, mUserId, seq,
mSessionCallbackRecordMap);
+ } else {
+ mSessionCallbackRecordMap.delete(seq);
}
record.postSessionCreated(session);
}
@@ -2487,7 +2489,7 @@ public final class TvInputManager {
}
}
synchronized (mSessionCallbackRecordMap) {
- mSessionCallbackRecordMap.remove(mSeq);
+ mSessionCallbackRecordMap.delete(mSeq);
}
}
diff --git a/packages/SettingsLib/res/values-bs/arrays.xml b/packages/SettingsLib/res/values-bs/arrays.xml
index 8577779d104c..9b3c38c0ab0c 100644
--- a/packages/SettingsLib/res/values-bs/arrays.xml
+++ b/packages/SettingsLib/res/values-bs/arrays.xml
@@ -27,7 +27,7 @@
<item msgid="515055375277271756">"Autentifikacija…"</item>
<item msgid="1943354004029184381">"Dobivanje IP adrese…"</item>
<item msgid="4221763391123233270">"Povezano"</item>
- <item msgid="624838831631122137">"Suspendiran"</item>
+ <item msgid="624838831631122137">"Suspendirano"</item>
<item msgid="7979680559596111948">"Prekidanje veze…"</item>
<item msgid="1634960474403853625">"Isključen"</item>
<item msgid="746097431216080650">"Neuspješno"</item>
@@ -38,11 +38,11 @@
<item msgid="7714855332363650812"></item>
<item msgid="8878186979715711006">"Skeniranje…"</item>
<item msgid="355508996603873860">"Povezivanje na mrežu <xliff:g id="NETWORK_NAME">%1$s</xliff:g>..."</item>
- <item msgid="554971459996405634">"Autentifikacija sa mrežom <xliff:g id="NETWORK_NAME">%1$s</xliff:g>…"</item>
+ <item msgid="554971459996405634">"Autentifikacija s mrežom <xliff:g id="NETWORK_NAME">%1$s</xliff:g>…"</item>
<item msgid="7928343808033020343">"Dobivanje IP adrese iz mreže <xliff:g id="NETWORK_NAME">%1$s</xliff:g>…"</item>
- <item msgid="8937994881315223448">"Povezan na mrežu <xliff:g id="NETWORK_NAME">%1$s</xliff:g>"</item>
- <item msgid="1330262655415760617">"Suspendiran"</item>
- <item msgid="7698638434317271902">"Prekidanje veze sa mrežom <xliff:g id="NETWORK_NAME">%1$s</xliff:g>…"</item>
+ <item msgid="8937994881315223448">"Povezano na mrežu <xliff:g id="NETWORK_NAME">%1$s</xliff:g>"</item>
+ <item msgid="1330262655415760617">"Suspendirano"</item>
+ <item msgid="7698638434317271902">"Prekidanje veze s mrežom <xliff:g id="NETWORK_NAME">%1$s</xliff:g>…"</item>
<item msgid="197508606402264311">"Isključen"</item>
<item msgid="8578370891960825148">"Neuspješno"</item>
<item msgid="5660739516542454527">"Blokirano"</item>
@@ -59,7 +59,7 @@
<item msgid="45075631231212732">"Uvijek koristi HDCP provjeru"</item>
</string-array>
<string-array name="bluetooth_avrcp_versions">
- <item msgid="5347678900838034763">"AVRCP 1.4 (Zadano)"</item>
+ <item msgid="5347678900838034763">"AVRCP 1.4 (zadano)"</item>
<item msgid="2809759619990248160">"AVRCP 1.3"</item>
<item msgid="6199178154704729352">"AVRCP 1.5"</item>
<item msgid="5172170854953034852">"AVRCP 1.6"</item>
@@ -71,58 +71,58 @@
<item msgid="3422726142222090896">"avrcp16"</item>
</string-array>
<string-array name="bluetooth_a2dp_codec_titles">
- <item msgid="7065842274271279580">"Koristi odabir sistema (Zadano)"</item>
+ <item msgid="7065842274271279580">"Koristi odabir sistema (zadano)"</item>
<item msgid="7539690996561263909">"SBC"</item>
<item msgid="686685526567131661">"AAC"</item>
<item msgid="5254942598247222737">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX">aptX™</xliff:g> audio"</item>
<item msgid="2091430979086738145">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_HD">aptX™ HD</xliff:g> audio"</item>
<item msgid="6751080638867012696">"LDAC"</item>
- <item msgid="723675059572222462">"Omogućite opcionalne kodeke"</item>
- <item msgid="3304843301758635896">"Onemogućite opcionalne kodeke"</item>
+ <item msgid="723675059572222462">"Omogući opcionalne kodeke"</item>
+ <item msgid="3304843301758635896">"Onemogući opcionalne kodeke"</item>
</string-array>
<string-array name="bluetooth_a2dp_codec_summaries">
- <item msgid="5062108632402595000">"Koristi odabir sistema (Zadano)"</item>
+ <item msgid="5062108632402595000">"Koristi odabir sistema (zadano)"</item>
<item msgid="6898329690939802290">"SBC"</item>
<item msgid="6839647709301342559">"AAC"</item>
<item msgid="7848030269621918608">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX">aptX™</xliff:g> audio"</item>
<item msgid="298198075927343893">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_HD">aptX™ HD</xliff:g> audio"</item>
<item msgid="7950781694447359344">"LDAC"</item>
- <item msgid="2209680154067241740">"Omogućite opcionalne kodeke"</item>
- <item msgid="741805482892725657">"Onemogućite opcionalne kodeke"</item>
+ <item msgid="2209680154067241740">"Omogući opcionalne kodeke"</item>
+ <item msgid="741805482892725657">"Onemogući opcionalne kodeke"</item>
</string-array>
<string-array name="bluetooth_a2dp_codec_sample_rate_titles">
- <item msgid="3093023430402746802">"Koristi odabir sistema (Zadano)"</item>
+ <item msgid="3093023430402746802">"Koristi odabir sistema (zadano)"</item>
<item msgid="8895532488906185219">"44,1 kHz"</item>
<item msgid="2909915718994807056">"48,0 kHz"</item>
<item msgid="3347287377354164611">"88,2 kHz"</item>
<item msgid="1234212100239985373">"96,0 kHz"</item>
</string-array>
<string-array name="bluetooth_a2dp_codec_sample_rate_summaries">
- <item msgid="3214516120190965356">"Koristi odabir sistema (Zadano)"</item>
+ <item msgid="3214516120190965356">"Koristi odabir sistema (zadano)"</item>
<item msgid="4482862757811638365">"44,1 kHz"</item>
<item msgid="354495328188724404">"48,0 kHz"</item>
<item msgid="7329816882213695083">"88,2 kHz"</item>
<item msgid="6967397666254430476">"96,0 kHz"</item>
</string-array>
<string-array name="bluetooth_a2dp_codec_bits_per_sample_titles">
- <item msgid="2684127272582591429">"Koristi odabir sistema (Zadano)"</item>
+ <item msgid="2684127272582591429">"Koristi odabir sistema (zadano)"</item>
<item msgid="5618929009984956469">"16 bitova/uzorak"</item>
<item msgid="3412640499234627248">"24 bitova/uzorak"</item>
<item msgid="121583001492929387">"32 bitova/uzorak"</item>
</string-array>
<string-array name="bluetooth_a2dp_codec_bits_per_sample_summaries">
- <item msgid="1081159789834584363">"Koristi odabir sistema (Zadano)"</item>
+ <item msgid="1081159789834584363">"Koristi odabir sistema (zadano)"</item>
<item msgid="4726688794884191540">"16 bitova/uzorak"</item>
<item msgid="305344756485516870">"24 bitova/uzorak"</item>
<item msgid="244568657919675099">"32 bitova/uzorak"</item>
</string-array>
<string-array name="bluetooth_a2dp_codec_channel_mode_titles">
- <item msgid="5226878858503393706">"Koristi odabir sistema (Zadano)"</item>
+ <item msgid="5226878858503393706">"Koristi odabir sistema (zadano)"</item>
<item msgid="4106832974775067314">"Mono"</item>
<item msgid="5571632958424639155">"Stereo"</item>
</string-array>
<string-array name="bluetooth_a2dp_codec_channel_mode_summaries">
- <item msgid="4118561796005528173">"Koristi odabir sistema (Zadano)"</item>
+ <item msgid="4118561796005528173">"Koristi odabir sistema (zadano)"</item>
<item msgid="8900559293912978337">"Mono"</item>
<item msgid="8883739882299884241">"Stereo"</item>
</string-array>
@@ -130,13 +130,13 @@
<item msgid="7158319962230727476">"Optimizirano za kvalitet zvuka (990 kbps/909 kbps)"</item>
<item msgid="2921767058740704969">"Uravnotežen kvalitet zvuka i veze (660kbps/606kbps)"</item>
<item msgid="8860982705384396512">"Optimizirano za kvalitet veze (330 kbps/303 kbps)"</item>
- <item msgid="4414060457677684127">"Maksimalan napor (Prilagodljiva brzina prijenosa)"</item>
+ <item msgid="4414060457677684127">"Maksimalan napor (prilagodljiva brzina prijenosa)"</item>
</string-array>
<string-array name="bluetooth_a2dp_codec_ldac_playback_quality_summaries">
<item msgid="6398189564246596868">"Optimizirano za kvalitet zvuka"</item>
<item msgid="4327143584633311908">"Uravnotežen kvalitet zvuka i veze"</item>
<item msgid="4681409244565426925">"Optimizirano za kvalitet veze"</item>
- <item msgid="364670732877872677">"Maksimalan napor (Prilagodljiva brzina prijenosa)"</item>
+ <item msgid="364670732877872677">"Maksimalan napor (prilagodljiva brzina prijenosa)"</item>
</string-array>
<string-array name="bluetooth_audio_active_device_summaries">
<item msgid="4862957058729193940"></item>
@@ -169,7 +169,7 @@
<string-array name="select_logpersist_titles">
<item msgid="1744840221860799971">"Isključeno"</item>
<item msgid="3054662377365844197">"Sve"</item>
- <item msgid="688870735111627832">"Svi osim radija"</item>
+ <item msgid="688870735111627832">"Sve osim radija"</item>
<item msgid="2850427388488887328">"samo kernel"</item>
</string-array>
<string-array name="select_logpersist_summaries">
@@ -208,13 +208,13 @@
<string-array name="overlay_display_devices_entries">
<item msgid="1606809880904982133">"Nema"</item>
<item msgid="9033194758688161545">"480p"</item>
- <item msgid="1025306206556583600">"480p (osiguran)"</item>
+ <item msgid="1025306206556583600">"480p (sigurno)"</item>
<item msgid="1853913333042744661">"720p"</item>
- <item msgid="3414540279805870511">"720p (osiguran)"</item>
+ <item msgid="3414540279805870511">"720p (sigurno)"</item>
<item msgid="9039818062847141551">"1080p"</item>
- <item msgid="4939496949750174834">"1080p (osiguran)"</item>
+ <item msgid="4939496949750174834">"1080p (sigurno)"</item>
<item msgid="1833612718524903568">"4K"</item>
- <item msgid="238303513127879234">"4K (osiguran)"</item>
+ <item msgid="238303513127879234">"4K (sigurno)"</item>
<item msgid="3547211260846843098">"4K (povećava rezoluciju)"</item>
<item msgid="5411365648951414254">"4K (povećava rezoluciju, osiguran)"</item>
<item msgid="1311305077526792901">"720p, 1080p (dupli ekran)"</item>
diff --git a/packages/SettingsLib/res/values-bs/strings.xml b/packages/SettingsLib/res/values-bs/strings.xml
index b8195b122db3..e049f6f99d18 100644
--- a/packages/SettingsLib/res/values-bs/strings.xml
+++ b/packages/SettingsLib/res/values-bs/strings.xml
@@ -43,7 +43,7 @@
<string name="wifi_status_no_internet" msgid="5784710974669608361">"Nema internetske veze"</string>
<string name="wifi_status_sign_in_required" msgid="123517180404752756">"Potrebna je prijava"</string>
<string name="wifi_ap_unable_to_handle_new_sta" msgid="5348824313514404541">"Pristupna tačka je privremeno puna"</string>
- <string name="connected_via_carrier" msgid="7583780074526041912">"Povezana koristeći %1$s"</string>
+ <string name="connected_via_carrier" msgid="7583780074526041912">"Povezano koristeći %1$s"</string>
<string name="available_via_carrier" msgid="1469036129740799053">"Dostupna koristeći %1$s"</string>
<string name="speed_label_very_slow" msgid="1867055264243608530">"Veoma sporo"</string>
<string name="speed_label_slow" msgid="813109590815810235">"Sporo"</string>
@@ -84,11 +84,11 @@
<string name="bluetooth_hearing_aid_profile_summary_connected" msgid="7188282786730266159">"Povezano na slušni aparat"</string>
<string name="bluetooth_a2dp_profile_summary_connected" msgid="963376081347721598">"Povezano sa zvukom medija"</string>
<string name="bluetooth_headset_profile_summary_connected" msgid="7661070206715520671">"Povezano na zvuk telefona"</string>
- <string name="bluetooth_opp_profile_summary_connected" msgid="2611913495968309066">"Povezan na server za prijenos podataka"</string>
+ <string name="bluetooth_opp_profile_summary_connected" msgid="2611913495968309066">"Povezano sa serverom za prijenos podataka"</string>
<string name="bluetooth_map_profile_summary_connected" msgid="8191407438851351713">"Povezano na mapu"</string>
<string name="bluetooth_sap_profile_summary_connected" msgid="8561765057453083838">"Povezan na SAP"</string>
- <string name="bluetooth_opp_profile_summary_not_connected" msgid="1267091356089086285">"Nije povezan na server za prijenos podataka"</string>
- <string name="bluetooth_hid_profile_summary_connected" msgid="3381760054215168689">"Spojen na ulazni uređaj"</string>
+ <string name="bluetooth_opp_profile_summary_not_connected" msgid="1267091356089086285">"Nije povezano sa serverom za prijenos podataka"</string>
+ <string name="bluetooth_hid_profile_summary_connected" msgid="3381760054215168689">"Povezano s ulaznim uređajem"</string>
<string name="bluetooth_pan_user_profile_summary_connected" msgid="6436258151814414028">"Povezano na uređaj za pristup internetu"</string>
<string name="bluetooth_pan_nap_profile_summary_connected" msgid="1322694224800769308">"Dijeljenje lokalne internetske veze s uređajem"</string>
<string name="bluetooth_pan_profile_summary_use_for" msgid="5736111170225304239">"Koristi za pristup internetu"</string>
@@ -102,10 +102,10 @@
<string name="bluetooth_pairing_accept" msgid="6163520056536604875">"Upari"</string>
<string name="bluetooth_pairing_accept_all_caps" msgid="6061699265220789149">"UPARI"</string>
<string name="bluetooth_pairing_decline" msgid="4185420413578948140">"Otkaži"</string>
- <string name="bluetooth_pairing_will_share_phonebook" msgid="4982239145676394429">"Uparivanje odobrava pristup kontaktima i istoriji poziva kada je uspostavljeno."</string>
- <string name="bluetooth_pairing_error_message" msgid="3748157733635947087">"Nije se moguće upariti s uređajem <xliff:g id="DEVICE_NAME">%1$s</xliff:g>."</string>
- <string name="bluetooth_pairing_pin_error_message" msgid="8337234855188925274">"Nije se moguće upariti s uređajem <xliff:g id="DEVICE_NAME">%1$s</xliff:g> zbog pogrešnog PIN-a ili pristupnog koda."</string>
- <string name="bluetooth_pairing_device_down_error_message" msgid="7870998403045801381">"Ne može komunicirati sa uređajem <xliff:g id="DEVICE_NAME">%1$s</xliff:g>."</string>
+ <string name="bluetooth_pairing_will_share_phonebook" msgid="4982239145676394429">"Uparivanje odobrava pristup kontaktima i historiji poziva kada je uspostavljeno."</string>
+ <string name="bluetooth_pairing_error_message" msgid="3748157733635947087">"Nije moguće upariti s uređajem <xliff:g id="DEVICE_NAME">%1$s</xliff:g>."</string>
+ <string name="bluetooth_pairing_pin_error_message" msgid="8337234855188925274">"Nije moguće upariti s uređajem <xliff:g id="DEVICE_NAME">%1$s</xliff:g> zbog pogrešnog PIN-a ili pristupnog koda."</string>
+ <string name="bluetooth_pairing_device_down_error_message" msgid="7870998403045801381">"Nije moguće komunicirati s uređajem <xliff:g id="DEVICE_NAME">%1$s</xliff:g>."</string>
<string name="bluetooth_pairing_rejected_error_message" msgid="1648157108520832454">"Uređaj <xliff:g id="DEVICE_NAME">%1$s</xliff:g> je odbio uparivanje."</string>
<string name="bluetooth_talkback_computer" msgid="4875089335641234463">"Računar"</string>
<string name="bluetooth_talkback_headset" msgid="5140152177885220949">"Slušalice s mikrofonom"</string>
@@ -118,12 +118,12 @@
<string name="bluetooth_hearingaid_right_pairing_message" msgid="1550373802309160891">"Uparivanje desnog slušnog aparata…"</string>
<string name="bluetooth_hearingaid_left_battery_level" msgid="8797811465352097562">"Lijevi - <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%1$s</xliff:g> baterije"</string>
<string name="bluetooth_hearingaid_right_battery_level" msgid="7309476148173459677">"Desni - <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%1$s</xliff:g> baterije"</string>
- <string name="accessibility_wifi_off" msgid="1166761729660614716">"WiFi isključen."</string>
+ <string name="accessibility_wifi_off" msgid="1166761729660614716">"WiFi je isključen."</string>
<string name="accessibility_no_wifi" msgid="8834610636137374508">"WiFi nije povezan."</string>
- <string name="accessibility_wifi_one_bar" msgid="4869376278894301820">"WiFi jedna crtica."</string>
- <string name="accessibility_wifi_two_bars" msgid="3569851234710034416">"WiFi dvije crtice."</string>
- <string name="accessibility_wifi_three_bars" msgid="8134185644861380311">"WiFi tri crtice."</string>
- <string name="accessibility_wifi_signal_full" msgid="7061045677694702">"WiFi puni signal."</string>
+ <string name="accessibility_wifi_one_bar" msgid="4869376278894301820">"WiFi signal ima jednu crtu."</string>
+ <string name="accessibility_wifi_two_bars" msgid="3569851234710034416">"WiFi signal ima dvije crte."</string>
+ <string name="accessibility_wifi_three_bars" msgid="8134185644861380311">"WiFi signal ima tri crte."</string>
+ <string name="accessibility_wifi_signal_full" msgid="7061045677694702">"WiFi signal je pun."</string>
<string name="accessibility_wifi_security_type_none" msgid="1223747559986205423">"Otvorena mreža"</string>
<string name="accessibility_wifi_security_type_secured" msgid="862921720418885331">"Sigurna mreža"</string>
<string name="process_kernel_label" msgid="3916858646836739323">"Android OS"</string>
@@ -132,7 +132,7 @@
<string name="tether_settings_title_usb" msgid="6688416425801386511">"Povezivanje mobitela USB-om"</string>
<string name="tether_settings_title_wifi" msgid="3277144155960302049">"Prijenosna pristupna tačka"</string>
<string name="tether_settings_title_bluetooth" msgid="355855408317564420">"Dijeljenje Bluetooth veze"</string>
- <string name="tether_settings_title_usb_bluetooth" msgid="5355828977109785001">"Dijeljenje veze"</string>
+ <string name="tether_settings_title_usb_bluetooth" msgid="5355828977109785001">"Povezivanje putem mobitela"</string>
<string name="tether_settings_title_all" msgid="8356136101061143841">"Povezivanje putem mobitela i prijenosna pristupna tačka"</string>
<string name="managed_user_title" msgid="8109605045406748842">"Sve radne aplikacije"</string>
<string name="user_guest" msgid="8475274842845401871">"Gost"</string>
@@ -145,7 +145,7 @@
<string name="tts_default_rate_title" msgid="6030550998379310088">"Brzina govora"</string>
<string name="tts_default_rate_summary" msgid="4061815292287182801">"Brzina kojom se izgovara tekst"</string>
<string name="tts_default_pitch_title" msgid="6135942113172488671">"Visina"</string>
- <string name="tts_default_pitch_summary" msgid="1944885882882650009">"Utječe na ton sintetiziranog govora"</string>
+ <string name="tts_default_pitch_summary" msgid="1944885882882650009">"Utiče na ton sintetiziranog govora"</string>
<string name="tts_default_lang_title" msgid="8018087612299820556">"Jezik"</string>
<string name="tts_lang_use_system" msgid="2679252467416513208">"Korištenje sistemskog jezika"</string>
<string name="tts_lang_not_selected" msgid="7395787019276734765">"Jezik nije izabran"</string>
@@ -187,7 +187,7 @@
<string name="development_settings_summary" msgid="1815795401632854041">"Postavi opcije za razvoj aplikacija"</string>
<string name="development_settings_not_available" msgid="4308569041701535607">"Opcije za programere nisu dostupne za ovog korisnika"</string>
<string name="vpn_settings_not_available" msgid="956841430176985598">"VPN postavke nisu dostupne za ovog korisnika"</string>
- <string name="tethering_settings_not_available" msgid="6765770438438291012">"Postavke za privezivanje nisu dostupne za ovog korisnika"</string>
+ <string name="tethering_settings_not_available" msgid="6765770438438291012">"Postavke za povezivanje putem mobitela nisu dostupne za ovog korisnika"</string>
<string name="apn_settings_not_available" msgid="7873729032165324000">"Postavke za ime pristupne tačke nisu dostupne za ovog korisnika"</string>
<string name="enable_adb" msgid="7982306934419797485">"Otklanjanje grešaka putem uređaja spojenog na USB"</string>
<string name="enable_adb_summary" msgid="4881186971746056635">"Način rada za uklanjanje grešaka kada je povezan USB"</string>
@@ -201,7 +201,7 @@
<string name="oem_unlock_enable" msgid="6040763321967327691">"OEM otključavanje"</string>
<string name="oem_unlock_enable_summary" msgid="4720281828891618376">"Dozvoli otključavanje bootloadera"</string>
<string name="confirm_enable_oem_unlock_title" msgid="4802157344812385674">"Želite li dozvoliti OEM otključavanje?"</string>
- <string name="confirm_enable_oem_unlock_text" msgid="5517144575601647022">"UPOZORENJE: Funkcije zaštite ovog uređaja neće funkcionisati dok je ova postavka uključena."</string>
+ <string name="confirm_enable_oem_unlock_text" msgid="5517144575601647022">"UPOZORENJE: Funkcije zaštite ovog uređaja neće funkcionirati dok je ova postavka uključena."</string>
<string name="mock_location_app" msgid="7966220972812881854">"Odaberite aplikaciju za lažne lokacije"</string>
<string name="mock_location_app_not_set" msgid="809543285495344223">"Aplikacija za lažnu lokaciju nije postavljena"</string>
<string name="mock_location_app_set" msgid="8966420655295102685">"Aplikacija za lažne lokacije: <xliff:g id="APP_NAME">%1$s</xliff:g>"</string>
@@ -210,7 +210,7 @@
<string name="wifi_verbose_logging" msgid="4203729756047242344">"Omogući detaljniju evidenciju za WiFi"</string>
<string name="wifi_connected_mac_randomization" msgid="3168165236877957767">"Nasumični odabir MAC adrese pri povezivanju"</string>
<string name="mobile_data_always_on" msgid="8774857027458200434">"Mobilna mreža za prijenos podataka je uvijek aktivna"</string>
- <string name="tethering_hardware_offload" msgid="7470077827090325814">"Hardversko ubrzavanje dijeljenja veze"</string>
+ <string name="tethering_hardware_offload" msgid="7470077827090325814">"Hardversko ubrzavanje za povezivanje putem mobitela"</string>
<string name="bluetooth_show_devices_without_names" msgid="4708446092962060176">"Prikaži Bluetooth uređaje bez naziva"</string>
<string name="bluetooth_disable_absolute_volume" msgid="2660673801947898809">"Onemogući apsolutnu jačinu zvuka"</string>
<string name="bluetooth_select_avrcp_version_string" msgid="3750059931120293633">"Bluetooth AVRCP verzija"</string>
@@ -220,7 +220,7 @@
<string name="bluetooth_select_a2dp_codec_sample_rate" msgid="4788245703824623062">"Brzina uzorkovanja za Bluetooth audio"</string>
<string name="bluetooth_select_a2dp_codec_sample_rate_dialog_title" msgid="8010380028880963535">"Aktivirajte Bluetooth Audio Codec\nOdabir: Brzina uzorkovanja"</string>
<string name="bluetooth_select_a2dp_codec_bits_per_sample" msgid="2099645202720164141">"Bluetooth audio bitovi po uzorku"</string>
- <string name="bluetooth_select_a2dp_codec_bits_per_sample_dialog_title" msgid="8063859754619484760">"Aktivirajte Bluetooth Audio Codec\nOdabir: Bitovi po semplu"</string>
+ <string name="bluetooth_select_a2dp_codec_bits_per_sample_dialog_title" msgid="8063859754619484760">"Aktivirajte Bluetooth Audio Codec\nOdabir: Bitovi po uzorku"</string>
<string name="bluetooth_select_a2dp_codec_channel_mode" msgid="884855779449390540">"Način Bluetooth audio kanala"</string>
<string name="bluetooth_select_a2dp_codec_channel_mode_dialog_title" msgid="7234956835280563341">"Aktivirajte Bluetooth Audio Codec\nOdabir: Način rada po kanalima"</string>
<string name="bluetooth_select_a2dp_codec_ldac_playback_quality" msgid="3619694372407843405">"Bluetooth Audio LDAC kodek: Kvalitet reprodukcije"</string>
@@ -249,7 +249,7 @@
<string name="allow_mock_location" msgid="2787962564578664888">"Dozvoli lažne lokacije"</string>
<string name="allow_mock_location_summary" msgid="317615105156345626">"Dozvoli lažne lokacije"</string>
<string name="debug_view_attributes" msgid="6485448367803310384">"Omogući pregled atributa prikaza"</string>
- <string name="mobile_data_always_on_summary" msgid="8149773901431697910">"Uvijek drži prijenos podataka na mobilnoj mreži aktivnim, čak i kada je WiFi je aktivan (za brzo prebacivanje između mreža)."</string>
+ <string name="mobile_data_always_on_summary" msgid="8149773901431697910">"Uvijek drži prijenos podataka na mobilnoj mreži aktivnim, čak i kada je WiFi aktivan (za brzo prebacivanje između mreža)."</string>
<string name="tethering_hardware_offload_summary" msgid="7726082075333346982">"Koristi hardversko ubrzavanje dijeljenja veze, ako je dostupno"</string>
<string name="adb_warning_title" msgid="6234463310896563253">"Omogućiti otklanjanje grešaka putem uređaja spojenog na USB?"</string>
<string name="adb_warning_message" msgid="7316799925425402244">"Otklanjanje grešaka putem uređaja spojenog na USB je namijenjeno samo u svrhe razvoja aplikacija. Koristite ga za kopiranje podataka između računara i uređaja, instaliranje aplikacija na uređaj bez obavještenja te čitanje podataka iz zapisnika."</string>
@@ -277,7 +277,7 @@
<string name="debug_hw_drawing_category" msgid="6220174216912308658">"Prikaz s hardverskom akceleracijom"</string>
<string name="media_category" msgid="4388305075496848353">"Mediji"</string>
<string name="debug_monitoring_category" msgid="7640508148375798343">"Praćenje"</string>
- <string name="strict_mode" msgid="1938795874357830695">"Omogućen strogi režim"</string>
+ <string name="strict_mode" msgid="1938795874357830695">"Omogućen strogi način rada"</string>
<string name="strict_mode_summary" msgid="142834318897332338">"Prikaži ekran uz treptanje kada aplikacije vrše duge operacije u glavnoj niti"</string>
<string name="pointer_location" msgid="6084434787496938001">"Lokacija pokazivača"</string>
<string name="pointer_location_summary" msgid="840819275172753713">"Trenutni podaci o dodirivanju prikazuju se u nadsloju preko ekrana"</string>
@@ -298,8 +298,8 @@
<string name="usb_audio_disable_routing_summary" msgid="980282760277312264">"Onemogući autom. usmjerav. na USB audio periferije"</string>
<string name="debug_layout" msgid="5981361776594526155">"Prikaži granice rasporeda"</string>
<string name="debug_layout_summary" msgid="2001775315258637682">"Prikaži granice isječka, margine itd."</string>
- <string name="force_rtl_layout_all_locales" msgid="2259906643093138978">"Prisilno postavi raspored s desna u lijevo"</string>
- <string name="force_rtl_layout_all_locales_summary" msgid="9192797796616132534">"Prisilno postavi raspored ekrana s desna u lijevo za sve regije"</string>
+ <string name="force_rtl_layout_all_locales" msgid="2259906643093138978">"Prisilno postavi raspored s desna ulijevo"</string>
+ <string name="force_rtl_layout_all_locales_summary" msgid="9192797796616132534">"Prisilno postavi raspored ekrana s desna ulijevo za sve regije"</string>
<string name="force_msaa" msgid="7920323238677284387">"Prinudno primijeni 4x MSAA"</string>
<string name="force_msaa_summary" msgid="9123553203895817537">"Omogući 4x MSAA u OpenGL ES 2.0 aplikacijama"</string>
<string name="show_non_rect_clip" msgid="505954950474595172">"Ispravi greške na nepravougaonim operacijama isjecanja"</string>
@@ -321,19 +321,19 @@
<string name="force_allow_on_external" msgid="3215759785081916381">"Nametni aplikacije na vanjskoj pohrani"</string>
<string name="force_allow_on_external_summary" msgid="3640752408258034689">"Omogućava upisivanje svih aplikacija u vanjsku pohranu, bez obzira na prikazane vrijednosti"</string>
<string name="force_resizable_activities" msgid="8615764378147824985">"Nametni aktivnostima mijenjanje veličina"</string>
- <string name="force_resizable_activities_summary" msgid="6667493494706124459">"Omogući mijenjanje veličine svih aktivnosti za prikaz sa više prozora, bez obzira na prikazane vrijednosti."</string>
+ <string name="force_resizable_activities_summary" msgid="6667493494706124459">"Omogući mijenjanje veličine svih aktivnosti za prikaz s više prozora, bez obzira na prikazane vrijednosti."</string>
<string name="enable_freeform_support" msgid="1461893351278940416">"Omogući prozore nepravilnih oblika"</string>
<string name="enable_freeform_support_summary" msgid="8247310463288834487">"Omogući podršku za eksperimentalne prozore nepravilnih oblika."</string>
<string name="local_backup_password_title" msgid="3860471654439418822">"Lozinka za sigurnosnu kopiju radne površine"</string>
<string name="local_backup_password_summary_none" msgid="6951095485537767956">"Potpune sigurnosne kopije za računare trenutno nisu zaštićene"</string>
- <string name="local_backup_password_summary_change" msgid="5376206246809190364">"Dodirnite da promijenite ili uklonite lozinku za potpune rezervne kopije sa radne površine"</string>
- <string name="local_backup_password_toast_success" msgid="582016086228434290">"Nova lozinka za sigurnosnu kopiju postavljena"</string>
+ <string name="local_backup_password_summary_change" msgid="5376206246809190364">"Dodirnite da promijenite ili uklonite lozinku za potpune rezervne kopije s radne površine"</string>
+ <string name="local_backup_password_toast_success" msgid="582016086228434290">"Nova lozinka za sigurnosnu kopiju je postavljena"</string>
<string name="local_backup_password_toast_confirmation_mismatch" msgid="7805892532752708288">"Nova lozinka i potvrda se ne podudaraju"</string>
<string name="local_backup_password_toast_validation_failure" msgid="5646377234895626531">"Nije uspjelo postavljanje lozinke za sigurnosnu kopiju"</string>
<string-array name="color_mode_names">
- <item msgid="2425514299220523812">"Živopisan (zadano)"</item>
+ <item msgid="2425514299220523812">"Živopisno (zadano)"</item>
<item msgid="8446070607501413455">"Prirodan"</item>
- <item msgid="6553408765810699025">"Standardni"</item>
+ <item msgid="6553408765810699025">"Standardno"</item>
</string-array>
<string-array name="color_mode_descriptions">
<item msgid="4979629397075120893">"Unaprijeđene boje"</item>
@@ -353,9 +353,9 @@
<string name="convert_to_file_encryption_enabled" msgid="2861258671151428346">"Pretvaranje…"</string>
<string name="convert_to_file_encryption_done" msgid="7859766358000523953">"Fajl je već šifriran"</string>
<string name="title_convert_fbe" msgid="1263622876196444453">"Pretvaranje u šifrirane fajlove"</string>
- <string name="convert_to_fbe_warning" msgid="6139067817148865527">"Pretvorite particiju sa podacima u particiju šifriranu sistemom fajlova.\n !! Upozorenje!! Ovo će izbrisati sve vaše podatke.\n Ova funkcija je u alfa fazi razvoja i možda neće ispravno raditi.\n Pritisnite \"Obriši i pretvori…\" da nastavite."</string>
+ <string name="convert_to_fbe_warning" msgid="6139067817148865527">"Pretvorite particiju s podacima u particiju šifriranu sistemom fajlova.\n !! Upozorenje!! Ovo će izbrisati sve vaše podatke.\n Ova funkcija je u alfa fazi razvoja i možda neće ispravno raditi.\n Pritisnite \"Obriši i pretvori…\" da nastavite."</string>
<string name="button_convert_fbe" msgid="5152671181309826405">"Obriši i pretvori…"</string>
- <string name="picture_color_mode" msgid="4560755008730283695">"Režim boja Slika"</string>
+ <string name="picture_color_mode" msgid="4560755008730283695">"Način rada boja slika"</string>
<string name="picture_color_mode_desc" msgid="1141891467675548590">"Koristi sRGB"</string>
<string name="daltonizer_mode_disabled" msgid="7482661936053801862">"Onemogućeno"</string>
<string name="daltonizer_mode_monochromacy" msgid="8485709880666106721">"Crno-bijelo"</string>
@@ -422,8 +422,8 @@
<string name="retail_demo_reset_title" msgid="696589204029930100">"Potrebna je lozinka"</string>
<string name="active_input_method_subtypes" msgid="3596398805424733238">"Aktivne metode unosa"</string>
<string name="use_system_language_to_select_input_method_subtypes" msgid="5747329075020379587">"Koristi jezik sistema"</string>
- <string name="failed_to_open_app_settings_toast" msgid="1251067459298072462">"Nije uspjelo otvaranje postavki za <xliff:g id="SPELL_APPLICATION_NAME">%1$s</xliff:g>"</string>
- <string name="ime_security_warning" msgid="4135828934735934248">"Ovaj način unosa može prikupiti sav tekst koji otkucate, uključujući lične podatke kao što su lozinke i brojevi kreditnih kartica. Način omogućava aplikacija <xliff:g id="IME_APPLICATION_NAME">%1$s</xliff:g>. Da li želite koristiti ovaj način unosa?"</string>
+ <string name="failed_to_open_app_settings_toast" msgid="1251067459298072462">"Otvaranje postavki za <xliff:g id="SPELL_APPLICATION_NAME">%1$s</xliff:g> nije uspjelo"</string>
+ <string name="ime_security_warning" msgid="4135828934735934248">"Ovaj način unosa može prikupiti sav tekst koji upišete, uključujući lične podatke kao što su lozinke i brojevi kreditnih kartica. Način omogućava aplikacija <xliff:g id="IME_APPLICATION_NAME">%1$s</xliff:g>. Da li želite koristiti ovaj način unosa?"</string>
<string name="direct_boot_unaware_dialog_message" msgid="7870273558547549125">"Napomena: Nakon ponovnog pokretanja, ova aplikacija se neće moći pokrenuti dok ne otključate telefon"</string>
<string name="ims_reg_title" msgid="7609782759207241443">"Stanje IMS registracije"</string>
<string name="ims_reg_status_registered" msgid="933003316932739188">"Registrirano"</string>
diff --git a/packages/SettingsLib/res/values-es/strings.xml b/packages/SettingsLib/res/values-es/strings.xml
index e9b07a49355d..f04767b72b78 100644
--- a/packages/SettingsLib/res/values-es/strings.xml
+++ b/packages/SettingsLib/res/values-es/strings.xml
@@ -217,8 +217,8 @@
<string name="bluetooth_select_avrcp_version_dialog_title" msgid="7277329668298705702">"Selecciona la versión AVRCP del Bluetooth"</string>
<string name="bluetooth_select_a2dp_codec_type" msgid="90597356942154882">"Códec de audio de Bluetooth"</string>
<string name="bluetooth_select_a2dp_codec_type_dialog_title" msgid="8436224899475822557">"Activar el códec de audio por Bluetooth\nSelección"</string>
- <string name="bluetooth_select_a2dp_codec_sample_rate" msgid="4788245703824623062">"Porcentaje de muestreo de audio por Bluetooth"</string>
- <string name="bluetooth_select_a2dp_codec_sample_rate_dialog_title" msgid="8010380028880963535">"Activar el códec de audio por Bluetooth\nSelección: porcentaje de muestreo"</string>
+ <string name="bluetooth_select_a2dp_codec_sample_rate" msgid="4788245703824623062">"Frecuencia de muestreo de audio por Bluetooth"</string>
+ <string name="bluetooth_select_a2dp_codec_sample_rate_dialog_title" msgid="8010380028880963535">"Activar el códec de audio por Bluetooth\nSelección: frecuencia de muestreo"</string>
<string name="bluetooth_select_a2dp_codec_bits_per_sample" msgid="2099645202720164141">"Bits por muestra del audio Bluetooth"</string>
<string name="bluetooth_select_a2dp_codec_bits_per_sample_dialog_title" msgid="8063859754619484760">"Activar el códec de audio por Bluetooth\nSelección: bits por muestra"</string>
<string name="bluetooth_select_a2dp_codec_channel_mode" msgid="884855779449390540">"Modo de canal de audio por Bluetooth"</string>
@@ -238,7 +238,7 @@
<string name="wifi_connected_mac_randomization_summary" msgid="1743059848752201485">"Ordenar las direcciones MAC de forma aleatoria al conectarse a redes Wi‑Fi"</string>
<string name="wifi_metered_label" msgid="4514924227256839725">"Medida"</string>
<string name="wifi_unmetered_label" msgid="6124098729457992931">"No medida"</string>
- <string name="select_logd_size_title" msgid="7433137108348553508">"Tamaños de búfer de registrador"</string>
+ <string name="select_logd_size_title" msgid="7433137108348553508">"Tamaños del búfer para registrar"</string>
<string name="select_logd_size_dialog_title" msgid="1206769310236476760">"Elige el tamaño del Logger por búfer"</string>
<string name="dev_logpersist_clear_warning_title" msgid="684806692440237967">"¿Borrar almacenamiento continuo del registrador?"</string>
<string name="dev_logpersist_clear_warning_message" msgid="2256582531342994562">"Cuando ya no supervisamos la actividad con el registrador de forma continua, estamos obligados a borrar los datos del registrador almacenados en el dispositivo."</string>
diff --git a/packages/SettingsLib/res/values-fa/strings.xml b/packages/SettingsLib/res/values-fa/strings.xml
index 7dfd429f0646..447ce3cf6172 100644
--- a/packages/SettingsLib/res/values-fa/strings.xml
+++ b/packages/SettingsLib/res/values-fa/strings.xml
@@ -159,7 +159,7 @@
<string name="tts_default_sample_string" msgid="4040835213373086322">"این نمونه‌ای از ترکیب گفتار است"</string>
<string name="tts_status_title" msgid="7268566550242584413">"وضعیت زبان پیش‌فرض"</string>
<string name="tts_status_ok" msgid="1309762510278029765">"<xliff:g id="LOCALE">%1$s</xliff:g> کاملاً پشتیبانی می‌شود"</string>
- <string name="tts_status_requires_network" msgid="6042500821503226892">"<xliff:g id="LOCALE">%1$s</xliff:g> به اتصال شبکه نیاز دارد"</string>
+ <string name="tts_status_requires_network" msgid="6042500821503226892">"<xliff:g id="LOCALE">%1$s</xliff:g> باید اتصال شبکه داشته باشد"</string>
<string name="tts_status_not_supported" msgid="4491154212762472495">"<xliff:g id="LOCALE">%1$s</xliff:g> پشتیبانی نمی‌شود"</string>
<string name="tts_status_checking" msgid="5339150797940483592">"در حال بررسی…"</string>
<string name="tts_engine_settings_title" msgid="3499112142425680334">"تنظیمات برای <xliff:g id="TTS_ENGINE_NAME">%s</xliff:g>"</string>
diff --git a/packages/SettingsLib/res/values-gl/arrays.xml b/packages/SettingsLib/res/values-gl/arrays.xml
index c6c4a2ef2ff3..f8a69c210d80 100644
--- a/packages/SettingsLib/res/values-gl/arrays.xml
+++ b/packages/SettingsLib/res/values-gl/arrays.xml
@@ -207,12 +207,12 @@
</string-array>
<string-array name="overlay_display_devices_entries">
<item msgid="1606809880904982133">"Ningunha"</item>
- <item msgid="9033194758688161545">"480 p"</item>
- <item msgid="1025306206556583600">"480 p (seguro)"</item>
+ <item msgid="9033194758688161545">"480p"</item>
+ <item msgid="1025306206556583600">"480p (seguro)"</item>
<item msgid="1853913333042744661">"720p"</item>
<item msgid="3414540279805870511">"720p (seguro)"</item>
- <item msgid="9039818062847141551">"1080 p"</item>
- <item msgid="4939496949750174834">"1080 p (seguro)"</item>
+ <item msgid="9039818062847141551">"1080p"</item>
+ <item msgid="4939496949750174834">"1080p (seguro)"</item>
<item msgid="1833612718524903568">"4K"</item>
<item msgid="238303513127879234">"4K (seguro)"</item>
<item msgid="3547211260846843098">"4K (mellorado)"</item>
diff --git a/packages/SettingsLib/res/values-gl/strings.xml b/packages/SettingsLib/res/values-gl/strings.xml
index 4f26f6afea25..3e55dc3f93bc 100644
--- a/packages/SettingsLib/res/values-gl/strings.xml
+++ b/packages/SettingsLib/res/values-gl/strings.xml
@@ -110,7 +110,7 @@
<string name="bluetooth_talkback_computer" msgid="4875089335641234463">"Ordenador"</string>
<string name="bluetooth_talkback_headset" msgid="5140152177885220949">"Auriculares con micrófono"</string>
<string name="bluetooth_talkback_phone" msgid="4260255181240622896">"Teléfono"</string>
- <string name="bluetooth_talkback_imaging" msgid="551146170554589119">"Imaxes"</string>
+ <string name="bluetooth_talkback_imaging" msgid="551146170554589119">"Dispositivo de imaxe"</string>
<string name="bluetooth_talkback_headphone" msgid="26580326066627664">"Auriculares"</string>
<string name="bluetooth_talkback_input_peripheral" msgid="5165842622743212268">"Periférico de entrada"</string>
<string name="bluetooth_talkback_bluetooth" msgid="5615463912185280812">"Bluetooth"</string>
@@ -213,8 +213,8 @@
<string name="tethering_hardware_offload" msgid="7470077827090325814">"Aceleración de hardware para conexión compartida"</string>
<string name="bluetooth_show_devices_without_names" msgid="4708446092962060176">"Mostrar dispositivos Bluetooth sen nomes"</string>
<string name="bluetooth_disable_absolute_volume" msgid="2660673801947898809">"Desactivar volume absoluto"</string>
- <string name="bluetooth_select_avrcp_version_string" msgid="3750059931120293633">"Versión AVRCP de Bluetooth"</string>
- <string name="bluetooth_select_avrcp_version_dialog_title" msgid="7277329668298705702">"Selecciona a versión AVRCP de Bluetooth"</string>
+ <string name="bluetooth_select_avrcp_version_string" msgid="3750059931120293633">"Versión de Bluetooth AVRCP"</string>
+ <string name="bluetooth_select_avrcp_version_dialog_title" msgid="7277329668298705702">"Selecciona a versión de Bluetooth AVRCP"</string>
<string name="bluetooth_select_a2dp_codec_type" msgid="90597356942154882">"Códec de audio por Bluetooth"</string>
<string name="bluetooth_select_a2dp_codec_type_dialog_title" msgid="8436224899475822557">"Activar códec de audio por Bluetooth\nSelección"</string>
<string name="bluetooth_select_a2dp_codec_sample_rate" msgid="4788245703824623062">"Taxa de mostraxe de audio por Bluetooth"</string>
@@ -353,8 +353,8 @@
<string name="convert_to_file_encryption_enabled" msgid="2861258671151428346">"Converter..."</string>
<string name="convert_to_file_encryption_done" msgid="7859766358000523953">"Xa se encriptou o ficheiro"</string>
<string name="title_convert_fbe" msgid="1263622876196444453">"Convertendo no encriptado baseado en ficheiros"</string>
- <string name="convert_to_fbe_warning" msgid="6139067817148865527">"Converte a partición de datos nunha encriptación baseada en ficheiros.\n Advertencia: Esta acción borrará todos os datos.\n Esta función é alfa e quizais non funcione correctamente.\n Para continuar, toca Limpar e converter..."</string>
- <string name="button_convert_fbe" msgid="5152671181309826405">"Limpar e converter..."</string>
+ <string name="convert_to_fbe_warning" msgid="6139067817148865527">"Converte a partición de datos nunha encriptación baseada en ficheiros.\n Advertencia: Esta acción borrará todos os datos.\n Esta función é alfa e quizais non funcione correctamente.\n Para continuar, toca Borrar e converter..."</string>
+ <string name="button_convert_fbe" msgid="5152671181309826405">"Borrar e converter..."</string>
<string name="picture_color_mode" msgid="4560755008730283695">"Modo de cor da imaxe"</string>
<string name="picture_color_mode_desc" msgid="1141891467675548590">"Utiliza sRGB"</string>
<string name="daltonizer_mode_disabled" msgid="7482661936053801862">"Desactivado"</string>
diff --git a/packages/SettingsLib/res/values-ja/strings.xml b/packages/SettingsLib/res/values-ja/strings.xml
index 2c43d339bdac..b2a6bd003f06 100644
--- a/packages/SettingsLib/res/values-ja/strings.xml
+++ b/packages/SettingsLib/res/values-ja/strings.xml
@@ -141,7 +141,7 @@
<string name="launch_defaults_some" msgid="313159469856372621">"一部デフォルトで設定"</string>
<string name="launch_defaults_none" msgid="4241129108140034876">"デフォルトの設定なし"</string>
<string name="tts_settings" msgid="8186971894801348327">"テキスト読み上げの設定"</string>
- <string name="tts_settings_title" msgid="1237820681016639683">"テキスト読み上げの出力"</string>
+ <string name="tts_settings_title" msgid="1237820681016639683">"テキスト読み上げの設定"</string>
<string name="tts_default_rate_title" msgid="6030550998379310088">"音声の速度"</string>
<string name="tts_default_rate_summary" msgid="4061815292287182801">"テキストの読み上げ速度"</string>
<string name="tts_default_pitch_title" msgid="6135942113172488671">"音の高さ"</string>
diff --git a/packages/SettingsLib/res/values-nb/strings.xml b/packages/SettingsLib/res/values-nb/strings.xml
index 7f9f4a640828..a3293e5ba400 100644
--- a/packages/SettingsLib/res/values-nb/strings.xml
+++ b/packages/SettingsLib/res/values-nb/strings.xml
@@ -307,7 +307,7 @@
<string name="enable_gpu_debug_layers" msgid="3848838293793255097">"Slå på GPU-feilsøkingslag"</string>
<string name="enable_gpu_debug_layers_summary" msgid="8009136940671194940">"Tillat GPU-feilsøkingslag for feilsøkingsapper"</string>
<string name="window_animation_scale_title" msgid="6162587588166114700">"Animasjonsskala for vindu"</string>
- <string name="transition_animation_scale_title" msgid="387527540523595875">"Overgangsanimasjonsskala"</string>
+ <string name="transition_animation_scale_title" msgid="387527540523595875">"Animasjonsskala for overgang"</string>
<string name="animator_duration_scale_title" msgid="3406722410819934083">"Varighetsskala for animasjon"</string>
<string name="overlay_display_devices_title" msgid="5364176287998398539">"Simulering av sekundærskjermer"</string>
<string name="debug_applications_category" msgid="4206913653849771549">"Apper"</string>
diff --git a/packages/SettingsLib/res/values-pl/strings.xml b/packages/SettingsLib/res/values-pl/strings.xml
index 7ec97b568a9a..e472b15c92f2 100644
--- a/packages/SettingsLib/res/values-pl/strings.xml
+++ b/packages/SettingsLib/res/values-pl/strings.xml
@@ -194,7 +194,7 @@
<string name="clear_adb_keys" msgid="4038889221503122743">"Odwołaj dostęp do debugowania USB"</string>
<string name="bugreport_in_power" msgid="7923901846375587241">"Skrót do zgłoszenia błędu"</string>
<string name="bugreport_in_power_summary" msgid="1778455732762984579">"Pokaż w menu zasilania przycisk zgłaszania błędu"</string>
- <string name="keep_screen_on" msgid="1146389631208760344">"Pozostaw ekran włączony"</string>
+ <string name="keep_screen_on" msgid="1146389631208760344">"Pozostaw włączony ekran"</string>
<string name="keep_screen_on_summary" msgid="2173114350754293009">"Ekran nie będzie gaszony podczas ładowania telefonu"</string>
<string name="bt_hci_snoop_log" msgid="3340699311158865670">"Włącz dziennik snoop Bluetooth HCI"</string>
<string name="bt_hci_snoop_log_summary" msgid="366083475849911315">"Przechwyć wszystkie pakiety Bluetooth HCI do pliku (przełącz Bluetooth po zmianie tego ustawienia)"</string>
diff --git a/packages/SettingsLib/res/values-pt-rBR/arrays.xml b/packages/SettingsLib/res/values-pt-rBR/arrays.xml
index dfdc09c2cb1b..563698a42da8 100644
--- a/packages/SettingsLib/res/values-pt-rBR/arrays.xml
+++ b/packages/SettingsLib/res/values-pt-rBR/arrays.xml
@@ -160,11 +160,11 @@
</string-array>
<string-array name="select_logd_size_summaries">
<item msgid="6921048829791179331">"Desativado"</item>
- <item msgid="2969458029344750262">"64 K/buffer de log"</item>
- <item msgid="1342285115665698168">"256 K/buffer de log"</item>
- <item msgid="1314234299552254621">"1 M/buffer de log"</item>
- <item msgid="3606047780792894151">"4 M/buffer de log"</item>
- <item msgid="5431354956856655120">"16 M/buffer de log"</item>
+ <item msgid="2969458029344750262">"64 K/buffer de registro"</item>
+ <item msgid="1342285115665698168">"256 K/buffer de registro"</item>
+ <item msgid="1314234299552254621">"1 M/buffer de registro"</item>
+ <item msgid="3606047780792894151">"4 M/buffer de registro"</item>
+ <item msgid="5431354956856655120">"16 M/buffer de registro"</item>
</string-array>
<string-array name="select_logpersist_titles">
<item msgid="1744840221860799971">"Desativado"</item>
diff --git a/packages/SettingsLib/res/values-pt-rBR/strings.xml b/packages/SettingsLib/res/values-pt-rBR/strings.xml
index dd623d0c5f64..98b877bee5e7 100644
--- a/packages/SettingsLib/res/values-pt-rBR/strings.xml
+++ b/packages/SettingsLib/res/values-pt-rBR/strings.xml
@@ -196,7 +196,7 @@
<string name="bugreport_in_power_summary" msgid="1778455732762984579">"Mostrar um botão para gerar relatórios de bugs no menu do botão liga/desliga"</string>
<string name="keep_screen_on" msgid="1146389631208760344">"Permanecer ativo"</string>
<string name="keep_screen_on_summary" msgid="2173114350754293009">"A tela nunca entrará em suspensão enquanto estiver carregando."</string>
- <string name="bt_hci_snoop_log" msgid="3340699311158865670">"Ativar log de rastreamento Bluetooth HCI"</string>
+ <string name="bt_hci_snoop_log" msgid="3340699311158865670">"Ativar registro de rastreamento Bluetooth HCI"</string>
<string name="bt_hci_snoop_log_summary" msgid="366083475849911315">"Capturar todos os pacotes Bluetooth HCI em um arquivo (ative o Bluetooth depois de alterar esta configuração)"</string>
<string name="oem_unlock_enable" msgid="6040763321967327691">"Desbloqueio de OEM"</string>
<string name="oem_unlock_enable_summary" msgid="4720281828891618376">"Permitir que o bootloader seja desbloqueado"</string>
@@ -239,7 +239,7 @@
<string name="wifi_metered_label" msgid="4514924227256839725">"Limitada"</string>
<string name="wifi_unmetered_label" msgid="6124098729457992931">"Ilimitada"</string>
<string name="select_logd_size_title" msgid="7433137108348553508">"Tamanhos de buffer de logger"</string>
- <string name="select_logd_size_dialog_title" msgid="1206769310236476760">"Sel. tam. de logger/buffer de log"</string>
+ <string name="select_logd_size_dialog_title" msgid="1206769310236476760">"Sel. tam. de logger/buffer de registro"</string>
<string name="dev_logpersist_clear_warning_title" msgid="684806692440237967">"Limpar armazenamento de logger constante?"</string>
<string name="dev_logpersist_clear_warning_message" msgid="2256582531342994562">"Quando não estivermos mais monitorando com o logger constante, devemos limpar o residente de dados de logger do seu dispositivo."</string>
<string name="select_logpersist_title" msgid="7530031344550073166">"Armazenar dados de logger constantemente no dispositivo"</string>
diff --git a/packages/SettingsLib/res/values-pt/arrays.xml b/packages/SettingsLib/res/values-pt/arrays.xml
index dfdc09c2cb1b..563698a42da8 100644
--- a/packages/SettingsLib/res/values-pt/arrays.xml
+++ b/packages/SettingsLib/res/values-pt/arrays.xml
@@ -160,11 +160,11 @@
</string-array>
<string-array name="select_logd_size_summaries">
<item msgid="6921048829791179331">"Desativado"</item>
- <item msgid="2969458029344750262">"64 K/buffer de log"</item>
- <item msgid="1342285115665698168">"256 K/buffer de log"</item>
- <item msgid="1314234299552254621">"1 M/buffer de log"</item>
- <item msgid="3606047780792894151">"4 M/buffer de log"</item>
- <item msgid="5431354956856655120">"16 M/buffer de log"</item>
+ <item msgid="2969458029344750262">"64 K/buffer de registro"</item>
+ <item msgid="1342285115665698168">"256 K/buffer de registro"</item>
+ <item msgid="1314234299552254621">"1 M/buffer de registro"</item>
+ <item msgid="3606047780792894151">"4 M/buffer de registro"</item>
+ <item msgid="5431354956856655120">"16 M/buffer de registro"</item>
</string-array>
<string-array name="select_logpersist_titles">
<item msgid="1744840221860799971">"Desativado"</item>
diff --git a/packages/SettingsLib/res/values-pt/strings.xml b/packages/SettingsLib/res/values-pt/strings.xml
index dd623d0c5f64..98b877bee5e7 100644
--- a/packages/SettingsLib/res/values-pt/strings.xml
+++ b/packages/SettingsLib/res/values-pt/strings.xml
@@ -196,7 +196,7 @@
<string name="bugreport_in_power_summary" msgid="1778455732762984579">"Mostrar um botão para gerar relatórios de bugs no menu do botão liga/desliga"</string>
<string name="keep_screen_on" msgid="1146389631208760344">"Permanecer ativo"</string>
<string name="keep_screen_on_summary" msgid="2173114350754293009">"A tela nunca entrará em suspensão enquanto estiver carregando."</string>
- <string name="bt_hci_snoop_log" msgid="3340699311158865670">"Ativar log de rastreamento Bluetooth HCI"</string>
+ <string name="bt_hci_snoop_log" msgid="3340699311158865670">"Ativar registro de rastreamento Bluetooth HCI"</string>
<string name="bt_hci_snoop_log_summary" msgid="366083475849911315">"Capturar todos os pacotes Bluetooth HCI em um arquivo (ative o Bluetooth depois de alterar esta configuração)"</string>
<string name="oem_unlock_enable" msgid="6040763321967327691">"Desbloqueio de OEM"</string>
<string name="oem_unlock_enable_summary" msgid="4720281828891618376">"Permitir que o bootloader seja desbloqueado"</string>
@@ -239,7 +239,7 @@
<string name="wifi_metered_label" msgid="4514924227256839725">"Limitada"</string>
<string name="wifi_unmetered_label" msgid="6124098729457992931">"Ilimitada"</string>
<string name="select_logd_size_title" msgid="7433137108348553508">"Tamanhos de buffer de logger"</string>
- <string name="select_logd_size_dialog_title" msgid="1206769310236476760">"Sel. tam. de logger/buffer de log"</string>
+ <string name="select_logd_size_dialog_title" msgid="1206769310236476760">"Sel. tam. de logger/buffer de registro"</string>
<string name="dev_logpersist_clear_warning_title" msgid="684806692440237967">"Limpar armazenamento de logger constante?"</string>
<string name="dev_logpersist_clear_warning_message" msgid="2256582531342994562">"Quando não estivermos mais monitorando com o logger constante, devemos limpar o residente de dados de logger do seu dispositivo."</string>
<string name="select_logpersist_title" msgid="7530031344550073166">"Armazenar dados de logger constantemente no dispositivo"</string>
diff --git a/packages/SystemUI/res-keyguard/values/strings.xml b/packages/SystemUI/res-keyguard/values/strings.xml
index 721e9c56965d..1d5aa6d76991 100644
--- a/packages/SystemUI/res-keyguard/values/strings.xml
+++ b/packages/SystemUI/res-keyguard/values/strings.xml
@@ -62,7 +62,7 @@
<!-- When the lock screen is showing, the phone is plugged in and the battery is fully
charged, say that it is charged. -->
- <string name="keyguard_charged">Charged</string>
+ <string name="keyguard_charged">Fully charged</string>
<!-- When the lock screen is showing and the phone plugged in, and the battery
is not fully charged, say that it's charging. -->
diff --git a/packages/overlays/SysuiDarkThemeOverlay/res/color/qs_detail_progress_track.xml b/packages/SystemUI/res/color-night/qs_detail_progress_track.xml
index c56382e6047f..c56382e6047f 100644
--- a/packages/overlays/SysuiDarkThemeOverlay/res/color/qs_detail_progress_track.xml
+++ b/packages/SystemUI/res/color-night/qs_detail_progress_track.xml
diff --git a/packages/SystemUI/res/values/styles.xml b/packages/SystemUI/res/values/styles.xml
index 988a51665316..f8670485caf7 100644
--- a/packages/SystemUI/res/values/styles.xml
+++ b/packages/SystemUI/res/values/styles.xml
@@ -335,10 +335,7 @@
<item name="*android:errorColor">?android:attr/colorError</item>
</style>
- <!-- Overlay manager may replace this theme -->
- <style name="qs_base" parent="@*android:style/Theme.DeviceDefault.QuickSettings" />
-
- <style name="qs_theme" parent="qs_base">
+ <style name="qs_theme" parent="@*android:style/Theme.DeviceDefault.QuickSettings">
<item name="lightIconTheme">@style/QSIconTheme</item>
<item name="darkIconTheme">@style/QSIconTheme</item>
<item name="android:windowIsFloating">true</item>
@@ -501,7 +498,7 @@
parent="@*android:style/TextAppearance.Material.Notification.Info">
</style>
- <style name="edit_theme" parent="qs_base">
+ <style name="edit_theme" parent="qs_theme">
<item name="android:colorBackground">?android:attr/colorSecondary</item>
</style>
diff --git a/packages/SystemUI/src/com/android/systemui/AutoReinflateContainer.java b/packages/SystemUI/src/com/android/systemui/AutoReinflateContainer.java
index 01b42545a8cf..bbc8ecdcc066 100644
--- a/packages/SystemUI/src/com/android/systemui/AutoReinflateContainer.java
+++ b/packages/SystemUI/src/com/android/systemui/AutoReinflateContainer.java
@@ -92,6 +92,11 @@ public class AutoReinflateContainer extends FrameLayout implements
}
@Override
+ public void onUiModeChanged() {
+ inflateLayout();
+ }
+
+ @Override
public void onLocaleListChanged() {
inflateLayout();
}
diff --git a/packages/SystemUI/src/com/android/systemui/HardwareUiLayout.java b/packages/SystemUI/src/com/android/systemui/HardwareUiLayout.java
index 7742c5503f28..198a4e6cedb8 100644
--- a/packages/SystemUI/src/com/android/systemui/HardwareUiLayout.java
+++ b/packages/SystemUI/src/com/android/systemui/HardwareUiLayout.java
@@ -28,6 +28,7 @@ import android.view.ViewGroup;
import android.view.ViewOutlineProvider;
import android.view.ViewTreeObserver;
import android.widget.LinearLayout;
+
import com.android.systemui.tuner.TunerService;
import com.android.systemui.tuner.TunerService.Tunable;
import com.android.systemui.util.leak.RotationUtils;
@@ -41,14 +42,15 @@ public class HardwareUiLayout extends LinearLayout implements Tunable {
private static final String EDGE_BLEED = "sysui_hwui_edge_bleed";
private static final String ROUNDED_DIVIDER = "sysui_hwui_rounded_divider";
private final int[] mTmp2 = new int[2];
- private View mChild;
+ private View mList;
private View mSeparatedView;
private int mOldHeight;
private boolean mAnimating;
private AnimatorSet mAnimation;
private View mDivision;
private boolean mHasOutsideTouch;
- private HardwareBgDrawable mBackground;
+ private HardwareBgDrawable mListBackground;
+ private HardwareBgDrawable mSeparatedViewBackground;
private Animator mAnimator;
private boolean mCollapse;
private boolean mHasSeparatedButton;
@@ -90,17 +92,19 @@ public class HardwareUiLayout extends LinearLayout implements Tunable {
mRoundedDivider = Settings.Secure.getInt(getContext().getContentResolver(),
ROUNDED_DIVIDER, 0) != 0;
updateEdgeMargin(mEdgeBleed ? 0 : getEdgePadding());
- mBackground = new HardwareBgDrawable(mRoundedDivider, !mEdgeBleed, getContext());
- if (mChild != null) {
- mChild.setBackground(mBackground);
- mSeparatedView.setBackground(mBackground);
+ mListBackground = new HardwareBgDrawable(mRoundedDivider, !mEdgeBleed, getContext());
+ mSeparatedViewBackground = new HardwareBgDrawable(mRoundedDivider, !mEdgeBleed,
+ getContext());
+ if (mList != null) {
+ mList.setBackground(mListBackground);
+ mSeparatedView.setBackground(mSeparatedViewBackground);
requestLayout();
}
}
private void updateEdgeMargin(int edge) {
- if (mChild != null) {
- MarginLayoutParams params = (MarginLayoutParams) mChild.getLayoutParams();
+ if (mList != null) {
+ MarginLayoutParams params = (MarginLayoutParams) mList.getLayoutParams();
if (mRotation == ROTATION_LANDSCAPE) {
params.topMargin = edge;
} else if (mRotation == ROTATION_SEASCAPE) {
@@ -108,7 +112,7 @@ public class HardwareUiLayout extends LinearLayout implements Tunable {
} else {
params.rightMargin = edge;
}
- mChild.setLayoutParams(params);
+ mList.setLayoutParams(params);
}
if (mSeparatedView != null) {
@@ -131,15 +135,15 @@ public class HardwareUiLayout extends LinearLayout implements Tunable {
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
- if (mChild == null) {
+ if (mList == null) {
if (getChildCount() != 0) {
- mChild = getChildAt(0);
- mChild.setBackground(mBackground);
+ mList = getChildAt(0);
+ mList.setBackground(mListBackground);
mSeparatedView = getChildAt(1);
- mSeparatedView.setBackground(mBackground);
+ mSeparatedView.setBackground(mSeparatedViewBackground);
updateEdgeMargin(mEdgeBleed ? 0 : getEdgePadding());
- mOldHeight = mChild.getMeasuredHeight();
- mChild.addOnLayoutChangeListener(
+ mOldHeight = mList.getMeasuredHeight();
+ mList.addOnLayoutChangeListener(
(v, left, top, right, bottom, oldLeft, oldTop, oldRight, oldBottom) ->
updatePosition());
updateRotation();
@@ -147,7 +151,7 @@ public class HardwareUiLayout extends LinearLayout implements Tunable {
return;
}
}
- int newHeight = mChild.getMeasuredHeight();
+ int newHeight = mList.getMeasuredHeight();
if (newHeight != mOldHeight) {
animateChild(mOldHeight, newHeight);
}
@@ -196,27 +200,29 @@ public class HardwareUiLayout extends LinearLayout implements Tunable {
}
}
if (to != ROTATION_NONE) {
- if (mChild instanceof LinearLayout) {
+ if (mList instanceof LinearLayout) {
mRotatedBackground = true;
- mBackground.setRotatedBackground(true);
- LinearLayout linearLayout = (LinearLayout) mChild;
+ mListBackground.setRotatedBackground(true);
+ mSeparatedViewBackground.setRotatedBackground(true);
+ LinearLayout linearLayout = (LinearLayout) mList;
if (mSwapOrientation) {
linearLayout.setOrientation(LinearLayout.HORIZONTAL);
setOrientation(LinearLayout.HORIZONTAL);
}
- swapDimens(mChild);
+ swapDimens(mList);
swapDimens(mSeparatedView);
}
} else {
- if (mChild instanceof LinearLayout) {
+ if (mList instanceof LinearLayout) {
mRotatedBackground = false;
- mBackground.setRotatedBackground(false);
- LinearLayout linearLayout = (LinearLayout) mChild;
+ mListBackground.setRotatedBackground(false);
+ mSeparatedViewBackground.setRotatedBackground(false);
+ LinearLayout linearLayout = (LinearLayout) mList;
if (mSwapOrientation) {
linearLayout.setOrientation(LinearLayout.VERTICAL);
setOrientation(LinearLayout.VERTICAL);
}
- swapDimens(mChild);
+ swapDimens(mList);
swapDimens(mSeparatedView);
}
}
@@ -224,12 +230,12 @@ public class HardwareUiLayout extends LinearLayout implements Tunable {
private void rotateRight() {
rotateRight(this);
- rotateRight(mChild);
+ rotateRight(mList);
swapDimens(this);
- LayoutParams p = (LayoutParams) mChild.getLayoutParams();
+ LayoutParams p = (LayoutParams) mList.getLayoutParams();
p.gravity = rotateGravityRight(p.gravity);
- mChild.setLayoutParams(p);
+ mList.setLayoutParams(p);
LayoutParams separatedViewLayoutParams = (LayoutParams) mSeparatedView.getLayoutParams();
separatedViewLayoutParams.gravity = rotateGravityRight(separatedViewLayoutParams.gravity);
@@ -282,12 +288,12 @@ public class HardwareUiLayout extends LinearLayout implements Tunable {
private void rotateLeft() {
rotateLeft(this);
- rotateLeft(mChild);
+ rotateLeft(mList);
swapDimens(this);
- LayoutParams p = (LayoutParams) mChild.getLayoutParams();
+ LayoutParams p = (LayoutParams) mList.getLayoutParams();
p.gravity = rotateGravityLeft(p.gravity);
- mChild.setLayoutParams(p);
+ mList.setLayoutParams(p);
LayoutParams separatedViewLayoutParams = (LayoutParams) mSeparatedView.getLayoutParams();
separatedViewLayoutParams.gravity = rotateGravityLeft(separatedViewLayoutParams.gravity);
@@ -379,14 +385,14 @@ public class HardwareUiLayout extends LinearLayout implements Tunable {
mAnimating = false;
}
});
- int fromTop = mChild.getTop();
- int fromBottom = mChild.getBottom();
+ int fromTop = mList.getTop();
+ int fromBottom = mList.getBottom();
int toTop = fromTop - ((newHeight - oldHeight) / 2);
int toBottom = fromBottom + ((newHeight - oldHeight) / 2);
- ObjectAnimator top = ObjectAnimator.ofInt(mChild, "top", fromTop, toTop);
- top.addUpdateListener(animation -> mBackground.invalidateSelf());
+ ObjectAnimator top = ObjectAnimator.ofInt(mList, "top", fromTop, toTop);
+ top.addUpdateListener(animation -> mListBackground.invalidateSelf());
mAnimation.playTogether(top,
- ObjectAnimator.ofInt(mChild, "bottom", fromBottom, toBottom));
+ ObjectAnimator.ofInt(mList, "bottom", fromBottom, toBottom));
}
public void setDivisionView(View v) {
@@ -400,29 +406,30 @@ public class HardwareUiLayout extends LinearLayout implements Tunable {
}
private void updatePosition() {
- if (mChild == null) return;
+ if (mList == null) return;
// If got separated button, setRotatedBackground to false,
// all items won't get white background.
- mBackground.setRotatedBackground(mHasSeparatedButton);
+ mListBackground.setRotatedBackground(mHasSeparatedButton);
+ mSeparatedViewBackground.setRotatedBackground(mHasSeparatedButton);
if (mDivision != null && mDivision.getVisibility() == VISIBLE) {
int index = mRotatedBackground ? 0 : 1;
mDivision.getLocationOnScreen(mTmp2);
float trans = mRotatedBackground ? mDivision.getTranslationX()
: mDivision.getTranslationY();
int viewTop = (int) (mTmp2[index] + trans);
- mChild.getLocationOnScreen(mTmp2);
+ mList.getLocationOnScreen(mTmp2);
viewTop -= mTmp2[index];
setCutPoint(viewTop);
} else {
- setCutPoint(mChild.getMeasuredHeight());
+ setCutPoint(mList.getMeasuredHeight());
}
}
private void setCutPoint(int point) {
- int curPoint = mBackground.getCutPoint();
+ int curPoint = mListBackground.getCutPoint();
if (curPoint == point) return;
if (getAlpha() == 0 || curPoint == 0) {
- mBackground.setCutPoint(point);
+ mListBackground.setCutPoint(point);
return;
}
if (mAnimator != null) {
@@ -432,7 +439,7 @@ public class HardwareUiLayout extends LinearLayout implements Tunable {
mAnimator.cancel();
}
mEndPoint = point;
- mAnimator = ObjectAnimator.ofInt(mBackground, "cutPoint", curPoint, point);
+ mAnimator = ObjectAnimator.ofInt(mListBackground, "cutPoint", curPoint, point);
if (mCollapse) {
mAnimator.setStartDelay(300);
mCollapse = false;
@@ -470,14 +477,14 @@ public class HardwareUiLayout extends LinearLayout implements Tunable {
}
private final ViewTreeObserver.OnComputeInternalInsetsListener mInsetsListener = inoutInfo -> {
- if (mHasOutsideTouch || (mChild == null)) {
+ if (mHasOutsideTouch || (mList == null)) {
inoutInfo.setTouchableInsets(
ViewTreeObserver.InternalInsetsInfo.TOUCHABLE_INSETS_FRAME);
return;
}
inoutInfo.setTouchableInsets(
ViewTreeObserver.InternalInsetsInfo.TOUCHABLE_INSETS_CONTENT);
- inoutInfo.contentInsets.set(mChild.getLeft(), mChild.getTop(),
- 0, getBottom() - mChild.getBottom());
+ inoutInfo.contentInsets.set(mList.getLeft(), mList.getTop(),
+ 0, getBottom() - mList.getBottom());
};
}
diff --git a/packages/SystemUI/src/com/android/systemui/Interpolators.java b/packages/SystemUI/src/com/android/systemui/Interpolators.java
index aeef49689517..eb704c863ebc 100644
--- a/packages/SystemUI/src/com/android/systemui/Interpolators.java
+++ b/packages/SystemUI/src/com/android/systemui/Interpolators.java
@@ -31,6 +31,13 @@ import com.android.systemui.statusbar.stack.HeadsUpAppearInterpolator;
*/
public class Interpolators {
public static final Interpolator FAST_OUT_SLOW_IN = new PathInterpolator(0.4f, 0f, 0.2f, 1f);
+
+ /**
+ * Like {@link #FAST_OUT_SLOW_IN}, but used in case the animation is played in reverse (i.e. t
+ * goes from 1 to 0 instead of 0 to 1).
+ */
+ public static final Interpolator FAST_OUT_SLOW_IN_REVERSE =
+ new PathInterpolator(0.8f, 0f, 0.6f, 1f);
public static final Interpolator FAST_OUT_LINEAR_IN = new PathInterpolator(0.4f, 0f, 1f, 1f);
public static final Interpolator LINEAR_OUT_SLOW_IN = new PathInterpolator(0f, 0f, 0.2f, 1f);
public static final Interpolator ALPHA_IN = new PathInterpolator(0.4f, 0f, 1f, 1f);
@@ -51,4 +58,11 @@ public class Interpolators {
*/
public static final Interpolator TOUCH_RESPONSE =
new PathInterpolator(0.3f, 0f, 0.1f, 1f);
+
+ /**
+ * Like {@link #TOUCH_RESPONSE}, but used in case the animation is played in reverse (i.e. t
+ * goes from 1 to 0 instead of 0 to 1).
+ */
+ public static final Interpolator TOUCH_RESPONSE_REVERSE =
+ new PathInterpolator(0.9f, 0f, 0.7f, 1f);
}
diff --git a/packages/SystemUI/src/com/android/systemui/doze/DozeUi.java b/packages/SystemUI/src/com/android/systemui/doze/DozeUi.java
index f30b0734531f..78632459c867 100644
--- a/packages/SystemUI/src/com/android/systemui/doze/DozeUi.java
+++ b/packages/SystemUI/src/com/android/systemui/doze/DozeUi.java
@@ -33,7 +33,6 @@ import com.android.systemui.util.AlarmTimeout;
import com.android.systemui.util.wakelock.WakeLock;
import java.util.Calendar;
-import java.util.GregorianCalendar;
/**
* The policy controlling doze.
@@ -182,7 +181,7 @@ public class DozeUi implements DozeMachine.Part {
}
private long roundToNextMinute(long timeInMillis) {
- Calendar calendar = GregorianCalendar.getInstance();
+ Calendar calendar = Calendar.getInstance();
calendar.setTimeInMillis(timeInMillis);
calendar.set(Calendar.MILLISECOND, 0);
calendar.set(Calendar.SECOND, 0);
diff --git a/packages/SystemUI/src/com/android/systemui/fragments/FragmentHostManager.java b/packages/SystemUI/src/com/android/systemui/fragments/FragmentHostManager.java
index f422737bb9af..0ed1cd128caa 100644
--- a/packages/SystemUI/src/com/android/systemui/fragments/FragmentHostManager.java
+++ b/packages/SystemUI/src/com/android/systemui/fragments/FragmentHostManager.java
@@ -51,7 +51,8 @@ public class FragmentHostManager {
private final View mRootView;
private final InterestingConfigChanges mConfigChanges = new InterestingConfigChanges(
ActivityInfo.CONFIG_FONT_SCALE | ActivityInfo.CONFIG_LOCALE
- | ActivityInfo.CONFIG_SCREEN_LAYOUT | ActivityInfo.CONFIG_ASSETS_PATHS);
+ | ActivityInfo.CONFIG_SCREEN_LAYOUT | ActivityInfo.CONFIG_ASSETS_PATHS
+ | ActivityInfo.CONFIG_UI_MODE);
private final FragmentService mManager;
private final ExtensionFragmentManager mPlugins = new ExtensionFragmentManager();
diff --git a/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialog.java b/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialog.java
index 532fa034a03b..201f40e40f26 100644
--- a/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialog.java
+++ b/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialog.java
@@ -265,7 +265,7 @@ class GlobalActionsDialog implements DialogInterface.OnDismissListener,
if (!mHasVibrator) {
mSilentModeAction = new SilentModeToggleAction();
} else {
- mSilentModeAction = new SilentModeTriStateAction(mContext, mAudioManager, mHandler);
+ mSilentModeAction = new SilentModeTriStateAction(mAudioManager, mHandler);
}
mAirplaneModeOn = new ToggleAction(
R.drawable.ic_lock_airplane_mode,
@@ -1211,12 +1211,10 @@ class GlobalActionsDialog implements DialogInterface.OnDismissListener,
private final AudioManager mAudioManager;
private final Handler mHandler;
- private final Context mContext;
- SilentModeTriStateAction(Context context, AudioManager audioManager, Handler handler) {
+ SilentModeTriStateAction(AudioManager audioManager, Handler handler) {
mAudioManager = audioManager;
mHandler = handler;
- mContext = context;
}
private int ringerModeToIndex(int ringerMode) {
diff --git a/packages/SystemUI/src/com/android/systemui/pip/tv/PipManager.java b/packages/SystemUI/src/com/android/systemui/pip/tv/PipManager.java
index d9f923f2b4e3..020c5500c0a0 100644..100755
--- a/packages/SystemUI/src/com/android/systemui/pip/tv/PipManager.java
+++ b/packages/SystemUI/src/com/android/systemui/pip/tv/PipManager.java
@@ -262,12 +262,13 @@ public class PipManager implements BasePipManager {
entry = Pair.<String, String>create(packageAndClassName[0], null);
break;
case 2:
- if (packageAndClassName[1] != null
- && packageAndClassName[1].startsWith(".")) {
- entry = Pair.<String, String>create(
- packageAndClassName[0],
- packageAndClassName[0] + packageAndClassName[1]);
+ if (packageAndClassName[1] != null) {
+ entry = Pair.<String, String>create(packageAndClassName[0],
+ packageAndClassName[1].startsWith(".")
+ ? packageAndClassName[0] + packageAndClassName[1]
+ : packageAndClassName[1]);
}
+ break;
}
if (entry != null) {
sSettingsPackageAndClassNamePairList.add(entry);
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/NightDisplayTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/NightDisplayTile.java
index e0a9148b1230..c41f087aa76b 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/NightDisplayTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/NightDisplayTile.java
@@ -26,7 +26,6 @@ import android.provider.Settings;
import android.service.quicksettings.Tile;
import androidx.annotation.StringRes;
import android.text.TextUtils;
-import android.text.format.DateFormat;
import android.util.Log;
import android.widget.Switch;
@@ -37,8 +36,11 @@ import com.android.systemui.qs.QSHost;
import com.android.systemui.plugins.qs.QSTile.BooleanState;
import com.android.systemui.qs.tileimpl.QSTileImpl;
+import java.text.DateFormat;
import java.time.LocalTime;
import java.time.format.DateTimeFormatter;
+import java.util.Calendar;
+import java.util.TimeZone;
public class NightDisplayTile extends QSTileImpl<BooleanState>
implements ColorDisplayController.Callback {
@@ -144,13 +146,17 @@ public class NightDisplayTile extends QSTileImpl<BooleanState>
toggleTimeStringRes = R.string.quick_settings_night_secondary_label_on_at;
}
- // Choose between just showing the hour or also showing the minutes (based on the
- // user-selected toggle time). This helps reduce how much space the label takes.
- toggleTimeFormat = DateTimeFormatter.ofPattern(
- DateFormat.is24HourFormat(mContext) ? PATTERN_HOUR_NINUTE_24 :
- toggleTime.getMinute() == 0 ? PATTERN_HOUR : PATTERN_HOUR_MINUTE);
-
- return mContext.getString(toggleTimeStringRes, toggleTime.format(toggleTimeFormat));
+ // TODO(b/111085930): Move this calendar snippet to a common code location that
+ // settings lib can also access.
+ final Calendar c = Calendar.getInstance();
+ DateFormat nightTileFormat = android.text.format.DateFormat.getTimeFormat(mContext);
+ nightTileFormat.setTimeZone(TimeZone.getTimeZone("UTC"));
+ c.setTimeZone(nightTileFormat.getTimeZone());
+ c.set(Calendar.HOUR_OF_DAY, toggleTime.getHour());
+ c.set(Calendar.MINUTE, toggleTime.getMinute());
+ c.set(Calendar.SECOND, 0);
+ c.set(Calendar.MILLISECOND, 0);
+ return mContext.getString(toggleTimeStringRes, nightTileFormat.format(c.getTime()));
default:
// No secondary label when auto mode is disabled.
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java b/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java
index 294e2f4a5ab4..551e8a9dcb81 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java
@@ -364,22 +364,41 @@ public class KeyguardIndicationController {
R.integer.wired_charging_keyguard_text_animation_duration_up);
int animateDownDuration = mContext.getResources().getInteger(
R.integer.wired_charging_keyguard_text_animation_duration_down);
+ textView.animate().cancel();
+ float translation = textView.getTranslationY();
textView.animate()
.translationYBy(yTranslation)
.setInterpolator(Interpolators.LINEAR)
.setDuration(animateUpDuration)
.setListener(new AnimatorListenerAdapter() {
+ private boolean mCancelled;
+
@Override
public void onAnimationStart(Animator animation) {
textView.switchIndication(indication);
}
+
+ @Override
+ public void onAnimationCancel(Animator animation) {
+ textView.setTranslationY(translation);
+ mCancelled = true;
+ }
+
@Override
public void onAnimationEnd(Animator animation) {
+ if (mCancelled) {
+ return;
+ }
textView.animate()
.setDuration(animateDownDuration)
.setInterpolator(Interpolators.BOUNCE)
- .translationYBy(-1 * yTranslation)
- .setListener(null);
+ .translationY(translation)
+ .setListener(new AnimatorListenerAdapter() {
+ @Override
+ public void onAnimationCancel(Animator animation) {
+ textView.setTranslationY(translation);
+ }
+ });
}
});
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/BiometricUnlockController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/BiometricUnlockController.java
index 0b6fd1300538..2087a165b215 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/BiometricUnlockController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/BiometricUnlockController.java
@@ -216,15 +216,28 @@ public class BiometricUnlockController extends KeyguardUpdateMonitorCallback {
// until the clock and the notifications are faded out.
mStatusBarWindowManager.setForceDozeBrightness(true);
}
- if (!wasDeviceInteractive) {
- if (DEBUG_BIO_WAKELOCK) {
- Log.i(TAG, "bio wakelock: Authenticated, waking up...");
+ // During wake and unlock, we need to draw black before waking up to avoid abrupt
+ // brightness changes due to display state transitions.
+ boolean alwaysOnEnabled = DozeParameters.getInstance(mContext).getAlwaysOn();
+ boolean delayWakeUp = mode == MODE_WAKE_AND_UNLOCK && alwaysOnEnabled;
+ Runnable wakeUp = ()-> {
+ if (!wasDeviceInteractive) {
+ if (DEBUG_BIO_WAKELOCK) {
+ Log.i(TAG, "bio wakelock: Authenticated, waking up...");
+ }
+ mPowerManager.wakeUp(SystemClock.uptimeMillis(), "android.policy:BIOMETRIC");
+ }
+ if (delayWakeUp) {
+ mKeyguardViewMediator.onWakeAndUnlocking();
}
- mPowerManager.wakeUp(SystemClock.uptimeMillis(), "android.policy:BIOMETRIC");
+ Trace.beginSection("release wake-and-unlock");
+ releaseBiometricWakeLock();
+ Trace.endSection();
+ };
+
+ if (!delayWakeUp) {
+ wakeUp.run();
}
- Trace.beginSection("release wake-and-unlock");
- releaseBiometricWakeLock();
- Trace.endSection();
switch (mMode) {
case MODE_DISMISS_BOUNCER:
Trace.beginSection("MODE_DISMISS");
@@ -257,7 +270,11 @@ public class BiometricUnlockController extends KeyguardUpdateMonitorCallback {
mUpdateMonitor.awakenFromDream();
}
mStatusBarWindowManager.setStatusBarFocusable(false);
- mKeyguardViewMediator.onWakeAndUnlocking();
+ if (delayWakeUp) {
+ mHandler.postDelayed(wakeUp, 50);
+ } else {
+ mKeyguardViewMediator.onWakeAndUnlocking();
+ }
if (mStatusBar.getNavigationBarView() != null) {
mStatusBar.getNavigationBarView().setWakeAndUnlocking(true);
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ConfigurationControllerImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ConfigurationControllerImpl.java
index 6f538440647e..7ddca1756070 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ConfigurationControllerImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ConfigurationControllerImpl.java
@@ -64,8 +64,9 @@ public class ConfigurationControllerImpl implements ConfigurationController,
final float fontScale = newConfig.fontScale;
final int density = newConfig.densityDpi;
int uiMode = newConfig.uiMode & Configuration.UI_MODE_NIGHT_MASK;
+ boolean uiModeChanged = uiMode != mUiMode;
if (density != mDensity || fontScale != mFontScale
- || (mInCarMode && uiMode != mUiMode)) {
+ || (mInCarMode && uiModeChanged)) {
listeners.forEach(l -> {
if (mListeners.contains(l)) {
l.onDensityOrFontScaleChanged();
@@ -73,7 +74,6 @@ public class ConfigurationControllerImpl implements ConfigurationController,
});
mDensity = density;
mFontScale = fontScale;
- mUiMode = uiMode;
}
final LocaleList localeList = newConfig.getLocales();
@@ -86,6 +86,15 @@ public class ConfigurationControllerImpl implements ConfigurationController,
});
}
+ if (uiModeChanged) {
+ mUiMode = uiMode;
+ listeners.forEach(l -> {
+ if (mListeners.contains(l)) {
+ l.onUiModeChanged();
+ }
+ });
+ }
+
if ((mLastConfig.updateFrom(newConfig) & ActivityInfo.CONFIG_ASSETS_PATHS) != 0) {
listeners.forEach(l -> {
if (mListeners.contains(l)) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
index 492efa2c564f..5a07dbd1eda5 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
@@ -47,6 +47,7 @@ import android.view.View;
import android.view.ViewGroup;
import android.view.WindowInsets;
import android.view.accessibility.AccessibilityManager;
+import android.view.animation.Interpolator;
import android.widget.FrameLayout;
import com.android.internal.logging.MetricsLogger;
@@ -109,17 +110,20 @@ public class NotificationPanelView extends PanelView implements
private static final AnimationProperties CLOCK_ANIMATION_PROPERTIES = new AnimationProperties()
.setDuration(StackStateAnimator.ANIMATION_DURATION_STANDARD);
private static final FloatProperty<NotificationPanelView> SET_DARK_AMOUNT_PROPERTY =
- new FloatProperty<NotificationPanelView>("mDarkAmount") {
+ new FloatProperty<NotificationPanelView>("mInterpolatedDarkAmount") {
+
@Override
public void setValue(NotificationPanelView object, float value) {
- object.setDarkAmount(value);
+ object.setDarkAmount(value, object.mDarkInterpolator.getInterpolation(value));
}
@Override
public Float get(NotificationPanelView object) {
- return object.mDarkAmount;
+ return object.mLinearDarkAmount;
}
};
+
+ private Interpolator mDarkInterpolator;
private final PowerManager mPowerManager;
private final AccessibilityManager mAccessibilityManager;
@@ -239,7 +243,18 @@ public class NotificationPanelView extends PanelView implements
private int mIndicationBottomPadding;
private int mAmbientIndicationBottomPadding;
private boolean mIsFullWidth;
- private float mDarkAmount;
+
+ /**
+ * Current dark amount that follows regular interpolation curve of animation.
+ */
+ private float mInterpolatedDarkAmount;
+
+ /**
+ * Dark amount that animates from 0 to 1 or vice-versa in linear manner, even if the
+ * interpolation curve is different.
+ */
+ private float mLinearDarkAmount;
+
private float mDarkAmountTarget;
private boolean mPulsing;
private LockscreenGestureLogger mLockscreenGestureLogger = new LockscreenGestureLogger();
@@ -394,7 +409,7 @@ public class NotificationPanelView extends PanelView implements
false);
addView(mKeyguardBottomArea, index);
initBottomArea();
- setDarkAmount(mDarkAmount);
+ setDarkAmount(mLinearDarkAmount, mInterpolatedDarkAmount);
setKeyguardStatusViewVisibility(mStatusBarState, false, false);
setKeyguardBottomAreaVisibility(mStatusBarState, false);
@@ -508,7 +523,7 @@ public class NotificationPanelView extends PanelView implements
getExpandedFraction(),
totalHeight,
mKeyguardStatusView.getHeight(),
- mDarkAmount,
+ mInterpolatedDarkAmount,
mStatusBar.isKeyguardCurrentlySecure(),
mPulsing,
mBouncerTop);
@@ -1919,7 +1934,7 @@ public class NotificationPanelView extends PanelView implements
if (view == null && mQsExpanded) {
return;
}
- if (needsAnimation && mDarkAmount == 0) {
+ if (needsAnimation && mInterpolatedDarkAmount == 0) {
mAnimateNextPositionUpdate = true;
}
ExpandableView firstChildNotGone = mNotificationStackScroller.getFirstChildNotGone();
@@ -2729,20 +2744,28 @@ public class NotificationPanelView extends PanelView implements
}
mDarkAmountTarget = darkAmount;
if (animate) {
+ if (mInterpolatedDarkAmount == 0f || mInterpolatedDarkAmount == 1f) {
+ mDarkInterpolator = dozing
+ ? Interpolators.FAST_OUT_SLOW_IN
+ : Interpolators.TOUCH_RESPONSE_REVERSE;
+ }
+ mNotificationStackScroller.notifyDarkAnimationStart(dozing);
mDarkAnimator = ObjectAnimator.ofFloat(this, SET_DARK_AMOUNT_PROPERTY, darkAmount);
- mDarkAnimator.setInterpolator(Interpolators.LINEAR_OUT_SLOW_IN);
- mDarkAnimator.setDuration(StackStateAnimator.ANIMATION_DURATION_WAKEUP);
+ mDarkAnimator.setInterpolator(Interpolators.LINEAR);
+ mDarkAnimator.setDuration(mNotificationStackScroller.getDarkAnimationDuration(dozing));
mDarkAnimator.start();
} else {
- setDarkAmount(darkAmount);
+ setDarkAmount(darkAmount, darkAmount);
}
}
- private void setDarkAmount(float amount) {
- mDarkAmount = amount;
- mKeyguardStatusView.setDarkAmount(mDarkAmount);
- mKeyguardBottomArea.setDarkAmount(mDarkAmount);
+ private void setDarkAmount(float linearAmount, float amount) {
+ mInterpolatedDarkAmount = amount;
+ mLinearDarkAmount = linearAmount;
+ mKeyguardStatusView.setDarkAmount(mInterpolatedDarkAmount);
+ mKeyguardBottomArea.setDarkAmount(mInterpolatedDarkAmount);
positionClockAndNotifications();
+ mNotificationStackScroller.setDarkAmount(linearAmount, mInterpolatedDarkAmount);
}
public void setPulsing(boolean pulsing) {
@@ -2767,7 +2790,7 @@ public class NotificationPanelView extends PanelView implements
public void dozeTimeTick() {
mKeyguardStatusView.dozeTimeTick();
mKeyguardBottomArea.dozeTimeTick();
- if (mDarkAmount > 0) {
+ if (mInterpolatedDarkAmount > 0) {
positionClockAndNotifications();
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
index c5ef67d20093..7cf2c3376e89 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
@@ -330,12 +330,6 @@ public class StatusBar extends SystemUI implements DemoMode,
/** If true, the lockscreen will show a distinct wallpaper */
private static final boolean ENABLE_LOCKSCREEN_WALLPAPER = true;
- /** Whether to force dark theme if Configuration.UI_MODE_NIGHT_YES. */
- private static final boolean DARK_THEME_IN_NIGHT_MODE = true;
-
- /** Whether to switch the device into night mode in battery saver. */
- private static final boolean NIGHT_MODE_IN_BATTERY_SAVER = true;
-
/**
* Never let the alpha become zero for surfaces that draw with SRC - otherwise the RenderNode
* won't draw anything and uninitialized memory will show through
@@ -580,7 +574,7 @@ public class StatusBar extends SystemUI implements DemoMode,
= (KeyguardMonitorImpl) Dependency.get(KeyguardMonitor.class);
private BatteryController mBatteryController;
protected boolean mPanelExpanded;
- private IOverlayManager mOverlayManager;
+ private UiModeManager mUiModeManager;
private boolean mKeyguardRequested;
private boolean mIsKeyguard;
private LogMaker mStatusBarStateLog;
@@ -641,8 +635,7 @@ public class StatusBar extends SystemUI implements DemoMode,
mWakefulnessLifecycle.addObserver(mWakefulnessObserver);
mBatteryController = Dependency.get(BatteryController.class);
mAssistManager = Dependency.get(AssistManager.class);
- mOverlayManager = IOverlayManager.Stub.asInterface(
- ServiceManager.getService(Context.OVERLAY_SERVICE));
+ mUiModeManager = mContext.getSystemService(UiModeManager.class);
mLockscreenUserManager = Dependency.get(NotificationLockscreenUserManager.class);
mGutsManager = Dependency.get(NotificationGutsManager.class);
mMediaManager = Dependency.get(NotificationMediaManager.class);
@@ -948,10 +941,6 @@ public class StatusBar extends SystemUI implements DemoMode,
if (mDozeServiceHost != null) {
mDozeServiceHost.firePowerSaveChanged(isPowerSave);
}
- if (NIGHT_MODE_IN_BATTERY_SAVER) {
- mContext.getSystemService(UiModeManager.class).setNightMode(
- isPowerSave ? UiModeManager.MODE_NIGHT_YES : UiModeManager.MODE_NIGHT_NO);
- }
}
@Override
@@ -1199,6 +1188,18 @@ public class StatusBar extends SystemUI implements DemoMode,
}
}
+ @Override
+ public void onUiModeChanged() {
+ // UiMode will change the style was already evaluated.
+ // We need to force the re-evaluation to make sure that all parents
+ // are up to date and new attrs will be rettrieved.
+ mContext.getTheme().applyStyle(mContext.getThemeResId(), true);
+
+ if (mBrightnessMirrorController != null) {
+ mBrightnessMirrorController.onUiModeChanged();
+ }
+ }
+
private void inflateEmptyShadeView() {
if (mStackScroller == null) {
return;
@@ -2099,17 +2100,6 @@ public class StatusBar extends SystemUI implements DemoMode,
updateTheme();
}
- public boolean isUsingDarkTheme() {
- OverlayInfo themeInfo = null;
- try {
- themeInfo = mOverlayManager.getOverlayInfo("com.android.systemui.theme.dark",
- mLockscreenUserManager.getCurrentUserId());
- } catch (RemoteException e) {
- e.printStackTrace();
- }
- return themeInfo != null && themeInfo.isEnabled();
- }
-
@Nullable
public View getAmbientIndicationContainer() {
return mAmbientIndicationContainer;
@@ -2812,11 +2802,11 @@ public class StatusBar extends SystemUI implements DemoMode,
mStackScroller.dump(fd, pw, args);
}
pw.println(" Theme:");
- if (mOverlayManager == null) {
- pw.println(" overlay manager not initialized!");
- } else {
- pw.println(" dark overlay on: " + isUsingDarkTheme());
- }
+ String nightMode = mUiModeManager == null ? "null" : mUiModeManager.getNightMode() + "";
+ pw.println(" dark theme: " + nightMode +
+ " (auto: " + UiModeManager.MODE_NIGHT_AUTO +
+ ", yes: " + UiModeManager.MODE_NIGHT_YES +
+ ", no: " + UiModeManager.MODE_NIGHT_NO + ")");
final boolean lightWpTheme = mContext.getThemeResId() == R.style.Theme_SystemUI_Light;
pw.println(" light wallpaper theme: " + lightWpTheme);
@@ -3149,7 +3139,6 @@ public class StatusBar extends SystemUI implements DemoMode,
public void onConfigChanged(Configuration newConfig) {
updateResources();
updateDisplaySize(); // populates mDisplayMetrics
- updateTheme();
if (DEBUG) {
Log.v(TAG, "configuration changed: " + mContext.getResources().getConfiguration());
@@ -3887,27 +3876,6 @@ public class StatusBar extends SystemUI implements DemoMode,
protected void updateTheme() {
final boolean inflated = mStackScroller != null && mStatusBarWindowManager != null;
- // The system wallpaper defines if QS should be light or dark.
- WallpaperColors systemColors = mColorExtractor
- .getWallpaperColors(WallpaperManager.FLAG_SYSTEM);
- final boolean wallpaperWantsDarkTheme = systemColors != null
- && (systemColors.getColorHints() & WallpaperColors.HINT_SUPPORTS_DARK_THEME) != 0;
- final Configuration config = mContext.getResources().getConfiguration();
- final boolean nightModeWantsDarkTheme = DARK_THEME_IN_NIGHT_MODE
- && (config.uiMode & Configuration.UI_MODE_NIGHT_MASK)
- == Configuration.UI_MODE_NIGHT_YES;
- final boolean useDarkTheme = wallpaperWantsDarkTheme || nightModeWantsDarkTheme;
- if (isUsingDarkTheme() != useDarkTheme) {
- mUiOffloadThread.submit(() -> {
- try {
- mOverlayManager.setEnabled("com.android.systemui.theme.dark",
- useDarkTheme, mLockscreenUserManager.getCurrentUserId());
- } catch (RemoteException e) {
- Log.w(TAG, "Can't change theme", e);
- }
- });
- }
-
// Lock wallpaper defines the color of the majority of the views, hence we'll use it
// to set our default theme.
final boolean lockDarkText = mColorExtractor.getColors(WallpaperManager.FLAG_LOCK, true
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowManager.java
index fadc0eac9e73..a38328a8161e 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowManager.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowManager.java
@@ -180,6 +180,15 @@ public class StatusBarWindowManager implements RemoteInputController.Callback, D
mLpChanged.softInputMode = WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE;
}
+ private void applyExpandedFlag(State state) {
+ if (state.panelExpanded || state.isKeyguardShowingAndNotOccluded() || state.bouncerShowing
+ || ENABLE_REMOTE_INPUT && state.remoteInputActive) {
+ mLpChanged.privateFlags |= LayoutParams.PRIVATE_FLAG_STATUS_BAR_EXPANDED;
+ } else {
+ mLpChanged.privateFlags &= ~LayoutParams.PRIVATE_FLAG_STATUS_BAR_EXPANDED;
+ }
+ }
+
private void applyHeight(State state) {
boolean expanded = isExpanded(state);
if (state.forcePluginOpen) {
@@ -234,6 +243,7 @@ public class StatusBarWindowManager implements RemoteInputController.Callback, D
applyKeyguardFlags(state);
applyForceStatusBarVisibleFlag(state);
applyFocusableFlag(state);
+ applyExpandedFlag(state);
adjustScreenOrientation(state);
applyHeight(state);
applyUserActivityTimeout(state);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/BrightnessMirrorController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/BrightnessMirrorController.java
index e9bdc6848ab0..b1986782e914 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/BrightnessMirrorController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/BrightnessMirrorController.java
@@ -19,7 +19,6 @@ package com.android.systemui.statusbar.policy;
import android.annotation.NonNull;
import android.content.res.Resources;
import android.util.ArraySet;
-import android.view.ContextThemeWrapper;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.FrameLayout;
@@ -105,11 +104,9 @@ public class BrightnessMirrorController
}
private void reinflate() {
- ContextThemeWrapper qsThemeContext =
- new ContextThemeWrapper(mBrightnessMirror.getContext(), R.style.qs_theme);
int index = mStatusBarWindow.indexOfChild(mBrightnessMirror);
mStatusBarWindow.removeView(mBrightnessMirror);
- mBrightnessMirror = LayoutInflater.from(qsThemeContext).inflate(
+ mBrightnessMirror = LayoutInflater.from(mBrightnessMirror.getContext()).inflate(
R.layout.brightness_mirror, mStatusBarWindow, false);
mStatusBarWindow.addView(mBrightnessMirror, index);
@@ -129,6 +126,10 @@ public class BrightnessMirrorController
mBrightnessMirrorListeners.remove(listener);
}
+ public void onUiModeChanged() {
+ reinflate();
+ }
+
public interface BrightnessMirrorListener {
void onBrightnessMirrorReinflated(View brightnessMirror);
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/ConfigurationController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/ConfigurationController.java
index 3dca371541ef..8c631d9107df 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/ConfigurationController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/ConfigurationController.java
@@ -28,6 +28,7 @@ public interface ConfigurationController extends CallbackController<Configuratio
default void onConfigChanged(Configuration newConfig) {}
default void onDensityOrFontScaleChanged() {}
default void onOverlayChanged() {}
+ default void onUiModeChanged() {}
default void onLocaleListChanged() {}
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java b/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java
index 052e8e181d80..6fc491119aa6 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java
@@ -34,7 +34,6 @@ import android.content.res.Resources;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
-import android.graphics.Path;
import android.graphics.PointF;
import android.graphics.PorterDuff;
import android.graphics.PorterDuffXfermode;
@@ -46,11 +45,9 @@ import androidx.annotation.NonNull;
import androidx.annotation.VisibleForTesting;
import androidx.core.graphics.ColorUtils;
import android.util.AttributeSet;
-import android.util.FloatProperty;
import android.util.Log;
import android.util.MathUtils;
import android.util.Pair;
-import android.util.Property;
import android.view.ContextThemeWrapper;
import android.view.InputDevice;
import android.view.MotionEvent;
@@ -375,25 +372,22 @@ public class NotificationStackScrollLayout extends ViewGroup
private boolean mScrollable;
private View mForcedScroll;
private View mNeedingPulseAnimation;
- private float mDarkAmount = 0f;
+
+ /**
+ * @see #setDarkAmount(float, float)
+ */
+ private float mInterpolatedDarkAmount = 0f;
+
+ /**
+ * @see #setDarkAmount(float, float)
+ */
+ private float mLinearDarkAmount = 0f;
/**
* How fast the background scales in the X direction as a factor of the Y expansion.
*/
private float mBackgroundXFactor = 1f;
- private static final Property<NotificationStackScrollLayout, Float> DARK_AMOUNT =
- new FloatProperty<NotificationStackScrollLayout>("darkAmount") {
- @Override
- public void setValue(NotificationStackScrollLayout object, float value) {
- object.setDarkAmount(value);
- }
- @Override
- public Float get(NotificationStackScrollLayout object) {
- return object.getDarkAmount();
- }
- };
- private ObjectAnimator mDarkAmountAnimator;
private boolean mUsingLightTheme;
private boolean mQsExpanded;
private boolean mForwardScrollable;
@@ -424,6 +418,8 @@ public class NotificationStackScrollLayout extends ViewGroup
private NotificationIconAreaController mIconAreaController;
private float mVerticalPanelTranslation;
+ private Interpolator mDarkXInterpolator = Interpolators.FAST_OUT_SLOW_IN;
+
public NotificationStackScrollLayout(Context context) {
this(context, null);
}
@@ -558,16 +554,16 @@ public class NotificationStackScrollLayout extends ViewGroup
canvas.drawRect(darkLeft, darkTop, darkRight, darkBottom, mBackgroundPaint);
}
} else {
- float inverseDark = 1 - mDarkAmount;
- float yProgress = Interpolators.FAST_OUT_SLOW_IN.getInterpolation(inverseDark);
- float xProgress = Interpolators.FAST_OUT_SLOW_IN
- .getInterpolation(inverseDark * mBackgroundXFactor);
+ float yProgress = 1 - mInterpolatedDarkAmount;
+ float xProgress = mDarkXInterpolator.getInterpolation(
+ (1 - mLinearDarkAmount) * mBackgroundXFactor);
mBackgroundAnimationRect.set(
(int) MathUtils.lerp(darkLeft, lockScreenLeft, xProgress),
(int) MathUtils.lerp(darkTop, lockScreenTop, yProgress),
(int) MathUtils.lerp(darkRight, lockScreenRight, xProgress),
(int) MathUtils.lerp(darkBottom, lockScreenBottom, yProgress));
+
if (!mAmbientState.isDark() || mFirstVisibleBackgroundChild != null) {
canvas.drawRoundRect(mBackgroundAnimationRect.left, mBackgroundAnimationRect.top,
mBackgroundAnimationRect.right, mBackgroundAnimationRect.bottom,
@@ -585,14 +581,15 @@ public class NotificationStackScrollLayout extends ViewGroup
float alpha =
BACKGROUND_ALPHA_DIMMED + (1 - BACKGROUND_ALPHA_DIMMED) * (1.0f - mDimAmount);
- alpha *= 1f - mDarkAmount;
+ alpha *= 1f - mInterpolatedDarkAmount;
// We need to manually blend in the background color.
int scrimColor = mScrimController.getBackgroundColor();
int awakeColor = ColorUtils.blendARGB(scrimColor, mBgColor, alpha);
// Interpolate between semi-transparent notification panel background color
// and white AOD separator.
- float colorInterpolation = Interpolators.DECELERATE_QUINT.getInterpolation(mDarkAmount);
+ float colorInterpolation = Interpolators.DECELERATE_QUINT.getInterpolation(
+ mInterpolatedDarkAmount);
int color = ColorUtils.blendARGB(awakeColor, Color.WHITE, colorInterpolation);
if (mCachedBackgroundColor != color) {
@@ -740,7 +737,8 @@ public class NotificationStackScrollLayout extends ViewGroup
}
private void updateAlgorithmHeightAndPadding() {
- mTopPadding = (int) MathUtils.lerp(mRegularTopPadding, mDarkTopPadding, mDarkAmount);
+ mTopPadding = (int) MathUtils.lerp(mRegularTopPadding, mDarkTopPadding,
+ mInterpolatedDarkAmount);
mAmbientState.setLayoutHeight(getLayoutHeight());
updateAlgorithmLayoutMinHeight();
mAmbientState.setTopPadding(mTopPadding);
@@ -965,7 +963,7 @@ public class NotificationStackScrollLayout extends ViewGroup
}
public void updateClipping() {
- boolean animatingClipping = mDarkAmount > 0 && mDarkAmount < 1;
+ boolean animatingClipping = mInterpolatedDarkAmount > 0 && mInterpolatedDarkAmount < 1;
boolean clipped = mRequestedClipBounds != null && !mInHeadsUpPinnedMode
&& !mHeadsUpAnimatingAway;
if (mIsClipped != clipped) {
@@ -2425,7 +2423,7 @@ public class NotificationStackScrollLayout extends ViewGroup
return;
}
- final boolean awake = mDarkAmount != 0 || mAmbientState.isDark();
+ final boolean awake = mInterpolatedDarkAmount != 0 || mAmbientState.isDark();
mScrimController.setExcludedBackgroundArea(
mFadingOut || mParentNotFullyVisible || awake || mIsClipped ? null
: mCurrentBounds);
@@ -3417,7 +3415,6 @@ public class NotificationStackScrollLayout extends ViewGroup
.animateY(mShelf));
ev.darkAnimationOriginIndex = mDarkAnimationOriginIndex;
mAnimationEvents.add(ev);
- startDarkAmountAnimation();
}
mDarkNeedsAnimation = false;
}
@@ -3993,11 +3990,8 @@ public class NotificationStackScrollLayout extends ViewGroup
if (animate && mAnimationsEnabled) {
mDarkNeedsAnimation = true;
mDarkAnimationOriginIndex = findDarkAnimationOriginIndex(touchWakeUpScreenLocation);
- mNeedsAnimation = true;
+ mNeedsAnimation = true;
} else {
- if (mDarkAmountAnimator != null) {
- mDarkAmountAnimator.cancel();
- }
setDarkAmount(dark ? 1f : 0f);
updateBackground();
}
@@ -4008,7 +4002,7 @@ public class NotificationStackScrollLayout extends ViewGroup
}
private void updatePanelTranslation() {
- setTranslationX(mVerticalPanelTranslation + mAntiBurnInOffsetX * mDarkAmount);
+ setTranslationX(mVerticalPanelTranslation + mAntiBurnInOffsetX * mInterpolatedDarkAmount);
}
public void setVerticalPanelTranslation(float verticalPanelTranslation) {
@@ -4027,9 +4021,22 @@ public class NotificationStackScrollLayout extends ViewGroup
}
private void setDarkAmount(float darkAmount) {
- mDarkAmount = darkAmount;
+ setDarkAmount(darkAmount, darkAmount);
+ }
+
+ /**
+ * Sets the current dark amount.
+ *
+ * @param linearDarkAmount The dark amount that follows linear interpoloation in the animation,
+ * i.e. animates from 0 to 1 or vice-versa in a linear manner.
+ * @param interpolatedDarkAmount The dark amount that follows the actual interpolation of the
+ * animation curve.
+ */
+ public void setDarkAmount(float linearDarkAmount, float interpolatedDarkAmount) {
+ mLinearDarkAmount = linearDarkAmount;
+ mInterpolatedDarkAmount = interpolatedDarkAmount;
boolean wasFullyDark = mAmbientState.isFullyDark();
- mAmbientState.setDarkAmount(darkAmount);
+ mAmbientState.setDarkAmount(interpolatedDarkAmount);
boolean nowFullyDark = mAmbientState.isFullyDark();
if (nowFullyDark != wasFullyDark) {
updateContentHeight();
@@ -4047,42 +4054,24 @@ public class NotificationStackScrollLayout extends ViewGroup
requestChildrenUpdate();
}
- public float getDarkAmount() {
- return mDarkAmount;
- }
-
- /**
- * Cancel any previous dark animations - to avoid race conditions - and creates a new one.
- * This function also sets {@code mBackgroundXFactor} based on the current {@code mDarkAmount}.
- */
- private void startDarkAmountAnimation() {
- boolean dark = mAmbientState.isDark();
- if (mDarkAmountAnimator != null) {
- mDarkAmountAnimator.cancel();
+ public void notifyDarkAnimationStart(boolean dark) {
+ // We only swap the scaling factor if we're fully dark or fully awake to avoid
+ // interpolation issues when playing with the power button.
+ if (mInterpolatedDarkAmount == 0 || mInterpolatedDarkAmount == 1) {
+ mBackgroundXFactor = dark ? 1.8f : 1.5f;
+ mDarkXInterpolator = dark
+ ? Interpolators.FAST_OUT_SLOW_IN_REVERSE
+ : Interpolators.FAST_OUT_SLOW_IN;
}
+ }
+ public long getDarkAnimationDuration(boolean dark) {
long duration = StackStateAnimator.ANIMATION_DURATION_WAKEUP;
// Longer animation when sleeping with more than 1 notification
if (dark && getNotGoneChildCount() > 2) {
duration *= 1.2f;
}
-
- mDarkAmountAnimator = ObjectAnimator.ofFloat(this, DARK_AMOUNT, mDarkAmount,
- dark ? 1f : 0);
- // We only swap the scaling factor if we're fully dark or fully awake to avoid
- // interpolation issues when playing with the power button.
- if (mDarkAmount == 0 || mDarkAmount == 1) {
- mBackgroundXFactor = dark ? 2.5f : 1.5f;
- }
- mDarkAmountAnimator.setDuration(duration);
- mDarkAmountAnimator.setInterpolator(Interpolators.LINEAR);
- mDarkAmountAnimator.addListener(new AnimatorListenerAdapter() {
- @Override
- public void onAnimationEnd(Animator animation) {
- mDarkAmountAnimator = null;
- }
- });
- mDarkAmountAnimator.start();
+ return duration;
}
private int findDarkAnimationOriginIndex(@Nullable PointF screenLocation) {
diff --git a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogComponent.java b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogComponent.java
index dd552646955a..2861dffe5460 100644
--- a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogComponent.java
+++ b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogComponent.java
@@ -61,7 +61,7 @@ public class VolumeDialogComponent implements VolumeComponent, TunerService.Tuna
private final VolumeDialogControllerImpl mController;
private final InterestingConfigChanges mConfigChanges = new InterestingConfigChanges(
ActivityInfo.CONFIG_FONT_SCALE | ActivityInfo.CONFIG_LOCALE
- | ActivityInfo.CONFIG_ASSETS_PATHS);
+ | ActivityInfo.CONFIG_ASSETS_PATHS | ActivityInfo.CONFIG_UI_MODE);
private VolumeDialog mDialog;
private VolumePolicy mVolumePolicy = new VolumePolicy(
DEFAULT_VOLUME_DOWN_TO_ENTER_SILENT, // volumeDownToEnterSilent
diff --git a/packages/overlays/SysuiDarkThemeOverlay/Android.mk b/packages/overlays/SysuiDarkThemeOverlay/Android.mk
deleted file mode 100644
index 7b277bcf0351..000000000000
--- a/packages/overlays/SysuiDarkThemeOverlay/Android.mk
+++ /dev/null
@@ -1,14 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_RRO_THEME := SysuiDarkTheme
-LOCAL_CERTIFICATE := platform
-
-LOCAL_SRC_FILES := $(call all-subdir-java-files)
-
-LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
-
-LOCAL_PACKAGE_NAME := SysuiDarkThemeOverlay
-LOCAL_SDK_VERSION := current
-
-include $(BUILD_RRO_PACKAGE)
diff --git a/packages/overlays/SysuiDarkThemeOverlay/AndroidManifest.xml b/packages/overlays/SysuiDarkThemeOverlay/AndroidManifest.xml
deleted file mode 100644
index 8b6ee2bb851c..000000000000
--- a/packages/overlays/SysuiDarkThemeOverlay/AndroidManifest.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="com.android.systemui.theme.dark"
- android:versionCode="1"
- android:versionName="1.0">
- <overlay android:targetPackage="com.android.systemui" android:priority="1"/>
-
- <application android:label="@string/sysui_overlay_dark" android:hasCode="false"/>
-</manifest>
diff --git a/packages/overlays/SysuiDarkThemeOverlay/res/values-af/strings.xml b/packages/overlays/SysuiDarkThemeOverlay/res/values-af/strings.xml
deleted file mode 100644
index 33c6982e007a..000000000000
--- a/packages/overlays/SysuiDarkThemeOverlay/res/values-af/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2017, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="sysui_overlay_dark" msgid="557336259295713662">"Donker"</string>
-</resources>
diff --git a/packages/overlays/SysuiDarkThemeOverlay/res/values-am/strings.xml b/packages/overlays/SysuiDarkThemeOverlay/res/values-am/strings.xml
deleted file mode 100644
index 59795695251b..000000000000
--- a/packages/overlays/SysuiDarkThemeOverlay/res/values-am/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2017, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="sysui_overlay_dark" msgid="557336259295713662">"ጨለማ"</string>
-</resources>
diff --git a/packages/overlays/SysuiDarkThemeOverlay/res/values-ar/strings.xml b/packages/overlays/SysuiDarkThemeOverlay/res/values-ar/strings.xml
deleted file mode 100644
index 7b20c01957aa..000000000000
--- a/packages/overlays/SysuiDarkThemeOverlay/res/values-ar/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2017, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="sysui_overlay_dark" msgid="557336259295713662">"داكن"</string>
-</resources>
diff --git a/packages/overlays/SysuiDarkThemeOverlay/res/values-as/strings.xml b/packages/overlays/SysuiDarkThemeOverlay/res/values-as/strings.xml
deleted file mode 100644
index 0910e7e753cb..000000000000
--- a/packages/overlays/SysuiDarkThemeOverlay/res/values-as/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2017, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="sysui_overlay_dark" msgid="557336259295713662">"গাঢ়"</string>
-</resources>
diff --git a/packages/overlays/SysuiDarkThemeOverlay/res/values-az/strings.xml b/packages/overlays/SysuiDarkThemeOverlay/res/values-az/strings.xml
deleted file mode 100644
index a9db75cdb525..000000000000
--- a/packages/overlays/SysuiDarkThemeOverlay/res/values-az/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2017, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="sysui_overlay_dark" msgid="557336259295713662">"Qaranlıq"</string>
-</resources>
diff --git a/packages/overlays/SysuiDarkThemeOverlay/res/values-b+sr+Latn/strings.xml b/packages/overlays/SysuiDarkThemeOverlay/res/values-b+sr+Latn/strings.xml
deleted file mode 100644
index b63dcbcaa88e..000000000000
--- a/packages/overlays/SysuiDarkThemeOverlay/res/values-b+sr+Latn/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2017, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="sysui_overlay_dark" msgid="557336259295713662">"Tamno"</string>
-</resources>
diff --git a/packages/overlays/SysuiDarkThemeOverlay/res/values-be/strings.xml b/packages/overlays/SysuiDarkThemeOverlay/res/values-be/strings.xml
deleted file mode 100644
index eb875b3e8035..000000000000
--- a/packages/overlays/SysuiDarkThemeOverlay/res/values-be/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2017, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="sysui_overlay_dark" msgid="557336259295713662">"Цёмная"</string>
-</resources>
diff --git a/packages/overlays/SysuiDarkThemeOverlay/res/values-bg/strings.xml b/packages/overlays/SysuiDarkThemeOverlay/res/values-bg/strings.xml
deleted file mode 100644
index 7b39462ffc25..000000000000
--- a/packages/overlays/SysuiDarkThemeOverlay/res/values-bg/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2017, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="sysui_overlay_dark" msgid="557336259295713662">"Тъмно"</string>
-</resources>
diff --git a/packages/overlays/SysuiDarkThemeOverlay/res/values-bn/strings.xml b/packages/overlays/SysuiDarkThemeOverlay/res/values-bn/strings.xml
deleted file mode 100644
index 0910e7e753cb..000000000000
--- a/packages/overlays/SysuiDarkThemeOverlay/res/values-bn/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2017, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="sysui_overlay_dark" msgid="557336259295713662">"গাঢ়"</string>
-</resources>
diff --git a/packages/overlays/SysuiDarkThemeOverlay/res/values-bs/strings.xml b/packages/overlays/SysuiDarkThemeOverlay/res/values-bs/strings.xml
deleted file mode 100644
index b63dcbcaa88e..000000000000
--- a/packages/overlays/SysuiDarkThemeOverlay/res/values-bs/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2017, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="sysui_overlay_dark" msgid="557336259295713662">"Tamno"</string>
-</resources>
diff --git a/packages/overlays/SysuiDarkThemeOverlay/res/values-ca/strings.xml b/packages/overlays/SysuiDarkThemeOverlay/res/values-ca/strings.xml
deleted file mode 100644
index 02ee2268bb83..000000000000
--- a/packages/overlays/SysuiDarkThemeOverlay/res/values-ca/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2017, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="sysui_overlay_dark" msgid="557336259295713662">"Fosc"</string>
-</resources>
diff --git a/packages/overlays/SysuiDarkThemeOverlay/res/values-cs/strings.xml b/packages/overlays/SysuiDarkThemeOverlay/res/values-cs/strings.xml
deleted file mode 100644
index 5d11f07d9948..000000000000
--- a/packages/overlays/SysuiDarkThemeOverlay/res/values-cs/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2017, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="sysui_overlay_dark" msgid="557336259295713662">"Tmavé"</string>
-</resources>
diff --git a/packages/overlays/SysuiDarkThemeOverlay/res/values-da/strings.xml b/packages/overlays/SysuiDarkThemeOverlay/res/values-da/strings.xml
deleted file mode 100644
index 460ebe7739bc..000000000000
--- a/packages/overlays/SysuiDarkThemeOverlay/res/values-da/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2017, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="sysui_overlay_dark" msgid="557336259295713662">"Mørk"</string>
-</resources>
diff --git a/packages/overlays/SysuiDarkThemeOverlay/res/values-de/strings.xml b/packages/overlays/SysuiDarkThemeOverlay/res/values-de/strings.xml
deleted file mode 100644
index 4b54b8e11920..000000000000
--- a/packages/overlays/SysuiDarkThemeOverlay/res/values-de/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2017, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="sysui_overlay_dark" msgid="557336259295713662">"Dunkel"</string>
-</resources>
diff --git a/packages/overlays/SysuiDarkThemeOverlay/res/values-el/strings.xml b/packages/overlays/SysuiDarkThemeOverlay/res/values-el/strings.xml
deleted file mode 100644
index c58061dab337..000000000000
--- a/packages/overlays/SysuiDarkThemeOverlay/res/values-el/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2017, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="sysui_overlay_dark" msgid="557336259295713662">"Σκοτεινό"</string>
-</resources>
diff --git a/packages/overlays/SysuiDarkThemeOverlay/res/values-en-rAU/strings.xml b/packages/overlays/SysuiDarkThemeOverlay/res/values-en-rAU/strings.xml
deleted file mode 100644
index 7c94a51ded3c..000000000000
--- a/packages/overlays/SysuiDarkThemeOverlay/res/values-en-rAU/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2017, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="sysui_overlay_dark" msgid="557336259295713662">"Dark"</string>
-</resources>
diff --git a/packages/overlays/SysuiDarkThemeOverlay/res/values-en-rCA/strings.xml b/packages/overlays/SysuiDarkThemeOverlay/res/values-en-rCA/strings.xml
deleted file mode 100644
index 7c94a51ded3c..000000000000
--- a/packages/overlays/SysuiDarkThemeOverlay/res/values-en-rCA/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2017, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="sysui_overlay_dark" msgid="557336259295713662">"Dark"</string>
-</resources>
diff --git a/packages/overlays/SysuiDarkThemeOverlay/res/values-en-rGB/strings.xml b/packages/overlays/SysuiDarkThemeOverlay/res/values-en-rGB/strings.xml
deleted file mode 100644
index 7c94a51ded3c..000000000000
--- a/packages/overlays/SysuiDarkThemeOverlay/res/values-en-rGB/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2017, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="sysui_overlay_dark" msgid="557336259295713662">"Dark"</string>
-</resources>
diff --git a/packages/overlays/SysuiDarkThemeOverlay/res/values-en-rIN/strings.xml b/packages/overlays/SysuiDarkThemeOverlay/res/values-en-rIN/strings.xml
deleted file mode 100644
index 7c94a51ded3c..000000000000
--- a/packages/overlays/SysuiDarkThemeOverlay/res/values-en-rIN/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2017, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="sysui_overlay_dark" msgid="557336259295713662">"Dark"</string>
-</resources>
diff --git a/packages/overlays/SysuiDarkThemeOverlay/res/values-en-rXC/strings.xml b/packages/overlays/SysuiDarkThemeOverlay/res/values-en-rXC/strings.xml
deleted file mode 100644
index cbdd3d2030b4..000000000000
--- a/packages/overlays/SysuiDarkThemeOverlay/res/values-en-rXC/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2017, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="sysui_overlay_dark" msgid="557336259295713662">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‎‏‏‏‏‏‏‎‏‏‏‏‎‎‎‎‎‎‏‏‏‎‎‏‎‏‏‏‏‏‏‏‏‏‏‎‏‏‏‏‎‎‎‏‎‎‎‎‎‏‏‎‎‏‎‏‏‏‏‏‏‎‎Dark‎‏‎‎‏‎"</string>
-</resources>
diff --git a/packages/overlays/SysuiDarkThemeOverlay/res/values-es-rUS/strings.xml b/packages/overlays/SysuiDarkThemeOverlay/res/values-es-rUS/strings.xml
deleted file mode 100644
index 2717f0f879c5..000000000000
--- a/packages/overlays/SysuiDarkThemeOverlay/res/values-es-rUS/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2017, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="sysui_overlay_dark" msgid="557336259295713662">"Oscuro"</string>
-</resources>
diff --git a/packages/overlays/SysuiDarkThemeOverlay/res/values-es/strings.xml b/packages/overlays/SysuiDarkThemeOverlay/res/values-es/strings.xml
deleted file mode 100644
index 2717f0f879c5..000000000000
--- a/packages/overlays/SysuiDarkThemeOverlay/res/values-es/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2017, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="sysui_overlay_dark" msgid="557336259295713662">"Oscuro"</string>
-</resources>
diff --git a/packages/overlays/SysuiDarkThemeOverlay/res/values-et/strings.xml b/packages/overlays/SysuiDarkThemeOverlay/res/values-et/strings.xml
deleted file mode 100644
index e0cce054fc07..000000000000
--- a/packages/overlays/SysuiDarkThemeOverlay/res/values-et/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2017, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="sysui_overlay_dark" msgid="557336259295713662">"Tume"</string>
-</resources>
diff --git a/packages/overlays/SysuiDarkThemeOverlay/res/values-eu/strings.xml b/packages/overlays/SysuiDarkThemeOverlay/res/values-eu/strings.xml
deleted file mode 100644
index 44cee4cf9da4..000000000000
--- a/packages/overlays/SysuiDarkThemeOverlay/res/values-eu/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2017, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="sysui_overlay_dark" msgid="557336259295713662">"Iluna"</string>
-</resources>
diff --git a/packages/overlays/SysuiDarkThemeOverlay/res/values-fa/strings.xml b/packages/overlays/SysuiDarkThemeOverlay/res/values-fa/strings.xml
deleted file mode 100644
index fdd1df54bfff..000000000000
--- a/packages/overlays/SysuiDarkThemeOverlay/res/values-fa/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2017, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="sysui_overlay_dark" msgid="557336259295713662">"تیره"</string>
-</resources>
diff --git a/packages/overlays/SysuiDarkThemeOverlay/res/values-fi/strings.xml b/packages/overlays/SysuiDarkThemeOverlay/res/values-fi/strings.xml
deleted file mode 100644
index 237fe70ff91d..000000000000
--- a/packages/overlays/SysuiDarkThemeOverlay/res/values-fi/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2017, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="sysui_overlay_dark" msgid="557336259295713662">"Tumma"</string>
-</resources>
diff --git a/packages/overlays/SysuiDarkThemeOverlay/res/values-fr-rCA/strings.xml b/packages/overlays/SysuiDarkThemeOverlay/res/values-fr-rCA/strings.xml
deleted file mode 100644
index f92c2ef95af3..000000000000
--- a/packages/overlays/SysuiDarkThemeOverlay/res/values-fr-rCA/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2017, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="sysui_overlay_dark" msgid="557336259295713662">"Sombre"</string>
-</resources>
diff --git a/packages/overlays/SysuiDarkThemeOverlay/res/values-fr/strings.xml b/packages/overlays/SysuiDarkThemeOverlay/res/values-fr/strings.xml
deleted file mode 100644
index eac51d3a4fbf..000000000000
--- a/packages/overlays/SysuiDarkThemeOverlay/res/values-fr/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2017, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="sysui_overlay_dark" msgid="557336259295713662">"Foncé"</string>
-</resources>
diff --git a/packages/overlays/SysuiDarkThemeOverlay/res/values-gl/strings.xml b/packages/overlays/SysuiDarkThemeOverlay/res/values-gl/strings.xml
deleted file mode 100644
index 300868f871e2..000000000000
--- a/packages/overlays/SysuiDarkThemeOverlay/res/values-gl/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2017, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="sysui_overlay_dark" msgid="557336259295713662">"Escuro"</string>
-</resources>
diff --git a/packages/overlays/SysuiDarkThemeOverlay/res/values-gu/strings.xml b/packages/overlays/SysuiDarkThemeOverlay/res/values-gu/strings.xml
deleted file mode 100644
index 6a4cd62ff26f..000000000000
--- a/packages/overlays/SysuiDarkThemeOverlay/res/values-gu/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2017, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="sysui_overlay_dark" msgid="557336259295713662">"ઘેરી"</string>
-</resources>
diff --git a/packages/overlays/SysuiDarkThemeOverlay/res/values-hi/strings.xml b/packages/overlays/SysuiDarkThemeOverlay/res/values-hi/strings.xml
deleted file mode 100644
index c5bc0e24ed5c..000000000000
--- a/packages/overlays/SysuiDarkThemeOverlay/res/values-hi/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2017, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="sysui_overlay_dark" msgid="557336259295713662">"गहरे रंग की थीम"</string>
-</resources>
diff --git a/packages/overlays/SysuiDarkThemeOverlay/res/values-hr/strings.xml b/packages/overlays/SysuiDarkThemeOverlay/res/values-hr/strings.xml
deleted file mode 100644
index b63dcbcaa88e..000000000000
--- a/packages/overlays/SysuiDarkThemeOverlay/res/values-hr/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2017, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="sysui_overlay_dark" msgid="557336259295713662">"Tamno"</string>
-</resources>
diff --git a/packages/overlays/SysuiDarkThemeOverlay/res/values-hu/strings.xml b/packages/overlays/SysuiDarkThemeOverlay/res/values-hu/strings.xml
deleted file mode 100644
index 84a3ab87c721..000000000000
--- a/packages/overlays/SysuiDarkThemeOverlay/res/values-hu/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2017, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="sysui_overlay_dark" msgid="557336259295713662">"Sötét"</string>
-</resources>
diff --git a/packages/overlays/SysuiDarkThemeOverlay/res/values-hy/strings.xml b/packages/overlays/SysuiDarkThemeOverlay/res/values-hy/strings.xml
deleted file mode 100644
index 555cb647083e..000000000000
--- a/packages/overlays/SysuiDarkThemeOverlay/res/values-hy/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2017, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="sysui_overlay_dark" msgid="557336259295713662">"Մուգ"</string>
-</resources>
diff --git a/packages/overlays/SysuiDarkThemeOverlay/res/values-in/strings.xml b/packages/overlays/SysuiDarkThemeOverlay/res/values-in/strings.xml
deleted file mode 100644
index 391451bc3afe..000000000000
--- a/packages/overlays/SysuiDarkThemeOverlay/res/values-in/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2017, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="sysui_overlay_dark" msgid="557336259295713662">"Gelap"</string>
-</resources>
diff --git a/packages/overlays/SysuiDarkThemeOverlay/res/values-is/strings.xml b/packages/overlays/SysuiDarkThemeOverlay/res/values-is/strings.xml
deleted file mode 100644
index f4d15311c951..000000000000
--- a/packages/overlays/SysuiDarkThemeOverlay/res/values-is/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2017, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="sysui_overlay_dark" msgid="557336259295713662">"Dökkt"</string>
-</resources>
diff --git a/packages/overlays/SysuiDarkThemeOverlay/res/values-it/strings.xml b/packages/overlays/SysuiDarkThemeOverlay/res/values-it/strings.xml
deleted file mode 100644
index b59155bda97a..000000000000
--- a/packages/overlays/SysuiDarkThemeOverlay/res/values-it/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2017, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="sysui_overlay_dark" msgid="557336259295713662">"Scuro"</string>
-</resources>
diff --git a/packages/overlays/SysuiDarkThemeOverlay/res/values-iw/strings.xml b/packages/overlays/SysuiDarkThemeOverlay/res/values-iw/strings.xml
deleted file mode 100644
index 3ecf444fcbb0..000000000000
--- a/packages/overlays/SysuiDarkThemeOverlay/res/values-iw/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2017, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="sysui_overlay_dark" msgid="557336259295713662">"כהה"</string>
-</resources>
diff --git a/packages/overlays/SysuiDarkThemeOverlay/res/values-ja/strings.xml b/packages/overlays/SysuiDarkThemeOverlay/res/values-ja/strings.xml
deleted file mode 100644
index 3a2dba02f501..000000000000
--- a/packages/overlays/SysuiDarkThemeOverlay/res/values-ja/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2017, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="sysui_overlay_dark" msgid="557336259295713662">"ダーク"</string>
-</resources>
diff --git a/packages/overlays/SysuiDarkThemeOverlay/res/values-ka/strings.xml b/packages/overlays/SysuiDarkThemeOverlay/res/values-ka/strings.xml
deleted file mode 100644
index 36bf77e1c8a4..000000000000
--- a/packages/overlays/SysuiDarkThemeOverlay/res/values-ka/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2017, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="sysui_overlay_dark" msgid="557336259295713662">"მუქი"</string>
-</resources>
diff --git a/packages/overlays/SysuiDarkThemeOverlay/res/values-kk/strings.xml b/packages/overlays/SysuiDarkThemeOverlay/res/values-kk/strings.xml
deleted file mode 100644
index 913c0b18448d..000000000000
--- a/packages/overlays/SysuiDarkThemeOverlay/res/values-kk/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2017, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="sysui_overlay_dark" msgid="557336259295713662">"Қараңғы"</string>
-</resources>
diff --git a/packages/overlays/SysuiDarkThemeOverlay/res/values-km/strings.xml b/packages/overlays/SysuiDarkThemeOverlay/res/values-km/strings.xml
deleted file mode 100644
index b56c4909fbc7..000000000000
--- a/packages/overlays/SysuiDarkThemeOverlay/res/values-km/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2017, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="sysui_overlay_dark" msgid="557336259295713662">"ងងឹត"</string>
-</resources>
diff --git a/packages/overlays/SysuiDarkThemeOverlay/res/values-kn/strings.xml b/packages/overlays/SysuiDarkThemeOverlay/res/values-kn/strings.xml
deleted file mode 100644
index e75711668387..000000000000
--- a/packages/overlays/SysuiDarkThemeOverlay/res/values-kn/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2017, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="sysui_overlay_dark" msgid="557336259295713662">"ಕತ್ತಲೆ"</string>
-</resources>
diff --git a/packages/overlays/SysuiDarkThemeOverlay/res/values-ko/strings.xml b/packages/overlays/SysuiDarkThemeOverlay/res/values-ko/strings.xml
deleted file mode 100644
index ca4ab1e283ae..000000000000
--- a/packages/overlays/SysuiDarkThemeOverlay/res/values-ko/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2017, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="sysui_overlay_dark" msgid="557336259295713662">"어두움"</string>
-</resources>
diff --git a/packages/overlays/SysuiDarkThemeOverlay/res/values-ky/strings.xml b/packages/overlays/SysuiDarkThemeOverlay/res/values-ky/strings.xml
deleted file mode 100644
index e8e827972a04..000000000000
--- a/packages/overlays/SysuiDarkThemeOverlay/res/values-ky/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2017, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="sysui_overlay_dark" msgid="557336259295713662">"Караңгы"</string>
-</resources>
diff --git a/packages/overlays/SysuiDarkThemeOverlay/res/values-lo/strings.xml b/packages/overlays/SysuiDarkThemeOverlay/res/values-lo/strings.xml
deleted file mode 100644
index 0434a413fb7f..000000000000
--- a/packages/overlays/SysuiDarkThemeOverlay/res/values-lo/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2017, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="sysui_overlay_dark" msgid="557336259295713662">"ມືດ"</string>
-</resources>
diff --git a/packages/overlays/SysuiDarkThemeOverlay/res/values-lt/strings.xml b/packages/overlays/SysuiDarkThemeOverlay/res/values-lt/strings.xml
deleted file mode 100644
index 147779b850f4..000000000000
--- a/packages/overlays/SysuiDarkThemeOverlay/res/values-lt/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2017, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="sysui_overlay_dark" msgid="557336259295713662">"Tamsi"</string>
-</resources>
diff --git a/packages/overlays/SysuiDarkThemeOverlay/res/values-lv/strings.xml b/packages/overlays/SysuiDarkThemeOverlay/res/values-lv/strings.xml
deleted file mode 100644
index 7a296ecda7f3..000000000000
--- a/packages/overlays/SysuiDarkThemeOverlay/res/values-lv/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2017, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="sysui_overlay_dark" msgid="557336259295713662">"Tumšs"</string>
-</resources>
diff --git a/packages/overlays/SysuiDarkThemeOverlay/res/values-mk/strings.xml b/packages/overlays/SysuiDarkThemeOverlay/res/values-mk/strings.xml
deleted file mode 100644
index 6be693af1219..000000000000
--- a/packages/overlays/SysuiDarkThemeOverlay/res/values-mk/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2017, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="sysui_overlay_dark" msgid="557336259295713662">"Темна"</string>
-</resources>
diff --git a/packages/overlays/SysuiDarkThemeOverlay/res/values-ml/strings.xml b/packages/overlays/SysuiDarkThemeOverlay/res/values-ml/strings.xml
deleted file mode 100644
index f8a24fa4af66..000000000000
--- a/packages/overlays/SysuiDarkThemeOverlay/res/values-ml/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2017, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="sysui_overlay_dark" msgid="557336259295713662">"ഡാർക്ക്"</string>
-</resources>
diff --git a/packages/overlays/SysuiDarkThemeOverlay/res/values-mn/strings.xml b/packages/overlays/SysuiDarkThemeOverlay/res/values-mn/strings.xml
deleted file mode 100644
index e65d9c70c07d..000000000000
--- a/packages/overlays/SysuiDarkThemeOverlay/res/values-mn/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2017, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="sysui_overlay_dark" msgid="557336259295713662">"Бараан"</string>
-</resources>
diff --git a/packages/overlays/SysuiDarkThemeOverlay/res/values-mr/strings.xml b/packages/overlays/SysuiDarkThemeOverlay/res/values-mr/strings.xml
deleted file mode 100644
index 854af000ab0f..000000000000
--- a/packages/overlays/SysuiDarkThemeOverlay/res/values-mr/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2017, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="sysui_overlay_dark" msgid="557336259295713662">"गडद"</string>
-</resources>
diff --git a/packages/overlays/SysuiDarkThemeOverlay/res/values-ms/strings.xml b/packages/overlays/SysuiDarkThemeOverlay/res/values-ms/strings.xml
deleted file mode 100644
index 391451bc3afe..000000000000
--- a/packages/overlays/SysuiDarkThemeOverlay/res/values-ms/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2017, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="sysui_overlay_dark" msgid="557336259295713662">"Gelap"</string>
-</resources>
diff --git a/packages/overlays/SysuiDarkThemeOverlay/res/values-my/strings.xml b/packages/overlays/SysuiDarkThemeOverlay/res/values-my/strings.xml
deleted file mode 100644
index 008e9c694a98..000000000000
--- a/packages/overlays/SysuiDarkThemeOverlay/res/values-my/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2017, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="sysui_overlay_dark" msgid="557336259295713662">"မှောင်သော"</string>
-</resources>
diff --git a/packages/overlays/SysuiDarkThemeOverlay/res/values-nb/strings.xml b/packages/overlays/SysuiDarkThemeOverlay/res/values-nb/strings.xml
deleted file mode 100644
index 460ebe7739bc..000000000000
--- a/packages/overlays/SysuiDarkThemeOverlay/res/values-nb/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2017, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="sysui_overlay_dark" msgid="557336259295713662">"Mørk"</string>
-</resources>
diff --git a/packages/overlays/SysuiDarkThemeOverlay/res/values-ne/strings.xml b/packages/overlays/SysuiDarkThemeOverlay/res/values-ne/strings.xml
deleted file mode 100644
index 8f2c5ba89732..000000000000
--- a/packages/overlays/SysuiDarkThemeOverlay/res/values-ne/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2017, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="sysui_overlay_dark" msgid="557336259295713662">"अँध्यारो"</string>
-</resources>
diff --git a/packages/overlays/SysuiDarkThemeOverlay/res/values-nl/strings.xml b/packages/overlays/SysuiDarkThemeOverlay/res/values-nl/strings.xml
deleted file mode 100644
index 33c6982e007a..000000000000
--- a/packages/overlays/SysuiDarkThemeOverlay/res/values-nl/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2017, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="sysui_overlay_dark" msgid="557336259295713662">"Donker"</string>
-</resources>
diff --git a/packages/overlays/SysuiDarkThemeOverlay/res/values-or/strings.xml b/packages/overlays/SysuiDarkThemeOverlay/res/values-or/strings.xml
deleted file mode 100644
index d8045bd6de6e..000000000000
--- a/packages/overlays/SysuiDarkThemeOverlay/res/values-or/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2017, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="sysui_overlay_dark" msgid="557336259295713662">"ଗାଢ଼"</string>
-</resources>
diff --git a/packages/overlays/SysuiDarkThemeOverlay/res/values-pa/strings.xml b/packages/overlays/SysuiDarkThemeOverlay/res/values-pa/strings.xml
deleted file mode 100644
index 71103030493a..000000000000
--- a/packages/overlays/SysuiDarkThemeOverlay/res/values-pa/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2017, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="sysui_overlay_dark" msgid="557336259295713662">"ਗੂੜ੍ਹਾ"</string>
-</resources>
diff --git a/packages/overlays/SysuiDarkThemeOverlay/res/values-pl/strings.xml b/packages/overlays/SysuiDarkThemeOverlay/res/values-pl/strings.xml
deleted file mode 100644
index 25ca20fe421d..000000000000
--- a/packages/overlays/SysuiDarkThemeOverlay/res/values-pl/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2017, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="sysui_overlay_dark" msgid="557336259295713662">"Ciemna"</string>
-</resources>
diff --git a/packages/overlays/SysuiDarkThemeOverlay/res/values-pt-rBR/strings.xml b/packages/overlays/SysuiDarkThemeOverlay/res/values-pt-rBR/strings.xml
deleted file mode 100644
index 300868f871e2..000000000000
--- a/packages/overlays/SysuiDarkThemeOverlay/res/values-pt-rBR/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2017, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="sysui_overlay_dark" msgid="557336259295713662">"Escuro"</string>
-</resources>
diff --git a/packages/overlays/SysuiDarkThemeOverlay/res/values-pt-rPT/strings.xml b/packages/overlays/SysuiDarkThemeOverlay/res/values-pt-rPT/strings.xml
deleted file mode 100644
index 300868f871e2..000000000000
--- a/packages/overlays/SysuiDarkThemeOverlay/res/values-pt-rPT/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2017, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="sysui_overlay_dark" msgid="557336259295713662">"Escuro"</string>
-</resources>
diff --git a/packages/overlays/SysuiDarkThemeOverlay/res/values-pt/strings.xml b/packages/overlays/SysuiDarkThemeOverlay/res/values-pt/strings.xml
deleted file mode 100644
index 300868f871e2..000000000000
--- a/packages/overlays/SysuiDarkThemeOverlay/res/values-pt/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2017, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="sysui_overlay_dark" msgid="557336259295713662">"Escuro"</string>
-</resources>
diff --git a/packages/overlays/SysuiDarkThemeOverlay/res/values-ro/strings.xml b/packages/overlays/SysuiDarkThemeOverlay/res/values-ro/strings.xml
deleted file mode 100644
index de73f36e6b83..000000000000
--- a/packages/overlays/SysuiDarkThemeOverlay/res/values-ro/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2017, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="sysui_overlay_dark" msgid="557336259295713662">"Întunecată"</string>
-</resources>
diff --git a/packages/overlays/SysuiDarkThemeOverlay/res/values-ru/strings.xml b/packages/overlays/SysuiDarkThemeOverlay/res/values-ru/strings.xml
deleted file mode 100644
index b05e84454c68..000000000000
--- a/packages/overlays/SysuiDarkThemeOverlay/res/values-ru/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2017, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="sysui_overlay_dark" msgid="557336259295713662">"Темный"</string>
-</resources>
diff --git a/packages/overlays/SysuiDarkThemeOverlay/res/values-si/strings.xml b/packages/overlays/SysuiDarkThemeOverlay/res/values-si/strings.xml
deleted file mode 100644
index f0f572502f5f..000000000000
--- a/packages/overlays/SysuiDarkThemeOverlay/res/values-si/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2017, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="sysui_overlay_dark" msgid="557336259295713662">"අඳුරු"</string>
-</resources>
diff --git a/packages/overlays/SysuiDarkThemeOverlay/res/values-sk/strings.xml b/packages/overlays/SysuiDarkThemeOverlay/res/values-sk/strings.xml
deleted file mode 100644
index 5df68959b1a2..000000000000
--- a/packages/overlays/SysuiDarkThemeOverlay/res/values-sk/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2017, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="sysui_overlay_dark" msgid="557336259295713662">"Tmavý"</string>
-</resources>
diff --git a/packages/overlays/SysuiDarkThemeOverlay/res/values-sl/strings.xml b/packages/overlays/SysuiDarkThemeOverlay/res/values-sl/strings.xml
deleted file mode 100644
index ad58250a117c..000000000000
--- a/packages/overlays/SysuiDarkThemeOverlay/res/values-sl/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2017, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="sysui_overlay_dark" msgid="557336259295713662">"Temno"</string>
-</resources>
diff --git a/packages/overlays/SysuiDarkThemeOverlay/res/values-sq/strings.xml b/packages/overlays/SysuiDarkThemeOverlay/res/values-sq/strings.xml
deleted file mode 100644
index 0e1eae7064b6..000000000000
--- a/packages/overlays/SysuiDarkThemeOverlay/res/values-sq/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2017, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="sysui_overlay_dark" msgid="557336259295713662">"E errët"</string>
-</resources>
diff --git a/packages/overlays/SysuiDarkThemeOverlay/res/values-sr/strings.xml b/packages/overlays/SysuiDarkThemeOverlay/res/values-sr/strings.xml
deleted file mode 100644
index 1561ee298a2c..000000000000
--- a/packages/overlays/SysuiDarkThemeOverlay/res/values-sr/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2017, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="sysui_overlay_dark" msgid="557336259295713662">"Тамно"</string>
-</resources>
diff --git a/packages/overlays/SysuiDarkThemeOverlay/res/values-sv/strings.xml b/packages/overlays/SysuiDarkThemeOverlay/res/values-sv/strings.xml
deleted file mode 100644
index 676de42dceb1..000000000000
--- a/packages/overlays/SysuiDarkThemeOverlay/res/values-sv/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2017, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="sysui_overlay_dark" msgid="557336259295713662">"Mörk"</string>
-</resources>
diff --git a/packages/overlays/SysuiDarkThemeOverlay/res/values-sw/strings.xml b/packages/overlays/SysuiDarkThemeOverlay/res/values-sw/strings.xml
deleted file mode 100644
index cc1f120adfc1..000000000000
--- a/packages/overlays/SysuiDarkThemeOverlay/res/values-sw/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2017, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="sysui_overlay_dark" msgid="557336259295713662">"Nyeusi"</string>
-</resources>
diff --git a/packages/overlays/SysuiDarkThemeOverlay/res/values-ta/strings.xml b/packages/overlays/SysuiDarkThemeOverlay/res/values-ta/strings.xml
deleted file mode 100644
index af98172472d4..000000000000
--- a/packages/overlays/SysuiDarkThemeOverlay/res/values-ta/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2017, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="sysui_overlay_dark" msgid="557336259295713662">"டார்க்"</string>
-</resources>
diff --git a/packages/overlays/SysuiDarkThemeOverlay/res/values-te/strings.xml b/packages/overlays/SysuiDarkThemeOverlay/res/values-te/strings.xml
deleted file mode 100644
index 446455fe7dd8..000000000000
--- a/packages/overlays/SysuiDarkThemeOverlay/res/values-te/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2017, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="sysui_overlay_dark" msgid="557336259295713662">"ముదురు రంగు"</string>
-</resources>
diff --git a/packages/overlays/SysuiDarkThemeOverlay/res/values-th/strings.xml b/packages/overlays/SysuiDarkThemeOverlay/res/values-th/strings.xml
deleted file mode 100644
index 9e3462b61e4b..000000000000
--- a/packages/overlays/SysuiDarkThemeOverlay/res/values-th/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2017, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="sysui_overlay_dark" msgid="557336259295713662">"เข้ม"</string>
-</resources>
diff --git a/packages/overlays/SysuiDarkThemeOverlay/res/values-tl/strings.xml b/packages/overlays/SysuiDarkThemeOverlay/res/values-tl/strings.xml
deleted file mode 100644
index 5502d90a889c..000000000000
--- a/packages/overlays/SysuiDarkThemeOverlay/res/values-tl/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2017, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="sysui_overlay_dark" msgid="557336259295713662">"Madilim"</string>
-</resources>
diff --git a/packages/overlays/SysuiDarkThemeOverlay/res/values-tr/strings.xml b/packages/overlays/SysuiDarkThemeOverlay/res/values-tr/strings.xml
deleted file mode 100644
index 368b398bcf17..000000000000
--- a/packages/overlays/SysuiDarkThemeOverlay/res/values-tr/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2017, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="sysui_overlay_dark" msgid="557336259295713662">"Koyu"</string>
-</resources>
diff --git a/packages/overlays/SysuiDarkThemeOverlay/res/values-uk/strings.xml b/packages/overlays/SysuiDarkThemeOverlay/res/values-uk/strings.xml
deleted file mode 100644
index 6e67e455e95d..000000000000
--- a/packages/overlays/SysuiDarkThemeOverlay/res/values-uk/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2017, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="sysui_overlay_dark" msgid="557336259295713662">"Темна тема"</string>
-</resources>
diff --git a/packages/overlays/SysuiDarkThemeOverlay/res/values-ur/strings.xml b/packages/overlays/SysuiDarkThemeOverlay/res/values-ur/strings.xml
deleted file mode 100644
index 1d5d6de407b3..000000000000
--- a/packages/overlays/SysuiDarkThemeOverlay/res/values-ur/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2017, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="sysui_overlay_dark" msgid="557336259295713662">"گہرا"</string>
-</resources>
diff --git a/packages/overlays/SysuiDarkThemeOverlay/res/values-uz/strings.xml b/packages/overlays/SysuiDarkThemeOverlay/res/values-uz/strings.xml
deleted file mode 100644
index 957c28f8fb04..000000000000
--- a/packages/overlays/SysuiDarkThemeOverlay/res/values-uz/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2017, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="sysui_overlay_dark" msgid="557336259295713662">"Tungi"</string>
-</resources>
diff --git a/packages/overlays/SysuiDarkThemeOverlay/res/values-vi/strings.xml b/packages/overlays/SysuiDarkThemeOverlay/res/values-vi/strings.xml
deleted file mode 100644
index a45888955988..000000000000
--- a/packages/overlays/SysuiDarkThemeOverlay/res/values-vi/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2017, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="sysui_overlay_dark" msgid="557336259295713662">"Tối"</string>
-</resources>
diff --git a/packages/overlays/SysuiDarkThemeOverlay/res/values-zh-rCN/strings.xml b/packages/overlays/SysuiDarkThemeOverlay/res/values-zh-rCN/strings.xml
deleted file mode 100644
index c9b43dcba4ea..000000000000
--- a/packages/overlays/SysuiDarkThemeOverlay/res/values-zh-rCN/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2017, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="sysui_overlay_dark" msgid="557336259295713662">"深色"</string>
-</resources>
diff --git a/packages/overlays/SysuiDarkThemeOverlay/res/values-zh-rHK/strings.xml b/packages/overlays/SysuiDarkThemeOverlay/res/values-zh-rHK/strings.xml
deleted file mode 100644
index c9b43dcba4ea..000000000000
--- a/packages/overlays/SysuiDarkThemeOverlay/res/values-zh-rHK/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2017, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="sysui_overlay_dark" msgid="557336259295713662">"深色"</string>
-</resources>
diff --git a/packages/overlays/SysuiDarkThemeOverlay/res/values-zh-rTW/strings.xml b/packages/overlays/SysuiDarkThemeOverlay/res/values-zh-rTW/strings.xml
deleted file mode 100644
index c9b43dcba4ea..000000000000
--- a/packages/overlays/SysuiDarkThemeOverlay/res/values-zh-rTW/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2017, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="sysui_overlay_dark" msgid="557336259295713662">"深色"</string>
-</resources>
diff --git a/packages/overlays/SysuiDarkThemeOverlay/res/values-zu/strings.xml b/packages/overlays/SysuiDarkThemeOverlay/res/values-zu/strings.xml
deleted file mode 100644
index 6d328da358a7..000000000000
--- a/packages/overlays/SysuiDarkThemeOverlay/res/values-zu/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2017, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="sysui_overlay_dark" msgid="557336259295713662">"Emnyama"</string>
-</resources>
diff --git a/packages/overlays/SysuiDarkThemeOverlay/res/values/strings.xml b/packages/overlays/SysuiDarkThemeOverlay/res/values/strings.xml
deleted file mode 100644
index 71f48d6279f1..000000000000
--- a/packages/overlays/SysuiDarkThemeOverlay/res/values/strings.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/**
- * Copyright (c) 2017, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
--->
-<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-
- <string name="sysui_overlay_dark">Dark</string>
-
-</resources>
-
diff --git a/packages/overlays/SysuiDarkThemeOverlay/res/values/styles.xml b/packages/overlays/SysuiDarkThemeOverlay/res/values/styles.xml
deleted file mode 100644
index 41a294092648..000000000000
--- a/packages/overlays/SysuiDarkThemeOverlay/res/values/styles.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<resources>
- <style name="qs_base" parent="android:Theme.DeviceDefault">
- <item name="android:colorPrimary">@*android:color/primary_device_default_settings</item>
- <item name="android:colorPrimaryDark">@*android:color/primary_dark_device_default_settings</item>
- <item name="android:colorSecondary">@*android:color/secondary_device_default_settings</item>
- <item name="android:colorAccent">@*android:color/accent_device_default_dark</item>
- <item name="android:colorControlNormal">?android:attr/textColorPrimary</item>
- <item name="android:colorBackgroundFloating">@*android:color/material_grey_900</item>
- <item name="android:panelColorBackground">@*android:color/material_grey_800</item>
- </style>
-</resources> \ No newline at end of file
diff --git a/services/core/java/com/android/server/AlarmManagerService.java b/services/core/java/com/android/server/AlarmManagerService.java
index cc5acdf5abfa..7185f025ba8c 100644
--- a/services/core/java/com/android/server/AlarmManagerService.java
+++ b/services/core/java/com/android/server/AlarmManagerService.java
@@ -2690,7 +2690,7 @@ class AlarmManagerService extends SystemService {
errorMsg.append("[mNextNonWakeup=");
TimeUtils.formatDuration(mNextNonWakeup - nowElapsed, errorMsg);
errorMsg.append(" set at ");
- TimeUtils.formatDuration(mNextNonWakeUpSetAt, errorMsg);
+ TimeUtils.formatDuration(mNextNonWakeUpSetAt - nowElapsed, errorMsg);
errorMsg.append(", mLastWakeup=");
TimeUtils.formatDuration(mLastWakeup - nowElapsed, errorMsg);
errorMsg.append(", timerfd_gettime=" + getNextAlarm(mNativeData, ELAPSED_REALTIME));
@@ -2701,7 +2701,7 @@ class AlarmManagerService extends SystemService {
errorMsg.append("[mNextWakeup=");
TimeUtils.formatDuration(mNextWakeup - nowElapsed, errorMsg);
errorMsg.append(" set at ");
- TimeUtils.formatDuration(mNextWakeUpSetAt, errorMsg);
+ TimeUtils.formatDuration(mNextWakeUpSetAt - nowElapsed, errorMsg);
errorMsg.append(", mLastWakeup=");
TimeUtils.formatDuration(mLastWakeup - nowElapsed, errorMsg);
errorMsg.append(", timerfd_gettime="
diff --git a/services/core/java/com/android/server/AppOpsService.java b/services/core/java/com/android/server/AppOpsService.java
index 1167e1d41a9c..b3f6bd1d41cc 100644
--- a/services/core/java/com/android/server/AppOpsService.java
+++ b/services/core/java/com/android/server/AppOpsService.java
@@ -22,6 +22,7 @@ import android.app.ActivityThread;
import android.app.AppGlobals;
import android.app.AppOpsManager;
import android.app.AppOpsManagerInternal;
+import android.app.AppOpsManagerInternal.CheckOpsDelegate;
import android.content.ContentResolver;
import android.content.Context;
import android.content.pm.ApplicationInfo;
@@ -207,6 +208,8 @@ public class AppOpsService extends IAppOpsService.Stub {
SparseIntArray mProfileOwners;
+ private CheckOpsDelegate mCheckOpsDelegate;
+
/**
* All times are in milliseconds. These constants are kept synchronized with the system
* global Settings. Any access to this class or its fields should be done while
@@ -1411,15 +1414,39 @@ public class AppOpsService extends IAppOpsService.Stub {
}
}
+ public CheckOpsDelegate getAppOpsServiceDelegate() {
+ synchronized (this) {
+ return mCheckOpsDelegate;
+ }
+ }
+
+ public void setAppOpsServiceDelegate(CheckOpsDelegate delegate) {
+ synchronized (this) {
+ mCheckOpsDelegate = delegate;
+ }
+ }
+
@Override
public int checkOperation(int code, int uid, String packageName) {
- verifyIncomingUid(uid);
- verifyIncomingOp(code);
- String resolvedPackageName = resolvePackageName(uid, packageName);
- if (resolvedPackageName == null) {
- return AppOpsManager.MODE_IGNORED;
+ final CheckOpsDelegate delegate;
+ synchronized (this) {
+ if (mCheckOpsDelegate == null) {
+ return checkOperationImpl(code, uid, packageName);
+ }
+ delegate = mCheckOpsDelegate;
}
+ return delegate.checkOperation(code, uid, packageName,
+ AppOpsService.this::checkOperationImpl);
+ }
+
+ private int checkOperationImpl(int code, int uid, String packageName) {
synchronized (this) {
+ verifyIncomingUid(uid);
+ verifyIncomingOp(code);
+ String resolvedPackageName = resolvePackageName(uid, packageName);
+ if (resolvedPackageName == null) {
+ return AppOpsManager.MODE_IGNORED;
+ }
if (isOpRestrictedLocked(uid, code, resolvedPackageName)) {
return AppOpsManager.MODE_IGNORED;
}
@@ -1439,20 +1466,33 @@ public class AppOpsService extends IAppOpsService.Stub {
@Override
public int checkAudioOperation(int code, int usage, int uid, String packageName) {
- boolean suspended;
- try {
- suspended = isPackageSuspendedForUser(packageName, uid);
- } catch (IllegalArgumentException ex) {
- // Package not found.
- suspended = false;
- }
-
- if (suspended) {
- Slog.i(TAG, "Audio disabled for suspended package=" + packageName + " for uid=" + uid);
- return AppOpsManager.MODE_IGNORED;
+ final CheckOpsDelegate delegate;
+ synchronized (this) {
+ if (mCheckOpsDelegate == null) {
+ return checkAudioOperationImpl(code, usage, uid, packageName);
+ }
+ delegate = mCheckOpsDelegate;
}
+ return delegate.checkAudioOperation(code, usage, uid, packageName,
+ AppOpsService.this::checkAudioOperationImpl);
+ }
+ private int checkAudioOperationImpl(int code, int usage, int uid, String packageName) {
synchronized (this) {
+ boolean suspended;
+ try {
+ suspended = isPackageSuspendedForUser(packageName, uid);
+ } catch (IllegalArgumentException ex) {
+ // Package not found.
+ suspended = false;
+ }
+
+ if (suspended) {
+ Slog.i(TAG, "Audio disabled for suspended package=" + packageName
+ + " for uid=" + uid);
+ return AppOpsManager.MODE_IGNORED;
+ }
+
final int mode = checkRestrictionLocked(code, usage, uid, packageName);
if (mode != AppOpsManager.MODE_ALLOWED) {
return mode;
@@ -1530,10 +1570,10 @@ public class AppOpsService extends IAppOpsService.Stub {
}
@Override
- public int noteProxyOperation(int code, String proxyPackageName,
- int proxiedUid, String proxiedPackageName) {
+ public int noteProxyOperation(int code, int proxyUid,
+ String proxyPackageName, int proxiedUid, String proxiedPackageName) {
+ verifyIncomingUid(proxyUid);
verifyIncomingOp(code);
- final int proxyUid = Binder.getCallingUid();
String resolveProxyPackageName = resolvePackageName(proxyUid, proxyPackageName);
if (resolveProxyPackageName == null) {
return AppOpsManager.MODE_IGNORED;
@@ -1553,6 +1593,18 @@ public class AppOpsService extends IAppOpsService.Stub {
@Override
public int noteOperation(int code, int uid, String packageName) {
+ final CheckOpsDelegate delegate;
+ synchronized (this) {
+ if (mCheckOpsDelegate == null) {
+ return noteOperationImpl(code, uid, packageName);
+ }
+ delegate = mCheckOpsDelegate;
+ }
+ return delegate.noteOperation(code, uid, packageName,
+ AppOpsService.this::noteOperationImpl);
+ }
+
+ private int noteOperationImpl(int code, int uid, String packageName) {
verifyIncomingUid(uid);
verifyIncomingOp(code);
String resolvedPackageName = resolvePackageName(uid, packageName);
diff --git a/services/core/java/com/android/server/BinderCallsStatsService.java b/services/core/java/com/android/server/BinderCallsStatsService.java
index 490fcc1eb253..3d779d80b9a1 100644
--- a/services/core/java/com/android/server/BinderCallsStatsService.java
+++ b/services/core/java/com/android/server/BinderCallsStatsService.java
@@ -17,15 +17,20 @@
package com.android.server;
import android.app.AppGlobals;
+import android.content.Context;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
+import android.database.ContentObserver;
+import android.net.Uri;
import android.os.Binder;
import android.os.RemoteException;
-import android.os.ServiceManager;
import android.os.SystemProperties;
import android.os.UserHandle;
+import android.provider.Settings;
+import android.util.KeyValueListParser;
import android.util.Slog;
+import com.android.internal.os.BackgroundThread;
import com.android.internal.os.BinderCallsStats;
import java.io.FileDescriptor;
@@ -41,18 +46,90 @@ public class BinderCallsStatsService extends Binder {
private static final String PERSIST_SYS_BINDER_CALLS_DETAILED_TRACKING
= "persist.sys.binder_calls_detailed_tracking";
- public static void start() {
- BinderCallsStatsService service = new BinderCallsStatsService();
- ServiceManager.addService("binder_calls_stats", service);
- boolean detailedTrackingEnabled = SystemProperties.getBoolean(
- PERSIST_SYS_BINDER_CALLS_DETAILED_TRACKING, false);
-
- if (detailedTrackingEnabled) {
- Slog.i(TAG, "Enabled CPU usage tracking for binder calls. Controlled by "
- + PERSIST_SYS_BINDER_CALLS_DETAILED_TRACKING
- + " or via dumpsys binder_calls_stats --enable-detailed-tracking");
- BinderCallsStats.getInstance().setDetailedTracking(true);
+ /** Listens for flag changes. */
+ private static class SettingsObserver extends ContentObserver {
+ private static final String SETTINGS_ENABLED_KEY = "enabled";
+ private static final String SETTINGS_DETAILED_TRACKING_KEY = "detailed_tracking";
+ private static final String SETTINGS_UPLOAD_DATA_KEY = "upload_data";
+ private static final String SETTINGS_SAMPLING_INTERVAL_KEY = "sampling_interval";
+
+ private final Uri mUri = Settings.Global.getUriFor(Settings.Global.BINDER_CALLS_STATS);
+ private final Context mContext;
+ private final KeyValueListParser mParser = new KeyValueListParser(',');
+
+ public SettingsObserver(Context context) {
+ super(BackgroundThread.getHandler());
+ mContext = context;
+ context.getContentResolver().registerContentObserver(mUri, false, this,
+ UserHandle.USER_SYSTEM);
+ // Always kick once to ensure that we match current state
+ onChange();
+ }
+
+ @Override
+ public void onChange(boolean selfChange, Uri uri, int userId) {
+ if (mUri.equals(uri)) {
+ onChange();
+ }
+ }
+
+ public void onChange() {
+ // Do not overwrite the default set manually.
+ if (!SystemProperties.get(PERSIST_SYS_BINDER_CALLS_DETAILED_TRACKING).isEmpty()) {
+ return;
+ }
+
+ BinderCallsStats stats = BinderCallsStats.getInstance();
+ try {
+ mParser.setString(Settings.Global.getString(mContext.getContentResolver(),
+ Settings.Global.BINDER_CALLS_STATS));
+ } catch (IllegalArgumentException e) {
+ Slog.e(TAG, "Bad binder call stats settings", e);
+ }
+ stats.setEnabled(
+ mParser.getBoolean(SETTINGS_ENABLED_KEY, BinderCallsStats.ENABLED_DEFAULT));
+ stats.setDetailedTracking(mParser.getBoolean(
+ SETTINGS_DETAILED_TRACKING_KEY, BinderCallsStats.DETAILED_TRACKING_DEFAULT));
+ stats.setSamplingInterval(mParser.getInt(
+ SETTINGS_SAMPLING_INTERVAL_KEY,
+ BinderCallsStats.PERIODIC_SAMPLING_INTERVAL_DEFAULT));
+ }
+ }
+
+ public static class LifeCycle extends SystemService {
+ private BinderCallsStatsService mService;
+
+ public LifeCycle(Context context) {
+ super(context);
+ }
+
+ @Override
+ public void onStart() {
+ mService = new BinderCallsStatsService();
+ publishBinderService("binder_calls_stats", mService);
+ boolean detailedTrackingEnabled = SystemProperties.getBoolean(
+ PERSIST_SYS_BINDER_CALLS_DETAILED_TRACKING, false);
+
+ if (detailedTrackingEnabled) {
+ Slog.i(TAG, "Enabled CPU usage tracking for binder calls. Controlled by "
+ + PERSIST_SYS_BINDER_CALLS_DETAILED_TRACKING
+ + " or via dumpsys binder_calls_stats --enable-detailed-tracking");
+ BinderCallsStats.getInstance().setDetailedTracking(true);
+ }
}
+
+ @Override
+ public void onBootPhase(int phase) {
+ if (SystemService.PHASE_SYSTEM_SERVICES_READY == phase) {
+ mService.systemReady(getContext());
+ }
+ }
+ }
+
+ private SettingsObserver mSettingsObserver;
+
+ public void systemReady(Context context) {
+ mSettingsObserver = new SettingsObserver(context);
}
public static void reset() {
diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java
index 456b676734ee..5028fd59124f 100644
--- a/services/core/java/com/android/server/am/ActivityManagerService.java
+++ b/services/core/java/com/android/server/am/ActivityManagerService.java
@@ -167,6 +167,7 @@ import android.app.ActivityThread;
import android.app.AlertDialog;
import android.app.AppGlobals;
import android.app.AppOpsManager;
+import android.app.AppOpsManagerInternal.CheckOpsDelegate;
import android.app.ApplicationErrorReport;
import android.app.ApplicationThreadConstants;
import android.app.BroadcastOptions;
@@ -222,6 +223,7 @@ import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.pm.PackageManager.NameNotFoundException;
import android.content.pm.PackageManagerInternal;
+import android.content.pm.PackageManagerInternal.CheckPermissionDelegate;
import android.content.pm.ParceledListSlice;
import android.content.pm.PathPermission;
import android.content.pm.PermissionInfo;
@@ -343,6 +345,8 @@ import com.android.internal.util.FastPrintWriter;
import com.android.internal.util.FastXmlSerializer;
import com.android.internal.util.MemInfoReader;
import com.android.internal.util.Preconditions;
+import com.android.internal.util.function.QuadFunction;
+import com.android.internal.util.function.TriFunction;
import com.android.server.AlarmManagerInternal;
import com.android.server.AppOpsService;
import com.android.server.AttributeCache;
@@ -423,6 +427,7 @@ import java.util.concurrent.CountDownLatch;
import java.util.concurrent.Executor;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicLong;
+import java.util.function.BiFunction;
import dalvik.system.VMRuntime;
import libcore.io.IoUtils;
@@ -18504,6 +18509,8 @@ public class ActivityManagerService extends IActivityManager.Stub
// Can't call out of the system process with a lock held, so post a message.
if (app.instr.mUiAutomationConnection != null) {
+ mAppOpsService.setAppOpsServiceDelegate(null);
+ getPackageManagerInternalLocked().setCheckPermissionDelegate(null);
mHandler.obtainMessage(SHUTDOWN_UI_AUTOMATION_CONNECTION_MSG,
app.instr.mUiAutomationConnection).sendToTarget();
}
@@ -18749,6 +18756,129 @@ public class ActivityManagerService extends IActivityManager.Stub
}
}
+ private final ComputeOomAdjWindowCallback mTmpComputeOomAdjWindowCallback =
+ new ComputeOomAdjWindowCallback();
+
+ private final class ComputeOomAdjWindowCallback
+ implements WindowProcessController.ComputeOomAdjCallback {
+
+ ProcessRecord app;
+ int adj;
+ boolean foregroundActivities;
+ int procState;
+ int schedGroup;
+ int appUid;
+ int logUid;
+ int processStateCurTop;
+
+ void initialize(ProcessRecord app, int adj, boolean foregroundActivities,
+ int procState, int schedGroup, int appUid, int logUid, int processStateCurTop) {
+ this.app = app;
+ this.adj = adj;
+ this.foregroundActivities = foregroundActivities;
+ this.procState = procState;
+ this.schedGroup = schedGroup;
+ this.appUid = appUid;
+ this.logUid = logUid;
+ this.processStateCurTop = processStateCurTop;
+ }
+
+ @Override
+ public void onVisibleActivity() {
+ // App has a visible activity; only upgrade adjustment.
+ if (adj > ProcessList.VISIBLE_APP_ADJ) {
+ adj = ProcessList.VISIBLE_APP_ADJ;
+ app.adjType = "vis-activity";
+ if (DEBUG_OOM_ADJ_REASON || logUid == appUid) {
+ reportOomAdjMessageLocked(TAG_OOM_ADJ, "Raise adj to vis-activity: " + app);
+ }
+ }
+ if (procState > processStateCurTop) {
+ procState = processStateCurTop;
+ app.adjType = "vis-activity";
+ if (DEBUG_OOM_ADJ_REASON || logUid == appUid) {
+ reportOomAdjMessageLocked(TAG_OOM_ADJ,
+ "Raise procstate to vis-activity (top): " + app);
+ }
+ }
+ if (schedGroup < ProcessList.SCHED_GROUP_DEFAULT) {
+ schedGroup = ProcessList.SCHED_GROUP_DEFAULT;
+ }
+ app.cached = false;
+ app.empty = false;
+ foregroundActivities = true;
+ }
+
+ @Override
+ public void onPausedActivity() {
+ if (adj > ProcessList.PERCEPTIBLE_APP_ADJ) {
+ adj = ProcessList.PERCEPTIBLE_APP_ADJ;
+ app.adjType = "pause-activity";
+ if (DEBUG_OOM_ADJ_REASON || logUid == appUid) {
+ reportOomAdjMessageLocked(TAG_OOM_ADJ, "Raise adj to pause-activity: " + app);
+ }
+ }
+ if (procState > processStateCurTop) {
+ procState = processStateCurTop;
+ app.adjType = "pause-activity";
+ if (DEBUG_OOM_ADJ_REASON || logUid == appUid) {
+ reportOomAdjMessageLocked(TAG_OOM_ADJ,
+ "Raise procstate to pause-activity (top): " + app);
+ }
+ }
+ if (schedGroup < ProcessList.SCHED_GROUP_DEFAULT) {
+ schedGroup = ProcessList.SCHED_GROUP_DEFAULT;
+ }
+ app.cached = false;
+ app.empty = false;
+ foregroundActivities = true;
+ }
+
+ @Override
+ public void onStoppingActivity(boolean finishing) {
+ if (adj > ProcessList.PERCEPTIBLE_APP_ADJ) {
+ adj = ProcessList.PERCEPTIBLE_APP_ADJ;
+ app.adjType = "stop-activity";
+ if (DEBUG_OOM_ADJ_REASON || logUid == appUid) {
+ reportOomAdjMessageLocked(TAG_OOM_ADJ,
+ "Raise adj to stop-activity: " + app);
+ }
+ }
+
+ // For the process state, we will at this point consider the process to be cached. It
+ // will be cached either as an activity or empty depending on whether the activity is
+ // finishing. We do this so that we can treat the process as cached for purposes of
+ // memory trimming (determining current memory level, trim command to send to process)
+ // since there can be an arbitrary number of stopping processes and they should soon all
+ // go into the cached state.
+ if (!finishing) {
+ if (procState > PROCESS_STATE_LAST_ACTIVITY) {
+ procState = PROCESS_STATE_LAST_ACTIVITY;
+ app.adjType = "stop-activity";
+ if (DEBUG_OOM_ADJ_REASON || logUid == appUid) {
+ reportOomAdjMessageLocked(TAG_OOM_ADJ,
+ "Raise procstate to stop-activity: " + app);
+ }
+ }
+ }
+ app.cached = false;
+ app.empty = false;
+ foregroundActivities = true;
+ }
+
+ @Override
+ public void onOtherActivity() {
+ if (procState > PROCESS_STATE_CACHED_ACTIVITY) {
+ procState = PROCESS_STATE_CACHED_ACTIVITY;
+ app.adjType = "cch-act";
+ if (DEBUG_OOM_ADJ_REASON || logUid == appUid) {
+ reportOomAdjMessageLocked(TAG_OOM_ADJ,
+ "Raise procstate to cached activity: " + app);
+ }
+ }
+ }
+ }
+
private final boolean computeOomAdjLocked(ProcessRecord app, int cachedAdj, ProcessRecord TOP_APP,
boolean doingAll, long now) {
if (mAdjSeq == app.adjSeq) {
@@ -18920,119 +19050,15 @@ public class ActivityManagerService extends IActivityManager.Stub
// Examine all activities if not already foreground.
if (!foregroundActivities && wpc.hasActivities()) {
- final int[] adjHolder = new int[1];
- adjHolder[0] = adj;
- final boolean[] foregroundActivitiesHolder = new boolean[1];
- foregroundActivitiesHolder[0] = foregroundActivities;
- int[] procStateHolder = new int[1];
- procStateHolder[0] = procState;
- int[] schedGroupHolder = new int[1];
- schedGroupHolder[0] = schedGroup;
-
- int minLayer = wpc.computeOomAdjFromActivities(ProcessList.VISIBLE_APP_LAYER_MAX,
- new WindowProcessController.ComputeOomAdjCallback() {
- @Override
- public void onVisibleActivity() {
- // App has a visible activity; only upgrade adjustment.
- if (adjHolder[0] > ProcessList.VISIBLE_APP_ADJ) {
- adjHolder[0] = ProcessList.VISIBLE_APP_ADJ;
- app.adjType = "vis-activity";
- if (DEBUG_OOM_ADJ_REASON || logUid == appUid) {
- reportOomAdjMessageLocked(TAG_OOM_ADJ,
- "Raise adj to vis-activity: " + app);
- }
- }
- if (procStateHolder[0] > PROCESS_STATE_CUR_TOP) {
- procStateHolder[0] = PROCESS_STATE_CUR_TOP;
- app.adjType = "vis-activity";
- if (DEBUG_OOM_ADJ_REASON || logUid == appUid) {
- reportOomAdjMessageLocked(TAG_OOM_ADJ,
- "Raise procstate to vis-activity (top): " + app);
- }
- }
- if (schedGroupHolder[0] < ProcessList.SCHED_GROUP_DEFAULT) {
- schedGroupHolder[0] = ProcessList.SCHED_GROUP_DEFAULT;
- }
- app.cached = false;
- app.empty = false;
- foregroundActivitiesHolder[0] = true;
- }
+ mTmpComputeOomAdjWindowCallback.initialize(app, adj, foregroundActivities, procState,
+ schedGroup, appUid, logUid, PROCESS_STATE_CUR_TOP);
+ final int minLayer = wpc.computeOomAdjFromActivities(
+ ProcessList.VISIBLE_APP_LAYER_MAX, mTmpComputeOomAdjWindowCallback);
- @Override
- public void onPausedActivity() {
- if (adjHolder[0] > ProcessList.PERCEPTIBLE_APP_ADJ) {
- adjHolder[0] = ProcessList.PERCEPTIBLE_APP_ADJ;
- app.adjType = "pause-activity";
- if (DEBUG_OOM_ADJ_REASON || logUid == appUid) {
- reportOomAdjMessageLocked(TAG_OOM_ADJ,
- "Raise adj to pause-activity: " + app);
- }
- }
- if (procStateHolder[0] > PROCESS_STATE_CUR_TOP) {
- procStateHolder[0] = PROCESS_STATE_CUR_TOP;
- app.adjType = "pause-activity";
- if (DEBUG_OOM_ADJ_REASON || logUid == appUid) {
- reportOomAdjMessageLocked(TAG_OOM_ADJ,
- "Raise procstate to pause-activity (top): " + app);
- }
- }
- if (schedGroupHolder[0] < ProcessList.SCHED_GROUP_DEFAULT) {
- schedGroupHolder[0] = ProcessList.SCHED_GROUP_DEFAULT;
- }
- app.cached = false;
- app.empty = false;
- foregroundActivitiesHolder[0] = true;
- }
-
- @Override
- public void onStoppingActivity(boolean finishing) {
- if (adjHolder[0] > ProcessList.PERCEPTIBLE_APP_ADJ) {
- adjHolder[0] = ProcessList.PERCEPTIBLE_APP_ADJ;
- app.adjType = "stop-activity";
- if (DEBUG_OOM_ADJ_REASON || logUid == appUid) {
- reportOomAdjMessageLocked(TAG_OOM_ADJ,
- "Raise adj to stop-activity: " + app);
- }
- }
- // For the process state, we will at this point consider the process to
- // be cached. It will be cached either as an activity or empty depending
- // on whether the activity is finishing. We do this so that we can treat
- // the process as cached for purposes of memory trimming (determining
- // current memory level, trim command to send to process) since there
- // can be an arbitrary number of stopping processes and they should soon
- // all go into the cached state.
- if (!finishing) {
- if (procStateHolder[0] > PROCESS_STATE_LAST_ACTIVITY) {
- procStateHolder[0] = PROCESS_STATE_LAST_ACTIVITY;
- app.adjType = "stop-activity";
- if (DEBUG_OOM_ADJ_REASON || logUid == appUid) {
- reportOomAdjMessageLocked(TAG_OOM_ADJ,
- "Raise procstate to stop-activity: " + app);
- }
- }
- }
- app.cached = false;
- app.empty = false;
- foregroundActivitiesHolder[0] = true;
- }
-
- @Override
- public void onOtherActivity() {
- if (procStateHolder[0] > PROCESS_STATE_CACHED_ACTIVITY) {
- procStateHolder[0] = PROCESS_STATE_CACHED_ACTIVITY;
- app.adjType = "cch-act";
- if (DEBUG_OOM_ADJ_REASON || logUid == appUid) {
- reportOomAdjMessageLocked(TAG_OOM_ADJ,
- "Raise procstate to cached activity: " + app);
- }
- }
- }
- });
-
- adj = adjHolder[0];
- foregroundActivities = foregroundActivitiesHolder[0];
- procState = procStateHolder[0];
- schedGroup = schedGroupHolder[0];
+ adj = mTmpComputeOomAdjWindowCallback.adj;
+ foregroundActivities = mTmpComputeOomAdjWindowCallback.foregroundActivities;
+ procState = mTmpComputeOomAdjWindowCallback.procState;
+ schedGroup = mTmpComputeOomAdjWindowCallback.schedGroup;
if (adj == ProcessList.VISIBLE_APP_ADJ) {
adj += minLayer;
@@ -22306,9 +22332,8 @@ public class ActivityManagerService extends IActivityManager.Stub
@Override
public boolean isUserRunning(int userId, int flags) {
- synchronized (ActivityManagerService.this) {
- return mUserController.isUserRunning(userId, flags);
- }
+ // Holding am lock isn't required to call into user controller.
+ return mUserController.isUserRunning(userId, flags);
}
@Override
@@ -22379,6 +22404,41 @@ public class ActivityManagerService extends IActivityManager.Stub
public void sendForegroundProfileChanged(int userId) {
mUserController.sendForegroundProfileChanged(userId);
}
+
+ @Override
+ public boolean shouldConfirmCredentials(int userId) {
+ return mUserController.shouldConfirmCredentials(userId);
+ }
+
+ @Override
+ public int[] getCurrentProfileIds() {
+ return mUserController.getCurrentProfileIds();
+ }
+
+ @Override
+ public UserInfo getCurrentUser() {
+ return mUserController.getCurrentUser();
+ }
+
+ @Override
+ public void ensureNotSpecialUser(int userId) {
+ mUserController.ensureNotSpecialUser(userId);
+ }
+
+ @Override
+ public boolean isCurrentProfile(int userId) {
+ return mUserController.isCurrentProfile(userId);
+ }
+
+ @Override
+ public boolean hasStartedUserState(int userId) {
+ return mUserController.hasStartedUserState(userId);
+ }
+
+ @Override
+ public void finishUserSwitch(Object uss) {
+ mUserController.finishUserSwitch((UserState) uss);
+ }
}
/**
@@ -22629,4 +22689,143 @@ public class ActivityManagerService extends IActivityManager.Stub
return mNmi != null;
}
}
+
+ @Override
+ public void startDelegateShellPermissionIdentity(int delegateUid) {
+ if (UserHandle.getCallingAppId() != Process.SHELL_UID
+ && UserHandle.getCallingAppId() != Process.ROOT_UID) {
+ throw new SecurityException("Only the shell can delegate its permissions");
+ }
+
+ // We allow delegation only to one instrumentation started from the shell
+ synchronized (ActivityManagerService.this) {
+ // If there is a delegate it should be the same instance for app ops and permissions.
+ if (mAppOpsService.getAppOpsServiceDelegate()
+ != getPackageManagerInternalLocked().getCheckPermissionDelegate()) {
+ throw new IllegalStateException("Bad shell delegate state");
+ }
+
+ // If the delegate is already set up for the target UID, nothing to do.
+ if (mAppOpsService.getAppOpsServiceDelegate() != null) {
+ if (!(mAppOpsService.getAppOpsServiceDelegate() instanceof ShellDelegate)) {
+ throw new IllegalStateException("Bad shell delegate state");
+ }
+ if (((ShellDelegate) mAppOpsService.getAppOpsServiceDelegate())
+ .getDelegateUid() != delegateUid) {
+ throw new SecurityException("Shell can delegate permissions only "
+ + "to one instrumentation at a time");
+ }
+ return;
+ }
+
+ final int instrCount = mActiveInstrumentation.size();
+ for (int i = 0; i < instrCount; i++) {
+ final ActiveInstrumentation instr = mActiveInstrumentation.get(i);
+ if (instr.mTargetInfo.uid != delegateUid) {
+ continue;
+ }
+ // If instrumentation started from the shell the connection is not null
+ if (instr.mUiAutomationConnection == null) {
+ throw new SecurityException("Shell can delegate its permissions" +
+ " only to an instrumentation started from the shell");
+ }
+
+ // Hook them up...
+ final ShellDelegate shellDelegate = new ShellDelegate(
+ instr.mTargetInfo.packageName, delegateUid);
+ mAppOpsService.setAppOpsServiceDelegate(shellDelegate);
+ getPackageManagerInternalLocked().setCheckPermissionDelegate(shellDelegate);
+ return;
+ }
+ }
+ }
+
+ @Override
+ public void stopDelegateShellPermissionIdentity() {
+ if (UserHandle.getCallingAppId() != Process.SHELL_UID
+ && UserHandle.getCallingAppId() != Process.ROOT_UID) {
+ throw new SecurityException("Only the shell can delegate its permissions");
+ }
+ synchronized (ActivityManagerService.this) {
+ mAppOpsService.setAppOpsServiceDelegate(null);
+ getPackageManagerInternalLocked().setCheckPermissionDelegate(null);
+ }
+ }
+
+ private class ShellDelegate implements CheckOpsDelegate, CheckPermissionDelegate {
+ private final String mTargetPackageName;
+ private final int mTargetUid;
+
+ ShellDelegate(String targetPacakgeName, int targetUid) {
+ mTargetPackageName = targetPacakgeName;
+ mTargetUid = targetUid;
+ }
+
+ int getDelegateUid() {
+ return mTargetUid;
+ }
+
+ @Override
+ public int checkOperation(int code, int uid, String packageName,
+ TriFunction<Integer, Integer, String, Integer> superImpl) {
+ if (uid == mTargetUid) {
+ final long identity = Binder.clearCallingIdentity();
+ try {
+ return superImpl.apply(code, Process.SHELL_UID,
+ "com.android.shell");
+ } finally {
+ Binder.restoreCallingIdentity(identity);
+ }
+ }
+ return superImpl.apply(code, uid, packageName);
+ }
+
+ @Override
+ public int checkAudioOperation(int code, int usage, int uid, String packageName,
+ QuadFunction<Integer, Integer, Integer, String, Integer> superImpl) {
+ if (uid == mTargetUid) {
+ final long identity = Binder.clearCallingIdentity();
+ try {
+ return superImpl.apply(code, usage, Process.SHELL_UID,
+ "com.android.shell");
+ } finally {
+ Binder.restoreCallingIdentity(identity);
+ }
+ }
+ return superImpl.apply(code, usage, uid, packageName);
+ }
+
+ @Override
+ public int noteOperation(int code, int uid, String packageName,
+ TriFunction<Integer, Integer, String, Integer> superImpl) {
+ if (uid == mTargetUid) {
+ final long identity = Binder.clearCallingIdentity();
+ try {
+ return mAppOpsService.noteProxyOperation(code, Process.SHELL_UID,
+ "com.android.shell", uid, packageName);
+ } finally {
+ Binder.restoreCallingIdentity(identity);
+ }
+ }
+ return superImpl.apply(code, uid, packageName);
+ }
+
+ @Override
+ public int checkPermission(String permName, String pkgName, int userId,
+ TriFunction<String, String, Integer, Integer> superImpl) {
+ if (mTargetPackageName.equals(pkgName)) {
+ return superImpl.apply(permName, "com.android.shell", userId);
+ }
+ return superImpl.apply(permName, pkgName, userId);
+ }
+
+ @Override
+ public int checkUidPermission(String permName, int uid,
+ BiFunction<String, Integer, Integer> superImpl) {
+ if (uid == mTargetUid) {
+ return superImpl.apply(permName, Process.SHELL_UID);
+ }
+ return superImpl.apply(permName, uid);
+ }
+ }
}
diff --git a/services/core/java/com/android/server/am/ActivityRecord.java b/services/core/java/com/android/server/am/ActivityRecord.java
index b44ce9aeea33..70f638df6f33 100644
--- a/services/core/java/com/android/server/am/ActivityRecord.java
+++ b/services/core/java/com/android/server/am/ActivityRecord.java
@@ -1877,7 +1877,7 @@ final class ActivityRecord extends ConfigurationContainer implements AppWindowCo
// TODO: To be more accurate, the mark should be before the onCreate,
// not after the onResume. But for subsequent starts, onResume is fine.
if (hasProcess()) {
- cpuTimeAtResume = service.mAm.mProcessCpuTracker.getCpuTimeForPid(app.getPid());
+ cpuTimeAtResume = app.getCpuTime();
} else {
cpuTimeAtResume = 0; // Couldn't get the cpu time of process
}
@@ -2186,7 +2186,7 @@ final class ActivityRecord extends ConfigurationContainer implements AppWindowCo
return (info.flags & FLAG_SHOW_FOR_ALL_USERS) != 0
|| (mStackSupervisor.isCurrentProfileLocked(userId)
- && service.mAm.mUserController.isUserRunning(userId, 0 /* flags */));
+ && service.mAmInternal.isUserRunning(userId, 0 /* flags */));
}
/**
diff --git a/services/core/java/com/android/server/am/ActivityStack.java b/services/core/java/com/android/server/am/ActivityStack.java
index c76df8bef866..b0f1c45327cf 100644
--- a/services/core/java/com/android/server/am/ActivityStack.java
+++ b/services/core/java/com/android/server/am/ActivityStack.java
@@ -457,7 +457,7 @@ class ActivityStack<T extends StackWindowController> extends ConfigurationContai
mHandler = new ActivityStackHandler(supervisor.mLooper);
mWindowManager = mService.mWindowManager;
mStackId = stackId;
- mCurrentUser = mService.mAm.mUserController.getCurrentUserId();
+ mCurrentUser = mService.mAmInternal.getCurrentUserId();
mTmpRect2.setEmpty();
// Set display id before setting activity and window type to make sure it won't affect
// stacks on a wrong display.
@@ -1622,8 +1622,7 @@ class ActivityStack<T extends StackWindowController> extends ConfigurationContai
if (prev.hasProcess() && prev.cpuTimeAtResume > 0
&& mService.mAm.mBatteryStatsService.isOnBattery()) {
- long diff = mService.mAm.mProcessCpuTracker.getCpuTimeForPid(prev.app.getPid())
- - prev.cpuTimeAtResume;
+ long diff = prev.app.getCpuTime() - prev.cpuTimeAtResume;
if (diff > 0) {
BatteryStatsImpl bsi = mService.mAm.mBatteryStatsService.getActiveStatistics();
synchronized (bsi) {
@@ -2398,7 +2397,7 @@ class ActivityStack<T extends StackWindowController> extends ConfigurationContai
// Make sure that the user who owns this activity is started. If not,
// we will just leave it as is because someone should be bringing
// another user's activities to the top of the stack.
- if (!mService.mAm.mUserController.hasStartedUserState(next.userId)) {
+ if (!mService.mAmInternal.hasStartedUserState(next.userId)) {
Slog.w(TAG, "Skipping resume of top activity " + next
+ ": user " + next.userId + " is stopped");
if (DEBUG_STACK) mStackSupervisor.validateTopActivitiesLocked();
diff --git a/services/core/java/com/android/server/am/ActivityStackSupervisor.java b/services/core/java/com/android/server/am/ActivityStackSupervisor.java
index 7f749b38773e..e3e1c48bb1c1 100644
--- a/services/core/java/com/android/server/am/ActivityStackSupervisor.java
+++ b/services/core/java/com/android/server/am/ActivityStackSupervisor.java
@@ -2112,12 +2112,12 @@ public class ActivityStackSupervisor extends ConfigurationContainer implements D
// Complete user switch
if (startingUsers != null) {
for (int i = 0; i < startingUsers.size(); i++) {
- mService.mAm.mUserController.finishUserSwitch(startingUsers.get(i));
+ mService.mAmInternal.finishUserSwitch(startingUsers.get(i));
}
}
}
- mService.mAm.trimApplications();
+ mService.mAmInternal.trimApplications();
//dump();
//mWindowManager.dump();
@@ -3837,7 +3837,7 @@ public class ActivityStackSupervisor extends ConfigurationContainer implements D
/** Checks whether the userid is a profile of the current user. */
boolean isCurrentProfileLocked(int userId) {
if (userId == mCurrentUser) return true;
- return mService.mAm.mUserController.isCurrentProfile(userId);
+ return mService.mAmInternal.isCurrentProfile(userId);
}
/**
@@ -4789,7 +4789,7 @@ public class ActivityStackSupervisor extends ConfigurationContainer implements D
// If the user must confirm credentials (e.g. when first launching a work app and the
// Work Challenge is present) let startActivityInPackage handle the intercepting.
- if (!mService.mAm.mUserController.shouldConfirmCredentials(task.userId)
+ if (!mService.mAmInternal.shouldConfirmCredentials(task.userId)
&& task.getRootActivity() != null) {
final ActivityRecord targetActivity = task.getTopActivity();
diff --git a/services/core/java/com/android/server/am/ActivityStartController.java b/services/core/java/com/android/server/am/ActivityStartController.java
index f7ea4b228e52..110767174e5c 100644
--- a/services/core/java/com/android/server/am/ActivityStartController.java
+++ b/services/core/java/com/android/server/am/ActivityStartController.java
@@ -240,7 +240,7 @@ public class ActivityStartController {
return mService.handleIncomingUser(
realCallingPid, realCallingUid, targetUserId, reason);
} else {
- mService.mAm.mUserController.ensureNotSpecialUser(targetUserId);
+ mService.mAmInternal.ensureNotSpecialUser(targetUserId);
return targetUserId;
}
}
diff --git a/services/core/java/com/android/server/am/ActivityStartInterceptor.java b/services/core/java/com/android/server/am/ActivityStartInterceptor.java
index 171c0bbd1812..ca12716e7199 100644
--- a/services/core/java/com/android/server/am/ActivityStartInterceptor.java
+++ b/services/core/java/com/android/server/am/ActivityStartInterceptor.java
@@ -69,7 +69,6 @@ class ActivityStartInterceptor {
private final ActivityTaskManagerService mService;
private final ActivityStackSupervisor mSupervisor;
private final Context mServiceContext;
- private final UserController mUserController;
// UserManager cannot be final as it's not ready when this class is instantiated during boot
private UserManager mUserManager;
@@ -101,16 +100,15 @@ class ActivityStartInterceptor {
ActivityStartInterceptor(
ActivityTaskManagerService service, ActivityStackSupervisor supervisor) {
- this(service, supervisor, service.mContext, service.mAm.mUserController);
+ this(service, supervisor, service.mContext);
}
@VisibleForTesting
ActivityStartInterceptor(ActivityTaskManagerService service, ActivityStackSupervisor supervisor,
- Context context, UserController userController) {
+ Context context) {
mService = service;
mSupervisor = supervisor;
mServiceContext = context;
- mUserController = userController;
}
/**
@@ -298,7 +296,7 @@ class ActivityStartInterceptor {
* @return The intercepting intent if needed.
*/
private Intent interceptWithConfirmCredentialsIfNeeded(ActivityInfo aInfo, int userId) {
- if (!mUserController.shouldConfirmCredentials(userId)) {
+ if (!mService.mAmInternal.shouldConfirmCredentials(userId)) {
return null;
}
// TODO(b/28935539): should allow certain activities to bypass work challenge
diff --git a/services/core/java/com/android/server/am/ActivityTaskManagerService.java b/services/core/java/com/android/server/am/ActivityTaskManagerService.java
index 50d0212888fe..3ed2875c7377 100644
--- a/services/core/java/com/android/server/am/ActivityTaskManagerService.java
+++ b/services/core/java/com/android/server/am/ActivityTaskManagerService.java
@@ -4547,9 +4547,9 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub {
return mShowDialogs && !mSleeping && !mShuttingDown
&& !mKeyguardController.isKeyguardOrAodShowing(DEFAULT_DISPLAY)
&& !hasUserRestriction(UserManager.DISALLOW_SYSTEM_ERROR_DIALOGS,
- mAm.mUserController.getCurrentUserId())
+ mAmInternal.getCurrentUserId())
&& !(UserManager.isDeviceInDemoMode(mContext)
- && mAm.mUserController.getCurrentUser().isDemo());
+ && mAmInternal.getCurrentUser().isDemo());
}
/**
diff --git a/services/core/java/com/android/server/am/ProcessRecord.java b/services/core/java/com/android/server/am/ProcessRecord.java
index 940e0798703d..ea6d134ddfde 100644
--- a/services/core/java/com/android/server/am/ProcessRecord.java
+++ b/services/core/java/com/android/server/am/ProcessRecord.java
@@ -1002,4 +1002,11 @@ final class ProcessRecord implements WindowProcessListener {
}
}
+ /**
+ * Returns the total time (in milliseconds) spent executing in both user and system code.
+ * Safe to call without lock held.
+ */
+ public long getCpuTime() {
+ return mService.mProcessCpuTracker.getCpuTimeForPid(pid);
+ }
}
diff --git a/services/core/java/com/android/server/am/RecentTasks.java b/services/core/java/com/android/server/am/RecentTasks.java
index 749589b970b3..1967c76b23e3 100644
--- a/services/core/java/com/android/server/am/RecentTasks.java
+++ b/services/core/java/com/android/server/am/RecentTasks.java
@@ -78,6 +78,7 @@ import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
+import java.util.List;
import java.util.Set;
import java.util.concurrent.TimeUnit;
@@ -140,7 +141,6 @@ class RecentTasks {
private final TaskPersister mTaskPersister;
private final ActivityTaskManagerService mService;
private final ActivityStackSupervisor mSupervisor;
- private final UserController mUserController;
/**
* Keeps track of the static recents package/component which is granted additional permissions
@@ -181,11 +181,9 @@ class RecentTasks {
private final TaskActivitiesReport mTmpReport = new TaskActivitiesReport();
@VisibleForTesting
- RecentTasks(ActivityTaskManagerService service, TaskPersister taskPersister,
- UserController userController) {
+ RecentTasks(ActivityTaskManagerService service, TaskPersister taskPersister) {
mService = service;
mSupervisor = mService.mStackSupervisor;
- mUserController = userController;
mTaskPersister = taskPersister;
mGlobalMaxNumTasks = ActivityTaskManager.getMaxRecentTasksStatic();
mHasVisibleRecentTasks = true;
@@ -196,7 +194,6 @@ class RecentTasks {
final Resources res = service.mContext.getResources();
mService = service;
mSupervisor = mService.mStackSupervisor;
- mUserController = service.mAm.mUserController;
mTaskPersister = new TaskPersister(systemDir, stackSupervisor, service, this);
mGlobalMaxNumTasks = ActivityTaskManager.getMaxRecentTasksStatic();
mHasVisibleRecentTasks = res.getBoolean(com.android.internal.R.bool.config_hasRecents);
@@ -712,6 +709,27 @@ class RecentTasks {
return list;
}
+ @VisibleForTesting
+ Set<Integer> getProfileIds(int userId) {
+ Set<Integer> userIds = new ArraySet<>();
+ final List<UserInfo> profiles = mService.getUserManager().getProfiles(userId,
+ false /* enabledOnly */);
+ for (int i = profiles.size() - 1; i >= 0; --i) {
+ userIds.add(profiles.get(i).id);
+ }
+ return userIds;
+ }
+
+ @VisibleForTesting
+ UserInfo getUserInfo(int userId) {
+ return mService.getUserManager().getUserInfo(userId);
+ }
+
+ @VisibleForTesting
+ int[] getCurrentProfileIds() {
+ return mService.mAmInternal.getCurrentProfileIds();
+ }
+
/**
* @return the list of recent tasks for presentation.
*/
@@ -725,7 +743,7 @@ class RecentTasks {
}
loadUserRecentsLocked(userId);
- final Set<Integer> includedUsers = mUserController.getProfileIds(userId);
+ final Set<Integer> includedUsers = getProfileIds(userId);
includedUsers.add(Integer.valueOf(userId));
final ArrayList<ActivityManager.RecentTaskInfo> res = new ArrayList<>();
@@ -1040,10 +1058,10 @@ class RecentTasks {
}
// Remove any tasks that belong to currently quiet profiles
- final int[] profileUserIds = mUserController.getCurrentProfileIds();
+ final int[] profileUserIds = getCurrentProfileIds();
mTmpQuietProfileUserIds.clear();
for (int userId : profileUserIds) {
- final UserInfo userInfo = mUserController.getUserInfo(userId);
+ final UserInfo userInfo = getUserInfo(userId);
if (userInfo != null && userInfo.isManagedProfile() && userInfo.isQuietModeEnabled()) {
mTmpQuietProfileUserIds.put(userId, true);
}
diff --git a/services/core/java/com/android/server/am/UserController.java b/services/core/java/com/android/server/am/UserController.java
index 992179a2637b..fa670a250886 100644
--- a/services/core/java/com/android/server/am/UserController.java
+++ b/services/core/java/com/android/server/am/UserController.java
@@ -259,11 +259,14 @@ class UserController implements Handler.Callback {
}
void finishUserSwitch(UserState uss) {
- finishUserBoot(uss);
- startProfiles();
- synchronized (mLock) {
- stopRunningUsersLU(mMaxRunningUsers);
- }
+ // This call holds the AM lock so we post to the handler.
+ mHandler.post(() -> {
+ finishUserBoot(uss);
+ startProfiles();
+ synchronized (mLock) {
+ stopRunningUsersLU(mMaxRunningUsers);
+ }
+ });
}
List<Integer> getRunningUsersLU() {
@@ -1573,7 +1576,9 @@ class UserController implements Handler.Callback {
}
boolean hasStartedUserState(int userId) {
- return mStartedUsers.get(userId) != null;
+ synchronized (mLock) {
+ return mStartedUsers.get(userId) != null;
+ }
}
private void updateStartedUserArrayLU() {
@@ -1749,7 +1754,7 @@ class UserController implements Handler.Callback {
return ums != null ? ums.getUserIds() : new int[] { 0 };
}
- UserInfo getUserInfo(int userId) {
+ private UserInfo getUserInfo(int userId) {
return mInjector.getUserManager().getUserInfo(userId);
}
@@ -1775,7 +1780,7 @@ class UserController implements Handler.Callback {
return mInjector.getUserManager().exists(userId);
}
- void enforceShellRestriction(String restriction, int userHandle) {
+ private void enforceShellRestriction(String restriction, int userHandle) {
if (Binder.getCallingUid() == SHELL_UID) {
if (userHandle < 0 || hasUserRestriction(restriction, userHandle)) {
throw new SecurityException("Shell does not have permission to access user "
@@ -1788,16 +1793,6 @@ class UserController implements Handler.Callback {
return mInjector.getUserManager().hasUserRestriction(restriction, userId);
}
- Set<Integer> getProfileIds(int userId) {
- Set<Integer> userIds = new HashSet<>();
- final List<UserInfo> profiles = mInjector.getUserManager().getProfiles(userId,
- false /* enabledOnly */);
- for (UserInfo user : profiles) {
- userIds.add(user.id);
- }
- return userIds;
- }
-
boolean isSameProfileGroup(int callingUserId, int targetUserId) {
if (callingUserId == targetUserId) {
return true;
diff --git a/services/core/java/com/android/server/am/WindowProcessController.java b/services/core/java/com/android/server/am/WindowProcessController.java
index 64a273efc4ee..817905a5e3d4 100644
--- a/services/core/java/com/android/server/am/WindowProcessController.java
+++ b/services/core/java/com/android/server/am/WindowProcessController.java
@@ -478,6 +478,11 @@ public class WindowProcessController {
mAtm.mH.post(r);
}
+ /** Returns the total time (in milliseconds) spent executing in both user and system code. */
+ public long getCpuTime() {
+ return (mListener != null) ? mListener.getCpuTime() : 0;
+ }
+
void addRecentTask(TaskRecord task) {
mRecentTasks.add(task);
}
diff --git a/services/core/java/com/android/server/am/WindowProcessListener.java b/services/core/java/com/android/server/am/WindowProcessListener.java
index 92e4461c4452..2de3e3763028 100644
--- a/services/core/java/com/android/server/am/WindowProcessListener.java
+++ b/services/core/java/com/android/server/am/WindowProcessListener.java
@@ -44,4 +44,7 @@ public interface WindowProcessListener {
/** Set process package been removed from device. */
void setRemoved(boolean removed);
+
+ /** Returns the total time (in milliseconds) spent executing in both user and system code. */
+ long getCpuTime();
}
diff --git a/services/core/java/com/android/server/input/InputForwarder.java b/services/core/java/com/android/server/input/InputForwarder.java
index 38a1cd745722..00af8398d0ff 100644
--- a/services/core/java/com/android/server/input/InputForwarder.java
+++ b/services/core/java/com/android/server/input/InputForwarder.java
@@ -19,7 +19,6 @@ package com.android.server.input;
import android.app.IInputForwarder;
import android.hardware.input.InputManagerInternal;
import android.view.InputEvent;
-import android.view.MotionEvent;
import com.android.server.LocalServices;
@@ -40,9 +39,7 @@ class InputForwarder extends IInputForwarder.Stub {
@Override
public boolean forwardEvent(InputEvent event) {
- if (event instanceof MotionEvent) {
- ((MotionEvent) event).setDisplayId(mDisplayId);
- }
+ event.setDisplayId(mDisplayId);
return mInputManagerInternal.injectInputEvent(event, INJECT_INPUT_EVENT_MODE_ASYNC);
}
} \ No newline at end of file
diff --git a/services/core/java/com/android/server/notification/ZenModeHelper.java b/services/core/java/com/android/server/notification/ZenModeHelper.java
index 669d5565534d..1954ed4bfa45 100644
--- a/services/core/java/com/android/server/notification/ZenModeHelper.java
+++ b/services/core/java/com/android/server/notification/ZenModeHelper.java
@@ -1182,11 +1182,19 @@ public class ZenModeHelper {
}
private void showZenUpgradeNotification(int zen) {
+ final boolean isWatch = mContext.getPackageManager().hasSystemFeature(
+ PackageManager.FEATURE_WATCH);
final boolean showNotification = mIsBootComplete
&& zen != Global.ZEN_MODE_OFF
+ && !isWatch
&& Settings.Global.getInt(mContext.getContentResolver(),
Settings.Global.SHOW_ZEN_UPGRADE_NOTIFICATION, 0) != 0;
+ if (isWatch) {
+ Settings.Global.putInt(mContext.getContentResolver(),
+ Global.SHOW_ZEN_UPGRADE_NOTIFICATION, 0);
+ }
+
if (showNotification) {
mNotificationManager.notify(TAG, SystemMessage.NOTE_ZEN_UPGRADE,
createZenUpgradeNotification());
diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java
index c536e4dbea59..734a872b0fcc 100644
--- a/services/core/java/com/android/server/pm/PackageManagerService.java
+++ b/services/core/java/com/android/server/pm/PackageManagerService.java
@@ -169,6 +169,7 @@ import android.content.pm.PackageList;
import android.content.pm.PackageManager;
import android.content.pm.PackageManager.LegacyPackageDeleteObserver;
import android.content.pm.PackageManagerInternal;
+import android.content.pm.PackageManagerInternal.CheckPermissionDelegate;
import android.content.pm.PackageManagerInternal.PackageListObserver;
import android.content.pm.PackageParser;
import android.content.pm.PackageParser.ActivityIntentInfo;
@@ -289,6 +290,8 @@ import com.android.internal.util.FastXmlSerializer;
import com.android.internal.util.IndentingPrintWriter;
import com.android.internal.util.Preconditions;
import com.android.internal.util.XmlUtils;
+import com.android.internal.util.function.QuadFunction;
+import com.android.internal.util.function.TriFunction;
import com.android.server.AttributeCache;
import com.android.server.DeviceIdleController;
import com.android.server.EventLogTags;
@@ -363,6 +366,7 @@ import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
+import java.util.function.BiFunction;
import java.util.function.Predicate;
import dalvik.system.CloseGuard;
@@ -1031,6 +1035,9 @@ public class PackageManagerService extends IPackageManager.Stub
void receiveVerificationResponse(int verificationId);
}
+ @GuardedBy("mPackages")
+ private CheckPermissionDelegate mCheckPermissionDelegate;
+
private class IntentVerifierProxy implements IntentFilterVerifier<ActivityIntentInfo> {
private Context mContext;
private ComponentName mIntentFilterVerifierComponent;
@@ -5260,11 +5267,35 @@ public class PackageManagerService extends IPackageManager.Stub
@Override
public int checkPermission(String permName, String pkgName, int userId) {
+ final CheckPermissionDelegate checkPermissionDelegate;
+ synchronized (mPackages) {
+ if (mCheckPermissionDelegate == null) {
+ return checkPermissionImpl(permName, pkgName, userId);
+ }
+ checkPermissionDelegate = mCheckPermissionDelegate;
+ }
+ return checkPermissionDelegate.checkPermission(permName, pkgName, userId,
+ PackageManagerService.this::checkPermissionImpl);
+ }
+
+ private int checkPermissionImpl(String permName, String pkgName, int userId) {
return mPermissionManager.checkPermission(permName, pkgName, getCallingUid(), userId);
}
@Override
public int checkUidPermission(String permName, int uid) {
+ final CheckPermissionDelegate checkPermissionDelegate;
+ synchronized (mPackages) {
+ if (mCheckPermissionDelegate == null) {
+ return checkUidPermissionImpl(permName, uid);
+ }
+ checkPermissionDelegate = mCheckPermissionDelegate;
+ }
+ return checkPermissionDelegate.checkUidPermission(permName, uid,
+ PackageManagerService.this::checkUidPermissionImpl);
+ }
+
+ private int checkUidPermissionImpl(String permName, int uid) {
synchronized (mPackages) {
final String[] packageNames = getPackagesForUid(uid);
final PackageParser.Package pkg = (packageNames != null && packageNames.length > 0)
@@ -9150,6 +9181,16 @@ public class PackageManagerService extends IPackageManager.Stub
}
@GuardedBy("mPackages")
+ public CheckPermissionDelegate getCheckPermissionDelegateLocked() {
+ return mCheckPermissionDelegate;
+ }
+
+ @GuardedBy("mPackages")
+ public void setCheckPermissionDelegateLocked(CheckPermissionDelegate delegate) {
+ mCheckPermissionDelegate = delegate;
+ }
+
+ @GuardedBy("mPackages")
private void notifyPackageUseLocked(String packageName, int reason) {
final PackageParser.Package p = mPackages.get(packageName);
if (p == null) {
@@ -24150,6 +24191,20 @@ public class PackageManagerService extends IPackageManager.Stub
PackageManagerService.this.notifyPackageUseLocked(packageName, reason);
}
}
+
+ @Override
+ public CheckPermissionDelegate getCheckPermissionDelegate() {
+ synchronized (mPackages) {
+ return PackageManagerService.this.getCheckPermissionDelegateLocked();
+ }
+ }
+
+ @Override
+ public void setCheckPermissionDelegate(CheckPermissionDelegate delegate) {
+ synchronized (mPackages) {
+ PackageManagerService.this.setCheckPermissionDelegateLocked(delegate);
+ }
+ }
}
@Override
diff --git a/services/core/java/com/android/server/pm/permission/PermissionManagerInternal.java b/services/core/java/com/android/server/pm/permission/PermissionManagerInternal.java
index a042fedf8b47..ec15c16981a8 100644
--- a/services/core/java/com/android/server/pm/permission/PermissionManagerInternal.java
+++ b/services/core/java/com/android/server/pm/permission/PermissionManagerInternal.java
@@ -21,19 +21,11 @@ import android.annotation.Nullable;
import android.content.pm.PackageParser;
import android.content.pm.PermissionGroupInfo;
import android.content.pm.PermissionInfo;
-import android.content.pm.PackageManager.NameNotFoundException;
import android.content.pm.PackageManager.PermissionInfoFlags;
-import android.content.pm.PackageParser.Permission;
-
-import com.android.server.pm.SharedUserSetting;
-import com.android.server.pm.permission.PermissionManagerInternal.PermissionCallback;
import java.util.ArrayList;
import java.util.Collection;
-import java.util.Iterator;
import java.util.List;
-import java.util.Map;
-import java.util.Set;
/**
* Internal interfaces to be used by other components within the system server.
diff --git a/services/core/java/com/android/server/policy/BarController.java b/services/core/java/com/android/server/policy/BarController.java
index eca6f9f1ec47..14c985c090a3 100644
--- a/services/core/java/com/android/server/policy/BarController.java
+++ b/services/core/java/com/android/server/policy/BarController.java
@@ -196,7 +196,7 @@ public class BarController {
}
protected boolean skipAnimation() {
- return false;
+ return !mWin.isDrawnLw();
}
private int computeStateLw(boolean wasVis, boolean wasAnim, WindowState win, boolean change) {
diff --git a/services/core/java/com/android/server/policy/PhoneWindowManager.java b/services/core/java/com/android/server/policy/PhoneWindowManager.java
index b99f8d6c8170..5bc35e7296c3 100644
--- a/services/core/java/com/android/server/policy/PhoneWindowManager.java
+++ b/services/core/java/com/android/server/policy/PhoneWindowManager.java
@@ -76,6 +76,7 @@ import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_IS_ROUNDED_CO
import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_IS_SCREEN_DECOR;
import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_KEYGUARD;
import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_SHOW_FOR_ALL_USERS;
+import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_STATUS_BAR_EXPANDED;
import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_SYSTEM_ERROR;
import static android.view.WindowManager.LayoutParams.ROTATION_ANIMATION_CROSSFADE;
import static android.view.WindowManager.LayoutParams.ROTATION_ANIMATION_JUMPCUT;
@@ -4686,8 +4687,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
navTranslucent &= areTranslucentBarsAllowed();
}
boolean statusBarExpandedNotKeyguard = !isKeyguardShowing && mStatusBar != null
- && mStatusBar.getAttrs().height == MATCH_PARENT
- && mStatusBar.getAttrs().width == MATCH_PARENT;
+ && (mStatusBar.getAttrs().privateFlags & PRIVATE_FLAG_STATUS_BAR_EXPANDED) != 0;
// When the navigation bar isn't visible, we put up a fake input window to catch all
// touch events. This way we can detect when the user presses anywhere to bring back the
@@ -5690,7 +5690,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
}
// Take note if a window wants to acquire a sleep token.
- if (win.isVisibleLw() && (attrs.privateFlags & PRIVATE_FLAG_ACQUIRES_SLEEP_TOKEN) != 0
+ if ((attrs.privateFlags & PRIVATE_FLAG_ACQUIRES_SLEEP_TOKEN) != 0
&& win.canAcquireSleepToken()) {
mWindowSleepTokenNeeded = true;
}
@@ -5746,9 +5746,8 @@ public class PhoneWindowManager implements WindowManagerPolicy {
mStatusBarController.setShowTransparent(true /* transparent */);
}
- WindowManager.LayoutParams statusBarAttrs = mStatusBar.getAttrs();
- boolean statusBarExpanded = statusBarAttrs.height == MATCH_PARENT
- && statusBarAttrs.width == MATCH_PARENT;
+ boolean statusBarExpanded =
+ (mStatusBar.getAttrs().privateFlags & PRIVATE_FLAG_STATUS_BAR_EXPANDED) != 0;
boolean topAppHidesStatusBar = topAppHidesStatusBar();
if (mForceStatusBar || mForceStatusBarFromKeyguard || mForceStatusBarTransparent
|| statusBarExpanded) {
diff --git a/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java b/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java
index 547ab0ed443d..9d68c63cc38c 100644
--- a/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java
+++ b/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java
@@ -51,7 +51,6 @@ import android.content.pm.ResolveInfo;
import android.content.pm.ServiceInfo;
import android.content.pm.UserInfo;
import android.content.res.Resources;
-import android.database.ContentObserver;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.BitmapRegionDecoder;
@@ -76,7 +75,6 @@ import android.os.ServiceManager;
import android.os.SystemClock;
import android.os.UserHandle;
import android.os.UserManager;
-import android.provider.Settings;
import android.service.wallpaper.IWallpaperConnection;
import android.service.wallpaper.IWallpaperEngine;
import android.service.wallpaper.IWallpaperService;
@@ -338,102 +336,6 @@ public class WallpaperManagerService extends IWallpaperManager.Stub
}
}
- /**
- * Observes changes of theme settings. It will check whether to call
- * notifyWallpaperColorsChanged by the current theme and updated theme.
- * The light theme and dark theme are controlled by the hint values in Wallpaper colors,
- * threrfore, if light theme mode is chosen, HINT_SUPPORTS_DARK_THEME in hint will be
- * removed and then notify listeners.
- */
- private class ThemeSettingsObserver extends ContentObserver {
-
- public ThemeSettingsObserver(Handler handler) {
- super(handler);
- }
-
- public void startObserving(Context context) {
- context.getContentResolver().registerContentObserver(
- Settings.Secure.getUriFor(Settings.Secure.THEME_MODE),
- false,
- this);
- }
-
- public void stopObserving(Context context) {
- context.getContentResolver().unregisterContentObserver(this);
- }
-
- @Override
- public void onChange(boolean selfChange) {
- onThemeSettingsChanged();
- }
- }
-
- /**
- * Check whether to call notifyWallpaperColorsChanged. Assumed that the theme mode
- * was wallpaper theme mode and dark wallpaper was set, therefoe, the theme was dark.
- * Then theme mode changing to dark theme mode, however, theme should not update since
- * theme was dark already.
- */
- private boolean needUpdateLocked(WallpaperColors colors, int themeMode) {
- if (colors == null) {
- return false;
- }
-
- if (themeMode == mThemeMode) {
- return false;
- }
-
- boolean result = true;
- boolean supportDarkTheme =
- (colors.getColorHints() & WallpaperColors.HINT_SUPPORTS_DARK_THEME) != 0;
- switch (themeMode) {
- case Settings.Secure.THEME_MODE_WALLPAPER:
- if (mThemeMode == Settings.Secure.THEME_MODE_LIGHT) {
- result = supportDarkTheme;
- } else {
- result = !supportDarkTheme;
- }
- break;
- case Settings.Secure.THEME_MODE_LIGHT:
- if (mThemeMode == Settings.Secure.THEME_MODE_WALLPAPER) {
- result = supportDarkTheme;
- }
- break;
- case Settings.Secure.THEME_MODE_DARK:
- if (mThemeMode == Settings.Secure.THEME_MODE_WALLPAPER) {
- result = !supportDarkTheme;
- }
- break;
- default:
- Slog.w(TAG, "unkonwn theme mode " + themeMode);
- return false;
- }
- mThemeMode = themeMode;
- return result;
- }
-
- void onThemeSettingsChanged() {
- WallpaperData wallpaper;
- synchronized (mLock) {
- wallpaper = mWallpaperMap.get(mCurrentUserId);
- int updatedThemeMode = Settings.Secure.getInt(
- mContext.getContentResolver(), Settings.Secure.THEME_MODE,
- Settings.Secure.THEME_MODE_WALLPAPER);
-
- if (DEBUG) {
- Slog.v(TAG, "onThemeSettingsChanged, mode = " + updatedThemeMode);
- }
-
- if (!needUpdateLocked(wallpaper.primaryColors, updatedThemeMode)) {
- return;
- }
- }
-
- if (wallpaper != null) {
- notifyWallpaperColorsChanged(wallpaper, FLAG_SYSTEM);
- }
- }
-
void notifyLockWallpaperChanged() {
final IWallpaperManagerCallback cb = mKeyguardListener;
if (cb != null) {
@@ -511,7 +413,6 @@ public class WallpaperManagerService extends IWallpaperManager.Stub
}
userAllColorListeners.finishBroadcast();
}
- wallpaperColors = getThemeColorsLocked(wallpaperColors);
}
final int count = colorListeners.size();
@@ -580,40 +481,6 @@ public class WallpaperManagerService extends IWallpaperManager.Stub
}
/**
- * We can easily change theme by modified colors hint. This function will check
- * current theme mode and return the WallpaperColors fit current theme mode.
- * If color need modified, it will return a copied WallpaperColors which
- * its ColorsHint is modified to fit current theme mode.
- *
- * @param colors a wallpaper primary colors representation
- */
- private WallpaperColors getThemeColorsLocked(WallpaperColors colors) {
- if (colors == null) {
- Slog.w(TAG, "Cannot get theme colors because WallpaperColors is null.");
- return null;
- }
-
- int colorHints = colors.getColorHints();
- boolean supportDarkTheme = (colorHints & WallpaperColors.HINT_SUPPORTS_DARK_THEME) != 0;
- if (mThemeMode == Settings.Secure.THEME_MODE_WALLPAPER ||
- (mThemeMode == Settings.Secure.THEME_MODE_LIGHT && !supportDarkTheme) ||
- (mThemeMode == Settings.Secure.THEME_MODE_DARK && supportDarkTheme)) {
- return colors;
- }
-
- WallpaperColors themeColors = new WallpaperColors(colors.getPrimaryColor(),
- colors.getSecondaryColor(), colors.getTertiaryColor());
-
- if (mThemeMode == Settings.Secure.THEME_MODE_LIGHT) {
- colorHints &= ~WallpaperColors.HINT_SUPPORTS_DARK_THEME;
- } else if (mThemeMode == Settings.Secure.THEME_MODE_DARK) {
- colorHints |= WallpaperColors.HINT_SUPPORTS_DARK_THEME;
- }
- themeColors.setColorHints(colorHints);
- return themeColors;
- }
-
- /**
* Once a new wallpaper has been written via setWallpaper(...), it needs to be cropped
* for display.
*/
@@ -809,7 +676,6 @@ public class WallpaperManagerService extends IWallpaperManager.Stub
final SparseArray<Boolean> mUserRestorecon = new SparseArray<Boolean>();
int mCurrentUserId = UserHandle.USER_NULL;
boolean mInAmbientMode;
- int mThemeMode;
static class WallpaperData {
@@ -868,7 +734,6 @@ public class WallpaperManagerService extends IWallpaperManager.Stub
long lastDiedTime;
boolean wallpaperUpdating;
WallpaperObserver wallpaperObserver;
- ThemeSettingsObserver themeSettingsObserver;
/**
* List of callbacks registered they should each be notified when the wallpaper is changed.
@@ -1414,10 +1279,6 @@ public class WallpaperManagerService extends IWallpaperManager.Stub
wallpaper.wallpaperObserver.stopWatching();
wallpaper.wallpaperObserver = null;
}
- if (wallpaper.themeSettingsObserver != null) {
- wallpaper.themeSettingsObserver.stopObserving(mContext);
- wallpaper.themeSettingsObserver = null;
- }
}
}
@@ -1501,13 +1362,6 @@ public class WallpaperManagerService extends IWallpaperManager.Stub
systemWallpaper.wallpaperObserver = new WallpaperObserver(systemWallpaper);
systemWallpaper.wallpaperObserver.startWatching();
}
- if (systemWallpaper.themeSettingsObserver == null) {
- systemWallpaper.themeSettingsObserver = new ThemeSettingsObserver(null);
- systemWallpaper.themeSettingsObserver.startObserving(mContext);
- }
- mThemeMode = Settings.Secure.getInt(
- mContext.getContentResolver(), Settings.Secure.THEME_MODE,
- Settings.Secure.THEME_MODE_WALLPAPER);
switchWallpaper(systemWallpaper, reply);
}
@@ -1981,7 +1835,7 @@ public class WallpaperManagerService extends IWallpaperManager.Stub
}
synchronized (mLock) {
- return getThemeColorsLocked(wallpaperData.primaryColors);
+ return wallpaperData.primaryColors;
}
}
diff --git a/services/core/java/com/android/server/wm/BoundsAnimationController.java b/services/core/java/com/android/server/wm/BoundsAnimationController.java
index 0a49c139ad03..bc8c17db6abe 100644
--- a/services/core/java/com/android/server/wm/BoundsAnimationController.java
+++ b/services/core/java/com/android/server/wm/BoundsAnimationController.java
@@ -196,12 +196,6 @@ public class BoundsAnimationController {
@Override
public void onAnimationStart(Animator animation) {
- if (!mTarget.isAttached()) {
- // No point of trying to animate something that isn't attached to the hierarchy
- // anymore.
- cancel();
- }
-
if (DEBUG) Slog.d(TAG, "onAnimationStart: mTarget=" + mTarget
+ " mPrevSchedulePipModeChangedState=" + mPrevSchedulePipModeChangedState
+ " mSchedulePipModeChangedState=" + mSchedulePipModeChangedState);
@@ -216,13 +210,15 @@ public class BoundsAnimationController {
// Ensure that we have prepared the target for animation before we trigger any size
// changes, so it can swap surfaces in to appropriate modes, or do as it wishes
// otherwise.
+ boolean continueAnimation;
if (mPrevSchedulePipModeChangedState == NO_PIP_MODE_CHANGED_CALLBACKS) {
- mTarget.onAnimationStart(mSchedulePipModeChangedState ==
+ continueAnimation = mTarget.onAnimationStart(mSchedulePipModeChangedState ==
SCHEDULE_PIP_MODE_CHANGED_ON_START, false /* forceUpdate */);
// When starting an animation from fullscreen, pause here and wait for the
// windows-drawn signal before we start the rest of the transition down into PiP.
- if (mMoveFromFullscreen && mTarget.shouldDeferStartOnMoveToFullscreen()) {
+ if (continueAnimation && mMoveFromFullscreen
+ && mTarget.shouldDeferStartOnMoveToFullscreen()) {
pause();
}
} else if (mPrevSchedulePipModeChangedState == SCHEDULE_PIP_MODE_CHANGED_ON_END &&
@@ -231,8 +227,19 @@ public class BoundsAnimationController {
// client will not currently receive any picture-in-picture mode change callbacks.
// However, we still need to report to them that they are leaving PiP, so this will
// force an update via a mode changed callback.
- mTarget.onAnimationStart(true /* schedulePipModeChangedCallback */,
- true /* forceUpdate */);
+ continueAnimation = mTarget.onAnimationStart(
+ true /* schedulePipModeChangedCallback */, true /* forceUpdate */);
+ } else {
+ // The animation is already running, but we should check that the TaskStack is still
+ // valid before continuing with the animation
+ continueAnimation = mTarget.isAttached();
+ }
+
+ if (!continueAnimation) {
+ // No point of trying to animate something that isn't attached to the hierarchy
+ // anymore.
+ cancel();
+ return;
}
// Immediately update the task bounds if they have to become larger, but preserve
@@ -354,6 +361,9 @@ public class BoundsAnimationController {
if (DEBUG) Slog.d(TAG, "cancel: mTarget=" + mTarget);
mSkipAnimationEnd = true;
super.cancel();
+
+ // Reset the thread priority of the animation thread if the bounds animation is canceled
+ updateBooster();
}
/**
diff --git a/services/core/java/com/android/server/wm/BoundsAnimationTarget.java b/services/core/java/com/android/server/wm/BoundsAnimationTarget.java
index d66b42fba0a4..5cb80de1a36d 100644
--- a/services/core/java/com/android/server/wm/BoundsAnimationTarget.java
+++ b/services/core/java/com/android/server/wm/BoundsAnimationTarget.java
@@ -30,8 +30,9 @@ interface BoundsAnimationTarget {
*
* @param schedulePipModeChangedCallback whether or not to schedule the PiP mode changed
* callbacks
+ * @return whether to continue the animation
*/
- void onAnimationStart(boolean schedulePipModeChangedCallback, boolean forceUpdate);
+ boolean onAnimationStart(boolean schedulePipModeChangedCallback, boolean forceUpdate);
/**
* @return Whether the animation should be paused waiting for the windows to draw before
diff --git a/services/core/java/com/android/server/wm/TaskStack.java b/services/core/java/com/android/server/wm/TaskStack.java
index e01cebde67ca..9075b6c7fa49 100644
--- a/services/core/java/com/android/server/wm/TaskStack.java
+++ b/services/core/java/com/android/server/wm/TaskStack.java
@@ -1645,9 +1645,14 @@ public class TaskStack extends WindowContainer<Task> implements
}
@Override // AnimatesBounds
- public void onAnimationStart(boolean schedulePipModeChangedCallback, boolean forceUpdate) {
+ public boolean onAnimationStart(boolean schedulePipModeChangedCallback, boolean forceUpdate) {
// Hold the lock since this is called from the BoundsAnimator running on the UiThread
synchronized (mService.mWindowMap) {
+ if (!isAttached()) {
+ // Don't run the animation if the stack is already detached
+ return false;
+ }
+
mBoundsAnimatingRequested = false;
mBoundsAnimating = true;
mCancelCurrentBoundsAnimation = false;
@@ -1677,6 +1682,7 @@ public class TaskStack extends WindowContainer<Task> implements
controller.updatePictureInPictureModeForPinnedStackAnimation(null, forceUpdate);
}
}
+ return true;
}
@Override // AnimatesBounds
@@ -1720,41 +1726,47 @@ public class TaskStack extends WindowContainer<Task> implements
@Override
public boolean isAttached() {
- return mDisplayContent != null;
+ synchronized (mService.mWindowMap) {
+ return mDisplayContent != null;
+ }
}
/**
* Called immediately prior to resizing the tasks at the end of the pinned stack animation.
*/
public void onPipAnimationEndResize() {
- mBoundsAnimating = false;
- for (int i = 0; i < mChildren.size(); i++) {
- final Task t = mChildren.get(i);
- t.clearPreserveNonFloatingState();
+ synchronized (mService.mWindowMap) {
+ mBoundsAnimating = false;
+ for (int i = 0; i < mChildren.size(); i++) {
+ final Task t = mChildren.get(i);
+ t.clearPreserveNonFloatingState();
+ }
+ mService.requestTraversal();
}
- mService.requestTraversal();
}
@Override
public boolean shouldDeferStartOnMoveToFullscreen() {
- // Workaround for the recents animation -- normally we need to wait for the new activity to
- // show before starting the PiP animation, but because we start and show the home activity
- // early for the recents animation prior to the PiP animation starting, there is no
- // subsequent all-drawn signal. In this case, we can skip the pause when the home stack is
- // already visible and drawn.
- final TaskStack homeStack = mDisplayContent.getHomeStack();
- if (homeStack == null) {
- return true;
- }
- final Task homeTask = homeStack.getTopChild();
- if (homeTask == null) {
- return true;
- }
- final AppWindowToken homeApp = homeTask.getTopVisibleAppToken();
- if (!homeTask.isVisible() || homeApp == null) {
- return true;
+ synchronized (mService.mWindowMap) {
+ // Workaround for the recents animation -- normally we need to wait for the new activity
+ // to show before starting the PiP animation, but because we start and show the home
+ // activity early for the recents animation prior to the PiP animation starting, there
+ // is no subsequent all-drawn signal. In this case, we can skip the pause when the home
+ // stack is already visible and drawn.
+ final TaskStack homeStack = mDisplayContent.getHomeStack();
+ if (homeStack == null) {
+ return true;
+ }
+ final Task homeTask = homeStack.getTopChild();
+ if (homeTask == null) {
+ return true;
+ }
+ final AppWindowToken homeApp = homeTask.getTopVisibleAppToken();
+ if (!homeTask.isVisible() || homeApp == null) {
+ return true;
+ }
+ return !homeApp.allDrawn;
}
- return !homeApp.allDrawn;
}
/**
diff --git a/services/core/jni/Android.bp b/services/core/jni/Android.bp
index 89efe12927ba..9e1191d2c1ef 100644
--- a/services/core/jni/Android.bp
+++ b/services/core/jni/Android.bp
@@ -2,6 +2,8 @@ cc_library_static {
name: "libservices.core",
defaults: ["libservices.core-libs"],
+ cpp_std: "c++17",
+
cflags: [
"-Wall",
"-Werror",
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java
index 1f1b3f88622a..252a1fdb7416 100644
--- a/services/java/com/android/server/SystemServer.java
+++ b/services/java/com/android/server/SystemServer.java
@@ -722,7 +722,7 @@ public final class SystemServer {
// Tracks cpu time spent in binder calls
traceBeginAndSlog("StartBinderCallsStatsService");
- BinderCallsStatsService.start();
+ mSystemServiceManager.startService(BinderCallsStatsService.LifeCycle.class);
traceEnd();
}
diff --git a/services/net/java/android/net/netlink/NetlinkSocket.java b/services/net/java/android/net/netlink/NetlinkSocket.java
index 5af3c299bfc1..cfcba3a84f51 100644
--- a/services/net/java/android/net/netlink/NetlinkSocket.java
+++ b/services/net/java/android/net/netlink/NetlinkSocket.java
@@ -59,10 +59,9 @@ public class NetlinkSocket {
final String errPrefix = "Error in NetlinkSocket.sendOneShotKernelMessage";
final long IO_TIMEOUT = 300L;
- FileDescriptor fd;
+ final FileDescriptor fd = forProto(nlProto);
try {
- fd = forProto(nlProto);
connectToKernel(fd);
sendMessage(fd, msg, 0, msg.length, IO_TIMEOUT);
final ByteBuffer bytes = recvMessage(fd, DEFAULT_RECV_BUFSIZE, IO_TIMEOUT);
@@ -96,9 +95,9 @@ public class NetlinkSocket {
} catch (SocketException e) {
Log.e(TAG, errPrefix, e);
throw new ErrnoException(errPrefix, EIO, e);
+ } finally {
+ IoUtils.closeQuietly(fd);
}
-
- IoUtils.closeQuietly(fd);
}
public static FileDescriptor forProto(int nlProto) throws ErrnoException {
diff --git a/services/tests/servicestests/src/com/android/server/am/ActivityStartInterceptorTest.java b/services/tests/servicestests/src/com/android/server/am/ActivityStartInterceptorTest.java
index 7f55824b3082..420987d03509 100644
--- a/services/tests/servicestests/src/com/android/server/am/ActivityStartInterceptorTest.java
+++ b/services/tests/servicestests/src/com/android/server/am/ActivityStartInterceptorTest.java
@@ -27,6 +27,7 @@ import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.ArgumentMatchers.nullable;
import static org.mockito.Mockito.when;
+import android.app.ActivityManagerInternal;
import android.app.KeyguardManager;
import android.app.admin.DevicePolicyManagerInternal;
import android.content.Context;
@@ -94,11 +95,11 @@ public class ActivityStartInterceptorTest {
@Mock
private UserManager mUserManager;
@Mock
- private UserController mUserController;
- @Mock
private KeyguardManager mKeyguardManager;
@Mock
private PackageManagerService mPackageManager;
+ @Mock
+ private ActivityManagerInternal mAmInternal;
private ActivityStartInterceptor mInterceptor;
private ActivityInfo mAInfo = new ActivityInfo();
@@ -107,11 +108,15 @@ public class ActivityStartInterceptorTest {
public void setUp() {
MockitoAnnotations.initMocks(this);
mService.mAm = mAm;
- mInterceptor = new ActivityStartInterceptor(mService, mSupervisor, mContext,
- mUserController);
+ mService.mAmInternal = mAmInternal;
+ mInterceptor = new ActivityStartInterceptor(mService, mSupervisor, mContext);
mInterceptor.setStates(TEST_USER_ID, TEST_REAL_CALLING_PID, TEST_REAL_CALLING_UID,
TEST_START_FLAGS, TEST_CALLING_PACKAGE);
+ // Mock ActivityManagerInternal
+ LocalServices.removeServiceForTest(ActivityManagerInternal.class);
+ LocalServices.addService(ActivityManagerInternal.class, mAmInternal);
+
// Mock DevicePolicyManagerInternal
LocalServices.removeServiceForTest(DevicePolicyManagerInternal.class);
LocalServices.addService(DevicePolicyManagerInternal.class,
@@ -193,7 +198,7 @@ public class ActivityStartInterceptorTest {
@Test
public void testWorkChallenge() {
// GIVEN that the user the activity is starting as is currently locked
- when(mUserController.shouldConfirmCredentials(TEST_USER_ID)).thenReturn(true);
+ when(mAmInternal.shouldConfirmCredentials(TEST_USER_ID)).thenReturn(true);
// THEN calling intercept returns true
mInterceptor.intercept(null, null, mAInfo, null, null, 0, 0, null);
diff --git a/services/tests/servicestests/src/com/android/server/am/ActivityTestsBase.java b/services/tests/servicestests/src/com/android/server/am/ActivityTestsBase.java
index 41c89554b1a4..f2d3eb6acd47 100644
--- a/services/tests/servicestests/src/com/android/server/am/ActivityTestsBase.java
+++ b/services/tests/servicestests/src/com/android/server/am/ActivityTestsBase.java
@@ -106,13 +106,15 @@ public class ActivityTestsBase {
}
protected ActivityTaskManagerService createActivityTaskManagerService() {
- final TestActivityTaskManagerService atm = spy(new TestActivityTaskManagerService(mContext));
+ final TestActivityTaskManagerService atm =
+ spy(new TestActivityTaskManagerService(mContext));
setupActivityManagerService(atm);
return atm;
}
- protected ActivityManagerService createActivityManagerService() {
- final TestActivityTaskManagerService atm = spy(new TestActivityTaskManagerService(mContext));
+ ActivityManagerService createActivityManagerService() {
+ final TestActivityTaskManagerService atm =
+ spy(new TestActivityTaskManagerService(mContext));
return setupActivityManagerService(atm);
}
diff --git a/services/tests/servicestests/src/com/android/server/am/RecentTasksTest.java b/services/tests/servicestests/src/com/android/server/am/RecentTasksTest.java
index a4e4409f3eb9..3547b0ddcadf 100644
--- a/services/tests/servicestests/src/com/android/server/am/RecentTasksTest.java
+++ b/services/tests/servicestests/src/com/android/server/am/RecentTasksTest.java
@@ -108,37 +108,6 @@ public class RecentTasksTest extends ActivityTestsBase {
private CallbacksRecorder mCallbacksRecorder;
- class TestUserController extends UserController {
- TestUserController(ActivityManagerService service) {
- super(service);
- }
-
- @Override
- int[] getCurrentProfileIds() {
- return new int[] { TEST_USER_0_ID, TEST_QUIET_USER_ID };
- }
-
- @Override
- Set<Integer> getProfileIds(int userId) {
- Set<Integer> profileIds = new HashSet<>();
- profileIds.add(TEST_USER_0_ID);
- profileIds.add(TEST_QUIET_USER_ID);
- return profileIds;
- }
-
- @Override
- UserInfo getUserInfo(int userId) {
- switch (userId) {
- case TEST_USER_0_ID:
- case TEST_USER_1_ID:
- return DEFAULT_USER_INFO;
- case TEST_QUIET_USER_ID:
- return QUIET_USER_INFO;
- }
- return null;
- }
- }
-
@Before
@Override
public void setUp() throws Exception {
@@ -829,7 +798,7 @@ public class RecentTasksTest extends ActivityTestsBase {
@Override
protected RecentTasks createRecentTasks() {
- return new TestRecentTasks(this, mTaskPersister, new TestUserController(mAm));
+ return new TestRecentTasks(this, mTaskPersister);
}
@Override
@@ -954,9 +923,33 @@ public class RecentTasksTest extends ActivityTestsBase {
boolean lastAllowed;
- TestRecentTasks(ActivityTaskManagerService service, TaskPersister taskPersister,
- UserController userController) {
- super(service, taskPersister, userController);
+ TestRecentTasks(ActivityTaskManagerService service, TaskPersister taskPersister) {
+ super(service, taskPersister);
+ }
+
+ @Override
+ Set<Integer> getProfileIds(int userId) {
+ Set<Integer> profileIds = new HashSet<>();
+ profileIds.add(TEST_USER_0_ID);
+ profileIds.add(TEST_QUIET_USER_ID);
+ return profileIds;
+ }
+
+ @Override
+ UserInfo getUserInfo(int userId) {
+ switch (userId) {
+ case TEST_USER_0_ID:
+ case TEST_USER_1_ID:
+ return DEFAULT_USER_INFO;
+ case TEST_QUIET_USER_ID:
+ return QUIET_USER_INFO;
+ }
+ return null;
+ }
+
+ @Override
+ int[] getCurrentProfileIds() {
+ return new int[] { TEST_USER_0_ID, TEST_QUIET_USER_ID };
}
@Override
diff --git a/services/tests/servicestests/src/com/android/server/wm/BoundsAnimationControllerTests.java b/services/tests/servicestests/src/com/android/server/wm/BoundsAnimationControllerTests.java
index ff631e74e004..08b522c0c66e 100644
--- a/services/tests/servicestests/src/com/android/server/wm/BoundsAnimationControllerTests.java
+++ b/services/tests/servicestests/src/com/android/server/wm/BoundsAnimationControllerTests.java
@@ -151,11 +151,13 @@ public class BoundsAnimationControllerTests extends WindowTestsBase {
}
@Override
- public void onAnimationStart(boolean schedulePipModeChangedCallback, boolean forceUpdate) {
+ public boolean onAnimationStart(boolean schedulePipModeChangedCallback,
+ boolean forceUpdate) {
mAwaitingAnimationStart = false;
mAnimationStarted = true;
mSchedulePipModeChangedOnStart = schedulePipModeChangedCallback;
mForcePipModeChangedCallback = forceUpdate;
+ return true;
}
@Override
diff --git a/services/tests/servicestests/src/com/android/server/wm/TaskSnapshotSurfaceTest.java b/services/tests/servicestests/src/com/android/server/wm/TaskSnapshotSurfaceTest.java
index b19373efd1b0..21402cee0b55 100644
--- a/services/tests/servicestests/src/com/android/server/wm/TaskSnapshotSurfaceTest.java
+++ b/services/tests/servicestests/src/com/android/server/wm/TaskSnapshotSurfaceTest.java
@@ -59,7 +59,7 @@ public class TaskSnapshotSurfaceTest extends WindowTestsBase {
private void setupSurface(int width, int height, Rect contentInsets, int sysuiVis,
int windowFlags, Rect taskBounds) {
final GraphicBuffer buffer = GraphicBuffer.create(width, height, PixelFormat.RGBA_8888,
- GraphicBuffer.USAGE_SW_READ_NEVER | GraphicBuffer.USAGE_SW_WRITE_NEVER);
+ GraphicBuffer.USAGE_SW_READ_RARELY | GraphicBuffer.USAGE_SW_WRITE_NEVER);
final TaskSnapshot snapshot = new TaskSnapshot(buffer,
ORIENTATION_PORTRAIT, contentInsets, false, 1.0f, true /* isRealSnapshot */,
WINDOWING_MODE_FULLSCREEN, 0 /* systemUiVisibility */, false /* isTranslucent */);
diff --git a/services/usage/java/com/android/server/usage/IntervalStats.java b/services/usage/java/com/android/server/usage/IntervalStats.java
index 0dce7382290c..4b7e21f2d536 100644
--- a/services/usage/java/com/android/server/usage/IntervalStats.java
+++ b/services/usage/java/com/android/server/usage/IntervalStats.java
@@ -27,7 +27,9 @@ import android.util.ArraySet;
import java.util.List;
-class IntervalStats {
+import com.android.internal.annotations.VisibleForTesting;
+
+public class IntervalStats {
public long beginTime;
public long endTime;
public long lastTimeSaved;
@@ -149,7 +151,11 @@ class IntervalStats {
&& eventType != UsageEvents.Event.STANDBY_BUCKET_CHANGED;
}
- void update(String packageName, long timeStamp, int eventType) {
+ /**
+ * @hide
+ */
+ @VisibleForTesting
+ public void update(String packageName, long timeStamp, int eventType) {
UsageStats usageStats = getOrCreateUsageStats(packageName);
// TODO(adamlesinski): Ensure that we recover from incorrect event sequences
diff --git a/services/usage/java/com/android/server/usage/UsageStatsDatabase.java b/services/usage/java/com/android/server/usage/UsageStatsDatabase.java
index 970546976336..5ab5dc223d9e 100644
--- a/services/usage/java/com/android/server/usage/UsageStatsDatabase.java
+++ b/services/usage/java/com/android/server/usage/UsageStatsDatabase.java
@@ -42,7 +42,7 @@ import java.util.List;
/**
* Provides an interface to query for UsageStat data from an XML database.
*/
-class UsageStatsDatabase {
+public class UsageStatsDatabase {
private static final int CURRENT_VERSION = 3;
// Current version of the backup schema
@@ -369,7 +369,7 @@ class UsageStatsDatabase {
/**
* Figures out what to extract from the given IntervalStats object.
*/
- interface StatCombiner<T> {
+ public interface StatCombiner<T> {
/**
* Implementations should extract interesting from <code>stats</code> and add it
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java
index 6e261dd98cac..9e23c5cbbecb 100644
--- a/telephony/java/android/telephony/TelephonyManager.java
+++ b/telephony/java/android/telephony/TelephonyManager.java
@@ -1312,6 +1312,33 @@ public class TelephonyManager {
}
/**
+ * Returns the Type Allocation Code from the IMEI. Return null if Type Allocation Code is not
+ * available.
+ */
+ public String getTypeAllocationCode() {
+ return getTypeAllocationCode(getSlotIndex());
+ }
+
+ /**
+ * Returns the Type Allocation Code from the IMEI. Return null if Type Allocation Code is not
+ * available.
+ *
+ * @param slotIndex of which Type Allocation Code is returned
+ */
+ public String getTypeAllocationCode(int slotIndex) {
+ ITelephony telephony = getITelephony();
+ if (telephony == null) return null;
+
+ try {
+ return telephony.getTypeAllocationCodeForSlot(slotIndex);
+ } catch (RemoteException ex) {
+ return null;
+ } catch (NullPointerException ex) {
+ return null;
+ }
+ }
+
+ /**
* Returns the MEID (Mobile Equipment Identifier). Return null if MEID is not available.
*
* <p>Requires Permission: {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
@@ -1347,6 +1374,33 @@ public class TelephonyManager {
}
/**
+ * Returns the Manufacturer Code from the MEID. Return null if Manufacturer Code is not
+ * available.
+ */
+ public String getManufacturerCode() {
+ return getManufacturerCode(getSlotIndex());
+ }
+
+ /**
+ * Returns the Manufacturer Code from the MEID. Return null if Manufacturer Code is not
+ * available.
+ *
+ * @param slotIndex of which Type Allocation Code is returned
+ */
+ public String getManufacturerCode(int slotIndex) {
+ ITelephony telephony = getITelephony();
+ if (telephony == null) return null;
+
+ try {
+ return telephony.getManufacturerCodeForSlot(slotIndex);
+ } catch (RemoteException ex) {
+ return null;
+ } catch (NullPointerException ex) {
+ return null;
+ }
+ }
+
+ /**
* Returns the Network Access Identifier (NAI). Return null if NAI is not available.
*
* <p>Requires Permission: {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
diff --git a/telephony/java/android/telephony/ims/ImsExternalCallState.java b/telephony/java/android/telephony/ims/ImsExternalCallState.java
index d03c7e1da5fa..e158fa84e34e 100644
--- a/telephony/java/android/telephony/ims/ImsExternalCallState.java
+++ b/telephony/java/android/telephony/ims/ImsExternalCallState.java
@@ -87,6 +87,7 @@ public final class ImsExternalCallState implements Parcelable {
mCallId = in.readInt();
ClassLoader classLoader = ImsExternalCallState.class.getClassLoader();
mAddress = in.readParcelable(classLoader);
+ mLocalAddress = in.readParcelable(classLoader);
mIsPullable = (in.readInt() != 0);
mCallState = in.readInt();
mCallType = in.readInt();
@@ -103,6 +104,7 @@ public final class ImsExternalCallState implements Parcelable {
public void writeToParcel(Parcel out, int flags) {
out.writeInt(mCallId);
out.writeParcelable(mAddress, 0);
+ out.writeParcelable(mLocalAddress, 0);
out.writeInt(mIsPullable ? 1 : 0);
out.writeInt(mCallState);
out.writeInt(mCallType);
@@ -131,6 +133,11 @@ public final class ImsExternalCallState implements Parcelable {
return mAddress;
}
+ /** @hide */
+ public Uri getLocalAddress() {
+ return mLocalAddress;
+ }
+
public boolean isCallPullable() {
return mIsPullable;
}
@@ -151,6 +158,7 @@ public final class ImsExternalCallState implements Parcelable {
public String toString() {
return "ImsExternalCallState { mCallId = " + mCallId +
", mAddress = " + Log.pii(mAddress) +
+ ", mLocalAddress = " + Log.pii(mLocalAddress) +
", mIsPullable = " + mIsPullable +
", mCallState = " + mCallState +
", mCallType = " + mCallType +
diff --git a/telephony/java/com/android/internal/telephony/ITelephony.aidl b/telephony/java/com/android/internal/telephony/ITelephony.aidl
index 84a18b453941..d850fbc471ab 100644
--- a/telephony/java/com/android/internal/telephony/ITelephony.aidl
+++ b/telephony/java/com/android/internal/telephony/ITelephony.aidl
@@ -1195,6 +1195,13 @@ interface ITelephony {
String getImeiForSlot(int slotIndex, String callingPackage);
/**
+ * Returns the Type Allocation Code from the IMEI for the given slot.
+ *
+ * @param slotIndex - Which slot to retrieve the Type Allocation Code from.
+ */
+ String getTypeAllocationCodeForSlot(int slotIndex);
+
+ /**
* Returns the MEID for the given slot.
*
* @param slotIndex - device slot.
@@ -1205,6 +1212,13 @@ interface ITelephony {
String getMeidForSlot(int slotIndex, String callingPackage);
/**
+ * Returns the Manufacturer Code from the MEID for the given slot.
+ *
+ * @param slotIndex - Which slot to retrieve the Manufacturer Code from.
+ */
+ String getManufacturerCodeForSlot(int slotIndex);
+
+ /**
* Returns the device software version.
*
* @param slotIndex - device slot.
diff --git a/tests/UsageStatsPerfTests/Android.mk b/tests/UsageStatsPerfTests/Android.mk
new file mode 100644
index 000000000000..cd29b51e5a24
--- /dev/null
+++ b/tests/UsageStatsPerfTests/Android.mk
@@ -0,0 +1,34 @@
+# Copyright (C) 2018 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+LOCAL_PATH := $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_TAGS := tests
+
+LOCAL_SRC_FILES := \
+ $(call all-java-files-under, src)
+
+LOCAL_STATIC_JAVA_LIBRARIES := \
+ android-support-test \
+ apct-perftests-utils \
+ services.usage
+
+LOCAL_PACKAGE_NAME := UsageStatsPerfTests
+LOCAL_PRIVATE_PLATFORM_APIS := true
+
+# For android.permission.FORCE_STOP_PACKAGES permission
+LOCAL_CERTIFICATE := platform
+
+include $(BUILD_PACKAGE)
diff --git a/tests/UsageStatsPerfTests/AndroidManifest.xml b/tests/UsageStatsPerfTests/AndroidManifest.xml
new file mode 100644
index 000000000000..596a79cd8948
--- /dev/null
+++ b/tests/UsageStatsPerfTests/AndroidManifest.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.android.frameworks.perftests.usage">
+ <uses-sdk
+ android:minSdkVersion="21" />
+ <uses-permission android:name="android.permission.DUMP" />
+ <uses-permission android:name="android.permission.FORCE_STOP_PACKAGES" />
+
+ <application>
+ <uses-library android:name="android.test.runner" />
+ </application>
+
+ <instrumentation android:name="android.support.test.runner.AndroidJUnitRunner"
+ android:targetPackage="com.android.frameworks.perftests.usage"/>
+</manifest>
diff --git a/tests/UsageStatsPerfTests/AndroidTest.xml b/tests/UsageStatsPerfTests/AndroidTest.xml
new file mode 100644
index 000000000000..c9b51dc5ba07
--- /dev/null
+++ b/tests/UsageStatsPerfTests/AndroidTest.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<configuration description="Runs UsageStats Performance Tests">
+ <target_preparer class="com.android.tradefed.targetprep.TestAppInstallSetup">
+ <option name="test-file-name" value="UsageStatsPerfTests.apk"/>
+ <option name="cleanup-apks" value="true"/>
+ </target_preparer>
+
+ <option name="test-suite-tag" value="apct"/>
+ <option name="test-tag" value="UsageStatsPerfTests"/>
+ <test class="com.android.tradefed.testtype.AndroidJUnitTest">
+ <option name="package" value="com.android.frameworks.perftests.usage"/>
+ <option name="runner" value="android.support.test.runner.AndroidJUnitRunner"/>
+ </test>
+</configuration> \ No newline at end of file
diff --git a/tests/UsageStatsPerfTests/src/com/android/frameworks/perftests/usage/tests/UsageStatsDatabasePerfTest.java b/tests/UsageStatsPerfTests/src/com/android/frameworks/perftests/usage/tests/UsageStatsDatabasePerfTest.java
new file mode 100644
index 000000000000..8467bee819cb
--- /dev/null
+++ b/tests/UsageStatsPerfTests/src/com/android/frameworks/perftests/usage/tests/UsageStatsDatabasePerfTest.java
@@ -0,0 +1,183 @@
+/*
+ * Copyright (C) 2018 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
+package com.android.frameworks.perftests.usage.tests;
+
+import static junit.framework.Assert.assertEquals;
+
+import com.android.server.usage.UsageStatsDatabase;
+import com.android.server.usage.UsageStatsDatabase.StatCombiner;
+import com.android.server.usage.IntervalStats;
+
+import android.app.usage.EventList;
+import android.app.usage.UsageEvents;
+import android.app.usage.UsageStatsManager;
+import android.content.Context;
+import android.os.SystemClock;
+import android.perftests.utils.ManualBenchmarkState;
+import android.perftests.utils.PerfManualStatusReporter;
+import android.support.test.filters.LargeTest;
+import android.support.test.InstrumentationRegistry;
+import android.support.test.runner.AndroidJUnit4;
+
+import org.junit.BeforeClass;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.List;
+
+@RunWith(AndroidJUnit4.class)
+@LargeTest
+public class UsageStatsDatabasePerfTest {
+ protected static Context sContext;
+ private static UsageStatsDatabase sUsageStatsDatabase;
+ private static File mTestDir;
+
+ // Represents how many apps might have used in a day by a user with a few apps
+ final static int FEW_PKGS = 10;
+ // Represent how many apps might have used in a day by a user with many apps
+ final static int MANY_PKGS = 50;
+ // Represents how many usage events per app a device might have with light usage
+ final static int LIGHT_USE = 10;
+ // Represents how many usage events per app a device might have with heavy usage
+ final static int HEAVY_USE = 50;
+
+ private static final StatCombiner<UsageEvents.Event> sUsageStatsCombiner =
+ new StatCombiner<UsageEvents.Event>() {
+ @Override
+ public void combine(IntervalStats stats, boolean mutable,
+ List<UsageEvents.Event> accResult) {
+ final int size = stats.events.size();
+ for (int i = 0; i < size; i++) {
+ accResult.add(stats.events.get(i));
+ }
+ }
+ };
+
+
+ @Rule
+ public PerfManualStatusReporter mPerfManualStatusReporter = new PerfManualStatusReporter();
+
+ @BeforeClass
+ public static void setUpOnce() {
+ sContext = InstrumentationRegistry.getTargetContext();
+ mTestDir = new File(sContext.getFilesDir(), "UsageStatsDatabasePerfTest");
+ sUsageStatsDatabase = new UsageStatsDatabase(mTestDir);
+ sUsageStatsDatabase.init(1);
+ }
+
+ private static void populateIntervalStats(IntervalStats intervalStats, int packageCount,
+ int eventsPerPackage) {
+ if (intervalStats.events == null) {
+ intervalStats.events = new EventList();
+ }
+ for (int pkg = 0; pkg < packageCount; pkg++) {
+ UsageEvents.Event event = new UsageEvents.Event();
+ event.mPackage = "fake.package.name" + pkg;
+ event.mTimeStamp = 1;
+ event.mEventType = UsageEvents.Event.MOVE_TO_FOREGROUND;
+ for (int evt = 0; evt < eventsPerPackage; evt++) {
+ intervalStats.events.insert(event);
+ intervalStats.update(event.mPackage, event.mTimeStamp, event.mEventType);
+ }
+ }
+ }
+
+ private static void clearUsageStatsFiles() {
+ File[] intervalDirs = mTestDir.listFiles();
+ for (File intervalDir : intervalDirs) {
+ if (intervalDir.isDirectory()) {
+ File[] usageFiles = intervalDir.listFiles();
+ for (File f : usageFiles) {
+ f.delete();
+ }
+ }
+ }
+ }
+
+ private void runQueryUsageStatsTest(int packageCount, int eventsPerPackage) throws IOException {
+ final ManualBenchmarkState benchmarkState = mPerfManualStatusReporter.getBenchmarkState();
+ IntervalStats intervalStats = new IntervalStats();
+ populateIntervalStats(intervalStats, packageCount, eventsPerPackage);
+ sUsageStatsDatabase.putUsageStats(0, intervalStats);
+ long elapsedTimeNs = 0;
+ while (benchmarkState.keepRunning(elapsedTimeNs)) {
+ final long startTime = SystemClock.elapsedRealtimeNanos();
+ List<UsageEvents.Event> temp = sUsageStatsDatabase.queryUsageStats(
+ UsageStatsManager.INTERVAL_DAILY, 0, 2, sUsageStatsCombiner);
+ final long endTime = SystemClock.elapsedRealtimeNanos();
+ elapsedTimeNs = endTime - startTime;
+ assertEquals(packageCount * eventsPerPackage, temp.size());
+ }
+ }
+
+ private void runPutUsageStatsTest(int packageCount, int eventsPerPackage) throws IOException {
+ final ManualBenchmarkState benchmarkState = mPerfManualStatusReporter.getBenchmarkState();
+ IntervalStats intervalStats = new IntervalStats();
+ populateIntervalStats(intervalStats, packageCount, eventsPerPackage);
+ long elapsedTimeNs = 0;
+ while (benchmarkState.keepRunning(elapsedTimeNs)) {
+ final long startTime = SystemClock.elapsedRealtimeNanos();
+ sUsageStatsDatabase.putUsageStats(0, intervalStats);
+ final long endTime = SystemClock.elapsedRealtimeNanos();
+ elapsedTimeNs = endTime - startTime;
+ clearUsageStatsFiles();
+ }
+ }
+
+ @Test
+ public void testQueryUsageStats_FewPkgsLightUse() throws IOException {
+ runQueryUsageStatsTest(FEW_PKGS, LIGHT_USE);
+ }
+
+ @Test
+ public void testPutUsageStats_FewPkgsLightUse() throws IOException {
+ runPutUsageStatsTest(FEW_PKGS, LIGHT_USE);
+ }
+
+ @Test
+ public void testQueryUsageStats_FewPkgsHeavyUse() throws IOException {
+ runQueryUsageStatsTest(FEW_PKGS, HEAVY_USE);
+ }
+
+ @Test
+ public void testPutUsageStats_FewPkgsHeavyUse() throws IOException {
+ runPutUsageStatsTest(FEW_PKGS, HEAVY_USE);
+ }
+
+ @Test
+ public void testQueryUsageStats_ManyPkgsLightUse() throws IOException {
+ runQueryUsageStatsTest(MANY_PKGS, LIGHT_USE);
+ }
+
+ @Test
+ public void testPutUsageStats_ManyPkgsLightUse() throws IOException {
+ runPutUsageStatsTest(MANY_PKGS, LIGHT_USE);
+ }
+
+ @Test
+ public void testQueryUsageStats_ManyPkgsHeavyUse() throws IOException {
+ runQueryUsageStatsTest(MANY_PKGS, HEAVY_USE);
+ }
+
+ @Test
+ public void testPutUsageStats_ManyPkgsHeavyUse() throws IOException {
+ runPutUsageStatsTest(MANY_PKGS, HEAVY_USE);
+ }
+}
diff --git a/wifi/OWNERS b/wifi/OWNERS
index 0efa4646a80a..0601047d7caa 100644
--- a/wifi/OWNERS
+++ b/wifi/OWNERS
@@ -1,5 +1,6 @@
set noparent
etancohen@google.com
+mplass@google.com
+rpius@google.com
satk@google.com
-silberst@google.com