Merge "Import translations. DO NOT MERGE ANYWHERE" into main
diff --git a/Android.bp b/Android.bp
index 5ada10d..8d7ab98 100644
--- a/Android.bp
+++ b/Android.bp
@@ -386,6 +386,7 @@
// TODO(b/120066492): remove gps_debug and protolog.conf.json when the build
// system propagates "required" properly.
"gps_debug.conf",
+ "protolog.conf.json.gz",
"core.protolog.pb",
"framework-res",
// any install dependencies should go into framework-minus-apex-install-dependencies
diff --git a/Ravenwood.bp b/Ravenwood.bp
index 4791640..f43c37b 100644
--- a/Ravenwood.bp
+++ b/Ravenwood.bp
@@ -205,8 +205,10 @@
// Provide runtime versions of utils linked in below
"junit",
"truth",
+ "flag-junit",
"ravenwood-framework",
"ravenwood-junit-impl",
+ "ravenwood-junit-impl-flag",
"mockito-ravenwood-prebuilt",
"inline-mockito-ravenwood-prebuilt",
],
@@ -220,6 +222,7 @@
libs: [
"junit",
"truth",
+ "flag-junit",
"ravenwood-framework",
"ravenwood-junit",
"mockito-ravenwood-prebuilt",
diff --git a/apct-tests/perftests/rubidium/src/android/rubidium/js/JSScriptEnginePerfTests.java b/apct-tests/perftests/rubidium/src/android/rubidium/js/JSScriptEnginePerfTests.java
index ba15796..fc3738c 100644
--- a/apct-tests/perftests/rubidium/src/android/rubidium/js/JSScriptEnginePerfTests.java
+++ b/apct-tests/perftests/rubidium/src/android/rubidium/js/JSScriptEnginePerfTests.java
@@ -53,6 +53,7 @@
import com.android.adservices.service.adselection.AdWithBidArgumentUtil;
import com.android.adservices.service.adselection.CustomAudienceBiddingSignalsArgumentUtil;
import com.android.adservices.service.adselection.CustomAudienceScoringSignalsArgumentUtil;
+import com.android.adservices.service.common.NoOpRetryStrategyImpl;
import com.android.adservices.service.js.IsolateSettings;
import com.android.adservices.service.js.JSScriptArgument;
import com.android.adservices.service.js.JSScriptArrayArgument;
@@ -411,7 +412,8 @@
jsScript,
args,
functionName,
- IsolateSettings.forMaxHeapSizeEnforcementDisabled());
+ IsolateSettings.forMaxHeapSizeEnforcementDisabled(),
+ new NoOpRetryStrategyImpl());
result.addListener(resultLatch::countDown, sExecutorService);
return result;
}
@@ -430,7 +432,8 @@
wasmScript,
args,
functionName,
- IsolateSettings.forMaxHeapSizeEnforcementDisabled());
+ IsolateSettings.forMaxHeapSizeEnforcementDisabled(),
+ new NoOpRetryStrategyImpl());
result.addListener(resultLatch::countDown, sExecutorService);
return result;
}
diff --git a/apex/jobscheduler/service/Android.bp b/apex/jobscheduler/service/Android.bp
index 5586295..0104ee1 100644
--- a/apex/jobscheduler/service/Android.bp
+++ b/apex/jobscheduler/service/Android.bp
@@ -21,6 +21,7 @@
libs: [
"app-compat-annotations",
+ "error_prone_annotations",
"framework",
"services.core",
"unsupportedappusage",
diff --git a/cmds/svc/src/com/android/commands/svc/PowerCommand.java b/cmds/svc/src/com/android/commands/svc/PowerCommand.java
index a7560b2..12b79f4 100644
--- a/cmds/svc/src/com/android/commands/svc/PowerCommand.java
+++ b/cmds/svc/src/com/android/commands/svc/PowerCommand.java
@@ -23,8 +23,6 @@
import android.os.RemoteException;
import android.os.ServiceManager;
import android.os.SystemClock;
-import android.os.SystemProperties;
-import android.sysprop.InitProperties;
public class PowerCommand extends Svc.Command {
private static final int FORCE_SUSPEND_DELAY_DEFAULT_MILLIS = 0;
@@ -142,12 +140,10 @@
// Check if remote exception is benign during shutdown. Pm can be killed
// before system server during shutdown, so remote exception can be ignored
// if it is already in shutdown flow.
+ // sys.powerctl is no longer set to avoid a possible DOS attack (see
+ // bionic/libc/bionic/system_property_set.cpp) so we have no real way of knowing if a
+ // remote exception is real or simply because pm is killed (b/318323013)
+ // So we simply do not display anything.
private void maybeLogRemoteException(String msg) {
- String powerProp = SystemProperties.get("sys.powerctl");
- // Also check if userspace reboot is ongoing, since in case of userspace reboot value of the
- // sys.powerctl property will be reset.
- if (powerProp.isEmpty() && !InitProperties.userspace_reboot_in_progress().orElse(false)) {
- System.err.println(msg);
- }
}
}
diff --git a/core/api/test-current.txt b/core/api/test-current.txt
index af40c3d..a28dc49 100644
--- a/core/api/test-current.txt
+++ b/core/api/test-current.txt
@@ -1547,6 +1547,10 @@
method public boolean isAllowBackgroundAuthentication();
}
+ public abstract static class BiometricPrompt.AuthenticationCallback {
+ method @FlaggedApi("android.hardware.biometrics.face_background_authentication") public void onAuthenticationAcquired(int);
+ }
+
public static class BiometricPrompt.Builder {
method @NonNull @RequiresPermission(anyOf={android.Manifest.permission.TEST_BIOMETRIC, "android.permission.USE_BIOMETRIC_INTERNAL"}) public android.hardware.biometrics.BiometricPrompt.Builder setAllowBackgroundAuthentication(boolean);
method @FlaggedApi("android.multiuser.enable_biometrics_to_unlock_private_space") @NonNull @RequiresPermission(anyOf={android.Manifest.permission.TEST_BIOMETRIC, "android.permission.USE_BIOMETRIC_INTERNAL"}) public android.hardware.biometrics.BiometricPrompt.Builder setAllowBackgroundAuthentication(boolean, boolean);
@@ -1565,6 +1569,7 @@
}
public class SensorProperties {
+ ctor @FlaggedApi("android.hardware.biometrics.face_background_authentication") public SensorProperties(int, int, @NonNull java.util.List<android.hardware.biometrics.SensorProperties.ComponentInfo>);
method @NonNull public java.util.List<android.hardware.biometrics.SensorProperties.ComponentInfo> getComponentInfo();
method public int getSensorId();
method public int getSensorStrength();
@@ -1709,6 +1714,18 @@
}
+package android.hardware.face {
+
+ @FlaggedApi("android.hardware.biometrics.face_background_authentication") public class FaceManager {
+ method @FlaggedApi("android.hardware.biometrics.face_background_authentication") @NonNull @RequiresPermission(android.Manifest.permission.TEST_BIOMETRIC) public android.hardware.biometrics.BiometricTestSession createTestSession(int);
+ method @FlaggedApi("android.hardware.biometrics.face_background_authentication") @NonNull public java.util.List<android.hardware.face.FaceSensorProperties> getSensorProperties();
+ }
+
+ @FlaggedApi("android.hardware.biometrics.face_background_authentication") public class FaceSensorProperties extends android.hardware.biometrics.SensorProperties {
+ }
+
+}
+
package android.hardware.fingerprint {
@Deprecated public class FingerprintManager {
@@ -3944,6 +3961,7 @@
method @NonNull @RequiresPermission(value=android.Manifest.permission.INTERACT_ACROSS_USERS_FULL, conditional=true) public java.util.List<android.view.inputmethod.InputMethodInfo> getInputMethodListAsUser(int);
method public boolean hasActiveInputConnection(@Nullable android.view.View);
method @RequiresPermission(android.Manifest.permission.TEST_INPUT_METHOD) public boolean hasPendingImeVisibilityRequests();
+ method @RequiresPermission(android.Manifest.permission.TEST_INPUT_METHOD) public void hideSoftInputFromServerForTest();
method @RequiresPermission(android.Manifest.permission.TEST_INPUT_METHOD) public boolean isCurrentRootView(@NonNull android.view.View);
method @RequiresPermission(android.Manifest.permission.TEST_INPUT_METHOD) public boolean isInputMethodPickerShown();
method @FlaggedApi("android.view.inputmethod.imm_userhandle_hostsidetests") @NonNull @RequiresPermission(value=android.Manifest.permission.INTERACT_ACROSS_USERS_FULL, conditional=true) public boolean isStylusHandwritingAvailableAsUser(@NonNull android.os.UserHandle);
diff --git a/core/java/android/app/servertransaction/ClientTransaction.java b/core/java/android/app/servertransaction/ClientTransaction.java
index 79696e0..48081bb 100644
--- a/core/java/android/app/servertransaction/ClientTransaction.java
+++ b/core/java/android/app/servertransaction/ClientTransaction.java
@@ -23,6 +23,7 @@
import android.app.ClientTransactionHandler;
import android.app.IApplicationThread;
import android.compat.annotation.UnsupportedAppUsage;
+import android.os.Build;
import android.os.IBinder;
import android.os.Parcel;
import android.os.Parcelable;
@@ -54,10 +55,12 @@
@Nullable
private List<ClientTransactionItem> mTransactionItems;
- /** A list of individual callbacks to a client. */
- // TODO(b/324203798): cleanup after remove UnsupportedAppUsage
- @UnsupportedAppUsage
+ /** @deprecated use {@link #getTransactionItems} instead. */
@Nullable
+ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.UPSIDE_DOWN_CAKE,
+ trackingBug = 324203798,
+ publicAlternatives = "Use {@code #getTransactionItems()}")
+ @Deprecated
private List<ClientTransactionItem> mActivityCallbacks;
/**
@@ -126,42 +129,42 @@
setActivityTokenIfNotSet(activityCallback);
}
- /**
- * Gets the list of callbacks.
- * @deprecated use {@link #getTransactionItems()} instead.
- */
- // TODO(b/324203798): cleanup after remove UnsupportedAppUsage
- @Nullable
+ /** @deprecated use {@link #getTransactionItems()} instead. */
@VisibleForTesting
- @UnsupportedAppUsage
+ @Nullable
+ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.UPSIDE_DOWN_CAKE,
+ trackingBug = 324203798,
+ publicAlternatives = "Use {@code #getTransactionItems()}")
@Deprecated
public List<ClientTransactionItem> getCallbacks() {
return mActivityCallbacks;
}
/**
- * @deprecated a transaction can contain {@link ClientTransactionItem} of different activities,
+ * A transaction can contain {@link ClientTransactionItem} of different activities,
* this must not be used. For any unsupported app usages, please be aware that this is set to
* the activity of the first item in {@link #getTransactionItems()}.
+ *
+ * @deprecated use {@link ClientTransactionItem#getActivityToken()} instead.
*/
- // TODO(b/324203798): cleanup after remove UnsupportedAppUsage
@VisibleForTesting
@Nullable
- @UnsupportedAppUsage
+ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.UPSIDE_DOWN_CAKE,
+ trackingBug = 324203798,
+ publicAlternatives = "Use {@code android.app.servertransaction"
+ + ".ClientTransactionItem#getActivityToken()}")
@Deprecated
public IBinder getActivityToken() {
return mActivityToken;
}
- /**
- * Gets the target state lifecycle request.
- * @deprecated use {@link #getTransactionItems()} instead.
- */
- // TODO(b/324203798): cleanup after remove UnsupportedAppUsage
+ /** @deprecated use {@link #getTransactionItems()} instead. */
@VisibleForTesting(visibility = PACKAGE)
- @UnsupportedAppUsage
- @Deprecated
@Nullable
+ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.UPSIDE_DOWN_CAKE,
+ trackingBug = 324203798,
+ publicAlternatives = "Use {@code #getTransactionItems()}")
+ @Deprecated
public ActivityLifecycleItem getLifecycleStateRequest() {
return mLifecycleStateRequest;
}
diff --git a/core/java/android/content/Intent.java b/core/java/android/content/Intent.java
index fd2af99..42dd87a 100644
--- a/core/java/android/content/Intent.java
+++ b/core/java/android/content/Intent.java
@@ -1064,7 +1064,11 @@
}
if (sender != null) {
- intent.putExtra(EXTRA_CHOOSER_RESULT_INTENT_SENDER, sender);
+ if (android.service.chooser.Flags.enableChooserResult()) {
+ intent.putExtra(EXTRA_CHOOSER_RESULT_INTENT_SENDER, sender);
+ } else {
+ intent.putExtra(EXTRA_CHOSEN_COMPONENT_INTENT_SENDER, sender);
+ }
}
// Migrate any clip data and flags from target.
diff --git a/core/java/android/hardware/biometrics/BiometricPrompt.java b/core/java/android/hardware/biometrics/BiometricPrompt.java
index 0208fed..d9d4305 100644
--- a/core/java/android/hardware/biometrics/BiometricPrompt.java
+++ b/core/java/android/hardware/biometrics/BiometricPrompt.java
@@ -23,6 +23,7 @@
import static android.hardware.biometrics.BiometricManager.Authenticators;
import static android.hardware.biometrics.Flags.FLAG_ADD_KEY_AGREEMENT_CRYPTO_OBJECT;
import static android.hardware.biometrics.Flags.FLAG_CUSTOM_BIOMETRIC_PROMPT;
+import static android.hardware.biometrics.Flags.FLAG_FACE_BACKGROUND_AUTHENTICATION;
import static android.hardware.biometrics.Flags.FLAG_GET_OP_ID_CRYPTO_OBJECT;
import static android.multiuser.Flags.FLAG_ENABLE_BIOMETRICS_TO_UNLOCK_PRIVATE_SPACE;
@@ -1127,6 +1128,8 @@
* @hide
*/
@Override
+ @TestApi
+ @FlaggedApi(FLAG_FACE_BACKGROUND_AUTHENTICATION)
public void onAuthenticationAcquired(int acquireInfo) {}
/**
diff --git a/core/java/android/hardware/biometrics/SensorProperties.java b/core/java/android/hardware/biometrics/SensorProperties.java
index 3b9cad4..16f71414 100644
--- a/core/java/android/hardware/biometrics/SensorProperties.java
+++ b/core/java/android/hardware/biometrics/SensorProperties.java
@@ -16,6 +16,9 @@
package android.hardware.biometrics;
+import static android.hardware.biometrics.Flags.FLAG_FACE_BACKGROUND_AUTHENTICATION;
+
+import android.annotation.FlaggedApi;
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.TestApi;
@@ -141,8 +144,10 @@
/**
* @hide
*/
+ @TestApi
+ @FlaggedApi(FLAG_FACE_BACKGROUND_AUTHENTICATION)
public SensorProperties(int sensorId, @Strength int sensorStrength,
- List<ComponentInfo> componentInfo) {
+ @NonNull List<ComponentInfo> componentInfo) {
mSensorId = sensorId;
mSensorStrength = sensorStrength;
mComponentInfo = componentInfo;
diff --git a/core/java/android/hardware/face/FaceManager.java b/core/java/android/hardware/face/FaceManager.java
index 066c45f..1b0a485 100644
--- a/core/java/android/hardware/face/FaceManager.java
+++ b/core/java/android/hardware/face/FaceManager.java
@@ -18,6 +18,7 @@
import static android.Manifest.permission.INTERACT_ACROSS_USERS;
import static android.Manifest.permission.MANAGE_BIOMETRIC;
+import static android.Manifest.permission.TEST_BIOMETRIC;
import static android.Manifest.permission.USE_BACKGROUND_FACE_AUTHENTICATION;
import static android.Manifest.permission.USE_BIOMETRIC_INTERNAL;
import static android.hardware.biometrics.BiometricConstants.BIOMETRIC_LOCKOUT_NONE;
@@ -29,6 +30,7 @@
import android.annotation.RequiresPermission;
import android.annotation.SystemApi;
import android.annotation.SystemService;
+import android.annotation.TestApi;
import android.content.Context;
import android.content.pm.PackageManager;
import android.hardware.biometrics.BiometricAuthenticator;
@@ -36,6 +38,7 @@
import android.hardware.biometrics.BiometricFaceConstants;
import android.hardware.biometrics.BiometricPrompt;
import android.hardware.biometrics.BiometricStateListener;
+import android.hardware.biometrics.BiometricTestSession;
import android.hardware.biometrics.CryptoObject;
import android.hardware.biometrics.IBiometricServiceLockoutResetCallback;
import android.os.Binder;
@@ -69,6 +72,7 @@
*/
@FlaggedApi(FLAG_FACE_BACKGROUND_AUTHENTICATION)
@SystemApi
+@TestApi
@SystemService(Context.FACE_SERVICE)
public class FaceManager implements BiometricAuthenticator, BiometricFaceConstants {
@@ -780,6 +784,8 @@
* @hide
*/
@NonNull
+ @TestApi
+ @FlaggedApi(FLAG_FACE_BACKGROUND_AUTHENTICATION)
public List<FaceSensorProperties> getSensorProperties() {
final List<FaceSensorProperties> properties = new ArrayList<>();
final List<FaceSensorPropertiesInternal> internalProperties
@@ -1628,4 +1634,23 @@
Slog.w(TAG, "Unknown enrollment acquired message: " + acquireInfo + ", " + vendorCode);
return null;
}
-}
+
+ /**
+ * Retrieves a test session for FaceManager.
+ *
+ * @hide
+ */
+ @TestApi
+ @NonNull
+ @RequiresPermission(TEST_BIOMETRIC)
+ @FlaggedApi(FLAG_FACE_BACKGROUND_AUTHENTICATION)
+ public BiometricTestSession createTestSession(int sensorId) {
+ try {
+ return new BiometricTestSession(mContext, sensorId,
+ (context, sensorId1, callback) -> mService
+ .createTestSession(sensorId1, callback, context.getOpPackageName()));
+ } catch (RemoteException e) {
+ throw e.rethrowFromSystemServer();
+ }
+ }
+}
\ No newline at end of file
diff --git a/core/java/android/hardware/face/FaceSensorProperties.java b/core/java/android/hardware/face/FaceSensorProperties.java
index f613127..a1ddb0e 100644
--- a/core/java/android/hardware/face/FaceSensorProperties.java
+++ b/core/java/android/hardware/face/FaceSensorProperties.java
@@ -16,8 +16,12 @@
package android.hardware.face;
+import static android.hardware.biometrics.Flags.FLAG_FACE_BACKGROUND_AUTHENTICATION;
+
+import android.annotation.FlaggedApi;
import android.annotation.IntDef;
import android.annotation.NonNull;
+import android.annotation.TestApi;
import android.hardware.biometrics.ComponentInfoInternal;
import android.hardware.biometrics.SensorProperties;
@@ -30,6 +34,8 @@
* Container for face sensor properties.
* @hide
*/
+@TestApi
+@FlaggedApi(FLAG_FACE_BACKGROUND_AUTHENTICATION)
public class FaceSensorProperties extends SensorProperties {
/**
* @hide
diff --git a/core/java/android/hardware/face/IFaceService.aidl b/core/java/android/hardware/face/IFaceService.aidl
index b98c0cb..6515312 100644
--- a/core/java/android/hardware/face/IFaceService.aidl
+++ b/core/java/android/hardware/face/IFaceService.aidl
@@ -39,7 +39,7 @@
interface IFaceService {
// Creates a test session with the specified sensorId
- @EnforcePermission("USE_BIOMETRIC_INTERNAL")
+ @EnforcePermission("TEST_BIOMETRIC")
ITestSession createTestSession(int sensorId, ITestSessionCallback callback, String opPackageName);
// Requests a proto dump of the specified sensor
diff --git a/core/java/android/inputmethodservice/IInputMethodWrapper.java b/core/java/android/inputmethodservice/IInputMethodWrapper.java
index f5b58b9..9dc8c5d 100644
--- a/core/java/android/inputmethodservice/IInputMethodWrapper.java
+++ b/core/java/android/inputmethodservice/IInputMethodWrapper.java
@@ -453,7 +453,7 @@
@BinderThread
@Override
- public void showSoftInput(IBinder showInputToken, @Nullable ImeTracker.Token statsToken,
+ public void showSoftInput(IBinder showInputToken, @NonNull ImeTracker.Token statsToken,
@InputMethod.ShowFlags int flags, ResultReceiver resultReceiver) {
ImeTracker.forLogging().onProgress(statsToken, ImeTracker.PHASE_IME_WRAPPER);
mCaller.executeOrSendMessage(mCaller.obtainMessageIOOO(DO_SHOW_SOFT_INPUT,
@@ -462,7 +462,7 @@
@BinderThread
@Override
- public void hideSoftInput(IBinder hideInputToken, @Nullable ImeTracker.Token statsToken,
+ public void hideSoftInput(IBinder hideInputToken, @NonNull ImeTracker.Token statsToken,
int flags, ResultReceiver resultReceiver) {
ImeTracker.forLogging().onProgress(statsToken, ImeTracker.PHASE_IME_WRAPPER);
mCaller.executeOrSendMessage(mCaller.obtainMessageIOOO(DO_HIDE_SOFT_INPUT,
diff --git a/core/java/android/inputmethodservice/InputMethodService.java b/core/java/android/inputmethodservice/InputMethodService.java
index 2c7ca27..4dbdd91 100644
--- a/core/java/android/inputmethodservice/InputMethodService.java
+++ b/core/java/android/inputmethodservice/InputMethodService.java
@@ -701,7 +701,13 @@
*/
private IBinder mCurHideInputToken;
- /** The token tracking the current IME request or {@code null} otherwise. */
+ /**
+ * The token tracking the current IME request.
+ *
+ * <p> This exists as a workaround to changing the signatures of public methods. It will get
+ * set to a {@code non-null} value before every call that uses it, stored locally inside the
+ * callee, and immediately after reset to {@code null} from the callee.
+ */
@Nullable
private ImeTracker.Token mCurStatsToken;
@@ -907,14 +913,13 @@
@MainThread
@Override
public void hideSoftInputWithToken(int flags, ResultReceiver resultReceiver,
- IBinder hideInputToken, @Nullable ImeTracker.Token statsToken) {
+ IBinder hideInputToken, @NonNull ImeTracker.Token statsToken) {
mSystemCallingHideSoftInput = true;
mCurHideInputToken = hideInputToken;
mCurStatsToken = statsToken;
try {
hideSoftInput(flags, resultReceiver);
} finally {
- mCurStatsToken = null;
mCurHideInputToken = null;
mSystemCallingHideSoftInput = false;
}
@@ -926,23 +931,33 @@
@MainThread
@Override
public void hideSoftInput(int flags, ResultReceiver resultReceiver) {
- ImeTracker.forLogging().onProgress(
- mCurStatsToken, ImeTracker.PHASE_IME_HIDE_SOFT_INPUT);
if (DEBUG) Log.v(TAG, "hideSoftInput()");
+
+ final var statsToken = mCurStatsToken != null ? mCurStatsToken
+ : createStatsToken(false /* show */,
+ SoftInputShowHideReason.HIDE_SOFT_INPUT_LEGACY_DIRECT,
+ ImeTracker.isFromUser(mRootView));
+ mCurStatsToken = null;
+
+ // TODO(b/148086656): Disallow IME developers from calling InputMethodImpl methods.
if (getApplicationInfo().targetSdkVersion >= Build.VERSION_CODES.R
&& !mSystemCallingHideSoftInput) {
Log.e(TAG, "IME shouldn't call hideSoftInput on itself."
+ " Use requestHideSelf(int) itself");
+ ImeTracker.forLogging().onFailed(statsToken, ImeTracker.PHASE_IME_HIDE_SOFT_INPUT);
return;
}
+ ImeTracker.forLogging().onProgress(statsToken, ImeTracker.PHASE_IME_HIDE_SOFT_INPUT);
+
+ Trace.traceBegin(TRACE_TAG_WINDOW_MANAGER, "IMS.hideSoftInput");
ImeTracing.getInstance().triggerServiceDump(
"InputMethodService.InputMethodImpl#hideSoftInput", mDumper,
null /* icProto */);
final boolean wasVisible = isInputViewShown();
- Trace.traceBegin(TRACE_TAG_WINDOW_MANAGER, "IMS.hideSoftInput");
mShowInputFlags = 0;
mShowInputRequested = false;
+ mCurStatsToken = statsToken;
hideWindow();
final boolean isVisible = isInputViewShown();
final boolean visibilityChanged = isVisible != wasVisible;
@@ -963,14 +978,13 @@
@Override
public void showSoftInputWithToken(@InputMethod.ShowFlags int flags,
ResultReceiver resultReceiver, IBinder showInputToken,
- @Nullable ImeTracker.Token statsToken) {
+ @NonNull ImeTracker.Token statsToken) {
mSystemCallingShowSoftInput = true;
mCurShowInputToken = showInputToken;
mCurStatsToken = statsToken;
try {
showSoftInput(flags, resultReceiver);
} finally {
- mCurStatsToken = null;
mCurShowInputToken = null;
mSystemCallingShowSoftInput = false;
}
@@ -982,16 +996,23 @@
@MainThread
@Override
public void showSoftInput(@InputMethod.ShowFlags int flags, ResultReceiver resultReceiver) {
- ImeTracker.forLogging().onProgress(
- mCurStatsToken, ImeTracker.PHASE_IME_SHOW_SOFT_INPUT);
if (DEBUG) Log.v(TAG, "showSoftInput()");
+
+ final var statsToken = mCurStatsToken != null ? mCurStatsToken
+ : createStatsToken(true /* show */,
+ SoftInputShowHideReason.SHOW_SOFT_INPUT_LEGACY_DIRECT,
+ ImeTracker.isFromUser(mRootView));
+ mCurStatsToken = null;
+
// TODO(b/148086656): Disallow IME developers from calling InputMethodImpl methods.
if (getApplicationInfo().targetSdkVersion >= Build.VERSION_CODES.R
&& !mSystemCallingShowSoftInput) {
- Log.e(TAG," IME shouldn't call showSoftInput on itself."
+ Log.e(TAG, "IME shouldn't call showSoftInput on itself."
+ " Use requestShowSelf(int) itself");
+ ImeTracker.forLogging().onFailed(statsToken, ImeTracker.PHASE_IME_SHOW_SOFT_INPUT);
return;
}
+ ImeTracker.forLogging().onProgress(statsToken, ImeTracker.PHASE_IME_SHOW_SOFT_INPUT);
Trace.traceBegin(TRACE_TAG_WINDOW_MANAGER, "IMS.showSoftInput");
ImeTracing.getInstance().triggerServiceDump(
@@ -999,11 +1020,12 @@
null /* icProto */);
final boolean wasVisible = isInputViewShown();
if (dispatchOnShowInputRequested(flags, false)) {
- ImeTracker.forLogging().onProgress(mCurStatsToken,
+ ImeTracker.forLogging().onProgress(statsToken,
ImeTracker.PHASE_IME_ON_SHOW_SOFT_INPUT_TRUE);
- showWindow(true);
+ mCurStatsToken = statsToken;
+ showWindow(true /* showInput */);
} else {
- ImeTracker.forLogging().onFailed(mCurStatsToken,
+ ImeTracker.forLogging().onFailed(statsToken,
ImeTracker.PHASE_IME_ON_SHOW_SOFT_INPUT_TRUE);
}
setImeWindowStatus(mapToImeWindowStatus(), mBackDisposition);
@@ -1895,21 +1917,23 @@
if (showingInput) {
// If we were last showing the soft keyboard, try to do so again.
if (dispatchOnShowInputRequested(showFlags, true)) {
- showWindow(true);
+ showWindowWithToken(true /* showInput */,
+ SoftInputShowHideReason.RESET_NEW_CONFIGURATION);
if (completions != null) {
mCurCompletions = completions;
onDisplayCompletions(completions);
}
} else {
- hideWindow();
+ hideWindowWithToken(SoftInputShowHideReason.RESET_NEW_CONFIGURATION);
}
} else if (mCandidatesVisibility == View.VISIBLE) {
// If the candidates are currently visible, make sure the
// window is shown for them.
- showWindow(false);
+ showWindowWithToken(false /* showInput */,
+ SoftInputShowHideReason.RESET_NEW_CONFIGURATION);
} else {
// Otherwise hide the window.
- hideWindow();
+ hideWindowWithToken(SoftInputShowHideReason.RESET_NEW_CONFIGURATION);
}
// If user uses hard keyboard, IME button should always be shown.
boolean showing = onEvaluateInputViewShown();
@@ -2368,13 +2392,15 @@
// has not asked for the input view to be shown, then we need
// to update whether the window is shown.
if (shown) {
- showWindow(false);
+ showWindowWithToken(false /* showInput */,
+ SoftInputShowHideReason.UPDATE_CANDIDATES_VIEW_VISIBILITY);
} else {
- hideWindow();
+ hideWindowWithToken(
+ SoftInputShowHideReason.UPDATE_CANDIDATES_VIEW_VISIBILITY);
}
}
}
-
+
void updateCandidatesVisibility(boolean shown) {
int vis = shown ? View.VISIBLE : getCandidatesHiddenVisibility();
if (mCandidatesVisibility != vis) {
@@ -3009,6 +3035,19 @@
return result;
}
+ /**
+ * Utility function that creates an IME request tracking token before
+ * calling {@link #showWindow}.
+ *
+ * @param showInput whether the input window should be shown.
+ * @param reason the reason why the IME request was created.
+ */
+ private void showWindowWithToken(boolean showInput, @SoftInputShowHideReason int reason) {
+ mCurStatsToken = createStatsToken(true /* show */, reason,
+ ImeTracker.isFromUser(mRootView));
+ showWindow(showInput);
+ }
+
public void showWindow(boolean showInput) {
if (DEBUG) Log.v(TAG, "Showing window: showInput=" + showInput
+ " mShowInputRequested=" + mShowInputRequested
@@ -3018,11 +3057,20 @@
+ " mInputStarted=" + mInputStarted
+ " mShowInputFlags=" + mShowInputFlags);
+ final var statsToken = mCurStatsToken != null ? mCurStatsToken
+ : createStatsToken(true /* show */,
+ SoftInputShowHideReason.SHOW_WINDOW_LEGACY_DIRECT,
+ ImeTracker.isFromUser(mRootView));
+ mCurStatsToken = null;
+
if (mInShowWindow) {
Log.w(TAG, "Re-entrance in to showWindow");
+ ImeTracker.forLogging().onCancelled(statsToken, ImeTracker.PHASE_IME_SHOW_WINDOW);
return;
}
+ ImeTracker.forLogging().onProgress(statsToken, ImeTracker.PHASE_IME_SHOW_WINDOW);
+
ImeTracing.getInstance().triggerServiceDump("InputMethodService#showWindow", mDumper,
null /* icProto */);
Trace.traceBegin(TRACE_TAG_WINDOW_MANAGER, "IMS.showWindow");
@@ -3046,7 +3094,7 @@
if (DEBUG) Log.v(TAG, "showWindow: draw decorView!");
mWindow.show();
mDecorViewWasVisible = true;
- applyVisibilityInInsetsConsumerIfNecessary(true);
+ applyVisibilityInInsetsConsumerIfNecessary(true /* setVisible */, statsToken);
cancelImeSurfaceRemoval();
mInShowWindow = false;
Trace.traceEnd(TRACE_TAG_WINDOW_MANAGER);
@@ -3137,13 +3185,15 @@
* Applies the IME visibility in {@link android.view.ImeInsetsSourceConsumer}.
*
* @param setVisible {@code true} to make it visible, false to hide it.
+ * @param statsToken the token tracking the current IME request.
*/
- private void applyVisibilityInInsetsConsumerIfNecessary(boolean setVisible) {
+ private void applyVisibilityInInsetsConsumerIfNecessary(boolean setVisible,
+ @NonNull ImeTracker.Token statsToken) {
ImeTracing.getInstance().triggerServiceDump(
"InputMethodService#applyVisibilityInInsetsConsumerIfNecessary", mDumper,
null /* icProto */);
mPrivOps.applyImeVisibilityAsync(setVisible
- ? mCurShowInputToken : mCurHideInputToken, setVisible, mCurStatsToken);
+ ? mCurShowInputToken : mCurHideInputToken, setVisible, statsToken);
}
private void finishViews(boolean finishingInput) {
@@ -3159,12 +3209,35 @@
mCandidatesViewStarted = false;
}
+ /**
+ * Utility function that creates an IME request tracking token before
+ * calling {@link #hideWindow}.
+ *
+ * @param reason the reason why the IME request was created.
+ */
+ private void hideWindowWithToken(@SoftInputShowHideReason int reason) {
+ // TODO(b/303041796): this should be handled by ImeTracker.isFromUser after fixing it
+ // to work with onClickListeners
+ final boolean isFromUser = ImeTracker.isFromUser(mRootView)
+ || reason == SoftInputShowHideReason.HIDE_SOFT_INPUT_BY_BACK_KEY;
+ mCurStatsToken = createStatsToken(false /* show */, reason, isFromUser);
+ hideWindow();
+ }
+
public void hideWindow() {
if (DEBUG) Log.v(TAG, "CALL: hideWindow");
+
+ final var statsToken = mCurStatsToken != null ? mCurStatsToken
+ : createStatsToken(false /* show */,
+ SoftInputShowHideReason.HIDE_WINDOW_LEGACY_DIRECT,
+ ImeTracker.isFromUser(mRootView));
+ mCurStatsToken = null;
+
+ ImeTracker.forLogging().onProgress(statsToken, ImeTracker.PHASE_IME_HIDE_WINDOW);
ImeTracing.getInstance().triggerServiceDump("InputMethodService#hideWindow", mDumper,
null /* icProto */);
setImeWindowStatus(0, mBackDisposition);
- applyVisibilityInInsetsConsumerIfNecessary(false);
+ applyVisibilityInInsetsConsumerIfNecessary(false /* setVisible */, statsToken);
mWindowVisible = false;
finishViews(false /* finishingInput */);
if (mDecorViewVisible) {
@@ -3440,9 +3513,14 @@
private void requestHideSelf(@InputMethodManager.HideFlags int flags,
@SoftInputShowHideReason int reason) {
+ // TODO(b/303041796): this should be handled by ImeTracker.isFromUser after fixing it
+ // to work with onClickListeners
+ final boolean isFromUser = ImeTracker.isFromUser(mRootView)
+ || reason == SoftInputShowHideReason.HIDE_SOFT_INPUT_BY_BACK_KEY;
+ final var statsToken = createStatsToken(false /* show */, reason, isFromUser);
ImeTracing.getInstance().triggerServiceDump("InputMethodService#requestHideSelf", mDumper,
null /* icProto */);
- mPrivOps.hideMySoftInput(flags, reason);
+ mPrivOps.hideMySoftInput(statsToken, flags, reason);
}
/**
@@ -3450,9 +3528,16 @@
* interact with it.
*/
public final void requestShowSelf(@InputMethodManager.ShowFlags int flags) {
+ requestShowSelf(flags, SoftInputShowHideReason.SHOW_SOFT_INPUT_FROM_IME);
+ }
+
+ private void requestShowSelf(@InputMethodManager.ShowFlags int flags,
+ @SoftInputShowHideReason int reason) {
+ final var statsToken = createStatsToken(true /* show */, reason,
+ ImeTracker.isFromUser(mRootView));
ImeTracing.getInstance().triggerServiceDump("InputMethodService#requestShowSelf", mDumper,
null /* icProto */);
- mPrivOps.showMySoftInput(flags);
+ mPrivOps.showMySoftInput(statsToken, flags, reason);
}
private boolean handleBack(boolean doIt) {
@@ -3472,7 +3557,7 @@
// If we have the window visible for some other reason --
// most likely to show candidates -- then just get rid
// of it. This really shouldn't happen, but just in case...
- if (doIt) hideWindow();
+ if (doIt) hideWindowWithToken(SoftInputShowHideReason.HIDE_SOFT_INPUT_BY_BACK_KEY);
}
return true;
}
@@ -3627,10 +3712,11 @@
@InputMethodManager.HideFlags int hideFlags) {
if (DEBUG) Log.v(TAG, "toggleSoftInput()");
if (isInputViewShown()) {
- requestHideSelf(
- hideFlags, SoftInputShowHideReason.HIDE_SOFT_INPUT_IME_TOGGLE_SOFT_INPUT);
+ requestHideSelf(hideFlags,
+ SoftInputShowHideReason.HIDE_SOFT_INPUT_IME_TOGGLE_SOFT_INPUT);
} else {
- requestShowSelf(showFlags);
+ requestShowSelf(showFlags,
+ SoftInputShowHideReason.SHOW_SOFT_INPUT_IME_TOGGLE_SOFT_INPUT);
}
}
@@ -4272,6 +4358,20 @@
}
/**
+ * Creates an IME request tracking token.
+ *
+ * @param show whether this is a show or a hide request.
+ * @param reason the reason why the IME request was created.
+ * @param isFromUser whether this request was created directly from user interaction.
+ */
+ @NonNull
+ private ImeTracker.Token createStatsToken(boolean show, @SoftInputShowHideReason int reason,
+ boolean isFromUser) {
+ return ImeTracker.forLogging().onStart(show ? ImeTracker.TYPE_SHOW : ImeTracker.TYPE_HIDE,
+ ImeTracker.ORIGIN_IME, reason, isFromUser);
+ }
+
+ /**
* Performs a dump of the InputMethodService's internal state. Override
* to add your own information to the dump.
*/
diff --git a/core/java/android/view/IWindow.aidl b/core/java/android/view/IWindow.aidl
index 11180ae..5ee526e 100644
--- a/core/java/android/view/IWindow.aidl
+++ b/core/java/android/view/IWindow.aidl
@@ -73,7 +73,7 @@
*
* @param types internal insets types (WindowInsets.Type.InsetsType) to show
* @param fromIme true if this request originated from IME (InputMethodService).
- * @param statsToken the token tracking the current IME show request or {@code null} otherwise.
+ * @param statsToken the token tracking the current IME request or {@code null} otherwise.
*/
void showInsets(int types, boolean fromIme, in @nullable ImeTracker.Token statsToken);
@@ -82,7 +82,7 @@
*
* @param types internal insets types (WindowInsets.Type.InsetsType) to hide
* @param fromIme true if this request originated from IME (InputMethodService).
- * @param statsToken the token tracking the current IME hide request or {@code null} otherwise.
+ * @param statsToken the token tracking the current IME request or {@code null} otherwise.
*/
void hideInsets(int types, boolean fromIme, in @nullable ImeTracker.Token statsToken);
diff --git a/core/java/android/view/ImeInsetsSourceConsumer.java b/core/java/android/view/ImeInsetsSourceConsumer.java
index de809c8..821e13d 100644
--- a/core/java/android/view/ImeInsetsSourceConsumer.java
+++ b/core/java/android/view/ImeInsetsSourceConsumer.java
@@ -21,9 +21,9 @@
import static android.view.ImeInsetsSourceConsumerProto.INSETS_SOURCE_CONSUMER;
import static android.view.ImeInsetsSourceConsumerProto.IS_REQUESTED_VISIBLE_AWAITING_CONTROL;
+import android.annotation.NonNull;
import android.annotation.Nullable;
import android.os.IBinder;
-import android.os.Process;
import android.os.Trace;
import android.util.proto.ProtoOutputStream;
import android.view.SurfaceControl.Transaction;
@@ -70,7 +70,11 @@
if (!isShowRequested()) {
mIsRequestedVisibleAwaitingControl = false;
if (!running && !mHasPendingRequest) {
- notifyHidden(null /* statsToken */);
+ final var statsToken = ImeTracker.forLogging().onStart(ImeTracker.TYPE_HIDE,
+ ImeTracker.ORIGIN_CLIENT,
+ SoftInputShowHideReason.HIDE_SOFT_INPUT_ON_ANIMATION_STATE_CHANGED,
+ mController.getHost().isHandlingPointerEvent() /* fromUser */);
+ notifyHidden(statsToken);
removeSurface();
}
}
@@ -144,9 +148,17 @@
void requestHide(boolean fromIme, @Nullable ImeTracker.Token statsToken) {
if (!fromIme) {
+ // Create a new token to track the hide request when we have control,
+ // as we use the passed in token for the insets animation already.
+ final var notifyStatsToken = getControl() != null
+ ? ImeTracker.forLogging().onStart(ImeTracker.TYPE_HIDE,
+ ImeTracker.ORIGIN_CLIENT,
+ SoftInputShowHideReason.HIDE_SOFT_INPUT_REQUEST_HIDE_WITH_CONTROL,
+ mController.getHost().isHandlingPointerEvent() /* fromUser */)
+ : statsToken;
// The insets might be controlled by a remote target. Let the server know we are
// requested to hide.
- notifyHidden(statsToken);
+ notifyHidden(notifyStatsToken);
}
if (mAnimationState == ANIMATION_STATE_SHOW) {
mHasPendingRequest = true;
@@ -157,21 +169,9 @@
* Notify {@link com.android.server.inputmethod.InputMethodManagerService} that
* IME insets are hidden.
*
- * @param statsToken the token tracking the current IME hide request or {@code null} otherwise.
+ * @param statsToken the token tracking the current IME request or {@code null} otherwise.
*/
- private void notifyHidden(@Nullable ImeTracker.Token statsToken) {
- // Create a new stats token to track the hide request when:
- // - we do not already have one, or
- // - we do already have one, but we have control and use the passed in token
- // for the insets animation already.
- if (statsToken == null || getControl() != null) {
- statsToken = ImeTracker.forLogging().onRequestHide(null /* component */,
- Process.myUid(),
- ImeTracker.ORIGIN_CLIENT_HIDE_SOFT_INPUT,
- SoftInputShowHideReason.HIDE_SOFT_INPUT_BY_INSETS_API,
- mController.getHost().isHandlingPointerEvent() /* fromUser */);
- }
-
+ private void notifyHidden(@NonNull ImeTracker.Token statsToken) {
ImeTracker.forLogging().onProgress(statsToken,
ImeTracker.PHASE_CLIENT_INSETS_CONSUMER_NOTIFY_HIDDEN);
diff --git a/core/java/android/view/InsetsAnimationControlImpl.java b/core/java/android/view/InsetsAnimationControlImpl.java
index 7f1e037..85c779b 100644
--- a/core/java/android/view/InsetsAnimationControlImpl.java
+++ b/core/java/android/view/InsetsAnimationControlImpl.java
@@ -43,7 +43,6 @@
import static android.view.WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE;
import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION;
import static android.view.inputmethod.ImeTracker.DEBUG_IME_VISIBILITY;
-import static android.view.inputmethod.ImeTracker.TOKEN_NONE;
import static com.android.internal.annotations.VisibleForTesting.Visibility.PACKAGE;
@@ -165,9 +164,9 @@
mStatsToken = statsToken;
if (DEBUG_IME_VISIBILITY && (types & ime()) != 0) {
EventLog.writeEvent(IMF_IME_ANIM_START,
- mStatsToken != null ? mStatsToken.getTag() : TOKEN_NONE, mAnimationType,
- mCurrentAlpha, "Current:" + mCurrentInsets, "Shown:" + mShownInsets,
- "Hidden:" + mHiddenInsets);
+ mStatsToken != null ? mStatsToken.getTag() : ImeTracker.TOKEN_NONE,
+ mAnimationType, mCurrentAlpha, "Current:" + mCurrentInsets,
+ "Shown:" + mShownInsets, "Hidden:" + mHiddenInsets);
}
mController.startAnimation(this, listener, types, mAnimation,
new Bounds(mHiddenInsets, mShownInsets));
@@ -245,6 +244,7 @@
}
@Override
+ @Nullable
public ImeTracker.Token getStatsToken() {
return mStatsToken;
}
@@ -330,8 +330,8 @@
mListener.onFinished(this);
if (DEBUG_IME_VISIBILITY && (mTypes & ime()) != 0) {
EventLog.writeEvent(IMF_IME_ANIM_FINISH,
- mStatsToken != null ? mStatsToken.getTag() : TOKEN_NONE, mAnimationType,
- mCurrentAlpha, shown ? 1 : 0, Objects.toString(insets));
+ mStatsToken != null ? mStatsToken.getTag() : ImeTracker.TOKEN_NONE,
+ mAnimationType, mCurrentAlpha, shown ? 1 : 0, Objects.toString(insets));
}
}
@@ -355,8 +355,8 @@
if (DEBUG) Log.d(TAG, "notify Control request cancelled for types: " + mTypes);
if (DEBUG_IME_VISIBILITY && (mTypes & ime()) != 0) {
EventLog.writeEvent(IMF_IME_ANIM_CANCEL,
- mStatsToken != null ? mStatsToken.getTag() : TOKEN_NONE, mAnimationType,
- Objects.toString(mPendingInsets));
+ mStatsToken != null ? mStatsToken.getTag() : ImeTracker.TOKEN_NONE,
+ mAnimationType, Objects.toString(mPendingInsets));
}
releaseLeashes();
}
diff --git a/core/java/android/view/InsetsAnimationThreadControlRunner.java b/core/java/android/view/InsetsAnimationThreadControlRunner.java
index 079991a..92e20e0 100644
--- a/core/java/android/view/InsetsAnimationThreadControlRunner.java
+++ b/core/java/android/view/InsetsAnimationThreadControlRunner.java
@@ -137,6 +137,7 @@
}
@Override
+ @Nullable
public ImeTracker.Token getStatsToken() {
return mControl.getStatsToken();
}
diff --git a/core/java/android/view/InsetsController.java b/core/java/android/view/InsetsController.java
index 1803a6e..6cc4b20 100644
--- a/core/java/android/view/InsetsController.java
+++ b/core/java/android/view/InsetsController.java
@@ -28,7 +28,6 @@
import static android.view.WindowInsets.Type.all;
import static android.view.WindowInsets.Type.captionBar;
import static android.view.WindowInsets.Type.ime;
-import static android.view.inputmethod.ImeTracker.PHASE_CLIENT_ANIMATION_CANCEL;
import android.animation.AnimationHandler;
import android.animation.Animator;
@@ -47,7 +46,6 @@
import android.os.CancellationSignal;
import android.os.Handler;
import android.os.IBinder;
-import android.os.Process;
import android.os.Trace;
import android.text.TextUtils;
import android.util.IntArray;
@@ -659,6 +657,7 @@
private final Runnable mAnimCallback;
/** Pending control request that is waiting on IME to be ready to be shown */
+ @Nullable
private PendingControlRequest mPendingImeControlRequest;
private int mWindowType;
@@ -1043,12 +1042,18 @@
hideTypes[0] &= ~animatingTypes;
if (showTypes[0] != 0) {
- applyAnimation(showTypes[0], true /* show */, false /* fromIme */,
- null /* statsToken */);
+ final var statsToken = (showTypes[0] & ime()) == 0 ? null
+ : ImeTracker.forLogging().onStart(ImeTracker.TYPE_SHOW,
+ ImeTracker.ORIGIN_CLIENT, SoftInputShowHideReason.CONTROLS_CHANGED,
+ mHost.isHandlingPointerEvent() /* fromUser */);
+ applyAnimation(showTypes[0], true /* show */, false /* fromIme */, statsToken);
}
if (hideTypes[0] != 0) {
- applyAnimation(hideTypes[0], false /* show */, false /* fromIme */,
- null /* statsToken */);
+ final var statsToken = (hideTypes[0] & ime()) == 0 ? null
+ : ImeTracker.forLogging().onStart(ImeTracker.TYPE_HIDE,
+ ImeTracker.ORIGIN_CLIENT, SoftInputShowHideReason.CONTROLS_CHANGED,
+ mHost.isHandlingPointerEvent() /* fromUser */);
+ applyAnimation(hideTypes[0], false /* show */, false /* fromIme */, statsToken);
}
if (mControllableTypes != controllableTypes) {
@@ -1064,15 +1069,7 @@
@Override
public void show(@InsetsType int types) {
- ImeTracker.Token statsToken = null;
- if ((types & ime()) != 0) {
- statsToken = ImeTracker.forLogging().onRequestShow(null /* component */,
- Process.myUid(), ImeTracker.ORIGIN_CLIENT_SHOW_SOFT_INPUT,
- SoftInputShowHideReason.SHOW_SOFT_INPUT_BY_INSETS_API,
- mHost.isHandlingPointerEvent() /* fromUser */);
- }
-
- show(types, false /* fromIme */, statsToken);
+ show(types, false /* fromIme */, null /* statsToken */);
}
@VisibleForTesting(visibility = VisibleForTesting.Visibility.PACKAGE)
@@ -1080,6 +1077,13 @@
@Nullable ImeTracker.Token statsToken) {
if ((types & ime()) != 0) {
Log.d(TAG, "show(ime(), fromIme=" + fromIme + ")");
+
+ if (statsToken == null) {
+ statsToken = ImeTracker.forLogging().onStart(ImeTracker.TYPE_SHOW,
+ ImeTracker.ORIGIN_CLIENT,
+ SoftInputShowHideReason.SHOW_SOFT_INPUT_BY_INSETS_API,
+ mHost.isHandlingPointerEvent() /* fromUser */);
+ }
}
if (fromIme) {
ImeTracing.getInstance().triggerClientDump("InsetsController#show",
@@ -1148,9 +1152,11 @@
}
/**
- * Handle the {@link #mPendingImeControlRequest} when
- * - The IME insets is ready to show.
- * - The IME insets has being requested invisible.
+ * Handle the {@link #mPendingImeControlRequest} when:
+ * <ul>
+ * <li> The IME insets is ready to show.
+ * <li> The IME insets has being requested invisible.
+ * </ul>
*/
private void handlePendingControlRequest(@Nullable ImeTracker.Token statsToken) {
PendingControlRequest pendingRequest = mPendingImeControlRequest;
@@ -1170,20 +1176,22 @@
@Override
public void hide(@InsetsType int types) {
- ImeTracker.Token statsToken = null;
- if ((types & ime()) != 0) {
- statsToken = ImeTracker.forLogging().onRequestHide(null /* component */,
- Process.myUid(), ImeTracker.ORIGIN_CLIENT_HIDE_SOFT_INPUT,
- SoftInputShowHideReason.HIDE_SOFT_INPUT_BY_INSETS_API,
- mHost.isHandlingPointerEvent() /* fromUser */);
- }
-
- hide(types, false /* fromIme */, statsToken);
+ hide(types, false /* fromIme */, null /* statsToken */);
}
@VisibleForTesting
public void hide(@InsetsType int types, boolean fromIme,
@Nullable ImeTracker.Token statsToken) {
+ if ((types & ime()) != 0) {
+ Log.d(TAG, "hide(ime(), fromIme=" + fromIme + ")");
+
+ if (statsToken == null) {
+ statsToken = ImeTracker.forLogging().onStart(ImeTracker.TYPE_HIDE,
+ ImeTracker.ORIGIN_CLIENT,
+ SoftInputShowHideReason.HIDE_SOFT_INPUT_BY_INSETS_API,
+ mHost.isHandlingPointerEvent() /* fromUser */);
+ }
+ }
if (fromIme) {
ImeTracing.getInstance().triggerClientDump("InsetsController#hide",
mHost.getInputMethodManager(), null /* icProto */);
@@ -1307,10 +1315,12 @@
if (monitoredAnimation && (types & Type.ime()) != 0) {
if (animationType == ANIMATION_TYPE_SHOW) {
ImeTracker.forLatency().onShowCancelled(statsToken,
- PHASE_CLIENT_ANIMATION_CANCEL, ActivityThread::currentApplication);
+ ImeTracker.PHASE_CLIENT_ANIMATION_CANCEL,
+ ActivityThread::currentApplication);
} else {
ImeTracker.forLatency().onHideCancelled(statsToken,
- PHASE_CLIENT_ANIMATION_CANCEL, ActivityThread::currentApplication);
+ ImeTracker.PHASE_CLIENT_ANIMATION_CANCEL,
+ ActivityThread::currentApplication);
}
ImeTracker.forLogging().onCancelled(statsToken,
ImeTracker.PHASE_CLIENT_CONTROL_ANIMATION);
@@ -1602,12 +1612,12 @@
private void cancelAnimation(InsetsAnimationControlRunner control, boolean invokeCallback) {
if (invokeCallback) {
ImeTracker.forLogging().onCancelled(control.getStatsToken(),
- PHASE_CLIENT_ANIMATION_CANCEL);
+ ImeTracker.PHASE_CLIENT_ANIMATION_CANCEL);
control.cancel();
} else {
// Succeeds if invokeCallback is false (i.e. when called from notifyFinished).
ImeTracker.forLogging().onProgress(control.getStatsToken(),
- PHASE_CLIENT_ANIMATION_CANCEL);
+ ImeTracker.PHASE_CLIENT_ANIMATION_CANCEL);
}
if (DEBUG) {
Log.d(TAG, TextUtils.formatSimple(
diff --git a/core/java/android/view/InsetsResizeAnimationRunner.java b/core/java/android/view/InsetsResizeAnimationRunner.java
index bffaeea..ebdddd5 100644
--- a/core/java/android/view/InsetsResizeAnimationRunner.java
+++ b/core/java/android/view/InsetsResizeAnimationRunner.java
@@ -29,6 +29,7 @@
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.ValueAnimator;
+import android.annotation.Nullable;
import android.graphics.Insets;
import android.graphics.Rect;
import android.util.SparseArray;
@@ -92,6 +93,7 @@
}
@Override
+ @Nullable
public ImeTracker.Token getStatsToken() {
// Return null as resizing the IME view is not explicitly tracked.
return null;
diff --git a/core/java/android/view/InsetsSourceConsumer.java b/core/java/android/view/InsetsSourceConsumer.java
index 0ce61bb..fdb2a6e 100644
--- a/core/java/android/view/InsetsSourceConsumer.java
+++ b/core/java/android/view/InsetsSourceConsumer.java
@@ -314,7 +314,7 @@
* @param fromController {@code true} if request is coming from controller.
* (e.g. in IME case, controller is
* {@link android.inputmethodservice.InputMethodService}).
- * @param statsToken the token tracking the current IME show request or {@code null} otherwise.
+ * @param statsToken the token tracking the current IME request or {@code null} otherwise.
*
* @implNote The {@code statsToken} is ignored here, and only handled in
* {@link ImeInsetsSourceConsumer} for IME animations only.
diff --git a/core/java/android/view/inputmethod/IInputMethodManagerGlobalInvoker.java b/core/java/android/view/inputmethod/IInputMethodManagerGlobalInvoker.java
index 491b0e3..cedf8d0 100644
--- a/core/java/android/view/inputmethod/IInputMethodManagerGlobalInvoker.java
+++ b/core/java/android/view/inputmethod/IInputMethodManagerGlobalInvoker.java
@@ -25,7 +25,6 @@
import android.annotation.RequiresPermission;
import android.annotation.UserIdInt;
import android.content.Context;
-import android.os.Binder;
import android.os.IBinder;
import android.os.RemoteException;
import android.os.ResultReceiver;
@@ -298,7 +297,7 @@
@AnyThread
static boolean showSoftInput(@NonNull IInputMethodClient client, @Nullable IBinder windowToken,
- @Nullable ImeTracker.Token statsToken, @InputMethodManager.ShowFlags int flags,
+ @NonNull ImeTracker.Token statsToken, @InputMethodManager.ShowFlags int flags,
int lastClickToolType, @Nullable ResultReceiver resultReceiver,
@SoftInputShowHideReason int reason) {
final IInputMethodManager service = getService();
@@ -315,7 +314,7 @@
@AnyThread
static boolean hideSoftInput(@NonNull IInputMethodClient client, @Nullable IBinder windowToken,
- @Nullable ImeTracker.Token statsToken, @InputMethodManager.HideFlags int flags,
+ @NonNull ImeTracker.Token statsToken, @InputMethodManager.HideFlags int flags,
@Nullable ResultReceiver resultReceiver, @SoftInputShowHideReason int reason) {
final IInputMethodManager service = getService();
if (service == null) {
@@ -331,6 +330,20 @@
// TODO(b/293640003): Remove method once Flags.useZeroJankProxy() is enabled.
@AnyThread
+ @RequiresPermission(Manifest.permission.TEST_INPUT_METHOD)
+ static void hideSoftInputFromServerForTest() {
+ final IInputMethodManager service = getService();
+ if (service == null) {
+ return;
+ }
+ try {
+ service.hideSoftInputFromServerForTest();
+ } catch (RemoteException e) {
+ throw e.rethrowFromSystemServer();
+ }
+ }
+
+ @AnyThread
@NonNull
@RequiresPermission(value = Manifest.permission.INTERACT_ACROSS_USERS_FULL, conditional = true)
static InputBindResult startInputOrWindowGainedFocus(@StartInputReason int startInputReason,
@@ -654,35 +667,18 @@
}
}
- /** @see com.android.server.inputmethod.ImeTrackerService#onRequestShow */
+ /** @see com.android.server.inputmethod.ImeTrackerService#onStart */
@AnyThread
@NonNull
- static ImeTracker.Token onRequestShow(@NonNull String tag, int uid,
+ static ImeTracker.Token onStart(@NonNull String tag, int uid, @ImeTracker.Type int type,
@ImeTracker.Origin int origin, @SoftInputShowHideReason int reason, boolean fromUser) {
- final IImeTracker service = getImeTrackerService();
+ final var service = getImeTrackerService();
if (service == null) {
- // Create token with "fake" binder if the service was not found.
- return new ImeTracker.Token(new Binder(), tag);
+ // Create token with "empty" binder if the service was not found.
+ return ImeTracker.Token.empty(tag);
}
try {
- return service.onRequestShow(tag, uid, origin, reason, fromUser);
- } catch (RemoteException e) {
- throw e.rethrowFromSystemServer();
- }
- }
-
- /** @see com.android.server.inputmethod.ImeTrackerService#onRequestHide */
- @AnyThread
- @NonNull
- static ImeTracker.Token onRequestHide(@NonNull String tag, int uid,
- @ImeTracker.Origin int origin, @SoftInputShowHideReason int reason, boolean fromUser) {
- final IImeTracker service = getImeTrackerService();
- if (service == null) {
- // Create token with "fake" binder if the service was not found.
- return new ImeTracker.Token(new Binder(), tag);
- }
- try {
- return service.onRequestHide(tag, uid, origin, reason, fromUser);
+ return service.onStart(tag, uid, type, origin, reason, fromUser);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
diff --git a/core/java/android/view/inputmethod/ImeTracker.java b/core/java/android/view/inputmethod/ImeTracker.java
index b1fdaa9..7f79661 100644
--- a/core/java/android/view/inputmethod/ImeTracker.java
+++ b/core/java/android/view/inputmethod/ImeTracker.java
@@ -28,17 +28,20 @@
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
-import android.app.ActivityThread;
import android.content.Context;
+import android.os.Binder;
import android.os.IBinder;
import android.os.Parcel;
import android.os.Parcelable;
+import android.os.Process;
import android.os.SystemProperties;
import android.util.Log;
import android.view.InsetsController.AnimationType;
import android.view.SurfaceControl;
import android.view.View;
+import com.android.internal.annotations.VisibleForTesting;
+import com.android.internal.annotations.VisibleForTesting.Visibility;
import com.android.internal.inputmethod.InputMethodDebug;
import com.android.internal.inputmethod.SoftInputShowHideReason;
import com.android.internal.jank.InteractionJankMonitor;
@@ -108,34 +111,32 @@
/**
* The origin of the IME request
*
- * The name follows the format {@code PHASE_x_...} where {@code x} denotes
- * where the origin is (i.e. {@code PHASE_SERVER_...} occurs in the server).
+ * <p> The name follows the format {@code ORIGIN_x_...} where {@code x} denotes
+ * where the origin is (i.e. {@code ORIGIN_SERVER} occurs in the server).
*/
@IntDef(prefix = { "ORIGIN_" }, value = {
- ORIGIN_CLIENT_SHOW_SOFT_INPUT,
- ORIGIN_CLIENT_HIDE_SOFT_INPUT,
- ORIGIN_SERVER_START_INPUT,
- ORIGIN_SERVER_HIDE_INPUT
+ ORIGIN_CLIENT,
+ ORIGIN_SERVER,
+ ORIGIN_IME
})
@Retention(RetentionPolicy.SOURCE)
@interface Origin {}
- /** The IME show request originated in the client. */
- int ORIGIN_CLIENT_SHOW_SOFT_INPUT = ImeProtoEnums.ORIGIN_CLIENT_SHOW_SOFT_INPUT;
+ /** The IME request originated in the client. */
+ int ORIGIN_CLIENT = ImeProtoEnums.ORIGIN_CLIENT;
- /** The IME hide request originated in the client. */
- int ORIGIN_CLIENT_HIDE_SOFT_INPUT = ImeProtoEnums.ORIGIN_CLIENT_HIDE_SOFT_INPUT;
+ /** The IME request originated in the server. */
+ int ORIGIN_SERVER = ImeProtoEnums.ORIGIN_SERVER;
- /** The IME show request originated in the server. */
- int ORIGIN_SERVER_START_INPUT = ImeProtoEnums.ORIGIN_SERVER_START_INPUT;
-
- /** The IME hide request originated in the server. */
- int ORIGIN_SERVER_HIDE_INPUT = ImeProtoEnums.ORIGIN_SERVER_HIDE_INPUT;
+ /** The IME request originated in the IME. */
+ int ORIGIN_IME = ImeProtoEnums.ORIGIN_IME;
+ /** The IME request originated in the WindowManager Shell. */
+ int ORIGIN_WM_SHELL = ImeProtoEnums.ORIGIN_WM_SHELL;
/**
* The current phase of the IME request.
*
- * The name follows the format {@code PHASE_x_...} where {@code x} denotes
+ * <p> The name follows the format {@code PHASE_x_...} where {@code x} denotes
* where the phase is (i.e. {@code PHASE_SERVER_...} occurs in the server).
*/
@IntDef(prefix = { "PHASE_" }, value = {
@@ -155,7 +156,6 @@
PHASE_IME_SHOW_SOFT_INPUT,
PHASE_IME_HIDE_SOFT_INPUT,
PHASE_IME_ON_SHOW_SOFT_INPUT_TRUE,
- PHASE_IME_APPLY_VISIBILITY_INSETS_CONSUMER,
PHASE_SERVER_APPLY_IME_VISIBILITY,
PHASE_WM_SHOW_IME_RUNNER,
PHASE_WM_SHOW_IME_READY,
@@ -182,6 +182,11 @@
PHASE_CLIENT_ANIMATION_FINISHED_SHOW,
PHASE_CLIENT_ANIMATION_FINISHED_HIDE,
PHASE_WM_ABORT_SHOW_IME_POST_LAYOUT,
+ PHASE_CLIENT_ANIMATION_FINISHED_HIDE,
+ PHASE_IME_SHOW_WINDOW,
+ PHASE_IME_HIDE_WINDOW,
+ PHASE_IME_PRIVILEGED_OPERATIONS,
+ PHASE_SERVER_CURRENT_ACTIVE_IME,
})
@Retention(RetentionPolicy.SOURCE)
@interface Phase {}
@@ -224,19 +229,15 @@
/** Dispatched from the IME wrapper to the IME. */
int PHASE_IME_WRAPPER_DISPATCH = ImeProtoEnums.PHASE_IME_WRAPPER_DISPATCH;
- /** Reached the IME' showSoftInput method. */
+ /** Reached the IME's showSoftInput method. */
int PHASE_IME_SHOW_SOFT_INPUT = ImeProtoEnums.PHASE_IME_SHOW_SOFT_INPUT;
- /** Reached the IME' hideSoftInput method. */
+ /** Reached the IME's hideSoftInput method. */
int PHASE_IME_HIDE_SOFT_INPUT = ImeProtoEnums.PHASE_IME_HIDE_SOFT_INPUT;
/** The server decided the IME should be shown. */
int PHASE_IME_ON_SHOW_SOFT_INPUT_TRUE = ImeProtoEnums.PHASE_IME_ON_SHOW_SOFT_INPUT_TRUE;
- /** Requested applying the IME visibility in the insets source consumer. */
- int PHASE_IME_APPLY_VISIBILITY_INSETS_CONSUMER =
- ImeProtoEnums.PHASE_IME_APPLY_VISIBILITY_INSETS_CONSUMER;
-
/** Applied the IME visibility. */
int PHASE_SERVER_APPLY_IME_VISIBILITY = ImeProtoEnums.PHASE_SERVER_APPLY_IME_VISIBILITY;
@@ -323,37 +324,49 @@
int PHASE_WM_ABORT_SHOW_IME_POST_LAYOUT =
ImeProtoEnums.PHASE_WM_ABORT_SHOW_IME_POST_LAYOUT;
+ /** Reached the IME's showWindow method. */
+ int PHASE_IME_SHOW_WINDOW = ImeProtoEnums.PHASE_IME_SHOW_WINDOW;
+
+ /** Reached the IME's hideWindow method. */
+ int PHASE_IME_HIDE_WINDOW = ImeProtoEnums.PHASE_IME_HIDE_WINDOW;
+
+ /** Reached the InputMethodPrivilegedOperations handler. */
+ int PHASE_IME_PRIVILEGED_OPERATIONS = ImeProtoEnums.PHASE_IME_PRIVILEGED_OPERATIONS;
+
+ /** Checked that the calling IME is the currently active IME. */
+ int PHASE_SERVER_CURRENT_ACTIVE_IME = ImeProtoEnums.PHASE_SERVER_CURRENT_ACTIVE_IME;
+
/**
- * Creates an IME show request tracking token.
+ * Called when an IME request is started.
*
- * @param component the name of the component that created the IME request, or {@code null}
- * otherwise (defaulting to {@link ActivityThread#currentProcessName()}).
- * @param uid the uid of the client that requested the IME.
- * @param origin the origin of the IME show request.
- * @param reason the reason why the IME show request was created.
+ * @param component the name of the component that started the request.
+ * @param uid the uid of the client that started the request.
+ * @param type the type of the request.
+ * @param origin the origin of the request.
+ * @param reason the reason for starting the request.
* @param fromUser whether this request was created directly from user interaction.
*
- * @return An IME tracking token.
+ * @return An IME request tracking token.
*/
@NonNull
- Token onRequestShow(@Nullable String component, int uid, @Origin int origin,
+ Token onStart(@NonNull String component, int uid, @Type int type, @Origin int origin,
@SoftInputShowHideReason int reason, boolean fromUser);
/**
- * Creates an IME hide request tracking token.
+ * Called when an IME request is started for the current process.
*
- * @param component the name of the component that created the IME request, or {@code null}
- * otherwise (defaulting to {@link ActivityThread#currentProcessName()}).
- * @param uid the uid of the client that requested the IME.
- * @param origin the origin of the IME hide request.
- * @param reason the reason why the IME hide request was created.
+ * @param type the type of the request.
+ * @param origin the origin of the request.
+ * @param reason the reason for starting the request.
* @param fromUser whether this request was created directly from user interaction.
*
- * @return An IME tracking token.
+ * @return An IME request tracking token.
*/
@NonNull
- Token onRequestHide(@Nullable String component, int uid, @Origin int origin,
- @SoftInputShowHideReason int reason, boolean fromUser);
+ default Token onStart(@Type int type, @Origin int origin, @SoftInputShowHideReason int reason,
+ boolean fromUser) {
+ return onStart(Process.myProcessName(), Process.myUid(), type, origin, reason, fromUser);
+ }
/**
* Called when an IME request progresses to a further phase.
@@ -390,14 +403,14 @@
/**
* Called when the IME show request is successful.
*
- * @param token the token tracking the current IME show request or {@code null} otherwise.
+ * @param token the token tracking the current IME request or {@code null} otherwise.
*/
void onShown(@Nullable Token token);
/**
* Called when the IME hide request is successful.
*
- * @param token the token tracking the current IME hide request or {@code null} otherwise.
+ * @param token the token tracking the current IME request or {@code null} otherwise.
*/
void onHidden(@Nullable Token token);
@@ -479,33 +492,17 @@
@NonNull
@Override
- public Token onRequestShow(@Nullable String component, int uid, @Origin int origin,
+ public Token onStart(@NonNull String component, int uid, @Type int type, @Origin int origin,
@SoftInputShowHideReason int reason, boolean fromUser) {
- final var tag = getTag(component);
- final var token = IInputMethodManagerGlobalInvoker.onRequestShow(tag, uid, origin,
- reason, fromUser);
+ final var tag = Token.createTag(component);
+ final var token = IInputMethodManagerGlobalInvoker.onStart(tag, uid, type,
+ origin, reason, fromUser);
- Log.i(TAG, token.mTag + ": onRequestShow at " + Debug.originToString(origin)
+ Log.i(TAG, token.mTag + ": onRequest" + (type == TYPE_SHOW ? "Show" : "Hide")
+ + " at " + Debug.originToString(origin)
+ " reason " + InputMethodDebug.softInputDisplayReasonToString(reason)
+ " fromUser " + fromUser,
mLogStackTrace ? new Throwable() : null);
-
- return token;
- }
-
- @NonNull
- @Override
- public Token onRequestHide(@Nullable String component, int uid, @Origin int origin,
- @SoftInputShowHideReason int reason, boolean fromUser) {
- final var tag = getTag(component);
- final var token = IInputMethodManagerGlobalInvoker.onRequestHide(tag, uid, origin,
- reason, fromUser);
-
- Log.i(TAG, token.mTag + ": onRequestHide at " + Debug.originToString(origin)
- + " reason " + InputMethodDebug.softInputDisplayReasonToString(reason)
- + " fromUser " + fromUser,
- mLogStackTrace ? new Throwable() : null);
-
return token;
}
@@ -556,20 +553,6 @@
Log.i(TAG, token.mTag + ": onHidden");
}
-
- /**
- * Returns a logging tag using the given component name.
- *
- * @param component the name of the component that created the IME request, or {@code null}
- * otherwise (defaulting to {@link ActivityThread#currentProcessName()}).
- */
- @NonNull
- private String getTag(@Nullable String component) {
- if (component == null) {
- component = ActivityThread.currentProcessName();
- }
- return component + ":" + Integer.toHexString(ThreadLocalRandom.current().nextInt());
- }
};
/** The singleton IME tracker instance for instrumenting jank metrics. */
@@ -581,6 +564,10 @@
/** A token that tracks the progress of an IME request. */
final class Token implements Parcelable {
+ /** Empty binder, lazily initialized, used for empty token instantiation. */
+ @Nullable
+ private static IBinder sEmptyBinder;
+
/** The binder used to identify this token. */
@NonNull
private final IBinder mBinder;
@@ -599,16 +586,56 @@
mTag = in.readString8();
}
+ /** Returns the binder used to identify this token. */
@NonNull
public IBinder getBinder() {
return mBinder;
}
+ /** Returns the logging tag of this token. */
@NonNull
public String getTag() {
return mTag;
}
+ /**
+ * Creates a logging tag.
+ *
+ * @param component the name of the component that created the IME request.
+ */
+ @NonNull
+ private static String createTag(@NonNull String component) {
+ return component + ":" + Integer.toHexString(ThreadLocalRandom.current().nextInt());
+ }
+
+ /** Returns a new token with an empty binder. */
+ @NonNull
+ @VisibleForTesting(visibility = Visibility.PACKAGE)
+ public static Token empty() {
+ final var tag = createTag(Process.myProcessName());
+ return empty(tag);
+ }
+
+ /** Returns a new token with an empty binder and the given logging tag. */
+ @NonNull
+ static Token empty(@NonNull String tag) {
+ return new Token(getEmptyBinder(), tag);
+ }
+
+ /** Returns the empty binder instance for empty token creation, lazily initializing it. */
+ @NonNull
+ private static IBinder getEmptyBinder() {
+ if (sEmptyBinder == null) {
+ sEmptyBinder = new Binder();
+ }
+ return sEmptyBinder;
+ }
+
+ @Override
+ public String toString() {
+ return super.toString() + "(tag: " + mTag + ")";
+ }
+
/** For Parcelable, no special marshalled objects. */
@Override
public int describeContents() {
diff --git a/core/java/android/view/inputmethod/InputMethod.java b/core/java/android/view/inputmethod/InputMethod.java
index 33f34c5..88607fc 100644
--- a/core/java/android/view/inputmethod/InputMethod.java
+++ b/core/java/android/view/inputmethod/InputMethod.java
@@ -281,7 +281,7 @@
})
@Retention(RetentionPolicy.SOURCE)
@interface ShowFlags {}
-
+
/**
* Flag for {@link #showSoftInput}: this show has been explicitly
* requested by the user. If not set, the system has decided it may be
@@ -314,18 +314,18 @@
* @param showInputToken an opaque {@link android.os.Binder} token to identify which API call
* of {@link InputMethodManager#showSoftInput(View, int)} is associated with
* this callback.
- * @param statsToken the token tracking the current IME show request or {@code null} otherwise.
+ * @param statsToken the token tracking the current IME request.
* @hide
*/
@MainThread
public default void showSoftInputWithToken(@ShowFlags int flags, ResultReceiver resultReceiver,
- IBinder showInputToken, @Nullable ImeTracker.Token statsToken) {
+ IBinder showInputToken, @NonNull ImeTracker.Token statsToken) {
showSoftInput(flags, resultReceiver);
}
/**
* Request that any soft input part of the input method be shown to the user.
- *
+ *
* @param resultReceiver The client requesting the show may wish to
* be told the impact of their request, which should be supplied here.
* The result code should be
@@ -352,12 +352,12 @@
* @param hideInputToken an opaque {@link android.os.Binder} token to identify which API call
* of {@link InputMethodManager#hideSoftInputFromWindow(IBinder, int)}} is associated
* with this callback.
- * @param statsToken the token tracking the current IME hide request or {@code null} otherwise.
+ * @param statsToken the token tracking the current IME request.
* @hide
*/
@MainThread
public default void hideSoftInputWithToken(int flags, ResultReceiver resultReceiver,
- IBinder hideInputToken, @Nullable ImeTracker.Token statsToken) {
+ IBinder hideInputToken, @NonNull ImeTracker.Token statsToken) {
hideSoftInput(flags, resultReceiver);
}
diff --git a/core/java/android/view/inputmethod/InputMethodManager.java b/core/java/android/view/inputmethod/InputMethodManager.java
index 68940d6..3be76cc 100644
--- a/core/java/android/view/inputmethod/InputMethodManager.java
+++ b/core/java/android/view/inputmethod/InputMethodManager.java
@@ -2263,21 +2263,22 @@
* {@link #RESULT_HIDDEN}.
*/
public boolean showSoftInput(View view, @ShowFlags int flags, ResultReceiver resultReceiver) {
- return showSoftInput(view, null /* statsToken */, flags, resultReceiver,
- SoftInputShowHideReason.SHOW_SOFT_INPUT);
+ return showSoftInput(view, flags, resultReceiver, SoftInputShowHideReason.SHOW_SOFT_INPUT);
}
- private boolean showSoftInput(View view, @Nullable ImeTracker.Token statsToken,
- @ShowFlags int flags, ResultReceiver resultReceiver,
+ private boolean showSoftInput(View view, @ShowFlags int flags,
+ @Nullable ResultReceiver resultReceiver, @SoftInputShowHideReason int reason) {
+ // TODO(b/303041796): handle tracking physical keyboard and DPAD as user interactions
+ final var statsToken = ImeTracker.forLogging().onStart(ImeTracker.TYPE_SHOW,
+ ImeTracker.ORIGIN_CLIENT, reason, ImeTracker.isFromUser(view));
+ return showSoftInput(view, statsToken, flags, resultReceiver, reason);
+ }
+
+ private boolean showSoftInput(View view, @NonNull ImeTracker.Token statsToken,
+ @ShowFlags int flags, @Nullable ResultReceiver resultReceiver,
@SoftInputShowHideReason int reason) {
- if (statsToken == null) {
- // TODO(b/303041796): handle tracking physical keyboard and DPAD as user interactions
- statsToken = ImeTracker.forLogging().onRequestShow(null /* component */,
- Process.myUid(), ImeTracker.ORIGIN_CLIENT_SHOW_SOFT_INPUT, reason,
- ImeTracker.isFromUser(view));
- }
- ImeTracker.forLatency().onRequestShow(statsToken, ImeTracker.ORIGIN_CLIENT_SHOW_SOFT_INPUT,
- reason, ActivityThread::currentApplication);
+ ImeTracker.forLatency().onRequestShow(statsToken,
+ ImeTracker.ORIGIN_CLIENT, reason, ActivityThread::currentApplication);
ImeTracing.getInstance().triggerClientDump("InputMethodManager#showSoftInput", this,
null /* icProto */);
// Re-dispatch if there is a context mismatch.
@@ -2290,9 +2291,8 @@
synchronized (mH) {
if (!hasServedByInputMethodLocked(view)) {
ImeTracker.forLogging().onFailed(statsToken, ImeTracker.PHASE_CLIENT_VIEW_SERVED);
- ImeTracker.forLatency().onShowFailed(
- statsToken, ImeTracker.PHASE_CLIENT_VIEW_SERVED,
- ActivityThread::currentApplication);
+ ImeTracker.forLatency().onShowFailed(statsToken,
+ ImeTracker.PHASE_CLIENT_VIEW_SERVED, ActivityThread::currentApplication);
Log.w(TAG, "Ignoring showSoftInput() as view=" + view + " is not served.");
return false;
}
@@ -2327,9 +2327,9 @@
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 123768499)
public void showSoftInputUnchecked(@ShowFlags int flags, ResultReceiver resultReceiver) {
synchronized (mH) {
- final ImeTracker.Token statsToken = ImeTracker.forLogging().onRequestShow(
- null /* component */, Process.myUid(), ImeTracker.ORIGIN_CLIENT_SHOW_SOFT_INPUT,
- SoftInputShowHideReason.SHOW_SOFT_INPUT, false /* fromUser */);
+ final int reason = SoftInputShowHideReason.SHOW_SOFT_INPUT;
+ final var statsToken = ImeTracker.forLogging().onStart(ImeTracker.TYPE_SHOW,
+ ImeTracker.ORIGIN_CLIENT, reason, false /* fromUser */);
Log.w(TAG, "showSoftInputUnchecked() is a hidden method, which will be"
+ " removed soon. If you are using androidx.appcompat.widget.SearchView,"
@@ -2353,7 +2353,7 @@
flags,
mCurRootView.getLastClickToolType(),
resultReceiver,
- SoftInputShowHideReason.SHOW_SOFT_INPUT);
+ reason);
}
}
@@ -2429,11 +2429,10 @@
initialServedView = getServedViewLocked();
}
- final ImeTracker.Token statsToken = ImeTracker.forLogging().onRequestHide(
- null /* component */, Process.myUid(), ImeTracker.ORIGIN_CLIENT_HIDE_SOFT_INPUT,
- reason, ImeTracker.isFromUser(initialServedView));
- ImeTracker.forLatency().onRequestHide(statsToken, ImeTracker.ORIGIN_CLIENT_HIDE_SOFT_INPUT,
- reason, ActivityThread::currentApplication);
+ final var statsToken = ImeTracker.forLogging().onStart(ImeTracker.TYPE_HIDE,
+ ImeTracker.ORIGIN_CLIENT, reason, ImeTracker.isFromUser(initialServedView));
+ ImeTracker.forLatency().onRequestHide(statsToken,
+ ImeTracker.ORIGIN_CLIENT, reason, ActivityThread::currentApplication);
ImeTracing.getInstance().triggerClientDump("InputMethodManager#hideSoftInputFromWindow",
this, null /* icProto */);
checkFocus();
@@ -2472,20 +2471,18 @@
}
}
- final var reason = SoftInputShowHideReason.HIDE_SOFT_INPUT_FROM_VIEW;
- final ImeTracker.Token statsToken = ImeTracker.forLogging().onRequestHide(
- null /* component */, Process.myUid(), ImeTracker.ORIGIN_CLIENT_HIDE_SOFT_INPUT,
- reason, ImeTracker.isFromUser(view));
- ImeTracker.forLatency().onRequestHide(statsToken, ImeTracker.ORIGIN_CLIENT_HIDE_SOFT_INPUT,
- reason, ActivityThread::currentApplication);
+ final int reason = SoftInputShowHideReason.HIDE_SOFT_INPUT_FROM_VIEW;
+ final var statsToken = ImeTracker.forLogging().onStart(ImeTracker.TYPE_HIDE,
+ ImeTracker.ORIGIN_CLIENT, reason, ImeTracker.isFromUser(view));
+ ImeTracker.forLatency().onRequestHide(statsToken,
+ ImeTracker.ORIGIN_CLIENT, reason, ActivityThread::currentApplication);
ImeTracing.getInstance().triggerClientDump("InputMethodManager#hideSoftInputFromView",
this, null /* icProto */);
synchronized (mH) {
if (!hasServedByInputMethodLocked(view)) {
ImeTracker.forLogging().onFailed(statsToken, ImeTracker.PHASE_CLIENT_VIEW_SERVED);
- ImeTracker.forLatency().onShowFailed(
- statsToken, ImeTracker.PHASE_CLIENT_VIEW_SERVED,
- ActivityThread::currentApplication);
+ ImeTracker.forLatency().onShowFailed(statsToken,
+ ImeTracker.PHASE_CLIENT_VIEW_SERVED, ActivityThread::currentApplication);
Log.w(TAG, "Ignoring hideSoftInputFromView() as view=" + view + " is not served.");
return false;
}
@@ -2498,6 +2495,19 @@
}
/**
+ * A test API for CTS to request hiding the current soft input window, with the request origin
+ * on the server side.
+ *
+ * @hide
+ */
+ @SuppressLint("UnflaggedApi") // @TestApi without associated feature.
+ @TestApi
+ @RequiresPermission(Manifest.permission.TEST_INPUT_METHOD)
+ public void hideSoftInputFromServerForTest() {
+ IInputMethodManagerGlobalInvoker.hideSoftInputFromServerForTest();
+ }
+
+ /**
* Start stylus handwriting session.
*
* If supported by the current input method, a stylus handwriting session is started on the
@@ -2973,10 +2983,11 @@
if (view != null) {
final WindowInsets rootInsets = view.getRootWindowInsets();
if (rootInsets != null && rootInsets.isVisible(WindowInsets.Type.ime())) {
- hideSoftInputFromWindow(view.getWindowToken(), hideFlags, null,
+ hideSoftInputFromWindow(view.getWindowToken(), hideFlags,
+ null /* resultReceiver */,
SoftInputShowHideReason.HIDE_TOGGLE_SOFT_INPUT);
} else {
- showSoftInput(view, null /* statsToken */, showFlags, null /* resultReceiver */,
+ showSoftInput(view, showFlags, null /* resultReceiver */,
SoftInputShowHideReason.SHOW_TOGGLE_SOFT_INPUT);
}
}
@@ -3537,11 +3548,11 @@
@UnsupportedAppUsage
void closeCurrentInput() {
- final ImeTracker.Token statsToken = ImeTracker.forLogging().onRequestHide(
- null /* component */, Process.myUid(), ImeTracker.ORIGIN_CLIENT_HIDE_SOFT_INPUT,
- SoftInputShowHideReason.HIDE_CLOSE_CURRENT_SESSION, false /* fromUser */);
- ImeTracker.forLatency().onRequestHide(statsToken, ImeTracker.ORIGIN_CLIENT_HIDE_SOFT_INPUT,
- SoftInputShowHideReason.HIDE_CLOSE_CURRENT_SESSION,
+ final int reason = SoftInputShowHideReason.HIDE_CLOSE_CURRENT_SESSION;
+ final var statsToken = ImeTracker.forLogging().onStart(ImeTracker.TYPE_HIDE,
+ ImeTracker.ORIGIN_CLIENT, reason, false /* fromUser */);
+ ImeTracker.forLatency().onRequestHide(statsToken,
+ ImeTracker.ORIGIN_CLIENT, reason,
ActivityThread::currentApplication);
synchronized (mH) {
@@ -3562,7 +3573,7 @@
statsToken,
HIDE_NOT_ALWAYS,
null,
- SoftInputShowHideReason.HIDE_CLOSE_CURRENT_SESSION);
+ reason);
}
}
@@ -3603,12 +3614,12 @@
*
* @param windowToken the window from which this request originates. If this doesn't match the
* currently served view, the request is ignored and returns {@code false}.
- * @param statsToken the token tracking the current IME show request or {@code null} otherwise.
+ * @param statsToken the token tracking the current IME request.
*
* @return {@code true} if IME can (eventually) be shown, {@code false} otherwise.
* @hide
*/
- public boolean requestImeShow(IBinder windowToken, @Nullable ImeTracker.Token statsToken) {
+ public boolean requestImeShow(IBinder windowToken, @NonNull ImeTracker.Token statsToken) {
checkFocus();
synchronized (mH) {
final View servedView = getServedViewLocked();
@@ -3632,16 +3643,11 @@
*
* @param windowToken the window from which this request originates. If this doesn't match the
* currently served view, the request is ignored.
- * @param statsToken the token tracking the current IME show request or {@code null} otherwise.
+ * @param statsToken the token tracking the current IME request.
* @hide
*/
- public void notifyImeHidden(IBinder windowToken, @Nullable ImeTracker.Token statsToken) {
- if (statsToken == null) {
- statsToken = ImeTracker.forLogging().onRequestHide(null /* component */,
- Process.myUid(), ImeTracker.ORIGIN_CLIENT_HIDE_SOFT_INPUT,
- SoftInputShowHideReason.HIDE_SOFT_INPUT_BY_INSETS_API, false /* fromUser */);
- }
- ImeTracker.forLatency().onRequestHide(statsToken, ImeTracker.ORIGIN_CLIENT_HIDE_SOFT_INPUT,
+ public void notifyImeHidden(IBinder windowToken, @NonNull ImeTracker.Token statsToken) {
+ ImeTracker.forLatency().onRequestHide(statsToken, ImeTracker.ORIGIN_CLIENT,
SoftInputShowHideReason.HIDE_SOFT_INPUT_BY_INSETS_API,
ActivityThread::currentApplication);
ImeTracing.getInstance().triggerClientDump("InputMethodManager#notifyImeHidden", this,
@@ -4025,8 +4031,11 @@
*/
@Deprecated
public void hideSoftInputFromInputMethod(IBinder token, @HideFlags int flags) {
- InputMethodPrivilegedOperationsRegistry.get(token).hideMySoftInput(
- flags, SoftInputShowHideReason.HIDE_SOFT_INPUT_IMM_DEPRECATION);
+ final int reason = SoftInputShowHideReason.HIDE_SOFT_INPUT_IMM_DEPRECATION;
+ final var statsToken = ImeTracker.forLogging().onStart(ImeTracker.TYPE_HIDE,
+ ImeTracker.ORIGIN_CLIENT, reason, false /* fromUser */);
+ InputMethodPrivilegedOperationsRegistry.get(token).hideMySoftInput(statsToken, flags,
+ reason);
}
/**
@@ -4044,7 +4053,11 @@
*/
@Deprecated
public void showSoftInputFromInputMethod(IBinder token, @ShowFlags int flags) {
- InputMethodPrivilegedOperationsRegistry.get(token).showMySoftInput(flags);
+ final int reason = SoftInputShowHideReason.SHOW_SOFT_INPUT_IMM_DEPRECATION;
+ final var statsToken = ImeTracker.forLogging().onStart(ImeTracker.TYPE_SHOW,
+ ImeTracker.ORIGIN_CLIENT, reason, false /* fromUser */);
+ InputMethodPrivilegedOperationsRegistry.get(token).showMySoftInput(statsToken, flags,
+ reason);
}
/**
diff --git a/core/java/com/android/internal/inputmethod/IImeTracker.aidl b/core/java/com/android/internal/inputmethod/IImeTracker.aidl
index 2759043..b45bc1c 100644
--- a/core/java/com/android/internal/inputmethod/IImeTracker.aidl
+++ b/core/java/com/android/internal/inputmethod/IImeTracker.aidl
@@ -25,28 +25,19 @@
interface IImeTracker {
/**
- * Called when an IME show request is created.
+ * Called when an IME request is started.
*
* @param tag the logging tag.
- * @param uid the uid of the client that requested the IME.
- * @param origin the origin of the IME show request.
- * @param reason the reason why the IME show request was created.
+ * @param uid the uid of the client that started the request.
+ * @param type the type of the request.
+ * @param origin the origin of the request.
* @param fromUser whether this request was created directly from user interaction.
- * @return A new IME tracking token.
- */
- ImeTracker.Token onRequestShow(String tag, int uid, int origin, int reason, boolean fromUser);
-
- /**
- * Called when an IME hide request is created.
+ * @param reason the reason for starting the request.
*
- * @param tag the logging tag.
- * @param uid the uid of the client that requested the IME.
- * @param origin the origin of the IME hide request.
- * @param reason the reason why the IME hide request was created.
- * @param fromUser whether this request was created directly from user interaction.
- * @return A new IME tracking token.
+ * @return An IME request tracking token.
*/
- ImeTracker.Token onRequestHide(String tag, int uid, int origin, int reason, boolean fromUser);
+ ImeTracker.Token onStart(String tag, int uid, int type, int origin, int reason,
+ boolean fromUser);
/**
* Called when the IME request progresses to a further phase.
diff --git a/core/java/com/android/internal/inputmethod/IInputMethod.aidl b/core/java/com/android/internal/inputmethod/IInputMethod.aidl
index 6abd9e8..2593b78 100644
--- a/core/java/com/android/internal/inputmethod/IInputMethod.aidl
+++ b/core/java/com/android/internal/inputmethod/IInputMethod.aidl
@@ -71,11 +71,11 @@
void setSessionEnabled(IInputMethodSession session, boolean enabled);
- void showSoftInput(in IBinder showInputToken, in @nullable ImeTracker.Token statsToken,
- int flags, in ResultReceiver resultReceiver);
+ void showSoftInput(in IBinder showInputToken, in ImeTracker.Token statsToken, int flags,
+ in ResultReceiver resultReceiver);
- void hideSoftInput(in IBinder hideInputToken, in @nullable ImeTracker.Token statsToken,
- int flags, in ResultReceiver resultReceiver);
+ void hideSoftInput(in IBinder hideInputToken, in ImeTracker.Token statsToken, int flags,
+ in ResultReceiver resultReceiver);
void updateEditorToolType(int toolType);
diff --git a/core/java/com/android/internal/inputmethod/IInputMethodPrivilegedOperations.aidl b/core/java/com/android/internal/inputmethod/IInputMethodPrivilegedOperations.aidl
index 65a2f4b..457b9dd 100644
--- a/core/java/com/android/internal/inputmethod/IInputMethodPrivilegedOperations.aidl
+++ b/core/java/com/android/internal/inputmethod/IInputMethodPrivilegedOperations.aidl
@@ -35,15 +35,17 @@
void setInputMethod(String id, in AndroidFuture future /* T=Void */);
void setInputMethodAndSubtype(String id, in InputMethodSubtype subtype,
in AndroidFuture future /* T=Void */);
- void hideMySoftInput(int flags, int reason, in AndroidFuture future /* T=Void */);
- void showMySoftInput(int flags, in AndroidFuture future /* T=Void */);
+ void hideMySoftInput(in ImeTracker.Token statsToken, int flags, int reason,
+ in AndroidFuture future /* T=Void */);
+ void showMySoftInput(in ImeTracker.Token statsToken, int flags, int reason,
+ in AndroidFuture future /* T=Void */);
void updateStatusIconAsync(String packageName, int iconId);
void switchToPreviousInputMethod(in AndroidFuture future /* T=Boolean */);
void switchToNextInputMethod(boolean onlyCurrentIme, in AndroidFuture future /* T=Boolean */);
void shouldOfferSwitchingToNextInputMethod(in AndroidFuture future /* T=Boolean */);
void notifyUserActionAsync();
void applyImeVisibilityAsync(IBinder showOrHideInputToken, boolean setVisible,
- in @nullable ImeTracker.Token statsToken);
+ in ImeTracker.Token statsToken);
void onStylusHandwritingReady(int requestId, int pid);
void resetStylusHandwriting(int requestId);
void switchKeyboardLayoutAsync(int direction);
diff --git a/core/java/com/android/internal/inputmethod/InputMethodDebug.java b/core/java/com/android/internal/inputmethod/InputMethodDebug.java
index 9b7fa2f..a0aad31 100644
--- a/core/java/com/android/internal/inputmethod/InputMethodDebug.java
+++ b/core/java/com/android/internal/inputmethod/InputMethodDebug.java
@@ -189,6 +189,8 @@
*/
public static String softInputDisplayReasonToString(@SoftInputShowHideReason int reason) {
switch (reason) {
+ case SoftInputShowHideReason.NOT_SET:
+ return "NOT_SET";
case SoftInputShowHideReason.SHOW_SOFT_INPUT:
return "SHOW_SOFT_INPUT";
case SoftInputShowHideReason.ATTACH_NEW_INPUT:
@@ -265,6 +267,36 @@
return "HIDE_SOFT_INPUT_CLOSE_CURRENT_SESSION";
case SoftInputShowHideReason.HIDE_SOFT_INPUT_FROM_VIEW:
return "HIDE_SOFT_INPUT_FROM_VIEW";
+ case SoftInputShowHideReason.SHOW_SOFT_INPUT_LEGACY_DIRECT:
+ return "SHOW_SOFT_INPUT_LEGACY_DIRECT";
+ case SoftInputShowHideReason.HIDE_SOFT_INPUT_LEGACY_DIRECT:
+ return "HIDE_SOFT_INPUT_LEGACY_DIRECT";
+ case SoftInputShowHideReason.SHOW_WINDOW_LEGACY_DIRECT:
+ return "SHOW_WINDOW_LEGACY_DIRECT";
+ case SoftInputShowHideReason.HIDE_WINDOW_LEGACY_DIRECT:
+ return "HIDE_WINDOW_LEGACY_DIRECT";
+ case SoftInputShowHideReason.RESET_NEW_CONFIGURATION:
+ return "RESET_NEW_CONFIGURATION";
+ case SoftInputShowHideReason.UPDATE_CANDIDATES_VIEW_VISIBILITY:
+ return "UPDATE_CANDIDATES_VIEW_VISIBILITY";
+ case SoftInputShowHideReason.CONTROLS_CHANGED:
+ return "CONTROLS_CHANGED";
+ case SoftInputShowHideReason.DISPLAY_CONFIGURATION_CHANGED:
+ return "DISPLAY_CONFIGURATION_CHANGED";
+ case SoftInputShowHideReason.DISPLAY_INSETS_CHANGED:
+ return "DISPLAY_INSETS_CHANGED";
+ case SoftInputShowHideReason.DISPLAY_CONTROLS_CHANGED:
+ return "DISPLAY_CONTROLS_CHANGED";
+ case SoftInputShowHideReason.UNBIND_CURRENT_METHOD:
+ return "UNBIND_CURRENT_METHOD";
+ case SoftInputShowHideReason.HIDE_SOFT_INPUT_ON_ANIMATION_STATE_CHANGED:
+ return "HIDE_SOFT_INPUT_ON_ANIMATION_STATE_CHANGED";
+ case SoftInputShowHideReason.HIDE_SOFT_INPUT_REQUEST_HIDE_WITH_CONTROL:
+ return "HIDE_SOFT_INPUT_REQUEST_HIDE_WITH_CONTROL";
+ case SoftInputShowHideReason.SHOW_SOFT_INPUT_IME_TOGGLE_SOFT_INPUT:
+ return "SHOW_SOFT_INPUT_IME_TOGGLE_SOFT_INPUT";
+ case SoftInputShowHideReason.SHOW_SOFT_INPUT_IMM_DEPRECATION:
+ return "SHOW_SOFT_INPUT_IMM_DEPRECATION";
default:
return "Unknown=" + reason;
}
diff --git a/core/java/com/android/internal/inputmethod/InputMethodPrivilegedOperations.java b/core/java/com/android/internal/inputmethod/InputMethodPrivilegedOperations.java
index 792388d..635a227 100644
--- a/core/java/com/android/internal/inputmethod/InputMethodPrivilegedOperations.java
+++ b/core/java/com/android/internal/inputmethod/InputMethodPrivilegedOperations.java
@@ -252,20 +252,21 @@
}
/**
- * Calls {@link IInputMethodPrivilegedOperations#hideMySoftInput(int, int, AndroidFuture)}
- *
- * @param reason the reason to hide soft input
+ * Calls {@link IInputMethodPrivilegedOperations#hideMySoftInput}
*/
@AnyThread
- public void hideMySoftInput(@InputMethodManager.HideFlags int flags,
- @SoftInputShowHideReason int reason) {
+ public void hideMySoftInput(@NonNull ImeTracker.Token statsToken,
+ @InputMethodManager.HideFlags int flags, @SoftInputShowHideReason int reason) {
final IInputMethodPrivilegedOperations ops = mOps.getAndWarnIfNull();
if (ops == null) {
+ ImeTracker.forLogging().onFailed(statsToken,
+ ImeTracker.PHASE_IME_PRIVILEGED_OPERATIONS);
return;
}
+ ImeTracker.forLogging().onProgress(statsToken, ImeTracker.PHASE_IME_PRIVILEGED_OPERATIONS);
try {
final AndroidFuture<Void> future = new AndroidFuture<>();
- ops.hideMySoftInput(flags, reason, future);
+ ops.hideMySoftInput(statsToken, flags, reason, future);
CompletableFutureUtil.getResult(future);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
@@ -273,17 +274,21 @@
}
/**
- * Calls {@link IInputMethodPrivilegedOperations#showMySoftInput(int, AndroidFuture)}
+ * Calls {@link IInputMethodPrivilegedOperations#showMySoftInput}
*/
@AnyThread
- public void showMySoftInput(@InputMethodManager.ShowFlags int flags) {
+ public void showMySoftInput(@NonNull ImeTracker.Token statsToken,
+ @InputMethodManager.ShowFlags int flags, @SoftInputShowHideReason int reason) {
final IInputMethodPrivilegedOperations ops = mOps.getAndWarnIfNull();
if (ops == null) {
+ ImeTracker.forLogging().onFailed(statsToken,
+ ImeTracker.PHASE_IME_PRIVILEGED_OPERATIONS);
return;
}
+ ImeTracker.forLogging().onProgress(statsToken, ImeTracker.PHASE_IME_PRIVILEGED_OPERATIONS);
try {
final AndroidFuture<Void> future = new AndroidFuture<>();
- ops.showMySoftInput(flags, future);
+ ops.showMySoftInput(statsToken, flags, reason, future);
CompletableFutureUtil.getResult(future);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
@@ -379,19 +384,19 @@
* {@link android.view.inputmethod.InputMethodManager#hideSoftInputFromWindow(IBinder,
* int)}
* @param setVisible {@code true} to set IME visible, else hidden.
- * @param statsToken the token tracking the current IME request or {@code null} otherwise.
+ * @param statsToken the token tracking the current IME request.
*/
@AnyThread
public void applyImeVisibilityAsync(IBinder showOrHideInputToken, boolean setVisible,
- @Nullable ImeTracker.Token statsToken) {
+ @NonNull ImeTracker.Token statsToken) {
final IInputMethodPrivilegedOperations ops = mOps.getAndWarnIfNull();
if (ops == null) {
ImeTracker.forLogging().onFailed(statsToken,
- ImeTracker.PHASE_IME_APPLY_VISIBILITY_INSETS_CONSUMER);
+ ImeTracker.PHASE_IME_PRIVILEGED_OPERATIONS);
return;
}
ImeTracker.forLogging().onProgress(statsToken,
- ImeTracker.PHASE_IME_APPLY_VISIBILITY_INSETS_CONSUMER);
+ ImeTracker.PHASE_IME_PRIVILEGED_OPERATIONS);
try {
ops.applyImeVisibilityAsync(showOrHideInputToken, setVisible, statsToken);
} catch (RemoteException e) {
diff --git a/core/java/com/android/internal/inputmethod/SoftInputShowHideReason.java b/core/java/com/android/internal/inputmethod/SoftInputShowHideReason.java
index 861b8a7..da738a0 100644
--- a/core/java/com/android/internal/inputmethod/SoftInputShowHideReason.java
+++ b/core/java/com/android/internal/inputmethod/SoftInputShowHideReason.java
@@ -34,6 +34,7 @@
*/
@Retention(SOURCE)
@IntDef(value = {
+ SoftInputShowHideReason.NOT_SET,
SoftInputShowHideReason.SHOW_SOFT_INPUT,
SoftInputShowHideReason.ATTACH_NEW_INPUT,
SoftInputShowHideReason.SHOW_SOFT_INPUT_FROM_IME,
@@ -72,8 +73,26 @@
SoftInputShowHideReason.HIDE_WHEN_INPUT_TARGET_INVISIBLE,
SoftInputShowHideReason.HIDE_CLOSE_CURRENT_SESSION,
SoftInputShowHideReason.HIDE_SOFT_INPUT_FROM_VIEW,
+ SoftInputShowHideReason.SHOW_SOFT_INPUT_LEGACY_DIRECT,
+ SoftInputShowHideReason.HIDE_SOFT_INPUT_LEGACY_DIRECT,
+ SoftInputShowHideReason.SHOW_WINDOW_LEGACY_DIRECT,
+ SoftInputShowHideReason.HIDE_WINDOW_LEGACY_DIRECT,
+ SoftInputShowHideReason.RESET_NEW_CONFIGURATION,
+ SoftInputShowHideReason.UPDATE_CANDIDATES_VIEW_VISIBILITY,
+ SoftInputShowHideReason.CONTROLS_CHANGED,
+ SoftInputShowHideReason.DISPLAY_CONFIGURATION_CHANGED,
+ SoftInputShowHideReason.DISPLAY_INSETS_CHANGED,
+ SoftInputShowHideReason.DISPLAY_CONTROLS_CHANGED,
+ SoftInputShowHideReason.UNBIND_CURRENT_METHOD,
+ SoftInputShowHideReason.HIDE_SOFT_INPUT_ON_ANIMATION_STATE_CHANGED,
+ SoftInputShowHideReason.HIDE_SOFT_INPUT_REQUEST_HIDE_WITH_CONTROL,
+ SoftInputShowHideReason.SHOW_SOFT_INPUT_IME_TOGGLE_SOFT_INPUT,
+ SoftInputShowHideReason.SHOW_SOFT_INPUT_IMM_DEPRECATION,
})
public @interface SoftInputShowHideReason {
+ /** Default, undefined reason. */
+ int NOT_SET = ImeProtoEnums.REASON_NOT_SET;
+
/** Show soft input by {@link android.view.inputmethod.InputMethodManager#showSoftInput}. */
int SHOW_SOFT_INPUT = ImeProtoEnums.REASON_SHOW_SOFT_INPUT;
@@ -291,4 +310,91 @@
* Hide soft input when {@link InputMethodManager#hideSoftInputFromView(View, int)} gets called.
*/
int HIDE_SOFT_INPUT_FROM_VIEW = ImeProtoEnums.REASON_HIDE_SOFT_INPUT_FROM_VIEW;
+
+ /**
+ * Show soft input by legacy (discouraged) call to
+ * {@link android.inputmethodservice.InputMethodService.InputMethodImpl#showSoftInput}.
+ */
+ int SHOW_SOFT_INPUT_LEGACY_DIRECT = ImeProtoEnums.REASON_SHOW_SOFT_INPUT_LEGACY_DIRECT;
+
+ /**
+ * Hide soft input by legacy (discouraged) call to
+ * {@link android.inputmethodservice.InputMethodService.InputMethodImpl#hideSoftInput}.
+ */
+ int HIDE_SOFT_INPUT_LEGACY_DIRECT = ImeProtoEnums.REASON_HIDE_SOFT_INPUT_LEGACY_DIRECT;
+
+ /**
+ * Show soft input by legacy (discouraged) call to
+ * {@link android.inputmethodservice.InputMethodService#showWindow}.
+ */
+ int SHOW_WINDOW_LEGACY_DIRECT = ImeProtoEnums.REASON_SHOW_WINDOW_LEGACY_DIRECT;
+
+ /**
+ * Hide soft input by legacy (discouraged) call to
+ * {@link android.inputmethodservice.InputMethodService#hideWindow}.
+ */
+ int HIDE_WINDOW_LEGACY_DIRECT = ImeProtoEnums.REASON_HIDE_WINDOW_LEGACY_DIRECT;
+
+ /**
+ * Show / Hide soft input by
+ * {@link android.inputmethodservice.InputMethodService#resetStateForNewConfiguration}.
+ */
+ int RESET_NEW_CONFIGURATION = ImeProtoEnums.REASON_RESET_NEW_CONFIGURATION;
+
+ /**
+ * Show / Hide soft input by
+ * {@link android.inputmethodservice.InputMethodService#updateCandidatesVisibility}.
+ */
+ int UPDATE_CANDIDATES_VIEW_VISIBILITY = ImeProtoEnums.REASON_UPDATE_CANDIDATES_VIEW_VISIBILITY;
+
+ /**
+ * Show / Hide soft input by {@link android.view.InsetsController#onControlsChanged}.
+ */
+ int CONTROLS_CHANGED = ImeProtoEnums.REASON_CONTROLS_CHANGED;
+
+ /**
+ * Show soft input by
+ * {@link com.android.wm.shell.common.DisplayImeController#onDisplayConfigurationChanged}.
+ */
+ int DISPLAY_CONFIGURATION_CHANGED = ImeProtoEnums.REASON_DISPLAY_CONFIGURATION_CHANGED;
+
+ /**
+ * Show soft input by
+ * {@link com.android.wm.shell.common.DisplayImeController.PerDisplay#insetsChanged}.
+ */
+ int DISPLAY_INSETS_CHANGED = ImeProtoEnums.REASON_DISPLAY_INSETS_CHANGED;
+
+ /**
+ * Show / Hide soft input by
+ * {@link com.android.wm.shell.common.DisplayImeController.PerDisplay#insetsControlChanged}.
+ */
+ int DISPLAY_CONTROLS_CHANGED = ImeProtoEnums.REASON_DISPLAY_CONTROLS_CHANGED;
+
+ /** Hide soft input by
+ * {@link com.android.server.inputmethod.InputMethodManagerService#onUnbindCurrentMethodByReset}.
+ */
+ int UNBIND_CURRENT_METHOD = ImeProtoEnums.REASON_UNBIND_CURRENT_METHOD;
+
+ /** Hide soft input by {@link android.view.ImeInsetsSourceConsumer#onAnimationStateChanged}. */
+ int HIDE_SOFT_INPUT_ON_ANIMATION_STATE_CHANGED =
+ ImeProtoEnums.REASON_HIDE_SOFT_INPUT_ON_ANIMATION_STATE_CHANGED;
+
+ /** Hide soft input when we already have a {@link android.view.InsetsSourceControl} by
+ * {@link android.view.ImeInsetsSourceConsumer#requestHide}.
+ */
+ int HIDE_SOFT_INPUT_REQUEST_HIDE_WITH_CONTROL =
+ ImeProtoEnums.REASON_HIDE_SOFT_INPUT_REQUEST_HIDE_WITH_CONTROL;
+
+ /**
+ * Show soft input by
+ * {@link android.inputmethodservice.InputMethodService#onToggleSoftInput(int, int)}.
+ */
+ int SHOW_SOFT_INPUT_IME_TOGGLE_SOFT_INPUT =
+ ImeProtoEnums.REASON_SHOW_SOFT_INPUT_IME_TOGGLE_SOFT_INPUT;
+
+ /**
+ * Show soft input by the deprecated
+ * {@link InputMethodManager#showSoftInputFromInputMethod(IBinder, int)}.
+ */
+ int SHOW_SOFT_INPUT_IMM_DEPRECATION = ImeProtoEnums.REASON_SHOW_SOFT_INPUT_IMM_DEPRECATION;
}
diff --git a/core/java/com/android/internal/view/IInputMethodManager.aidl b/core/java/com/android/internal/view/IInputMethodManager.aidl
index 1f4503a..dc3b5a8 100644
--- a/core/java/com/android/internal/view/IInputMethodManager.aidl
+++ b/core/java/com/android/internal/view/IInputMethodManager.aidl
@@ -65,12 +65,21 @@
InputMethodSubtype getLastInputMethodSubtype(int userId);
boolean showSoftInput(in IInputMethodClient client, @nullable IBinder windowToken,
- in @nullable ImeTracker.Token statsToken, int flags, int lastClickToolType,
+ in ImeTracker.Token statsToken, int flags, int lastClickToolType,
in @nullable ResultReceiver resultReceiver, int reason);
boolean hideSoftInput(in IInputMethodClient client, @nullable IBinder windowToken,
- in @nullable ImeTracker.Token statsToken, int flags,
+ in ImeTracker.Token statsToken, int flags,
in @nullable ResultReceiver resultReceiver, int reason);
+ /**
+ * A test API for CTS to request hiding the current soft input window, with the request origin
+ * on the server side.
+ */
+ @EnforcePermission("TEST_INPUT_METHOD")
+ @JavaPassthrough(annotation="@android.annotation.RequiresPermission(value = "
+ + "android.Manifest.permission.TEST_INPUT_METHOD)")
+ void hideSoftInputFromServerForTest();
+
// TODO(b/293640003): Remove method once Flags.useZeroJankProxy() is enabled.
// If windowToken is null, this just does startInput(). Otherwise this reports that a window
// has gained focus, and if 'editorInfo' is non-null then also does startInput.
diff --git a/core/jni/Android.bp b/core/jni/Android.bp
index 240028c..76e7138 100644
--- a/core/jni/Android.bp
+++ b/core/jni/Android.bp
@@ -400,6 +400,7 @@
"libbinary_parse",
"libdng_sdk",
"libft2",
+ "libhostgraphics",
"libhwui",
"libimage_type_recognition",
"libjpeg",
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index 967edde..8edf42a 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -3614,8 +3614,7 @@
<!-- Whether this device prefers to show snapshot or splash screen on back predict target.
When set true, there will create windowless starting surface for the preview target, so it
won't affect activity's lifecycle. This should only be disabled on low-ram device. -->
- <!-- TODO(b/268563842) enable once activity snapshot is ready -->
- <bool name="config_predictShowStartingSurface">false</bool>
+ <bool name="config_predictShowStartingSurface">true</bool>
<!-- default window ShowCircularMask property -->
<bool name="config_windowShowCircularMask">false</bool>
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index ee51ed0..a180467 100644
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -4366,6 +4366,7 @@
<java-symbol type="dimen" name="seekbar_thumb_exclusion_max_size" />
<java-symbol type="layout" name="chooser_az_label_row" />
<java-symbol type="string" name="chooser_all_apps_button_label" />
+ <java-symbol type="anim" name="resolver_close_anim" />
<java-symbol type="anim" name="resolver_launch_anim" />
<java-symbol type="style" name="Animation.DeviceDefault.Activity.Resolver" />
diff --git a/core/tests/coretests/src/android/os/PowerManagerTest.java b/core/tests/coretests/src/android/os/PowerManagerTest.java
index cb281ff..b9a12ad 100644
--- a/core/tests/coretests/src/android/os/PowerManagerTest.java
+++ b/core/tests/coretests/src/android/os/PowerManagerTest.java
@@ -32,6 +32,7 @@
import android.platform.test.annotations.RequiresFlagsEnabled;
import android.platform.test.flag.junit.CheckFlagsRule;
import android.platform.test.flag.junit.DeviceFlagsValueProvider;
+import android.platform.test.flag.junit.RavenwoodFlagsValueProvider;
import android.platform.test.ravenwood.RavenwoodRule;
import androidx.test.InstrumentationRegistry;
@@ -86,7 +87,8 @@
// Required for RequiresFlagsEnabled and RequiresFlagsDisabled annotations to take effect.
@Rule
- public final CheckFlagsRule mCheckFlagsRule = RavenwoodRule.isUnderRavenwood() ? null
+ public final CheckFlagsRule mCheckFlagsRule = RavenwoodRule.isOnRavenwood()
+ ? RavenwoodFlagsValueProvider.createAllOnCheckFlagsRule()
: DeviceFlagsValueProvider.createCheckFlagsRule();
/**
diff --git a/core/tests/coretests/src/android/os/WorkDurationUnitTest.java b/core/tests/coretests/src/android/os/WorkDurationUnitTest.java
index c70da6e..fcdc590 100644
--- a/core/tests/coretests/src/android/os/WorkDurationUnitTest.java
+++ b/core/tests/coretests/src/android/os/WorkDurationUnitTest.java
@@ -22,6 +22,7 @@
import android.platform.test.annotations.RequiresFlagsEnabled;
import android.platform.test.flag.junit.CheckFlagsRule;
import android.platform.test.flag.junit.DeviceFlagsValueProvider;
+import android.platform.test.flag.junit.RavenwoodFlagsValueProvider;
import android.platform.test.ravenwood.RavenwoodRule;
import androidx.test.runner.AndroidJUnit4;
@@ -40,7 +41,8 @@
// Required for RequiresFlagsEnabled and RequiresFlagsDisabled annotations to take effect.
@Rule
- public final CheckFlagsRule mCheckFlagsRule = RavenwoodRule.isUnderRavenwood() ? null
+ public final CheckFlagsRule mCheckFlagsRule = RavenwoodRule.isOnRavenwood()
+ ? RavenwoodFlagsValueProvider.createAllOnCheckFlagsRule()
: DeviceFlagsValueProvider.createCheckFlagsRule();
@Before
diff --git a/core/tests/coretests/src/android/view/ImeInsetsSourceConsumerTest.java b/core/tests/coretests/src/android/view/ImeInsetsSourceConsumerTest.java
index 8c93fbb..48ba526 100644
--- a/core/tests/coretests/src/android/view/ImeInsetsSourceConsumerTest.java
+++ b/core/tests/coretests/src/android/view/ImeInsetsSourceConsumerTest.java
@@ -24,8 +24,10 @@
import static junit.framework.Assert.assertFalse;
import static junit.framework.Assert.assertTrue;
-import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.AdditionalMatchers.and;
+import static org.mockito.AdditionalMatchers.not;
import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.ArgumentMatchers.notNull;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.verify;
@@ -36,6 +38,7 @@
import android.platform.test.annotations.Presubmit;
import android.view.WindowManager.BadTokenException;
import android.view.WindowManager.LayoutParams;
+import android.view.inputmethod.ImeTracker;
import android.widget.TextView;
import androidx.test.ext.junit.runners.AndroidJUnit4;
@@ -96,12 +99,12 @@
InstrumentationRegistry.getInstrumentation().runOnMainSync(() -> {
// test if setVisibility can show IME
mImeConsumer.onWindowFocusGained(true);
- mController.show(WindowInsets.Type.ime(), true /* fromIme */, null /* statsToken */);
+ mController.show(WindowInsets.Type.ime(), true /* fromIme */, ImeTracker.Token.empty());
mController.cancelExistingAnimations();
assertTrue((mController.getRequestedVisibleTypes() & WindowInsets.Type.ime()) != 0);
// test if setVisibility can hide IME
- mController.hide(WindowInsets.Type.ime(), true /* fromIme */, null /* statsToken */);
+ mController.hide(WindowInsets.Type.ime(), true /* fromIme */, ImeTracker.Token.empty());
mController.cancelExistingAnimations();
assertFalse((mController.getRequestedVisibleTypes() & WindowInsets.Type.ime()) != 0);
});
@@ -114,8 +117,9 @@
InstrumentationRegistry.getInstrumentation().runOnMainSync(() -> {
// Request IME visible before control is available.
+ final var statsToken = ImeTracker.Token.empty();
mImeConsumer.onWindowFocusGained(true);
- mController.show(WindowInsets.Type.ime(), true /* fromIme */, null /* statsToken */);
+ mController.show(WindowInsets.Type.ime(), true /* fromIme */, statsToken);
// set control and verify visibility is applied.
InsetsSourceControl control = new InsetsSourceControl(ID_IME,
@@ -124,10 +128,10 @@
// IME show animation should be triggered when control becomes available.
verify(mController).applyAnimation(
eq(WindowInsets.Type.ime()), eq(true) /* show */, eq(true) /* fromIme */,
- any() /* statsToken */);
+ eq(statsToken));
verify(mController, never()).applyAnimation(
eq(WindowInsets.Type.ime()), eq(false) /* show */, eq(true) /* fromIme */,
- any() /* statsToken */);
+ eq(statsToken));
});
}
@@ -152,9 +156,9 @@
// Request IME visible before control is available.
mImeConsumer.onWindowFocusGained(hasWindowFocus);
final boolean imeVisible = hasWindowFocus && hasViewFocus;
+ final var statsToken = ImeTracker.Token.empty();
if (imeVisible) {
- mController.show(WindowInsets.Type.ime(), true /* fromIme */,
- null /* statsToken */);
+ mController.show(WindowInsets.Type.ime(), true /* fromIme */, statsToken);
}
// set control and verify visibility is applied.
@@ -168,23 +172,25 @@
// and expect skip animation state after getAndClearSkipAnimationOnce invoked.
mController.onControlsChanged(new InsetsSourceControl[]{ control });
verify(control).getAndClearSkipAnimationOnce();
+ // This ends up creating a new request when we gain control,
+ // so the statsToken won't match.
verify(mController).applyAnimation(eq(WindowInsets.Type.ime()),
eq(true) /* show */, eq(false) /* fromIme */,
- eq(expectSkipAnim) /* skipAnim */, eq(null) /* statsToken */);
+ eq(expectSkipAnim) /* skipAnim */, and(not(eq(statsToken)), notNull()));
}
// If previously hasViewFocus is false, verify when requesting the IME visible next
// time will not skip animation.
if (!hasViewFocus) {
- mController.show(WindowInsets.Type.ime(), true /* fromIme */,
- null /* statsToken */);
+ final var statsTokenNext = ImeTracker.Token.empty();
+ mController.show(WindowInsets.Type.ime(), true /* fromIme */, statsTokenNext);
mController.onControlsChanged(new InsetsSourceControl[]{ control });
// Verify IME show animation should be triggered when control becomes available and
// the animation will be skipped by getAndClearSkipAnimationOnce invoked.
verify(control).getAndClearSkipAnimationOnce();
verify(mController).applyAnimation(eq(WindowInsets.Type.ime()),
eq(true) /* show */, eq(true) /* fromIme */,
- eq(false) /* skipAnim */, eq(null) /* statsToken */);
+ eq(false) /* skipAnim */, eq(statsTokenNext));
}
});
}
diff --git a/core/tests/coretests/src/android/view/InsetsControllerTest.java b/core/tests/coretests/src/android/view/InsetsControllerTest.java
index 1568174..316e191 100644
--- a/core/tests/coretests/src/android/view/InsetsControllerTest.java
+++ b/core/tests/coretests/src/android/view/InsetsControllerTest.java
@@ -256,7 +256,7 @@
mController.setSystemDrivenInsetsAnimationLoggingListener(loggingListener);
mController.getSourceConsumer(ID_IME, ime()).onWindowFocusGained(true);
// since there is no focused view, forcefully make IME visible.
- mController.show(WindowInsets.Type.ime(), true /* fromIme */, null /* statsToken */);
+ mController.show(ime(), true /* fromIme */, ImeTracker.Token.empty());
// When using the animation thread, this must not invoke onReady()
mViewRoot.getView().getViewTreeObserver().dispatchOnPreDraw();
});
@@ -273,14 +273,14 @@
InstrumentationRegistry.getInstrumentation().runOnMainSync(() -> {
mController.getSourceConsumer(ID_IME, ime()).onWindowFocusGained(true);
// since there is no focused view, forcefully make IME visible.
- mController.show(WindowInsets.Type.ime(), true /* fromIme */, null /* statsToken */);
+ mController.show(ime(), true /* fromIme */, ImeTracker.Token.empty());
mController.show(all());
// quickly jump to final state by cancelling it.
mController.cancelExistingAnimations();
- final @InsetsType int types = navigationBars() | statusBars() | ime();
+ @InsetsType final int types = navigationBars() | statusBars() | ime();
assertEquals(types, mController.getRequestedVisibleTypes() & types);
- mController.hide(ime(), true /* fromIme */, null /* statsToken */);
+ mController.hide(ime(), true /* fromIme */, ImeTracker.Token.empty());
mController.hide(all());
mController.cancelExistingAnimations();
assertEquals(0, mController.getRequestedVisibleTypes() & types);
@@ -295,10 +295,10 @@
mController.onControlsChanged(new InsetsSourceControl[] { ime });
InstrumentationRegistry.getInstrumentation().runOnMainSync(() -> {
mController.getSourceConsumer(ID_IME, ime()).onWindowFocusGained(true);
- mController.show(WindowInsets.Type.ime(), true /* fromIme */, null /* statsToken */);
+ mController.show(ime(), true /* fromIme */, ImeTracker.Token.empty());
mController.cancelExistingAnimations();
assertTrue(isRequestedVisible(mController, ime()));
- mController.hide(ime(), true /* fromIme */, null /* statsToken */);
+ mController.hide(ime(), true /* fromIme */, ImeTracker.Token.empty());
mController.cancelExistingAnimations();
assertFalse(isRequestedVisible(mController, ime()));
mController.getSourceConsumer(ID_IME, ime()).onWindowFocusLost();
@@ -465,7 +465,7 @@
assertFalse(mController.getState().peekSource(ID_IME).isVisible());
// Pretend IME is calling
- mController.show(ime(), true /* fromIme */, null /* statsToken */);
+ mController.show(ime(), true /* fromIme */, ImeTracker.Token.empty());
// Gaining control shortly after
mController.onControlsChanged(createSingletonControl(ID_IME, ime()));
@@ -489,7 +489,7 @@
mController.onControlsChanged(createSingletonControl(ID_IME, ime()));
// Pretend IME is calling
- mController.show(ime(), true /* fromIme */, null /* statsToken */);
+ mController.show(ime(), true /* fromIme */, ImeTracker.Token.empty());
assertEquals(ANIMATION_TYPE_SHOW, mController.getAnimationType(ime()));
mController.cancelExistingAnimations();
@@ -567,7 +567,7 @@
verify(listener, never()).onReady(any(), anyInt());
// Pretend that IME is calling.
- mController.show(ime(), true /* fromIme */, null /* statsToken */);
+ mController.show(ime(), true /* fromIme */, ImeTracker.Token.empty());
// Ready gets deferred until next predraw
mViewRoot.getView().getViewTreeObserver().dispatchOnPreDraw();
@@ -651,7 +651,7 @@
mController.onControlsChanged(createSingletonControl(ID_IME, ime()));
// Pretend IME is calling
- mController.show(ime(), true /* fromIme */, null /* statsToken */);
+ mController.show(ime(), true /* fromIme */, ImeTracker.Token.empty());
InsetsState copy = new InsetsState(mController.getState(), true /* copySources */);
copy.peekSource(ID_IME).setFrame(0, 1, 2, 3);
@@ -851,7 +851,7 @@
// Showing invisible ime should only causes insets change once.
clearInvocations(mTestHost);
- mController.show(ime(), true /* fromIme */, null /* statsToken */);
+ mController.show(ime(), true /* fromIme */, ImeTracker.Token.empty());
verify(mTestHost, times(1)).notifyInsetsChanged();
// Sending the same insets state should not cause insets change.
@@ -918,7 +918,7 @@
assertNull(imeInsetsConsumer.getControl());
// Verify IME requested visibility should be updated to IME consumer from controller.
- mController.show(ime(), true /* fromIme */, null /* statsToken */);
+ mController.show(ime(), true /* fromIme */, ImeTracker.Token.empty());
assertTrue(isRequestedVisible(mController, ime()));
mController.hide(ime());
diff --git a/libs/WindowManager/Jetpack/src/androidx/window/extensions/embedding/SplitPresenter.java b/libs/WindowManager/Jetpack/src/androidx/window/extensions/embedding/SplitPresenter.java
index 2f2da8c..b53b9c5 100644
--- a/libs/WindowManager/Jetpack/src/androidx/window/extensions/embedding/SplitPresenter.java
+++ b/libs/WindowManager/Jetpack/src/androidx/window/extensions/embedding/SplitPresenter.java
@@ -387,7 +387,7 @@
// Sets the dim area when the two TaskFragments are adjacent.
final boolean dimOnTask = !isStacked
- && splitAttributes.getWindowAttributes().getDimArea() == DIM_AREA_ON_TASK
+ && splitAttributes.getWindowAttributes().getDimAreaBehavior() == DIM_AREA_ON_TASK
&& Flags.fullscreenDimFlag();
setTaskFragmentDimOnTask(wct, primaryContainer.getTaskFragmentToken(), dimOnTask);
setTaskFragmentDimOnTask(wct, secondaryContainer.getTaskFragmentToken(), dimOnTask);
@@ -590,7 +590,7 @@
final boolean isFillParent = relativeBounds.isEmpty();
final boolean isIsolatedNavigated = !isFillParent && container.isOverlay();
final boolean dimOnTask = !isFillParent
- && attributes.getWindowAttributes().getDimArea() == DIM_AREA_ON_TASK
+ && attributes.getWindowAttributes().getDimAreaBehavior() == DIM_AREA_ON_TASK
&& Flags.fullscreenDimFlag();
final IBinder fragmentToken = container.getTaskFragmentToken();
diff --git a/libs/WindowManager/Shell/res/drawable/desktop_mode_header_ic_close.xml b/libs/WindowManager/Shell/res/drawable/desktop_mode_header_ic_close.xml
new file mode 100644
index 0000000..ff49edb
--- /dev/null
+++ b/libs/WindowManager/Shell/res/drawable/desktop_mode_header_ic_close.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ Copyright (C) 2024 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.
+ -->
+<vector
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportHeight="24"
+ android:viewportWidth="24">
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M19,6.41L17.59,5 12,10.59 6.41,5 5,6.41 10.59,12 5,17.59 6.41,19 12,13.41 17.59,19 19,17.59 13.41,12z"/>
+</vector>
diff --git a/libs/WindowManager/Shell/res/layout/desktop_mode_app_controls_window_decor.xml b/libs/WindowManager/Shell/res/layout/desktop_mode_app_controls_window_decor.xml
index 490f088..a5605a7 100644
--- a/libs/WindowManager/Shell/res/layout/desktop_mode_app_controls_window_decor.xml
+++ b/libs/WindowManager/Shell/res/layout/desktop_mode_app_controls_window_decor.xml
@@ -33,14 +33,15 @@
android:orientation="horizontal"
android:clickable="true"
android:focusable="true"
- android:paddingStart="6dp"
- android:paddingEnd="8dp">
+ android:paddingStart="12dp">
<ImageView
android:id="@+id/application_icon"
android:layout_width="@dimen/desktop_mode_caption_icon_radius"
android:layout_height="@dimen/desktop_mode_caption_icon_radius"
android:layout_gravity="center_vertical"
- android:contentDescription="@string/app_icon_text" />
+ android:contentDescription="@string/app_icon_text"
+ android:layout_marginStart="6dp"
+ android:scaleType="centerCrop"/>
<TextView
android:id="@+id/application_name"
@@ -53,8 +54,7 @@
android:lineHeight="20dp"
android:layout_gravity="center_vertical"
android:layout_weight="1"
- android:paddingStart="8dp"
- android:paddingEnd="8dp"
+ android:layout_marginStart="8dp"
tools:text="Gmail"/>
<ImageButton
@@ -67,6 +67,7 @@
android:scaleType="fitCenter"
android:clickable="false"
android:focusable="false"
+ android:layout_marginHorizontal="8dp"
android:layout_gravity="center_vertical"/>
</LinearLayout>
@@ -87,14 +88,15 @@
<ImageButton
android:id="@+id/close_window"
- android:layout_width="40dp"
+ android:layout_width="44dp"
android:layout_height="40dp"
- android:padding="4dp"
+ android:paddingHorizontal="10dp"
+ android:paddingVertical="8dp"
android:layout_marginEnd="8dp"
android:tint="?androidprv:attr/materialColorOnSurface"
android:background="?android:selectableItemBackgroundBorderless"
android:contentDescription="@string/close_button_text"
- android:src="@drawable/decor_close_button_dark"
- android:scaleType="fitCenter"
+ android:src="@drawable/desktop_mode_header_ic_close"
+ android:scaleType="centerCrop"
android:gravity="end"/>
</com.android.wm.shell.windowdecor.WindowDecorLinearLayout>
\ No newline at end of file
diff --git a/libs/WindowManager/Shell/res/values/dimen.xml b/libs/WindowManager/Shell/res/values/dimen.xml
index 48e6428..74967ef0 100644
--- a/libs/WindowManager/Shell/res/values/dimen.xml
+++ b/libs/WindowManager/Shell/res/values/dimen.xml
@@ -434,15 +434,22 @@
<!-- (32 dp buttons + 10dp margins) * 3 buttons-->
<dimen name="caption_right_buttons_width">126dp</dimen>
- <!-- 2 buttons * 48dp button size. -->
- <dimen name="desktop_mode_right_edge_buttons_width">96dp</dimen>
+ <!-- 2 buttons * 44dp button size + 16dp total margins. -->
+ <dimen name="desktop_mode_right_edge_buttons_width">104dp</dimen>
<!-- 22dp padding + 24dp app icon + 16dp expand button.
Text varies in size, we will calculate that width separately. -->
<dimen name="desktop_mode_app_details_width_minus_text">62dp</dimen>
- <!-- 22dp padding + 24dp app icon + 16dp expand button + 86dp text (max) -->
- <dimen name="desktop_mode_app_details_max_width">148dp</dimen>
+ <!-- When custom headers are requested, this is the width of the left-aligned region that is
+ taken up by caption elements and extra margins. The customizable region starts at the
+ end of this area. -->
+ <dimen name="desktop_mode_customizable_caption_margin_start">84dp</dimen>
+
+ <!-- When custom headers are requested, this is the width of the right-aligned region that is
+ taken up by caption elements and extra margins. The customizable region ends at the
+ start of this area. -->
+ <dimen name="desktop_mode_customizable_caption_margin_end">152dp</dimen>
<!-- The width of the maximize menu in desktop mode. -->
<dimen name="desktop_mode_maximize_menu_width">287dp</dimen>
@@ -490,7 +497,7 @@
<dimen name="desktop_mode_handle_menu_corner_radius">26dp</dimen>
<!-- The radius of the caption menu icon. -->
- <dimen name="desktop_mode_caption_icon_radius">28dp</dimen>
+ <dimen name="desktop_mode_caption_icon_radius">24dp</dimen>
<!-- The radius of the caption menu shadow. -->
<dimen name="desktop_mode_handle_menu_shadow_radius">2dp</dimen>
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/common/DisplayImeController.java b/libs/WindowManager/Shell/src/com/android/wm/shell/common/DisplayImeController.java
index 2ea4316..ad01d0f 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/common/DisplayImeController.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/common/DisplayImeController.java
@@ -20,12 +20,12 @@
import static android.view.EventLogTags.IMF_IME_REMOTE_ANIM_END;
import static android.view.EventLogTags.IMF_IME_REMOTE_ANIM_START;
import static android.view.inputmethod.ImeTracker.DEBUG_IME_VISIBILITY;
-import static android.view.inputmethod.ImeTracker.TOKEN_NONE;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.ValueAnimator;
import android.annotation.IntDef;
+import android.annotation.NonNull;
import android.annotation.Nullable;
import android.content.ComponentName;
import android.content.res.Configuration;
@@ -51,6 +51,7 @@
import androidx.annotation.VisibleForTesting;
+import com.android.internal.inputmethod.SoftInputShowHideReason;
import com.android.wm.shell.sysui.ShellInit;
import java.util.ArrayList;
@@ -122,7 +123,8 @@
}
if (mDisplayController.getDisplayLayout(displayId).rotation()
!= pd.mRotation && isImeShowing(displayId)) {
- pd.startAnimation(true, false /* forceRestart */, null /* statsToken */);
+ pd.startAnimation(true, false /* forceRestart */,
+ SoftInputShowHideReason.DISPLAY_CONFIGURATION_CHANGED);
}
}
@@ -257,7 +259,8 @@
mInsetsState.set(insetsState, true /* copySources */);
if (mImeShowing && !Objects.equals(oldFrame, newFrame) && newSourceVisible) {
if (DEBUG) Slog.d(TAG, "insetsChanged when IME showing, restart animation");
- startAnimation(mImeShowing, true /* forceRestart */, null /* statsToken */);
+ startAnimation(mImeShowing, true /* forceRestart */,
+ SoftInputShowHideReason.DISPLAY_INSETS_CHANGED);
}
}
@@ -291,7 +294,8 @@
final boolean positionChanged =
!imeSourceControl.getSurfacePosition().equals(lastSurfacePosition);
if (positionChanged) {
- startAnimation(mImeShowing, true /* forceRestart */, null /* statsToken */);
+ startAnimation(mImeShowing, true /* forceRestart */,
+ SoftInputShowHideReason.DISPLAY_CONTROLS_CHANGED);
}
} else {
if (!haveSameLeash(mImeSourceControl, imeSourceControl)) {
@@ -384,7 +388,20 @@
}
private void startAnimation(final boolean show, final boolean forceRestart,
- @Nullable ImeTracker.Token statsToken) {
+ @SoftInputShowHideReason int reason) {
+ final var imeSource = mInsetsState.peekSource(InsetsSource.ID_IME);
+ if (imeSource == null || mImeSourceControl == null) {
+ return;
+ }
+ final var statsToken = ImeTracker.forLogging().onStart(
+ show ? ImeTracker.TYPE_SHOW : ImeTracker.TYPE_HIDE, ImeTracker.ORIGIN_WM_SHELL,
+ reason, false /* fromUser */);
+
+ startAnimation(show, forceRestart, statsToken);
+ }
+
+ private void startAnimation(final boolean show, final boolean forceRestart,
+ @NonNull final ImeTracker.Token statsToken) {
final InsetsSource imeSource = mInsetsState.peekSource(InsetsSource.ID_IME);
if (imeSource == null || mImeSourceControl == null) {
ImeTracker.forLogging().onFailed(statsToken, ImeTracker.PHASE_WM_ANIMATION_CREATE);
@@ -458,7 +475,7 @@
ImeTracker.forLogging().onProgress(statsToken, ImeTracker.PHASE_WM_ANIMATION_CREATE);
mAnimation.addListener(new AnimatorListenerAdapter() {
private boolean mCancelled = false;
- @Nullable
+ @NonNull
private final ImeTracker.Token mStatsToken = statsToken;
@Override
@@ -484,7 +501,7 @@
}
if (DEBUG_IME_VISIBILITY) {
EventLog.writeEvent(IMF_IME_REMOTE_ANIM_START,
- statsToken != null ? statsToken.getTag() : TOKEN_NONE,
+ mStatsToken != null ? mStatsToken.getTag() : ImeTracker.TOKEN_NONE,
mDisplayId, mAnimationDirection, alpha, startY , endY,
Objects.toString(mImeSourceControl.getLeash()),
Objects.toString(mImeSourceControl.getInsetsHint()),
@@ -500,7 +517,8 @@
mCancelled = true;
if (DEBUG_IME_VISIBILITY) {
EventLog.writeEvent(IMF_IME_REMOTE_ANIM_CANCEL,
- statsToken != null ? statsToken.getTag() : TOKEN_NONE, mDisplayId,
+ mStatsToken != null ? mStatsToken.getTag() : ImeTracker.TOKEN_NONE,
+ mDisplayId,
Objects.toString(mImeSourceControl.getInsetsHint()));
}
}
@@ -528,7 +546,7 @@
}
if (DEBUG_IME_VISIBILITY) {
EventLog.writeEvent(IMF_IME_REMOTE_ANIM_END,
- statsToken != null ? statsToken.getTag() : TOKEN_NONE,
+ mStatsToken != null ? mStatsToken.getTag() : ImeTracker.TOKEN_NONE,
mDisplayId, mAnimationDirection, endY,
Objects.toString(mImeSourceControl.getLeash()),
Objects.toString(mImeSourceControl.getInsetsHint()),
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/common/DisplayInsetsController.java b/libs/WindowManager/Shell/src/com/android/wm/shell/common/DisplayInsetsController.java
index 9bdda14..ca06024 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/common/DisplayInsetsController.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/common/DisplayInsetsController.java
@@ -277,8 +277,7 @@
*
* @param types {@link InsetsType} to show
* @param fromIme true if this request originated from IME (InputMethodService).
- * @param statsToken the token tracking the current IME show request
- * or {@code null} otherwise.
+ * @param statsToken the token tracking the current IME request or {@code null} otherwise.
*/
default void showInsets(@InsetsType int types, boolean fromIme,
@Nullable ImeTracker.Token statsToken) {}
@@ -288,8 +287,7 @@
*
* @param types {@link InsetsType} to hide
* @param fromIme true if this request originated from IME (InputMethodService).
- * @param statsToken the token tracking the current IME hide request
- * or {@code null} otherwise.
+ * @param statsToken the token tracking the current IME request or {@code null} otherwise.
*/
default void hideInsets(@InsetsType int types, boolean fromIme,
@Nullable ImeTracker.Token statsToken) {}
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/SplashscreenContentDrawer.java b/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/SplashscreenContentDrawer.java
index bfb60c0..da2965c 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/SplashscreenContentDrawer.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/SplashscreenContentDrawer.java
@@ -417,7 +417,7 @@
final SplashViewBuilder builder = new SplashViewBuilder(context, ai);
final SplashScreenView view = builder
.setWindowBGColor(themeBGColor)
- .chooseStyle(STARTING_WINDOW_TYPE_SPLASH_SCREEN)
+ .chooseStyle(STARTING_WINDOW_TYPE_SOLID_COLOR_SPLASH_SCREEN)
.build();
view.setNotCopyable();
return view;
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorViewModel.java b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorViewModel.java
index 8d798a3..d21bef0 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorViewModel.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorViewModel.java
@@ -559,8 +559,7 @@
} else if (ev.getAction() == ACTION_HOVER_EXIT) {
if (!decoration.isMaximizeMenuActive() && id == R.id.maximize_window) {
decoration.onMaximizeWindowHoverExit();
- } else if (id == R.id.maximize_window
- || MaximizeMenu.Companion.isMaximizeMenuView(id)) {
+ } else if (id == R.id.maximize_window || id == R.id.maximize_menu) {
// Close menu if not hovering over maximize menu or maximize button after a
// delay to give user a chance to re-enter view or to move from one maximize
// menu view to another.
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecoration.java b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecoration.java
index 9e999ae..39803e2 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecoration.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecoration.java
@@ -318,28 +318,25 @@
relayoutParams.mCaptionHeightId = getCaptionHeightIdStatic(taskInfo.getWindowingMode());
relayoutParams.mCaptionWidthId = getCaptionWidthId(relayoutParams.mLayoutResId);
- // The "app controls" type caption bar should report the occluding elements as bounding
- // rects to the insets system so that apps can draw in the empty space left in the center.
- if (captionLayoutId == R.layout.desktop_mode_app_controls_window_decor) {
- // The "app chip" section of the caption bar, it's aligned to the left and its width
- // varies depending on the length of the app name, but we'll report its max width for
- // now.
- // TODO(b/316387515): consider reporting the true width after it's been laid out.
+ if (captionLayoutId == R.layout.desktop_mode_app_controls_window_decor
+ && TaskInfoKt.isTransparentCaptionBarAppearance(taskInfo)) {
+ // App is requesting to customize the caption bar. Allow input to fall through to the
+ // windows below so that the app can respond to input events on their custom content.
+ relayoutParams.mAllowCaptionInputFallthrough = true;
+ // Report occluding elements as bounding rects to the insets system so that apps can
+ // draw in the empty space in the center:
+ // First, the "app chip" section of the caption bar (+ some extra margins).
final RelayoutParams.OccludingCaptionElement appChipElement =
new RelayoutParams.OccludingCaptionElement();
- appChipElement.mWidthResId = R.dimen.desktop_mode_app_details_max_width;
+ appChipElement.mWidthResId = R.dimen.desktop_mode_customizable_caption_margin_start;
appChipElement.mAlignment = RelayoutParams.OccludingCaptionElement.Alignment.START;
relayoutParams.mOccludingCaptionElements.add(appChipElement);
- // The "controls" section of the caption bar (maximize, close btns). These are aligned
- // to the right of the caption bar and have a fixed width.
- // TODO(b/316387515): add additional padding for an exclusive drag-move region.
+ // Then, the right-aligned section (drag space, maximize and close buttons).
final RelayoutParams.OccludingCaptionElement controlsElement =
new RelayoutParams.OccludingCaptionElement();
- controlsElement.mWidthResId = R.dimen.desktop_mode_right_edge_buttons_width;
+ controlsElement.mWidthResId = R.dimen.desktop_mode_customizable_caption_margin_end;
controlsElement.mAlignment = RelayoutParams.OccludingCaptionElement.Alignment.END;
relayoutParams.mOccludingCaptionElements.add(controlsElement);
- relayoutParams.mAllowCaptionInputFallthrough =
- TaskInfoKt.isTransparentCaptionBarAppearance(taskInfo);
}
if (DesktopModeStatus.useWindowShadow(/* isFocusedWindow= */ taskInfo.isFocused)) {
relayoutParams.mShadowRadiusId = taskInfo.isFocused
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/viewholder/DesktopModeAppControlsWindowDecorationViewHolder.kt b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/viewholder/DesktopModeAppControlsWindowDecorationViewHolder.kt
index b7dd01f..58bbb03 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/viewholder/DesktopModeAppControlsWindowDecorationViewHolder.kt
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/viewholder/DesktopModeAppControlsWindowDecorationViewHolder.kt
@@ -12,6 +12,7 @@
import android.widget.ImageView
import android.widget.TextView
import androidx.core.content.withStyledAttributes
+import androidx.core.view.isVisible
import com.android.internal.R.attr.materialColorOnSecondaryContainer
import com.android.internal.R.attr.materialColorOnSurface
import com.android.internal.R.attr.materialColorSecondaryContainer
@@ -76,6 +77,7 @@
closeWindowButton.imageTintList = ColorStateList.valueOf(color)
maximizeWindowButton.imageTintList = ColorStateList.valueOf(color)
expandMenuButton.imageTintList = ColorStateList.valueOf(color)
+ appNameTextView.isVisible = !taskInfo.isTransparentCaptionBarAppearance
appNameTextView.setTextColor(color)
appIconImageView.imageAlpha = alpha
maximizeWindowButton.imageAlpha = alpha
diff --git a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/common/DisplayImeControllerTest.java b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/common/DisplayImeControllerTest.java
index 01e2f98..2c0aa12 100644
--- a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/common/DisplayImeControllerTest.java
+++ b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/common/DisplayImeControllerTest.java
@@ -38,6 +38,7 @@
import android.view.InsetsSourceControl;
import android.view.InsetsState;
import android.view.SurfaceControl;
+import android.view.inputmethod.ImeTracker;
import androidx.test.filters.SmallTest;
@@ -51,6 +52,12 @@
import java.util.concurrent.Executor;
+/**
+ * Tests for the display IME controller.
+ *
+ * <p> Build/Install/Run:
+ * atest WMShellUnitTests:DisplayImeControllerTest
+ */
@SmallTest
public class DisplayImeControllerTest extends ShellTestCase {
@@ -99,13 +106,13 @@
@Test
public void showInsets_schedulesNoWorkOnExecutor() {
- mPerDisplay.showInsets(ime(), true /* fromIme */, null /* statsToken */);
+ mPerDisplay.showInsets(ime(), true /* fromIme */, ImeTracker.Token.empty());
verifyZeroInteractions(mExecutor);
}
@Test
public void hideInsets_schedulesNoWorkOnExecutor() {
- mPerDisplay.hideInsets(ime(), true /* fromIme */, null /* statsToken */);
+ mPerDisplay.hideInsets(ime(), true /* fromIme */, ImeTracker.Token.empty());
verifyZeroInteractions(mExecutor);
}
diff --git a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/common/DisplayInsetsControllerTest.java b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/common/DisplayInsetsControllerTest.java
index 956f1cd..669e433 100644
--- a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/common/DisplayInsetsControllerTest.java
+++ b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/common/DisplayInsetsControllerTest.java
@@ -50,6 +50,12 @@
import java.util.List;
+/**
+ * Tests for the display insets controller.
+ *
+ * <p> Build/Install/Run:
+ * atest WMShellUnitTests:DisplayInsetsControllerTest
+ */
@SmallTest
public class DisplayInsetsControllerTest extends ShellTestCase {
@@ -114,9 +120,9 @@
mInsetsControllersByDisplayId.get(DEFAULT_DISPLAY).insetsChanged(null);
mInsetsControllersByDisplayId.get(DEFAULT_DISPLAY).insetsControlChanged(null, null);
mInsetsControllersByDisplayId.get(DEFAULT_DISPLAY).showInsets(0, false,
- null /* statsToken */);
+ ImeTracker.Token.empty());
mInsetsControllersByDisplayId.get(DEFAULT_DISPLAY).hideInsets(0, false,
- null /* statsToken */);
+ ImeTracker.Token.empty());
mExecutor.flushAll();
assertTrue(defaultListener.topFocusedWindowChangedCount == 1);
@@ -136,9 +142,9 @@
mInsetsControllersByDisplayId.get(SECOND_DISPLAY).insetsChanged(null);
mInsetsControllersByDisplayId.get(SECOND_DISPLAY).insetsControlChanged(null, null);
mInsetsControllersByDisplayId.get(SECOND_DISPLAY).showInsets(0, false,
- null /* statsToken */);
+ ImeTracker.Token.empty());
mInsetsControllersByDisplayId.get(SECOND_DISPLAY).hideInsets(0, false,
- null /* statsToken */);
+ ImeTracker.Token.empty());
mExecutor.flushAll();
assertTrue(defaultListener.topFocusedWindowChangedCount == 1);
diff --git a/libs/hostgraphics/ADisplay.cpp b/libs/hostgraphics/ADisplay.cpp
new file mode 100644
index 0000000..9cc1f40
--- /dev/null
+++ b/libs/hostgraphics/ADisplay.cpp
@@ -0,0 +1,159 @@
+/*
+ * Copyright 2024 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.
+ */
+
+#include <apex/display.h>
+#include <utils/Errors.h>
+
+namespace android::display::impl {
+
+/**
+ * Implementation of ADisplayConfig
+ */
+struct DisplayConfigImpl {
+ /**
+ * The width in pixels of the display configuration.
+ */
+ int32_t width{1080};
+
+ /**
+ * The height in pixels of the display configuration.
+ */
+
+ int32_t height{1920};
+
+ /**
+ * The refresh rate of the display configuration, in frames per second.
+ */
+ float fps{60.0};
+
+ /**
+ * The vsync offset at which surfaceflinger runs, in nanoseconds.
+ */
+ int64_t sfOffset{0};
+
+ /**
+ * The vsync offset at which applications run, in nanoseconds.
+ */
+ int64_t appOffset{0};
+};
+
+// DisplayConfigImpl allocation is not managed through C++ memory apis, so
+// preventing calling the destructor here.
+static_assert(std::is_trivially_destructible<DisplayConfigImpl>::value);
+
+/**
+ * Implementation of ADisplay
+ */
+struct DisplayImpl {
+ /**
+ * The type of the display, i.e. whether it is an internal or external
+ * display.
+ */
+ ADisplayType type;
+
+ /**
+ * The preferred WCG dataspace
+ */
+ ADataSpace wcgDataspace;
+
+ /**
+ * The preferred WCG pixel format
+ */
+ AHardwareBuffer_Format wcgPixelFormat;
+
+ /**
+ * The config for this display.
+ */
+ DisplayConfigImpl config;
+};
+
+// DisplayImpl allocation is not managed through C++ memory apis, so
+// preventing calling the destructor here.
+static_assert(std::is_trivially_destructible<DisplayImpl>::value);
+
+} // namespace android::display::impl
+
+using namespace android;
+using namespace android::display::impl;
+
+namespace android {
+
+int ADisplay_acquirePhysicalDisplays(ADisplay*** outDisplays) {
+ // This is running on host, so there are no physical displays available.
+ // Create 1 fake display instead.
+ DisplayImpl** const impls = reinterpret_cast<DisplayImpl**>(
+ malloc(sizeof(DisplayImpl*) + sizeof(DisplayImpl)));
+ DisplayImpl* const displayData = reinterpret_cast<DisplayImpl*>(impls + 1);
+
+ displayData[0] = DisplayImpl{ADisplayType::DISPLAY_TYPE_INTERNAL,
+ ADataSpace::ADATASPACE_UNKNOWN,
+ AHardwareBuffer_Format::AHARDWAREBUFFER_FORMAT_R8G8B8A8_UNORM,
+ DisplayConfigImpl()};
+ impls[0] = displayData;
+ *outDisplays = reinterpret_cast<ADisplay**>(impls);
+ return 1;
+}
+
+void ADisplay_release(ADisplay** displays) {
+ if (displays == nullptr) {
+ return;
+ }
+ free(displays);
+}
+
+float ADisplay_getMaxSupportedFps(ADisplay* display) {
+ DisplayImpl* impl = reinterpret_cast<DisplayImpl*>(display);
+ return impl->config.fps;
+}
+
+ADisplayType ADisplay_getDisplayType(ADisplay* display) {
+ return reinterpret_cast<DisplayImpl*>(display)->type;
+}
+
+void ADisplay_getPreferredWideColorFormat(ADisplay* display, ADataSpace* outDataspace,
+ AHardwareBuffer_Format* outPixelFormat) {
+ DisplayImpl* impl = reinterpret_cast<DisplayImpl*>(display);
+ *outDataspace = impl->wcgDataspace;
+ *outPixelFormat = impl->wcgPixelFormat;
+}
+
+int ADisplay_getCurrentConfig(ADisplay* display, ADisplayConfig** outConfig) {
+ DisplayImpl* impl = reinterpret_cast<DisplayImpl*>(display);
+ *outConfig = reinterpret_cast<ADisplayConfig*>(&impl->config);
+ return OK;
+}
+
+int32_t ADisplayConfig_getWidth(ADisplayConfig* config) {
+ return reinterpret_cast<DisplayConfigImpl*>(config)->width;
+}
+
+int32_t ADisplayConfig_getHeight(ADisplayConfig* config) {
+ return reinterpret_cast<DisplayConfigImpl*>(config)->height;
+}
+
+float ADisplayConfig_getFps(ADisplayConfig* config) {
+ return reinterpret_cast<DisplayConfigImpl*>(config)->fps;
+}
+
+int64_t ADisplayConfig_getCompositorOffsetNanos(ADisplayConfig* config) {
+ return reinterpret_cast<DisplayConfigImpl*>(config)->sfOffset;
+}
+
+int64_t ADisplayConfig_getAppVsyncOffsetNanos(ADisplayConfig* config) {
+ return reinterpret_cast<DisplayConfigImpl*>(config)->appOffset;
+}
+
+} // namespace android
diff --git a/libs/hostgraphics/Android.bp b/libs/hostgraphics/Android.bp
index f166fde..4407af6 100644
--- a/libs/hostgraphics/Android.bp
+++ b/libs/hostgraphics/Android.bp
@@ -22,6 +22,7 @@
srcs: [
":libui_host_common",
+ "ADisplay.cpp",
"Fence.cpp",
"HostBufferQueue.cpp",
"PublicFormat.cpp",
@@ -32,16 +33,21 @@
// When frameworks/native/include will be removed from the list of automatic includes.
// We will have to copy necessary headers with a pre-build step (generated headers).
".",
- "frameworks/native/libs/nativebase/include",
- "frameworks/native/libs/nativewindow/include",
"frameworks/native/libs/arect/include",
"frameworks/native/libs/ui/include_private",
],
+
+ header_libs: [
+ "libnativebase_headers",
+ "libnativedisplay_headers",
+ "libnativewindow_headers",
+ ],
+
export_include_dirs: ["."],
target: {
windows: {
enabled: true,
- }
+ },
},
}
diff --git a/libs/hwui/Android.bp b/libs/hwui/Android.bp
index 40239b8..54f94f5 100644
--- a/libs/hwui/Android.bp
+++ b/libs/hwui/Android.bp
@@ -346,6 +346,7 @@
"jni/android_util_PathParser.cpp",
"jni/Bitmap.cpp",
+ "jni/BitmapRegionDecoder.cpp",
"jni/BufferUtils.cpp",
"jni/HardwareBufferHelpers.cpp",
"jni/BitmapFactory.cpp",
@@ -421,7 +422,6 @@
"jni/android_graphics_TextureLayer.cpp",
"jni/android_graphics_HardwareRenderer.cpp",
"jni/android_graphics_HardwareBufferRenderer.cpp",
- "jni/BitmapRegionDecoder.cpp",
"jni/GIFMovie.cpp",
"jni/GraphicsStatsService.cpp",
"jni/Movie.cpp",
@@ -559,8 +559,13 @@
"AnimatorManager.cpp",
"CanvasTransform.cpp",
"DamageAccumulator.cpp",
+ "DeviceInfo.cpp",
+ "FrameInfo.cpp",
+ "FrameInfoVisualizer.cpp",
+ "FrameMetricsReporter.cpp",
"Gainmap.cpp",
"Interpolator.cpp",
+ "JankTracker.cpp",
"LightingInfo.cpp",
"Matrix.cpp",
"Mesh.cpp",
@@ -623,13 +628,8 @@
"utils/NdkUtils.cpp",
"AutoBackendTextureRelease.cpp",
"DeferredLayerUpdater.cpp",
- "DeviceInfo.cpp",
- "FrameInfo.cpp",
- "FrameInfoVisualizer.cpp",
"HardwareBitmapUploader.cpp",
"HWUIProperties.sysprop",
- "JankTracker.cpp",
- "FrameMetricsReporter.cpp",
"Layer.cpp",
"LayerUpdateQueue.cpp",
"ProfileDataContainer.cpp",
@@ -643,7 +643,10 @@
cflags: ["-Wno-implicit-fallthrough"],
},
host: {
- header_libs: ["libnativebase_headers"],
+ header_libs: [
+ "libnativebase_headers",
+ "libnativedisplay_headers",
+ ],
local_include_dirs: ["platform/host"],
@@ -655,7 +658,11 @@
"platform/host/WebViewFunctorManager.cpp",
],
- cflags: ["-Wno-unused-private-field"],
+ cflags: [
+ "-DHWUI_NULL_GPU",
+ "-DNULL_GPU_MAX_TEXTURE_SIZE=4096",
+ "-Wno-unused-private-field",
+ ],
},
},
}
diff --git a/libs/hwui/FrameInfoVisualizer.cpp b/libs/hwui/FrameInfoVisualizer.cpp
index 59f2169..1e53fc2 100644
--- a/libs/hwui/FrameInfoVisualizer.cpp
+++ b/libs/hwui/FrameInfoVisualizer.cpp
@@ -249,6 +249,7 @@
}
void FrameInfoVisualizer::dumpData(int fd) {
+#ifdef __ANDROID__
RETURN_IF_PROFILING_DISABLED();
// This method logs the last N frames (where N is <= mDataSize) since the
@@ -268,6 +269,7 @@
durationMS(i, FrameInfoIndex::IssueDrawCommandsStart, FrameInfoIndex::SwapBuffers),
durationMS(i, FrameInfoIndex::SwapBuffers, FrameInfoIndex::FrameCompleted));
}
+#endif
}
} /* namespace uirenderer */
diff --git a/libs/hwui/JankTracker.cpp b/libs/hwui/JankTracker.cpp
index 4b0ddd2..638a060 100644
--- a/libs/hwui/JankTracker.cpp
+++ b/libs/hwui/JankTracker.cpp
@@ -17,10 +17,10 @@
#include "JankTracker.h"
#include <cutils/ashmem.h>
+#include <cutils/trace.h>
#include <errno.h>
#include <inttypes.h>
#include <log/log.h>
-#include <sys/mman.h>
#include <algorithm>
#include <cmath>
@@ -278,7 +278,7 @@
void JankTracker::dumpData(int fd, const ProfileDataDescription* description,
const ProfileData* data) {
-
+#ifdef __ANDROID__
if (description) {
switch (description->type) {
case JankTrackerType::Generic:
@@ -296,9 +296,11 @@
}
data->dump(fd);
dprintf(fd, "\n");
+#endif
}
void JankTracker::dumpFrames(int fd) {
+#ifdef __ANDROID__
dprintf(fd, "\n\n---PROFILEDATA---\n");
for (size_t i = 0; i < static_cast<size_t>(FrameInfoIndex::NumIndexes); i++) {
dprintf(fd, "%s", FrameInfoNames[i]);
@@ -315,6 +317,7 @@
}
}
dprintf(fd, "\n---PROFILEDATA---\n\n");
+#endif
}
void JankTracker::reset() REQUIRES(mDataMutex) {
diff --git a/libs/hwui/RenderProperties.h b/libs/hwui/RenderProperties.h
index e358b57..b1ad8b2 100644
--- a/libs/hwui/RenderProperties.h
+++ b/libs/hwui/RenderProperties.h
@@ -16,10 +16,22 @@
#pragma once
-#ifdef __ANDROID__ // Layoutlib does not support device info
-#include "DeviceInfo.h"
-#endif // __ANDROID__
+#include <SkBlendMode.h>
+#include <SkCamera.h>
+#include <SkColor.h>
+#include <SkImageFilter.h>
+#include <SkMatrix.h>
+#include <SkRegion.h>
+#include <androidfw/ResourceTypes.h>
+#include <cutils/compiler.h>
+#include <stddef.h>
+#include <utils/Log.h>
+#include <algorithm>
+#include <ostream>
+#include <vector>
+
+#include "DeviceInfo.h"
#include "Outline.h"
#include "Rect.h"
#include "RevealClip.h"
@@ -27,21 +39,6 @@
#include "utils/MathUtils.h"
#include "utils/PaintUtils.h"
-#include <SkBlendMode.h>
-#include <SkImageFilter.h>
-#include <SkCamera.h>
-#include <SkColor.h>
-#include <SkMatrix.h>
-#include <SkRegion.h>
-
-#include <androidfw/ResourceTypes.h>
-#include <cutils/compiler.h>
-#include <stddef.h>
-#include <utils/Log.h>
-#include <algorithm>
-#include <ostream>
-#include <vector>
-
class SkBitmap;
class SkColorFilter;
class SkPaint;
@@ -546,13 +543,9 @@
}
bool fitsOnLayer() const {
-#ifdef __ANDROID__ // Layoutlib does not support device info
const DeviceInfo* deviceInfo = DeviceInfo::get();
return mPrimitiveFields.mWidth <= deviceInfo->maxTextureSize() &&
mPrimitiveFields.mHeight <= deviceInfo->maxTextureSize();
-#else
- return mPrimitiveFields.mWidth <= 4096 && mPrimitiveFields.mHeight <= 4096;
-#endif
}
bool promotedToLayer() const {
diff --git a/libs/hwui/VectorDrawable.cpp b/libs/hwui/VectorDrawable.cpp
index 536ff78..2ea4e3f 100644
--- a/libs/hwui/VectorDrawable.cpp
+++ b/libs/hwui/VectorDrawable.cpp
@@ -16,6 +16,7 @@
#include "VectorDrawable.h"
+#include <gui/TraceUtils.h>
#include <math.h>
#include <string.h>
#include <utils/Log.h>
@@ -26,12 +27,7 @@
#include "SkSamplingOptions.h"
#include "SkScalar.h"
#include "hwui/Paint.h"
-
-#ifdef __ANDROID__
#include "renderthread/RenderThread.h"
-#endif
-
-#include <gui/TraceUtils.h>
#include "utils/Macros.h"
#include "utils/VectorDrawableUtils.h"
diff --git a/packages/Connectivity/framework/src/android/net/ConnectivityAnnotations.java b/packages/Connectivity/framework/src/android/net/ConnectivityAnnotations.java
deleted file mode 100644
index eb1faa0..0000000
--- a/packages/Connectivity/framework/src/android/net/ConnectivityAnnotations.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (C) 2021 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 android.net;
-
-import android.annotation.IntDef;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-
-/**
- * Type annotations for constants used in the connectivity API surface.
- *
- * The annotations are maintained in a separate class so that it can be built as
- * a separate library that other modules can build against, as Typedef should not
- * be exposed as SystemApi.
- *
- * @hide
- */
-public final class ConnectivityAnnotations {
- private ConnectivityAnnotations() {}
-
- @Retention(RetentionPolicy.SOURCE)
- @IntDef(flag = true, value = {
- ConnectivityManager.MULTIPATH_PREFERENCE_HANDOVER,
- ConnectivityManager.MULTIPATH_PREFERENCE_RELIABILITY,
- ConnectivityManager.MULTIPATH_PREFERENCE_PERFORMANCE,
- })
- public @interface MultipathPreference {}
-
- @Retention(RetentionPolicy.SOURCE)
- @IntDef(flag = false, value = {
- ConnectivityManager.RESTRICT_BACKGROUND_STATUS_DISABLED,
- ConnectivityManager.RESTRICT_BACKGROUND_STATUS_WHITELISTED,
- ConnectivityManager.RESTRICT_BACKGROUND_STATUS_ENABLED,
- })
- public @interface RestrictBackgroundStatus {}
-}
diff --git a/packages/CredentialManager/shared/src/com/android/credentialmanager/ktx/CredentialKtx.kt b/packages/CredentialManager/shared/src/com/android/credentialmanager/ktx/CredentialKtx.kt
index e2857f9..83490b8 100644
--- a/packages/CredentialManager/shared/src/com/android/credentialmanager/ktx/CredentialKtx.kt
+++ b/packages/CredentialManager/shared/src/com/android/credentialmanager/ktx/CredentialKtx.kt
@@ -134,6 +134,8 @@
isAutoSelectable = credentialEntry.isAutoSelectAllowed &&
credentialEntry.isAutoSelectAllowedFromOption,
entryGroupId = credentialEntry.entryGroupId.toString(),
+ isDefaultIconPreferredAsSingleProvider =
+ credentialEntry.isDefaultIconPreferredAsSingleProvider,
)
)
}
@@ -158,6 +160,8 @@
isAutoSelectable = credentialEntry.isAutoSelectAllowed &&
credentialEntry.isAutoSelectAllowedFromOption,
entryGroupId = credentialEntry.entryGroupId.toString(),
+ isDefaultIconPreferredAsSingleProvider =
+ credentialEntry.isDefaultIconPreferredAsSingleProvider,
)
)
}
@@ -181,6 +185,8 @@
isAutoSelectable = credentialEntry.isAutoSelectAllowed &&
credentialEntry.isAutoSelectAllowedFromOption,
entryGroupId = credentialEntry.entryGroupId.toString(),
+ isDefaultIconPreferredAsSingleProvider =
+ credentialEntry.isDefaultIconPreferredAsSingleProvider,
)
)
}
diff --git a/packages/CredentialManager/shared/src/com/android/credentialmanager/model/get/CredentialEntryInfo.kt b/packages/CredentialManager/shared/src/com/android/credentialmanager/model/get/CredentialEntryInfo.kt
index a5d4730..9f36096 100644
--- a/packages/CredentialManager/shared/src/com/android/credentialmanager/model/get/CredentialEntryInfo.kt
+++ b/packages/CredentialManager/shared/src/com/android/credentialmanager/model/get/CredentialEntryInfo.kt
@@ -42,6 +42,7 @@
val isAutoSelectable: Boolean,
val entryGroupId: String, // Used for deduplication, and displayed as the grouping title
// "For <value-of-entryGroupId>" on the more-option screen.
+ val isDefaultIconPreferredAsSingleProvider: Boolean,
) : EntryInfo(
providerId,
entryKey,
diff --git a/packages/CredentialManager/src/com/android/credentialmanager/common/ui/RemoteViewsFactory.kt b/packages/CredentialManager/src/com/android/credentialmanager/common/ui/RemoteViewsFactory.kt
index 02afc54..7966a86 100644
--- a/packages/CredentialManager/src/com/android/credentialmanager/common/ui/RemoteViewsFactory.kt
+++ b/packages/CredentialManager/src/com/android/credentialmanager/common/ui/RemoteViewsFactory.kt
@@ -34,9 +34,9 @@
private const val passwordCharacterLength = 15
fun createDropdownPresentation(
- context: Context,
- icon: Icon,
- credentialEntryInfo: CredentialEntryInfo
+ context: Context,
+ icon: Icon,
+ credentialEntryInfo: CredentialEntryInfo
): RemoteViews {
var layoutId: Int = com.android.credentialmanager.R.layout
.credman_dropdown_presentation_layout
@@ -45,41 +45,37 @@
return remoteViews
}
setRemoteViewsPaddings(remoteViews, context, /* primaryTextBottomPadding=*/0)
- if (credentialEntryInfo.credentialType == CredentialType.PASSKEY) {
- val displayName = credentialEntryInfo.displayName ?: credentialEntryInfo.userName
- remoteViews.setTextViewText(android.R.id.text1, displayName)
- val secondaryText = if (credentialEntryInfo.displayName != null)
+ val displayName = credentialEntryInfo.displayName ?: credentialEntryInfo.userName
+ remoteViews.setTextViewText(android.R.id.text1, displayName)
+ val secondaryText =
+ if (credentialEntryInfo.displayName != null
+ && (credentialEntryInfo.displayName != credentialEntryInfo.userName))
(credentialEntryInfo.userName + " " + bulletPoint + " "
+ credentialEntryInfo.credentialTypeDisplayName
+ " " + bulletPoint + " " + credentialEntryInfo.providerDisplayName)
else (credentialEntryInfo.credentialTypeDisplayName + " " + bulletPoint + " "
+ credentialEntryInfo.providerDisplayName)
- remoteViews.setTextViewText(android.R.id.text2, secondaryText)
- } else {
- remoteViews.setTextViewText(android.R.id.text1, credentialEntryInfo.userName)
- remoteViews.setTextViewText(android.R.id.text2,
- bulletPoint.repeat(passwordCharacterLength))
- }
+ remoteViews.setTextViewText(android.R.id.text2, secondaryText)
val textColorPrimary = ContextCompat.getColor(context,
- com.android.credentialmanager.R.color.text_primary)
+ com.android.credentialmanager.R.color.text_primary)
remoteViews.setTextColor(android.R.id.text1, textColorPrimary)
val textColorSecondary = ContextCompat.getColor(context, com.android
.credentialmanager.R.color.text_secondary)
remoteViews.setTextColor(android.R.id.text2, textColorSecondary)
remoteViews.setImageViewIcon(android.R.id.icon1, icon);
remoteViews.setBoolean(
- android.R.id.icon1, setAdjustViewBoundsMethodName, true);
+ android.R.id.icon1, setAdjustViewBoundsMethodName, true);
remoteViews.setInt(
- android.R.id.icon1,
- setMaxHeightMethodName,
- context.resources.getDimensionPixelSize(
- com.android.credentialmanager.R.dimen.autofill_icon_size));
+ android.R.id.icon1,
+ setMaxHeightMethodName,
+ context.resources.getDimensionPixelSize(
+ com.android.credentialmanager.R.dimen.autofill_icon_size));
remoteViews.setContentDescription(android.R.id.icon1, credentialEntryInfo
.providerDisplayName);
val drawableId =
- com.android.credentialmanager.R.drawable.fill_dialog_dynamic_list_item_one
+ com.android.credentialmanager.R.drawable.fill_dialog_dynamic_list_item_one
remoteViews.setInt(
- android.R.id.content, setBackgroundResourceMethodName, drawableId);
+ android.R.id.content, setBackgroundResourceMethodName, drawableId);
return remoteViews
}
@@ -89,68 +85,68 @@
val remoteViews = RemoteViews(context.packageName, layoutId)
setRemoteViewsPaddings(remoteViews, context)
remoteViews.setTextViewText(android.R.id.text1, ContextCompat.getString(context,
- com.android.credentialmanager
- .R.string.dropdown_presentation_more_sign_in_options_text))
+ com.android.credentialmanager
+ .R.string.dropdown_presentation_more_sign_in_options_text))
val textColorPrimary = ContextCompat.getColor(context,
- com.android.credentialmanager.R.color.text_primary)
+ com.android.credentialmanager.R.color.text_primary)
remoteViews.setTextColor(android.R.id.text1, textColorPrimary)
val icon = Icon.createWithResource(context, com
.android.credentialmanager.R.drawable.more_horiz_24px)
icon.setTint(ContextCompat.getColor(context,
- com.android.credentialmanager.R.color.sign_in_options_icon_color))
+ com.android.credentialmanager.R.color.sign_in_options_icon_color))
remoteViews.setImageViewIcon(android.R.id.icon1, icon)
remoteViews.setBoolean(
- android.R.id.icon1, setAdjustViewBoundsMethodName, true);
+ android.R.id.icon1, setAdjustViewBoundsMethodName, true);
remoteViews.setInt(
- android.R.id.icon1,
- setMaxHeightMethodName,
- context.resources.getDimensionPixelSize(
- com.android.credentialmanager.R.dimen.autofill_icon_size));
+ android.R.id.icon1,
+ setMaxHeightMethodName,
+ context.resources.getDimensionPixelSize(
+ com.android.credentialmanager.R.dimen.autofill_icon_size));
val drawableId =
- com.android.credentialmanager.R.drawable.more_options_list_item
+ com.android.credentialmanager.R.drawable.more_options_list_item
remoteViews.setInt(
- android.R.id.content, setBackgroundResourceMethodName, drawableId);
+ android.R.id.content, setBackgroundResourceMethodName, drawableId);
return remoteViews
}
private fun setRemoteViewsPaddings(
- remoteViews: RemoteViews, context: Context) {
+ remoteViews: RemoteViews, context: Context) {
val bottomPadding = context.resources.getDimensionPixelSize(
- com.android.credentialmanager.R.dimen.autofill_view_bottom_padding)
+ com.android.credentialmanager.R.dimen.autofill_view_bottom_padding)
setRemoteViewsPaddings(remoteViews, context, bottomPadding)
}
private fun setRemoteViewsPaddings(
- remoteViews: RemoteViews, context: Context, primaryTextBottomPadding: Int) {
+ remoteViews: RemoteViews, context: Context, primaryTextBottomPadding: Int) {
val leftPadding = context.resources.getDimensionPixelSize(
- com.android.credentialmanager.R.dimen.autofill_view_left_padding)
+ com.android.credentialmanager.R.dimen.autofill_view_left_padding)
val iconToTextPadding = context.resources.getDimensionPixelSize(
- com.android.credentialmanager.R.dimen.autofill_view_icon_to_text_padding)
+ com.android.credentialmanager.R.dimen.autofill_view_icon_to_text_padding)
val rightPadding = context.resources.getDimensionPixelSize(
- com.android.credentialmanager.R.dimen.autofill_view_right_padding)
+ com.android.credentialmanager.R.dimen.autofill_view_right_padding)
val topPadding = context.resources.getDimensionPixelSize(
- com.android.credentialmanager.R.dimen.autofill_view_top_padding)
+ com.android.credentialmanager.R.dimen.autofill_view_top_padding)
val bottomPadding = context.resources.getDimensionPixelSize(
- com.android.credentialmanager.R.dimen.autofill_view_bottom_padding)
+ com.android.credentialmanager.R.dimen.autofill_view_bottom_padding)
remoteViews.setViewPadding(
- android.R.id.icon1,
- leftPadding,
- /* top=*/0,
- /* right=*/0,
- /* bottom=*/0)
+ android.R.id.icon1,
+ leftPadding,
+ /* top=*/0,
+ /* right=*/0,
+ /* bottom=*/0)
remoteViews.setViewPadding(
- android.R.id.text1,
- iconToTextPadding,
- /* top=*/topPadding,
- /* right=*/rightPadding,
- primaryTextBottomPadding)
+ android.R.id.text1,
+ iconToTextPadding,
+ /* top=*/topPadding,
+ /* right=*/rightPadding,
+ primaryTextBottomPadding)
remoteViews.setViewPadding(
- android.R.id.text2,
- iconToTextPadding,
- /* top=*/0,
- /* right=*/rightPadding,
- /* bottom=*/bottomPadding)
+ android.R.id.text2,
+ iconToTextPadding,
+ /* top=*/0,
+ /* right=*/rightPadding,
+ /* bottom=*/bottomPadding)
}
private fun isDarkMode(context: Context): Boolean {
diff --git a/packages/CredentialManager/src/com/android/credentialmanager/getflow/GetCredentialComponents.kt b/packages/CredentialManager/src/com/android/credentialmanager/getflow/GetCredentialComponents.kt
index 660db70..1fef522 100644
--- a/packages/CredentialManager/src/com/android/credentialmanager/getflow/GetCredentialComponents.kt
+++ b/packages/CredentialManager/src/com/android/credentialmanager/getflow/GetCredentialComponents.kt
@@ -41,6 +41,7 @@
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.asImageBitmap
+import androidx.compose.ui.graphics.painter.Painter
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.TextLayoutResult
@@ -399,6 +400,10 @@
)
SheetContainerCard {
val preferTopBrandingContent = requestDisplayInfo.preferTopBrandingContent
+ val singleProviderId = findSingleProviderIdForPrimaryPage(
+ primaryPageCredentialEntryList,
+ primaryPageLockedEntryList
+ )
if (preferTopBrandingContent != null) {
item {
HeadlineProviderIconAndName(
@@ -409,10 +414,6 @@
} else {
// When only one provider's entries will be displayed on the primary page, display that
// provider's icon + name up top.
- val singleProviderId = findSingleProviderIdForPrimaryPage(
- primaryPageCredentialEntryList,
- primaryPageLockedEntryList
- )
if (singleProviderId != null) {
// First should always work but just to be safe.
val providerInfo = providerInfoList.firstOrNull { it.id == singleProviderId }
@@ -479,14 +480,17 @@
CredentialContainerCard {
Column(verticalArrangement = Arrangement.spacedBy(2.dp)) {
primaryPageCredentialEntryList.forEach {
+ val entry = it.sortedCredentialEntryList.first()
CredentialEntryRow(
- credentialEntryInfo = it.sortedCredentialEntryList.first(),
+ credentialEntryInfo = entry,
onEntrySelected = onEntrySelected,
enforceOneLine = true,
onTextLayout = {
showMoreForTruncatedEntry.value = it.hasVisualOverflow
},
hasSingleEntry = hasSingleEntry,
+ shouldOverrideIcon = entry.isDefaultIconPreferredAsSingleProvider &&
+ (singleProviderId != null),
)
}
primaryPageLockedEntryList.forEach {
@@ -750,18 +754,35 @@
onTextLayout: (TextLayoutResult) -> Unit = {},
// Make optional since the secondary page doesn't care about this value.
hasSingleEntry: Boolean? = null,
+ // For primary page only, if all display entries come from the same provider AND if that
+ // provider has opted in via isDefaultIconPreferredAsSingleProvider, then we override the
+ // display icon to the default icon for the given credential type.
+ shouldOverrideIcon: Boolean = false,
) {
val (username, displayName) = if (credentialEntryInfo.credentialType == CredentialType.PASSKEY)
userAndDisplayNameForPasskey(
credentialEntryInfo.userName, credentialEntryInfo.displayName ?: "")
else Pair(credentialEntryInfo.userName, credentialEntryInfo.displayName)
+
+ // For primary page, if
+ val overrideIcon: Painter? =
+ if (shouldOverrideIcon) {
+ when (credentialEntryInfo.credentialType) {
+ CredentialType.PASSKEY -> painterResource(R.drawable.ic_passkey_24)
+ CredentialType.PASSWORD -> painterResource(R.drawable.ic_password_24)
+ else -> painterResource(R.drawable.ic_other_sign_in_24)
+ }
+ } else null
+
Entry(
onClick = { onEntrySelected(credentialEntryInfo) },
- iconImageBitmap = credentialEntryInfo.icon?.toBitmap()?.asImageBitmap(),
+ iconImageBitmap =
+ if (overrideIcon == null) credentialEntryInfo.icon?.toBitmap()?.asImageBitmap() else null,
shouldApplyIconImageBitmapTint = credentialEntryInfo.shouldTintIcon,
// Fall back to iconPainter if iconImageBitmap isn't available
iconPainter =
- if (credentialEntryInfo.icon == null) painterResource(R.drawable.ic_other_sign_in_24)
+ if (overrideIcon != null) overrideIcon
+ else if (credentialEntryInfo.icon == null) painterResource(R.drawable.ic_other_sign_in_24)
else null,
entryHeadlineText = username,
entrySecondLineText =
diff --git a/packages/CredentialManager/tests/robotests/screenshot/src/com/android/credentialmanager/GetCredScreenshotTest.kt b/packages/CredentialManager/tests/robotests/screenshot/src/com/android/credentialmanager/GetCredScreenshotTest.kt
index d9ba36e..94217d0 100644
--- a/packages/CredentialManager/tests/robotests/screenshot/src/com/android/credentialmanager/GetCredScreenshotTest.kt
+++ b/packages/CredentialManager/tests/robotests/screenshot/src/com/android/credentialmanager/GetCredScreenshotTest.kt
@@ -148,6 +148,7 @@
lastUsedTimeMillis = null,
isAutoSelectable = false,
entryGroupId = "username",
+ isDefaultIconPreferredAsSingleProvider = false,
)
),
authenticationEntryList = emptyList(),
diff --git a/packages/EasterEgg/Android.bp b/packages/EasterEgg/Android.bp
index 0caf505..6f4f9ca 100644
--- a/packages/EasterEgg/Android.bp
+++ b/packages/EasterEgg/Android.bp
@@ -48,6 +48,8 @@
},
static_libs: [
+ "easter_egg_flags_lib",
+
"androidx.core_core",
"androidx.annotation_annotation",
"androidx.recyclerview_recyclerview",
@@ -72,3 +74,16 @@
kotlincflags: ["-Xjvm-default=all"],
}
+
+java_aconfig_library {
+ name: "easter_egg_flags_lib",
+ aconfig_declarations: "easter_egg_flags",
+}
+
+aconfig_declarations {
+ name: "easter_egg_flags",
+ package: "com.android.egg.flags",
+ srcs: [
+ "easter_egg_flags.aconfig",
+ ],
+}
diff --git a/packages/EasterEgg/easter_egg_flags.aconfig b/packages/EasterEgg/easter_egg_flags.aconfig
new file mode 100644
index 0000000..3268a4f
--- /dev/null
+++ b/packages/EasterEgg/easter_egg_flags.aconfig
@@ -0,0 +1,8 @@
+package: "com.android.egg.flags"
+
+flag {
+ name: "flag_flag"
+ namespace: "systemui"
+ description: "Flags are planted on planets when you land. Yes, it's a flag for flags."
+ bug: "320150798"
+}
diff --git a/packages/EasterEgg/src/com/android/egg/landroid/Universe.kt b/packages/EasterEgg/src/com/android/egg/landroid/Universe.kt
index fec3ab3..11dce61 100644
--- a/packages/EasterEgg/src/com/android/egg/landroid/Universe.kt
+++ b/packages/EasterEgg/src/com/android/egg/landroid/Universe.kt
@@ -174,7 +174,9 @@
ship = Spacecraft()
- ship.pos = star.pos + Vec2.makeWithAngleMag(PIf / 4, PLANET_ORBIT_RANGE.start)
+ // in the test universe, start the ship near the outermost planet
+ ship.pos = planets.last().pos + Vec2(planets.first().radius * 1.5f, 0f)
+
ship.angle = 0f
add(ship)
diff --git a/packages/EasterEgg/src/com/android/egg/landroid/VisibleUniverse.kt b/packages/EasterEgg/src/com/android/egg/landroid/VisibleUniverse.kt
index 24b9c6a..6baf36e 100644
--- a/packages/EasterEgg/src/com/android/egg/landroid/VisibleUniverse.kt
+++ b/packages/EasterEgg/src/com/android/egg/landroid/VisibleUniverse.kt
@@ -31,6 +31,8 @@
import java.lang.Float.max
import kotlin.math.sqrt
+import com.android.egg.flags.Flags.flagFlag
+
const val DRAW_ORBITS = true
const val DRAW_GRAVITATIONAL_FIELDS = true
const val DRAW_STAR_GRAVITATIONAL_FIELDS = true
@@ -279,8 +281,23 @@
fun ZoomedDrawScope.drawLanding(landing: Landing) {
val v = landing.planet.pos + Vec2.makeWithAngleMag(landing.angle, landing.planet.radius)
- drawLine(Color.Red, v + Vec2(-5f, -5f), v + Vec2(5f, 5f), strokeWidth = 1f / zoom)
- drawLine(Color.Red, v + Vec2(5f, -5f), v + Vec2(-5f, 5f), strokeWidth = 1f / zoom)
+
+ if (flagFlag()) {
+ val strokeWidth = 2f / zoom
+ val height = 80f
+ rotateRad(landing.angle, pivot = v) {
+ translate(v.x, v.y) {
+ drawPath(
+ Path().apply {
+ moveTo(0f, 0f)
+ lineTo(height, 0f)
+ lineTo(height * 0.875f, height * 0.25f)
+ lineTo(height * 0.75f, 0f)
+ close()
+ }, Color.Yellow, style = Stroke(width = strokeWidth))
+ }
+ }
+ }
}
fun ZoomedDrawScope.drawSpark(spark: Spark) {
diff --git a/packages/PackageInstaller/res/values-el/strings.xml b/packages/PackageInstaller/res/values-el/strings.xml
index 61aa4e6..3c37df6 100644
--- a/packages/PackageInstaller/res/values-el/strings.xml
+++ b/packages/PackageInstaller/res/values-el/strings.xml
@@ -117,7 +117,7 @@
<string name="unarchive_error_generic_title" msgid="7123457671482449992">"Κάτι πήγε στραβά"</string>
<string name="unarchive_error_generic_body" msgid="4486803312463813079">"Παρουσιάστηκε κάποιο πρόβλημα κατά την επαναφορά αυτής της εφαρμογής"</string>
<string name="unarchive_error_storage_title" msgid="5080723357273852630">"Δεν επαρκεί ο αποθηκευτικός χώρος"</string>
- <string name="unarchive_error_storage_body" msgid="6879544407568780524">"Για να επαναφέρετε αυτή την εφαρμογή, μπορείτε να ελευθερώσετε χώρο στη συσκευή. Απαιτούμενος αποθηκευτικός χώρος: <xliff:g id="BYTES">%1$s</xliff:g>"</string>
+ <string name="unarchive_error_storage_body" msgid="6879544407568780524">"Για να επαναφέρετε αυτή την εφαρμογή, μπορείτε να αποδεσμεύσετε χώρο στη συσκευή. Απαιτούμενος αποθηκευτικός χώρος: <xliff:g id="BYTES">%1$s</xliff:g>"</string>
<string name="unarchive_action_required_title" msgid="4971245740162604619">"Απαιτούμενη ενέργεια"</string>
<string name="unarchive_action_required_body" msgid="1679431572983989231">"Ακολουθήστε τα επόμενα βήματα για να επαναφέρετε αυτή την εφαρμογή"</string>
<string name="unarchive_error_installer_disabled_title" msgid="4815715617014985605">"Το <xliff:g id="INSTALLERNAME">%1$s</xliff:g> είναι απενεργοποιημένο"</string>
diff --git a/packages/SettingsLib/DataStore/Android.bp b/packages/SettingsLib/DataStore/Android.bp
new file mode 100644
index 0000000..868a4a5
--- /dev/null
+++ b/packages/SettingsLib/DataStore/Android.bp
@@ -0,0 +1,16 @@
+package {
+ default_applicable_licenses: ["frameworks_base_license"],
+}
+
+android_library {
+ name: "SettingsLibDataStore",
+ defaults: [
+ "SettingsLintDefaults",
+ ],
+ srcs: ["src/**/*"],
+ static_libs: [
+ "androidx.annotation_annotation",
+ "androidx.collection_collection-ktx",
+ "guava",
+ ],
+}
diff --git a/packages/SettingsLib/DataStore/AndroidManifest.xml b/packages/SettingsLib/DataStore/AndroidManifest.xml
new file mode 100644
index 0000000..fb44627
--- /dev/null
+++ b/packages/SettingsLib/DataStore/AndroidManifest.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.android.settingslib.datastore">
+
+ <uses-sdk android:minSdkVersion="21" />
+</manifest>
diff --git a/packages/SettingsLib/DataStore/src/com/android/settingslib/datastore/BackupRestoreContext.kt b/packages/SettingsLib/DataStore/src/com/android/settingslib/datastore/BackupRestoreContext.kt
new file mode 100644
index 0000000..c6d6f77
--- /dev/null
+++ b/packages/SettingsLib/DataStore/src/com/android/settingslib/datastore/BackupRestoreContext.kt
@@ -0,0 +1,72 @@
+/*
+ * Copyright (C) 2024 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.settingslib.datastore
+
+import android.app.backup.BackupAgent
+import android.app.backup.BackupDataOutput
+import android.app.backup.BackupHelper
+import android.os.Build
+import android.os.ParcelFileDescriptor
+import androidx.annotation.RequiresApi
+
+/**
+ * Context for backup.
+ *
+ * @see BackupHelper.performBackup
+ * @see BackupDataOutput
+ */
+class BackupContext
+internal constructor(
+ /**
+ * An open, read-only file descriptor pointing to the last backup state provided by the
+ * application. May be null, in which case no prior state is being provided and the application
+ * should perform a full backup.
+ *
+ * TODO: the state should support marshall/unmarshall for incremental back up.
+ */
+ val oldState: ParcelFileDescriptor?,
+
+ /** An open, read/write BackupDataOutput pointing to the backup data destination. */
+ private val data: BackupDataOutput,
+
+ /**
+ * An open, read/write file descriptor pointing to an empty file. The application should record
+ * the final backup.
+ */
+ val newState: ParcelFileDescriptor,
+) {
+ /**
+ * The quota in bytes for the application's current backup operation.
+ *
+ * @see [BackupDataOutput.getQuota]
+ */
+ val quota: Long
+ @RequiresApi(Build.VERSION_CODES.O) get() = data.quota
+
+ /**
+ * Additional information about the backup transport.
+ *
+ * See [BackupAgent] for supported flags.
+ *
+ * @see [BackupDataOutput.getTransportFlags]
+ */
+ val transportFlags: Int
+ @RequiresApi(Build.VERSION_CODES.P) get() = data.transportFlags
+}
+
+/** Context for restore. */
+class RestoreContext(val key: String)
diff --git a/packages/SettingsLib/DataStore/src/com/android/settingslib/datastore/BackupRestoreEntity.kt b/packages/SettingsLib/DataStore/src/com/android/settingslib/datastore/BackupRestoreEntity.kt
new file mode 100644
index 0000000..6a7ef5a
--- /dev/null
+++ b/packages/SettingsLib/DataStore/src/com/android/settingslib/datastore/BackupRestoreEntity.kt
@@ -0,0 +1,69 @@
+/*
+ * Copyright (C) 2024 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.settingslib.datastore
+
+import android.app.backup.BackupDataOutput
+import android.app.backup.BackupHelper
+import androidx.annotation.BinderThread
+import java.io.IOException
+import java.io.InputStream
+import java.io.OutputStream
+
+/** Entity for back up and restore. */
+interface BackupRestoreEntity {
+ /**
+ * Key of the entity.
+ *
+ * The key string must be unique within the data set. Note that it is invalid if the first
+ * character is \uFF00 or higher.
+ *
+ * @see BackupDataOutput.writeEntityHeader
+ */
+ val key: String
+
+ /**
+ * Backs up the entity.
+ *
+ * @param backupContext context for backup
+ * @param outputStream output stream to back up data
+ * @return false if backup file is deleted, otherwise true
+ */
+ @BinderThread
+ @Throws(IOException::class)
+ fun backup(backupContext: BackupContext, outputStream: OutputStream): EntityBackupResult
+
+ /**
+ * Restores the entity.
+ *
+ * @param restoreContext context for restore
+ * @param inputStream An open input stream from which the backup data can be read.
+ * @see BackupHelper.restoreEntity
+ */
+ @BinderThread
+ @Throws(IOException::class)
+ fun restore(restoreContext: RestoreContext, inputStream: InputStream)
+}
+
+/** Result of the backup operation. */
+enum class EntityBackupResult {
+ /** Update the entity. */
+ UPDATE,
+ /** Leave the entity intact. */
+ INTACT,
+ /** Delete the entity. */
+ DELETE,
+}
diff --git a/packages/SettingsLib/DataStore/src/com/android/settingslib/datastore/BackupRestoreStorage.kt b/packages/SettingsLib/DataStore/src/com/android/settingslib/datastore/BackupRestoreStorage.kt
new file mode 100644
index 0000000..88d9dd6
--- /dev/null
+++ b/packages/SettingsLib/DataStore/src/com/android/settingslib/datastore/BackupRestoreStorage.kt
@@ -0,0 +1,140 @@
+/*
+ * Copyright (C) 2024 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.settingslib.datastore
+
+import android.app.backup.BackupAgentHelper
+import android.app.backup.BackupDataInputStream
+import android.app.backup.BackupDataOutput
+import android.app.backup.BackupHelper
+import android.os.ParcelFileDescriptor
+import android.util.Log
+import com.google.common.io.ByteStreams
+import java.io.ByteArrayOutputStream
+import java.io.FilterInputStream
+import java.io.InputStream
+import java.io.OutputStream
+
+internal const val LOG_TAG = "BackupRestoreStorage"
+
+/**
+ * Storage with backup and restore support. Subclass must implement either [Observable] or
+ * [KeyedObservable] interface.
+ *
+ * The storage is identified by a unique string [name] and data set is split into entities
+ * ([BackupRestoreEntity]).
+ */
+abstract class BackupRestoreStorage : BackupHelper {
+ /**
+ * A unique string used to disambiguate the various storages within backup agent.
+ *
+ * It will be used as the `keyPrefix` of [BackupAgentHelper.addHelper].
+ */
+ abstract val name: String
+
+ private val entities: List<BackupRestoreEntity> by lazy { createBackupRestoreEntities() }
+
+ /** Entities to back up and restore. */
+ abstract fun createBackupRestoreEntities(): List<BackupRestoreEntity>
+
+ override fun performBackup(
+ oldState: ParcelFileDescriptor?,
+ data: BackupDataOutput,
+ newState: ParcelFileDescriptor,
+ ) {
+ val backupContext = BackupContext(oldState, data, newState)
+ if (!enableBackup(backupContext)) {
+ Log.i(LOG_TAG, "[$name] Backup disabled")
+ return
+ }
+ Log.i(LOG_TAG, "[$name] Backup start")
+ for (entity in entities) {
+ val key = entity.key
+ val outputStream = ByteArrayOutputStream()
+ val result =
+ try {
+ entity.backup(backupContext, wrapBackupOutputStream(outputStream))
+ } catch (exception: Exception) {
+ Log.e(LOG_TAG, "[$name] Fail to backup entity $key", exception)
+ continue
+ }
+ when (result) {
+ EntityBackupResult.UPDATE -> {
+ val payload = outputStream.toByteArray()
+ val size = payload.size
+ data.writeEntityHeader(key, size)
+ data.writeEntityData(payload, size)
+ Log.i(LOG_TAG, "[$name] Backup entity $key: $size bytes")
+ }
+ EntityBackupResult.INTACT -> {
+ Log.i(LOG_TAG, "[$name] Backup entity $key intact")
+ }
+ EntityBackupResult.DELETE -> {
+ data.writeEntityHeader(key, -1)
+ Log.i(LOG_TAG, "[$name] Backup entity $key deleted")
+ }
+ }
+ }
+ Log.i(LOG_TAG, "[$name] Backup end")
+ }
+
+ /** Returns if backup is enabled. */
+ open fun enableBackup(backupContext: BackupContext): Boolean = true
+
+ fun wrapBackupOutputStream(outputStream: OutputStream): OutputStream {
+ return outputStream
+ }
+
+ override fun restoreEntity(data: BackupDataInputStream) {
+ val key = data.key
+ if (!enableRestore()) {
+ Log.i(LOG_TAG, "[$name] Restore disabled, ignore entity $key")
+ return
+ }
+ val entity = entities.firstOrNull { it.key == key }
+ if (entity == null) {
+ Log.w(LOG_TAG, "[$name] Cannot find handler for entity $key")
+ return
+ }
+ Log.i(LOG_TAG, "[$name] Restore $key: ${data.size()} bytes")
+ val restoreContext = RestoreContext(key)
+ try {
+ entity.restore(restoreContext, wrapRestoreInputStream(data))
+ } catch (exception: Exception) {
+ Log.e(LOG_TAG, "[$name] Fail to restore entity $key", exception)
+ }
+ }
+
+ /** Returns if restore is enabled. */
+ open fun enableRestore(): Boolean = true
+
+ fun wrapRestoreInputStream(inputStream: BackupDataInputStream): InputStream {
+ return LimitedNoCloseInputStream(inputStream)
+ }
+
+ override fun writeNewStateDescription(newState: ParcelFileDescriptor) {}
+}
+
+/**
+ * Wrapper of [BackupDataInputStream], limiting the number of bytes that can be read and make
+ * [close] no-op.
+ */
+class LimitedNoCloseInputStream(inputStream: BackupDataInputStream) :
+ FilterInputStream(ByteStreams.limit(inputStream, inputStream.size().toLong())) {
+ override fun close() {
+ // do not close original input stream
+ }
+}
diff --git a/packages/SettingsLib/DataStore/src/com/android/settingslib/datastore/BackupRestoreStorageManager.kt b/packages/SettingsLib/DataStore/src/com/android/settingslib/datastore/BackupRestoreStorageManager.kt
new file mode 100644
index 0000000..221e2e8
--- /dev/null
+++ b/packages/SettingsLib/DataStore/src/com/android/settingslib/datastore/BackupRestoreStorageManager.kt
@@ -0,0 +1,153 @@
+/*
+ * Copyright (C) 2024 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.settingslib.datastore
+
+import android.app.Application
+import android.app.backup.BackupAgentHelper
+import android.app.backup.BackupManager
+import android.content.Context
+import android.util.Log
+import com.google.common.util.concurrent.MoreExecutors
+import java.util.concurrent.ConcurrentHashMap
+
+/** Manager of [BackupRestoreStorage]. */
+class BackupRestoreStorageManager private constructor(private val application: Application) {
+ private val storages = ConcurrentHashMap<String, BackupRestoreStorage>()
+
+ private val executor = MoreExecutors.directExecutor()
+
+ private val observer = Observer { reason -> notifyBackupManager(null, reason) }
+
+ private val keyedObserver =
+ KeyedObserver<Any?> { key, reason -> notifyBackupManager(key, reason) }
+
+ private fun notifyBackupManager(key: Any?, reason: Int) {
+ // prefer not triggering backup immediately after restore
+ if (reason == ChangeReason.RESTORE) return
+ // TODO: log storage name
+ Log.d(LOG_TAG, "Notify BackupManager data changed for change: key=$key")
+ BackupManager.dataChanged(application.packageName)
+ }
+
+ /**
+ * Adds all the registered [BackupRestoreStorage] as the helpers of given [BackupAgentHelper].
+ *
+ * @see BackupAgentHelper.addHelper
+ */
+ fun addBackupAgentHelpers(backupAgentHelper: BackupAgentHelper) {
+ for ((keyPrefix, storage) in storages) {
+ backupAgentHelper.addHelper(keyPrefix, storage)
+ }
+ }
+
+ /**
+ * Callback when restore finished.
+ *
+ * The observers of the storages will be notified.
+ */
+ fun onRestoreFinished() {
+ for (storage in storages.values) {
+ storage.notifyRestoreFinished()
+ }
+ }
+
+ private fun BackupRestoreStorage.notifyRestoreFinished() {
+ when (this) {
+ is KeyedObservable<*> -> notifyChange(ChangeReason.RESTORE)
+ is Observable -> notifyChange(ChangeReason.RESTORE)
+ }
+ }
+
+ /**
+ * Adds a list of storages.
+ *
+ * The storage MUST implement [KeyedObservable] or [Observable].
+ */
+ fun add(vararg storages: BackupRestoreStorage) {
+ for (storage in storages) add(storage)
+ }
+
+ /**
+ * Adds a storage.
+ *
+ * The storage MUST implement [KeyedObservable] or [Observable].
+ */
+ fun add(storage: BackupRestoreStorage) {
+ val name = storage.name
+ val oldStorage = storages.put(name, storage)
+ if (oldStorage != null) {
+ throw IllegalStateException(
+ "Storage name '$name' conflicts:\n\told: $oldStorage\n\tnew: $storage"
+ )
+ }
+ storage.addObserver()
+ }
+
+ private fun BackupRestoreStorage.addObserver() {
+ when (this) {
+ is KeyedObservable<*> -> addObserver(keyedObserver, executor)
+ is Observable -> addObserver(observer, executor)
+ else ->
+ throw IllegalArgumentException(
+ "$this does not implement either KeyedObservable or Observable"
+ )
+ }
+ }
+
+ /** Removes all the storages. */
+ fun removeAll() {
+ for ((name, _) in storages) remove(name)
+ }
+
+ /** Removes storage with given name. */
+ fun remove(name: String): BackupRestoreStorage? {
+ val storage = storages.remove(name)
+ storage?.removeObserver()
+ return storage
+ }
+
+ private fun BackupRestoreStorage.removeObserver() {
+ when (this) {
+ is KeyedObservable<*> -> removeObserver(keyedObserver)
+ is Observable -> removeObserver(observer)
+ }
+ }
+
+ /** Returns storage with given name. */
+ fun get(name: String): BackupRestoreStorage? = storages[name]
+
+ /** Returns storage with given name, exception is raised if not found. */
+ fun getOrThrow(name: String): BackupRestoreStorage = storages[name]!!
+
+ companion object {
+ @Volatile private var instance: BackupRestoreStorageManager? = null
+
+ /** Returns the singleton of manager. */
+ @JvmStatic
+ fun getInstance(context: Context): BackupRestoreStorageManager {
+ val result = instance
+ if (result != null) return result
+ synchronized(this) {
+ if (instance == null) {
+ instance =
+ BackupRestoreStorageManager(context.applicationContext as Application)
+ }
+ }
+ return instance!!
+ }
+ }
+}
diff --git a/packages/SettingsLib/DataStore/src/com/android/settingslib/datastore/KeyedObserver.kt b/packages/SettingsLib/DataStore/src/com/android/settingslib/datastore/KeyedObserver.kt
new file mode 100644
index 0000000..3ed4d46
--- /dev/null
+++ b/packages/SettingsLib/DataStore/src/com/android/settingslib/datastore/KeyedObserver.kt
@@ -0,0 +1,183 @@
+/*
+ * Copyright (C) 2024 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.settingslib.datastore
+
+import androidx.annotation.AnyThread
+import androidx.annotation.GuardedBy
+import androidx.collection.MutableScatterMap
+import java.util.WeakHashMap
+import java.util.concurrent.Executor
+
+/**
+ * Callback to be informed of changes in [KeyedObservable] object.
+ *
+ * The observer is weakly referenced, a strong reference must be kept.
+ */
+fun interface KeyedObserver<in K> {
+ /**
+ * Called by [KeyedObservable] in the event of changes.
+ *
+ * This callback will run in the given [Executor] when observer is added.
+ *
+ * @param key key that has been changed
+ * @param reason the reason of change
+ * @see KeyedObservable.addObserver
+ */
+ fun onKeyChanged(key: K, @ChangeReason reason: Int)
+}
+
+/**
+ * A key-value observable object allows to observe change with [KeyedObserver].
+ *
+ * Notes:
+ * - The order in which observers will be notified is unspecified.
+ * - The observer is weakly referenced to avoid memory leaking, the call site must keep a strong
+ * reference of the observer.
+ * - It is possible that the callback may be triggered even there is no real data change. For
+ * example, when data restore/clear happens, it might be too complex to check if data is really
+ * changed, thus all the registered observers are notified directly.
+ */
+@AnyThread
+interface KeyedObservable<K> {
+ /**
+ * Adds an observer for any key.
+ *
+ * The observer will be notified whenever a change happens. The [KeyedObserver.onKeyChanged]
+ * callback will be invoked with specific key that is modified. However, `null` key is passed in
+ * the cases that a bunch of keys are changed simultaneously (e.g. clear data, restore happens).
+ *
+ * @param observer observer to be notified
+ * @param executor executor to run the callback
+ */
+ fun addObserver(observer: KeyedObserver<K?>, executor: Executor)
+
+ /**
+ * Adds an observer on given key.
+ *
+ * The observer will be notified only when the given key is changed.
+ *
+ * @param key key to observe
+ * @param observer observer to be notified
+ * @param executor executor to run the callback
+ */
+ fun addObserver(key: K, observer: KeyedObserver<K>, executor: Executor)
+
+ /** Removes observer. */
+ fun removeObserver(observer: KeyedObserver<K?>)
+
+ /** Removes observer on given key. */
+ fun removeObserver(key: K, observer: KeyedObserver<K>)
+
+ /**
+ * Notifies all observers that a change occurs.
+ *
+ * All the any key and keyed observers are notified.
+ *
+ * @param reason reason of the change
+ */
+ fun notifyChange(@ChangeReason reason: Int)
+
+ /**
+ * Notifies observers that a change occurs on given key.
+ *
+ * The any key and specific key observers are notified.
+ *
+ * @param key key of the change
+ * @param reason reason of the change
+ */
+ fun notifyChange(key: K, @ChangeReason reason: Int)
+}
+
+/** A thread safe implementation of [KeyedObservable]. */
+class KeyedDataObservable<K> : KeyedObservable<K> {
+ // Instead of @GuardedBy("this"), guarded by itself because KeyedDataObservable object could be
+ // synchronized outside by the holder
+ @GuardedBy("itself") private val observers = WeakHashMap<KeyedObserver<K?>, Executor>()
+
+ @GuardedBy("itself")
+ private val keyedObservers = MutableScatterMap<K, WeakHashMap<KeyedObserver<K>, Executor>>()
+
+ override fun addObserver(observer: KeyedObserver<K?>, executor: Executor) {
+ val oldExecutor = synchronized(observers) { observers.put(observer, executor) }
+ if (oldExecutor != null && oldExecutor != executor) {
+ throw IllegalStateException("Add $observer twice, old=$oldExecutor, new=$executor")
+ }
+ }
+
+ override fun addObserver(key: K, observer: KeyedObserver<K>, executor: Executor) {
+ val oldExecutor =
+ synchronized(keyedObservers) {
+ keyedObservers.getOrPut(key) { WeakHashMap() }.put(observer, executor)
+ }
+ if (oldExecutor != null && oldExecutor != executor) {
+ throw IllegalStateException("Add $observer twice, old=$oldExecutor, new=$executor")
+ }
+ }
+
+ override fun removeObserver(observer: KeyedObserver<K?>) {
+ synchronized(observers) { observers.remove(observer) }
+ }
+
+ override fun removeObserver(key: K, observer: KeyedObserver<K>) {
+ synchronized(keyedObservers) {
+ val observers = keyedObservers[key]
+ if (observers?.remove(observer) != null && observers.isEmpty()) {
+ keyedObservers.remove(key)
+ }
+ }
+ }
+
+ override fun notifyChange(@ChangeReason reason: Int) {
+ // make a copy to avoid potential ConcurrentModificationException
+ val observers = synchronized(observers) { observers.entries.toTypedArray() }
+ val keyedObservers = synchronized(keyedObservers) { keyedObservers.copy() }
+ for (entry in observers) {
+ val observer = entry.key // avoid reference "entry"
+ entry.value.execute { observer.onKeyChanged(null, reason) }
+ }
+ for (pair in keyedObservers) {
+ val key = pair.first
+ for (entry in pair.second) {
+ val observer = entry.key // avoid reference "entry"
+ entry.value.execute { observer.onKeyChanged(key, reason) }
+ }
+ }
+ }
+
+ private fun MutableScatterMap<K, WeakHashMap<KeyedObserver<K>, Executor>>.copy():
+ List<Pair<K, Array<Map.Entry<KeyedObserver<K>, Executor>>>> {
+ val result = ArrayList<Pair<K, Array<Map.Entry<KeyedObserver<K>, Executor>>>>(size)
+ forEach { key, value -> result.add(Pair(key, value.entries.toTypedArray())) }
+ return result
+ }
+
+ override fun notifyChange(key: K, @ChangeReason reason: Int) {
+ // make a copy to avoid potential ConcurrentModificationException
+ val observers = synchronized(observers) { observers.entries.toTypedArray() }
+ val keyedObservers =
+ synchronized(keyedObservers) { keyedObservers[key]?.entries?.toTypedArray() }
+ ?: arrayOf()
+ for (entry in observers) {
+ val observer = entry.key // avoid reference "entry"
+ entry.value.execute { observer.onKeyChanged(key, reason) }
+ }
+ for (entry in keyedObservers) {
+ val observer = entry.key // avoid reference "entry"
+ entry.value.execute { observer.onKeyChanged(key, reason) }
+ }
+ }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/scene/shared/model/TransitionKey.kt b/packages/SettingsLib/DataStore/src/com/android/settingslib/datastore/ObservableBackupRestoreStorage.kt
similarity index 66%
rename from packages/SystemUI/src/com/android/systemui/scene/shared/model/TransitionKey.kt
rename to packages/SettingsLib/DataStore/src/com/android/settingslib/datastore/ObservableBackupRestoreStorage.kt
index 87332ae..0e399c0 100644
--- a/packages/SystemUI/src/com/android/systemui/scene/shared/model/TransitionKey.kt
+++ b/packages/SettingsLib/DataStore/src/com/android/settingslib/datastore/ObservableBackupRestoreStorage.kt
@@ -14,13 +14,12 @@
* limitations under the License.
*/
-package com.android.systemui.scene.shared.model
+package com.android.settingslib.datastore
/**
- * Key for a transition. This can be used to specify which transition spec should be used when
- * starting the transition between two scenes.
+ * A [BackupRestoreStorage] that implements [Observable].
+ *
+ * This class provides the [Observable] implementations on top of [DataObservable] by delegation.
*/
-data class TransitionKey(
- val debugName: String,
- val identity: Any = Object(),
-)
+abstract class ObservableBackupRestoreStorage :
+ BackupRestoreStorage(), Observable by DataObservable()
diff --git a/packages/SettingsLib/DataStore/src/com/android/settingslib/datastore/Observer.kt b/packages/SettingsLib/DataStore/src/com/android/settingslib/datastore/Observer.kt
new file mode 100644
index 0000000..6d0ca669
--- /dev/null
+++ b/packages/SettingsLib/DataStore/src/com/android/settingslib/datastore/Observer.kt
@@ -0,0 +1,121 @@
+/*
+ * Copyright (C) 2024 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.settingslib.datastore
+
+import androidx.annotation.AnyThread
+import androidx.annotation.GuardedBy
+import androidx.annotation.IntDef
+import java.util.WeakHashMap
+import java.util.concurrent.Executor
+
+/** The reason of a change. */
+@IntDef(
+ ChangeReason.UNKNOWN,
+ ChangeReason.UPDATE,
+ ChangeReason.DELETE,
+ ChangeReason.RESTORE,
+ ChangeReason.SYNC_ACROSS_PROFILES,
+)
+@Retention(AnnotationRetention.SOURCE)
+annotation class ChangeReason {
+ companion object {
+ /** Unknown reason of the change. */
+ const val UNKNOWN = 0
+ /** Data is updated. */
+ const val UPDATE = 1
+ /** Data is deleted. */
+ const val DELETE = 2
+ /** Data is restored from backup/restore framework. */
+ const val RESTORE = 3
+ /** Data is synced from another profile (e.g. personal profile to work profile). */
+ const val SYNC_ACROSS_PROFILES = 4
+ }
+}
+
+/**
+ * Callback to be informed of changes in [Observable] object.
+ *
+ * The observer is weakly referenced, a strong reference must be kept.
+ */
+fun interface Observer {
+ /**
+ * Called by [Observable] in the event of changes.
+ *
+ * This callback will run in the given [Executor] when observer is added.
+ *
+ * @param reason the reason of change
+ * @see [Observable.addObserver] for the notices.
+ */
+ fun onChanged(@ChangeReason reason: Int)
+}
+
+/** An observable object allows to observe change with [Observer]. */
+@AnyThread
+interface Observable {
+ /**
+ * Adds an observer.
+ *
+ * Notes:
+ * - The order in which observers will be notified is unspecified.
+ * - The observer is weakly referenced to avoid memory leaking, the call site must keep a strong
+ * reference of the observer.
+ * - It is possible that the callback may be triggered even there is no real data change. For
+ * example, when data restore/clear happens, it might be too complex to check if data is
+ * really changed, thus all the registered observers are notified directly.
+ *
+ * @param observer observer to be notified
+ * @param executor executor to run the [Observer.onChanged] callback
+ */
+ fun addObserver(observer: Observer, executor: Executor)
+
+ /** Removes given observer. */
+ fun removeObserver(observer: Observer)
+
+ /**
+ * Notifies observers that a change occurs.
+ *
+ * @param reason reason of the change
+ */
+ fun notifyChange(@ChangeReason reason: Int)
+}
+
+/** A thread safe implementation of [Observable]. */
+class DataObservable : Observable {
+ // Instead of @GuardedBy("this"), guarded by itself because DataObservable object could be
+ // synchronized outside by the holder
+ @GuardedBy("itself") private val observers = WeakHashMap<Observer, Executor>()
+
+ override fun addObserver(observer: Observer, executor: Executor) {
+ val oldExecutor = synchronized(observers) { observers.put(observer, executor) }
+ if (oldExecutor != null && oldExecutor != executor) {
+ throw IllegalStateException("Add $observer twice, old=$oldExecutor, new=$executor")
+ }
+ }
+
+ override fun removeObserver(observer: Observer) {
+ synchronized(observers) { observers.remove(observer) }
+ }
+
+ override fun notifyChange(@ChangeReason reason: Int) {
+ // make a copy to avoid potential ConcurrentModificationException
+ val entries = synchronized(observers) { observers.entries.toTypedArray() }
+ for (entry in entries) {
+ val observer = entry.key // avoid reference "entry"
+ entry.value.execute { observer.onChanged(reason) }
+ }
+ }
+}
diff --git a/packages/SettingsLib/res/values-af/strings.xml b/packages/SettingsLib/res/values-af/strings.xml
index 7245099c..cc23f6e 100644
--- a/packages/SettingsLib/res/values-af/strings.xml
+++ b/packages/SettingsLib/res/values-af/strings.xml
@@ -457,8 +457,7 @@
<string name="daltonizer_type_overridden" msgid="4509604753672535721">"Geneutraliseer deur <xliff:g id="TITLE">%1$s</xliff:g>"</string>
<string name="power_remaining_settings_home_page" msgid="4885165789445462557">"<xliff:g id="PERCENTAGE">%1$s</xliff:g> – <xliff:g id="TIME_STRING">%2$s</xliff:g>"</string>
<string name="power_charging_on_hold_settings_home_page" msgid="7690464049464805856">"<xliff:g id="LEVEL">%1$s</xliff:g> – Laaiproses is onderbreek om battery te beskerm"</string>
- <!-- no translation found for power_incompatible_charging_settings_home_page (1322050766135126880) -->
- <skip />
+ <string name="power_incompatible_charging_settings_home_page" msgid="1322050766135126880">"<xliff:g id="LEVEL">%1$s</xliff:g> - Gaan die laaibykomstigheid na"</string>
<string name="power_remaining_duration_only" msgid="8264199158671531431">"Ongeveer <xliff:g id="TIME_REMAINING">%1$s</xliff:g> oor"</string>
<string name="power_discharging_duration" msgid="1076561255466053220">"Ongeveer <xliff:g id="TIME_REMAINING">%1$s</xliff:g> oor (<xliff:g id="LEVEL">%2$s</xliff:g>)"</string>
<string name="power_remaining_duration_only_enhanced" msgid="2527842780666073218">"Ongeveer <xliff:g id="TIME_REMAINING">%1$s</xliff:g> oor gegrond op jou gebruik"</string>
diff --git a/packages/SettingsLib/res/values-am/strings.xml b/packages/SettingsLib/res/values-am/strings.xml
index dc91df0..0ecd376 100644
--- a/packages/SettingsLib/res/values-am/strings.xml
+++ b/packages/SettingsLib/res/values-am/strings.xml
@@ -457,8 +457,7 @@
<string name="daltonizer_type_overridden" msgid="4509604753672535721">"በ<xliff:g id="TITLE">%1$s</xliff:g> ተሽሯል"</string>
<string name="power_remaining_settings_home_page" msgid="4885165789445462557">"<xliff:g id="PERCENTAGE">%1$s</xliff:g> - <xliff:g id="TIME_STRING">%2$s</xliff:g>"</string>
<string name="power_charging_on_hold_settings_home_page" msgid="7690464049464805856">"<xliff:g id="LEVEL">%1$s</xliff:g> - ባትሪን ለመጠበቅ ኃይል መሙላት በይቆይ ላይ"</string>
- <!-- no translation found for power_incompatible_charging_settings_home_page (1322050766135126880) -->
- <skip />
+ <string name="power_incompatible_charging_settings_home_page" msgid="1322050766135126880">"<xliff:g id="LEVEL">%1$s</xliff:g> - የኃይል መሙላት መለዋወጫን ይፈትሹ"</string>
<string name="power_remaining_duration_only" msgid="8264199158671531431">"<xliff:g id="TIME_REMAINING">%1$s</xliff:g> ገደማ ቀርቷል"</string>
<string name="power_discharging_duration" msgid="1076561255466053220">"<xliff:g id="TIME_REMAINING">%1$s</xliff:g> (<xliff:g id="LEVEL">%2$s</xliff:g>) ገደማ ቀርቷል"</string>
<string name="power_remaining_duration_only_enhanced" msgid="2527842780666073218">"በአጠቃቀምዎ መሠረት <xliff:g id="TIME_REMAINING">%1$s</xliff:g> ገደማ ቀርቷል"</string>
diff --git a/packages/SettingsLib/res/values-ar/strings.xml b/packages/SettingsLib/res/values-ar/strings.xml
index 87c4d7f..1f313ae 100644
--- a/packages/SettingsLib/res/values-ar/strings.xml
+++ b/packages/SettingsLib/res/values-ar/strings.xml
@@ -457,8 +457,7 @@
<string name="daltonizer_type_overridden" msgid="4509604753672535721">"تم الاستبدال بـ <xliff:g id="TITLE">%1$s</xliff:g>"</string>
<string name="power_remaining_settings_home_page" msgid="4885165789445462557">"<xliff:g id="PERCENTAGE">%1$s</xliff:g> - <xliff:g id="TIME_STRING">%2$s</xliff:g>"</string>
<string name="power_charging_on_hold_settings_home_page" msgid="7690464049464805856">"<xliff:g id="LEVEL">%1$s</xliff:g> - الشحن معلَّق لحماية البطارية"</string>
- <!-- no translation found for power_incompatible_charging_settings_home_page (1322050766135126880) -->
- <skip />
+ <string name="power_incompatible_charging_settings_home_page" msgid="1322050766135126880">"<xliff:g id="LEVEL">%1$s</xliff:g> - فحص ملحق الشحن"</string>
<string name="power_remaining_duration_only" msgid="8264199158671531431">"يتبقى <xliff:g id="TIME_REMAINING">%1$s</xliff:g> تقريبًا."</string>
<string name="power_discharging_duration" msgid="1076561255466053220">"يتبقى <xliff:g id="TIME_REMAINING">%1$s</xliff:g> تقريبًا (<xliff:g id="LEVEL">%2$s</xliff:g>)"</string>
<string name="power_remaining_duration_only_enhanced" msgid="2527842780666073218">"يتبقى <xliff:g id="TIME_REMAINING">%1$s</xliff:g> تقريبًا، بناءً على استخدامك"</string>
diff --git a/packages/SettingsLib/res/values-as/strings.xml b/packages/SettingsLib/res/values-as/strings.xml
index bcf9f5d..a4be8e9 100644
--- a/packages/SettingsLib/res/values-as/strings.xml
+++ b/packages/SettingsLib/res/values-as/strings.xml
@@ -457,8 +457,7 @@
<string name="daltonizer_type_overridden" msgid="4509604753672535721">"<xliff:g id="TITLE">%1$s</xliff:g>ৰ দ্বাৰা অগ্ৰাহ্য কৰা হৈছে"</string>
<string name="power_remaining_settings_home_page" msgid="4885165789445462557">"<xliff:g id="PERCENTAGE">%1$s</xliff:g> - <xliff:g id="TIME_STRING">%2$s</xliff:g>"</string>
<string name="power_charging_on_hold_settings_home_page" msgid="7690464049464805856">"<xliff:g id="LEVEL">%1$s</xliff:g> - বেটাৰী সুৰক্ষিত কৰিবলৈ চাৰ্জিং স্থগিত ৰখা হৈছে"</string>
- <!-- no translation found for power_incompatible_charging_settings_home_page (1322050766135126880) -->
- <skip />
+ <string name="power_incompatible_charging_settings_home_page" msgid="1322050766135126880">"<xliff:g id="LEVEL">%1$s</xliff:g> - চাৰ্জিঙৰ সৈতে জড়িত আনুষংগিক সামগ্ৰী পৰীক্ষা কৰক"</string>
<string name="power_remaining_duration_only" msgid="8264199158671531431">"প্রায় <xliff:g id="TIME_REMAINING">%1$s</xliff:g> বাকী আছে"</string>
<string name="power_discharging_duration" msgid="1076561255466053220">"প্রায় <xliff:g id="TIME_REMAINING">%1$s</xliff:g> বাকী আছে (<xliff:g id="LEVEL">%2$s</xliff:g>)"</string>
<string name="power_remaining_duration_only_enhanced" msgid="2527842780666073218">"আপোনাৰ ব্যৱহাৰৰ ওপৰত ভিত্তি কৰি প্ৰায় <xliff:g id="TIME_REMAINING">%1$s</xliff:g> বাকী আছে"</string>
diff --git a/packages/SettingsLib/res/values-az/strings.xml b/packages/SettingsLib/res/values-az/strings.xml
index 22dbff2..df6dad2 100644
--- a/packages/SettingsLib/res/values-az/strings.xml
+++ b/packages/SettingsLib/res/values-az/strings.xml
@@ -457,8 +457,7 @@
<string name="daltonizer_type_overridden" msgid="4509604753672535721">"<xliff:g id="TITLE">%1$s</xliff:g> tərəfindən qəbul edilmir"</string>
<string name="power_remaining_settings_home_page" msgid="4885165789445462557">"<xliff:g id="PERCENTAGE">%1$s</xliff:g> - <xliff:g id="TIME_STRING">%2$s</xliff:g>"</string>
<string name="power_charging_on_hold_settings_home_page" msgid="7690464049464805856">"<xliff:g id="LEVEL">%1$s</xliff:g> - Batareyanı qorumaq üçün şarj gözlədilir"</string>
- <!-- no translation found for power_incompatible_charging_settings_home_page (1322050766135126880) -->
- <skip />
+ <string name="power_incompatible_charging_settings_home_page" msgid="1322050766135126880">"<xliff:g id="LEVEL">%1$s</xliff:g> - Şarj aksesuarını yoxlayın"</string>
<string name="power_remaining_duration_only" msgid="8264199158671531431">"Təxminən <xliff:g id="TIME_REMAINING">%1$s</xliff:g> qalıb"</string>
<string name="power_discharging_duration" msgid="1076561255466053220">"Təxminən <xliff:g id="TIME_REMAINING">%1$s</xliff:g> qalıb (<xliff:g id="LEVEL">%2$s</xliff:g>)"</string>
<string name="power_remaining_duration_only_enhanced" msgid="2527842780666073218">"İstifadəyə əsasən təxminən <xliff:g id="TIME_REMAINING">%1$s</xliff:g> qalıb"</string>
diff --git a/packages/SettingsLib/res/values-b+sr+Latn/strings.xml b/packages/SettingsLib/res/values-b+sr+Latn/strings.xml
index ee58e8e..8bb8c83 100644
--- a/packages/SettingsLib/res/values-b+sr+Latn/strings.xml
+++ b/packages/SettingsLib/res/values-b+sr+Latn/strings.xml
@@ -457,8 +457,7 @@
<string name="daltonizer_type_overridden" msgid="4509604753672535721">"Zamenjuje ga <xliff:g id="TITLE">%1$s</xliff:g>"</string>
<string name="power_remaining_settings_home_page" msgid="4885165789445462557">"<xliff:g id="PERCENTAGE">%1$s</xliff:g>–<xliff:g id="TIME_STRING">%2$s</xliff:g>"</string>
<string name="power_charging_on_hold_settings_home_page" msgid="7690464049464805856">"<xliff:g id="LEVEL">%1$s</xliff:g> – punjenje je na čekanju da bi se zaštitila baterija"</string>
- <!-- no translation found for power_incompatible_charging_settings_home_page (1322050766135126880) -->
- <skip />
+ <string name="power_incompatible_charging_settings_home_page" msgid="1322050766135126880">"<xliff:g id="LEVEL">%1$s</xliff:g> – Proverite dodatnu opremu za punjenje"</string>
<string name="power_remaining_duration_only" msgid="8264199158671531431">"Preostalo je oko <xliff:g id="TIME_REMAINING">%1$s</xliff:g>"</string>
<string name="power_discharging_duration" msgid="1076561255466053220">"Preostalo je oko <xliff:g id="TIME_REMAINING">%1$s</xliff:g> (<xliff:g id="LEVEL">%2$s</xliff:g>)"</string>
<string name="power_remaining_duration_only_enhanced" msgid="2527842780666073218">"Preostalo je oko <xliff:g id="TIME_REMAINING">%1$s</xliff:g> na osnovu korišćenja"</string>
diff --git a/packages/SettingsLib/res/values-be/strings.xml b/packages/SettingsLib/res/values-be/strings.xml
index 079a8f3..433c243 100644
--- a/packages/SettingsLib/res/values-be/strings.xml
+++ b/packages/SettingsLib/res/values-be/strings.xml
@@ -457,8 +457,7 @@
<string name="daltonizer_type_overridden" msgid="4509604753672535721">"Перавызначаны <xliff:g id="TITLE">%1$s</xliff:g>"</string>
<string name="power_remaining_settings_home_page" msgid="4885165789445462557">"<xliff:g id="PERCENTAGE">%1$s</xliff:g> – <xliff:g id="TIME_STRING">%2$s</xliff:g>"</string>
<string name="power_charging_on_hold_settings_home_page" msgid="7690464049464805856">"<xliff:g id="LEVEL">%1$s</xliff:g> – зарадка прыпынена, каб абараніць акумулятар"</string>
- <!-- no translation found for power_incompatible_charging_settings_home_page (1322050766135126880) -->
- <skip />
+ <string name="power_incompatible_charging_settings_home_page" msgid="1322050766135126880">"<xliff:g id="LEVEL">%1$s</xliff:g>, праверце зарадную прыладу"</string>
<string name="power_remaining_duration_only" msgid="8264199158671531431">"Зараду хопіць прыблізна на <xliff:g id="TIME_REMAINING">%1$s</xliff:g>"</string>
<string name="power_discharging_duration" msgid="1076561255466053220">"Зараду (<xliff:g id="LEVEL">%2$s</xliff:g>) хопіць прыблізна на <xliff:g id="TIME_REMAINING">%1$s</xliff:g>"</string>
<string name="power_remaining_duration_only_enhanced" msgid="2527842780666073218">"Зараду пры такім выкарыстанні хопіць прыблізна на <xliff:g id="TIME_REMAINING">%1$s</xliff:g>"</string>
diff --git a/packages/SettingsLib/res/values-bg/strings.xml b/packages/SettingsLib/res/values-bg/strings.xml
index 5a0c0b7..27e27be 100644
--- a/packages/SettingsLib/res/values-bg/strings.xml
+++ b/packages/SettingsLib/res/values-bg/strings.xml
@@ -457,8 +457,7 @@
<string name="daltonizer_type_overridden" msgid="4509604753672535721">"Заменено от „<xliff:g id="TITLE">%1$s</xliff:g>“"</string>
<string name="power_remaining_settings_home_page" msgid="4885165789445462557">"<xliff:g id="PERCENTAGE">%1$s</xliff:g> – <xliff:g id="TIME_STRING">%2$s</xliff:g>"</string>
<string name="power_charging_on_hold_settings_home_page" msgid="7690464049464805856">"<xliff:g id="LEVEL">%1$s</xliff:g> – Зареждането е поставено на пауза с цел запазване на батерията"</string>
- <!-- no translation found for power_incompatible_charging_settings_home_page (1322050766135126880) -->
- <skip />
+ <string name="power_incompatible_charging_settings_home_page" msgid="1322050766135126880">"<xliff:g id="LEVEL">%1$s</xliff:g> – Проверете аксесоара за зареждане"</string>
<string name="power_remaining_duration_only" msgid="8264199158671531431">"Още около <xliff:g id="TIME_REMAINING">%1$s</xliff:g>"</string>
<string name="power_discharging_duration" msgid="1076561255466053220">"Още около <xliff:g id="TIME_REMAINING">%1$s</xliff:g> (<xliff:g id="LEVEL">%2$s</xliff:g>)"</string>
<string name="power_remaining_duration_only_enhanced" msgid="2527842780666073218">"Още около <xliff:g id="TIME_REMAINING">%1$s</xliff:g> въз основа на използването"</string>
diff --git a/packages/SettingsLib/res/values-bn/strings.xml b/packages/SettingsLib/res/values-bn/strings.xml
index 6fb6fb3..2cf0556 100644
--- a/packages/SettingsLib/res/values-bn/strings.xml
+++ b/packages/SettingsLib/res/values-bn/strings.xml
@@ -457,8 +457,7 @@
<string name="daltonizer_type_overridden" msgid="4509604753672535721">"<xliff:g id="TITLE">%1$s</xliff:g> এর দ্বারা ওভাররাইড করা হয়েছে"</string>
<string name="power_remaining_settings_home_page" msgid="4885165789445462557">"<xliff:g id="PERCENTAGE">%1$s</xliff:g> - <xliff:g id="TIME_STRING">%2$s</xliff:g>"</string>
<string name="power_charging_on_hold_settings_home_page" msgid="7690464049464805856">"<xliff:g id="LEVEL">%1$s</xliff:g> - ব্যাটারিকে সুরক্ষিত রাখতে চার্জিং হোল্ড করা হয়েছে"</string>
- <!-- no translation found for power_incompatible_charging_settings_home_page (1322050766135126880) -->
- <skip />
+ <string name="power_incompatible_charging_settings_home_page" msgid="1322050766135126880">"<xliff:g id="LEVEL">%1$s</xliff:g> - চার্জিং অ্যাক্সেসরি চেক করুন"</string>
<string name="power_remaining_duration_only" msgid="8264199158671531431">"আর আনুমানিক <xliff:g id="TIME_REMAINING">%1$s</xliff:g> চলবে"</string>
<string name="power_discharging_duration" msgid="1076561255466053220">"আর আনুমানিক <xliff:g id="TIME_REMAINING">%1$s</xliff:g> চলবে (<xliff:g id="LEVEL">%2$s</xliff:g>)"</string>
<string name="power_remaining_duration_only_enhanced" msgid="2527842780666073218">"ব্যবহারের উপর ভিত্তি করে আর আনুমানিক <xliff:g id="TIME_REMAINING">%1$s</xliff:g> চলবে"</string>
diff --git a/packages/SettingsLib/res/values-bs/strings.xml b/packages/SettingsLib/res/values-bs/strings.xml
index a430848..64ccf98 100644
--- a/packages/SettingsLib/res/values-bs/strings.xml
+++ b/packages/SettingsLib/res/values-bs/strings.xml
@@ -457,8 +457,7 @@
<string name="daltonizer_type_overridden" msgid="4509604753672535721">"Zamjenjuje <xliff:g id="TITLE">%1$s</xliff:g>"</string>
<string name="power_remaining_settings_home_page" msgid="4885165789445462557">"<xliff:g id="PERCENTAGE">%1$s</xliff:g> – <xliff:g id="TIME_STRING">%2$s</xliff:g>"</string>
<string name="power_charging_on_hold_settings_home_page" msgid="7690464049464805856">"<xliff:g id="LEVEL">%1$s</xliff:g> – punjenje je na čekanju radi zaštite baterije"</string>
- <!-- no translation found for power_incompatible_charging_settings_home_page (1322050766135126880) -->
- <skip />
+ <string name="power_incompatible_charging_settings_home_page" msgid="1322050766135126880">"<xliff:g id="LEVEL">%1$s</xliff:g> – provjerite opremu za punjenje"</string>
<string name="power_remaining_duration_only" msgid="8264199158671531431">"Preostalo je još oko <xliff:g id="TIME_REMAINING">%1$s</xliff:g>"</string>
<string name="power_discharging_duration" msgid="1076561255466053220">"Preostalo je još oko <xliff:g id="TIME_REMAINING">%1$s</xliff:g> (<xliff:g id="LEVEL">%2$s</xliff:g>)"</string>
<string name="power_remaining_duration_only_enhanced" msgid="2527842780666073218">"Preostalo je još oko <xliff:g id="TIME_REMAINING">%1$s</xliff:g> na osnovu vaše potrošnje"</string>
diff --git a/packages/SettingsLib/res/values-ca/strings.xml b/packages/SettingsLib/res/values-ca/strings.xml
index 0bbb979..81f9e97a 100644
--- a/packages/SettingsLib/res/values-ca/strings.xml
+++ b/packages/SettingsLib/res/values-ca/strings.xml
@@ -457,8 +457,7 @@
<string name="daltonizer_type_overridden" msgid="4509604753672535721">"S\'ha substituït per <xliff:g id="TITLE">%1$s</xliff:g>"</string>
<string name="power_remaining_settings_home_page" msgid="4885165789445462557">"<xliff:g id="PERCENTAGE">%1$s</xliff:g>: <xliff:g id="TIME_STRING">%2$s</xliff:g>"</string>
<string name="power_charging_on_hold_settings_home_page" msgid="7690464049464805856">"<xliff:g id="LEVEL">%1$s</xliff:g>: la càrrega s\'ha posat en espera per protegir la bateria"</string>
- <!-- no translation found for power_incompatible_charging_settings_home_page (1322050766135126880) -->
- <skip />
+ <string name="power_incompatible_charging_settings_home_page" msgid="1322050766135126880">"<xliff:g id="LEVEL">%1$s</xliff:g>: revisa l\'accessori de càrrega"</string>
<string name="power_remaining_duration_only" msgid="8264199158671531431">"Temps restant aproximat: <xliff:g id="TIME_REMAINING">%1$s</xliff:g>"</string>
<string name="power_discharging_duration" msgid="1076561255466053220">"Temps restant aproximat: <xliff:g id="TIME_REMAINING">%1$s</xliff:g> (<xliff:g id="LEVEL">%2$s</xliff:g>)"</string>
<string name="power_remaining_duration_only_enhanced" msgid="2527842780666073218">"Temps restant aproximat segons l\'ús que en fas: <xliff:g id="TIME_REMAINING">%1$s</xliff:g>"</string>
diff --git a/packages/SettingsLib/res/values-cs/strings.xml b/packages/SettingsLib/res/values-cs/strings.xml
index 97d0d15..cb8c36b 100644
--- a/packages/SettingsLib/res/values-cs/strings.xml
+++ b/packages/SettingsLib/res/values-cs/strings.xml
@@ -457,8 +457,7 @@
<string name="daltonizer_type_overridden" msgid="4509604753672535721">"Přepsáno nastavením <xliff:g id="TITLE">%1$s</xliff:g>"</string>
<string name="power_remaining_settings_home_page" msgid="4885165789445462557">"<xliff:g id="PERCENTAGE">%1$s</xliff:g> – <xliff:g id="TIME_STRING">%2$s</xliff:g>"</string>
<string name="power_charging_on_hold_settings_home_page" msgid="7690464049464805856">"<xliff:g id="LEVEL">%1$s</xliff:g> – Nabíjení je pozastaveno za účelem ochrany baterie"</string>
- <!-- no translation found for power_incompatible_charging_settings_home_page (1322050766135126880) -->
- <skip />
+ <string name="power_incompatible_charging_settings_home_page" msgid="1322050766135126880">"<xliff:g id="LEVEL">%1$s</xliff:g> – Zkontrolujte nabíjecí příslušenství"</string>
<string name="power_remaining_duration_only" msgid="8264199158671531431">"Zbývá asi <xliff:g id="TIME_REMAINING">%1$s</xliff:g>"</string>
<string name="power_discharging_duration" msgid="1076561255466053220">"Zbývá asi <xliff:g id="TIME_REMAINING">%1$s</xliff:g> (<xliff:g id="LEVEL">%2$s</xliff:g>)"</string>
<string name="power_remaining_duration_only_enhanced" msgid="2527842780666073218">"Při vašem obvyklém využití zbývá asi <xliff:g id="TIME_REMAINING">%1$s</xliff:g>"</string>
diff --git a/packages/SettingsLib/res/values-da/strings.xml b/packages/SettingsLib/res/values-da/strings.xml
index 0960422..625f05b 100644
--- a/packages/SettingsLib/res/values-da/strings.xml
+++ b/packages/SettingsLib/res/values-da/strings.xml
@@ -457,8 +457,7 @@
<string name="daltonizer_type_overridden" msgid="4509604753672535721">"Tilsidesat af <xliff:g id="TITLE">%1$s</xliff:g>"</string>
<string name="power_remaining_settings_home_page" msgid="4885165789445462557">"<xliff:g id="PERCENTAGE">%1$s</xliff:g> – <xliff:g id="TIME_STRING">%2$s</xliff:g>"</string>
<string name="power_charging_on_hold_settings_home_page" msgid="7690464049464805856">"<xliff:g id="LEVEL">%1$s</xliff:g> – Opladningen er sat på pause for at beskytte batteriet"</string>
- <!-- no translation found for power_incompatible_charging_settings_home_page (1322050766135126880) -->
- <skip />
+ <string name="power_incompatible_charging_settings_home_page" msgid="1322050766135126880">"<xliff:g id="LEVEL">%1$s</xliff:g> – Tjek opladningstilbehøret"</string>
<string name="power_remaining_duration_only" msgid="8264199158671531431">"Ca. <xliff:g id="TIME_REMAINING">%1$s</xliff:g> tilbage"</string>
<string name="power_discharging_duration" msgid="1076561255466053220">"Ca. <xliff:g id="TIME_REMAINING">%1$s</xliff:g> tilbage (<xliff:g id="LEVEL">%2$s</xliff:g>)"</string>
<string name="power_remaining_duration_only_enhanced" msgid="2527842780666073218">"Ca. <xliff:g id="TIME_REMAINING">%1$s</xliff:g> tilbage, alt efter hvordan du bruger enheden"</string>
diff --git a/packages/SettingsLib/res/values-de/strings.xml b/packages/SettingsLib/res/values-de/strings.xml
index cb36cca..f622f61 100644
--- a/packages/SettingsLib/res/values-de/strings.xml
+++ b/packages/SettingsLib/res/values-de/strings.xml
@@ -457,8 +457,7 @@
<string name="daltonizer_type_overridden" msgid="4509604753672535721">"Außer Kraft gesetzt von \"<xliff:g id="TITLE">%1$s</xliff:g>\""</string>
<string name="power_remaining_settings_home_page" msgid="4885165789445462557">"<xliff:g id="PERCENTAGE">%1$s</xliff:g> – <xliff:g id="TIME_STRING">%2$s</xliff:g>"</string>
<string name="power_charging_on_hold_settings_home_page" msgid="7690464049464805856">"<xliff:g id="LEVEL">%1$s</xliff:g> – Ladevorgang zum Schutz des Akkus angehalten"</string>
- <!-- no translation found for power_incompatible_charging_settings_home_page (1322050766135126880) -->
- <skip />
+ <string name="power_incompatible_charging_settings_home_page" msgid="1322050766135126880">"<xliff:g id="LEVEL">%1$s</xliff:g> – Ladezubehör prüfen"</string>
<string name="power_remaining_duration_only" msgid="8264199158671531431">"Noch etwa <xliff:g id="TIME_REMAINING">%1$s</xliff:g>"</string>
<string name="power_discharging_duration" msgid="1076561255466053220">"Noch etwa <xliff:g id="TIME_REMAINING">%1$s</xliff:g> (<xliff:g id="LEVEL">%2$s</xliff:g>)"</string>
<string name="power_remaining_duration_only_enhanced" msgid="2527842780666073218">"Bei deinem Nutzungsmuster hast du noch ca. <xliff:g id="TIME_REMAINING">%1$s</xliff:g>"</string>
diff --git a/packages/SettingsLib/res/values-el/strings.xml b/packages/SettingsLib/res/values-el/strings.xml
index 4953884b0..861f472 100644
--- a/packages/SettingsLib/res/values-el/strings.xml
+++ b/packages/SettingsLib/res/values-el/strings.xml
@@ -457,8 +457,7 @@
<string name="daltonizer_type_overridden" msgid="4509604753672535721">"Αντικαταστάθηκε από <xliff:g id="TITLE">%1$s</xliff:g>"</string>
<string name="power_remaining_settings_home_page" msgid="4885165789445462557">"<xliff:g id="PERCENTAGE">%1$s</xliff:g> - <xliff:g id="TIME_STRING">%2$s</xliff:g>"</string>
<string name="power_charging_on_hold_settings_home_page" msgid="7690464049464805856">"<xliff:g id="LEVEL">%1$s</xliff:g> – Η φόρτιση τέθηκε σε αναμονή για προστασία της μπαταρίας"</string>
- <!-- no translation found for power_incompatible_charging_settings_home_page (1322050766135126880) -->
- <skip />
+ <string name="power_incompatible_charging_settings_home_page" msgid="1322050766135126880">"<xliff:g id="LEVEL">%1$s</xliff:g> – Έλεγχος αξεσουάρ φόρτισης"</string>
<string name="power_remaining_duration_only" msgid="8264199158671531431">"Απομένει/ουν περίπου <xliff:g id="TIME_REMAINING">%1$s</xliff:g>"</string>
<string name="power_discharging_duration" msgid="1076561255466053220">"Απομένει/ουν περίπου <xliff:g id="TIME_REMAINING">%1$s</xliff:g> (<xliff:g id="LEVEL">%2$s</xliff:g>)"</string>
<string name="power_remaining_duration_only_enhanced" msgid="2527842780666073218">"Απομένει/ουν περίπου <xliff:g id="TIME_REMAINING">%1$s</xliff:g>, βάσει της χρήσης σας"</string>
diff --git a/packages/SettingsLib/res/values-en-rAU/strings.xml b/packages/SettingsLib/res/values-en-rAU/strings.xml
index d730fb7..e6923de 100644
--- a/packages/SettingsLib/res/values-en-rAU/strings.xml
+++ b/packages/SettingsLib/res/values-en-rAU/strings.xml
@@ -457,8 +457,7 @@
<string name="daltonizer_type_overridden" msgid="4509604753672535721">"Overridden by <xliff:g id="TITLE">%1$s</xliff:g>"</string>
<string name="power_remaining_settings_home_page" msgid="4885165789445462557">"<xliff:g id="PERCENTAGE">%1$s</xliff:g> - <xliff:g id="TIME_STRING">%2$s</xliff:g>"</string>
<string name="power_charging_on_hold_settings_home_page" msgid="7690464049464805856">"<xliff:g id="LEVEL">%1$s</xliff:g> – Charging on hold to protect battery"</string>
- <!-- no translation found for power_incompatible_charging_settings_home_page (1322050766135126880) -->
- <skip />
+ <string name="power_incompatible_charging_settings_home_page" msgid="1322050766135126880">"<xliff:g id="LEVEL">%1$s</xliff:g> – check charging accessory"</string>
<string name="power_remaining_duration_only" msgid="8264199158671531431">"About <xliff:g id="TIME_REMAINING">%1$s</xliff:g> left"</string>
<string name="power_discharging_duration" msgid="1076561255466053220">"About <xliff:g id="TIME_REMAINING">%1$s</xliff:g> left (<xliff:g id="LEVEL">%2$s</xliff:g>)"</string>
<string name="power_remaining_duration_only_enhanced" msgid="2527842780666073218">"About <xliff:g id="TIME_REMAINING">%1$s</xliff:g> left based on your usage"</string>
diff --git a/packages/SettingsLib/res/values-en-rGB/strings.xml b/packages/SettingsLib/res/values-en-rGB/strings.xml
index d730fb7..e6923de 100644
--- a/packages/SettingsLib/res/values-en-rGB/strings.xml
+++ b/packages/SettingsLib/res/values-en-rGB/strings.xml
@@ -457,8 +457,7 @@
<string name="daltonizer_type_overridden" msgid="4509604753672535721">"Overridden by <xliff:g id="TITLE">%1$s</xliff:g>"</string>
<string name="power_remaining_settings_home_page" msgid="4885165789445462557">"<xliff:g id="PERCENTAGE">%1$s</xliff:g> - <xliff:g id="TIME_STRING">%2$s</xliff:g>"</string>
<string name="power_charging_on_hold_settings_home_page" msgid="7690464049464805856">"<xliff:g id="LEVEL">%1$s</xliff:g> – Charging on hold to protect battery"</string>
- <!-- no translation found for power_incompatible_charging_settings_home_page (1322050766135126880) -->
- <skip />
+ <string name="power_incompatible_charging_settings_home_page" msgid="1322050766135126880">"<xliff:g id="LEVEL">%1$s</xliff:g> – check charging accessory"</string>
<string name="power_remaining_duration_only" msgid="8264199158671531431">"About <xliff:g id="TIME_REMAINING">%1$s</xliff:g> left"</string>
<string name="power_discharging_duration" msgid="1076561255466053220">"About <xliff:g id="TIME_REMAINING">%1$s</xliff:g> left (<xliff:g id="LEVEL">%2$s</xliff:g>)"</string>
<string name="power_remaining_duration_only_enhanced" msgid="2527842780666073218">"About <xliff:g id="TIME_REMAINING">%1$s</xliff:g> left based on your usage"</string>
diff --git a/packages/SettingsLib/res/values-en-rIN/strings.xml b/packages/SettingsLib/res/values-en-rIN/strings.xml
index d730fb7..e6923de 100644
--- a/packages/SettingsLib/res/values-en-rIN/strings.xml
+++ b/packages/SettingsLib/res/values-en-rIN/strings.xml
@@ -457,8 +457,7 @@
<string name="daltonizer_type_overridden" msgid="4509604753672535721">"Overridden by <xliff:g id="TITLE">%1$s</xliff:g>"</string>
<string name="power_remaining_settings_home_page" msgid="4885165789445462557">"<xliff:g id="PERCENTAGE">%1$s</xliff:g> - <xliff:g id="TIME_STRING">%2$s</xliff:g>"</string>
<string name="power_charging_on_hold_settings_home_page" msgid="7690464049464805856">"<xliff:g id="LEVEL">%1$s</xliff:g> – Charging on hold to protect battery"</string>
- <!-- no translation found for power_incompatible_charging_settings_home_page (1322050766135126880) -->
- <skip />
+ <string name="power_incompatible_charging_settings_home_page" msgid="1322050766135126880">"<xliff:g id="LEVEL">%1$s</xliff:g> – check charging accessory"</string>
<string name="power_remaining_duration_only" msgid="8264199158671531431">"About <xliff:g id="TIME_REMAINING">%1$s</xliff:g> left"</string>
<string name="power_discharging_duration" msgid="1076561255466053220">"About <xliff:g id="TIME_REMAINING">%1$s</xliff:g> left (<xliff:g id="LEVEL">%2$s</xliff:g>)"</string>
<string name="power_remaining_duration_only_enhanced" msgid="2527842780666073218">"About <xliff:g id="TIME_REMAINING">%1$s</xliff:g> left based on your usage"</string>
diff --git a/packages/SettingsLib/res/values-es-rUS/strings.xml b/packages/SettingsLib/res/values-es-rUS/strings.xml
index 775f23c..a6fdf56 100644
--- a/packages/SettingsLib/res/values-es-rUS/strings.xml
+++ b/packages/SettingsLib/res/values-es-rUS/strings.xml
@@ -457,8 +457,7 @@
<string name="daltonizer_type_overridden" msgid="4509604753672535721">"Reemplazado por <xliff:g id="TITLE">%1$s</xliff:g>"</string>
<string name="power_remaining_settings_home_page" msgid="4885165789445462557">"<xliff:g id="PERCENTAGE">%1$s</xliff:g> - <xliff:g id="TIME_STRING">%2$s</xliff:g>"</string>
<string name="power_charging_on_hold_settings_home_page" msgid="7690464049464805856">"<xliff:g id="LEVEL">%1$s</xliff:g> - Se detuvo la carga para proteger la batería"</string>
- <!-- no translation found for power_incompatible_charging_settings_home_page (1322050766135126880) -->
- <skip />
+ <string name="power_incompatible_charging_settings_home_page" msgid="1322050766135126880">"<xliff:g id="LEVEL">%1$s</xliff:g> - Verifica el accesorio de carga"</string>
<string name="power_remaining_duration_only" msgid="8264199158671531431">"Tiempo restante: aproximadamente <xliff:g id="TIME_REMAINING">%1$s</xliff:g>"</string>
<string name="power_discharging_duration" msgid="1076561255466053220">"Tiempo restante: aproximadamente <xliff:g id="TIME_REMAINING">%1$s</xliff:g> (<xliff:g id="LEVEL">%2$s</xliff:g>)"</string>
<string name="power_remaining_duration_only_enhanced" msgid="2527842780666073218">"Tiempo restante: aproximadamente <xliff:g id="TIME_REMAINING">%1$s</xliff:g> en función de tu uso"</string>
diff --git a/packages/SettingsLib/res/values-es/strings.xml b/packages/SettingsLib/res/values-es/strings.xml
index 70b8502..d57a33a 100644
--- a/packages/SettingsLib/res/values-es/strings.xml
+++ b/packages/SettingsLib/res/values-es/strings.xml
@@ -457,8 +457,7 @@
<string name="daltonizer_type_overridden" msgid="4509604753672535721">"Anulado por <xliff:g id="TITLE">%1$s</xliff:g>"</string>
<string name="power_remaining_settings_home_page" msgid="4885165789445462557">"<xliff:g id="PERCENTAGE">%1$s</xliff:g>: <xliff:g id="TIME_STRING">%2$s</xliff:g>"</string>
<string name="power_charging_on_hold_settings_home_page" msgid="7690464049464805856">"<xliff:g id="LEVEL">%1$s</xliff:g> - Carga pausada para proteger la batería"</string>
- <!-- no translation found for power_incompatible_charging_settings_home_page (1322050766135126880) -->
- <skip />
+ <string name="power_incompatible_charging_settings_home_page" msgid="1322050766135126880">"<xliff:g id="LEVEL">%1$s</xliff:g> - Comprueba el accesorio de carga"</string>
<string name="power_remaining_duration_only" msgid="8264199158671531431">"Tiempo restante aproximado: <xliff:g id="TIME_REMAINING">%1$s</xliff:g>"</string>
<string name="power_discharging_duration" msgid="1076561255466053220">"Tiempo restante aproximado: <xliff:g id="TIME_REMAINING">%1$s</xliff:g> (<xliff:g id="LEVEL">%2$s</xliff:g>)"</string>
<string name="power_remaining_duration_only_enhanced" msgid="2527842780666073218">"Tiempo restante aproximado según tu uso: <xliff:g id="TIME_REMAINING">%1$s</xliff:g>"</string>
diff --git a/packages/SettingsLib/res/values-et/strings.xml b/packages/SettingsLib/res/values-et/strings.xml
index daae214..dfe78d8 100644
--- a/packages/SettingsLib/res/values-et/strings.xml
+++ b/packages/SettingsLib/res/values-et/strings.xml
@@ -457,8 +457,7 @@
<string name="daltonizer_type_overridden" msgid="4509604753672535721">"Alistas <xliff:g id="TITLE">%1$s</xliff:g>"</string>
<string name="power_remaining_settings_home_page" msgid="4885165789445462557">"<xliff:g id="PERCENTAGE">%1$s</xliff:g> – <xliff:g id="TIME_STRING">%2$s</xliff:g>"</string>
<string name="power_charging_on_hold_settings_home_page" msgid="7690464049464805856">"<xliff:g id="LEVEL">%1$s</xliff:g> – laadimine on aku kaitsmiseks ootele pandud"</string>
- <!-- no translation found for power_incompatible_charging_settings_home_page (1322050766135126880) -->
- <skip />
+ <string name="power_incompatible_charging_settings_home_page" msgid="1322050766135126880">"<xliff:g id="LEVEL">%1$s</xliff:g> – kontrollige laadimistarvikut"</string>
<string name="power_remaining_duration_only" msgid="8264199158671531431">"Ligikaudu <xliff:g id="TIME_REMAINING">%1$s</xliff:g> jäänud"</string>
<string name="power_discharging_duration" msgid="1076561255466053220">"Ligikaudu <xliff:g id="TIME_REMAINING">%1$s</xliff:g> jäänud (<xliff:g id="LEVEL">%2$s</xliff:g>)"</string>
<string name="power_remaining_duration_only_enhanced" msgid="2527842780666073218">"Teie kasutuse põhjal on jäänud ligikaudu <xliff:g id="TIME_REMAINING">%1$s</xliff:g>"</string>
diff --git a/packages/SettingsLib/res/values-eu/strings.xml b/packages/SettingsLib/res/values-eu/strings.xml
index 2fd01f3..3c6309d 100644
--- a/packages/SettingsLib/res/values-eu/strings.xml
+++ b/packages/SettingsLib/res/values-eu/strings.xml
@@ -457,8 +457,7 @@
<string name="daltonizer_type_overridden" msgid="4509604753672535721">"<xliff:g id="TITLE">%1$s</xliff:g> hobespena gainjarri zaio"</string>
<string name="power_remaining_settings_home_page" msgid="4885165789445462557">"<xliff:g id="PERCENTAGE">%1$s</xliff:g> - <xliff:g id="TIME_STRING">%2$s</xliff:g>"</string>
<string name="power_charging_on_hold_settings_home_page" msgid="7690464049464805856">"<xliff:g id="LEVEL">%1$s</xliff:g>: kargatze-prozesua zain dago bateria babesteko"</string>
- <!-- no translation found for power_incompatible_charging_settings_home_page (1322050766135126880) -->
- <skip />
+ <string name="power_incompatible_charging_settings_home_page" msgid="1322050766135126880">"<xliff:g id="LEVEL">%1$s</xliff:g> - Eman begiratu bat kargatzeko osagarriari"</string>
<string name="power_remaining_duration_only" msgid="8264199158671531431">"<xliff:g id="TIME_REMAINING">%1$s</xliff:g> inguru gelditzen dira"</string>
<string name="power_discharging_duration" msgid="1076561255466053220">"<xliff:g id="TIME_REMAINING">%1$s</xliff:g> inguru gelditzen dira (<xliff:g id="LEVEL">%2$s</xliff:g>)"</string>
<string name="power_remaining_duration_only_enhanced" msgid="2527842780666073218">"Erabilera kontuan izanda, <xliff:g id="TIME_REMAINING">%1$s</xliff:g> inguru gelditzen dira"</string>
diff --git a/packages/SettingsLib/res/values-fa/strings.xml b/packages/SettingsLib/res/values-fa/strings.xml
index 9a1e107..2cb1873 100644
--- a/packages/SettingsLib/res/values-fa/strings.xml
+++ b/packages/SettingsLib/res/values-fa/strings.xml
@@ -457,8 +457,7 @@
<string name="daltonizer_type_overridden" msgid="4509604753672535721">"توسط <xliff:g id="TITLE">%1$s</xliff:g> لغو شد"</string>
<string name="power_remaining_settings_home_page" msgid="4885165789445462557">"<xliff:g id="PERCENTAGE">%1$s</xliff:g> - <xliff:g id="TIME_STRING">%2$s</xliff:g>"</string>
<string name="power_charging_on_hold_settings_home_page" msgid="7690464049464805856">"<xliff:g id="LEVEL">%1$s</xliff:g> - برای محافظت از باتری، شارژ موقتاً متوقف شده است"</string>
- <!-- no translation found for power_incompatible_charging_settings_home_page (1322050766135126880) -->
- <skip />
+ <string name="power_incompatible_charging_settings_home_page" msgid="1322050766135126880">"<xliff:g id="LEVEL">%1$s</xliff:g> - لوازم شارژ را بررسی کنید"</string>
<string name="power_remaining_duration_only" msgid="8264199158671531431">"تقریباً <xliff:g id="TIME_REMAINING">%1$s</xliff:g> شارژ باقی مانده است"</string>
<string name="power_discharging_duration" msgid="1076561255466053220">"تقریباً <xliff:g id="TIME_REMAINING">%1$s</xliff:g> شارژ باقی مانده است (<xliff:g id="LEVEL">%2$s</xliff:g>)"</string>
<string name="power_remaining_duration_only_enhanced" msgid="2527842780666073218">"براساس مصرفتان، تقریباً <xliff:g id="TIME_REMAINING">%1$s</xliff:g> شارژ باقی مانده است"</string>
diff --git a/packages/SettingsLib/res/values-fi/strings.xml b/packages/SettingsLib/res/values-fi/strings.xml
index 0faa32c5..29459ca 100644
--- a/packages/SettingsLib/res/values-fi/strings.xml
+++ b/packages/SettingsLib/res/values-fi/strings.xml
@@ -457,8 +457,7 @@
<string name="daltonizer_type_overridden" msgid="4509604753672535721">"Tämän ohittaa <xliff:g id="TITLE">%1$s</xliff:g>"</string>
<string name="power_remaining_settings_home_page" msgid="4885165789445462557">"<xliff:g id="PERCENTAGE">%1$s</xliff:g> – <xliff:g id="TIME_STRING">%2$s</xliff:g>"</string>
<string name="power_charging_on_hold_settings_home_page" msgid="7690464049464805856">"<xliff:g id="LEVEL">%1$s</xliff:g> – Lataus on keskeytetty akun suojaamiseksi"</string>
- <!-- no translation found for power_incompatible_charging_settings_home_page (1322050766135126880) -->
- <skip />
+ <string name="power_incompatible_charging_settings_home_page" msgid="1322050766135126880">"<xliff:g id="LEVEL">%1$s</xliff:g> – Tarkista latauslisävaruste"</string>
<string name="power_remaining_duration_only" msgid="8264199158671531431">"Noin <xliff:g id="TIME_REMAINING">%1$s</xliff:g> jäljellä"</string>
<string name="power_discharging_duration" msgid="1076561255466053220">"Noin <xliff:g id="TIME_REMAINING">%1$s</xliff:g> jäljellä (<xliff:g id="LEVEL">%2$s</xliff:g>)"</string>
<string name="power_remaining_duration_only_enhanced" msgid="2527842780666073218">"Noin <xliff:g id="TIME_REMAINING">%1$s</xliff:g> jäljellä käyttösi perusteella"</string>
diff --git a/packages/SettingsLib/res/values-fr-rCA/strings.xml b/packages/SettingsLib/res/values-fr-rCA/strings.xml
index 24de4cd..f97b36e 100644
--- a/packages/SettingsLib/res/values-fr-rCA/strings.xml
+++ b/packages/SettingsLib/res/values-fr-rCA/strings.xml
@@ -257,7 +257,7 @@
<string name="adb_wireless_verifying_qrcode_text" msgid="6123192424916029207">"Association de l\'appareil en cours…"</string>
<string name="adb_qrcode_pairing_device_failed_msg" msgid="6936292092592914132">"Échec de l\'association de l\'appareil Soit le code QR est incorrect, soit l\'appareil n\'est pas connecté au même réseau."</string>
<string name="adb_wireless_ip_addr_preference_title" msgid="8335132107715311730">"Adresse IP et port"</string>
- <string name="adb_wireless_qrcode_pairing_title" msgid="1906409667944674707">"Numériser le code QR"</string>
+ <string name="adb_wireless_qrcode_pairing_title" msgid="1906409667944674707">"Balayer le code QR"</string>
<string name="adb_wireless_qrcode_pairing_description" msgid="6014121407143607851">"Associer l\'appareil par Wi-Fi en numérisant un code QR"</string>
<string name="adb_wireless_no_network_msg" msgid="2365795244718494658">"Veuillez vous connecter à un réseau Wi-Fi"</string>
<string name="keywords_adb_wireless" msgid="6507505581882171240">"adb, débogage, développeur"</string>
@@ -457,8 +457,7 @@
<string name="daltonizer_type_overridden" msgid="4509604753672535721">"Remplacé par <xliff:g id="TITLE">%1$s</xliff:g>"</string>
<string name="power_remaining_settings_home_page" msgid="4885165789445462557">"<xliff:g id="PERCENTAGE">%1$s</xliff:g> : <xliff:g id="TIME_STRING">%2$s</xliff:g>"</string>
<string name="power_charging_on_hold_settings_home_page" msgid="7690464049464805856">"<xliff:g id="LEVEL">%1$s</xliff:g> – La recharge a été mise en pause pour protéger la pile"</string>
- <!-- no translation found for power_incompatible_charging_settings_home_page (1322050766135126880) -->
- <skip />
+ <string name="power_incompatible_charging_settings_home_page" msgid="1322050766135126880">"<xliff:g id="LEVEL">%1$s</xliff:g> – Vérifier l\'accessoire de recharge"</string>
<string name="power_remaining_duration_only" msgid="8264199158671531431">"Il reste environ <xliff:g id="TIME_REMAINING">%1$s</xliff:g>"</string>
<string name="power_discharging_duration" msgid="1076561255466053220">"Il reste environ <xliff:g id="TIME_REMAINING">%1$s</xliff:g> (<xliff:g id="LEVEL">%2$s</xliff:g>)"</string>
<string name="power_remaining_duration_only_enhanced" msgid="2527842780666073218">"Il reste environ <xliff:g id="TIME_REMAINING">%1$s</xliff:g> en fonction de votre usage"</string>
diff --git a/packages/SettingsLib/res/values-fr/strings.xml b/packages/SettingsLib/res/values-fr/strings.xml
index 8f61c8d..7f7ba63 100644
--- a/packages/SettingsLib/res/values-fr/strings.xml
+++ b/packages/SettingsLib/res/values-fr/strings.xml
@@ -457,8 +457,7 @@
<string name="daltonizer_type_overridden" msgid="4509604753672535721">"Remplacé par <xliff:g id="TITLE">%1$s</xliff:g>"</string>
<string name="power_remaining_settings_home_page" msgid="4885165789445462557">"<xliff:g id="PERCENTAGE">%1$s</xliff:g> – <xliff:g id="TIME_STRING">%2$s</xliff:g>"</string>
<string name="power_charging_on_hold_settings_home_page" msgid="7690464049464805856">"<xliff:g id="LEVEL">%1$s</xliff:g> - Recharge en pause pour protéger la batterie"</string>
- <!-- no translation found for power_incompatible_charging_settings_home_page (1322050766135126880) -->
- <skip />
+ <string name="power_incompatible_charging_settings_home_page" msgid="1322050766135126880">"<xliff:g id="LEVEL">%1$s</xliff:g> : vérifiez l\'accessoire de recharge"</string>
<string name="power_remaining_duration_only" msgid="8264199158671531431">"Temps restant : environ <xliff:g id="TIME_REMAINING">%1$s</xliff:g>"</string>
<string name="power_discharging_duration" msgid="1076561255466053220">"Temps restant : environ <xliff:g id="TIME_REMAINING">%1$s</xliff:g> (<xliff:g id="LEVEL">%2$s</xliff:g>)"</string>
<string name="power_remaining_duration_only_enhanced" msgid="2527842780666073218">"Temps restant en fonction de votre utilisation : environ <xliff:g id="TIME_REMAINING">%1$s</xliff:g>"</string>
diff --git a/packages/SettingsLib/res/values-gl/strings.xml b/packages/SettingsLib/res/values-gl/strings.xml
index 4cd9e2c..179d946 100644
--- a/packages/SettingsLib/res/values-gl/strings.xml
+++ b/packages/SettingsLib/res/values-gl/strings.xml
@@ -457,8 +457,7 @@
<string name="daltonizer_type_overridden" msgid="4509604753672535721">"Anulado por <xliff:g id="TITLE">%1$s</xliff:g>"</string>
<string name="power_remaining_settings_home_page" msgid="4885165789445462557">"<xliff:g id="PERCENTAGE">%1$s</xliff:g> - <xliff:g id="TIME_STRING">%2$s</xliff:g>"</string>
<string name="power_charging_on_hold_settings_home_page" msgid="7690464049464805856">"<xliff:g id="LEVEL">%1$s</xliff:g>. A carga púxose en pausa para protexer a batería"</string>
- <!-- no translation found for power_incompatible_charging_settings_home_page (1322050766135126880) -->
- <skip />
+ <string name="power_incompatible_charging_settings_home_page" msgid="1322050766135126880">"<xliff:g id="LEVEL">%1$s</xliff:g>. Comproba o accesorio de carga"</string>
<string name="power_remaining_duration_only" msgid="8264199158671531431">"Tempo restante aproximado: <xliff:g id="TIME_REMAINING">%1$s</xliff:g>"</string>
<string name="power_discharging_duration" msgid="1076561255466053220">"Tempo restante aproximado (<xliff:g id="LEVEL">%2$s</xliff:g>): <xliff:g id="TIME_REMAINING">%1$s</xliff:g>"</string>
<string name="power_remaining_duration_only_enhanced" msgid="2527842780666073218">"Tempo restante aproximado en función do uso: <xliff:g id="TIME_REMAINING">%1$s</xliff:g>"</string>
diff --git a/packages/SettingsLib/res/values-gu/strings.xml b/packages/SettingsLib/res/values-gu/strings.xml
index 15f9287..cafe86c 100644
--- a/packages/SettingsLib/res/values-gu/strings.xml
+++ b/packages/SettingsLib/res/values-gu/strings.xml
@@ -457,8 +457,7 @@
<string name="daltonizer_type_overridden" msgid="4509604753672535721">"<xliff:g id="TITLE">%1$s</xliff:g> દ્વારા ઓવરરાઇડ થયું"</string>
<string name="power_remaining_settings_home_page" msgid="4885165789445462557">"<xliff:g id="PERCENTAGE">%1$s</xliff:g> - <xliff:g id="TIME_STRING">%2$s</xliff:g>"</string>
<string name="power_charging_on_hold_settings_home_page" msgid="7690464049464805856">"<xliff:g id="LEVEL">%1$s</xliff:g> - બૅટરીને સુરક્ષિત રાખવા માટે, ચાર્જિંગ હોલ્ડ પર રાખવામાં આવ્યું છે"</string>
- <!-- no translation found for power_incompatible_charging_settings_home_page (1322050766135126880) -->
- <skip />
+ <string name="power_incompatible_charging_settings_home_page" msgid="1322050766135126880">"<xliff:g id="LEVEL">%1$s</xliff:g> - ચાર્જિંગ ઍક્સેસરી ચેક કરો"</string>
<string name="power_remaining_duration_only" msgid="8264199158671531431">"લગભગ <xliff:g id="TIME_REMAINING">%1$s</xliff:g> બાકી છે"</string>
<string name="power_discharging_duration" msgid="1076561255466053220">"લગભગ <xliff:g id="TIME_REMAINING">%1$s</xliff:g> બાકી છે (<xliff:g id="LEVEL">%2$s</xliff:g>)"</string>
<string name="power_remaining_duration_only_enhanced" msgid="2527842780666073218">"તમારા વપરાશના આધારે લગભગ <xliff:g id="TIME_REMAINING">%1$s</xliff:g> બાકી છે"</string>
diff --git a/packages/SettingsLib/res/values-hi/strings.xml b/packages/SettingsLib/res/values-hi/strings.xml
index 5c94489..53cf724 100644
--- a/packages/SettingsLib/res/values-hi/strings.xml
+++ b/packages/SettingsLib/res/values-hi/strings.xml
@@ -457,8 +457,7 @@
<string name="daltonizer_type_overridden" msgid="4509604753672535721">"<xliff:g id="TITLE">%1$s</xliff:g> के द्वारा ओवरराइड किया गया"</string>
<string name="power_remaining_settings_home_page" msgid="4885165789445462557">"<xliff:g id="PERCENTAGE">%1$s</xliff:g> - <xliff:g id="TIME_STRING">%2$s</xliff:g>"</string>
<string name="power_charging_on_hold_settings_home_page" msgid="7690464049464805856">"<xliff:g id="LEVEL">%1$s</xliff:g> - बैटरी को सुरक्षित रखने के लिए, फ़ोन को चार्ज होने से रोक दिया गया है"</string>
- <!-- no translation found for power_incompatible_charging_settings_home_page (1322050766135126880) -->
- <skip />
+ <string name="power_incompatible_charging_settings_home_page" msgid="1322050766135126880">"<xliff:g id="LEVEL">%1$s</xliff:g> - चार्जिंग ऐक्सेसरी की जांच करें"</string>
<string name="power_remaining_duration_only" msgid="8264199158671531431">"बैटरी करीब <xliff:g id="TIME_REMAINING">%1$s</xliff:g> में खत्म हो जाएगी"</string>
<string name="power_discharging_duration" msgid="1076561255466053220">"बैटरी करीब <xliff:g id="TIME_REMAINING">%1$s</xliff:g> में खत्म हो जाएगी (<xliff:g id="LEVEL">%2$s</xliff:g>)"</string>
<string name="power_remaining_duration_only_enhanced" msgid="2527842780666073218">"आपके इस्तेमाल के हिसाब से बैटरी करीब <xliff:g id="TIME_REMAINING">%1$s</xliff:g> में खत्म हो जाएगी"</string>
diff --git a/packages/SettingsLib/res/values-hr/strings.xml b/packages/SettingsLib/res/values-hr/strings.xml
index cc7b327..f06baad 100644
--- a/packages/SettingsLib/res/values-hr/strings.xml
+++ b/packages/SettingsLib/res/values-hr/strings.xml
@@ -457,8 +457,7 @@
<string name="daltonizer_type_overridden" msgid="4509604753672535721">"Premošćeno postavkom <xliff:g id="TITLE">%1$s</xliff:g>"</string>
<string name="power_remaining_settings_home_page" msgid="4885165789445462557">"<xliff:g id="PERCENTAGE">%1$s</xliff:g> – <xliff:g id="TIME_STRING">%2$s</xliff:g>"</string>
<string name="power_charging_on_hold_settings_home_page" msgid="7690464049464805856">"<xliff:g id="LEVEL">%1$s</xliff:g> – punjenje je pauzirano radi zaštite baterije"</string>
- <!-- no translation found for power_incompatible_charging_settings_home_page (1322050766135126880) -->
- <skip />
+ <string name="power_incompatible_charging_settings_home_page" msgid="1322050766135126880">"<xliff:g id="LEVEL">%1$s</xliff:g> – provjerite dodatak za punjenje"</string>
<string name="power_remaining_duration_only" msgid="8264199158671531431">"Još oko <xliff:g id="TIME_REMAINING">%1$s</xliff:g>"</string>
<string name="power_discharging_duration" msgid="1076561255466053220">"Još otprilike <xliff:g id="TIME_REMAINING">%1$s</xliff:g> (<xliff:g id="LEVEL">%2$s</xliff:g>)"</string>
<string name="power_remaining_duration_only_enhanced" msgid="2527842780666073218">"Još otprilike <xliff:g id="TIME_REMAINING">%1$s</xliff:g> na temelju vaše upotrebe"</string>
diff --git a/packages/SettingsLib/res/values-hu/strings.xml b/packages/SettingsLib/res/values-hu/strings.xml
index e9fd9db..39d905f 100644
--- a/packages/SettingsLib/res/values-hu/strings.xml
+++ b/packages/SettingsLib/res/values-hu/strings.xml
@@ -457,8 +457,7 @@
<string name="daltonizer_type_overridden" msgid="4509604753672535721">"Felülírva erre: <xliff:g id="TITLE">%1$s</xliff:g>"</string>
<string name="power_remaining_settings_home_page" msgid="4885165789445462557">"<xliff:g id="PERCENTAGE">%1$s</xliff:g> – <xliff:g id="TIME_STRING">%2$s</xliff:g>"</string>
<string name="power_charging_on_hold_settings_home_page" msgid="7690464049464805856">"<xliff:g id="LEVEL">%1$s</xliff:g> – Az akkumulátor védelme érdekében a töltés szünetel"</string>
- <!-- no translation found for power_incompatible_charging_settings_home_page (1322050766135126880) -->
- <skip />
+ <string name="power_incompatible_charging_settings_home_page" msgid="1322050766135126880">"<xliff:g id="LEVEL">%1$s</xliff:g> – Ellenőrizze a töltőtartozékot"</string>
<string name="power_remaining_duration_only" msgid="8264199158671531431">"Körülbelül <xliff:g id="TIME_REMAINING">%1$s</xliff:g> maradt hátra"</string>
<string name="power_discharging_duration" msgid="1076561255466053220">"Körülbelül <xliff:g id="TIME_REMAINING">%1$s</xliff:g> maradt hátra (<xliff:g id="LEVEL">%2$s</xliff:g>)"</string>
<string name="power_remaining_duration_only_enhanced" msgid="2527842780666073218">"Körülbelül <xliff:g id="TIME_REMAINING">%1$s</xliff:g> maradt hátra az eszköz használata alapján"</string>
diff --git a/packages/SettingsLib/res/values-hy/strings.xml b/packages/SettingsLib/res/values-hy/strings.xml
index d6b3560..55f09e2 100644
--- a/packages/SettingsLib/res/values-hy/strings.xml
+++ b/packages/SettingsLib/res/values-hy/strings.xml
@@ -457,8 +457,7 @@
<string name="daltonizer_type_overridden" msgid="4509604753672535721">"Գերազանցված է <xliff:g id="TITLE">%1$s</xliff:g>-ից"</string>
<string name="power_remaining_settings_home_page" msgid="4885165789445462557">"<xliff:g id="PERCENTAGE">%1$s</xliff:g> – <xliff:g id="TIME_STRING">%2$s</xliff:g>"</string>
<string name="power_charging_on_hold_settings_home_page" msgid="7690464049464805856">"<xliff:g id="LEVEL">%1$s</xliff:g> – Լիցքավորումը դադարեցվել է՝ մարտկոցը պաշտպանելու համար"</string>
- <!-- no translation found for power_incompatible_charging_settings_home_page (1322050766135126880) -->
- <skip />
+ <string name="power_incompatible_charging_settings_home_page" msgid="1322050766135126880">"<xliff:g id="LEVEL">%1$s</xliff:g> – Ստուգեք լիցքավորիչը"</string>
<string name="power_remaining_duration_only" msgid="8264199158671531431">"Լիցքը կբավարարի մոտ <xliff:g id="TIME_REMAINING">%1$s</xliff:g>"</string>
<string name="power_discharging_duration" msgid="1076561255466053220">"Լիցքը (<xliff:g id="LEVEL">%2$s</xliff:g>) կբավարարի մոտ <xliff:g id="TIME_REMAINING">%1$s</xliff:g>"</string>
<string name="power_remaining_duration_only_enhanced" msgid="2527842780666073218">"Լիցքը կբավարարի մոտ <xliff:g id="TIME_REMAINING">%1$s</xliff:g>՝ կախված օգտագործման եղանակից"</string>
diff --git a/packages/SettingsLib/res/values-in/strings.xml b/packages/SettingsLib/res/values-in/strings.xml
index 398853a..885729d 100644
--- a/packages/SettingsLib/res/values-in/strings.xml
+++ b/packages/SettingsLib/res/values-in/strings.xml
@@ -457,8 +457,7 @@
<string name="daltonizer_type_overridden" msgid="4509604753672535721">"Digantikan oleh <xliff:g id="TITLE">%1$s</xliff:g>"</string>
<string name="power_remaining_settings_home_page" msgid="4885165789445462557">"<xliff:g id="PERCENTAGE">%1$s</xliff:g> - <xliff:g id="TIME_STRING">%2$s</xliff:g>"</string>
<string name="power_charging_on_hold_settings_home_page" msgid="7690464049464805856">"<xliff:g id="LEVEL">%1$s</xliff:g> - Pengisian daya dihentikan sementara untuk melindungi baterai"</string>
- <!-- no translation found for power_incompatible_charging_settings_home_page (1322050766135126880) -->
- <skip />
+ <string name="power_incompatible_charging_settings_home_page" msgid="1322050766135126880">"<xliff:g id="LEVEL">%1$s</xliff:g> - Periksa aksesori pengisian daya"</string>
<string name="power_remaining_duration_only" msgid="8264199158671531431">"Sekitar <xliff:g id="TIME_REMAINING">%1$s</xliff:g> lagi"</string>
<string name="power_discharging_duration" msgid="1076561255466053220">"Sekitar <xliff:g id="TIME_REMAINING">%1$s</xliff:g> lagi (<xliff:g id="LEVEL">%2$s</xliff:g>)"</string>
<string name="power_remaining_duration_only_enhanced" msgid="2527842780666073218">"Sekitar <xliff:g id="TIME_REMAINING">%1$s</xliff:g> lagi berdasarkan penggunaan Anda"</string>
diff --git a/packages/SettingsLib/res/values-is/strings.xml b/packages/SettingsLib/res/values-is/strings.xml
index 2be92e5..020191b 100644
--- a/packages/SettingsLib/res/values-is/strings.xml
+++ b/packages/SettingsLib/res/values-is/strings.xml
@@ -457,8 +457,7 @@
<string name="daltonizer_type_overridden" msgid="4509604753672535721">"Hnekkt af <xliff:g id="TITLE">%1$s</xliff:g>"</string>
<string name="power_remaining_settings_home_page" msgid="4885165789445462557">"<xliff:g id="PERCENTAGE">%1$s</xliff:g> – <xliff:g id="TIME_STRING">%2$s</xliff:g>"</string>
<string name="power_charging_on_hold_settings_home_page" msgid="7690464049464805856">"<xliff:g id="LEVEL">%1$s</xliff:g> – Hleðsla í bið til að vernda rafhlöðuna"</string>
- <!-- no translation found for power_incompatible_charging_settings_home_page (1322050766135126880) -->
- <skip />
+ <string name="power_incompatible_charging_settings_home_page" msgid="1322050766135126880">"<xliff:g id="LEVEL">%1$s</xliff:g> – Athugaðu hleðslubúnaðinn"</string>
<string name="power_remaining_duration_only" msgid="8264199158671531431">"Um það bil <xliff:g id="TIME_REMAINING">%1$s</xliff:g> eftir"</string>
<string name="power_discharging_duration" msgid="1076561255466053220">"Um það bil <xliff:g id="TIME_REMAINING">%1$s</xliff:g> eftir (<xliff:g id="LEVEL">%2$s</xliff:g>)"</string>
<string name="power_remaining_duration_only_enhanced" msgid="2527842780666073218">"Um það bil <xliff:g id="TIME_REMAINING">%1$s</xliff:g> eftir miðað við notkun þína"</string>
diff --git a/packages/SettingsLib/res/values-it/strings.xml b/packages/SettingsLib/res/values-it/strings.xml
index 3dc69e8..37a2067 100644
--- a/packages/SettingsLib/res/values-it/strings.xml
+++ b/packages/SettingsLib/res/values-it/strings.xml
@@ -457,8 +457,7 @@
<string name="daltonizer_type_overridden" msgid="4509604753672535721">"Valore sostituito da <xliff:g id="TITLE">%1$s</xliff:g>"</string>
<string name="power_remaining_settings_home_page" msgid="4885165789445462557">"<xliff:g id="PERCENTAGE">%1$s</xliff:g> - <xliff:g id="TIME_STRING">%2$s</xliff:g>"</string>
<string name="power_charging_on_hold_settings_home_page" msgid="7690464049464805856">"<xliff:g id="LEVEL">%1$s</xliff:g> - Ricarica in sospeso per proteggere la batteria"</string>
- <!-- no translation found for power_incompatible_charging_settings_home_page (1322050766135126880) -->
- <skip />
+ <string name="power_incompatible_charging_settings_home_page" msgid="1322050766135126880">"<xliff:g id="LEVEL">%1$s</xliff:g> - Controlla l\'accessorio di ricarica"</string>
<string name="power_remaining_duration_only" msgid="8264199158671531431">"Tempo rimanente: <xliff:g id="TIME_REMAINING">%1$s</xliff:g> circa"</string>
<string name="power_discharging_duration" msgid="1076561255466053220">"Tempo rimanente: <xliff:g id="TIME_REMAINING">%1$s</xliff:g> circa (<xliff:g id="LEVEL">%2$s</xliff:g>)"</string>
<string name="power_remaining_duration_only_enhanced" msgid="2527842780666073218">"Tempo rimanente in base al tuo utilizzo: <xliff:g id="TIME_REMAINING">%1$s</xliff:g> circa"</string>
diff --git a/packages/SettingsLib/res/values-ja/strings.xml b/packages/SettingsLib/res/values-ja/strings.xml
index 9ef9cf1..d87d0f8 100644
--- a/packages/SettingsLib/res/values-ja/strings.xml
+++ b/packages/SettingsLib/res/values-ja/strings.xml
@@ -457,8 +457,7 @@
<string name="daltonizer_type_overridden" msgid="4509604753672535721">"<xliff:g id="TITLE">%1$s</xliff:g>によって上書き済み"</string>
<string name="power_remaining_settings_home_page" msgid="4885165789445462557">"<xliff:g id="PERCENTAGE">%1$s</xliff:g> - <xliff:g id="TIME_STRING">%2$s</xliff:g>"</string>
<string name="power_charging_on_hold_settings_home_page" msgid="7690464049464805856">"<xliff:g id="LEVEL">%1$s</xliff:g> - バッテリーを保護するため、充電を一時停止しています"</string>
- <!-- no translation found for power_incompatible_charging_settings_home_page (1322050766135126880) -->
- <skip />
+ <string name="power_incompatible_charging_settings_home_page" msgid="1322050766135126880">"<xliff:g id="LEVEL">%1$s</xliff:g> - 充電用アクセサリを確認してください"</string>
<string name="power_remaining_duration_only" msgid="8264199158671531431">"残り時間: 約 <xliff:g id="TIME_REMAINING">%1$s</xliff:g>"</string>
<string name="power_discharging_duration" msgid="1076561255466053220">"残り時間: 約 <xliff:g id="TIME_REMAINING">%1$s</xliff:g>(<xliff:g id="LEVEL">%2$s</xliff:g>)"</string>
<string name="power_remaining_duration_only_enhanced" msgid="2527842780666073218">"残り時間: 約 <xliff:g id="TIME_REMAINING">%1$s</xliff:g>(使用状況に基づく)"</string>
diff --git a/packages/SettingsLib/res/values-ka/strings.xml b/packages/SettingsLib/res/values-ka/strings.xml
index 4ddb005..7812f0b 100644
--- a/packages/SettingsLib/res/values-ka/strings.xml
+++ b/packages/SettingsLib/res/values-ka/strings.xml
@@ -457,8 +457,7 @@
<string name="daltonizer_type_overridden" msgid="4509604753672535721">"უკუგებულია <xliff:g id="TITLE">%1$s</xliff:g>-ის მიერ"</string>
<string name="power_remaining_settings_home_page" msgid="4885165789445462557">"<xliff:g id="PERCENTAGE">%1$s</xliff:g> - <xliff:g id="TIME_STRING">%2$s</xliff:g>"</string>
<string name="power_charging_on_hold_settings_home_page" msgid="7690464049464805856">"<xliff:g id="LEVEL">%1$s</xliff:g> – დატენვა შეჩერებულია ბატარეის დასაცავად"</string>
- <!-- no translation found for power_incompatible_charging_settings_home_page (1322050766135126880) -->
- <skip />
+ <string name="power_incompatible_charging_settings_home_page" msgid="1322050766135126880">"<xliff:g id="LEVEL">%1$s</xliff:g>: მიმდინარეობს დამტენი აქსესუარის შემოწმება"</string>
<string name="power_remaining_duration_only" msgid="8264199158671531431">"დარჩა დაახლოებით <xliff:g id="TIME_REMAINING">%1$s</xliff:g>"</string>
<string name="power_discharging_duration" msgid="1076561255466053220">"დარჩა დაახლოებით <xliff:g id="TIME_REMAINING">%1$s</xliff:g> (<xliff:g id="LEVEL">%2$s</xliff:g>)"</string>
<string name="power_remaining_duration_only_enhanced" msgid="2527842780666073218">"დარჩა დაახლოებით <xliff:g id="TIME_REMAINING">%1$s</xliff:g>, ბატარეის მოხმარების გათვალისწინებით"</string>
diff --git a/packages/SettingsLib/res/values-kk/strings.xml b/packages/SettingsLib/res/values-kk/strings.xml
index fa46e8e..300d4e5 100644
--- a/packages/SettingsLib/res/values-kk/strings.xml
+++ b/packages/SettingsLib/res/values-kk/strings.xml
@@ -457,8 +457,7 @@
<string name="daltonizer_type_overridden" msgid="4509604753672535721">"<xliff:g id="TITLE">%1$s</xliff:g> үстінен басқан"</string>
<string name="power_remaining_settings_home_page" msgid="4885165789445462557">"<xliff:g id="PERCENTAGE">%1$s</xliff:g> – <xliff:g id="TIME_STRING">%2$s</xliff:g>"</string>
<string name="power_charging_on_hold_settings_home_page" msgid="7690464049464805856">"<xliff:g id="LEVEL">%1$s</xliff:g>: батареяны қорғау үшін зарядтау кідіртіледі."</string>
- <!-- no translation found for power_incompatible_charging_settings_home_page (1322050766135126880) -->
- <skip />
+ <string name="power_incompatible_charging_settings_home_page" msgid="1322050766135126880">"<xliff:g id="LEVEL">%1$s</xliff:g> – зарядтау құрылғысын тексеріңіз"</string>
<string name="power_remaining_duration_only" msgid="8264199158671531431">"Шамамен <xliff:g id="TIME_REMAINING">%1$s</xliff:g> қалды"</string>
<string name="power_discharging_duration" msgid="1076561255466053220">"Шамамен <xliff:g id="TIME_REMAINING">%1$s</xliff:g> қалды (<xliff:g id="LEVEL">%2$s</xliff:g>)"</string>
<string name="power_remaining_duration_only_enhanced" msgid="2527842780666073218">"Пайдалану деректеріңізге сәйкес енді шамамен <xliff:g id="TIME_REMAINING">%1$s</xliff:g> қалды"</string>
diff --git a/packages/SettingsLib/res/values-km/strings.xml b/packages/SettingsLib/res/values-km/strings.xml
index cd2a6c4..373cfc6 100644
--- a/packages/SettingsLib/res/values-km/strings.xml
+++ b/packages/SettingsLib/res/values-km/strings.xml
@@ -457,8 +457,7 @@
<string name="daltonizer_type_overridden" msgid="4509604753672535721">"បដិសេធដោយ <xliff:g id="TITLE">%1$s</xliff:g>"</string>
<string name="power_remaining_settings_home_page" msgid="4885165789445462557">"<xliff:g id="PERCENTAGE">%1$s</xliff:g> - <xliff:g id="TIME_STRING">%2$s</xliff:g>"</string>
<string name="power_charging_on_hold_settings_home_page" msgid="7690464049464805856">"<xliff:g id="LEVEL">%1$s</xliff:g> - កំពុងផ្អាកការសាកថ្ម ដើម្បីការពារថ្ម"</string>
- <!-- no translation found for power_incompatible_charging_settings_home_page (1322050766135126880) -->
- <skip />
+ <string name="power_incompatible_charging_settings_home_page" msgid="1322050766135126880">"<xliff:g id="LEVEL">%1$s</xliff:g> - ពិនិត្យមើលគ្រឿងសាកថ្ម"</string>
<string name="power_remaining_duration_only" msgid="8264199158671531431">"នៅសល់ប្រហែល <xliff:g id="TIME_REMAINING">%1$s</xliff:g> ទៀត"</string>
<string name="power_discharging_duration" msgid="1076561255466053220">"នៅសល់ប្រហែល <xliff:g id="TIME_REMAINING">%1$s</xliff:g> ទៀត (<xliff:g id="LEVEL">%2$s</xliff:g>)"</string>
<string name="power_remaining_duration_only_enhanced" msgid="2527842780666073218">"នៅសល់ប្រហែល <xliff:g id="TIME_REMAINING">%1$s</xliff:g> ទៀត ផ្អែកលើការប្រើប្រាស់របស់អ្នក"</string>
diff --git a/packages/SettingsLib/res/values-kn/strings.xml b/packages/SettingsLib/res/values-kn/strings.xml
index a01a4bd..bf84cc48 100644
--- a/packages/SettingsLib/res/values-kn/strings.xml
+++ b/packages/SettingsLib/res/values-kn/strings.xml
@@ -457,8 +457,7 @@
<string name="daltonizer_type_overridden" msgid="4509604753672535721">"<xliff:g id="TITLE">%1$s</xliff:g> ಮೂಲಕ ಅತಿಕ್ರಮಿಸುತ್ತದೆ"</string>
<string name="power_remaining_settings_home_page" msgid="4885165789445462557">"<xliff:g id="PERCENTAGE">%1$s</xliff:g> - <xliff:g id="TIME_STRING">%2$s</xliff:g>"</string>
<string name="power_charging_on_hold_settings_home_page" msgid="7690464049464805856">"<xliff:g id="LEVEL">%1$s</xliff:g> - ಬ್ಯಾಟರಿಯನ್ನು ರಕ್ಷಿಸಲು ಚಾರ್ಜಿಂಗ್ ಅನ್ನು ಹೋಲ್ಡ್ ಮಾಡಲಾಗಿದೆ"</string>
- <!-- no translation found for power_incompatible_charging_settings_home_page (1322050766135126880) -->
- <skip />
+ <string name="power_incompatible_charging_settings_home_page" msgid="1322050766135126880">"<xliff:g id="LEVEL">%1$s</xliff:g> - ಚಾರ್ಜಿಂಗ್ ಆ್ಯಕ್ಸೆಸರಿಯನ್ನು ಪರಿಶೀಲಿಸಿ"</string>
<string name="power_remaining_duration_only" msgid="8264199158671531431">"<xliff:g id="TIME_REMAINING">%1$s</xliff:g> ಸಮಯ ಬಾಕಿ ಉಳಿದಿದೆ"</string>
<string name="power_discharging_duration" msgid="1076561255466053220">"(<xliff:g id="LEVEL">%2$s</xliff:g>) ತಲುಪಲು <xliff:g id="TIME_REMAINING">%1$s</xliff:g> ಸಮಯ ಬಾಕಿ ಉಳಿದಿದೆ"</string>
<string name="power_remaining_duration_only_enhanced" msgid="2527842780666073218">"ನಿಮ್ಮ ಬಳಕೆಯ ಆಧಾರದ ಮೇಲೆ ಸುಮಾರು <xliff:g id="TIME_REMAINING">%1$s</xliff:g> ಸಮಯ ಬಾಕಿ ಉಳಿದಿದೆ"</string>
diff --git a/packages/SettingsLib/res/values-ko/strings.xml b/packages/SettingsLib/res/values-ko/strings.xml
index c9c92e5..b184ef4 100644
--- a/packages/SettingsLib/res/values-ko/strings.xml
+++ b/packages/SettingsLib/res/values-ko/strings.xml
@@ -457,8 +457,7 @@
<string name="daltonizer_type_overridden" msgid="4509604753672535721">"<xliff:g id="TITLE">%1$s</xliff:g> 우선 적용됨"</string>
<string name="power_remaining_settings_home_page" msgid="4885165789445462557">"<xliff:g id="PERCENTAGE">%1$s</xliff:g>, <xliff:g id="TIME_STRING">%2$s</xliff:g>"</string>
<string name="power_charging_on_hold_settings_home_page" msgid="7690464049464805856">"<xliff:g id="LEVEL">%1$s</xliff:g> - 배터리 보호를 위해 충전 일시중지"</string>
- <!-- no translation found for power_incompatible_charging_settings_home_page (1322050766135126880) -->
- <skip />
+ <string name="power_incompatible_charging_settings_home_page" msgid="1322050766135126880">"<xliff:g id="LEVEL">%1$s</xliff:g> - 충전 액세서리 확인"</string>
<string name="power_remaining_duration_only" msgid="8264199158671531431">"남은 시간: 약 <xliff:g id="TIME_REMAINING">%1$s</xliff:g>"</string>
<string name="power_discharging_duration" msgid="1076561255466053220">"남은 시간 약 <xliff:g id="TIME_REMAINING">%1$s</xliff:g>(<xliff:g id="LEVEL">%2$s</xliff:g>)"</string>
<string name="power_remaining_duration_only_enhanced" msgid="2527842780666073218">"내 사용량을 기준으로 약 <xliff:g id="TIME_REMAINING">%1$s</xliff:g> 남음"</string>
diff --git a/packages/SettingsLib/res/values-ky/strings.xml b/packages/SettingsLib/res/values-ky/strings.xml
index 44b0147..e565e44 100644
--- a/packages/SettingsLib/res/values-ky/strings.xml
+++ b/packages/SettingsLib/res/values-ky/strings.xml
@@ -457,8 +457,7 @@
<string name="daltonizer_type_overridden" msgid="4509604753672535721">"<xliff:g id="TITLE">%1$s</xliff:g> менен алмаштырылган"</string>
<string name="power_remaining_settings_home_page" msgid="4885165789445462557">"<xliff:g id="PERCENTAGE">%1$s</xliff:g> – <xliff:g id="TIME_STRING">%2$s</xliff:g>"</string>
<string name="power_charging_on_hold_settings_home_page" msgid="7690464049464805856">"<xliff:g id="LEVEL">%1$s</xliff:g> - Батареяны коргоо үчүн кубаттоо тындырылды"</string>
- <!-- no translation found for power_incompatible_charging_settings_home_page (1322050766135126880) -->
- <skip />
+ <string name="power_incompatible_charging_settings_home_page" msgid="1322050766135126880">"<xliff:g id="LEVEL">%1$s</xliff:g> - Кубаттоо шайманын текшериңиз"</string>
<string name="power_remaining_duration_only" msgid="8264199158671531431">"Болжол менен <xliff:g id="TIME_REMAINING">%1$s</xliff:g> калды"</string>
<string name="power_discharging_duration" msgid="1076561255466053220">"Болжол менен <xliff:g id="TIME_REMAINING">%1$s</xliff:g> калды (<xliff:g id="LEVEL">%2$s</xliff:g>)"</string>
<string name="power_remaining_duration_only_enhanced" msgid="2527842780666073218">"Колдонгонуңузга караганда болжол менен <xliff:g id="TIME_REMAINING">%1$s</xliff:g> калды"</string>
diff --git a/packages/SettingsLib/res/values-lo/strings.xml b/packages/SettingsLib/res/values-lo/strings.xml
index 70e9b68..6caaf95 100644
--- a/packages/SettingsLib/res/values-lo/strings.xml
+++ b/packages/SettingsLib/res/values-lo/strings.xml
@@ -457,8 +457,7 @@
<string name="daltonizer_type_overridden" msgid="4509604753672535721">"ຖືກແທນໂດຍ <xliff:g id="TITLE">%1$s</xliff:g>"</string>
<string name="power_remaining_settings_home_page" msgid="4885165789445462557">"<xliff:g id="PERCENTAGE">%1$s</xliff:g> - <xliff:g id="TIME_STRING">%2$s</xliff:g>"</string>
<string name="power_charging_on_hold_settings_home_page" msgid="7690464049464805856">"<xliff:g id="LEVEL">%1$s</xliff:g> - ຢຸດການສາກຊົ່ວຄາວເພື່ອປົກປ້ອງແບັດເຕີຣີ"</string>
- <!-- no translation found for power_incompatible_charging_settings_home_page (1322050766135126880) -->
- <skip />
+ <string name="power_incompatible_charging_settings_home_page" msgid="1322050766135126880">"<xliff:g id="LEVEL">%1$s</xliff:g> - ກວດສອບອຸປະກອນເສີມສຳລັບການສາກ"</string>
<string name="power_remaining_duration_only" msgid="8264199158671531431">"ເຫຼືອອີກປະມານ <xliff:g id="TIME_REMAINING">%1$s</xliff:g>"</string>
<string name="power_discharging_duration" msgid="1076561255466053220">"ເຫຼືອອີກປະມານ <xliff:g id="TIME_REMAINING">%1$s</xliff:g> (<xliff:g id="LEVEL">%2$s</xliff:g>)"</string>
<string name="power_remaining_duration_only_enhanced" msgid="2527842780666073218">"ເຫຼືອອີກປະມານ <xliff:g id="TIME_REMAINING">%1$s</xliff:g> ອ້າງອີງຈາກການນຳໃຊ້ຂອງທ່ານ"</string>
diff --git a/packages/SettingsLib/res/values-mk/strings.xml b/packages/SettingsLib/res/values-mk/strings.xml
index d50634c..70bcc210 100644
--- a/packages/SettingsLib/res/values-mk/strings.xml
+++ b/packages/SettingsLib/res/values-mk/strings.xml
@@ -457,8 +457,7 @@
<string name="daltonizer_type_overridden" msgid="4509604753672535721">"Прескокнато според <xliff:g id="TITLE">%1$s</xliff:g>"</string>
<string name="power_remaining_settings_home_page" msgid="4885165789445462557">"<xliff:g id="PERCENTAGE">%1$s</xliff:g> - <xliff:g id="TIME_STRING">%2$s</xliff:g>"</string>
<string name="power_charging_on_hold_settings_home_page" msgid="7690464049464805856">"<xliff:g id="LEVEL">%1$s</xliff:g> - полнењето е паузирано за да се заштити батеријата"</string>
- <!-- no translation found for power_incompatible_charging_settings_home_page (1322050766135126880) -->
- <skip />
+ <string name="power_incompatible_charging_settings_home_page" msgid="1322050766135126880">"<xliff:g id="LEVEL">%1$s</xliff:g> - Проверете го додатокот за полнење"</string>
<string name="power_remaining_duration_only" msgid="8264199158671531431">"Уште околу <xliff:g id="TIME_REMAINING">%1$s</xliff:g>"</string>
<string name="power_discharging_duration" msgid="1076561255466053220">"Уште околу <xliff:g id="TIME_REMAINING">%1$s</xliff:g> (<xliff:g id="LEVEL">%2$s</xliff:g>)"</string>
<string name="power_remaining_duration_only_enhanced" msgid="2527842780666073218">"Уште околу <xliff:g id="TIME_REMAINING">%1$s</xliff:g> според вашето користење"</string>
diff --git a/packages/SettingsLib/res/values-ml/strings.xml b/packages/SettingsLib/res/values-ml/strings.xml
index 085b7c1..9a297e5 100644
--- a/packages/SettingsLib/res/values-ml/strings.xml
+++ b/packages/SettingsLib/res/values-ml/strings.xml
@@ -457,8 +457,7 @@
<string name="daltonizer_type_overridden" msgid="4509604753672535721">"<xliff:g id="TITLE">%1$s</xliff:g> ഉപയോഗിച്ച് അസാധുവാക്കി"</string>
<string name="power_remaining_settings_home_page" msgid="4885165789445462557">"<xliff:g id="PERCENTAGE">%1$s</xliff:g> - <xliff:g id="TIME_STRING">%2$s</xliff:g>"</string>
<string name="power_charging_on_hold_settings_home_page" msgid="7690464049464805856">"<xliff:g id="LEVEL">%1$s</xliff:g> - ബാറ്ററി പരിരക്ഷിക്കാൻ ചാർജിംഗ് ഹോൾഡിലാണ്"</string>
- <!-- no translation found for power_incompatible_charging_settings_home_page (1322050766135126880) -->
- <skip />
+ <string name="power_incompatible_charging_settings_home_page" msgid="1322050766135126880">"<xliff:g id="LEVEL">%1$s</xliff:g> - ചാർജിംഗ് ആക്സസറി പരിശോധിക്കുക"</string>
<string name="power_remaining_duration_only" msgid="8264199158671531431">"ഏതാണ്ട് <xliff:g id="TIME_REMAINING">%1$s</xliff:g> ശേഷിക്കുന്നു"</string>
<string name="power_discharging_duration" msgid="1076561255466053220">"ഏതാണ്ട് <xliff:g id="TIME_REMAINING">%1$s</xliff:g> ശേഷിക്കുന്നു (<xliff:g id="LEVEL">%2$s</xliff:g>)"</string>
<string name="power_remaining_duration_only_enhanced" msgid="2527842780666073218">"നിങ്ങളുടെ ഉപയോഗത്തെ അടിസ്ഥാനമാക്കി ഏതാണ്ട് <xliff:g id="TIME_REMAINING">%1$s</xliff:g> ശേഷിക്കുന്നു"</string>
diff --git a/packages/SettingsLib/res/values-mn/strings.xml b/packages/SettingsLib/res/values-mn/strings.xml
index 60a31e8..000e306 100644
--- a/packages/SettingsLib/res/values-mn/strings.xml
+++ b/packages/SettingsLib/res/values-mn/strings.xml
@@ -457,8 +457,7 @@
<string name="daltonizer_type_overridden" msgid="4509604753672535721">"Давхарласан <xliff:g id="TITLE">%1$s</xliff:g>"</string>
<string name="power_remaining_settings_home_page" msgid="4885165789445462557">"<xliff:g id="PERCENTAGE">%1$s</xliff:g> - <xliff:g id="TIME_STRING">%2$s</xliff:g>"</string>
<string name="power_charging_on_hold_settings_home_page" msgid="7690464049464805856">"<xliff:g id="LEVEL">%1$s</xliff:g> - Батарейг хамгаалахын тулд цэнэглэхийг хүлээлгэсэн"</string>
- <!-- no translation found for power_incompatible_charging_settings_home_page (1322050766135126880) -->
- <skip />
+ <string name="power_incompatible_charging_settings_home_page" msgid="1322050766135126880">"<xliff:g id="LEVEL">%1$s</xliff:g> - Цэнэглэх нэмэлт хэрэгслийг шалгах"</string>
<string name="power_remaining_duration_only" msgid="8264199158671531431">"Ойролцоогоор <xliff:g id="TIME_REMAINING">%1$s</xliff:g> үлдсэн"</string>
<string name="power_discharging_duration" msgid="1076561255466053220">"Ойролцоогоор <xliff:g id="TIME_REMAINING">%1$s</xliff:g> үлдсэн (<xliff:g id="LEVEL">%2$s</xliff:g>)"</string>
<string name="power_remaining_duration_only_enhanced" msgid="2527842780666073218">"Таны хэрэглээнд үндэслэн ойролцоогоор <xliff:g id="TIME_REMAINING">%1$s</xliff:g> үлдсэн"</string>
diff --git a/packages/SettingsLib/res/values-mr/strings.xml b/packages/SettingsLib/res/values-mr/strings.xml
index 32de0e5..6af0fbd 100644
--- a/packages/SettingsLib/res/values-mr/strings.xml
+++ b/packages/SettingsLib/res/values-mr/strings.xml
@@ -457,8 +457,7 @@
<string name="daltonizer_type_overridden" msgid="4509604753672535721">"<xliff:g id="TITLE">%1$s</xliff:g> द्वारे अधिलिखित"</string>
<string name="power_remaining_settings_home_page" msgid="4885165789445462557">"<xliff:g id="PERCENTAGE">%1$s</xliff:g> - <xliff:g id="TIME_STRING">%2$s</xliff:g>"</string>
<string name="power_charging_on_hold_settings_home_page" msgid="7690464049464805856">"<xliff:g id="LEVEL">%1$s</xliff:g> - बॅटरीचे संरक्षण करण्यासाठी चार्जिंग थांबवले आहे"</string>
- <!-- no translation found for power_incompatible_charging_settings_home_page (1322050766135126880) -->
- <skip />
+ <string name="power_incompatible_charging_settings_home_page" msgid="1322050766135126880">"<xliff:g id="LEVEL">%1$s</xliff:g> - चार्जिंगसंबंधित ॲक्सेसरी तपासा"</string>
<string name="power_remaining_duration_only" msgid="8264199158671531431">"अंदाजे <xliff:g id="TIME_REMAINING">%1$s</xliff:g> बाकी आहे"</string>
<string name="power_discharging_duration" msgid="1076561255466053220">"अंदाजे <xliff:g id="TIME_REMAINING">%1$s</xliff:g> बाकी आहे (<xliff:g id="LEVEL">%2$s</xliff:g>)"</string>
<string name="power_remaining_duration_only_enhanced" msgid="2527842780666073218">"तुमच्या वापरावर आधारित अंदाजे <xliff:g id="TIME_REMAINING">%1$s</xliff:g> बाकी आहे"</string>
diff --git a/packages/SettingsLib/res/values-ms/strings.xml b/packages/SettingsLib/res/values-ms/strings.xml
index f0abd94..621b469 100644
--- a/packages/SettingsLib/res/values-ms/strings.xml
+++ b/packages/SettingsLib/res/values-ms/strings.xml
@@ -457,8 +457,7 @@
<string name="daltonizer_type_overridden" msgid="4509604753672535721">"Diatasi oleh <xliff:g id="TITLE">%1$s</xliff:g>"</string>
<string name="power_remaining_settings_home_page" msgid="4885165789445462557">"<xliff:g id="PERCENTAGE">%1$s</xliff:g> - <xliff:g id="TIME_STRING">%2$s</xliff:g>"</string>
<string name="power_charging_on_hold_settings_home_page" msgid="7690464049464805856">"<xliff:g id="LEVEL">%1$s</xliff:g> - Pengecasan ditunda untuk melindungi bateri"</string>
- <!-- no translation found for power_incompatible_charging_settings_home_page (1322050766135126880) -->
- <skip />
+ <string name="power_incompatible_charging_settings_home_page" msgid="1322050766135126880">"<xliff:g id="LEVEL">%1$s</xliff:g> - Periksa aksesori pengecasan"</string>
<string name="power_remaining_duration_only" msgid="8264199158671531431">"Kira-kira <xliff:g id="TIME_REMAINING">%1$s</xliff:g> lagi"</string>
<string name="power_discharging_duration" msgid="1076561255466053220">"Kira-kira <xliff:g id="TIME_REMAINING">%1$s</xliff:g> lagi (<xliff:g id="LEVEL">%2$s</xliff:g>)"</string>
<string name="power_remaining_duration_only_enhanced" msgid="2527842780666073218">"Kira-kira <xliff:g id="TIME_REMAINING">%1$s</xliff:g> lagi berdasarkan penggunaan anda"</string>
diff --git a/packages/SettingsLib/res/values-my/strings.xml b/packages/SettingsLib/res/values-my/strings.xml
index 3d94285..60161c3 100644
--- a/packages/SettingsLib/res/values-my/strings.xml
+++ b/packages/SettingsLib/res/values-my/strings.xml
@@ -457,8 +457,7 @@
<string name="daltonizer_type_overridden" msgid="4509604753672535721">"<xliff:g id="TITLE">%1$s</xliff:g> မှ ကျော်၍ လုပ်ထားသည်။"</string>
<string name="power_remaining_settings_home_page" msgid="4885165789445462557">"<xliff:g id="PERCENTAGE">%1$s</xliff:g> - <xliff:g id="TIME_STRING">%2$s</xliff:g>"</string>
<string name="power_charging_on_hold_settings_home_page" msgid="7690464049464805856">"<xliff:g id="LEVEL">%1$s</xliff:g> - ဘက်ထရီကာကွယ်ရန် အားသွင်းခြင်းကို ခဏရပ်ထားသည်"</string>
- <!-- no translation found for power_incompatible_charging_settings_home_page (1322050766135126880) -->
- <skip />
+ <string name="power_incompatible_charging_settings_home_page" msgid="1322050766135126880">"<xliff:g id="LEVEL">%1$s</xliff:g> - အားသွင်းပစ္စည်း စစ်ရန်"</string>
<string name="power_remaining_duration_only" msgid="8264199158671531431">"<xliff:g id="TIME_REMAINING">%1$s</xliff:g> ခန့် ကျန်သည်"</string>
<string name="power_discharging_duration" msgid="1076561255466053220">"<xliff:g id="TIME_REMAINING">%1$s</xliff:g> ခန့် ကျန်သည် (<xliff:g id="LEVEL">%2$s</xliff:g>)"</string>
<string name="power_remaining_duration_only_enhanced" msgid="2527842780666073218">"သင်၏ အသုံးပြုမှု အပေါ် မူတည်၍ <xliff:g id="TIME_REMAINING">%1$s</xliff:g> ခန့် ကျန်သည်"</string>
diff --git a/packages/SettingsLib/res/values-nb/strings.xml b/packages/SettingsLib/res/values-nb/strings.xml
index d286da1..256a71b 100644
--- a/packages/SettingsLib/res/values-nb/strings.xml
+++ b/packages/SettingsLib/res/values-nb/strings.xml
@@ -457,8 +457,7 @@
<string name="daltonizer_type_overridden" msgid="4509604753672535721">"Overstyres av <xliff:g id="TITLE">%1$s</xliff:g>"</string>
<string name="power_remaining_settings_home_page" msgid="4885165789445462557">"<xliff:g id="PERCENTAGE">%1$s</xliff:g> – <xliff:g id="TIME_STRING">%2$s</xliff:g>"</string>
<string name="power_charging_on_hold_settings_home_page" msgid="7690464049464805856">"<xliff:g id="LEVEL">%1$s</xliff:g> – Ladingen er satt på vent for å beskytte batteriet"</string>
- <!-- no translation found for power_incompatible_charging_settings_home_page (1322050766135126880) -->
- <skip />
+ <string name="power_incompatible_charging_settings_home_page" msgid="1322050766135126880">"<xliff:g id="LEVEL">%1$s</xliff:g> – Sjekk ladetilbehøret"</string>
<string name="power_remaining_duration_only" msgid="8264199158671531431">"Omtrent <xliff:g id="TIME_REMAINING">%1$s</xliff:g> igjen"</string>
<string name="power_discharging_duration" msgid="1076561255466053220">"Omtrent <xliff:g id="TIME_REMAINING">%1$s</xliff:g> igjen (<xliff:g id="LEVEL">%2$s</xliff:g>)"</string>
<string name="power_remaining_duration_only_enhanced" msgid="2527842780666073218">"Omtrent <xliff:g id="TIME_REMAINING">%1$s</xliff:g> igjen basert på bruken din"</string>
diff --git a/packages/SettingsLib/res/values-ne/strings.xml b/packages/SettingsLib/res/values-ne/strings.xml
index 146418c..fdd965a 100644
--- a/packages/SettingsLib/res/values-ne/strings.xml
+++ b/packages/SettingsLib/res/values-ne/strings.xml
@@ -457,8 +457,7 @@
<string name="daltonizer_type_overridden" msgid="4509604753672535721">"<xliff:g id="TITLE">%1$s</xliff:g> द्वारा अधिरोहित"</string>
<string name="power_remaining_settings_home_page" msgid="4885165789445462557">"<xliff:g id="PERCENTAGE">%1$s</xliff:g> - <xliff:g id="TIME_STRING">%2$s</xliff:g>"</string>
<string name="power_charging_on_hold_settings_home_page" msgid="7690464049464805856">"<xliff:g id="LEVEL">%1$s</xliff:g> - ब्याट्री जोगाउन चार्जिङ होल्ड गरिएको छ"</string>
- <!-- no translation found for power_incompatible_charging_settings_home_page (1322050766135126880) -->
- <skip />
+ <string name="power_incompatible_charging_settings_home_page" msgid="1322050766135126880">"<xliff:g id="LEVEL">%1$s</xliff:g> - चार्जिङ एक्सेसरी जाँच्नुहोस्"</string>
<string name="power_remaining_duration_only" msgid="8264199158671531431">"लगभग <xliff:g id="TIME_REMAINING">%1$s</xliff:g> बाँकी छ"</string>
<string name="power_discharging_duration" msgid="1076561255466053220">"लगभग <xliff:g id="TIME_REMAINING">%1$s</xliff:g> बाँकी छ (<xliff:g id="LEVEL">%2$s</xliff:g>)"</string>
<string name="power_remaining_duration_only_enhanced" msgid="2527842780666073218">"तपाईंको प्रयोगको आधारमा लगभग <xliff:g id="TIME_REMAINING">%1$s</xliff:g> बाँकी छ"</string>
diff --git a/packages/SettingsLib/res/values-nl/strings.xml b/packages/SettingsLib/res/values-nl/strings.xml
index f5ae254..72e57af 100644
--- a/packages/SettingsLib/res/values-nl/strings.xml
+++ b/packages/SettingsLib/res/values-nl/strings.xml
@@ -457,8 +457,7 @@
<string name="daltonizer_type_overridden" msgid="4509604753672535721">"Overschreven door <xliff:g id="TITLE">%1$s</xliff:g>"</string>
<string name="power_remaining_settings_home_page" msgid="4885165789445462557">"<xliff:g id="PERCENTAGE">%1$s</xliff:g> - <xliff:g id="TIME_STRING">%2$s</xliff:g>"</string>
<string name="power_charging_on_hold_settings_home_page" msgid="7690464049464805856">"<xliff:g id="LEVEL">%1$s</xliff:g>: opladen is in de wacht gezet om de batterij te beschermen"</string>
- <!-- no translation found for power_incompatible_charging_settings_home_page (1322050766135126880) -->
- <skip />
+ <string name="power_incompatible_charging_settings_home_page" msgid="1322050766135126880">"<xliff:g id="LEVEL">%1$s</xliff:g> - Oplaadaccessoire checken"</string>
<string name="power_remaining_duration_only" msgid="8264199158671531431">"Nog ongeveer <xliff:g id="TIME_REMAINING">%1$s</xliff:g>"</string>
<string name="power_discharging_duration" msgid="1076561255466053220">"Nog ongeveer <xliff:g id="TIME_REMAINING">%1$s</xliff:g> (<xliff:g id="LEVEL">%2$s</xliff:g>)"</string>
<string name="power_remaining_duration_only_enhanced" msgid="2527842780666073218">"Nog ongeveer <xliff:g id="TIME_REMAINING">%1$s</xliff:g> op basis van je gebruik"</string>
diff --git a/packages/SettingsLib/res/values-or/strings.xml b/packages/SettingsLib/res/values-or/strings.xml
index b71cf0eb..723af10 100644
--- a/packages/SettingsLib/res/values-or/strings.xml
+++ b/packages/SettingsLib/res/values-or/strings.xml
@@ -457,8 +457,7 @@
<string name="daltonizer_type_overridden" msgid="4509604753672535721">"<xliff:g id="TITLE">%1$s</xliff:g> ଦ୍ୱାରା ଓଭର୍ରାଇଡ୍ କରାଯାଇଛି"</string>
<string name="power_remaining_settings_home_page" msgid="4885165789445462557">"<xliff:g id="PERCENTAGE">%1$s</xliff:g> - <xliff:g id="TIME_STRING">%2$s</xliff:g>"</string>
<string name="power_charging_on_hold_settings_home_page" msgid="7690464049464805856">"<xliff:g id="LEVEL">%1$s</xliff:g> - ବେଟେରୀକୁ ସୁରକ୍ଷିତ ରଖିବା ପାଇଁ ଚାର୍ଜିଂ ହୋଲ୍ଡରେ ଅଛି"</string>
- <!-- no translation found for power_incompatible_charging_settings_home_page (1322050766135126880) -->
- <skip />
+ <string name="power_incompatible_charging_settings_home_page" msgid="1322050766135126880">"<xliff:g id="LEVEL">%1$s</xliff:g> - ଚାର୍ଜିଂ ଆକସେସୋରୀକୁ ଯାଞ୍ଚ କରନ୍ତୁ"</string>
<string name="power_remaining_duration_only" msgid="8264199158671531431">"ପାଖାପାଖି <xliff:g id="TIME_REMAINING">%1$s</xliff:g> ବଳକା ଅଛି"</string>
<string name="power_discharging_duration" msgid="1076561255466053220">"ପାଖାପାଖି <xliff:g id="TIME_REMAINING">%1$s</xliff:g> ପାଇଁ (<xliff:g id="LEVEL">%2$s</xliff:g>) ବଳକା ଅଛି"</string>
<string name="power_remaining_duration_only_enhanced" msgid="2527842780666073218">"ଆପଣଙ୍କ ବ୍ୟବହାରକୁ ଆଧାର କରି ପାଖାପାଖି <xliff:g id="TIME_REMAINING">%1$s</xliff:g> ବଳକା ଅଛି"</string>
diff --git a/packages/SettingsLib/res/values-pa/strings.xml b/packages/SettingsLib/res/values-pa/strings.xml
index 76d4921..8a77c12 100644
--- a/packages/SettingsLib/res/values-pa/strings.xml
+++ b/packages/SettingsLib/res/values-pa/strings.xml
@@ -457,8 +457,7 @@
<string name="daltonizer_type_overridden" msgid="4509604753672535721">"<xliff:g id="TITLE">%1$s</xliff:g> ਦੁਆਰਾ ਓਵਰਰਾਈਡ ਕੀਤਾ"</string>
<string name="power_remaining_settings_home_page" msgid="4885165789445462557">"<xliff:g id="PERCENTAGE">%1$s</xliff:g> - <xliff:g id="TIME_STRING">%2$s</xliff:g>"</string>
<string name="power_charging_on_hold_settings_home_page" msgid="7690464049464805856">"<xliff:g id="LEVEL">%1$s</xliff:g> - ਬੈਟਰੀ ਦੀ ਸੁਰੱਖਿਆ ਲਈ ਚਾਰਜਿੰਗ ਨੂੰ ਰੋਕਿਆ ਗਿਆ ਹੈ"</string>
- <!-- no translation found for power_incompatible_charging_settings_home_page (1322050766135126880) -->
- <skip />
+ <string name="power_incompatible_charging_settings_home_page" msgid="1322050766135126880">"<xliff:g id="LEVEL">%1$s</xliff:g> - ਚਾਰਜਿੰਗ ਐਕਸੈਸਰੀ ਦੀ ਜਾਂਚ ਕਰੋ"</string>
<string name="power_remaining_duration_only" msgid="8264199158671531431">"ਲਗਭਗ <xliff:g id="TIME_REMAINING">%1$s</xliff:g> ਬਾਕੀ"</string>
<string name="power_discharging_duration" msgid="1076561255466053220">"ਲਗਭਗ <xliff:g id="TIME_REMAINING">%1$s</xliff:g> ਬਾਕੀ (<xliff:g id="LEVEL">%2$s</xliff:g>)"</string>
<string name="power_remaining_duration_only_enhanced" msgid="2527842780666073218">"ਤੁਹਾਡੀ ਵਰਤੋਂ ਦੇ ਆਧਾਰ \'ਤੇ ਲਗਭਗ <xliff:g id="TIME_REMAINING">%1$s</xliff:g> ਬਾਕੀ"</string>
diff --git a/packages/SettingsLib/res/values-pl/strings.xml b/packages/SettingsLib/res/values-pl/strings.xml
index 1b76b6f..375a35f 100644
--- a/packages/SettingsLib/res/values-pl/strings.xml
+++ b/packages/SettingsLib/res/values-pl/strings.xml
@@ -457,8 +457,7 @@
<string name="daltonizer_type_overridden" msgid="4509604753672535721">"Nadpisana przez <xliff:g id="TITLE">%1$s</xliff:g>"</string>
<string name="power_remaining_settings_home_page" msgid="4885165789445462557">"<xliff:g id="PERCENTAGE">%1$s</xliff:g> – <xliff:g id="TIME_STRING">%2$s</xliff:g>"</string>
<string name="power_charging_on_hold_settings_home_page" msgid="7690464049464805856">"<xliff:g id="LEVEL">%1$s</xliff:g> – wstrzymano ładowanie, aby chronić baterię"</string>
- <!-- no translation found for power_incompatible_charging_settings_home_page (1322050766135126880) -->
- <skip />
+ <string name="power_incompatible_charging_settings_home_page" msgid="1322050766135126880">"<xliff:g id="LEVEL">%1$s</xliff:g> – sprawdź akcesoria do ładowania"</string>
<string name="power_remaining_duration_only" msgid="8264199158671531431">"Jeszcze około <xliff:g id="TIME_REMAINING">%1$s</xliff:g>"</string>
<string name="power_discharging_duration" msgid="1076561255466053220">"Jeszcze około <xliff:g id="TIME_REMAINING">%1$s</xliff:g> (<xliff:g id="LEVEL">%2$s</xliff:g>)"</string>
<string name="power_remaining_duration_only_enhanced" msgid="2527842780666073218">"Jeszcze około <xliff:g id="TIME_REMAINING">%1$s</xliff:g> (na podstawie Twojego sposobu korzystania)"</string>
diff --git a/packages/SettingsLib/res/values-pt-rBR/strings.xml b/packages/SettingsLib/res/values-pt-rBR/strings.xml
index bdfff4a..55b9db5 100644
--- a/packages/SettingsLib/res/values-pt-rBR/strings.xml
+++ b/packages/SettingsLib/res/values-pt-rBR/strings.xml
@@ -457,8 +457,7 @@
<string name="daltonizer_type_overridden" msgid="4509604753672535721">"Substituído por <xliff:g id="TITLE">%1$s</xliff:g>"</string>
<string name="power_remaining_settings_home_page" msgid="4885165789445462557">"<xliff:g id="PERCENTAGE">%1$s</xliff:g> - <xliff:g id="TIME_STRING">%2$s</xliff:g>"</string>
<string name="power_charging_on_hold_settings_home_page" msgid="7690464049464805856">"<xliff:g id="LEVEL">%1$s</xliff:g> - Carregamento suspenso para proteger a bateria"</string>
- <!-- no translation found for power_incompatible_charging_settings_home_page (1322050766135126880) -->
- <skip />
+ <string name="power_incompatible_charging_settings_home_page" msgid="1322050766135126880">"<xliff:g id="LEVEL">%1$s</xliff:g>: verifique o acessório de carregamento"</string>
<string name="power_remaining_duration_only" msgid="8264199158671531431">"Tempo restante aproximado: <xliff:g id="TIME_REMAINING">%1$s</xliff:g>"</string>
<string name="power_discharging_duration" msgid="1076561255466053220">"Tempo restante aproximado: <xliff:g id="TIME_REMAINING">%1$s</xliff:g> (<xliff:g id="LEVEL">%2$s</xliff:g>)"</string>
<string name="power_remaining_duration_only_enhanced" msgid="2527842780666073218">"Tempo restante aproximado, com base no seu uso: <xliff:g id="TIME_REMAINING">%1$s</xliff:g>"</string>
diff --git a/packages/SettingsLib/res/values-pt-rPT/strings.xml b/packages/SettingsLib/res/values-pt-rPT/strings.xml
index 6fb851b..ca704e7 100644
--- a/packages/SettingsLib/res/values-pt-rPT/strings.xml
+++ b/packages/SettingsLib/res/values-pt-rPT/strings.xml
@@ -457,8 +457,7 @@
<string name="daltonizer_type_overridden" msgid="4509604753672535721">"Substituído por <xliff:g id="TITLE">%1$s</xliff:g>"</string>
<string name="power_remaining_settings_home_page" msgid="4885165789445462557">"<xliff:g id="PERCENTAGE">%1$s</xliff:g> – <xliff:g id="TIME_STRING">%2$s</xliff:g>"</string>
<string name="power_charging_on_hold_settings_home_page" msgid="7690464049464805856">"<xliff:g id="LEVEL">%1$s</xliff:g> - Carregamento em espera para proteger a bateria"</string>
- <!-- no translation found for power_incompatible_charging_settings_home_page (1322050766135126880) -->
- <skip />
+ <string name="power_incompatible_charging_settings_home_page" msgid="1322050766135126880">"<xliff:g id="LEVEL">%1$s</xliff:g> - Verificar acessório de carregamento"</string>
<string name="power_remaining_duration_only" msgid="8264199158671531431">"Resta(m) cerca de <xliff:g id="TIME_REMAINING">%1$s</xliff:g>"</string>
<string name="power_discharging_duration" msgid="1076561255466053220">"Resta(m) cerca de <xliff:g id="TIME_REMAINING">%1$s</xliff:g> (<xliff:g id="LEVEL">%2$s</xliff:g>)"</string>
<string name="power_remaining_duration_only_enhanced" msgid="2527842780666073218">"Resta(m) cerca de <xliff:g id="TIME_REMAINING">%1$s</xliff:g> com base na sua utilização"</string>
diff --git a/packages/SettingsLib/res/values-pt/strings.xml b/packages/SettingsLib/res/values-pt/strings.xml
index bdfff4a..55b9db5 100644
--- a/packages/SettingsLib/res/values-pt/strings.xml
+++ b/packages/SettingsLib/res/values-pt/strings.xml
@@ -457,8 +457,7 @@
<string name="daltonizer_type_overridden" msgid="4509604753672535721">"Substituído por <xliff:g id="TITLE">%1$s</xliff:g>"</string>
<string name="power_remaining_settings_home_page" msgid="4885165789445462557">"<xliff:g id="PERCENTAGE">%1$s</xliff:g> - <xliff:g id="TIME_STRING">%2$s</xliff:g>"</string>
<string name="power_charging_on_hold_settings_home_page" msgid="7690464049464805856">"<xliff:g id="LEVEL">%1$s</xliff:g> - Carregamento suspenso para proteger a bateria"</string>
- <!-- no translation found for power_incompatible_charging_settings_home_page (1322050766135126880) -->
- <skip />
+ <string name="power_incompatible_charging_settings_home_page" msgid="1322050766135126880">"<xliff:g id="LEVEL">%1$s</xliff:g>: verifique o acessório de carregamento"</string>
<string name="power_remaining_duration_only" msgid="8264199158671531431">"Tempo restante aproximado: <xliff:g id="TIME_REMAINING">%1$s</xliff:g>"</string>
<string name="power_discharging_duration" msgid="1076561255466053220">"Tempo restante aproximado: <xliff:g id="TIME_REMAINING">%1$s</xliff:g> (<xliff:g id="LEVEL">%2$s</xliff:g>)"</string>
<string name="power_remaining_duration_only_enhanced" msgid="2527842780666073218">"Tempo restante aproximado, com base no seu uso: <xliff:g id="TIME_REMAINING">%1$s</xliff:g>"</string>
diff --git a/packages/SettingsLib/res/values-ro/strings.xml b/packages/SettingsLib/res/values-ro/strings.xml
index e8d6852..fa89c1a 100644
--- a/packages/SettingsLib/res/values-ro/strings.xml
+++ b/packages/SettingsLib/res/values-ro/strings.xml
@@ -457,8 +457,7 @@
<string name="daltonizer_type_overridden" msgid="4509604753672535721">"Valoare înlocuită de <xliff:g id="TITLE">%1$s</xliff:g>"</string>
<string name="power_remaining_settings_home_page" msgid="4885165789445462557">"<xliff:g id="PERCENTAGE">%1$s</xliff:g> - <xliff:g id="TIME_STRING">%2$s</xliff:g>"</string>
<string name="power_charging_on_hold_settings_home_page" msgid="7690464049464805856">"<xliff:g id="LEVEL">%1$s</xliff:g> – Încărcarea s-a întrerupt pentru a proteja bateria"</string>
- <!-- no translation found for power_incompatible_charging_settings_home_page (1322050766135126880) -->
- <skip />
+ <string name="power_incompatible_charging_settings_home_page" msgid="1322050766135126880">"<xliff:g id="LEVEL">%1$s</xliff:g> – Verifică accesoriul de încărcare"</string>
<string name="power_remaining_duration_only" msgid="8264199158671531431">"Timp aproximativ rămas: <xliff:g id="TIME_REMAINING">%1$s</xliff:g>"</string>
<string name="power_discharging_duration" msgid="1076561255466053220">"Timp aproximativ rămas: <xliff:g id="TIME_REMAINING">%1$s</xliff:g> (<xliff:g id="LEVEL">%2$s</xliff:g>)"</string>
<string name="power_remaining_duration_only_enhanced" msgid="2527842780666073218">"În baza utilizării, timpul rămas este de aproximativ <xliff:g id="TIME_REMAINING">%1$s</xliff:g>"</string>
diff --git a/packages/SettingsLib/res/values-ru/strings.xml b/packages/SettingsLib/res/values-ru/strings.xml
index ef1e8176..d853070 100644
--- a/packages/SettingsLib/res/values-ru/strings.xml
+++ b/packages/SettingsLib/res/values-ru/strings.xml
@@ -457,8 +457,7 @@
<string name="daltonizer_type_overridden" msgid="4509604753672535721">"Новая настройка: <xliff:g id="TITLE">%1$s</xliff:g>"</string>
<string name="power_remaining_settings_home_page" msgid="4885165789445462557">"Уровень заряда – <xliff:g id="PERCENTAGE">%1$s</xliff:g>. <xliff:g id="TIME_STRING">%2$s</xliff:g>."</string>
<string name="power_charging_on_hold_settings_home_page" msgid="7690464049464805856">"<xliff:g id="LEVEL">%1$s</xliff:g>, зарядка приостановлена для защиты батареи"</string>
- <!-- no translation found for power_incompatible_charging_settings_home_page (1322050766135126880) -->
- <skip />
+ <string name="power_incompatible_charging_settings_home_page" msgid="1322050766135126880">"<xliff:g id="LEVEL">%1$s</xliff:g>, проверьте зарядное устройство"</string>
<string name="power_remaining_duration_only" msgid="8264199158671531431">"Заряда хватит примерно на <xliff:g id="TIME_REMAINING">%1$s</xliff:g>"</string>
<string name="power_discharging_duration" msgid="1076561255466053220">"Заряда (<xliff:g id="LEVEL">%2$s</xliff:g>) хватит примерно на <xliff:g id="TIME_REMAINING">%1$s</xliff:g>"</string>
<string name="power_remaining_duration_only_enhanced" msgid="2527842780666073218">"Заряда хватит примерно на <xliff:g id="TIME_REMAINING">%1$s</xliff:g> при текущем уровне расхода"</string>
diff --git a/packages/SettingsLib/res/values-si/strings.xml b/packages/SettingsLib/res/values-si/strings.xml
index cf83ee8..093f216 100644
--- a/packages/SettingsLib/res/values-si/strings.xml
+++ b/packages/SettingsLib/res/values-si/strings.xml
@@ -457,8 +457,7 @@
<string name="daltonizer_type_overridden" msgid="4509604753672535721">"<xliff:g id="TITLE">%1$s</xliff:g> මගින් ඉක්මවන ලදී"</string>
<string name="power_remaining_settings_home_page" msgid="4885165789445462557">"<xliff:g id="PERCENTAGE">%1$s</xliff:g> - <xliff:g id="TIME_STRING">%2$s</xliff:g>"</string>
<string name="power_charging_on_hold_settings_home_page" msgid="7690464049464805856">"<xliff:g id="LEVEL">%1$s</xliff:g> - බැටරිය ආරක්ෂා කිරීම සඳහා ආරෝපණය රඳවා තබා ඇත"</string>
- <!-- no translation found for power_incompatible_charging_settings_home_page (1322050766135126880) -->
- <skip />
+ <string name="power_incompatible_charging_settings_home_page" msgid="1322050766135126880">"<xliff:g id="LEVEL">%1$s</xliff:g> - ආරෝපණ ආයිත්තම පරීක්ෂා කරන්න"</string>
<string name="power_remaining_duration_only" msgid="8264199158671531431">"<xliff:g id="TIME_REMAINING">%1$s</xliff:g> ක් පමණ ඉතිරියි"</string>
<string name="power_discharging_duration" msgid="1076561255466053220">"<xliff:g id="TIME_REMAINING">%1$s</xliff:g> ක් පමණ ඉතිරියි (<xliff:g id="LEVEL">%2$s</xliff:g>)"</string>
<string name="power_remaining_duration_only_enhanced" msgid="2527842780666073218">"ඔබේ භාවිතය මත පදනම්ව <xliff:g id="TIME_REMAINING">%1$s</xliff:g> පමණ ඉතිරිව ඇත"</string>
diff --git a/packages/SettingsLib/res/values-sk/strings.xml b/packages/SettingsLib/res/values-sk/strings.xml
index 577a6c1..1c82933 100644
--- a/packages/SettingsLib/res/values-sk/strings.xml
+++ b/packages/SettingsLib/res/values-sk/strings.xml
@@ -457,8 +457,7 @@
<string name="daltonizer_type_overridden" msgid="4509604753672535721">"Prekonané predvoľbou <xliff:g id="TITLE">%1$s</xliff:g>"</string>
<string name="power_remaining_settings_home_page" msgid="4885165789445462557">"<xliff:g id="PERCENTAGE">%1$s</xliff:g> – <xliff:g id="TIME_STRING">%2$s</xliff:g>"</string>
<string name="power_charging_on_hold_settings_home_page" msgid="7690464049464805856">"<xliff:g id="LEVEL">%1$s</xliff:g> – nabíjanie je pozastavené, aby sa chránila batéria"</string>
- <!-- no translation found for power_incompatible_charging_settings_home_page (1322050766135126880) -->
- <skip />
+ <string name="power_incompatible_charging_settings_home_page" msgid="1322050766135126880">"<xliff:g id="LEVEL">%1$s</xliff:g> – skontrolujte nabíjacie príslušenstvo"</string>
<string name="power_remaining_duration_only" msgid="8264199158671531431">"Ešte približne <xliff:g id="TIME_REMAINING">%1$s</xliff:g>"</string>
<string name="power_discharging_duration" msgid="1076561255466053220">"Zostáva približne <xliff:g id="TIME_REMAINING">%1$s</xliff:g> (<xliff:g id="LEVEL">%2$s</xliff:g>)"</string>
<string name="power_remaining_duration_only_enhanced" msgid="2527842780666073218">"Zostáva približne <xliff:g id="TIME_REMAINING">%1$s</xliff:g> – závisí to od intenzity využitia"</string>
diff --git a/packages/SettingsLib/res/values-sl/strings.xml b/packages/SettingsLib/res/values-sl/strings.xml
index 7acd64d..f97dd78 100644
--- a/packages/SettingsLib/res/values-sl/strings.xml
+++ b/packages/SettingsLib/res/values-sl/strings.xml
@@ -457,8 +457,7 @@
<string name="daltonizer_type_overridden" msgid="4509604753672535721">"Preglasila nastavitev: <xliff:g id="TITLE">%1$s</xliff:g>"</string>
<string name="power_remaining_settings_home_page" msgid="4885165789445462557">"<xliff:g id="PERCENTAGE">%1$s</xliff:g> – <xliff:g id="TIME_STRING">%2$s</xliff:g>"</string>
<string name="power_charging_on_hold_settings_home_page" msgid="7690464049464805856">"<xliff:g id="LEVEL">%1$s</xliff:g> – Zaradi zaščite baterije je polnjenje na čakanju"</string>
- <!-- no translation found for power_incompatible_charging_settings_home_page (1322050766135126880) -->
- <skip />
+ <string name="power_incompatible_charging_settings_home_page" msgid="1322050766135126880">"<xliff:g id="LEVEL">%1$s</xliff:g> – Preverite pripomoček za polnjenje"</string>
<string name="power_remaining_duration_only" msgid="8264199158671531431">"Še približno <xliff:g id="TIME_REMAINING">%1$s</xliff:g>"</string>
<string name="power_discharging_duration" msgid="1076561255466053220">"Še približno <xliff:g id="TIME_REMAINING">%1$s</xliff:g> (<xliff:g id="LEVEL">%2$s</xliff:g>)"</string>
<string name="power_remaining_duration_only_enhanced" msgid="2527842780666073218">"Glede na način uporabe še približno <xliff:g id="TIME_REMAINING">%1$s</xliff:g>"</string>
diff --git a/packages/SettingsLib/res/values-sq/strings.xml b/packages/SettingsLib/res/values-sq/strings.xml
index a2b2042..a802f11 100644
--- a/packages/SettingsLib/res/values-sq/strings.xml
+++ b/packages/SettingsLib/res/values-sq/strings.xml
@@ -457,8 +457,7 @@
<string name="daltonizer_type_overridden" msgid="4509604753672535721">"Mbivendosur nga <xliff:g id="TITLE">%1$s</xliff:g>"</string>
<string name="power_remaining_settings_home_page" msgid="4885165789445462557">"<xliff:g id="PERCENTAGE">%1$s</xliff:g> - <xliff:g id="TIME_STRING">%2$s</xliff:g>"</string>
<string name="power_charging_on_hold_settings_home_page" msgid="7690464049464805856">"<xliff:g id="LEVEL">%1$s</xliff:g> - Karikimi është vendosur në pritje për të mbrojtur baterinë"</string>
- <!-- no translation found for power_incompatible_charging_settings_home_page (1322050766135126880) -->
- <skip />
+ <string name="power_incompatible_charging_settings_home_page" msgid="1322050766135126880">"<xliff:g id="LEVEL">%1$s</xliff:g> - Kontrollo aksesorin e karikimit"</string>
<string name="power_remaining_duration_only" msgid="8264199158671531431">"Rreth <xliff:g id="TIME_REMAINING">%1$s</xliff:g> të mbetura"</string>
<string name="power_discharging_duration" msgid="1076561255466053220">"Rreth <xliff:g id="TIME_REMAINING">%1$s</xliff:g> të mbetura (<xliff:g id="LEVEL">%2$s</xliff:g>)"</string>
<string name="power_remaining_duration_only_enhanced" msgid="2527842780666073218">"Rreth <xliff:g id="TIME_REMAINING">%1$s</xliff:g> të mbetura bazuar në përdorimin tënd"</string>
diff --git a/packages/SettingsLib/res/values-sr/strings.xml b/packages/SettingsLib/res/values-sr/strings.xml
index 14dd772..df22159 100644
--- a/packages/SettingsLib/res/values-sr/strings.xml
+++ b/packages/SettingsLib/res/values-sr/strings.xml
@@ -457,8 +457,7 @@
<string name="daltonizer_type_overridden" msgid="4509604753672535721">"Замењује га <xliff:g id="TITLE">%1$s</xliff:g>"</string>
<string name="power_remaining_settings_home_page" msgid="4885165789445462557">"<xliff:g id="PERCENTAGE">%1$s</xliff:g>–<xliff:g id="TIME_STRING">%2$s</xliff:g>"</string>
<string name="power_charging_on_hold_settings_home_page" msgid="7690464049464805856">"<xliff:g id="LEVEL">%1$s</xliff:g> – пуњење је на чекању да би се заштитила батерија"</string>
- <!-- no translation found for power_incompatible_charging_settings_home_page (1322050766135126880) -->
- <skip />
+ <string name="power_incompatible_charging_settings_home_page" msgid="1322050766135126880">"<xliff:g id="LEVEL">%1$s</xliff:g> – Проверите додатну опрему за пуњење"</string>
<string name="power_remaining_duration_only" msgid="8264199158671531431">"Преостало је око <xliff:g id="TIME_REMAINING">%1$s</xliff:g>"</string>
<string name="power_discharging_duration" msgid="1076561255466053220">"Преостало је око <xliff:g id="TIME_REMAINING">%1$s</xliff:g> (<xliff:g id="LEVEL">%2$s</xliff:g>)"</string>
<string name="power_remaining_duration_only_enhanced" msgid="2527842780666073218">"Преостало је око <xliff:g id="TIME_REMAINING">%1$s</xliff:g> на основу коришћења"</string>
diff --git a/packages/SettingsLib/res/values-sv/strings.xml b/packages/SettingsLib/res/values-sv/strings.xml
index c9262e9..79b8399 100644
--- a/packages/SettingsLib/res/values-sv/strings.xml
+++ b/packages/SettingsLib/res/values-sv/strings.xml
@@ -457,8 +457,7 @@
<string name="daltonizer_type_overridden" msgid="4509604753672535721">"Har åsidosatts av <xliff:g id="TITLE">%1$s</xliff:g>"</string>
<string name="power_remaining_settings_home_page" msgid="4885165789445462557">"<xliff:g id="PERCENTAGE">%1$s</xliff:g> – <xliff:g id="TIME_STRING">%2$s</xliff:g>"</string>
<string name="power_charging_on_hold_settings_home_page" msgid="7690464049464805856">"<xliff:g id="LEVEL">%1$s</xliff:g> - Laddningen har pausats för att skydda batteriet"</string>
- <!-- no translation found for power_incompatible_charging_settings_home_page (1322050766135126880) -->
- <skip />
+ <string name="power_incompatible_charging_settings_home_page" msgid="1322050766135126880">"<xliff:g id="LEVEL">%1$s</xliff:g> – Kontrollera laddningstillbehöret"</string>
<string name="power_remaining_duration_only" msgid="8264199158671531431">"Cirka <xliff:g id="TIME_REMAINING">%1$s</xliff:g> kvar"</string>
<string name="power_discharging_duration" msgid="1076561255466053220">"Cirka <xliff:g id="TIME_REMAINING">%1$s</xliff:g> kvar (<xliff:g id="LEVEL">%2$s</xliff:g>)"</string>
<string name="power_remaining_duration_only_enhanced" msgid="2527842780666073218">"Cirka <xliff:g id="TIME_REMAINING">%1$s</xliff:g> kvar utifrån din användning"</string>
diff --git a/packages/SettingsLib/res/values-sw/strings.xml b/packages/SettingsLib/res/values-sw/strings.xml
index 92c9c7c..c0ace580 100644
--- a/packages/SettingsLib/res/values-sw/strings.xml
+++ b/packages/SettingsLib/res/values-sw/strings.xml
@@ -457,8 +457,7 @@
<string name="daltonizer_type_overridden" msgid="4509604753672535721">"Imetanguliwa na <xliff:g id="TITLE">%1$s</xliff:g>"</string>
<string name="power_remaining_settings_home_page" msgid="4885165789445462557">"<xliff:g id="PERCENTAGE">%1$s</xliff:g> - <xliff:g id="TIME_STRING">%2$s</xliff:g>"</string>
<string name="power_charging_on_hold_settings_home_page" msgid="7690464049464805856">"<xliff:g id="LEVEL">%1$s</xliff:g> - Imesitisha kuchaji ili kulinda betri yako"</string>
- <!-- no translation found for power_incompatible_charging_settings_home_page (1322050766135126880) -->
- <skip />
+ <string name="power_incompatible_charging_settings_home_page" msgid="1322050766135126880">"<xliff:g id="LEVEL">%1$s</xliff:g> - Kagua kifaa cha kuchaji"</string>
<string name="power_remaining_duration_only" msgid="8264199158671531431">"Zimesalia takribani <xliff:g id="TIME_REMAINING">%1$s</xliff:g>"</string>
<string name="power_discharging_duration" msgid="1076561255466053220">"Zimesalia takribani <xliff:g id="TIME_REMAINING">%1$s</xliff:g> (<xliff:g id="LEVEL">%2$s</xliff:g>)"</string>
<string name="power_remaining_duration_only_enhanced" msgid="2527842780666073218">"Zimesalia takribani <xliff:g id="TIME_REMAINING">%1$s</xliff:g> kulingana na jinsi unavyoitumia"</string>
diff --git a/packages/SettingsLib/res/values-ta/strings.xml b/packages/SettingsLib/res/values-ta/strings.xml
index ec73fbe..ebca26d 100644
--- a/packages/SettingsLib/res/values-ta/strings.xml
+++ b/packages/SettingsLib/res/values-ta/strings.xml
@@ -457,8 +457,7 @@
<string name="daltonizer_type_overridden" msgid="4509604753672535721">"<xliff:g id="TITLE">%1$s</xliff:g> மூலம் மேலெழுதப்பட்டது"</string>
<string name="power_remaining_settings_home_page" msgid="4885165789445462557">"<xliff:g id="PERCENTAGE">%1$s</xliff:g> - <xliff:g id="TIME_STRING">%2$s</xliff:g>"</string>
<string name="power_charging_on_hold_settings_home_page" msgid="7690464049464805856">"<xliff:g id="LEVEL">%1$s</xliff:g> - பேட்டரியைப் பாதுகாப்பதற்காகச் சார்ஜிங் இடைநிறுத்தப்பட்டுள்ளது"</string>
- <!-- no translation found for power_incompatible_charging_settings_home_page (1322050766135126880) -->
- <skip />
+ <string name="power_incompatible_charging_settings_home_page" msgid="1322050766135126880">"<xliff:g id="LEVEL">%1$s</xliff:g> - சார்ஜிங் துணைக்கருவியைச் சரிபாருங்கள்"</string>
<string name="power_remaining_duration_only" msgid="8264199158671531431">"கிட்டத்தட்ட <xliff:g id="TIME_REMAINING">%1$s</xliff:g> மீதமுள்ளது"</string>
<string name="power_discharging_duration" msgid="1076561255466053220">"கிட்டத்தட்ட <xliff:g id="TIME_REMAINING">%1$s</xliff:g> மீதமுள்ளது (<xliff:g id="LEVEL">%2$s</xliff:g>)"</string>
<string name="power_remaining_duration_only_enhanced" msgid="2527842780666073218">"உபயோகத்தின் அடிப்படையில் கிட்டத்தட்ட <xliff:g id="TIME_REMAINING">%1$s</xliff:g> மீதமுள்ளது"</string>
diff --git a/packages/SettingsLib/res/values-te/strings.xml b/packages/SettingsLib/res/values-te/strings.xml
index 0ffdf6a..cf3c08a 100644
--- a/packages/SettingsLib/res/values-te/strings.xml
+++ b/packages/SettingsLib/res/values-te/strings.xml
@@ -457,8 +457,7 @@
<string name="daltonizer_type_overridden" msgid="4509604753672535721">"<xliff:g id="TITLE">%1$s</xliff:g> ద్వారా భర్తీ చేయబడింది"</string>
<string name="power_remaining_settings_home_page" msgid="4885165789445462557">"<xliff:g id="PERCENTAGE">%1$s</xliff:g> - <xliff:g id="TIME_STRING">%2$s</xliff:g>"</string>
<string name="power_charging_on_hold_settings_home_page" msgid="7690464049464805856">"<xliff:g id="LEVEL">%1$s</xliff:g> - బ్యాటరీని రక్షించడానికి ఛార్జింగ్ హోల్డ్లో ఉంచబడింది"</string>
- <!-- no translation found for power_incompatible_charging_settings_home_page (1322050766135126880) -->
- <skip />
+ <string name="power_incompatible_charging_settings_home_page" msgid="1322050766135126880">"<xliff:g id="LEVEL">%1$s</xliff:g> - ఛార్జింగ్ యాక్సెసరీని ఎంచుకోండి"</string>
<string name="power_remaining_duration_only" msgid="8264199158671531431">"<xliff:g id="TIME_REMAINING">%1$s</xliff:g> సమయం మిగిలి ఉంది"</string>
<string name="power_discharging_duration" msgid="1076561255466053220">"దాదాపు <xliff:g id="TIME_REMAINING">%1$s</xliff:g> సమయం మిగిలి ఉంది (<xliff:g id="LEVEL">%2$s</xliff:g>)"</string>
<string name="power_remaining_duration_only_enhanced" msgid="2527842780666073218">"మీ వినియోగం ఆధారంగా దాదాపు <xliff:g id="TIME_REMAINING">%1$s</xliff:g> సమయం మిగిలి ఉంది"</string>
diff --git a/packages/SettingsLib/res/values-th/strings.xml b/packages/SettingsLib/res/values-th/strings.xml
index 7bccc25..a74265e 100644
--- a/packages/SettingsLib/res/values-th/strings.xml
+++ b/packages/SettingsLib/res/values-th/strings.xml
@@ -457,8 +457,7 @@
<string name="daltonizer_type_overridden" msgid="4509604753672535721">"แทนที่โดย <xliff:g id="TITLE">%1$s</xliff:g>"</string>
<string name="power_remaining_settings_home_page" msgid="4885165789445462557">"<xliff:g id="PERCENTAGE">%1$s</xliff:g> - <xliff:g id="TIME_STRING">%2$s</xliff:g>"</string>
<string name="power_charging_on_hold_settings_home_page" msgid="7690464049464805856">"<xliff:g id="LEVEL">%1$s</xliff:g> - หยุดการชาร์จชั่วคราวเพื่อถนอมแบตเตอรี่"</string>
- <!-- no translation found for power_incompatible_charging_settings_home_page (1322050766135126880) -->
- <skip />
+ <string name="power_incompatible_charging_settings_home_page" msgid="1322050766135126880">"<xliff:g id="LEVEL">%1$s</xliff:g> - ตรวจสอบอุปกรณ์เสริมสำหรับการชาร์จ"</string>
<string name="power_remaining_duration_only" msgid="8264199158671531431">"เหลืออีกประมาณ <xliff:g id="TIME_REMAINING">%1$s</xliff:g>"</string>
<string name="power_discharging_duration" msgid="1076561255466053220">"เหลืออีกประมาณ <xliff:g id="TIME_REMAINING">%1$s</xliff:g> (<xliff:g id="LEVEL">%2$s</xliff:g>)"</string>
<string name="power_remaining_duration_only_enhanced" msgid="2527842780666073218">"เหลืออีกประมาณ <xliff:g id="TIME_REMAINING">%1$s</xliff:g> ขึ้นอยู่กับการใช้งานของคุณ"</string>
diff --git a/packages/SettingsLib/res/values-tl/strings.xml b/packages/SettingsLib/res/values-tl/strings.xml
index 19ba24f..18d3d3b 100644
--- a/packages/SettingsLib/res/values-tl/strings.xml
+++ b/packages/SettingsLib/res/values-tl/strings.xml
@@ -457,8 +457,7 @@
<string name="daltonizer_type_overridden" msgid="4509604753672535721">"Na-override ng <xliff:g id="TITLE">%1$s</xliff:g>"</string>
<string name="power_remaining_settings_home_page" msgid="4885165789445462557">"<xliff:g id="PERCENTAGE">%1$s</xliff:g> - <xliff:g id="TIME_STRING">%2$s</xliff:g>"</string>
<string name="power_charging_on_hold_settings_home_page" msgid="7690464049464805856">"<xliff:g id="LEVEL">%1$s</xliff:g> - Naka-hold ang pag-charge para protektahan ang baterya"</string>
- <!-- no translation found for power_incompatible_charging_settings_home_page (1322050766135126880) -->
- <skip />
+ <string name="power_incompatible_charging_settings_home_page" msgid="1322050766135126880">"<xliff:g id="LEVEL">%1$s</xliff:g> - Suriin ang accessory sa pag-charge"</string>
<string name="power_remaining_duration_only" msgid="8264199158671531431">"Humigit-kumulang <xliff:g id="TIME_REMAINING">%1$s</xliff:g> ang natitira"</string>
<string name="power_discharging_duration" msgid="1076561255466053220">"Humigit-kumulang <xliff:g id="TIME_REMAINING">%1$s</xliff:g> ang natitira (<xliff:g id="LEVEL">%2$s</xliff:g>)"</string>
<string name="power_remaining_duration_only_enhanced" msgid="2527842780666073218">"Humigit-kumulang <xliff:g id="TIME_REMAINING">%1$s</xliff:g> ang natitira batay sa iyong paggamit"</string>
diff --git a/packages/SettingsLib/res/values-tr/strings.xml b/packages/SettingsLib/res/values-tr/strings.xml
index 80d2fe2..c424115 100644
--- a/packages/SettingsLib/res/values-tr/strings.xml
+++ b/packages/SettingsLib/res/values-tr/strings.xml
@@ -457,8 +457,7 @@
<string name="daltonizer_type_overridden" msgid="4509604753672535721">"<xliff:g id="TITLE">%1$s</xliff:g> tarafından geçersiz kılındı"</string>
<string name="power_remaining_settings_home_page" msgid="4885165789445462557">"<xliff:g id="PERCENTAGE">%1$s</xliff:g> - <xliff:g id="TIME_STRING">%2$s</xliff:g>"</string>
<string name="power_charging_on_hold_settings_home_page" msgid="7690464049464805856">"<xliff:g id="LEVEL">%1$s</xliff:g> - Pili korumak için şarj beklemede"</string>
- <!-- no translation found for power_incompatible_charging_settings_home_page (1322050766135126880) -->
- <skip />
+ <string name="power_incompatible_charging_settings_home_page" msgid="1322050766135126880">"<xliff:g id="LEVEL">%1$s</xliff:g> - Şarj aksesuarını kontrol edin"</string>
<string name="power_remaining_duration_only" msgid="8264199158671531431">"Yaklaşık <xliff:g id="TIME_REMAINING">%1$s</xliff:g> kaldı"</string>
<string name="power_discharging_duration" msgid="1076561255466053220">"Yaklaşık <xliff:g id="TIME_REMAINING">%1$s</xliff:g> kaldı (<xliff:g id="LEVEL">%2$s</xliff:g>)"</string>
<string name="power_remaining_duration_only_enhanced" msgid="2527842780666073218">"Kullanımınıza dayalı olarak yaklaşık <xliff:g id="TIME_REMAINING">%1$s</xliff:g> kaldı"</string>
diff --git a/packages/SettingsLib/res/values-uk/strings.xml b/packages/SettingsLib/res/values-uk/strings.xml
index b1c64f8..97592f9 100644
--- a/packages/SettingsLib/res/values-uk/strings.xml
+++ b/packages/SettingsLib/res/values-uk/strings.xml
@@ -457,8 +457,7 @@
<string name="daltonizer_type_overridden" msgid="4509604753672535721">"Замінено на <xliff:g id="TITLE">%1$s</xliff:g>"</string>
<string name="power_remaining_settings_home_page" msgid="4885165789445462557">"<xliff:g id="PERCENTAGE">%1$s</xliff:g> – <xliff:g id="TIME_STRING">%2$s</xliff:g>"</string>
<string name="power_charging_on_hold_settings_home_page" msgid="7690464049464805856">"<xliff:g id="LEVEL">%1$s</xliff:g> – заряджання призупинено, щоб захистити акумулятор"</string>
- <!-- no translation found for power_incompatible_charging_settings_home_page (1322050766135126880) -->
- <skip />
+ <string name="power_incompatible_charging_settings_home_page" msgid="1322050766135126880">"<xliff:g id="LEVEL">%1$s</xliff:g> – перевірте зарядний пристрій"</string>
<string name="power_remaining_duration_only" msgid="8264199158671531431">"Залишилося приблизно <xliff:g id="TIME_REMAINING">%1$s</xliff:g>"</string>
<string name="power_discharging_duration" msgid="1076561255466053220">"Залишилося приблизно <xliff:g id="TIME_REMAINING">%1$s</xliff:g> (<xliff:g id="LEVEL">%2$s</xliff:g>)"</string>
<string name="power_remaining_duration_only_enhanced" msgid="2527842780666073218">"Згідно з даними про використання залишилося приблизно <xliff:g id="TIME_REMAINING">%1$s</xliff:g>"</string>
diff --git a/packages/SettingsLib/res/values-ur/strings.xml b/packages/SettingsLib/res/values-ur/strings.xml
index f71f4a2..9d34052 100644
--- a/packages/SettingsLib/res/values-ur/strings.xml
+++ b/packages/SettingsLib/res/values-ur/strings.xml
@@ -457,8 +457,7 @@
<string name="daltonizer_type_overridden" msgid="4509604753672535721">"<xliff:g id="TITLE">%1$s</xliff:g> کے ذریعہ منسوخ کردیا گیا"</string>
<string name="power_remaining_settings_home_page" msgid="4885165789445462557">"<xliff:g id="PERCENTAGE">%1$s</xliff:g> - <xliff:g id="TIME_STRING">%2$s</xliff:g>"</string>
<string name="power_charging_on_hold_settings_home_page" msgid="7690464049464805856">"<xliff:g id="LEVEL">%1$s</xliff:g> - بیٹری کی حفاظت کرنے کے لیے چارجنگ ہولڈ پر ہے"</string>
- <!-- no translation found for power_incompatible_charging_settings_home_page (1322050766135126880) -->
- <skip />
+ <string name="power_incompatible_charging_settings_home_page" msgid="1322050766135126880">"<xliff:g id="LEVEL">%1$s</xliff:g> - چارجنگ ایکسیسری چیک کریں"</string>
<string name="power_remaining_duration_only" msgid="8264199158671531431">"تقریباً <xliff:g id="TIME_REMAINING">%1$s</xliff:g> باقی ہے"</string>
<string name="power_discharging_duration" msgid="1076561255466053220">"تقریباً <xliff:g id="TIME_REMAINING">%1$s</xliff:g> باقی ہے (<xliff:g id="LEVEL">%2$s</xliff:g>)"</string>
<string name="power_remaining_duration_only_enhanced" msgid="2527842780666073218">"آپ کے استعمال کی بنیاد پر تقریباً <xliff:g id="TIME_REMAINING">%1$s</xliff:g> باقی ہے"</string>
diff --git a/packages/SettingsLib/res/values-uz/strings.xml b/packages/SettingsLib/res/values-uz/strings.xml
index a3ef6b64..bd38bb4 100644
--- a/packages/SettingsLib/res/values-uz/strings.xml
+++ b/packages/SettingsLib/res/values-uz/strings.xml
@@ -457,8 +457,7 @@
<string name="daltonizer_type_overridden" msgid="4509604753672535721">"<xliff:g id="TITLE">%1$s</xliff:g> bilan almashtirildi"</string>
<string name="power_remaining_settings_home_page" msgid="4885165789445462557">"<xliff:g id="PERCENTAGE">%1$s</xliff:g> – <xliff:g id="TIME_STRING">%2$s</xliff:g>"</string>
<string name="power_charging_on_hold_settings_home_page" msgid="7690464049464805856">"<xliff:g id="LEVEL">%1$s</xliff:g> - Batareyani himoyalash uchun quvvatlash toʻxtatildi"</string>
- <!-- no translation found for power_incompatible_charging_settings_home_page (1322050766135126880) -->
- <skip />
+ <string name="power_incompatible_charging_settings_home_page" msgid="1322050766135126880">"<xliff:g id="LEVEL">%1$s</xliff:g> – Quvvatlash aksessuarini tekshiring"</string>
<string name="power_remaining_duration_only" msgid="8264199158671531431">"Taxminan <xliff:g id="TIME_REMAINING">%1$s</xliff:g> qoldi"</string>
<string name="power_discharging_duration" msgid="1076561255466053220">"Taxminan <xliff:g id="TIME_REMAINING">%1$s</xliff:g> qoldi (<xliff:g id="LEVEL">%2$s</xliff:g>)"</string>
<string name="power_remaining_duration_only_enhanced" msgid="2527842780666073218">"Quvvati tugashiga taxminan <xliff:g id="TIME_REMAINING">%1$s</xliff:g> qoldi"</string>
diff --git a/packages/SettingsLib/res/values-vi/strings.xml b/packages/SettingsLib/res/values-vi/strings.xml
index 3ac91fa..5b91df3 100644
--- a/packages/SettingsLib/res/values-vi/strings.xml
+++ b/packages/SettingsLib/res/values-vi/strings.xml
@@ -457,8 +457,7 @@
<string name="daltonizer_type_overridden" msgid="4509604753672535721">"Bị ghi đè bởi <xliff:g id="TITLE">%1$s</xliff:g>"</string>
<string name="power_remaining_settings_home_page" msgid="4885165789445462557">"<xliff:g id="PERCENTAGE">%1$s</xliff:g> - <xliff:g id="TIME_STRING">%2$s</xliff:g>"</string>
<string name="power_charging_on_hold_settings_home_page" msgid="7690464049464805856">"<xliff:g id="LEVEL">%1$s</xliff:g> – Đang tạm ngưng sạc để bảo vệ pin"</string>
- <!-- no translation found for power_incompatible_charging_settings_home_page (1322050766135126880) -->
- <skip />
+ <string name="power_incompatible_charging_settings_home_page" msgid="1322050766135126880">"<xliff:g id="LEVEL">%1$s</xliff:g> – Hãy kiểm tra phụ kiện sạc"</string>
<string name="power_remaining_duration_only" msgid="8264199158671531431">"Còn khoảng <xliff:g id="TIME_REMAINING">%1$s</xliff:g>"</string>
<string name="power_discharging_duration" msgid="1076561255466053220">"Còn khoảng <xliff:g id="TIME_REMAINING">%1$s</xliff:g> (<xliff:g id="LEVEL">%2$s</xliff:g>)"</string>
<string name="power_remaining_duration_only_enhanced" msgid="2527842780666073218">"Còn khoảng <xliff:g id="TIME_REMAINING">%1$s</xliff:g> dựa trên mức sử dụng của bạn"</string>
diff --git a/packages/SettingsLib/res/values-zh-rCN/strings.xml b/packages/SettingsLib/res/values-zh-rCN/strings.xml
index 7ff6cee..594922a 100644
--- a/packages/SettingsLib/res/values-zh-rCN/strings.xml
+++ b/packages/SettingsLib/res/values-zh-rCN/strings.xml
@@ -457,8 +457,7 @@
<string name="daltonizer_type_overridden" msgid="4509604753672535721">"已被“<xliff:g id="TITLE">%1$s</xliff:g>”覆盖"</string>
<string name="power_remaining_settings_home_page" msgid="4885165789445462557">"<xliff:g id="PERCENTAGE">%1$s</xliff:g> - <xliff:g id="TIME_STRING">%2$s</xliff:g>"</string>
<string name="power_charging_on_hold_settings_home_page" msgid="7690464049464805856">"<xliff:g id="LEVEL">%1$s</xliff:g> - 为保护电池,已暂停充电"</string>
- <!-- no translation found for power_incompatible_charging_settings_home_page (1322050766135126880) -->
- <skip />
+ <string name="power_incompatible_charging_settings_home_page" msgid="1322050766135126880">"<xliff:g id="LEVEL">%1$s</xliff:g> - 请检查充电配件"</string>
<string name="power_remaining_duration_only" msgid="8264199158671531431">"大约还可使用<xliff:g id="TIME_REMAINING">%1$s</xliff:g>"</string>
<string name="power_discharging_duration" msgid="1076561255466053220">"大约还可使用<xliff:g id="TIME_REMAINING">%1$s</xliff:g> (<xliff:g id="LEVEL">%2$s</xliff:g>)"</string>
<string name="power_remaining_duration_only_enhanced" msgid="2527842780666073218">"根据您的使用情况,大约还可使用<xliff:g id="TIME_REMAINING">%1$s</xliff:g>"</string>
diff --git a/packages/SettingsLib/res/values-zh-rHK/strings.xml b/packages/SettingsLib/res/values-zh-rHK/strings.xml
index 53b55bb..b3aafae 100644
--- a/packages/SettingsLib/res/values-zh-rHK/strings.xml
+++ b/packages/SettingsLib/res/values-zh-rHK/strings.xml
@@ -457,8 +457,7 @@
<string name="daltonizer_type_overridden" msgid="4509604753672535721">"已由「<xliff:g id="TITLE">%1$s</xliff:g>」覆寫"</string>
<string name="power_remaining_settings_home_page" msgid="4885165789445462557">"<xliff:g id="PERCENTAGE">%1$s</xliff:g> - <xliff:g id="TIME_STRING">%2$s</xliff:g>"</string>
<string name="power_charging_on_hold_settings_home_page" msgid="7690464049464805856">"<xliff:g id="LEVEL">%1$s</xliff:g> - 為保護電池,目前暫停充電"</string>
- <!-- no translation found for power_incompatible_charging_settings_home_page (1322050766135126880) -->
- <skip />
+ <string name="power_incompatible_charging_settings_home_page" msgid="1322050766135126880">"<xliff:g id="LEVEL">%1$s</xliff:g> - 檢查充電配件"</string>
<string name="power_remaining_duration_only" msgid="8264199158671531431">"還有大約 <xliff:g id="TIME_REMAINING">%1$s</xliff:g>"</string>
<string name="power_discharging_duration" msgid="1076561255466053220">"還有大約 <xliff:g id="TIME_REMAINING">%1$s</xliff:g> (<xliff:g id="LEVEL">%2$s</xliff:g>)"</string>
<string name="power_remaining_duration_only_enhanced" msgid="2527842780666073218">"根據你的使用情況,還有大約 <xliff:g id="TIME_REMAINING">%1$s</xliff:g>"</string>
diff --git a/packages/SettingsLib/res/values-zh-rTW/strings.xml b/packages/SettingsLib/res/values-zh-rTW/strings.xml
index f9ee07d..c3be21a 100644
--- a/packages/SettingsLib/res/values-zh-rTW/strings.xml
+++ b/packages/SettingsLib/res/values-zh-rTW/strings.xml
@@ -457,8 +457,7 @@
<string name="daltonizer_type_overridden" msgid="4509604753672535721">"已改為<xliff:g id="TITLE">%1$s</xliff:g>"</string>
<string name="power_remaining_settings_home_page" msgid="4885165789445462557">"<xliff:g id="PERCENTAGE">%1$s</xliff:g> - <xliff:g id="TIME_STRING">%2$s</xliff:g>"</string>
<string name="power_charging_on_hold_settings_home_page" msgid="7690464049464805856">"<xliff:g id="LEVEL">%1$s</xliff:g> - 為保護電池,目前暫停充電"</string>
- <!-- no translation found for power_incompatible_charging_settings_home_page (1322050766135126880) -->
- <skip />
+ <string name="power_incompatible_charging_settings_home_page" msgid="1322050766135126880">"<xliff:g id="LEVEL">%1$s</xliff:g> · 請檢查充電配件"</string>
<string name="power_remaining_duration_only" msgid="8264199158671531431">"還能使用約 <xliff:g id="TIME_REMAINING">%1$s</xliff:g>"</string>
<string name="power_discharging_duration" msgid="1076561255466053220">"目前電量為 <xliff:g id="LEVEL">%2$s</xliff:g>,還能使用約 <xliff:g id="TIME_REMAINING">%1$s</xliff:g>"</string>
<string name="power_remaining_duration_only_enhanced" msgid="2527842780666073218">"根據你的使用情形,還能使用約 <xliff:g id="TIME_REMAINING">%1$s</xliff:g>"</string>
diff --git a/packages/SettingsLib/res/values-zu/strings.xml b/packages/SettingsLib/res/values-zu/strings.xml
index 8ff64d1..f6aaf81 100644
--- a/packages/SettingsLib/res/values-zu/strings.xml
+++ b/packages/SettingsLib/res/values-zu/strings.xml
@@ -457,8 +457,7 @@
<string name="daltonizer_type_overridden" msgid="4509604753672535721">"Igitshezwe ngaphezulu yi-<xliff:g id="TITLE">%1$s</xliff:g>"</string>
<string name="power_remaining_settings_home_page" msgid="4885165789445462557">"<xliff:g id="PERCENTAGE">%1$s</xliff:g> - <xliff:g id="TIME_STRING">%2$s</xliff:g>"</string>
<string name="power_charging_on_hold_settings_home_page" msgid="7690464049464805856">"<xliff:g id="LEVEL">%1$s</xliff:g> - Ukushaja kumisiwe ukuze kuvikelwe ibhethri"</string>
- <!-- no translation found for power_incompatible_charging_settings_home_page (1322050766135126880) -->
- <skip />
+ <string name="power_incompatible_charging_settings_home_page" msgid="1322050766135126880">"<xliff:g id="LEVEL">%1$s</xliff:g> - Hlola insiza yokushaja"</string>
<string name="power_remaining_duration_only" msgid="8264199158671531431">"Cishe u-<xliff:g id="TIME_REMAINING">%1$s</xliff:g> osele"</string>
<string name="power_discharging_duration" msgid="1076561255466053220">"Cishe u-<xliff:g id="TIME_REMAINING">%1$s</xliff:g> osele (<xliff:g id="LEVEL">%2$s</xliff:g>)"</string>
<string name="power_remaining_duration_only_enhanced" msgid="2527842780666073218">"Cishe u-<xliff:g id="TIME_REMAINING">%1$s</xliff:g> osele ngokususelwe ekusebenziseni wakho"</string>
diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java
index 61c3ce7..c2c82b3 100644
--- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java
+++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java
@@ -1764,40 +1764,4 @@
boolean getUnpairing() {
return mUnpairing;
}
-
- ListenableFuture<Void> syncProfileForMemberDevice() {
- return ThreadUtils.getBackgroundExecutor()
- .submit(
- () -> {
- List<Pair<LocalBluetoothProfile, Boolean>> toSync =
- Stream.of(
- mProfileManager.getA2dpProfile(),
- mProfileManager.getHeadsetProfile(),
- mProfileManager.getHearingAidProfile(),
- mProfileManager.getLeAudioProfile(),
- mProfileManager.getLeAudioBroadcastAssistantProfile())
- .filter(Objects::nonNull)
- .map(profile -> new Pair<>(profile, profile.isEnabled(mDevice)))
- .toList();
-
- for (var t : toSync) {
- LocalBluetoothProfile profile = t.first;
- boolean enabledForMain = t.second;
-
- for (var member : mMemberDevices) {
- BluetoothDevice btDevice = member.getDevice();
-
- if (enabledForMain != profile.isEnabled(btDevice)) {
- Log.d(TAG, "Syncing profile " + profile + " to "
- + enabledForMain + " for member device "
- + btDevice.getAnonymizedAddress() + " of main device "
- + mDevice.getAnonymizedAddress());
- profile.setEnabled(btDevice, enabledForMain);
- }
- }
- }
- return null;
- }
- );
- }
}
diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDeviceManager.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDeviceManager.java
index 32eec7e..4e52c77 100644
--- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDeviceManager.java
+++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDeviceManager.java
@@ -363,7 +363,6 @@
if (profileId == BluetoothProfile.HEADSET
|| profileId == BluetoothProfile.A2DP
|| profileId == BluetoothProfile.LE_AUDIO
- || profileId == BluetoothProfile.LE_AUDIO_BROADCAST_ASSISTANT
|| profileId == BluetoothProfile.CSIP_SET_COORDINATOR) {
return mCsipDeviceManager.onProfileConnectionStateChangedIfProcessed(cachedDevice,
state);
diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/CsipDeviceManager.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/CsipDeviceManager.java
index e67ec48..a49314a 100644
--- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/CsipDeviceManager.java
+++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/CsipDeviceManager.java
@@ -379,7 +379,6 @@
if (hasChanged) {
log("addMemberDevicesIntoMainDevice: After changed, CachedBluetoothDevice list: "
+ mCachedDevices);
- preferredMainDevice.syncProfileForMemberDevice();
}
return hasChanged;
}
diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/HearingAidDeviceManager.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/HearingAidDeviceManager.java
index ca47efd..1069b71 100644
--- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/HearingAidDeviceManager.java
+++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/HearingAidDeviceManager.java
@@ -346,11 +346,15 @@
} else {
long hiSyncId = asha.getHiSyncId(cachedDevice.getDevice());
if (isValidHiSyncId(hiSyncId)) {
- final HearingAidInfo.Builder infoBuilder = new HearingAidInfo.Builder()
+ final HearingAidInfo info = new HearingAidInfo.Builder()
.setAshaDeviceSide(asha.getDeviceSide(cachedDevice.getDevice()))
.setAshaDeviceMode(asha.getDeviceMode(cachedDevice.getDevice()))
- .setHiSyncId(hiSyncId);
- return infoBuilder.build();
+ .setHiSyncId(hiSyncId)
+ .build();
+ if (DEBUG) {
+ Log.d(TAG, "generateHearingAidInfo, " + cachedDevice + ", info=" + info);
+ }
+ return info;
}
}
@@ -358,15 +362,20 @@
final LeAudioProfile leAudioProfile = profileManager.getLeAudioProfile();
if (hapClientProfile == null || leAudioProfile == null) {
Log.w(TAG, "HapClientProfile or LeAudioProfile is not supported on this device");
- } else {
+ } else if (cachedDevice.getProfiles().stream().anyMatch(
+ p -> p instanceof HapClientProfile)) {
int audioLocation = leAudioProfile.getAudioLocation(cachedDevice.getDevice());
int hearingAidType = hapClientProfile.getHearingAidType(cachedDevice.getDevice());
if (audioLocation != BluetoothLeAudio.AUDIO_LOCATION_INVALID
&& hearingAidType != HapClientProfile.HearingAidType.TYPE_INVALID) {
- final HearingAidInfo.Builder infoBuilder = new HearingAidInfo.Builder()
+ final HearingAidInfo info = new HearingAidInfo.Builder()
.setLeAudioLocation(audioLocation)
- .setHapDeviceType(hearingAidType);
- return infoBuilder.build();
+ .setHapDeviceType(hearingAidType)
+ .build();
+ if (DEBUG) {
+ Log.d(TAG, "generateHearingAidInfo, " + cachedDevice + ", info=" + info);
+ }
+ return info;
}
}
diff --git a/packages/SettingsLib/src/com/android/settingslib/wifi/WifiUtils.java b/packages/SettingsLib/src/com/android/settingslib/wifi/WifiUtils.java
deleted file mode 100644
index 69f83a4..0000000
--- a/packages/SettingsLib/src/com/android/settingslib/wifi/WifiUtils.java
+++ /dev/null
@@ -1,447 +0,0 @@
-/*
- * 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.
- */
-
-package com.android.settingslib.wifi;
-
-import static android.net.wifi.WifiConfiguration.NetworkSelectionStatus.NETWORK_SELECTION_ENABLED;
-import static android.net.wifi.WifiConfiguration.NetworkSelectionStatus.getMaxNetworkSelectionDisableReason;
-
-import static com.android.settingslib.flags.Flags.newStatusBarIcons;
-
-import android.content.Context;
-import android.content.Intent;
-import android.graphics.drawable.Drawable;
-import android.icu.text.MessageFormat;
-import android.net.wifi.ScanResult;
-import android.net.wifi.WifiConfiguration;
-import android.net.wifi.WifiConfiguration.NetworkSelectionStatus;
-import android.net.wifi.WifiInfo;
-import android.net.wifi.sharedconnectivity.app.NetworkProviderInfo;
-import android.os.Bundle;
-import android.os.SystemClock;
-import android.util.Log;
-
-import androidx.annotation.VisibleForTesting;
-
-import com.android.settingslib.R;
-
-import java.util.HashMap;
-import java.util.Locale;
-import java.util.Map;
-
-public class WifiUtils {
-
- private static final String TAG = "WifiUtils";
-
- private static final int INVALID_RSSI = -127;
-
- /**
- * The intent action shows Wi-Fi dialog to connect Wi-Fi network.
- * <p>
- * Input: The calling package should put the chosen
- * com.android.wifitrackerlib.WifiEntry#getKey() to a string extra in the request bundle into
- * the {@link #EXTRA_CHOSEN_WIFI_ENTRY_KEY}.
- * <p>
- * Output: Nothing.
- */
- @VisibleForTesting
- static final String ACTION_WIFI_DIALOG = "com.android.settings.WIFI_DIALOG";
-
- /**
- * Specify a key that indicates the WifiEntry to be configured.
- */
- @VisibleForTesting
- static final String EXTRA_CHOSEN_WIFI_ENTRY_KEY = "key_chosen_wifientry_key";
-
- /**
- * The lookup key for a boolean that indicates whether a chosen WifiEntry request to connect to.
- * {@code true} means a chosen WifiEntry request to connect to.
- */
- @VisibleForTesting
- static final String EXTRA_CONNECT_FOR_CALLER = "connect_for_caller";
-
- /**
- * The intent action shows network details settings to allow configuration of Wi-Fi.
- * <p>
- * In some cases, a matching Activity may not exist, so ensure you
- * safeguard against this.
- * <p>
- * Input: The calling package should put the chosen
- * com.android.wifitrackerlib.WifiEntry#getKey() to a string extra in the request bundle into
- * the {@link #KEY_CHOSEN_WIFIENTRY_KEY}.
- * <p>
- * Output: Nothing.
- */
- public static final String ACTION_WIFI_DETAILS_SETTINGS =
- "android.settings.WIFI_DETAILS_SETTINGS";
- public static final String KEY_CHOSEN_WIFIENTRY_KEY = "key_chosen_wifientry_key";
- public static final String EXTRA_SHOW_FRAGMENT_ARGUMENTS = ":settings:show_fragment_args";
-
- static final int[] WIFI_PIE = getIconsBasedOnFlag();
-
- private static int[] getIconsBasedOnFlag() {
- if (newStatusBarIcons()) {
- return new int[] {
- R.drawable.ic_wifi_0,
- R.drawable.ic_wifi_1,
- R.drawable.ic_wifi_2,
- R.drawable.ic_wifi_3,
- R.drawable.ic_wifi_4
- };
- } else {
- return new int[] {
- com.android.internal.R.drawable.ic_wifi_signal_0,
- com.android.internal.R.drawable.ic_wifi_signal_1,
- com.android.internal.R.drawable.ic_wifi_signal_2,
- com.android.internal.R.drawable.ic_wifi_signal_3,
- com.android.internal.R.drawable.ic_wifi_signal_4
- };
- }
- }
-
- static final int[] NO_INTERNET_WIFI_PIE = getErrorIconsBasedOnFlag();
-
- private static int [] getErrorIconsBasedOnFlag() {
- if (newStatusBarIcons()) {
- return new int[] {
- R.drawable.ic_wifi_0_error,
- R.drawable.ic_wifi_1_error,
- R.drawable.ic_wifi_2_error,
- R.drawable.ic_wifi_3_error,
- R.drawable.ic_wifi_4_error
- };
- } else {
- return new int[] {
- R.drawable.ic_no_internet_wifi_signal_0,
- R.drawable.ic_no_internet_wifi_signal_1,
- R.drawable.ic_no_internet_wifi_signal_2,
- R.drawable.ic_no_internet_wifi_signal_3,
- R.drawable.ic_no_internet_wifi_signal_4
- };
- }
- }
-
- public static String buildLoggingSummary(AccessPoint accessPoint, WifiConfiguration config) {
- final StringBuilder summary = new StringBuilder();
- final WifiInfo info = accessPoint.getInfo();
- // Add RSSI/band information for this config, what was seen up to 6 seconds ago
- // verbose WiFi Logging is only turned on thru developers settings
- if (accessPoint.isActive() && info != null) {
- summary.append(" f=" + Integer.toString(info.getFrequency()));
- }
- summary.append(" " + getVisibilityStatus(accessPoint));
- if (config != null
- && (config.getNetworkSelectionStatus().getNetworkSelectionStatus()
- != NETWORK_SELECTION_ENABLED)) {
- summary.append(" (" + config.getNetworkSelectionStatus().getNetworkStatusString());
- if (config.getNetworkSelectionStatus().getDisableTime() > 0) {
- long now = System.currentTimeMillis();
- long diff = (now - config.getNetworkSelectionStatus().getDisableTime()) / 1000;
- long sec = diff % 60; //seconds
- long min = (diff / 60) % 60; //minutes
- long hour = (min / 60) % 60; //hours
- summary.append(", ");
- if (hour > 0) summary.append(Long.toString(hour) + "h ");
- summary.append(Long.toString(min) + "m ");
- summary.append(Long.toString(sec) + "s ");
- }
- summary.append(")");
- }
-
- if (config != null) {
- NetworkSelectionStatus networkStatus = config.getNetworkSelectionStatus();
- for (int reason = 0; reason <= getMaxNetworkSelectionDisableReason(); reason++) {
- if (networkStatus.getDisableReasonCounter(reason) != 0) {
- summary.append(" ")
- .append(NetworkSelectionStatus
- .getNetworkSelectionDisableReasonString(reason))
- .append("=")
- .append(networkStatus.getDisableReasonCounter(reason));
- }
- }
- }
-
- return summary.toString();
- }
-
- /**
- * Returns the visibility status of the WifiConfiguration.
- *
- * @return autojoin debugging information
- * TODO: use a string formatter
- * ["rssi 5Ghz", "num results on 5GHz" / "rssi 5Ghz", "num results on 5GHz"]
- * For instance [-40,5/-30,2]
- */
- @VisibleForTesting
- static String getVisibilityStatus(AccessPoint accessPoint) {
- final WifiInfo info = accessPoint.getInfo();
- StringBuilder visibility = new StringBuilder();
- StringBuilder scans24GHz = new StringBuilder();
- StringBuilder scans5GHz = new StringBuilder();
- StringBuilder scans60GHz = new StringBuilder();
- String bssid = null;
-
- if (accessPoint.isActive() && info != null) {
- bssid = info.getBSSID();
- if (bssid != null) {
- visibility.append(" ").append(bssid);
- }
- visibility.append(" standard = ").append(info.getWifiStandard());
- visibility.append(" rssi=").append(info.getRssi());
- visibility.append(" ");
- visibility.append(" score=").append(info.getScore());
- if (accessPoint.getSpeed() != AccessPoint.Speed.NONE) {
- visibility.append(" speed=").append(accessPoint.getSpeedLabel());
- }
- visibility.append(String.format(" tx=%.1f,", info.getSuccessfulTxPacketsPerSecond()));
- visibility.append(String.format("%.1f,", info.getRetriedTxPacketsPerSecond()));
- visibility.append(String.format("%.1f ", info.getLostTxPacketsPerSecond()));
- visibility.append(String.format("rx=%.1f", info.getSuccessfulRxPacketsPerSecond()));
- }
-
- int maxRssi5 = INVALID_RSSI;
- int maxRssi24 = INVALID_RSSI;
- int maxRssi60 = INVALID_RSSI;
- final int maxDisplayedScans = 4;
- int num5 = 0; // number of scanned BSSID on 5GHz band
- int num24 = 0; // number of scanned BSSID on 2.4Ghz band
- int num60 = 0; // number of scanned BSSID on 60Ghz band
- int numBlockListed = 0;
-
- // TODO: sort list by RSSI or age
- long nowMs = SystemClock.elapsedRealtime();
- for (ScanResult result : accessPoint.getScanResults()) {
- if (result == null) {
- continue;
- }
- if (result.frequency >= AccessPoint.LOWER_FREQ_5GHZ
- && result.frequency <= AccessPoint.HIGHER_FREQ_5GHZ) {
- // Strictly speaking: [4915, 5825]
- num5++;
-
- if (result.level > maxRssi5) {
- maxRssi5 = result.level;
- }
- if (num5 <= maxDisplayedScans) {
- scans5GHz.append(
- verboseScanResultSummary(accessPoint, result, bssid,
- nowMs));
- }
- } else if (result.frequency >= AccessPoint.LOWER_FREQ_24GHZ
- && result.frequency <= AccessPoint.HIGHER_FREQ_24GHZ) {
- // Strictly speaking: [2412, 2482]
- num24++;
-
- if (result.level > maxRssi24) {
- maxRssi24 = result.level;
- }
- if (num24 <= maxDisplayedScans) {
- scans24GHz.append(
- verboseScanResultSummary(accessPoint, result, bssid,
- nowMs));
- }
- } else if (result.frequency >= AccessPoint.LOWER_FREQ_60GHZ
- && result.frequency <= AccessPoint.HIGHER_FREQ_60GHZ) {
- // Strictly speaking: [60000, 61000]
- num60++;
-
- if (result.level > maxRssi60) {
- maxRssi60 = result.level;
- }
- if (num60 <= maxDisplayedScans) {
- scans60GHz.append(
- verboseScanResultSummary(accessPoint, result, bssid,
- nowMs));
- }
- }
- }
- visibility.append(" [");
- if (num24 > 0) {
- visibility.append("(").append(num24).append(")");
- if (num24 > maxDisplayedScans) {
- visibility.append("max=").append(maxRssi24).append(",");
- }
- visibility.append(scans24GHz.toString());
- }
- visibility.append(";");
- if (num5 > 0) {
- visibility.append("(").append(num5).append(")");
- if (num5 > maxDisplayedScans) {
- visibility.append("max=").append(maxRssi5).append(",");
- }
- visibility.append(scans5GHz.toString());
- }
- visibility.append(";");
- if (num60 > 0) {
- visibility.append("(").append(num60).append(")");
- if (num60 > maxDisplayedScans) {
- visibility.append("max=").append(maxRssi60).append(",");
- }
- visibility.append(scans60GHz.toString());
- }
- if (numBlockListed > 0) {
- visibility.append("!").append(numBlockListed);
- }
- visibility.append("]");
-
- return visibility.toString();
- }
-
- @VisibleForTesting
- /* package */ static String verboseScanResultSummary(AccessPoint accessPoint, ScanResult result,
- String bssid, long nowMs) {
- StringBuilder stringBuilder = new StringBuilder();
- stringBuilder.append(" \n{").append(result.BSSID);
- if (result.BSSID.equals(bssid)) {
- stringBuilder.append("*");
- }
- stringBuilder.append("=").append(result.frequency);
- stringBuilder.append(",").append(result.level);
- int speed = getSpecificApSpeed(result, accessPoint.getScoredNetworkCache());
- if (speed != AccessPoint.Speed.NONE) {
- stringBuilder.append(",")
- .append(accessPoint.getSpeedLabel(speed));
- }
- int ageSeconds = (int) (nowMs - result.timestamp / 1000) / 1000;
- stringBuilder.append(",").append(ageSeconds).append("s");
- stringBuilder.append("}");
- return stringBuilder.toString();
- }
-
- @AccessPoint.Speed
- private static int getSpecificApSpeed(ScanResult result,
- Map<String, TimestampedScoredNetwork> scoredNetworkCache) {
- TimestampedScoredNetwork timedScore = scoredNetworkCache.get(result.BSSID);
- if (timedScore == null) {
- return AccessPoint.Speed.NONE;
- }
- // For debugging purposes we may want to use mRssi rather than result.level as the average
- // speed wil be determined by mRssi
- return timedScore.getScore().calculateBadge(result.level);
- }
-
- public static String getMeteredLabel(Context context, WifiConfiguration config) {
- // meteredOverride is whether the user manually set the metered setting or not.
- // meteredHint is whether the network itself is telling us that it is metered
- if (config.meteredOverride == WifiConfiguration.METERED_OVERRIDE_METERED
- || (config.meteredHint && !isMeteredOverridden(config))) {
- return context.getString(R.string.wifi_metered_label);
- }
- return context.getString(R.string.wifi_unmetered_label);
- }
-
- /**
- * Returns the Internet icon resource for a given RSSI level.
- *
- * @param level The number of bars to show (0-4)
- * @param noInternet True if a connected Wi-Fi network cannot access the Internet
- */
- public static int getInternetIconResource(int level, boolean noInternet) {
- int wifiLevel = level;
- if (wifiLevel < 0) {
- Log.e(TAG, "Wi-Fi level is out of range! level:" + level);
- wifiLevel = 0;
- } else if (level >= WIFI_PIE.length) {
- Log.e(TAG, "Wi-Fi level is out of range! level:" + level);
- wifiLevel = WIFI_PIE.length - 1;
- }
- return noInternet ? NO_INTERNET_WIFI_PIE[wifiLevel] : WIFI_PIE[wifiLevel];
- }
-
- /**
- * Returns the Hotspot network icon resource.
- *
- * @param deviceType The device type of Hotspot network
- */
- public static int getHotspotIconResource(int deviceType) {
- return switch (deviceType) {
- case NetworkProviderInfo.DEVICE_TYPE_PHONE -> R.drawable.ic_hotspot_phone;
- case NetworkProviderInfo.DEVICE_TYPE_TABLET -> R.drawable.ic_hotspot_tablet;
- case NetworkProviderInfo.DEVICE_TYPE_LAPTOP -> R.drawable.ic_hotspot_laptop;
- case NetworkProviderInfo.DEVICE_TYPE_WATCH -> R.drawable.ic_hotspot_watch;
- case NetworkProviderInfo.DEVICE_TYPE_AUTO -> R.drawable.ic_hotspot_auto;
- default -> R.drawable.ic_hotspot_phone; // Return phone icon as default.
- };
- }
-
- /**
- * Wrapper the {@link #getInternetIconResource} for testing compatibility.
- */
- public static class InternetIconInjector {
-
- protected final Context mContext;
-
- public InternetIconInjector(Context context) {
- mContext = context;
- }
-
- /**
- * Returns the Internet icon for a given RSSI level.
- *
- * @param noInternet True if a connected Wi-Fi network cannot access the Internet
- * @param level The number of bars to show (0-4)
- */
- public Drawable getIcon(boolean noInternet, int level) {
- return mContext.getDrawable(WifiUtils.getInternetIconResource(level, noInternet));
- }
- }
-
- public static boolean isMeteredOverridden(WifiConfiguration config) {
- return config.meteredOverride != WifiConfiguration.METERED_OVERRIDE_NONE;
- }
-
- /**
- * Returns the Intent for Wi-Fi dialog.
- *
- * @param key The Wi-Fi entry key
- * @param connectForCaller True if a chosen WifiEntry request to connect to
- */
- public static Intent getWifiDialogIntent(String key, boolean connectForCaller) {
- final Intent intent = new Intent(ACTION_WIFI_DIALOG);
- intent.putExtra(EXTRA_CHOSEN_WIFI_ENTRY_KEY, key);
- intent.putExtra(EXTRA_CONNECT_FOR_CALLER, connectForCaller);
- return intent;
- }
-
- /**
- * Returns the Intent for Wi-Fi network details settings.
- *
- * @param key The Wi-Fi entry key
- */
- public static Intent getWifiDetailsSettingsIntent(String key) {
- final Intent intent = new Intent(ACTION_WIFI_DETAILS_SETTINGS);
- final Bundle bundle = new Bundle();
- bundle.putString(KEY_CHOSEN_WIFIENTRY_KEY, key);
- intent.putExtra(EXTRA_SHOW_FRAGMENT_ARGUMENTS, bundle);
- return intent;
- }
-
- /**
- * Returns the string of Wi-Fi tethering summary for connected devices.
- *
- * @param context The application context
- * @param connectedDevices The count of connected devices
- */
- public static String getWifiTetherSummaryForConnectedDevices(Context context,
- int connectedDevices) {
- MessageFormat msgFormat = new MessageFormat(
- context.getResources().getString(R.string.wifi_tether_connected_summary),
- Locale.getDefault());
- Map<String, Object> arguments = new HashMap<>();
- arguments.put("count", connectedDevices);
- return msgFormat.format(arguments);
- }
-}
diff --git a/packages/SettingsLib/src/com/android/settingslib/wifi/WifiUtils.kt b/packages/SettingsLib/src/com/android/settingslib/wifi/WifiUtils.kt
new file mode 100644
index 0000000..65b73ca
--- /dev/null
+++ b/packages/SettingsLib/src/com/android/settingslib/wifi/WifiUtils.kt
@@ -0,0 +1,506 @@
+/*
+ * Copyright (C) 2024 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.settingslib.wifi
+
+import android.content.ComponentName
+import android.content.Context
+import android.content.Intent
+import android.graphics.drawable.Drawable
+import android.icu.text.MessageFormat
+import android.net.wifi.ScanResult
+import android.net.wifi.WifiConfiguration
+import android.net.wifi.WifiConfiguration.NetworkSelectionStatus
+import android.net.wifi.WifiManager
+import android.net.wifi.sharedconnectivity.app.NetworkProviderInfo
+import android.os.Bundle
+import android.os.SystemClock
+import android.util.Log
+import androidx.annotation.VisibleForTesting
+import androidx.lifecycle.LifecycleOwner
+import androidx.lifecycle.lifecycleScope
+import com.android.settingslib.R
+import com.android.settingslib.flags.Flags.newStatusBarIcons
+import java.util.Locale
+import kotlin.coroutines.resume
+import kotlinx.coroutines.Dispatchers
+import kotlinx.coroutines.asExecutor
+import kotlinx.coroutines.launch
+import kotlinx.coroutines.suspendCancellableCoroutine
+import kotlinx.coroutines.withContext
+
+
+open class WifiUtils {
+ /**
+ * Wrapper the [.getInternetIconResource] for testing compatibility.
+ */
+ class InternetIconInjector(protected val context: Context) {
+ /**
+ * Returns the Internet icon for a given RSSI level.
+ *
+ * @param noInternet True if a connected Wi-Fi network cannot access the Internet
+ * @param level The number of bars to show (0-4)
+ */
+ fun getIcon(noInternet: Boolean, level: Int): Drawable? {
+ return context.getDrawable(getInternetIconResource(level, noInternet))
+ }
+ }
+
+ companion object {
+ private const val TAG = "WifiUtils"
+ private const val INVALID_RSSI = -127
+
+ /**
+ * The intent action shows Wi-Fi dialog to connect Wi-Fi network.
+ *
+ *
+ * Input: The calling package should put the chosen
+ * com.android.wifitrackerlib.WifiEntry#getKey() to a string extra in the request bundle into
+ * the [.EXTRA_CHOSEN_WIFI_ENTRY_KEY].
+ *
+ *
+ * Output: Nothing.
+ */
+ @JvmField
+ @VisibleForTesting
+ val ACTION_WIFI_DIALOG = "com.android.settings.WIFI_DIALOG"
+
+ /**
+ * Specify a key that indicates the WifiEntry to be configured.
+ */
+ @JvmField
+ @VisibleForTesting
+ val EXTRA_CHOSEN_WIFI_ENTRY_KEY = "key_chosen_wifientry_key"
+
+ /**
+ * The lookup key for a boolean that indicates whether a chosen WifiEntry request to connect to.
+ * `true` means a chosen WifiEntry request to connect to.
+ */
+ @JvmField
+ @VisibleForTesting
+ val EXTRA_CONNECT_FOR_CALLER = "connect_for_caller"
+
+ /**
+ * The intent action shows network details settings to allow configuration of Wi-Fi.
+ *
+ *
+ * In some cases, a matching Activity may not exist, so ensure you
+ * safeguard against this.
+ *
+ *
+ * Input: The calling package should put the chosen
+ * com.android.wifitrackerlib.WifiEntry#getKey() to a string extra in the request bundle into
+ * the [.KEY_CHOSEN_WIFIENTRY_KEY].
+ *
+ *
+ * Output: Nothing.
+ */
+ const val ACTION_WIFI_DETAILS_SETTINGS = "android.settings.WIFI_DETAILS_SETTINGS"
+ const val KEY_CHOSEN_WIFIENTRY_KEY = "key_chosen_wifientry_key"
+ const val EXTRA_SHOW_FRAGMENT_ARGUMENTS = ":settings:show_fragment_args"
+
+ @JvmField
+ val WIFI_PIE = getIconsBasedOnFlag()
+
+ private fun getIconsBasedOnFlag(): IntArray {
+ return if (newStatusBarIcons()) {
+ intArrayOf(
+ R.drawable.ic_wifi_0,
+ R.drawable.ic_wifi_1,
+ R.drawable.ic_wifi_2,
+ R.drawable.ic_wifi_3,
+ R.drawable.ic_wifi_4
+ )
+ } else {
+ intArrayOf(
+ com.android.internal.R.drawable.ic_wifi_signal_0,
+ com.android.internal.R.drawable.ic_wifi_signal_1,
+ com.android.internal.R.drawable.ic_wifi_signal_2,
+ com.android.internal.R.drawable.ic_wifi_signal_3,
+ com.android.internal.R.drawable.ic_wifi_signal_4
+ )
+ }
+ }
+
+ val NO_INTERNET_WIFI_PIE = getErrorIconsBasedOnFlag()
+
+ private fun getErrorIconsBasedOnFlag(): IntArray {
+ return if (newStatusBarIcons()) {
+ intArrayOf(
+ R.drawable.ic_wifi_0_error,
+ R.drawable.ic_wifi_1_error,
+ R.drawable.ic_wifi_2_error,
+ R.drawable.ic_wifi_3_error,
+ R.drawable.ic_wifi_4_error
+ )
+ } else {
+ intArrayOf(
+ R.drawable.ic_no_internet_wifi_signal_0,
+ R.drawable.ic_no_internet_wifi_signal_1,
+ R.drawable.ic_no_internet_wifi_signal_2,
+ R.drawable.ic_no_internet_wifi_signal_3,
+ R.drawable.ic_no_internet_wifi_signal_4
+ )
+ }
+ }
+
+ @JvmStatic
+ fun buildLoggingSummary(accessPoint: AccessPoint, config: WifiConfiguration?): String {
+ val summary = StringBuilder()
+ val info = accessPoint.info
+ // Add RSSI/band information for this config, what was seen up to 6 seconds ago
+ // verbose WiFi Logging is only turned on thru developers settings
+ if (accessPoint.isActive && info != null) {
+ summary.append(" f=" + info.frequency.toString())
+ }
+ summary.append(" " + getVisibilityStatus(accessPoint))
+ if (config != null && (config.networkSelectionStatus.networkSelectionStatus
+ != NetworkSelectionStatus.NETWORK_SELECTION_ENABLED)
+ ) {
+ summary.append(" (" + config.networkSelectionStatus.networkStatusString)
+ if (config.networkSelectionStatus.disableTime > 0) {
+ val now = System.currentTimeMillis()
+ val diff = (now - config.networkSelectionStatus.disableTime) / 1000
+ val sec = diff % 60 // seconds
+ val min = diff / 60 % 60 // minutes
+ val hour = min / 60 % 60 // hours
+ summary.append(", ")
+ if (hour > 0) summary.append(hour.toString() + "h ")
+ summary.append(min.toString() + "m ")
+ summary.append(sec.toString() + "s ")
+ }
+ summary.append(")")
+ }
+ if (config != null) {
+ val networkStatus = config.networkSelectionStatus
+ for (reason in 0..NetworkSelectionStatus.getMaxNetworkSelectionDisableReason()) {
+ if (networkStatus.getDisableReasonCounter(reason) != 0) {
+ summary.append(" ")
+ .append(
+ NetworkSelectionStatus
+ .getNetworkSelectionDisableReasonString(reason)
+ )
+ .append("=")
+ .append(networkStatus.getDisableReasonCounter(reason))
+ }
+ }
+ }
+ return summary.toString()
+ }
+
+ /**
+ * Returns the visibility status of the WifiConfiguration.
+ *
+ * @return autojoin debugging information
+ * TODO: use a string formatter
+ * ["rssi 5Ghz", "num results on 5GHz" / "rssi 5Ghz", "num results on 5GHz"]
+ * For instance [-40,5/-30,2]
+ */
+ @JvmStatic
+ @VisibleForTesting
+ fun getVisibilityStatus(accessPoint: AccessPoint): String {
+ val info = accessPoint.info
+ val visibility = StringBuilder()
+ val scans24GHz = StringBuilder()
+ val scans5GHz = StringBuilder()
+ val scans60GHz = StringBuilder()
+ var bssid: String? = null
+ if (accessPoint.isActive && info != null) {
+ bssid = info.bssid
+ if (bssid != null) {
+ visibility.append(" ").append(bssid)
+ }
+ visibility.append(" standard = ").append(info.wifiStandard)
+ visibility.append(" rssi=").append(info.rssi)
+ visibility.append(" ")
+ visibility.append(" score=").append(info.getScore())
+ if (accessPoint.speed != AccessPoint.Speed.NONE) {
+ visibility.append(" speed=").append(accessPoint.speedLabel)
+ }
+ visibility.append(String.format(" tx=%.1f,", info.successfulTxPacketsPerSecond))
+ visibility.append(String.format("%.1f,", info.retriedTxPacketsPerSecond))
+ visibility.append(String.format("%.1f ", info.lostTxPacketsPerSecond))
+ visibility.append(String.format("rx=%.1f", info.successfulRxPacketsPerSecond))
+ }
+ var maxRssi5 = INVALID_RSSI
+ var maxRssi24 = INVALID_RSSI
+ var maxRssi60 = INVALID_RSSI
+ val maxDisplayedScans = 4
+ var num5 = 0 // number of scanned BSSID on 5GHz band
+ var num24 = 0 // number of scanned BSSID on 2.4Ghz band
+ var num60 = 0 // number of scanned BSSID on 60Ghz band
+ val numBlockListed = 0
+
+ // TODO: sort list by RSSI or age
+ val nowMs = SystemClock.elapsedRealtime()
+ for (result in accessPoint.getScanResults()) {
+ if (result == null) {
+ continue
+ }
+ if (result.frequency >= AccessPoint.LOWER_FREQ_5GHZ &&
+ result.frequency <= AccessPoint.HIGHER_FREQ_5GHZ
+ ) {
+ // Strictly speaking: [4915, 5825]
+ num5++
+ if (result.level > maxRssi5) {
+ maxRssi5 = result.level
+ }
+ if (num5 <= maxDisplayedScans) {
+ scans5GHz.append(
+ verboseScanResultSummary(
+ accessPoint, result, bssid,
+ nowMs
+ )
+ )
+ }
+ } else if (result.frequency >= AccessPoint.LOWER_FREQ_24GHZ &&
+ result.frequency <= AccessPoint.HIGHER_FREQ_24GHZ
+ ) {
+ // Strictly speaking: [2412, 2482]
+ num24++
+ if (result.level > maxRssi24) {
+ maxRssi24 = result.level
+ }
+ if (num24 <= maxDisplayedScans) {
+ scans24GHz.append(
+ verboseScanResultSummary(
+ accessPoint, result, bssid,
+ nowMs
+ )
+ )
+ }
+ } else if (result.frequency >= AccessPoint.LOWER_FREQ_60GHZ &&
+ result.frequency <= AccessPoint.HIGHER_FREQ_60GHZ
+ ) {
+ // Strictly speaking: [60000, 61000]
+ num60++
+ if (result.level > maxRssi60) {
+ maxRssi60 = result.level
+ }
+ if (num60 <= maxDisplayedScans) {
+ scans60GHz.append(
+ verboseScanResultSummary(
+ accessPoint, result, bssid,
+ nowMs
+ )
+ )
+ }
+ }
+ }
+ visibility.append(" [")
+ if (num24 > 0) {
+ visibility.append("(").append(num24).append(")")
+ if (num24 > maxDisplayedScans) {
+ visibility.append("max=").append(maxRssi24).append(",")
+ }
+ visibility.append(scans24GHz.toString())
+ }
+ visibility.append(";")
+ if (num5 > 0) {
+ visibility.append("(").append(num5).append(")")
+ if (num5 > maxDisplayedScans) {
+ visibility.append("max=").append(maxRssi5).append(",")
+ }
+ visibility.append(scans5GHz.toString())
+ }
+ visibility.append(";")
+ if (num60 > 0) {
+ visibility.append("(").append(num60).append(")")
+ if (num60 > maxDisplayedScans) {
+ visibility.append("max=").append(maxRssi60).append(",")
+ }
+ visibility.append(scans60GHz.toString())
+ }
+ if (numBlockListed > 0) {
+ visibility.append("!").append(numBlockListed)
+ }
+ visibility.append("]")
+ return visibility.toString()
+ }
+
+ @JvmStatic
+ @VisibleForTesting /* package */ fun verboseScanResultSummary(
+ accessPoint: AccessPoint,
+ result: ScanResult,
+ bssid: String?,
+ nowMs: Long
+ ): String {
+ val stringBuilder = StringBuilder()
+ stringBuilder.append(" \n{").append(result.BSSID)
+ if (result.BSSID == bssid) {
+ stringBuilder.append("*")
+ }
+ stringBuilder.append("=").append(result.frequency)
+ stringBuilder.append(",").append(result.level)
+ val speed = getSpecificApSpeed(result, accessPoint.scoredNetworkCache)
+ if (speed != AccessPoint.Speed.NONE) {
+ stringBuilder.append(",")
+ .append(accessPoint.getSpeedLabel(speed))
+ }
+ val ageSeconds = (nowMs - result.timestamp / 1000).toInt() / 1000
+ stringBuilder.append(",").append(ageSeconds).append("s")
+ stringBuilder.append("}")
+ return stringBuilder.toString()
+ }
+
+ @AccessPoint.Speed
+ private fun getSpecificApSpeed(
+ result: ScanResult,
+ scoredNetworkCache: Map<String, TimestampedScoredNetwork>
+ ): Int {
+ val timedScore = scoredNetworkCache[result.BSSID] ?: return AccessPoint.Speed.NONE
+ // For debugging purposes we may want to use mRssi rather than result.level as the average
+ // speed wil be determined by mRssi
+ return timedScore.score.calculateBadge(result.level)
+ }
+
+ @JvmStatic
+ fun getMeteredLabel(context: Context, config: WifiConfiguration): String {
+ // meteredOverride is whether the user manually set the metered setting or not.
+ // meteredHint is whether the network itself is telling us that it is metered
+ return if (config.meteredOverride == WifiConfiguration.METERED_OVERRIDE_METERED ||
+ config.meteredHint && !isMeteredOverridden(
+ config
+ )
+ ) {
+ context.getString(R.string.wifi_metered_label)
+ } else context.getString(R.string.wifi_unmetered_label)
+ }
+
+ /**
+ * Returns the Internet icon resource for a given RSSI level.
+ *
+ * @param level The number of bars to show (0-4)
+ * @param noInternet True if a connected Wi-Fi network cannot access the Internet
+ */
+ @JvmStatic
+ fun getInternetIconResource(level: Int, noInternet: Boolean): Int {
+ var wifiLevel = level
+ if (wifiLevel < 0) {
+ Log.e(TAG, "Wi-Fi level is out of range! level:$level")
+ wifiLevel = 0
+ } else if (level >= WIFI_PIE.size) {
+ Log.e(TAG, "Wi-Fi level is out of range! level:$level")
+ wifiLevel = WIFI_PIE.size - 1
+ }
+ return if (noInternet) NO_INTERNET_WIFI_PIE[wifiLevel] else WIFI_PIE[wifiLevel]
+ }
+
+ /**
+ * Returns the Hotspot network icon resource.
+ *
+ * @param deviceType The device type of Hotspot network
+ */
+ @JvmStatic
+ fun getHotspotIconResource(deviceType: Int): Int {
+ return when (deviceType) {
+ NetworkProviderInfo.DEVICE_TYPE_PHONE -> R.drawable.ic_hotspot_phone
+ NetworkProviderInfo.DEVICE_TYPE_TABLET -> R.drawable.ic_hotspot_tablet
+ NetworkProviderInfo.DEVICE_TYPE_LAPTOP -> R.drawable.ic_hotspot_laptop
+ NetworkProviderInfo.DEVICE_TYPE_WATCH -> R.drawable.ic_hotspot_watch
+ NetworkProviderInfo.DEVICE_TYPE_AUTO -> R.drawable.ic_hotspot_auto
+ else -> R.drawable.ic_hotspot_phone
+ }
+ }
+
+ @JvmStatic
+ fun isMeteredOverridden(config: WifiConfiguration): Boolean {
+ return config.meteredOverride != WifiConfiguration.METERED_OVERRIDE_NONE
+ }
+
+ /**
+ * Returns the Intent for Wi-Fi dialog.
+ *
+ * @param key The Wi-Fi entry key
+ * @param connectForCaller True if a chosen WifiEntry request to connect to
+ */
+ @JvmStatic
+ fun getWifiDialogIntent(key: String?, connectForCaller: Boolean): Intent {
+ val intent = Intent(ACTION_WIFI_DIALOG)
+ intent.putExtra(EXTRA_CHOSEN_WIFI_ENTRY_KEY, key)
+ intent.putExtra(EXTRA_CONNECT_FOR_CALLER, connectForCaller)
+ return intent
+ }
+
+ /**
+ * Returns the Intent for Wi-Fi network details settings.
+ *
+ * @param key The Wi-Fi entry key
+ */
+ @JvmStatic
+ fun getWifiDetailsSettingsIntent(key: String?): Intent {
+ val intent = Intent(ACTION_WIFI_DETAILS_SETTINGS)
+ val bundle = Bundle()
+ bundle.putString(KEY_CHOSEN_WIFIENTRY_KEY, key)
+ intent.putExtra(EXTRA_SHOW_FRAGMENT_ARGUMENTS, bundle)
+ return intent
+ }
+
+ /**
+ * Returns the string of Wi-Fi tethering summary for connected devices.
+ *
+ * @param context The application context
+ * @param connectedDevices The count of connected devices
+ */
+ @JvmStatic
+ fun getWifiTetherSummaryForConnectedDevices(
+ context: Context,
+ connectedDevices: Int
+ ): String {
+ val msgFormat = MessageFormat(
+ context.resources.getString(R.string.wifi_tether_connected_summary),
+ Locale.getDefault()
+ )
+ val arguments: MutableMap<String, Any> = HashMap()
+ arguments["count"] = connectedDevices
+ return msgFormat.format(arguments)
+ }
+
+ @JvmStatic
+ fun checkWepAllowed(
+ context: Context,
+ lifecycleOwner: LifecycleOwner,
+ ssid: String,
+ onAllowed: () -> Unit,
+ ) {
+ lifecycleOwner.lifecycleScope.launch {
+ val wifiManager = context.getSystemService(WifiManager::class.java) ?: return@launch
+ if (wifiManager.queryWepAllowed()) {
+ onAllowed()
+ } else {
+ val intent = Intent(Intent.ACTION_MAIN).apply {
+ component = ComponentName(
+ "com.android.settings",
+ "com.android.settings.network.WepNetworkDialogActivity"
+ )
+ putExtra(SSID, ssid)
+ }
+ context.startActivity(intent)
+ }
+ }
+ }
+
+ private suspend fun WifiManager.queryWepAllowed(): Boolean =
+ withContext(Dispatchers.Default) {
+ suspendCancellableCoroutine { continuation ->
+ queryWepAllowed(Dispatchers.Default.asExecutor()) {
+ continuation.resume(it)
+ }
+ }
+ }
+
+ const val SSID = "ssid"
+ }
+}
diff --git a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/CachedBluetoothDeviceTest.java b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/CachedBluetoothDeviceTest.java
index 461ecf5d..5996dbb 100644
--- a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/CachedBluetoothDeviceTest.java
+++ b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/CachedBluetoothDeviceTest.java
@@ -18,9 +18,7 @@
import static com.google.common.truth.Truth.assertThat;
import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.ArgumentMatchers.anyBoolean;
import static org.mockito.ArgumentMatchers.anyString;
-import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.doAnswer;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.mock;
@@ -58,8 +56,6 @@
import org.robolectric.annotation.Config;
import org.robolectric.shadow.api.Shadow;
-import java.util.concurrent.ExecutionException;
-
@RunWith(RobolectricTestRunner.class)
@Config(shadows = {ShadowBluetoothAdapter.class})
public class CachedBluetoothDeviceTest {
@@ -1823,52 +1819,6 @@
assertThat(mCachedDevice.isConnectedHearingAidDevice()).isFalse();
}
- @Test
- public void syncProfileForMemberDevice_hasDiff_shouldSync()
- throws ExecutionException, InterruptedException {
- mCachedDevice.addMemberDevice(mSubCachedDevice);
- when(mProfileManager.getA2dpProfile()).thenReturn(mA2dpProfile);
- when(mProfileManager.getHearingAidProfile()).thenReturn(mHearingAidProfile);
- when(mProfileManager.getLeAudioProfile()).thenReturn(mLeAudioProfile);
-
- when(mA2dpProfile.isEnabled(mDevice)).thenReturn(true);
- when(mHearingAidProfile.isEnabled(mDevice)).thenReturn(true);
- when(mLeAudioProfile.isEnabled(mDevice)).thenReturn(true);
-
- when(mA2dpProfile.isEnabled(mSubDevice)).thenReturn(true);
- when(mHearingAidProfile.isEnabled(mSubDevice)).thenReturn(false);
- when(mLeAudioProfile.isEnabled(mSubDevice)).thenReturn(false);
-
- mCachedDevice.syncProfileForMemberDevice().get();
-
- verify(mA2dpProfile, never()).setEnabled(any(BluetoothDevice.class), anyBoolean());
- verify(mHearingAidProfile).setEnabled(any(BluetoothDevice.class), eq(true));
- verify(mLeAudioProfile).setEnabled(any(BluetoothDevice.class), eq(true));
- }
-
- @Test
- public void syncProfileForMemberDevice_noDiff_shouldNotSync()
- throws ExecutionException, InterruptedException {
- mCachedDevice.addMemberDevice(mSubCachedDevice);
- when(mProfileManager.getA2dpProfile()).thenReturn(mA2dpProfile);
- when(mProfileManager.getHearingAidProfile()).thenReturn(mHearingAidProfile);
- when(mProfileManager.getLeAudioProfile()).thenReturn(mLeAudioProfile);
-
- when(mA2dpProfile.isEnabled(mDevice)).thenReturn(false);
- when(mHearingAidProfile.isEnabled(mDevice)).thenReturn(false);
- when(mLeAudioProfile.isEnabled(mDevice)).thenReturn(true);
-
- when(mA2dpProfile.isEnabled(mSubDevice)).thenReturn(false);
- when(mHearingAidProfile.isEnabled(mSubDevice)).thenReturn(false);
- when(mLeAudioProfile.isEnabled(mSubDevice)).thenReturn(true);
-
- mCachedDevice.syncProfileForMemberDevice().get();
-
- verify(mA2dpProfile, never()).setEnabled(any(BluetoothDevice.class), anyBoolean());
- verify(mHearingAidProfile, never()).setEnabled(any(BluetoothDevice.class), anyBoolean());
- verify(mLeAudioProfile, never()).setEnabled(any(BluetoothDevice.class), anyBoolean());
- }
-
private HearingAidInfo getLeftAshaHearingAidInfo() {
return new HearingAidInfo.Builder()
.setAshaDeviceSide(HearingAidProfile.DeviceSide.SIDE_LEFT)
diff --git a/packages/SystemUI/aconfig/systemui.aconfig b/packages/SystemUI/aconfig/systemui.aconfig
index 6fa8759..8c8975f 100644
--- a/packages/SystemUI/aconfig/systemui.aconfig
+++ b/packages/SystemUI/aconfig/systemui.aconfig
@@ -94,6 +94,17 @@
}
flag {
+ name: "pss_app_selector_abrupt_exit_fix"
+ namespace: "systemui"
+ description: "Fixes the app selector abruptly disappearing without an animation, when the"
+ "selected task is the foreground task."
+ bug: "314385883"
+ metadata {
+ purpose: PURPOSE_BUGFIX
+ }
+}
+
+flag {
name: "notifications_background_media_icons"
namespace: "systemui"
description: "Updates icons for media notifications in the background."
diff --git a/packages/SystemUI/compose/facade/enabled/src/com/android/systemui/compose/ComposeFacade.kt b/packages/SystemUI/compose/facade/enabled/src/com/android/systemui/compose/ComposeFacade.kt
deleted file mode 100644
index 76931a2..0000000
--- a/packages/SystemUI/compose/facade/enabled/src/com/android/systemui/compose/ComposeFacade.kt
+++ /dev/null
@@ -1,250 +0,0 @@
-/*
- * Copyright (C) 2022 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.systemui.compose
-
-import android.content.Context
-import android.graphics.Point
-import android.view.View
-import android.view.WindowInsets
-import androidx.activity.ComponentActivity
-import androidx.activity.compose.setContent
-import androidx.compose.foundation.background
-import androidx.compose.foundation.layout.Box
-import androidx.compose.foundation.layout.fillMaxSize
-import androidx.compose.ui.Modifier
-import androidx.compose.ui.platform.ComposeView
-import androidx.compose.ui.unit.Dp
-import androidx.compose.ui.unit.dp
-import androidx.lifecycle.LifecycleOwner
-import com.android.compose.theme.LocalAndroidColorScheme
-import com.android.compose.theme.PlatformTheme
-import com.android.compose.ui.platform.DensityAwareComposeView
-import com.android.internal.policy.ScreenDecorationsUtils
-import com.android.systemui.bouncer.ui.BouncerDialogFactory
-import com.android.systemui.bouncer.ui.composable.BouncerContent
-import com.android.systemui.bouncer.ui.viewmodel.BouncerViewModel
-import com.android.systemui.common.ui.compose.windowinsets.CutoutLocation
-import com.android.systemui.common.ui.compose.windowinsets.DisplayCutout
-import com.android.systemui.common.ui.compose.windowinsets.ScreenDecorProvider
-import com.android.systemui.communal.ui.compose.CommunalContainer
-import com.android.systemui.communal.ui.compose.CommunalHub
-import com.android.systemui.communal.ui.viewmodel.BaseCommunalViewModel
-import com.android.systemui.communal.ui.viewmodel.CommunalViewModel
-import com.android.systemui.communal.widgets.WidgetConfigurator
-import com.android.systemui.keyboard.stickykeys.ui.view.createStickyKeyIndicatorView
-import com.android.systemui.keyboard.stickykeys.ui.viewmodel.StickyKeysIndicatorViewModel
-import com.android.systemui.keyguard.shared.model.LockscreenSceneBlueprint
-import com.android.systemui.keyguard.ui.composable.LockscreenContent
-import com.android.systemui.keyguard.ui.composable.blueprint.ComposableLockscreenSceneBlueprint
-import com.android.systemui.keyguard.ui.viewmodel.LockscreenContentViewModel
-import com.android.systemui.people.ui.compose.PeopleScreen
-import com.android.systemui.people.ui.viewmodel.PeopleViewModel
-import com.android.systemui.qs.footer.ui.compose.FooterActions
-import com.android.systemui.qs.footer.ui.viewmodel.FooterActionsViewModel
-import com.android.systemui.scene.shared.model.Scene
-import com.android.systemui.scene.shared.model.SceneDataSourceDelegator
-import com.android.systemui.scene.shared.model.SceneKey
-import com.android.systemui.scene.ui.composable.ComposableScene
-import com.android.systemui.scene.ui.composable.SceneContainer
-import com.android.systemui.scene.ui.viewmodel.SceneContainerViewModel
-import com.android.systemui.volume.panel.ui.composable.VolumePanelRoot
-import com.android.systemui.volume.panel.ui.viewmodel.VolumePanelViewModel
-import kotlinx.coroutines.CoroutineScope
-import kotlinx.coroutines.flow.SharingStarted
-import kotlinx.coroutines.flow.StateFlow
-import kotlinx.coroutines.flow.map
-import kotlinx.coroutines.flow.stateIn
-
-/** The Compose facade, when Compose is available. */
-object ComposeFacade : BaseComposeFacade {
- override fun isComposeAvailable(): Boolean = true
-
- override fun composeInitializer(): ComposeInitializer = ComposeInitializerImpl
-
- override fun setPeopleSpaceActivityContent(
- activity: ComponentActivity,
- viewModel: PeopleViewModel,
- onResult: (PeopleViewModel.Result) -> Unit,
- ) {
- activity.setContent { PlatformTheme { PeopleScreen(viewModel, onResult) } }
- }
-
- override fun setCommunalEditWidgetActivityContent(
- activity: ComponentActivity,
- viewModel: BaseCommunalViewModel,
- widgetConfigurator: WidgetConfigurator,
- onOpenWidgetPicker: () -> Unit,
- onEditDone: () -> Unit,
- ) {
- activity.setContent {
- PlatformTheme {
- Box(
- modifier =
- Modifier.fillMaxSize()
- .background(LocalAndroidColorScheme.current.outlineVariant),
- ) {
- CommunalHub(
- viewModel = viewModel,
- onOpenWidgetPicker = onOpenWidgetPicker,
- widgetConfigurator = widgetConfigurator,
- onEditDone = onEditDone,
- )
- }
- }
- }
- }
-
- override fun setVolumePanelActivityContent(
- activity: ComponentActivity,
- viewModel: VolumePanelViewModel,
- onDismiss: () -> Unit,
- ) {
- activity.setContent {
- VolumePanelRoot(
- viewModel = viewModel,
- onDismiss = onDismiss,
- )
- }
- }
-
- override fun createFooterActionsView(
- context: Context,
- viewModel: FooterActionsViewModel,
- qsVisibilityLifecycleOwner: LifecycleOwner,
- ): View {
- return DensityAwareComposeView(context).apply {
- setContent { PlatformTheme { FooterActions(viewModel, qsVisibilityLifecycleOwner) } }
- }
- }
-
- override fun createSceneContainerView(
- scope: CoroutineScope,
- context: Context,
- viewModel: SceneContainerViewModel,
- windowInsets: StateFlow<WindowInsets?>,
- sceneByKey: Map<SceneKey, Scene>,
- dataSourceDelegator: SceneDataSourceDelegator,
- ): View {
- return ComposeView(context).apply {
- setContent {
- PlatformTheme {
- ScreenDecorProvider(
- displayCutout = displayCutoutFromWindowInsets(scope, context, windowInsets),
- screenCornerRadius = ScreenDecorationsUtils.getWindowCornerRadius(context)
- ) {
- SceneContainer(
- viewModel = viewModel,
- sceneByKey =
- sceneByKey.mapValues { (_, scene) -> scene as ComposableScene },
- dataSourceDelegator = dataSourceDelegator,
- )
- }
- }
- }
- }
- }
-
- override fun createStickyKeysIndicatorContent(
- context: Context,
- viewModel: StickyKeysIndicatorViewModel
- ): View {
- return createStickyKeyIndicatorView(context, viewModel)
- }
-
- override fun createCommunalView(
- context: Context,
- viewModel: BaseCommunalViewModel,
- ): View {
- return ComposeView(context).apply {
- setContent { PlatformTheme { CommunalHub(viewModel = viewModel) } }
- }
- }
-
- override fun createCommunalContainer(context: Context, viewModel: CommunalViewModel): View {
- return ComposeView(context).apply {
- setContent { PlatformTheme { CommunalContainer(viewModel = viewModel) } }
- }
- }
-
- // TODO(b/298525212): remove once Compose exposes window inset bounds.
- private fun displayCutoutFromWindowInsets(
- scope: CoroutineScope,
- context: Context,
- windowInsets: StateFlow<WindowInsets?>,
- ): StateFlow<DisplayCutout> =
- windowInsets
- .map {
- val boundingRect = it?.displayCutout?.boundingRectTop
- val width = boundingRect?.let { boundingRect.right - boundingRect.left } ?: 0
- val left = boundingRect?.left?.toDp(context) ?: 0.dp
- val top = boundingRect?.top?.toDp(context) ?: 0.dp
- val right = boundingRect?.right?.toDp(context) ?: 0.dp
- val bottom = boundingRect?.bottom?.toDp(context) ?: 0.dp
- val location =
- when {
- width <= 0f -> CutoutLocation.NONE
- left <= 0.dp -> CutoutLocation.LEFT
- right >= getDisplayWidth(context) -> CutoutLocation.RIGHT
- else -> CutoutLocation.CENTER
- }
- DisplayCutout(
- left,
- top,
- right,
- bottom,
- location,
- )
- }
- .stateIn(scope, SharingStarted.WhileSubscribed(), DisplayCutout())
-
- // TODO(b/298525212): remove once Compose exposes window inset bounds.
- private fun getDisplayWidth(context: Context): Dp {
- val point = Point()
- checkNotNull(context.display).getRealSize(point)
- return point.x.dp
- }
-
- // TODO(b/298525212): remove once Compose exposes window inset bounds.
- private fun Int.toDp(context: Context): Dp {
- return (this.toFloat() / context.resources.displayMetrics.density).dp
- }
-
- override fun createBouncer(
- context: Context,
- viewModel: BouncerViewModel,
- dialogFactory: BouncerDialogFactory,
- ): View {
- return ComposeView(context).apply {
- setContent { PlatformTheme { BouncerContent(viewModel, dialogFactory) } }
- }
- }
-
- override fun createLockscreen(
- context: Context,
- viewModel: LockscreenContentViewModel,
- blueprints: Set<@JvmSuppressWildcards LockscreenSceneBlueprint>,
- ): View {
- val sceneBlueprints =
- blueprints.mapNotNull { it as? ComposableLockscreenSceneBlueprint }.toSet()
- return ComposeView(context).apply {
- setContent {
- LockscreenContent(viewModel = viewModel, blueprints = sceneBlueprints)
- .Content(modifier = Modifier.fillMaxSize())
- }
- }
- }
-}
diff --git a/packages/SystemUI/compose/facade/enabled/src/com/android/systemui/compose/ComposeInitializerImpl.kt b/packages/SystemUI/compose/facade/enabled/src/com/android/systemui/compose/ComposeInitializerImpl.kt
deleted file mode 100644
index 1674591..0000000
--- a/packages/SystemUI/compose/facade/enabled/src/com/android/systemui/compose/ComposeInitializerImpl.kt
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Copyright (C) 2023 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.systemui.compose
-
-import android.view.View
-import androidx.lifecycle.findViewTreeLifecycleOwner
-import androidx.lifecycle.setViewTreeLifecycleOwner
-import androidx.lifecycle.Lifecycle
-import androidx.savedstate.SavedStateRegistryController
-import androidx.savedstate.SavedStateRegistryOwner
-import com.android.compose.animation.ViewTreeSavedStateRegistryOwner
-import com.android.systemui.lifecycle.ViewLifecycleOwner
-
-internal object ComposeInitializerImpl : ComposeInitializer {
- override fun onAttachedToWindow(root: View) {
- if (root.findViewTreeLifecycleOwner() != null) {
- error("root $root already has a LifecycleOwner")
- }
-
- val parent = root.parent
- if (parent is View && parent.id != android.R.id.content) {
- error(
- "ComposeInitializer.onAttachedToWindow(View) must be called on the content child." +
- "Outside of activities and dialogs, this is usually the top-most View of a " +
- "window."
- )
- }
-
- // The lifecycle owner, which is STARTED when [root] is visible and RESUMED when [root] is
- // both visible and focused.
- val lifecycleOwner = ViewLifecycleOwner(root)
-
- // We create a trivial implementation of [SavedStateRegistryOwner] that does not do any save
- // or restore because SystemUI process is always running and top-level windows using this
- // initializer are created once, when the process is started.
- val savedStateRegistryOwner =
- object : SavedStateRegistryOwner {
- private val savedStateRegistryController =
- SavedStateRegistryController.create(this).apply { performRestore(null) }
-
- override val savedStateRegistry = savedStateRegistryController.savedStateRegistry
-
- override val lifecycle: Lifecycle
- get() = lifecycleOwner.lifecycle
- }
-
- // We must call [ViewLifecycleOwner.onCreate] after creating the [SavedStateRegistryOwner]
- // because `onCreate` might move the lifecycle state to STARTED which will make
- // [SavedStateRegistryController.performRestore] throw.
- lifecycleOwner.onCreate()
-
- // Set the owners on the root. They will be reused by any ComposeView inside the root
- // hierarchy.
- root.setViewTreeLifecycleOwner(lifecycleOwner)
- ViewTreeSavedStateRegistryOwner.set(root, savedStateRegistryOwner)
- }
-
- override fun onDetachedFromWindow(root: View) {
- (root.findViewTreeLifecycleOwner() as ViewLifecycleOwner).onDestroy()
- root.setViewTreeLifecycleOwner(null)
- ViewTreeSavedStateRegistryOwner.set(root, null)
- }
-}
diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/bouncer/ui/composable/BouncerScene.kt b/packages/SystemUI/compose/features/src/com/android/systemui/bouncer/ui/composable/BouncerScene.kt
index 0469cbe..3ec5508 100644
--- a/packages/SystemUI/compose/features/src/com/android/systemui/bouncer/ui/composable/BouncerScene.kt
+++ b/packages/SystemUI/compose/features/src/com/android/systemui/bouncer/ui/composable/BouncerScene.kt
@@ -22,15 +22,17 @@
import androidx.compose.material3.MaterialTheme
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
+import com.android.compose.animation.scene.Back
import com.android.compose.animation.scene.ElementKey
import com.android.compose.animation.scene.SceneScope
+import com.android.compose.animation.scene.Swipe
+import com.android.compose.animation.scene.SwipeDirection
+import com.android.compose.animation.scene.UserAction
+import com.android.compose.animation.scene.UserActionResult
import com.android.systemui.bouncer.ui.BouncerDialogFactory
import com.android.systemui.bouncer.ui.viewmodel.BouncerViewModel
import com.android.systemui.dagger.SysUISingleton
-import com.android.systemui.scene.shared.model.Direction
-import com.android.systemui.scene.shared.model.SceneKey
-import com.android.systemui.scene.shared.model.UserAction
-import com.android.systemui.scene.shared.model.UserActionResult
+import com.android.systemui.scene.shared.model.Scenes
import com.android.systemui.scene.ui.composable.ComposableScene
import javax.inject.Inject
import kotlinx.coroutines.flow.MutableStateFlow
@@ -52,13 +54,13 @@
private val viewModel: BouncerViewModel,
private val dialogFactory: BouncerDialogFactory,
) : ComposableScene {
- override val key = SceneKey.Bouncer
+ override val key = Scenes.Bouncer
override val destinationScenes: StateFlow<Map<UserAction, UserActionResult>> =
MutableStateFlow(
mapOf(
- UserAction.Back to UserActionResult(SceneKey.Lockscreen),
- UserAction.Swipe(Direction.DOWN) to UserActionResult(SceneKey.Lockscreen),
+ Back to UserActionResult(Scenes.Lockscreen),
+ Swipe(SwipeDirection.Down) to UserActionResult(Scenes.Lockscreen),
)
)
.asStateFlow()
diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/CommunalContainer.kt b/packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/CommunalContainer.kt
index 7535a51..9ee69bc 100644
--- a/packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/CommunalContainer.kt
+++ b/packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/CommunalContainer.kt
@@ -14,7 +14,6 @@
import com.android.compose.animation.scene.ElementKey
import com.android.compose.animation.scene.FixedSizeEdgeDetector
import com.android.compose.animation.scene.LowestZIndexScenePicker
-import com.android.compose.animation.scene.ObservableTransitionState
import com.android.compose.animation.scene.SceneKey
import com.android.compose.animation.scene.SceneScope
import com.android.compose.animation.scene.SceneTransitionLayout
@@ -24,14 +23,11 @@
import com.android.compose.animation.scene.transitions
import com.android.compose.animation.scene.updateSceneTransitionLayoutState
import com.android.compose.theme.LocalAndroidColorScheme
-import com.android.systemui.communal.shared.model.CommunalSceneKey
-import com.android.systemui.communal.shared.model.ObservableCommunalTransitionState
+import com.android.systemui.communal.shared.model.CommunalScenes
import com.android.systemui.communal.ui.compose.extensions.allowGestures
import com.android.systemui.communal.ui.viewmodel.BaseCommunalViewModel
import com.android.systemui.communal.ui.viewmodel.CommunalViewModel
import com.android.systemui.res.R
-import kotlinx.coroutines.flow.map
-import kotlinx.coroutines.flow.transform
object Communal {
object Elements {
@@ -41,7 +37,7 @@
}
val sceneTransitions = transitions {
- to(TransitionSceneKey.Communal) {
+ to(CommunalScenes.Communal) {
spec = tween(durationMillis = 1000)
translate(Communal.Elements.Content, Edge.Right)
timestampRange(startMillis = 167, endMillis = 334) {
@@ -49,7 +45,7 @@
fade(Communal.Elements.Content)
}
}
- to(TransitionSceneKey.Blank) {
+ to(CommunalScenes.Blank) {
spec = tween(durationMillis = 1000)
translate(Communal.Elements.Content, Edge.Right)
timestampRange(endMillis = 167) { fade(Communal.Elements.Content) }
@@ -68,14 +64,11 @@
modifier: Modifier = Modifier,
viewModel: CommunalViewModel,
) {
- val currentScene: SceneKey by
- viewModel.currentScene
- .transform { value -> emit(value.toTransitionSceneKey()) }
- .collectAsState(TransitionSceneKey.Blank)
+ val currentScene: SceneKey by viewModel.currentScene.collectAsState(CommunalScenes.Blank)
val sceneTransitionLayoutState =
updateSceneTransitionLayoutState(
currentScene,
- onChangeScene = { viewModel.onSceneChanged(it.toCommunalSceneKey()) },
+ onChangeScene = { viewModel.onSceneChanged(it) },
transitions = sceneTransitions,
)
val touchesAllowed by viewModel.touchesAllowed.collectAsState(initial = false)
@@ -83,9 +76,7 @@
// This effect exposes the SceneTransitionLayout's observable transition state to the rest of
// the system, and unsets it when the view is disposed to avoid a memory leak.
DisposableEffect(viewModel, sceneTransitionLayoutState) {
- viewModel.setTransitionState(
- sceneTransitionLayoutState.observableTransitionState().map { it.toModel() }
- )
+ viewModel.setTransitionState(sceneTransitionLayoutState.observableTransitionState())
onDispose { viewModel.setTransitionState(null) }
}
@@ -98,11 +89,10 @@
),
) {
scene(
- TransitionSceneKey.Blank,
+ CommunalScenes.Blank,
userActions =
mapOf(
- Swipe(SwipeDirection.Left, fromSource = Edge.Right) to
- TransitionSceneKey.Communal
+ Swipe(SwipeDirection.Left, fromSource = Edge.Right) to CommunalScenes.Communal
)
) {
// This scene shows nothing only allowing for transitions to the communal scene.
@@ -110,11 +100,9 @@
}
scene(
- TransitionSceneKey.Communal,
+ CommunalScenes.Communal,
userActions =
- mapOf(
- Swipe(SwipeDirection.Right, fromSource = Edge.Left) to TransitionSceneKey.Blank
- ),
+ mapOf(Swipe(SwipeDirection.Right, fromSource = Edge.Left) to CommunalScenes.Blank),
) {
CommunalScene(viewModel, modifier = modifier)
}
@@ -135,39 +123,3 @@
)
Box(modifier.element(Communal.Elements.Content)) { CommunalHub(viewModel = viewModel) }
}
-
-// TODO(b/315490861): Remove these conversions once Compose can be used throughout SysUI.
-object TransitionSceneKey {
- val Blank = CommunalSceneKey.Blank.toTransitionSceneKey()
- val Communal = CommunalSceneKey.Communal.toTransitionSceneKey()
-}
-
-// TODO(b/315490861): Remove these conversions once Compose can be used throughout SysUI.
-fun SceneKey.toCommunalSceneKey(): CommunalSceneKey {
- return this.identity as CommunalSceneKey
-}
-
-// TODO(b/315490861): Remove these conversions once Compose can be used throughout SysUI.
-fun CommunalSceneKey.toTransitionSceneKey(): SceneKey {
- return SceneKey(debugName = toString(), identity = this)
-}
-
-/**
- * Converts between the [SceneTransitionLayout] state class and our forked data class that can be
- * used throughout SysUI.
- */
-// TODO(b/315490861): Remove these conversions once Compose can be used throughout SysUI.
-fun ObservableTransitionState.toModel(): ObservableCommunalTransitionState {
- return when (this) {
- is ObservableTransitionState.Idle ->
- ObservableCommunalTransitionState.Idle(scene.toCommunalSceneKey())
- is ObservableTransitionState.Transition ->
- ObservableCommunalTransitionState.Transition(
- fromScene = fromScene.toCommunalSceneKey(),
- toScene = toScene.toCommunalSceneKey(),
- progress = progress,
- isInitiatedByUserInput = isInitiatedByUserInput,
- isUserInputOngoing = isUserInputOngoing,
- )
- }
-}
diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/CommunalScene.kt b/packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/CommunalScene.kt
index 11a38f9..3d88ad5 100644
--- a/packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/CommunalScene.kt
+++ b/packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/CommunalScene.kt
@@ -19,12 +19,13 @@
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import com.android.compose.animation.scene.SceneScope
+import com.android.compose.animation.scene.Swipe
+import com.android.compose.animation.scene.SwipeDirection
+import com.android.compose.animation.scene.UserAction
+import com.android.compose.animation.scene.UserActionResult
import com.android.systemui.communal.ui.viewmodel.CommunalViewModel
import com.android.systemui.dagger.SysUISingleton
-import com.android.systemui.scene.shared.model.Direction
-import com.android.systemui.scene.shared.model.SceneKey
-import com.android.systemui.scene.shared.model.UserAction
-import com.android.systemui.scene.shared.model.UserActionResult
+import com.android.systemui.scene.shared.model.Scenes
import com.android.systemui.scene.ui.composable.ComposableScene
import javax.inject.Inject
import kotlinx.coroutines.flow.MutableStateFlow
@@ -38,12 +39,12 @@
constructor(
private val viewModel: CommunalViewModel,
) : ComposableScene {
- override val key = SceneKey.Communal
+ override val key = Scenes.Communal
override val destinationScenes: StateFlow<Map<UserAction, UserActionResult>> =
MutableStateFlow<Map<UserAction, UserActionResult>>(
mapOf(
- UserAction.Swipe(Direction.RIGHT) to UserActionResult(SceneKey.Lockscreen),
+ Swipe(SwipeDirection.Right) to UserActionResult(Scenes.Lockscreen),
)
)
.asStateFlow()
diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/LockscreenScene.kt b/packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/LockscreenScene.kt
index dd043db..a02781b 100644
--- a/packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/LockscreenScene.kt
+++ b/packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/LockscreenScene.kt
@@ -18,19 +18,20 @@
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.runtime.Composable
-import androidx.compose.runtime.getValue
import androidx.compose.ui.Modifier
+import com.android.compose.animation.scene.Edge
+import com.android.compose.animation.scene.SceneKey
import com.android.compose.animation.scene.SceneScope
+import com.android.compose.animation.scene.Swipe
+import com.android.compose.animation.scene.SwipeDirection
+import com.android.compose.animation.scene.UserAction
+import com.android.compose.animation.scene.UserActionResult
import com.android.compose.animation.scene.animateSceneFloatAsState
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.dagger.qualifiers.Application
import com.android.systemui.keyguard.ui.viewmodel.LockscreenSceneViewModel
import com.android.systemui.qs.ui.composable.QuickSettings
-import com.android.systemui.scene.shared.model.Direction
-import com.android.systemui.scene.shared.model.Edge
-import com.android.systemui.scene.shared.model.SceneKey
-import com.android.systemui.scene.shared.model.UserAction
-import com.android.systemui.scene.shared.model.UserActionResult
+import com.android.systemui.scene.shared.model.Scenes
import com.android.systemui.scene.ui.composable.ComposableScene
import dagger.Lazy
import javax.inject.Inject
@@ -50,7 +51,7 @@
viewModel: LockscreenSceneViewModel,
private val lockscreenContent: Lazy<LockscreenContent>,
) : ComposableScene {
- override val key = SceneKey.Lockscreen
+ override val key = Scenes.Lockscreen
override val destinationScenes: StateFlow<Map<UserAction, UserActionResult>> =
combine(viewModel.upDestinationSceneKey, viewModel.leftDestinationSceneKey, ::Pair)
@@ -80,11 +81,11 @@
left: SceneKey?,
): Map<UserAction, UserActionResult> {
return buildMap {
- up?.let { this[UserAction.Swipe(Direction.UP)] = UserActionResult(up) }
- left?.let { this[UserAction.Swipe(Direction.LEFT)] = UserActionResult(left) }
- this[UserAction.Swipe(fromEdge = Edge.TOP, direction = Direction.DOWN)] =
- UserActionResult(SceneKey.QuickSettings)
- this[UserAction.Swipe(direction = Direction.DOWN)] = UserActionResult(SceneKey.Shade)
+ up?.let { this[Swipe(SwipeDirection.Up)] = UserActionResult(up) }
+ left?.let { this[Swipe(SwipeDirection.Left)] = UserActionResult(left) }
+ this[Swipe(fromSource = Edge.Top, direction = SwipeDirection.Down)] =
+ UserActionResult(Scenes.QuickSettings)
+ this[Swipe(direction = SwipeDirection.Down)] = UserActionResult(Scenes.Shade)
}
}
}
diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/notifications/ui/composable/Notifications.kt b/packages/SystemUI/compose/features/src/com/android/systemui/notifications/ui/composable/Notifications.kt
index ef6ae2e..791d629 100644
--- a/packages/SystemUI/compose/features/src/com/android/systemui/notifications/ui/composable/Notifications.kt
+++ b/packages/SystemUI/compose/features/src/com/android/systemui/notifications/ui/composable/Notifications.kt
@@ -71,8 +71,7 @@
import com.android.systemui.notifications.ui.composable.Notifications.Form
import com.android.systemui.notifications.ui.composable.Notifications.TransitionThresholds.EXPANSION_FOR_MAX_CORNER_RADIUS
import com.android.systemui.notifications.ui.composable.Notifications.TransitionThresholds.EXPANSION_FOR_MAX_SCRIM_ALPHA
-import com.android.systemui.scene.ui.composable.Gone
-import com.android.systemui.scene.ui.composable.Shade
+import com.android.systemui.scene.shared.model.Scenes
import com.android.systemui.shade.ui.composable.ShadeHeader
import com.android.systemui.statusbar.notification.stack.ui.viewbinder.NotificationStackAppearanceViewBinder.SCRIM_CORNER_RADIUS
import com.android.systemui.statusbar.notification.stack.ui.viewmodel.NotificationsPlaceholderViewModel
@@ -214,7 +213,7 @@
// in step with the transition so that it is 0 when it completes.
if (
scrimOffset.value < 0 &&
- layoutState.isTransitioning(from = Shade, to = Gone)
+ layoutState.isTransitioning(from = Scenes.Shade, to = Scenes.Gone)
) {
IntOffset(x = 0, y = (scrimOffset.value * expansionFraction).roundToInt())
} else {
@@ -226,7 +225,7 @@
calculateCornerRadius(
screenCornerRadius,
{ expansionFraction },
- layoutState.isTransitioningBetween(Gone, Shade)
+ layoutState.isTransitioningBetween(Scenes.Gone, Scenes.Shade)
)
.let {
RoundedCornerShape(
@@ -250,7 +249,7 @@
Modifier.fillMaxSize()
.graphicsLayer {
alpha =
- if (layoutState.isTransitioningBetween(Gone, Shade)) {
+ if (layoutState.isTransitioningBetween(Scenes.Gone, Scenes.Shade)) {
(expansionFraction / EXPANSION_FOR_MAX_SCRIM_ALPHA).coerceAtMost(1f)
} else 1f
}
diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/qs/ui/composable/QuickSettings.kt b/packages/SystemUI/compose/features/src/com/android/systemui/qs/ui/composable/QuickSettings.kt
index 5d0b9ba..91b737d 100644
--- a/packages/SystemUI/compose/features/src/com/android/systemui/qs/ui/composable/QuickSettings.kt
+++ b/packages/SystemUI/compose/features/src/com/android/systemui/qs/ui/composable/QuickSettings.kt
@@ -37,14 +37,13 @@
import com.android.systemui.qs.ui.adapter.QSSceneAdapter.State.Companion.Collapsing
import com.android.systemui.qs.ui.adapter.QSSceneAdapter.State.Expanding
import com.android.systemui.qs.ui.adapter.QSSceneAdapter.State.Unsquishing
-import com.android.systemui.scene.ui.composable.QuickSettings as QuickSettingsSceneKey
-import com.android.systemui.scene.ui.composable.Shade
+import com.android.systemui.scene.shared.model.Scenes
object QuickSettings {
private val SCENES =
setOf(
- QuickSettingsSceneKey,
- Shade,
+ Scenes.QuickSettings,
+ Scenes.Shade,
)
object Elements {
@@ -69,18 +68,20 @@
return when (val transitionState = layoutState.transitionState) {
is TransitionState.Idle -> {
when (transitionState.currentScene) {
- Shade -> QSSceneAdapter.State.QQS
- QuickSettingsSceneKey -> QSSceneAdapter.State.QS
+ Scenes.Shade -> QSSceneAdapter.State.QQS
+ Scenes.QuickSettings -> QSSceneAdapter.State.QS
else -> QSSceneAdapter.State.CLOSED
}
}
is TransitionState.Transition ->
with(transitionState) {
when {
- fromScene == Shade && toScene == QuickSettingsSceneKey -> Expanding(progress)
- fromScene == QuickSettingsSceneKey && toScene == Shade -> Collapsing(progress)
- fromScene == Shade || toScene == Shade -> Unsquishing(squishiness)
- fromScene == QuickSettingsSceneKey || toScene == QuickSettingsSceneKey -> {
+ fromScene == Scenes.Shade && toScene == Scenes.QuickSettings ->
+ Expanding(progress)
+ fromScene == Scenes.QuickSettings && toScene == Scenes.Shade ->
+ Collapsing(progress)
+ fromScene == Scenes.Shade || toScene == Scenes.Shade -> Unsquishing(squishiness)
+ fromScene == Scenes.QuickSettings || toScene == Scenes.QuickSettings -> {
QSSceneAdapter.State.QS
}
else ->
diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/qs/ui/composable/QuickSettingsScene.kt b/packages/SystemUI/compose/features/src/com/android/systemui/qs/ui/composable/QuickSettingsScene.kt
index 6875bc5..3b8b863 100644
--- a/packages/SystemUI/compose/features/src/com/android/systemui/qs/ui/composable/QuickSettingsScene.kt
+++ b/packages/SystemUI/compose/features/src/com/android/systemui/qs/ui/composable/QuickSettingsScene.kt
@@ -63,9 +63,8 @@
import com.android.systemui.qs.footer.ui.compose.FooterActions
import com.android.systemui.qs.ui.viewmodel.QuickSettingsSceneViewModel
import com.android.systemui.res.R
-import com.android.systemui.scene.shared.model.SceneKey
+import com.android.systemui.scene.shared.model.Scenes
import com.android.systemui.scene.ui.composable.ComposableScene
-import com.android.systemui.scene.ui.composable.asComposeAware
import com.android.systemui.shade.ui.composable.CollapsedShadeHeader
import com.android.systemui.shade.ui.composable.ExpandedShadeHeader
import com.android.systemui.shade.ui.composable.Shade
@@ -89,7 +88,7 @@
private val batteryMeterViewControllerFactory: BatteryMeterViewController.Factory,
private val statusBarIconController: StatusBarIconController,
) : ComposableScene {
- override val key = SceneKey.QuickSettings
+ override val key = Scenes.QuickSettings
override val destinationScenes =
viewModel.destinationScenes.stateIn(
@@ -140,9 +139,7 @@
val isScrollable =
when (val state = layoutState.transitionState) {
is TransitionState.Idle -> true
- is TransitionState.Transition -> {
- state.fromScene == SceneKey.QuickSettings.asComposeAware()
- }
+ is TransitionState.Transition -> state.fromScene == Scenes.QuickSettings
}
LaunchedEffect(isCustomizing, scrollState) {
diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/scene/ui/composable/ComposeAwareExtensions.kt b/packages/SystemUI/compose/features/src/com/android/systemui/scene/ui/composable/ComposeAwareExtensions.kt
deleted file mode 100644
index 0de4650..0000000
--- a/packages/SystemUI/compose/features/src/com/android/systemui/scene/ui/composable/ComposeAwareExtensions.kt
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Copyright (C) 2024 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.systemui.scene.ui.composable
-
-import com.android.compose.animation.scene.Back
-import com.android.compose.animation.scene.Edge as ComposeAwareEdge
-import com.android.compose.animation.scene.SceneKey as ComposeAwareSceneKey
-import com.android.compose.animation.scene.Swipe
-import com.android.compose.animation.scene.SwipeDirection
-import com.android.compose.animation.scene.TransitionKey as ComposeAwareTransitionKey
-import com.android.compose.animation.scene.UserAction as ComposeAwareUserAction
-import com.android.compose.animation.scene.UserActionResult as ComposeAwareUserActionResult
-import com.android.systemui.scene.shared.model.Direction
-import com.android.systemui.scene.shared.model.Edge
-import com.android.systemui.scene.shared.model.SceneKey
-import com.android.systemui.scene.shared.model.TransitionKey
-import com.android.systemui.scene.shared.model.UserAction
-import com.android.systemui.scene.shared.model.UserActionResult
-
-// TODO(b/293899074): remove this file once we can use the types from SceneTransitionLayout.
-
-fun SceneKey.asComposeAware(): ComposeAwareSceneKey {
- return ComposeAwareSceneKey(
- debugName = toString(),
- identity = this,
- )
-}
-
-fun TransitionKey.asComposeAware(): ComposeAwareTransitionKey {
- return ComposeAwareTransitionKey(
- debugName = debugName,
- identity = this,
- )
-}
-
-fun UserAction.asComposeAware(): ComposeAwareUserAction {
- return when (this) {
- is UserAction.Swipe ->
- Swipe(
- pointerCount = pointerCount,
- fromSource =
- when (this.fromEdge) {
- null -> null
- Edge.LEFT -> ComposeAwareEdge.Left
- Edge.TOP -> ComposeAwareEdge.Top
- Edge.RIGHT -> ComposeAwareEdge.Right
- Edge.BOTTOM -> ComposeAwareEdge.Bottom
- },
- direction =
- when (this.direction) {
- Direction.LEFT -> SwipeDirection.Left
- Direction.UP -> SwipeDirection.Up
- Direction.RIGHT -> SwipeDirection.Right
- Direction.DOWN -> SwipeDirection.Down
- }
- )
- is UserAction.Back -> Back
- }
-}
-
-fun UserActionResult.asComposeAware(): ComposeAwareUserActionResult {
- val composeUnaware = this
- return ComposeAwareUserActionResult(
- toScene = composeUnaware.toScene.asComposeAware(),
- transitionKey = composeUnaware.transitionKey?.asComposeAware(),
- )
-}
diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/scene/ui/composable/ComposeUnawareExtensions.kt b/packages/SystemUI/compose/features/src/com/android/systemui/scene/ui/composable/ComposeUnawareExtensions.kt
deleted file mode 100644
index 4c03664..0000000
--- a/packages/SystemUI/compose/features/src/com/android/systemui/scene/ui/composable/ComposeUnawareExtensions.kt
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (C) 2024 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.systemui.scene.ui.composable
-
-import com.android.compose.animation.scene.ObservableTransitionState as ComposeAwareObservableTransitionState
-import com.android.compose.animation.scene.SceneKey as ComposeAwareSceneKey
-import com.android.systemui.scene.shared.model.ObservableTransitionState
-import com.android.systemui.scene.shared.model.SceneKey
-
-fun ComposeAwareSceneKey.asComposeUnaware(): SceneKey {
- return this.identity as SceneKey
-}
-
-fun ComposeAwareObservableTransitionState.asComposeUnaware(): ObservableTransitionState {
- return when (this) {
- is ComposeAwareObservableTransitionState.Idle ->
- ObservableTransitionState.Idle(scene.asComposeUnaware())
- is ComposeAwareObservableTransitionState.Transition ->
- ObservableTransitionState.Transition(
- fromScene = fromScene.asComposeUnaware(),
- toScene = toScene.asComposeUnaware(),
- progress = progress,
- isInitiatedByUserInput = isInitiatedByUserInput,
- isUserInputOngoing = isUserInputOngoing,
- )
- }
-}
diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/scene/ui/composable/GoneScene.kt b/packages/SystemUI/compose/features/src/com/android/systemui/scene/ui/composable/GoneScene.kt
index 9ca751e..82f56ab 100644
--- a/packages/SystemUI/compose/features/src/com/android/systemui/scene/ui/composable/GoneScene.kt
+++ b/packages/SystemUI/compose/features/src/com/android/systemui/scene/ui/composable/GoneScene.kt
@@ -19,17 +19,17 @@
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.runtime.Composable
-import androidx.compose.runtime.getValue
import androidx.compose.ui.Modifier
+import com.android.compose.animation.scene.Edge
import com.android.compose.animation.scene.SceneScope
+import com.android.compose.animation.scene.Swipe
+import com.android.compose.animation.scene.SwipeDirection
+import com.android.compose.animation.scene.UserAction
+import com.android.compose.animation.scene.UserActionResult
import com.android.compose.animation.scene.animateSceneFloatAsState
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.qs.ui.composable.QuickSettings
-import com.android.systemui.scene.shared.model.Direction
-import com.android.systemui.scene.shared.model.Edge
-import com.android.systemui.scene.shared.model.SceneKey
-import com.android.systemui.scene.shared.model.UserAction
-import com.android.systemui.scene.shared.model.UserActionResult
+import com.android.systemui.scene.shared.model.Scenes
import com.android.systemui.statusbar.notification.stack.ui.viewmodel.NotificationsPlaceholderViewModel
import javax.inject.Inject
import kotlinx.coroutines.flow.MutableStateFlow
@@ -46,18 +46,17 @@
constructor(
private val notificationsViewModel: NotificationsPlaceholderViewModel,
) : ComposableScene {
- override val key = SceneKey.Gone
+ override val key = Scenes.Gone
override val destinationScenes: StateFlow<Map<UserAction, UserActionResult>> =
MutableStateFlow<Map<UserAction, UserActionResult>>(
mapOf(
- UserAction.Swipe(
+ Swipe(
pointerCount = 2,
- fromEdge = Edge.TOP,
- direction = Direction.DOWN,
- ) to UserActionResult(SceneKey.QuickSettings),
- UserAction.Swipe(direction = Direction.DOWN) to
- UserActionResult(SceneKey.Shade),
+ fromSource = Edge.Top,
+ direction = SwipeDirection.Down,
+ ) to UserActionResult(Scenes.QuickSettings),
+ Swipe(direction = SwipeDirection.Down) to UserActionResult(Scenes.Shade),
)
)
.asStateFlow()
diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/scene/ui/composable/SceneContainer.kt b/packages/SystemUI/compose/features/src/com/android/systemui/scene/ui/composable/SceneContainer.kt
index 9779d71..0fdaabe 100644
--- a/packages/SystemUI/compose/features/src/com/android/systemui/scene/ui/composable/SceneContainer.kt
+++ b/packages/SystemUI/compose/features/src/com/android/systemui/scene/ui/composable/SceneContainer.kt
@@ -35,15 +35,14 @@
import androidx.compose.ui.input.pointer.motionEventSpy
import androidx.compose.ui.input.pointer.pointerInput
import com.android.compose.animation.scene.MutableSceneTransitionLayoutState
+import com.android.compose.animation.scene.SceneKey
import com.android.compose.animation.scene.SceneTransitionLayout
+import com.android.compose.animation.scene.UserAction
+import com.android.compose.animation.scene.UserActionResult
import com.android.compose.animation.scene.observableTransitionState
import com.android.systemui.ribbon.ui.composable.BottomRightCornerRibbon
import com.android.systemui.scene.shared.model.SceneDataSourceDelegator
-import com.android.systemui.scene.shared.model.SceneKey
-import com.android.systemui.scene.shared.model.UserAction
-import com.android.systemui.scene.shared.model.UserActionResult
import com.android.systemui.scene.ui.viewmodel.SceneContainerViewModel
-import kotlinx.coroutines.flow.map
/**
* Renders a container of a collection of "scenes" that the user can switch between using certain
@@ -77,8 +76,8 @@
currentScene.destinationScenes.collectAsState()
val state: MutableSceneTransitionLayoutState = remember {
MutableSceneTransitionLayoutState(
- initialScene = currentSceneKey.asComposeAware(),
- canChangeScene = { toScene -> viewModel.canChangeScene(toScene.asComposeUnaware()) },
+ initialScene = currentSceneKey,
+ canChangeScene = { toScene -> viewModel.canChangeScene(toScene) },
transitions = SceneContainerTransitions,
)
}
@@ -90,9 +89,7 @@
}
DisposableEffect(viewModel, state) {
- viewModel.setTransitionState(
- state.observableTransitionState().map { it.asComposeUnaware() }
- )
+ viewModel.setTransitionState(state.observableTransitionState())
onDispose { viewModel.setTransitionState(null) }
}
@@ -116,23 +113,17 @@
) {
sceneByKey.forEach { (sceneKey, composableScene) ->
scene(
- key = sceneKey.asComposeAware(),
+ key = sceneKey,
userActions =
if (sceneKey == currentSceneKey) {
- currentDestinations
- } else {
- composableScene.destinationScenes.value
- }
- .map { (userAction, userActionResult) ->
- userAction.asComposeAware() to userActionResult.asComposeAware()
- }
- .toMap(),
+ currentDestinations
+ } else {
+ composableScene.destinationScenes.value
+ },
) {
with(composableScene) {
this@scene.Content(
- modifier =
- Modifier.element(sceneKey.asComposeAware().rootElementKey)
- .fillMaxSize(),
+ modifier = Modifier.element(sceneKey.rootElementKey).fillMaxSize(),
)
}
}
diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/scene/ui/composable/SceneContainerTransitions.kt b/packages/SystemUI/compose/features/src/com/android/systemui/scene/ui/composable/SceneContainerTransitions.kt
index 61f8120..dea9485 100644
--- a/packages/SystemUI/compose/features/src/com/android/systemui/scene/ui/composable/SceneContainerTransitions.kt
+++ b/packages/SystemUI/compose/features/src/com/android/systemui/scene/ui/composable/SceneContainerTransitions.kt
@@ -1,6 +1,7 @@
package com.android.systemui.scene.ui.composable
import com.android.compose.animation.scene.transitions
+import com.android.systemui.scene.shared.model.Scenes
import com.android.systemui.scene.shared.model.TransitionKeys.CollapseShadeInstantly
import com.android.systemui.scene.shared.model.TransitionKeys.SlightlyFasterShadeCollapse
import com.android.systemui.scene.ui.composable.transitions.bouncerToGoneTransition
@@ -26,41 +27,41 @@
* Please keep the list sorted alphabetically.
*/
val SceneContainerTransitions = transitions {
- from(Bouncer, to = Gone) { bouncerToGoneTransition() }
- from(Gone, to = Shade) { goneToShadeTransition() }
+ from(Scenes.Bouncer, to = Scenes.Gone) { bouncerToGoneTransition() }
+ from(Scenes.Gone, to = Scenes.Shade) { goneToShadeTransition() }
from(
- Gone,
- to = Shade,
- key = CollapseShadeInstantly.asComposeAware(),
+ Scenes.Gone,
+ to = Scenes.Shade,
+ key = CollapseShadeInstantly,
) {
goneToShadeTransition(durationScale = 0.0)
}
from(
- Gone,
- to = Shade,
- key = SlightlyFasterShadeCollapse.asComposeAware(),
+ Scenes.Gone,
+ to = Scenes.Shade,
+ key = SlightlyFasterShadeCollapse,
) {
goneToShadeTransition(durationScale = 0.9)
}
- from(Gone, to = QuickSettings) { goneToQuickSettingsTransition() }
- from(Lockscreen, to = Bouncer) { lockscreenToBouncerTransition() }
- from(Lockscreen, to = Communal) { lockscreenToCommunalTransition() }
- from(Lockscreen, to = Shade) { lockscreenToShadeTransition() }
+ from(Scenes.Gone, to = Scenes.QuickSettings) { goneToQuickSettingsTransition() }
+ from(Scenes.Lockscreen, to = Scenes.Bouncer) { lockscreenToBouncerTransition() }
+ from(Scenes.Lockscreen, to = Scenes.Communal) { lockscreenToCommunalTransition() }
+ from(Scenes.Lockscreen, to = Scenes.Shade) { lockscreenToShadeTransition() }
from(
- Lockscreen,
- to = Shade,
- key = CollapseShadeInstantly.asComposeAware(),
+ Scenes.Lockscreen,
+ to = Scenes.Shade,
+ key = CollapseShadeInstantly,
) {
lockscreenToShadeTransition(durationScale = 0.0)
}
from(
- Lockscreen,
- to = Shade,
- key = SlightlyFasterShadeCollapse.asComposeAware(),
+ Scenes.Lockscreen,
+ to = Scenes.Shade,
+ key = SlightlyFasterShadeCollapse,
) {
lockscreenToShadeTransition(durationScale = 0.9)
}
- from(Lockscreen, to = QuickSettings) { lockscreenToQuickSettingsTransition() }
- from(Lockscreen, to = Gone) { lockscreenToGoneTransition() }
- from(Shade, to = QuickSettings) { shadeToQuickSettingsTransition() }
+ from(Scenes.Lockscreen, to = Scenes.QuickSettings) { lockscreenToQuickSettingsTransition() }
+ from(Scenes.Lockscreen, to = Scenes.Gone) { lockscreenToGoneTransition() }
+ from(Scenes.Shade, to = Scenes.QuickSettings) { shadeToQuickSettingsTransition() }
}
diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/scene/ui/composable/SceneTransitionLayoutDataSource.kt b/packages/SystemUI/compose/features/src/com/android/systemui/scene/ui/composable/SceneTransitionLayoutDataSource.kt
index 60c0b77..a54994d 100644
--- a/packages/SystemUI/compose/features/src/com/android/systemui/scene/ui/composable/SceneTransitionLayoutDataSource.kt
+++ b/packages/SystemUI/compose/features/src/com/android/systemui/scene/ui/composable/SceneTransitionLayoutDataSource.kt
@@ -20,10 +20,10 @@
import com.android.compose.animation.scene.MutableSceneTransitionLayoutState
import com.android.compose.animation.scene.ObservableTransitionState
+import com.android.compose.animation.scene.SceneKey
+import com.android.compose.animation.scene.TransitionKey
import com.android.compose.animation.scene.observableTransitionState
import com.android.systemui.scene.shared.model.SceneDataSource
-import com.android.systemui.scene.shared.model.SceneKey
-import com.android.systemui.scene.shared.model.TransitionKey
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.flow.SharingStarted
@@ -61,11 +61,10 @@
}
}
}
- .map { it.asComposeUnaware() }
.stateIn(
scope = coroutineScope,
started = SharingStarted.WhileSubscribed(),
- initialValue = state.transitionState.currentScene.asComposeUnaware(),
+ initialValue = state.transitionState.currentScene,
)
override fun changeScene(
@@ -73,8 +72,8 @@
transitionKey: TransitionKey?,
) {
state.setTargetScene(
- targetScene = toScene.asComposeAware(),
- transitionKey = transitionKey?.asComposeAware(),
+ targetScene = toScene,
+ transitionKey = transitionKey,
coroutineScope = coroutineScope,
)
}
diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/scene/ui/composable/TransitionSceneKeys.kt b/packages/SystemUI/compose/features/src/com/android/systemui/scene/ui/composable/TransitionSceneKeys.kt
deleted file mode 100644
index 5a9add1..0000000
--- a/packages/SystemUI/compose/features/src/com/android/systemui/scene/ui/composable/TransitionSceneKeys.kt
+++ /dev/null
@@ -1,10 +0,0 @@
-package com.android.systemui.scene.ui.composable
-
-import com.android.systemui.scene.shared.model.SceneKey
-
-val Lockscreen = SceneKey.Lockscreen.asComposeAware()
-val Bouncer = SceneKey.Bouncer.asComposeAware()
-val Shade = SceneKey.Shade.asComposeAware()
-val QuickSettings = SceneKey.QuickSettings.asComposeAware()
-val Gone = SceneKey.Gone.asComposeAware()
-val Communal = SceneKey.Communal.asComposeAware()
diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/scene/ui/composable/transitions/FromBouncerToGoneTransition.kt b/packages/SystemUI/compose/features/src/com/android/systemui/scene/ui/composable/transitions/FromBouncerToGoneTransition.kt
index 1a9face..5eefe49 100644
--- a/packages/SystemUI/compose/features/src/com/android/systemui/scene/ui/composable/transitions/FromBouncerToGoneTransition.kt
+++ b/packages/SystemUI/compose/features/src/com/android/systemui/scene/ui/composable/transitions/FromBouncerToGoneTransition.kt
@@ -2,10 +2,10 @@
import androidx.compose.animation.core.tween
import com.android.compose.animation.scene.TransitionBuilder
-import com.android.systemui.scene.ui.composable.Bouncer
+import com.android.systemui.scene.shared.model.Scenes
fun TransitionBuilder.bouncerToGoneTransition() {
spec = tween(durationMillis = 500)
- fade(Bouncer.rootElementKey)
+ fade(Scenes.Bouncer.rootElementKey)
}
diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/scene/ui/composable/transitions/FromGoneToQuickSettingsTransition.kt b/packages/SystemUI/compose/features/src/com/android/systemui/scene/ui/composable/transitions/FromGoneToQuickSettingsTransition.kt
index 291617f..5bd1583 100644
--- a/packages/SystemUI/compose/features/src/com/android/systemui/scene/ui/composable/transitions/FromGoneToQuickSettingsTransition.kt
+++ b/packages/SystemUI/compose/features/src/com/android/systemui/scene/ui/composable/transitions/FromGoneToQuickSettingsTransition.kt
@@ -3,10 +3,10 @@
import androidx.compose.animation.core.tween
import com.android.compose.animation.scene.Edge
import com.android.compose.animation.scene.TransitionBuilder
-import com.android.systemui.scene.ui.composable.QuickSettings
+import com.android.systemui.scene.shared.model.Scenes
fun TransitionBuilder.goneToQuickSettingsTransition() {
spec = tween(durationMillis = 500)
- translate(QuickSettings.rootElementKey, Edge.Top, true)
+ translate(Scenes.QuickSettings.rootElementKey, Edge.Top, true)
}
diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/scene/ui/composable/transitions/FromLockscreenToCommunalTransition.kt b/packages/SystemUI/compose/features/src/com/android/systemui/scene/ui/composable/transitions/FromLockscreenToCommunalTransition.kt
index ea8110a..0021bf5 100644
--- a/packages/SystemUI/compose/features/src/com/android/systemui/scene/ui/composable/transitions/FromLockscreenToCommunalTransition.kt
+++ b/packages/SystemUI/compose/features/src/com/android/systemui/scene/ui/composable/transitions/FromLockscreenToCommunalTransition.kt
@@ -19,15 +19,14 @@
import androidx.compose.animation.core.tween
import com.android.compose.animation.scene.Edge
import com.android.compose.animation.scene.TransitionBuilder
-import com.android.systemui.scene.ui.composable.Communal
-import com.android.systemui.scene.ui.composable.Lockscreen
+import com.android.systemui.scene.shared.model.Scenes
fun TransitionBuilder.lockscreenToCommunalTransition() {
spec = tween(durationMillis = 500)
// Translate lockscreen to the left.
- translate(Lockscreen.rootElementKey, Edge.Left)
+ translate(Scenes.Lockscreen.rootElementKey, Edge.Left)
// Translate communal from the right.
- translate(Communal.rootElementKey, Edge.Right)
+ translate(Scenes.Communal.rootElementKey, Edge.Right)
}
diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/scene/ui/composable/transitions/FromLockscreenToGoneTransition.kt b/packages/SystemUI/compose/features/src/com/android/systemui/scene/ui/composable/transitions/FromLockscreenToGoneTransition.kt
index da6306d..3e576bc 100644
--- a/packages/SystemUI/compose/features/src/com/android/systemui/scene/ui/composable/transitions/FromLockscreenToGoneTransition.kt
+++ b/packages/SystemUI/compose/features/src/com/android/systemui/scene/ui/composable/transitions/FromLockscreenToGoneTransition.kt
@@ -2,10 +2,10 @@
import androidx.compose.animation.core.tween
import com.android.compose.animation.scene.TransitionBuilder
-import com.android.systemui.scene.ui.composable.Lockscreen
+import com.android.systemui.scene.shared.model.Scenes
fun TransitionBuilder.lockscreenToGoneTransition() {
spec = tween(durationMillis = 500)
- fade(Lockscreen.rootElementKey)
+ fade(Scenes.Lockscreen.rootElementKey)
}
diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/scene/ui/composable/transitions/FromLockscreenToQuickSettingsTransition.kt b/packages/SystemUI/compose/features/src/com/android/systemui/scene/ui/composable/transitions/FromLockscreenToQuickSettingsTransition.kt
index e63bc4e..962d822 100644
--- a/packages/SystemUI/compose/features/src/com/android/systemui/scene/ui/composable/transitions/FromLockscreenToQuickSettingsTransition.kt
+++ b/packages/SystemUI/compose/features/src/com/android/systemui/scene/ui/composable/transitions/FromLockscreenToQuickSettingsTransition.kt
@@ -3,10 +3,10 @@
import androidx.compose.animation.core.tween
import com.android.compose.animation.scene.Edge
import com.android.compose.animation.scene.TransitionBuilder
-import com.android.systemui.scene.ui.composable.QuickSettings
+import com.android.systemui.scene.shared.model.Scenes
fun TransitionBuilder.lockscreenToQuickSettingsTransition() {
spec = tween(durationMillis = 500)
- translate(QuickSettings.rootElementKey, Edge.Top, true)
+ translate(Scenes.QuickSettings.rootElementKey, Edge.Top, true)
}
diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/shade/ui/composable/ShadeHeader.kt b/packages/SystemUI/compose/features/src/com/android/systemui/shade/ui/composable/ShadeHeader.kt
index d7911ea..12b07a3 100644
--- a/packages/SystemUI/compose/features/src/com/android/systemui/shade/ui/composable/ShadeHeader.kt
+++ b/packages/SystemUI/compose/features/src/com/android/systemui/shade/ui/composable/ShadeHeader.kt
@@ -63,8 +63,7 @@
import com.android.systemui.common.ui.compose.windowinsets.LocalDisplayCutout
import com.android.systemui.privacy.OngoingPrivacyChip
import com.android.systemui.res.R
-import com.android.systemui.scene.ui.composable.QuickSettings
-import com.android.systemui.scene.ui.composable.Shade as ShadeKey
+import com.android.systemui.scene.shared.model.Scenes
import com.android.systemui.shade.ui.composable.ShadeHeader.Dimensions.CollapsedHeight
import com.android.systemui.shade.ui.composable.ShadeHeader.Values.ClockScale
import com.android.systemui.shade.ui.viewmodel.ShadeHeaderViewModel
@@ -443,7 +442,7 @@
},
update = { iconContainer ->
iconContainer.setQsExpansionTransitioning(
- layoutState.isTransitioningBetween(ShadeKey, QuickSettings)
+ layoutState.isTransitioningBetween(Scenes.Shade, Scenes.QuickSettings)
)
if (isSingleCarrier || !useExpandedFormat) {
iconContainer.removeIgnoredSlots(carrierIconSlots)
diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/shade/ui/composable/ShadeScene.kt b/packages/SystemUI/compose/features/src/com/android/systemui/shade/ui/composable/ShadeScene.kt
index 8484b7f..3620cc5 100644
--- a/packages/SystemUI/compose/features/src/com/android/systemui/shade/ui/composable/ShadeScene.kt
+++ b/packages/SystemUI/compose/features/src/com/android/systemui/shade/ui/composable/ShadeScene.kt
@@ -41,7 +41,12 @@
import androidx.compose.ui.unit.dp
import com.android.compose.animation.scene.ElementKey
import com.android.compose.animation.scene.LowestZIndexScenePicker
+import com.android.compose.animation.scene.SceneKey
import com.android.compose.animation.scene.SceneScope
+import com.android.compose.animation.scene.Swipe
+import com.android.compose.animation.scene.SwipeDirection
+import com.android.compose.animation.scene.UserAction
+import com.android.compose.animation.scene.UserActionResult
import com.android.compose.animation.scene.animateSceneFloatAsState
import com.android.compose.modifiers.thenIf
import com.android.systemui.battery.BatteryMeterViewController
@@ -56,10 +61,7 @@
import com.android.systemui.notifications.ui.composable.NotificationScrollingStack
import com.android.systemui.qs.ui.composable.QuickSettings
import com.android.systemui.res.R
-import com.android.systemui.scene.shared.model.Direction
-import com.android.systemui.scene.shared.model.SceneKey
-import com.android.systemui.scene.shared.model.UserAction
-import com.android.systemui.scene.shared.model.UserActionResult
+import com.android.systemui.scene.shared.model.Scenes
import com.android.systemui.scene.ui.composable.ComposableScene
import com.android.systemui.shade.ui.viewmodel.ShadeSceneViewModel
import com.android.systemui.statusbar.phone.StatusBarIconController
@@ -109,7 +111,7 @@
private val mediaCarouselController: MediaCarouselController,
@Named(QUICK_QS_PANEL) private val mediaHost: MediaHost,
) : ComposableScene {
- override val key = SceneKey.Shade
+ override val key = Scenes.Shade
override val destinationScenes: StateFlow<Map<UserAction, UserActionResult>> =
viewModel.upDestinationSceneKey
@@ -144,8 +146,8 @@
up: SceneKey,
): Map<UserAction, UserActionResult> {
return mapOf(
- UserAction.Swipe(Direction.UP) to UserActionResult(up),
- UserAction.Swipe(Direction.DOWN) to UserActionResult(SceneKey.QuickSettings),
+ Swipe(SwipeDirection.Up) to UserActionResult(up),
+ Swipe(SwipeDirection.Down) to UserActionResult(Scenes.QuickSettings),
)
}
}
diff --git a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/SceneTransitionLayout.kt b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/SceneTransitionLayout.kt
index 1e3842a..b7e2dd1 100644
--- a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/SceneTransitionLayout.kt
+++ b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/SceneTransitionLayout.kt
@@ -391,7 +391,7 @@
}
/** The result of performing a [UserAction]. */
-class UserActionResult(
+data class UserActionResult(
/** The scene we should be transitioning to during the [UserAction]. */
val toScene: SceneKey,
diff --git a/packages/SystemUI/multivalentTests/src/com/android/keyguard/KeyguardSecurityContainerControllerTest.kt b/packages/SystemUI/multivalentTests/src/com/android/keyguard/KeyguardSecurityContainerControllerTest.kt
index 38dc24e..9dbeeda 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/keyguard/KeyguardSecurityContainerControllerTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/keyguard/KeyguardSecurityContainerControllerTest.kt
@@ -31,6 +31,7 @@
import android.widget.FrameLayout
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
+import com.android.compose.animation.scene.ObservableTransitionState
import com.android.internal.logging.MetricsLogger
import com.android.internal.logging.UiEventLogger
import com.android.internal.widget.LockPatternUtils
@@ -65,8 +66,7 @@
import com.android.systemui.scene.domain.interactor.sceneInteractor
import com.android.systemui.scene.shared.flag.fakeSceneContainerFlags
import com.android.systemui.scene.shared.model.FakeSceneDataSource
-import com.android.systemui.scene.shared.model.ObservableTransitionState
-import com.android.systemui.scene.shared.model.SceneKey
+import com.android.systemui.scene.shared.model.Scenes
import com.android.systemui.scene.shared.model.fakeSceneDataSource
import com.android.systemui.shared.Flags.FLAG_SIDEFPS_CONTROLLER_REFACTOR
import com.android.systemui.statusbar.policy.ConfigurationController
@@ -244,7 +244,7 @@
sceneInteractor = kosmos.sceneInteractor
keyguardTransitionInteractor = kosmos.keyguardTransitionInteractor
sceneTransitionStateFlow =
- MutableStateFlow(ObservableTransitionState.Idle(SceneKey.Lockscreen))
+ MutableStateFlow(ObservableTransitionState.Idle(Scenes.Lockscreen))
sceneInteractor.setTransitionState(sceneTransitionStateFlow)
deviceEntryInteractor = kosmos.deviceEntryInteractor
@@ -815,18 +815,18 @@
// not enough to trigger a dismissal of the keyguard.
underTest.onViewAttached()
fakeSceneDataSource.pause()
- sceneInteractor.changeScene(SceneKey.Bouncer, "reason")
+ sceneInteractor.changeScene(Scenes.Bouncer, "reason")
sceneTransitionStateFlow.value =
ObservableTransitionState.Transition(
- SceneKey.Lockscreen,
- SceneKey.Bouncer,
+ Scenes.Lockscreen,
+ Scenes.Bouncer,
flowOf(.5f),
false,
isUserInputOngoing = flowOf(false),
)
runCurrent()
- fakeSceneDataSource.unpause(expectedScene = SceneKey.Bouncer)
- sceneTransitionStateFlow.value = ObservableTransitionState.Idle(SceneKey.Bouncer)
+ fakeSceneDataSource.unpause(expectedScene = Scenes.Bouncer)
+ sceneTransitionStateFlow.value = ObservableTransitionState.Idle(Scenes.Bouncer)
runCurrent()
verify(viewMediatorCallback, never()).keyguardDone(anyInt())
@@ -835,18 +835,18 @@
kosmos.fakeDeviceEntryRepository.setUnlocked(true)
runCurrent()
fakeSceneDataSource.pause()
- sceneInteractor.changeScene(SceneKey.Gone, "reason")
+ sceneInteractor.changeScene(Scenes.Gone, "reason")
sceneTransitionStateFlow.value =
ObservableTransitionState.Transition(
- SceneKey.Bouncer,
- SceneKey.Gone,
+ Scenes.Bouncer,
+ Scenes.Gone,
flowOf(.5f),
false,
isUserInputOngoing = flowOf(false),
)
runCurrent()
- fakeSceneDataSource.unpause(expectedScene = SceneKey.Gone)
- sceneTransitionStateFlow.value = ObservableTransitionState.Idle(SceneKey.Gone)
+ fakeSceneDataSource.unpause(expectedScene = Scenes.Gone)
+ sceneTransitionStateFlow.value = ObservableTransitionState.Idle(Scenes.Gone)
runCurrent()
verify(viewMediatorCallback).keyguardDone(anyInt())
@@ -854,18 +854,18 @@
// again.
clearInvocations(viewMediatorCallback)
fakeSceneDataSource.pause()
- sceneInteractor.changeScene(SceneKey.Bouncer, "reason")
+ sceneInteractor.changeScene(Scenes.Bouncer, "reason")
sceneTransitionStateFlow.value =
ObservableTransitionState.Transition(
- SceneKey.Gone,
- SceneKey.Bouncer,
+ Scenes.Gone,
+ Scenes.Bouncer,
flowOf(.5f),
false,
isUserInputOngoing = flowOf(false),
)
runCurrent()
- fakeSceneDataSource.unpause(expectedScene = SceneKey.Bouncer)
- sceneTransitionStateFlow.value = ObservableTransitionState.Idle(SceneKey.Bouncer)
+ fakeSceneDataSource.unpause(expectedScene = Scenes.Bouncer)
+ sceneTransitionStateFlow.value = ObservableTransitionState.Idle(Scenes.Bouncer)
runCurrent()
verify(viewMediatorCallback, never()).keyguardDone(anyInt())
@@ -874,35 +874,35 @@
// does not dismiss the keyguard while we're not listening.
underTest.onViewDetached()
fakeSceneDataSource.pause()
- sceneInteractor.changeScene(SceneKey.Gone, "reason")
+ sceneInteractor.changeScene(Scenes.Gone, "reason")
sceneTransitionStateFlow.value =
ObservableTransitionState.Transition(
- SceneKey.Bouncer,
- SceneKey.Gone,
+ Scenes.Bouncer,
+ Scenes.Gone,
flowOf(.5f),
false,
isUserInputOngoing = flowOf(false),
)
runCurrent()
- fakeSceneDataSource.unpause(expectedScene = SceneKey.Gone)
- sceneTransitionStateFlow.value = ObservableTransitionState.Idle(SceneKey.Gone)
+ fakeSceneDataSource.unpause(expectedScene = Scenes.Gone)
+ sceneTransitionStateFlow.value = ObservableTransitionState.Idle(Scenes.Gone)
runCurrent()
verify(viewMediatorCallback, never()).keyguardDone(anyInt())
// While not listening, moving to the lockscreen does not dismiss the keyguard.
fakeSceneDataSource.pause()
- sceneInteractor.changeScene(SceneKey.Lockscreen, "reason")
+ sceneInteractor.changeScene(Scenes.Lockscreen, "reason")
sceneTransitionStateFlow.value =
ObservableTransitionState.Transition(
- SceneKey.Gone,
- SceneKey.Lockscreen,
+ Scenes.Gone,
+ Scenes.Lockscreen,
flowOf(.5f),
false,
isUserInputOngoing = flowOf(false),
)
runCurrent()
- fakeSceneDataSource.unpause(expectedScene = SceneKey.Lockscreen)
- sceneTransitionStateFlow.value = ObservableTransitionState.Idle(SceneKey.Lockscreen)
+ fakeSceneDataSource.unpause(expectedScene = Scenes.Lockscreen)
+ sceneTransitionStateFlow.value = ObservableTransitionState.Idle(Scenes.Lockscreen)
runCurrent()
verify(viewMediatorCallback, never()).keyguardDone(anyInt())
@@ -910,18 +910,18 @@
// gone scene now does dismiss the keyguard again, this time from lockscreen.
underTest.onViewAttached()
fakeSceneDataSource.pause()
- sceneInteractor.changeScene(SceneKey.Gone, "reason")
+ sceneInteractor.changeScene(Scenes.Gone, "reason")
sceneTransitionStateFlow.value =
ObservableTransitionState.Transition(
- SceneKey.Lockscreen,
- SceneKey.Gone,
+ Scenes.Lockscreen,
+ Scenes.Gone,
flowOf(.5f),
false,
isUserInputOngoing = flowOf(false),
)
runCurrent()
- fakeSceneDataSource.unpause(expectedScene = SceneKey.Gone)
- sceneTransitionStateFlow.value = ObservableTransitionState.Idle(SceneKey.Gone)
+ fakeSceneDataSource.unpause(expectedScene = Scenes.Gone)
+ sceneTransitionStateFlow.value = ObservableTransitionState.Idle(Scenes.Gone)
runCurrent()
verify(viewMediatorCallback).keyguardDone(anyInt())
}
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/bouncer/ui/viewmodel/PasswordBouncerViewModelTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/bouncer/ui/viewmodel/PasswordBouncerViewModelTest.kt
index ad29e68..df50eb6 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/bouncer/ui/viewmodel/PasswordBouncerViewModelTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/bouncer/ui/viewmodel/PasswordBouncerViewModelTest.kt
@@ -19,6 +19,7 @@
import android.content.pm.UserInfo
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
+import com.android.compose.animation.scene.SceneKey
import com.android.systemui.SysuiTestCase
import com.android.systemui.authentication.data.repository.fakeAuthenticationRepository
import com.android.systemui.authentication.domain.interactor.authenticationInteractor
@@ -33,7 +34,7 @@
import com.android.systemui.kosmos.testScope
import com.android.systemui.res.R
import com.android.systemui.scene.domain.interactor.sceneInteractor
-import com.android.systemui.scene.shared.model.SceneKey
+import com.android.systemui.scene.shared.model.Scenes
import com.android.systemui.testKosmos
import com.android.systemui.user.data.model.SelectedUserModel
import com.android.systemui.user.data.model.SelectionStatus
@@ -93,7 +94,7 @@
assertThat(message?.text).isEqualTo(ENTER_YOUR_PASSWORD)
assertThat(password).isEmpty()
- assertThat(currentScene).isEqualTo(SceneKey.Bouncer)
+ assertThat(currentScene).isEqualTo(Scenes.Bouncer)
assertThat(underTest.authenticationMethod).isEqualTo(AuthenticationMethodModel.Password)
}
@@ -125,7 +126,7 @@
assertThat(message?.text).isEmpty()
assertThat(password).isEqualTo("password")
- assertThat(currentScene).isEqualTo(SceneKey.Bouncer)
+ assertThat(currentScene).isEqualTo(Scenes.Bouncer)
}
@Test
@@ -163,7 +164,7 @@
AuthenticationMethodModel.Password
)
kosmos.fakeDeviceEntryRepository.setUnlocked(false)
- switchToScene(SceneKey.Bouncer)
+ switchToScene(Scenes.Bouncer)
// No input entered.
@@ -209,14 +210,14 @@
assertThat(password).isEqualTo("password")
// The user doesn't confirm the password, but navigates back to the lockscreen instead.
- switchToScene(SceneKey.Lockscreen)
+ switchToScene(Scenes.Lockscreen)
// The user navigates to the bouncer again.
- switchToScene(SceneKey.Bouncer)
+ switchToScene(Scenes.Bouncer)
// Ensure the previously-entered password is not shown.
assertThat(password).isEmpty()
- assertThat(currentScene).isEqualTo(SceneKey.Bouncer)
+ assertThat(currentScene).isEqualTo(Scenes.Bouncer)
}
@Test
@@ -330,8 +331,8 @@
private fun TestScope.switchToScene(toScene: SceneKey) {
val currentScene by collectLastValue(sceneInteractor.currentScene)
- val bouncerShown = currentScene != SceneKey.Bouncer && toScene == SceneKey.Bouncer
- val bouncerHidden = currentScene == SceneKey.Bouncer && toScene != SceneKey.Bouncer
+ val bouncerShown = currentScene != Scenes.Bouncer && toScene == Scenes.Bouncer
+ val bouncerHidden = currentScene == Scenes.Bouncer && toScene != Scenes.Bouncer
sceneInteractor.changeScene(toScene, "reason")
if (bouncerShown) underTest.onShown()
if (bouncerHidden) underTest.onHidden()
@@ -345,7 +346,7 @@
AuthenticationMethodModel.Password
)
kosmos.fakeDeviceEntryRepository.setUnlocked(false)
- switchToScene(SceneKey.Bouncer)
+ switchToScene(Scenes.Bouncer)
}
private suspend fun TestScope.setLockout(
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/bouncer/ui/viewmodel/PatternBouncerViewModelTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/bouncer/ui/viewmodel/PatternBouncerViewModelTest.kt
index 32de1f2..91a056d 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/bouncer/ui/viewmodel/PatternBouncerViewModelTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/bouncer/ui/viewmodel/PatternBouncerViewModelTest.kt
@@ -18,6 +18,7 @@
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
+import com.android.compose.animation.scene.SceneKey
import com.android.systemui.SysuiTestCase
import com.android.systemui.authentication.data.repository.FakeAuthenticationRepository
import com.android.systemui.authentication.data.repository.authenticationRepository
@@ -31,7 +32,7 @@
import com.android.systemui.kosmos.testScope
import com.android.systemui.res.R
import com.android.systemui.scene.domain.interactor.sceneInteractor
-import com.android.systemui.scene.shared.model.SceneKey
+import com.android.systemui.scene.shared.model.Scenes
import com.android.systemui.testKosmos
import com.google.common.truth.Truth.assertThat
import com.google.common.truth.Truth.assertWithMessage
@@ -86,7 +87,7 @@
assertThat(message?.text).isEqualTo(ENTER_YOUR_PATTERN)
assertThat(selectedDots).isEmpty()
assertThat(currentDot).isNull()
- assertThat(currentScene).isEqualTo(SceneKey.Bouncer)
+ assertThat(currentScene).isEqualTo(Scenes.Bouncer)
assertThat(underTest.authenticationMethod).isEqualTo(AuthenticationMethodModel.Pattern)
}
@@ -104,7 +105,7 @@
assertThat(message?.text).isEmpty()
assertThat(selectedDots).isEmpty()
assertThat(currentDot).isNull()
- assertThat(currentScene).isEqualTo(SceneKey.Bouncer)
+ assertThat(currentScene).isEqualTo(Scenes.Bouncer)
}
@Test
@@ -159,7 +160,7 @@
assertThat(selectedDots).isEmpty()
assertThat(currentDot).isNull()
assertThat(message?.text).isEqualTo(WRONG_PATTERN)
- assertThat(currentScene).isEqualTo(SceneKey.Bouncer)
+ assertThat(currentScene).isEqualTo(Scenes.Bouncer)
}
@Test
@@ -369,8 +370,8 @@
private fun TestScope.switchToScene(toScene: SceneKey) {
val currentScene by collectLastValue(sceneInteractor.currentScene)
- val bouncerShown = currentScene != SceneKey.Bouncer && toScene == SceneKey.Bouncer
- val bouncerHidden = currentScene == SceneKey.Bouncer && toScene != SceneKey.Bouncer
+ val bouncerShown = currentScene != Scenes.Bouncer && toScene == Scenes.Bouncer
+ val bouncerHidden = currentScene == Scenes.Bouncer && toScene != Scenes.Bouncer
sceneInteractor.changeScene(toScene, "reason")
if (bouncerShown) underTest.onShown()
if (bouncerHidden) underTest.onHidden()
@@ -384,7 +385,7 @@
AuthenticationMethodModel.Pattern
)
kosmos.fakeDeviceEntryRepository.setUnlocked(false)
- switchToScene(SceneKey.Bouncer)
+ switchToScene(Scenes.Bouncer)
}
companion object {
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/bouncer/ui/viewmodel/PinBouncerViewModelTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/bouncer/ui/viewmodel/PinBouncerViewModelTest.kt
index ccf7094..7b75a37 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/bouncer/ui/viewmodel/PinBouncerViewModelTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/bouncer/ui/viewmodel/PinBouncerViewModelTest.kt
@@ -18,6 +18,7 @@
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
+import com.android.compose.animation.scene.SceneKey
import com.android.systemui.SysuiTestCase
import com.android.systemui.authentication.data.repository.FakeAuthenticationRepository
import com.android.systemui.authentication.data.repository.fakeAuthenticationRepository
@@ -31,7 +32,7 @@
import com.android.systemui.kosmos.testScope
import com.android.systemui.res.R
import com.android.systemui.scene.domain.interactor.sceneInteractor
-import com.android.systemui.scene.shared.model.SceneKey
+import com.android.systemui.scene.shared.model.Scenes
import com.android.systemui.testKosmos
import com.google.common.truth.Truth.assertThat
import kotlinx.coroutines.ExperimentalCoroutinesApi
@@ -196,7 +197,7 @@
assertThat(message?.text).isEmpty()
assertThat(pin).isEmpty()
- assertThat(currentScene).isEqualTo(SceneKey.Bouncer)
+ assertThat(currentScene).isEqualTo(Scenes.Bouncer)
}
@Test
@@ -230,7 +231,7 @@
assertThat(pin).isEmpty()
assertThat(message?.text).ignoringCase().isEqualTo(WRONG_PIN)
- assertThat(currentScene).isEqualTo(SceneKey.Bouncer)
+ assertThat(currentScene).isEqualTo(Scenes.Bouncer)
}
@Test
@@ -290,7 +291,7 @@
assertThat(pin).isEmpty()
assertThat(message?.text).ignoringCase().isEqualTo(WRONG_PIN)
- assertThat(currentScene).isEqualTo(SceneKey.Bouncer)
+ assertThat(currentScene).isEqualTo(Scenes.Bouncer)
}
@Test
@@ -304,10 +305,10 @@
assertThat(pin).isNotEmpty()
// The user doesn't confirm the PIN, but navigates back to the lockscreen instead.
- switchToScene(SceneKey.Lockscreen)
+ switchToScene(Scenes.Lockscreen)
// The user navigates to the bouncer again.
- switchToScene(SceneKey.Bouncer)
+ switchToScene(Scenes.Bouncer)
// Ensure the previously-entered PIN is not shown.
assertThat(pin).isEmpty()
@@ -389,8 +390,8 @@
private fun TestScope.switchToScene(toScene: SceneKey) {
val currentScene by collectLastValue(sceneInteractor.currentScene)
- val bouncerShown = currentScene != SceneKey.Bouncer && toScene == SceneKey.Bouncer
- val bouncerHidden = currentScene == SceneKey.Bouncer && toScene != SceneKey.Bouncer
+ val bouncerShown = currentScene != Scenes.Bouncer && toScene == Scenes.Bouncer
+ val bouncerHidden = currentScene == Scenes.Bouncer && toScene != Scenes.Bouncer
sceneInteractor.changeScene(toScene, "reason")
if (bouncerShown) underTest.onShown()
if (bouncerHidden) underTest.onHidden()
@@ -402,7 +403,7 @@
private fun TestScope.lockDeviceAndOpenPinBouncer() {
kosmos.fakeAuthenticationRepository.setAuthenticationMethod(AuthenticationMethodModel.Pin)
kosmos.fakeDeviceEntryRepository.setUnlocked(false)
- switchToScene(SceneKey.Bouncer)
+ switchToScene(Scenes.Bouncer)
}
companion object {
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/CommunalSceneStartableTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/CommunalSceneStartableTest.kt
index 92396e0..37b135e 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/CommunalSceneStartableTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/CommunalSceneStartableTest.kt
@@ -21,7 +21,7 @@
import com.android.systemui.SysuiTestCase
import com.android.systemui.communal.domain.interactor.communalInteractor
import com.android.systemui.communal.domain.interactor.setCommunalAvailable
-import com.android.systemui.communal.shared.model.CommunalSceneKey
+import com.android.systemui.communal.shared.model.CommunalScenes
import com.android.systemui.coroutines.collectLastValue
import com.android.systemui.dock.DockManager
import com.android.systemui.dock.dockManager
@@ -79,8 +79,8 @@
testScope.runTest {
val scene by collectLastValue(communalInteractor.desiredScene)
- communalInteractor.onSceneChanged(CommunalSceneKey.Communal)
- assertThat(scene).isEqualTo(CommunalSceneKey.Communal)
+ communalInteractor.onSceneChanged(CommunalScenes.Communal)
+ assertThat(scene).isEqualTo(CommunalScenes.Communal)
fakeKeyguardTransitionRepository.sendTransitionSteps(
from = KeyguardState.PRIMARY_BOUNCER,
@@ -88,7 +88,7 @@
testScope = this
)
- assertThat(scene).isEqualTo(CommunalSceneKey.Blank)
+ assertThat(scene).isEqualTo(CommunalScenes.Blank)
}
}
@@ -97,7 +97,7 @@
with(kosmos) {
testScope.runTest {
val scene by collectLastValue(communalInteractor.desiredScene)
- assertThat(scene).isEqualTo(CommunalSceneKey.Blank)
+ assertThat(scene).isEqualTo(CommunalScenes.Blank)
updateDocked(true)
fakeKeyguardTransitionRepository.sendTransitionSteps(
@@ -105,7 +105,7 @@
to = KeyguardState.LOCKSCREEN,
testScope = this
)
- assertThat(scene).isEqualTo(CommunalSceneKey.Communal)
+ assertThat(scene).isEqualTo(CommunalScenes.Communal)
}
}
@@ -114,7 +114,7 @@
with(kosmos) {
testScope.runTest {
val scene by collectLastValue(communalInteractor.desiredScene)
- assertThat(scene).isEqualTo(CommunalSceneKey.Blank)
+ assertThat(scene).isEqualTo(CommunalScenes.Blank)
updateDocked(true)
fakeKeyguardTransitionRepository.sendTransitionSteps(
@@ -122,7 +122,7 @@
to = KeyguardState.LOCKSCREEN,
testScope = this
)
- assertThat(scene).isEqualTo(CommunalSceneKey.Blank)
+ assertThat(scene).isEqualTo(CommunalScenes.Blank)
}
}
@@ -131,19 +131,19 @@
with(kosmos) {
testScope.runTest {
val scene by collectLastValue(communalInteractor.desiredScene)
- communalInteractor.onSceneChanged(CommunalSceneKey.Communal)
- assertThat(scene).isEqualTo(CommunalSceneKey.Communal)
+ communalInteractor.onSceneChanged(CommunalScenes.Communal)
+ assertThat(scene).isEqualTo(CommunalScenes.Communal)
fakeKeyguardTransitionRepository.sendTransitionSteps(
from = KeyguardState.GLANCEABLE_HUB,
to = KeyguardState.OFF,
testScope = this
)
- assertThat(scene).isEqualTo(CommunalSceneKey.Communal)
+ assertThat(scene).isEqualTo(CommunalScenes.Communal)
advanceTimeBy(CommunalSceneStartable.AWAKE_DEBOUNCE_DELAY)
- assertThat(scene).isEqualTo(CommunalSceneKey.Blank)
+ assertThat(scene).isEqualTo(CommunalScenes.Blank)
}
}
@@ -152,17 +152,17 @@
with(kosmos) {
testScope.runTest {
val scene by collectLastValue(communalInteractor.desiredScene)
- communalInteractor.onSceneChanged(CommunalSceneKey.Communal)
- assertThat(scene).isEqualTo(CommunalSceneKey.Communal)
+ communalInteractor.onSceneChanged(CommunalScenes.Communal)
+ assertThat(scene).isEqualTo(CommunalScenes.Communal)
fakeKeyguardTransitionRepository.sendTransitionSteps(
from = KeyguardState.GLANCEABLE_HUB,
to = KeyguardState.OFF,
testScope = this
)
- assertThat(scene).isEqualTo(CommunalSceneKey.Communal)
+ assertThat(scene).isEqualTo(CommunalScenes.Communal)
advanceTimeBy(CommunalSceneStartable.AWAKE_DEBOUNCE_DELAY / 2)
- assertThat(scene).isEqualTo(CommunalSceneKey.Communal)
+ assertThat(scene).isEqualTo(CommunalScenes.Communal)
fakeKeyguardTransitionRepository.sendTransitionSteps(
from = KeyguardState.OFF,
@@ -171,7 +171,7 @@
)
advanceTimeBy(CommunalSceneStartable.AWAKE_DEBOUNCE_DELAY)
- assertThat(scene).isEqualTo(CommunalSceneKey.Communal)
+ assertThat(scene).isEqualTo(CommunalScenes.Communal)
}
}
@@ -179,7 +179,7 @@
fun dockingOnLockscreen_forcesCommunal() =
with(kosmos) {
testScope.runTest {
- communalInteractor.onSceneChanged(CommunalSceneKey.Blank)
+ communalInteractor.onSceneChanged(CommunalScenes.Blank)
val scene by collectLastValue(communalInteractor.desiredScene)
// device is docked while on the lockscreen
@@ -190,9 +190,9 @@
)
updateDocked(true)
- assertThat(scene).isEqualTo(CommunalSceneKey.Blank)
+ assertThat(scene).isEqualTo(CommunalScenes.Blank)
advanceTimeBy(CommunalSceneStartable.DOCK_DEBOUNCE_DELAY)
- assertThat(scene).isEqualTo(CommunalSceneKey.Communal)
+ assertThat(scene).isEqualTo(CommunalScenes.Communal)
}
}
@@ -200,7 +200,7 @@
fun dockingOnLockscreen_doesNotForceCommunalIfDreamStarts() =
with(kosmos) {
testScope.runTest {
- communalInteractor.onSceneChanged(CommunalSceneKey.Blank)
+ communalInteractor.onSceneChanged(CommunalScenes.Blank)
val scene by collectLastValue(communalInteractor.desiredScene)
// device is docked while on the lockscreen
@@ -211,9 +211,9 @@
)
updateDocked(true)
- assertThat(scene).isEqualTo(CommunalSceneKey.Blank)
+ assertThat(scene).isEqualTo(CommunalScenes.Blank)
advanceTimeBy(CommunalSceneStartable.DOCK_DEBOUNCE_DELAY / 2)
- assertThat(scene).isEqualTo(CommunalSceneKey.Blank)
+ assertThat(scene).isEqualTo(CommunalScenes.Blank)
// dream starts shortly after docking
fakeKeyguardTransitionRepository.sendTransitionSteps(
@@ -222,7 +222,7 @@
testScope = this
)
advanceTimeBy(CommunalSceneStartable.DOCK_DEBOUNCE_DELAY)
- assertThat(scene).isEqualTo(CommunalSceneKey.Blank)
+ assertThat(scene).isEqualTo(CommunalScenes.Blank)
}
}
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/data/repository/CommunalRepositoryImplTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/data/repository/CommunalRepositoryImplTest.kt
index 06b3806..43acf31 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/data/repository/CommunalRepositoryImplTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/data/repository/CommunalRepositoryImplTest.kt
@@ -18,9 +18,9 @@
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
+import com.android.compose.animation.scene.ObservableTransitionState
import com.android.systemui.SysuiTestCase
-import com.android.systemui.communal.shared.model.CommunalSceneKey
-import com.android.systemui.communal.shared.model.ObservableCommunalTransitionState
+import com.android.systemui.communal.shared.model.CommunalScenes
import com.android.systemui.coroutines.collectLastValue
import com.android.systemui.kosmos.testScope
import com.android.systemui.scene.data.repository.sceneContainerRepository
@@ -60,20 +60,17 @@
testScope.runTest {
val transitionState by collectLastValue(underTest.transitionState)
assertThat(transitionState)
- .isEqualTo(ObservableCommunalTransitionState.Idle(CommunalSceneKey.DEFAULT))
+ .isEqualTo(ObservableTransitionState.Idle(CommunalScenes.Default))
}
@Test
fun transitionState_setTransitionState_returnsNewValue() =
testScope.runTest {
- val expectedSceneKey = CommunalSceneKey.Communal
- underTest.setTransitionState(
- flowOf(ObservableCommunalTransitionState.Idle(expectedSceneKey))
- )
+ val expectedSceneKey = CommunalScenes.Communal
+ underTest.setTransitionState(flowOf(ObservableTransitionState.Idle(expectedSceneKey)))
val transitionState by collectLastValue(underTest.transitionState)
- assertThat(transitionState)
- .isEqualTo(ObservableCommunalTransitionState.Idle(expectedSceneKey))
+ assertThat(transitionState).isEqualTo(ObservableTransitionState.Idle(expectedSceneKey))
}
@Test
@@ -81,7 +78,7 @@
testScope.runTest {
// Set a value for the transition state flow.
underTest.setTransitionState(
- flowOf(ObservableCommunalTransitionState.Idle(CommunalSceneKey.Communal))
+ flowOf(ObservableTransitionState.Idle(CommunalScenes.Communal))
)
// Set the transition state flow back to null.
@@ -90,6 +87,6 @@
// Flow returns default scene key.
val transitionState by collectLastValue(underTest.transitionState)
assertThat(transitionState)
- .isEqualTo(ObservableCommunalTransitionState.Idle(CommunalSceneKey.DEFAULT))
+ .isEqualTo(ObservableTransitionState.Idle(CommunalScenes.Default))
}
}
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/domain/interactor/CommunalInteractorTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/domain/interactor/CommunalInteractorTest.kt
index 6e3573b..eafd503 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/domain/interactor/CommunalInteractorTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/domain/interactor/CommunalInteractorTest.kt
@@ -25,6 +25,7 @@
import android.widget.RemoteViews
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
+import com.android.compose.animation.scene.ObservableTransitionState
import com.android.systemui.Flags.FLAG_COMMUNAL_HUB
import com.android.systemui.SysuiTestCase
import com.android.systemui.communal.data.repository.CommunalSettingsRepositoryImpl
@@ -40,9 +41,8 @@
import com.android.systemui.communal.data.repository.fakeCommunalWidgetRepository
import com.android.systemui.communal.domain.model.CommunalContentModel
import com.android.systemui.communal.shared.model.CommunalContentSize
-import com.android.systemui.communal.shared.model.CommunalSceneKey
+import com.android.systemui.communal.shared.model.CommunalScenes
import com.android.systemui.communal.shared.model.CommunalWidgetContentModel
-import com.android.systemui.communal.shared.model.ObservableCommunalTransitionState
import com.android.systemui.communal.widgets.EditWidgetsActivityStarter
import com.android.systemui.coroutines.collectLastValue
import com.android.systemui.flags.Flags
@@ -53,7 +53,7 @@
import com.android.systemui.scene.domain.interactor.SceneInteractor
import com.android.systemui.scene.domain.interactor.sceneInteractor
import com.android.systemui.scene.shared.flag.fakeSceneContainerFlags
-import com.android.systemui.scene.shared.model.SceneKey
+import com.android.systemui.scene.shared.model.Scenes
import com.android.systemui.settings.FakeUserTracker
import com.android.systemui.settings.fakeUserTracker
import com.android.systemui.smartspace.data.repository.FakeSmartspaceRepository
@@ -462,9 +462,9 @@
var desiredScene = collectLastValue(underTest.desiredScene)
runCurrent()
- assertThat(desiredScene()).isEqualTo(CommunalSceneKey.Blank)
+ assertThat(desiredScene()).isEqualTo(CommunalScenes.Blank)
- val targetScene = CommunalSceneKey.Communal
+ val targetScene = CommunalScenes.Communal
communalRepository.setDesiredScene(targetScene)
desiredScene = collectLastValue(underTest.desiredScene)
runCurrent()
@@ -474,7 +474,7 @@
@Test
fun updatesScene() =
testScope.runTest {
- val targetScene = CommunalSceneKey.Communal
+ val targetScene = CommunalScenes.Communal
underTest.onSceneChanged(targetScene)
@@ -491,32 +491,32 @@
val desiredScene by collectLastValue(underTest.desiredScene)
- underTest.onSceneChanged(CommunalSceneKey.Communal)
- assertThat(desiredScene).isEqualTo(CommunalSceneKey.Communal)
+ underTest.onSceneChanged(CommunalScenes.Communal)
+ assertThat(desiredScene).isEqualTo(CommunalScenes.Communal)
kosmos.setCommunalAvailable(false)
runCurrent()
// Scene returns blank when communal is not available.
- assertThat(desiredScene).isEqualTo(CommunalSceneKey.Blank)
+ assertThat(desiredScene).isEqualTo(CommunalScenes.Blank)
kosmos.setCommunalAvailable(true)
runCurrent()
// After re-enabling, scene goes back to Communal.
- assertThat(desiredScene).isEqualTo(CommunalSceneKey.Communal)
+ assertThat(desiredScene).isEqualTo(CommunalScenes.Communal)
}
@Test
fun transitionProgress_onTargetScene_fullProgress() =
testScope.runTest {
- val targetScene = CommunalSceneKey.Blank
+ val targetScene = CommunalScenes.Blank
val transitionProgressFlow = underTest.transitionProgressToScene(targetScene)
val transitionProgress by collectLastValue(transitionProgressFlow)
val transitionState =
- MutableStateFlow<ObservableCommunalTransitionState>(
- ObservableCommunalTransitionState.Idle(targetScene)
+ MutableStateFlow<ObservableTransitionState>(
+ ObservableTransitionState.Idle(targetScene)
)
underTest.setTransitionState(transitionState)
@@ -527,14 +527,14 @@
@Test
fun transitionProgress_notOnTargetScene_noProgress() =
testScope.runTest {
- val targetScene = CommunalSceneKey.Blank
- val currentScene = CommunalSceneKey.Communal
+ val targetScene = CommunalScenes.Blank
+ val currentScene = CommunalScenes.Communal
val transitionProgressFlow = underTest.transitionProgressToScene(targetScene)
val transitionProgress by collectLastValue(transitionProgressFlow)
val transitionState =
- MutableStateFlow<ObservableCommunalTransitionState>(
- ObservableCommunalTransitionState.Idle(currentScene)
+ MutableStateFlow<ObservableTransitionState>(
+ ObservableTransitionState.Idle(currentScene)
)
underTest.setTransitionState(transitionState)
@@ -545,14 +545,14 @@
@Test
fun transitionProgress_transitioningToTrackedScene() =
testScope.runTest {
- val currentScene = CommunalSceneKey.Communal
- val targetScene = CommunalSceneKey.Blank
+ val currentScene = CommunalScenes.Communal
+ val targetScene = CommunalScenes.Blank
val transitionProgressFlow = underTest.transitionProgressToScene(targetScene)
val transitionProgress by collectLastValue(transitionProgressFlow)
var transitionState =
- MutableStateFlow<ObservableCommunalTransitionState>(
- ObservableCommunalTransitionState.Idle(currentScene)
+ MutableStateFlow<ObservableTransitionState>(
+ ObservableTransitionState.Idle(currentScene)
)
underTest.setTransitionState(transitionState)
@@ -562,7 +562,7 @@
val progress = MutableStateFlow(0f)
transitionState =
MutableStateFlow(
- ObservableCommunalTransitionState.Transition(
+ ObservableTransitionState.Transition(
fromScene = currentScene,
toScene = targetScene,
progress = progress,
@@ -581,7 +581,7 @@
assertThat(transitionProgress).isEqualTo(CommunalTransitionProgress.Transition(1f))
// Transition finishes.
- transitionState = MutableStateFlow(ObservableCommunalTransitionState.Idle(targetScene))
+ transitionState = MutableStateFlow(ObservableTransitionState.Idle(targetScene))
underTest.setTransitionState(transitionState)
assertThat(transitionProgress).isEqualTo(CommunalTransitionProgress.Idle(targetScene))
}
@@ -589,14 +589,14 @@
@Test
fun transitionProgress_transitioningAwayFromTrackedScene() =
testScope.runTest {
- val currentScene = CommunalSceneKey.Blank
- val targetScene = CommunalSceneKey.Communal
+ val currentScene = CommunalScenes.Blank
+ val targetScene = CommunalScenes.Communal
val transitionProgressFlow = underTest.transitionProgressToScene(currentScene)
val transitionProgress by collectLastValue(transitionProgressFlow)
var transitionState =
- MutableStateFlow<ObservableCommunalTransitionState>(
- ObservableCommunalTransitionState.Idle(currentScene)
+ MutableStateFlow<ObservableTransitionState>(
+ ObservableTransitionState.Idle(currentScene)
)
underTest.setTransitionState(transitionState)
@@ -606,7 +606,7 @@
val progress = MutableStateFlow(0f)
transitionState =
MutableStateFlow(
- ObservableCommunalTransitionState.Transition(
+ ObservableTransitionState.Transition(
fromScene = currentScene,
toScene = targetScene,
progress = progress,
@@ -627,7 +627,7 @@
assertThat(transitionProgress).isEqualTo(CommunalTransitionProgress.OtherTransition)
// Transition finishes.
- transitionState = MutableStateFlow(ObservableCommunalTransitionState.Idle(targetScene))
+ transitionState = MutableStateFlow(ObservableTransitionState.Idle(targetScene))
underTest.setTransitionState(transitionState)
assertThat(transitionProgress).isEqualTo(CommunalTransitionProgress.Idle(targetScene))
}
@@ -642,7 +642,7 @@
runCurrent()
assertThat(isCommunalShowing()).isEqualTo(false)
- underTest.onSceneChanged(CommunalSceneKey.Communal)
+ underTest.onSceneChanged(CommunalScenes.Communal)
isCommunalShowing = collectLastValue(underTest.isCommunalShowing)
runCurrent()
@@ -661,17 +661,17 @@
assertThat(isCommunalShowing).isFalse()
// Verify scene changes with the flag doesn't have any impact
- sceneInteractor.changeScene(SceneKey.Communal, loggingReason = "")
+ sceneInteractor.changeScene(Scenes.Communal, loggingReason = "")
runCurrent()
assertThat(isCommunalShowing).isFalse()
// Verify scene changes (without the flag) to communal sets the value to true
- underTest.onSceneChanged(CommunalSceneKey.Communal)
+ underTest.onSceneChanged(CommunalScenes.Communal)
runCurrent()
assertThat(isCommunalShowing).isTrue()
// Verify scene changes (without the flag) to blank sets the value back to false
- underTest.onSceneChanged(CommunalSceneKey.Blank)
+ underTest.onSceneChanged(CommunalScenes.Blank)
runCurrent()
assertThat(isCommunalShowing).isFalse()
}
@@ -687,17 +687,17 @@
assertThat(isCommunalShowing).isFalse()
// Verify scene changes without the flag doesn't have any impact
- underTest.onSceneChanged(CommunalSceneKey.Communal)
+ underTest.onSceneChanged(CommunalScenes.Communal)
runCurrent()
assertThat(isCommunalShowing).isFalse()
// Verify scene changes (with the flag) to communal sets the value to true
- sceneInteractor.changeScene(SceneKey.Communal, loggingReason = "")
+ sceneInteractor.changeScene(Scenes.Communal, loggingReason = "")
runCurrent()
assertThat(isCommunalShowing).isTrue()
// Verify scene changes (with the flag) to lockscreen sets the value to false
- sceneInteractor.changeScene(SceneKey.Lockscreen, loggingReason = "")
+ sceneInteractor.changeScene(Scenes.Lockscreen, loggingReason = "")
runCurrent()
assertThat(isCommunalShowing).isFalse()
}
@@ -706,8 +706,8 @@
fun isIdleOnCommunal() =
testScope.runTest {
val transitionState =
- MutableStateFlow<ObservableCommunalTransitionState>(
- ObservableCommunalTransitionState.Idle(CommunalSceneKey.Blank)
+ MutableStateFlow<ObservableTransitionState>(
+ ObservableTransitionState.Idle(CommunalScenes.Blank)
)
communalRepository.setTransitionState(transitionState)
@@ -717,8 +717,7 @@
assertThat(isIdleOnCommunal).isEqualTo(false)
// Transition to communal.
- transitionState.value =
- ObservableCommunalTransitionState.Idle(CommunalSceneKey.Communal)
+ transitionState.value = ObservableTransitionState.Idle(CommunalScenes.Communal)
runCurrent()
// isIdleOnCommunal is now true since we're on communal.
@@ -726,9 +725,9 @@
// Start transition away from communal.
transitionState.value =
- ObservableCommunalTransitionState.Transition(
- fromScene = CommunalSceneKey.Communal,
- toScene = CommunalSceneKey.Blank,
+ ObservableTransitionState.Transition(
+ fromScene = CommunalScenes.Communal,
+ toScene = CommunalScenes.Blank,
progress = flowOf(0f),
isInitiatedByUserInput = false,
isUserInputOngoing = flowOf(false),
@@ -743,8 +742,8 @@
fun isCommunalVisible() =
testScope.runTest {
val transitionState =
- MutableStateFlow<ObservableCommunalTransitionState>(
- ObservableCommunalTransitionState.Idle(CommunalSceneKey.Blank)
+ MutableStateFlow<ObservableTransitionState>(
+ ObservableTransitionState.Idle(CommunalScenes.Blank)
)
communalRepository.setTransitionState(transitionState)
@@ -754,9 +753,9 @@
// Start transition to communal.
transitionState.value =
- ObservableCommunalTransitionState.Transition(
- fromScene = CommunalSceneKey.Blank,
- toScene = CommunalSceneKey.Communal,
+ ObservableTransitionState.Transition(
+ fromScene = CommunalScenes.Blank,
+ toScene = CommunalScenes.Communal,
progress = flowOf(0f),
isInitiatedByUserInput = false,
isUserInputOngoing = flowOf(false),
@@ -766,17 +765,16 @@
assertThat(isCommunalVisible).isEqualTo(true)
// Finish transition to communal
- transitionState.value =
- ObservableCommunalTransitionState.Idle(CommunalSceneKey.Communal)
+ transitionState.value = ObservableTransitionState.Idle(CommunalScenes.Communal)
// isCommunalVisible is true since we're on communal.
assertThat(isCommunalVisible).isEqualTo(true)
// Start transition away from communal.
transitionState.value =
- ObservableCommunalTransitionState.Transition(
- fromScene = CommunalSceneKey.Communal,
- toScene = CommunalSceneKey.Blank,
+ ObservableTransitionState.Transition(
+ fromScene = CommunalScenes.Communal,
+ toScene = CommunalScenes.Blank,
progress = flowOf(1.0f),
isInitiatedByUserInput = false,
isUserInputOngoing = flowOf(false),
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/domain/interactor/CommunalTutorialInteractorTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/domain/interactor/CommunalTutorialInteractorTest.kt
index 8b78592..50b8da6 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/domain/interactor/CommunalTutorialInteractorTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/domain/interactor/CommunalTutorialInteractorTest.kt
@@ -25,7 +25,7 @@
import com.android.systemui.SysuiTestCase
import com.android.systemui.communal.data.repository.FakeCommunalTutorialRepository
import com.android.systemui.communal.data.repository.fakeCommunalTutorialRepository
-import com.android.systemui.communal.shared.model.CommunalSceneKey
+import com.android.systemui.communal.shared.model.CommunalScenes
import com.android.systemui.coroutines.collectLastValue
import com.android.systemui.flags.Flags
import com.android.systemui.flags.fakeFeatureFlagsClassic
@@ -158,7 +158,7 @@
kosmos.setCommunalAvailable(true)
communalTutorialRepository.setTutorialSettingState(HUB_MODE_TUTORIAL_NOT_STARTED)
- communalInteractor.onSceneChanged(CommunalSceneKey.Blank)
+ communalInteractor.onSceneChanged(CommunalScenes.Blank)
assertThat(tutorialSettingState).isEqualTo(HUB_MODE_TUTORIAL_NOT_STARTED)
}
@@ -171,7 +171,7 @@
goToCommunal()
communalTutorialRepository.setTutorialSettingState(HUB_MODE_TUTORIAL_STARTED)
- communalInteractor.onSceneChanged(CommunalSceneKey.Blank)
+ communalInteractor.onSceneChanged(CommunalScenes.Blank)
assertThat(tutorialSettingState).isEqualTo(HUB_MODE_TUTORIAL_COMPLETED)
}
@@ -184,13 +184,13 @@
goToCommunal()
communalTutorialRepository.setTutorialSettingState(HUB_MODE_TUTORIAL_COMPLETED)
- communalInteractor.onSceneChanged(CommunalSceneKey.Blank)
+ communalInteractor.onSceneChanged(CommunalScenes.Blank)
assertThat(tutorialSettingState).isEqualTo(HUB_MODE_TUTORIAL_COMPLETED)
}
private suspend fun goToCommunal() {
kosmos.setCommunalAvailable(true)
- communalInteractor.onSceneChanged(CommunalSceneKey.Communal)
+ communalInteractor.onSceneChanged(CommunalScenes.Communal)
}
}
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/log/CommunalLoggerStartableTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/log/CommunalLoggerStartableTest.kt
index 6b1b937..a51315b 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/log/CommunalLoggerStartableTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/log/CommunalLoggerStartableTest.kt
@@ -18,13 +18,14 @@
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
+import com.android.compose.animation.scene.ObservableTransitionState
+import com.android.compose.animation.scene.SceneKey
import com.android.internal.logging.UiEventLogger
import com.android.systemui.SysuiTestCase
import com.android.systemui.communal.domain.interactor.CommunalInteractor
import com.android.systemui.communal.domain.interactor.communalInteractor
import com.android.systemui.communal.shared.log.CommunalUiEvent
-import com.android.systemui.communal.shared.model.CommunalSceneKey
-import com.android.systemui.communal.shared.model.ObservableCommunalTransitionState
+import com.android.systemui.communal.shared.model.CommunalScenes
import com.android.systemui.kosmos.testScope
import com.android.systemui.testKosmos
import kotlinx.coroutines.ExperimentalCoroutinesApi
@@ -73,7 +74,7 @@
testScope.runTest {
// Transition state is default (non-communal)
val transitionState =
- MutableStateFlow<ObservableCommunalTransitionState>(idle(CommunalSceneKey.DEFAULT))
+ MutableStateFlow<ObservableTransitionState>(idle(CommunalScenes.Default))
communalInteractor.setTransitionState(transitionState)
runCurrent()
@@ -81,14 +82,14 @@
verify(uiEventLogger, never()).log(any())
// Start transition to communal
- transitionState.value = transition(to = CommunalSceneKey.Communal)
+ transitionState.value = transition(to = CommunalScenes.Communal)
runCurrent()
// Verify UiEvent logged
verify(uiEventLogger).log(CommunalUiEvent.COMMUNAL_HUB_SWIPE_TO_ENTER_START)
// Finish transition to communal
- transitionState.value = idle(CommunalSceneKey.Communal)
+ transitionState.value = idle(CommunalScenes.Communal)
runCurrent()
// Verify UiEvent logged
@@ -101,7 +102,7 @@
testScope.runTest {
// Transition state is default (non-communal)
val transitionState =
- MutableStateFlow<ObservableCommunalTransitionState>(idle(CommunalSceneKey.DEFAULT))
+ MutableStateFlow<ObservableTransitionState>(idle(CommunalScenes.Default))
communalInteractor.setTransitionState(transitionState)
runCurrent()
@@ -109,14 +110,14 @@
verify(uiEventLogger, never()).log(any())
// Start transition to communal
- transitionState.value = transition(to = CommunalSceneKey.Communal)
+ transitionState.value = transition(to = CommunalScenes.Communal)
runCurrent()
// Verify UiEvent logged
verify(uiEventLogger).log(CommunalUiEvent.COMMUNAL_HUB_SWIPE_TO_ENTER_START)
// Cancel the transition
- transitionState.value = idle(CommunalSceneKey.DEFAULT)
+ transitionState.value = idle(CommunalScenes.Default)
runCurrent()
// Verify UiEvent logged
@@ -132,7 +133,7 @@
testScope.runTest {
// Transition state is communal
val transitionState =
- MutableStateFlow<ObservableCommunalTransitionState>(idle(CommunalSceneKey.Communal))
+ MutableStateFlow<ObservableTransitionState>(idle(CommunalScenes.Communal))
communalInteractor.setTransitionState(transitionState)
runCurrent()
@@ -140,14 +141,14 @@
verify(uiEventLogger).log(CommunalUiEvent.COMMUNAL_HUB_SHOWN)
// Start transition from communal
- transitionState.value = transition(from = CommunalSceneKey.Communal)
+ transitionState.value = transition(from = CommunalScenes.Communal)
runCurrent()
// Verify UiEvent logged
verify(uiEventLogger).log(CommunalUiEvent.COMMUNAL_HUB_SWIPE_TO_EXIT_START)
// Finish transition to communal
- transitionState.value = idle(CommunalSceneKey.DEFAULT)
+ transitionState.value = idle(CommunalScenes.Default)
runCurrent()
// Verify UiEvent logged
@@ -160,7 +161,7 @@
testScope.runTest {
// Transition state is communal
val transitionState =
- MutableStateFlow<ObservableCommunalTransitionState>(idle(CommunalSceneKey.Communal))
+ MutableStateFlow<ObservableTransitionState>(idle(CommunalScenes.Communal))
communalInteractor.setTransitionState(transitionState)
runCurrent()
@@ -168,14 +169,14 @@
clearInvocations(uiEventLogger)
// Start transition from communal
- transitionState.value = transition(from = CommunalSceneKey.Communal)
+ transitionState.value = transition(from = CommunalScenes.Communal)
runCurrent()
// Verify UiEvent logged
verify(uiEventLogger).log(CommunalUiEvent.COMMUNAL_HUB_SWIPE_TO_EXIT_START)
// Cancel the transition
- transitionState.value = idle(CommunalSceneKey.Communal)
+ transitionState.value = idle(CommunalScenes.Communal)
runCurrent()
// Verify UiEvent logged
@@ -187,10 +188,10 @@
}
private fun transition(
- from: CommunalSceneKey = CommunalSceneKey.DEFAULT,
- to: CommunalSceneKey = CommunalSceneKey.DEFAULT,
- ): ObservableCommunalTransitionState.Transition {
- return ObservableCommunalTransitionState.Transition(
+ from: SceneKey = CommunalScenes.Default,
+ to: SceneKey = CommunalScenes.Default,
+ ): ObservableTransitionState.Transition {
+ return ObservableTransitionState.Transition(
fromScene = from,
toScene = to,
progress = emptyFlow(),
@@ -199,7 +200,7 @@
)
}
- private fun idle(sceneKey: CommunalSceneKey): ObservableCommunalTransitionState.Idle {
- return ObservableCommunalTransitionState.Idle(sceneKey)
+ private fun idle(sceneKey: SceneKey): ObservableTransitionState.Idle {
+ return ObservableTransitionState.Idle(sceneKey)
}
}
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/deviceentry/domain/interactor/DeviceEntryInteractorTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/deviceentry/domain/interactor/DeviceEntryInteractorTest.kt
index 98719dd3..4f44705 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/deviceentry/domain/interactor/DeviceEntryInteractorTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/deviceentry/domain/interactor/DeviceEntryInteractorTest.kt
@@ -18,6 +18,7 @@
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
+import com.android.compose.animation.scene.SceneKey
import com.android.systemui.SysuiTestCase
import com.android.systemui.authentication.data.repository.FakeAuthenticationRepository
import com.android.systemui.authentication.data.repository.fakeAuthenticationRepository
@@ -31,7 +32,7 @@
import com.android.systemui.kosmos.testScope
import com.android.systemui.scene.domain.interactor.sceneInteractor
import com.android.systemui.scene.shared.flag.fakeSceneContainerFlags
-import com.android.systemui.scene.shared.model.SceneKey
+import com.android.systemui.scene.shared.model.Scenes
import com.android.systemui.testKosmos
import com.google.common.truth.Truth.assertThat
import kotlinx.coroutines.ExperimentalCoroutinesApi
@@ -120,7 +121,7 @@
testScope.runTest {
val isDeviceEntered by collectLastValue(underTest.isDeviceEntered)
setupSwipeDeviceEntryMethod()
- switchToScene(SceneKey.Lockscreen)
+ switchToScene(Scenes.Lockscreen)
assertThat(isDeviceEntered).isFalse()
}
@@ -130,9 +131,9 @@
testScope.runTest {
val isDeviceEntered by collectLastValue(underTest.isDeviceEntered)
setupSwipeDeviceEntryMethod()
- switchToScene(SceneKey.Lockscreen)
+ switchToScene(Scenes.Lockscreen)
runCurrent()
- switchToScene(SceneKey.Shade)
+ switchToScene(Scenes.Shade)
assertThat(isDeviceEntered).isFalse()
}
@@ -142,9 +143,9 @@
testScope.runTest {
val isDeviceEntered by collectLastValue(underTest.isDeviceEntered)
setupSwipeDeviceEntryMethod()
- switchToScene(SceneKey.Lockscreen)
+ switchToScene(Scenes.Lockscreen)
runCurrent()
- switchToScene(SceneKey.Gone)
+ switchToScene(Scenes.Gone)
assertThat(isDeviceEntered).isTrue()
}
@@ -154,11 +155,11 @@
testScope.runTest {
val isDeviceEntered by collectLastValue(underTest.isDeviceEntered)
setupSwipeDeviceEntryMethod()
- switchToScene(SceneKey.Lockscreen)
+ switchToScene(Scenes.Lockscreen)
runCurrent()
- switchToScene(SceneKey.Gone)
+ switchToScene(Scenes.Gone)
runCurrent()
- switchToScene(SceneKey.Shade)
+ switchToScene(Scenes.Shade)
assertThat(isDeviceEntered).isTrue()
}
@@ -170,9 +171,9 @@
AuthenticationMethodModel.Pattern
)
kosmos.fakeDeviceEntryRepository.setLockscreenEnabled(true)
- switchToScene(SceneKey.Lockscreen)
+ switchToScene(Scenes.Lockscreen)
runCurrent()
- switchToScene(SceneKey.Bouncer)
+ switchToScene(Scenes.Bouncer)
val isDeviceEntered by collectLastValue(underTest.isDeviceEntered)
assertThat(isDeviceEntered).isFalse()
@@ -182,7 +183,7 @@
fun canSwipeToEnter_onLockscreenWithSwipe_isTrue() =
testScope.runTest {
setupSwipeDeviceEntryMethod()
- switchToScene(SceneKey.Lockscreen)
+ switchToScene(Scenes.Lockscreen)
val canSwipeToEnter by collectLastValue(underTest.canSwipeToEnter)
assertThat(canSwipeToEnter).isTrue()
@@ -195,7 +196,7 @@
AuthenticationMethodModel.Pin
)
kosmos.fakeDeviceEntryRepository.setLockscreenEnabled(true)
- switchToScene(SceneKey.Lockscreen)
+ switchToScene(Scenes.Lockscreen)
val canSwipeToEnter by collectLastValue(underTest.canSwipeToEnter)
assertThat(canSwipeToEnter).isFalse()
@@ -205,9 +206,9 @@
fun canSwipeToEnter_afterLockscreenDismissedInSwipeMode_isFalse() =
testScope.runTest {
setupSwipeDeviceEntryMethod()
- switchToScene(SceneKey.Lockscreen)
+ switchToScene(Scenes.Lockscreen)
runCurrent()
- switchToScene(SceneKey.Gone)
+ switchToScene(Scenes.Gone)
val canSwipeToEnter by collectLastValue(underTest.canSwipeToEnter)
assertThat(canSwipeToEnter).isFalse()
@@ -225,7 +226,7 @@
kosmos.fakeAuthenticationRepository.setAuthenticationMethod(
AuthenticationMethodModel.Password
)
- switchToScene(SceneKey.Lockscreen)
+ switchToScene(Scenes.Lockscreen)
assertThat(canSwipeToEnter).isFalse()
trustRepository.setCurrentUserTrusted(true)
@@ -242,7 +243,7 @@
kosmos.fakeAuthenticationRepository.setAuthenticationMethod(
AuthenticationMethodModel.Password
)
- switchToScene(SceneKey.Lockscreen)
+ switchToScene(Scenes.Lockscreen)
assertThat(canSwipeToEnter).isFalse()
faceAuthRepository.isAuthenticated.value = true
@@ -311,8 +312,8 @@
fun showOrUnlockDevice_notLocked_switchesToGoneScene() =
testScope.runTest {
val currentScene by collectLastValue(sceneInteractor.currentScene)
- switchToScene(SceneKey.Lockscreen)
- assertThat(currentScene).isEqualTo(SceneKey.Lockscreen)
+ switchToScene(Scenes.Lockscreen)
+ assertThat(currentScene).isEqualTo(Scenes.Lockscreen)
kosmos.fakeAuthenticationRepository.setAuthenticationMethod(
AuthenticationMethodModel.Pin
@@ -322,15 +323,15 @@
underTest.attemptDeviceEntry()
- assertThat(currentScene).isEqualTo(SceneKey.Gone)
+ assertThat(currentScene).isEqualTo(Scenes.Gone)
}
@Test
fun showOrUnlockDevice_authMethodNotSecure_switchesToGoneScene() =
testScope.runTest {
val currentScene by collectLastValue(sceneInteractor.currentScene)
- switchToScene(SceneKey.Lockscreen)
- assertThat(currentScene).isEqualTo(SceneKey.Lockscreen)
+ switchToScene(Scenes.Lockscreen)
+ assertThat(currentScene).isEqualTo(Scenes.Lockscreen)
kosmos.fakeAuthenticationRepository.setAuthenticationMethod(
AuthenticationMethodModel.None
@@ -339,15 +340,15 @@
underTest.attemptDeviceEntry()
- assertThat(currentScene).isEqualTo(SceneKey.Gone)
+ assertThat(currentScene).isEqualTo(Scenes.Gone)
}
@Test
fun showOrUnlockDevice_authMethodSwipe_switchesToGoneScene() =
testScope.runTest {
val currentScene by collectLastValue(sceneInteractor.currentScene)
- switchToScene(SceneKey.Lockscreen)
- assertThat(currentScene).isEqualTo(SceneKey.Lockscreen)
+ switchToScene(Scenes.Lockscreen)
+ assertThat(currentScene).isEqualTo(Scenes.Lockscreen)
kosmos.fakeDeviceEntryRepository.setLockscreenEnabled(true)
kosmos.fakeAuthenticationRepository.setAuthenticationMethod(
@@ -357,7 +358,7 @@
underTest.attemptDeviceEntry()
- assertThat(currentScene).isEqualTo(SceneKey.Gone)
+ assertThat(currentScene).isEqualTo(Scenes.Gone)
}
@Test
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/domain/interactor/KeyguardInteractorTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/domain/interactor/KeyguardInteractorTest.kt
index ef2b6f0..f9ec3d1 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/domain/interactor/KeyguardInteractorTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/domain/interactor/KeyguardInteractorTest.kt
@@ -20,6 +20,7 @@
import android.app.StatusBarManager
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
+import com.android.compose.animation.scene.ObservableTransitionState
import com.android.systemui.SysuiTestCase
import com.android.systemui.bouncer.data.repository.FakeKeyguardBouncerRepository
import com.android.systemui.common.ui.data.repository.FakeConfigurationRepository
@@ -35,8 +36,7 @@
import com.android.systemui.power.domain.interactor.PowerInteractorFactory
import com.android.systemui.scene.domain.interactor.sceneInteractor
import com.android.systemui.scene.shared.flag.fakeSceneContainerFlags
-import com.android.systemui.scene.shared.model.ObservableTransitionState
-import com.android.systemui.scene.shared.model.SceneKey
+import com.android.systemui.scene.shared.model.Scenes
import com.android.systemui.shade.data.repository.FakeShadeRepository
import com.android.systemui.testKosmos
import com.google.common.truth.Truth.assertThat
@@ -64,7 +64,7 @@
private val shadeRepository = FakeShadeRepository()
private val keyguardTransitionRepository = kosmos.fakeKeyguardTransitionRepository
private val transitionState: MutableStateFlow<ObservableTransitionState> =
- MutableStateFlow(ObservableTransitionState.Idle(SceneKey.Gone))
+ MutableStateFlow(ObservableTransitionState.Idle(Scenes.Gone))
private val underTest by lazy {
KeyguardInteractor(
@@ -250,8 +250,8 @@
underTest.setAnimateDozingTransitions(true)
transitionState.value =
ObservableTransitionState.Transition(
- fromScene = SceneKey.Gone,
- toScene = SceneKey.Lockscreen,
+ fromScene = Scenes.Gone,
+ toScene = Scenes.Lockscreen,
progress = flowOf(0f),
isInitiatedByUserInput = false,
isUserInputOngoing = flowOf(false),
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/ui/viewmodel/AodToGoneTransitionViewModelTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/ui/viewmodel/AodToGoneTransitionViewModelTest.kt
index 4c972e9..a3371d3 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/ui/viewmodel/AodToGoneTransitionViewModelTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/ui/viewmodel/AodToGoneTransitionViewModelTest.kt
@@ -42,6 +42,25 @@
val underTest = kosmos.aodToGoneTransitionViewModel
@Test
+ fun lockscreenAlpha() =
+ testScope.runTest {
+ val viewState = ViewStateAccessor(alpha = { 0.5f })
+ val alpha by collectValues(underTest.lockscreenAlpha(viewState))
+
+ repository.sendTransitionSteps(
+ from = KeyguardState.AOD,
+ to = KeyguardState.GONE,
+ testScope
+ )
+
+ assertThat(alpha[0]).isEqualTo(0.5f)
+ // Fades out just prior to halfway
+ assertThat(alpha[1]).isEqualTo(0f)
+ // Must finish at 0
+ assertThat(alpha[2]).isEqualTo(0f)
+ }
+
+ @Test
fun deviceEntryParentViewHides() =
testScope.runTest {
val deviceEntryParentViewAlpha by collectValues(underTest.deviceEntryParentViewAlpha)
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/ui/viewmodel/DozingToGoneTransitionViewModelTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/ui/viewmodel/DozingToGoneTransitionViewModelTest.kt
index 7e937db..79671b8 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/ui/viewmodel/DozingToGoneTransitionViewModelTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/ui/viewmodel/DozingToGoneTransitionViewModelTest.kt
@@ -51,6 +51,25 @@
}
@Test
+ fun lockscreenAlpha() =
+ testScope.runTest {
+ val viewState = ViewStateAccessor(alpha = { 0.6f })
+ val alpha by collectValues(underTest.lockscreenAlpha(viewState))
+
+ keyguardTransitionRepository.sendTransitionSteps(
+ from = KeyguardState.DOZING,
+ to = KeyguardState.GONE,
+ testScope
+ )
+
+ assertThat(alpha[0]).isEqualTo(0.6f)
+ // Fades out just prior to halfway
+ assertThat(alpha[1]).isEqualTo(0f)
+ // Must finish at 0
+ assertThat(alpha[2]).isEqualTo(0f)
+ }
+
+ @Test
fun deviceEntryParentViewDisappear() =
testScope.runTest {
val values by collectValues(underTest.deviceEntryParentViewAlpha)
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardRootViewModelTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardRootViewModelTest.kt
index 503fd34..979d504 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardRootViewModelTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardRootViewModelTest.kt
@@ -22,12 +22,12 @@
import android.view.View
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
+import com.android.compose.animation.scene.ObservableTransitionState
import com.android.systemui.Flags as AConfigFlags
import com.android.systemui.Flags.FLAG_NEW_AOD_TRANSITION
import com.android.systemui.SysuiTestCase
import com.android.systemui.communal.data.repository.communalRepository
-import com.android.systemui.communal.shared.model.CommunalSceneKey
-import com.android.systemui.communal.shared.model.ObservableCommunalTransitionState
+import com.android.systemui.communal.shared.model.CommunalScenes
import com.android.systemui.coroutines.collectLastValue
import com.android.systemui.deviceentry.data.repository.fakeDeviceEntryRepository
import com.android.systemui.flags.Flags
@@ -262,7 +262,7 @@
// Hub transition state is idle with hub open.
communalRepository.setTransitionState(
- flowOf(ObservableCommunalTransitionState.Idle(CommunalSceneKey.Communal))
+ flowOf(ObservableTransitionState.Idle(CommunalScenes.Communal))
)
runCurrent()
@@ -328,4 +328,42 @@
shadeRepository.setQsExpansion(0.5f)
assertThat(alpha).isEqualTo(0f)
}
+
+ @Test
+ fun alpha_idleOnOccluded_isZero() =
+ testScope.runTest {
+ val alpha by collectLastValue(underTest.alpha(viewState))
+ assertThat(alpha).isEqualTo(1f)
+
+ // Go to OCCLUDED state
+ keyguardTransitionRepository.sendTransitionSteps(
+ from = KeyguardState.LOCKSCREEN,
+ to = KeyguardState.OCCLUDED,
+ testScope = testScope,
+ )
+ assertThat(alpha).isEqualTo(0f)
+
+ // Try pulling down shade and ensure the value doesn't change
+ shadeRepository.setQsExpansion(0.5f)
+ assertThat(alpha).isEqualTo(0f)
+ }
+
+ @Test
+ fun alpha_idleOnGone_isZero() =
+ testScope.runTest {
+ val alpha by collectLastValue(underTest.alpha(viewState))
+ assertThat(alpha).isEqualTo(1f)
+
+ // Go to GONE state
+ keyguardTransitionRepository.sendTransitionSteps(
+ from = KeyguardState.LOCKSCREEN,
+ to = KeyguardState.GONE,
+ testScope = testScope,
+ )
+ assertThat(alpha).isEqualTo(0f)
+
+ // Try pulling down shade and ensure the value doesn't change
+ shadeRepository.setQsExpansion(0.5f)
+ assertThat(alpha).isEqualTo(0f)
+ }
}
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/ui/viewmodel/LockscreenSceneViewModelTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/ui/viewmodel/LockscreenSceneViewModelTest.kt
index 3104842..9ff76be 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/ui/viewmodel/LockscreenSceneViewModelTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/ui/viewmodel/LockscreenSceneViewModelTest.kt
@@ -32,7 +32,7 @@
import com.android.systemui.deviceentry.domain.interactor.deviceEntryInteractor
import com.android.systemui.kosmos.testScope
import com.android.systemui.scene.domain.interactor.sceneInteractor
-import com.android.systemui.scene.shared.model.SceneKey
+import com.android.systemui.scene.shared.model.Scenes
import com.android.systemui.statusbar.notification.stack.ui.viewmodel.notificationsPlaceholderViewModel
import com.android.systemui.testKosmos
import com.android.systemui.util.mockito.mock
@@ -62,9 +62,9 @@
)
kosmos.fakeDeviceEntryRepository.setLockscreenEnabled(true)
kosmos.fakeDeviceEntryRepository.setUnlocked(true)
- sceneInteractor.changeScene(SceneKey.Lockscreen, "reason")
+ sceneInteractor.changeScene(Scenes.Lockscreen, "reason")
- assertThat(upTransitionSceneKey).isEqualTo(SceneKey.Gone)
+ assertThat(upTransitionSceneKey).isEqualTo(Scenes.Gone)
}
@Test
@@ -75,9 +75,9 @@
AuthenticationMethodModel.Pin
)
kosmos.fakeDeviceEntryRepository.setUnlocked(false)
- sceneInteractor.changeScene(SceneKey.Lockscreen, "reason")
+ sceneInteractor.changeScene(Scenes.Lockscreen, "reason")
- assertThat(upTransitionSceneKey).isEqualTo(SceneKey.Bouncer)
+ assertThat(upTransitionSceneKey).isEqualTo(Scenes.Bouncer)
}
@EnableFlags(FLAG_COMMUNAL_HUB)
@@ -89,7 +89,7 @@
kosmos.setCommunalAvailable(true)
runCurrent()
- assertThat(leftDestinationSceneKey).isEqualTo(SceneKey.Communal)
+ assertThat(leftDestinationSceneKey).isEqualTo(Scenes.Communal)
}
private fun createLockscreenSceneViewModel(): LockscreenSceneViewModel {
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/ui/viewmodel/QuickSettingsSceneViewModelTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/ui/viewmodel/QuickSettingsSceneViewModelTest.kt
index 1eb9adb..63f00c1 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/ui/viewmodel/QuickSettingsSceneViewModelTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/ui/viewmodel/QuickSettingsSceneViewModelTest.kt
@@ -18,6 +18,10 @@
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
+import com.android.compose.animation.scene.Back
+import com.android.compose.animation.scene.Swipe
+import com.android.compose.animation.scene.SwipeDirection
+import com.android.compose.animation.scene.UserActionResult
import com.android.systemui.SysuiTestCase
import com.android.systemui.coroutines.collectLastValue
import com.android.systemui.flags.FakeFeatureFlagsClassic
@@ -26,10 +30,7 @@
import com.android.systemui.qs.FooterActionsController
import com.android.systemui.qs.footer.ui.viewmodel.FooterActionsViewModel
import com.android.systemui.qs.ui.adapter.FakeQSSceneAdapter
-import com.android.systemui.scene.shared.model.Direction
-import com.android.systemui.scene.shared.model.SceneKey
-import com.android.systemui.scene.shared.model.UserAction
-import com.android.systemui.scene.shared.model.UserActionResult
+import com.android.systemui.scene.shared.model.Scenes
import com.android.systemui.shade.domain.interactor.privacyChipInteractor
import com.android.systemui.shade.domain.interactor.shadeHeaderClockInteractor
import com.android.systemui.shade.ui.viewmodel.ShadeHeaderViewModel
@@ -121,8 +122,8 @@
assertThat(destinations)
.isEqualTo(
mapOf(
- UserAction.Back to UserActionResult(SceneKey.Shade),
- UserAction.Swipe(Direction.UP) to UserActionResult(SceneKey.Shade),
+ Back to UserActionResult(Scenes.Shade),
+ Swipe(SwipeDirection.Up) to UserActionResult(Scenes.Shade),
)
)
}
@@ -136,7 +137,7 @@
assertThat(destinations)
.isEqualTo(
mapOf(
- UserAction.Back to UserActionResult(SceneKey.QuickSettings),
+ Back to UserActionResult(Scenes.QuickSettings),
)
)
}
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/scene/SceneFrameworkIntegrationTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/scene/SceneFrameworkIntegrationTest.kt
index 667f516..a2c4f4e 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/scene/SceneFrameworkIntegrationTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/scene/SceneFrameworkIntegrationTest.kt
@@ -22,6 +22,8 @@
import android.telephony.TelephonyManager
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
+import com.android.compose.animation.scene.ObservableTransitionState
+import com.android.compose.animation.scene.SceneKey
import com.android.internal.R
import com.android.internal.util.EmergencyAffordanceManager
import com.android.internal.util.emergencyAffordanceManager
@@ -61,8 +63,7 @@
import com.android.systemui.scene.domain.interactor.sceneInteractor
import com.android.systemui.scene.domain.startable.SceneContainerStartable
import com.android.systemui.scene.shared.flag.fakeSceneContainerFlags
-import com.android.systemui.scene.shared.model.ObservableTransitionState
-import com.android.systemui.scene.shared.model.SceneKey
+import com.android.systemui.scene.shared.model.Scenes
import com.android.systemui.scene.shared.model.fakeSceneDataSource
import com.android.systemui.scene.ui.viewmodel.SceneContainerViewModel
import com.android.systemui.settings.FakeDisplayTracker
@@ -287,19 +288,19 @@
}
@Test
- fun startsInLockscreenScene() = testScope.runTest { assertCurrentScene(SceneKey.Lockscreen) }
+ fun startsInLockscreenScene() = testScope.runTest { assertCurrentScene(Scenes.Lockscreen) }
@Test
fun clickLockButtonAndEnterCorrectPin_unlocksDevice() =
testScope.runTest {
- emulateUserDrivenTransition(SceneKey.Bouncer)
+ emulateUserDrivenTransition(Scenes.Bouncer)
fakeSceneDataSource.pause()
enterPin()
emulatePendingTransitionProgress(
expectedVisible = false,
)
- assertCurrentScene(SceneKey.Gone)
+ assertCurrentScene(Scenes.Gone)
}
@Test
@@ -307,7 +308,7 @@
testScope.runTest {
val upDestinationSceneKey by
collectLastValue(lockscreenSceneViewModel.upDestinationSceneKey)
- assertThat(upDestinationSceneKey).isEqualTo(SceneKey.Bouncer)
+ assertThat(upDestinationSceneKey).isEqualTo(Scenes.Bouncer)
emulateUserDrivenTransition(
to = upDestinationSceneKey,
)
@@ -317,7 +318,7 @@
emulatePendingTransitionProgress(
expectedVisible = false,
)
- assertCurrentScene(SceneKey.Gone)
+ assertCurrentScene(Scenes.Gone)
}
@Test
@@ -327,7 +328,7 @@
val upDestinationSceneKey by
collectLastValue(lockscreenSceneViewModel.upDestinationSceneKey)
- assertThat(upDestinationSceneKey).isEqualTo(SceneKey.Gone)
+ assertThat(upDestinationSceneKey).isEqualTo(Scenes.Gone)
emulateUserDrivenTransition(
to = upDestinationSceneKey,
)
@@ -338,13 +339,13 @@
testScope.runTest {
val upDestinationSceneKey by collectLastValue(shadeSceneViewModel.upDestinationSceneKey)
setAuthMethod(AuthenticationMethodModel.None, enableLockscreen = true)
- assertCurrentScene(SceneKey.Lockscreen)
+ assertCurrentScene(Scenes.Lockscreen)
// Emulate a user swipe to the shade scene.
- emulateUserDrivenTransition(to = SceneKey.Shade)
- assertCurrentScene(SceneKey.Shade)
+ emulateUserDrivenTransition(to = Scenes.Shade)
+ assertCurrentScene(Scenes.Shade)
- assertThat(upDestinationSceneKey).isEqualTo(SceneKey.Lockscreen)
+ assertThat(upDestinationSceneKey).isEqualTo(Scenes.Lockscreen)
emulateUserDrivenTransition(
to = upDestinationSceneKey,
)
@@ -356,17 +357,17 @@
val upDestinationSceneKey by collectLastValue(shadeSceneViewModel.upDestinationSceneKey)
setAuthMethod(AuthenticationMethodModel.None, enableLockscreen = true)
assertThat(deviceEntryInteractor.canSwipeToEnter.value).isTrue()
- assertCurrentScene(SceneKey.Lockscreen)
+ assertCurrentScene(Scenes.Lockscreen)
// Emulate a user swipe to dismiss the lockscreen.
- emulateUserDrivenTransition(to = SceneKey.Gone)
- assertCurrentScene(SceneKey.Gone)
+ emulateUserDrivenTransition(to = Scenes.Gone)
+ assertCurrentScene(Scenes.Gone)
// Emulate a user swipe to the shade scene.
- emulateUserDrivenTransition(to = SceneKey.Shade)
- assertCurrentScene(SceneKey.Shade)
+ emulateUserDrivenTransition(to = Scenes.Shade)
+ assertCurrentScene(Scenes.Shade)
- assertThat(upDestinationSceneKey).isEqualTo(SceneKey.Gone)
+ assertThat(upDestinationSceneKey).isEqualTo(Scenes.Gone)
emulateUserDrivenTransition(
to = upDestinationSceneKey,
)
@@ -377,10 +378,10 @@
testScope.runTest {
setAuthMethod(AuthenticationMethodModel.None, enableLockscreen = false)
putDeviceToSleep(instantlyLockDevice = false)
- assertCurrentScene(SceneKey.Lockscreen)
+ assertCurrentScene(Scenes.Lockscreen)
wakeUpDevice()
- assertCurrentScene(SceneKey.Gone)
+ assertCurrentScene(Scenes.Gone)
}
@Test
@@ -388,45 +389,45 @@
testScope.runTest {
setAuthMethod(AuthenticationMethodModel.None, enableLockscreen = true)
putDeviceToSleep(instantlyLockDevice = false)
- assertCurrentScene(SceneKey.Lockscreen)
+ assertCurrentScene(Scenes.Lockscreen)
wakeUpDevice()
- assertCurrentScene(SceneKey.Lockscreen)
+ assertCurrentScene(Scenes.Lockscreen)
}
@Test
fun deviceGoesToSleep_switchesToLockscreen() =
testScope.runTest {
unlockDevice()
- assertCurrentScene(SceneKey.Gone)
+ assertCurrentScene(Scenes.Gone)
putDeviceToSleep()
- assertCurrentScene(SceneKey.Lockscreen)
+ assertCurrentScene(Scenes.Lockscreen)
}
@Test
fun deviceGoesToSleep_wakeUp_unlock() =
testScope.runTest {
unlockDevice()
- assertCurrentScene(SceneKey.Gone)
+ assertCurrentScene(Scenes.Gone)
putDeviceToSleep()
- assertCurrentScene(SceneKey.Lockscreen)
+ assertCurrentScene(Scenes.Lockscreen)
wakeUpDevice()
- assertCurrentScene(SceneKey.Lockscreen)
+ assertCurrentScene(Scenes.Lockscreen)
unlockDevice()
- assertCurrentScene(SceneKey.Gone)
+ assertCurrentScene(Scenes.Gone)
}
@Test
fun deviceWakesUpWhileUnlocked_dismissesLockscreen() =
testScope.runTest {
unlockDevice()
- assertCurrentScene(SceneKey.Gone)
+ assertCurrentScene(Scenes.Gone)
putDeviceToSleep(instantlyLockDevice = false)
- assertCurrentScene(SceneKey.Lockscreen)
+ assertCurrentScene(Scenes.Lockscreen)
wakeUpDevice()
- assertCurrentScene(SceneKey.Gone)
+ assertCurrentScene(Scenes.Gone)
}
@Test
@@ -435,20 +436,20 @@
unlockDevice()
val upDestinationSceneKey by
collectLastValue(lockscreenSceneViewModel.upDestinationSceneKey)
- assertThat(upDestinationSceneKey).isEqualTo(SceneKey.Gone)
+ assertThat(upDestinationSceneKey).isEqualTo(Scenes.Gone)
}
@Test
fun deviceGoesToSleep_withLockTimeout_staysOnLockscreen() =
testScope.runTest {
unlockDevice()
- assertCurrentScene(SceneKey.Gone)
+ assertCurrentScene(Scenes.Gone)
putDeviceToSleep(instantlyLockDevice = false)
- assertCurrentScene(SceneKey.Lockscreen)
+ assertCurrentScene(Scenes.Lockscreen)
// Pretend like the timeout elapsed and now lock the device.
lockDevice()
- assertCurrentScene(SceneKey.Lockscreen)
+ assertCurrentScene(Scenes.Lockscreen)
}
@Test
@@ -457,7 +458,7 @@
setAuthMethod(AuthenticationMethodModel.Password)
val upDestinationSceneKey by
collectLastValue(lockscreenSceneViewModel.upDestinationSceneKey)
- assertThat(upDestinationSceneKey).isEqualTo(SceneKey.Bouncer)
+ assertThat(upDestinationSceneKey).isEqualTo(Scenes.Bouncer)
emulateUserDrivenTransition(
to = upDestinationSceneKey,
)
@@ -466,7 +467,7 @@
dismissIme()
emulatePendingTransitionProgress()
- assertCurrentScene(SceneKey.Lockscreen)
+ assertCurrentScene(Scenes.Lockscreen)
}
@Test
@@ -475,7 +476,7 @@
setAuthMethod(AuthenticationMethodModel.Password)
val upDestinationSceneKey by
collectLastValue(lockscreenSceneViewModel.upDestinationSceneKey)
- assertThat(upDestinationSceneKey).isEqualTo(SceneKey.Bouncer)
+ assertThat(upDestinationSceneKey).isEqualTo(Scenes.Bouncer)
emulateUserDrivenTransition(to = upDestinationSceneKey)
val bouncerActionButton by collectLastValue(bouncerViewModel.actionButton)
@@ -495,7 +496,7 @@
startPhoneCall()
val upDestinationSceneKey by
collectLastValue(lockscreenSceneViewModel.upDestinationSceneKey)
- assertThat(upDestinationSceneKey).isEqualTo(SceneKey.Bouncer)
+ assertThat(upDestinationSceneKey).isEqualTo(Scenes.Bouncer)
emulateUserDrivenTransition(to = upDestinationSceneKey)
val bouncerActionButton by collectLastValue(bouncerViewModel.actionButton)
@@ -513,7 +514,7 @@
testScope.runTest {
setAuthMethod(AuthenticationMethodModel.None)
introduceLockedSim()
- assertCurrentScene(SceneKey.Bouncer)
+ assertCurrentScene(Scenes.Bouncer)
}
@Test
@@ -523,7 +524,7 @@
introduceLockedSim()
emulatePendingTransitionProgress(expectedVisible = true)
enterSimPin(authMethodAfterSimUnlock = AuthenticationMethodModel.None)
- assertCurrentScene(SceneKey.Gone)
+ assertCurrentScene(Scenes.Gone)
}
@Test
@@ -533,7 +534,7 @@
introduceLockedSim()
emulatePendingTransitionProgress(expectedVisible = true)
enterSimPin(authMethodAfterSimUnlock = AuthenticationMethodModel.Pin)
- assertCurrentScene(SceneKey.Lockscreen)
+ assertCurrentScene(Scenes.Lockscreen)
}
@Test
@@ -657,7 +658,7 @@
assertThat(sceneContainerViewModel.currentScene.value).isEqualTo(to)
bouncerSceneJob =
- if (to == SceneKey.Bouncer) {
+ if (to == Scenes.Bouncer) {
testScope.backgroundScope.launch {
bouncerViewModel.authMethodViewModel.collect {
// Do nothing. Need this to turn this otherwise cold flow, hot.
@@ -688,7 +689,7 @@
sceneInteractor.changeScene(to, "reason")
emulatePendingTransitionProgress(
- expectedVisible = to != SceneKey.Gone,
+ expectedVisible = to != Scenes.Gone,
)
}
@@ -715,7 +716,7 @@
.that(deviceEntryInteractor.isUnlocked.value)
.isFalse()
- emulateUserDrivenTransition(SceneKey.Bouncer)
+ emulateUserDrivenTransition(Scenes.Bouncer)
fakeSceneDataSource.pause()
enterPin()
// This repository state is not changed by the AuthInteractor, it relies on
@@ -729,7 +730,7 @@
/**
* Enters the correct PIN in the bouncer UI.
*
- * Asserts that the current scene is [SceneKey.Bouncer] and that the current bouncer UI is a PIN
+ * Asserts that the current scene is [Scenes.Bouncer] and that the current bouncer UI is a PIN
* before proceeding.
*
* Does not assert that the device is locked or unlocked.
@@ -737,7 +738,7 @@
private fun TestScope.enterPin() {
assertWithMessage("Cannot enter PIN when not on the Bouncer scene!")
.that(getCurrentSceneInUi())
- .isEqualTo(SceneKey.Bouncer)
+ .isEqualTo(Scenes.Bouncer)
val authMethodViewModel by collectLastValue(bouncerViewModel.authMethodViewModel)
assertWithMessage("Cannot enter PIN when not using a PIN authentication method!")
.that(authMethodViewModel)
@@ -754,7 +755,7 @@
/**
* Enters the correct PIN in the sim bouncer UI.
*
- * Asserts that the current scene is [SceneKey.Bouncer] and that the current bouncer UI is a PIN
+ * Asserts that the current scene is [Scenes.Bouncer] and that the current bouncer UI is a PIN
* before proceeding.
*
* Does not assert that the device is locked or unlocked.
@@ -764,7 +765,7 @@
) {
assertWithMessage("Cannot enter PIN when not on the Bouncer scene!")
.that(getCurrentSceneInUi())
- .isEqualTo(SceneKey.Bouncer)
+ .isEqualTo(Scenes.Bouncer)
val authMethodViewModel by collectLastValue(bouncerViewModel.authMethodViewModel)
assertWithMessage("Cannot enter PIN when not using a PIN authentication method!")
.that(authMethodViewModel)
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/scene/data/repository/SceneContainerRepositoryTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/scene/data/repository/SceneContainerRepositoryTest.kt
index 1da3bc1..3d66192 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/scene/data/repository/SceneContainerRepositoryTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/scene/data/repository/SceneContainerRepositoryTest.kt
@@ -20,14 +20,14 @@
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
+import com.android.compose.animation.scene.ObservableTransitionState
import com.android.systemui.SysuiTestCase
import com.android.systemui.coroutines.collectLastValue
import com.android.systemui.kosmos.testScope
import com.android.systemui.scene.sceneContainerConfig
import com.android.systemui.scene.sceneKeys
import com.android.systemui.scene.shared.flag.fakeSceneContainerFlags
-import com.android.systemui.scene.shared.model.ObservableTransitionState
-import com.android.systemui.scene.shared.model.SceneKey
+import com.android.systemui.scene.shared.model.Scenes
import com.android.systemui.testKosmos
import com.google.common.truth.Truth.assertThat
import kotlinx.coroutines.ExperimentalCoroutinesApi
@@ -51,12 +51,12 @@
assertThat(underTest.allSceneKeys())
.isEqualTo(
listOf(
- SceneKey.QuickSettings,
- SceneKey.Shade,
- SceneKey.Lockscreen,
- SceneKey.Bouncer,
- SceneKey.Gone,
- SceneKey.Communal,
+ Scenes.QuickSettings,
+ Scenes.Shade,
+ Scenes.Lockscreen,
+ Scenes.Bouncer,
+ Scenes.Gone,
+ Scenes.Communal,
)
)
}
@@ -66,17 +66,17 @@
testScope.runTest {
val underTest = kosmos.sceneContainerRepository
val currentScene by collectLastValue(underTest.currentScene)
- assertThat(currentScene).isEqualTo(SceneKey.Lockscreen)
+ assertThat(currentScene).isEqualTo(Scenes.Lockscreen)
- underTest.changeScene(SceneKey.Shade)
- assertThat(currentScene).isEqualTo(SceneKey.Shade)
+ underTest.changeScene(Scenes.Shade)
+ assertThat(currentScene).isEqualTo(Scenes.Shade)
}
@Test(expected = IllegalStateException::class)
fun changeScene_noSuchSceneInContainer_throws() {
- kosmos.sceneKeys = listOf(SceneKey.QuickSettings, SceneKey.Lockscreen)
+ kosmos.sceneKeys = listOf(Scenes.QuickSettings, Scenes.Lockscreen)
val underTest = kosmos.sceneContainerRepository
- underTest.changeScene(SceneKey.Shade)
+ underTest.changeScene(Scenes.Shade)
}
@Test
@@ -111,7 +111,7 @@
val underTest = kosmos.sceneContainerRepository
val transitionState =
MutableStateFlow<ObservableTransitionState>(
- ObservableTransitionState.Idle(SceneKey.Lockscreen)
+ ObservableTransitionState.Idle(Scenes.Lockscreen)
)
underTest.setTransitionState(transitionState)
val reflectedTransitionState by collectLastValue(underTest.transitionState)
@@ -120,8 +120,8 @@
val progress = MutableStateFlow(1f)
transitionState.value =
ObservableTransitionState.Transition(
- fromScene = SceneKey.Lockscreen,
- toScene = SceneKey.Shade,
+ fromScene = Scenes.Lockscreen,
+ toScene = Scenes.Shade,
progress = progress,
isInitiatedByUserInput = false,
isUserInputOngoing = flowOf(false),
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/scene/domain/interactor/PanelExpansionInteractorTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/scene/domain/interactor/PanelExpansionInteractorTest.kt
index 9b0adb1..6b5997f 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/scene/domain/interactor/PanelExpansionInteractorTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/scene/domain/interactor/PanelExpansionInteractorTest.kt
@@ -21,6 +21,8 @@
import android.platform.test.annotations.DisableFlags
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
+import com.android.compose.animation.scene.ObservableTransitionState
+import com.android.compose.animation.scene.SceneKey
import com.android.systemui.Flags.FLAG_SCENE_CONTAINER
import com.android.systemui.SysuiTestCase
import com.android.systemui.coroutines.collectLastValue
@@ -28,8 +30,7 @@
import com.android.systemui.deviceentry.domain.interactor.deviceUnlockedInteractor
import com.android.systemui.flags.EnableSceneContainer
import com.android.systemui.kosmos.testScope
-import com.android.systemui.scene.shared.model.ObservableTransitionState
-import com.android.systemui.scene.shared.model.SceneKey
+import com.android.systemui.scene.shared.model.Scenes
import com.android.systemui.scene.shared.model.fakeSceneDataSource
import com.android.systemui.shade.data.repository.fakeShadeRepository
import com.android.systemui.statusbar.notification.stack.ui.viewmodel.panelExpansionInteractor
@@ -56,7 +57,7 @@
private val sceneInteractor = kosmos.sceneInteractor
private val transitionState =
MutableStateFlow<ObservableTransitionState>(
- ObservableTransitionState.Idle(SceneKey.Lockscreen)
+ ObservableTransitionState.Idle(Scenes.Lockscreen)
)
private val fakeSceneDataSource = kosmos.fakeSceneDataSource
private val fakeShadeRepository = kosmos.fakeShadeRepository
@@ -76,19 +77,19 @@
setUnlocked(false)
val panelExpansion by collectLastValue(underTest.legacyPanelExpansion)
- changeScene(SceneKey.Lockscreen) { assertThat(panelExpansion).isEqualTo(1f) }
+ changeScene(Scenes.Lockscreen) { assertThat(panelExpansion).isEqualTo(1f) }
assertThat(panelExpansion).isEqualTo(1f)
- changeScene(SceneKey.Bouncer) { assertThat(panelExpansion).isEqualTo(1f) }
+ changeScene(Scenes.Bouncer) { assertThat(panelExpansion).isEqualTo(1f) }
assertThat(panelExpansion).isEqualTo(1f)
- changeScene(SceneKey.Shade) { assertThat(panelExpansion).isEqualTo(1f) }
+ changeScene(Scenes.Shade) { assertThat(panelExpansion).isEqualTo(1f) }
assertThat(panelExpansion).isEqualTo(1f)
- changeScene(SceneKey.QuickSettings) { assertThat(panelExpansion).isEqualTo(1f) }
+ changeScene(Scenes.QuickSettings) { assertThat(panelExpansion).isEqualTo(1f) }
assertThat(panelExpansion).isEqualTo(1f)
- changeScene(SceneKey.Communal) { assertThat(panelExpansion).isEqualTo(1f) }
+ changeScene(Scenes.Communal) { assertThat(panelExpansion).isEqualTo(1f) }
assertThat(panelExpansion).isEqualTo(1f)
}
@@ -100,21 +101,19 @@
setUnlocked(true)
val panelExpansion by collectLastValue(underTest.legacyPanelExpansion)
- changeScene(SceneKey.Gone) { assertThat(panelExpansion).isEqualTo(0f) }
+ changeScene(Scenes.Gone) { assertThat(panelExpansion).isEqualTo(0f) }
assertThat(panelExpansion).isEqualTo(0f)
- changeScene(SceneKey.Shade) { progress ->
- assertThat(panelExpansion).isEqualTo(progress)
- }
+ changeScene(Scenes.Shade) { progress -> assertThat(panelExpansion).isEqualTo(progress) }
assertThat(panelExpansion).isEqualTo(1f)
- changeScene(SceneKey.QuickSettings) {
+ changeScene(Scenes.QuickSettings) {
// Shade's already expanded, so moving to QS should also be 1f.
assertThat(panelExpansion).isEqualTo(1f)
}
assertThat(panelExpansion).isEqualTo(1f)
- changeScene(SceneKey.Communal) { assertThat(panelExpansion).isEqualTo(1f) }
+ changeScene(Scenes.Communal) { assertThat(panelExpansion).isEqualTo(1f) }
assertThat(panelExpansion).isEqualTo(1f)
}
@@ -128,19 +127,19 @@
setUnlocked(false)
val panelExpansion by collectLastValue(underTest.legacyPanelExpansion)
- changeScene(SceneKey.Lockscreen)
+ changeScene(Scenes.Lockscreen)
assertThat(panelExpansion).isEqualTo(leet)
- changeScene(SceneKey.Bouncer)
+ changeScene(Scenes.Bouncer)
assertThat(panelExpansion).isEqualTo(leet)
- changeScene(SceneKey.Shade)
+ changeScene(Scenes.Shade)
assertThat(panelExpansion).isEqualTo(leet)
- changeScene(SceneKey.QuickSettings)
+ changeScene(Scenes.QuickSettings)
assertThat(panelExpansion).isEqualTo(leet)
- changeScene(SceneKey.Communal)
+ changeScene(Scenes.Communal)
assertThat(panelExpansion).isEqualTo(leet)
}
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/scene/domain/interactor/SceneInteractorTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/scene/domain/interactor/SceneInteractorTest.kt
index db94c39..f645f1c 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/scene/domain/interactor/SceneInteractorTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/scene/domain/interactor/SceneInteractorTest.kt
@@ -20,6 +20,7 @@
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
+import com.android.compose.animation.scene.ObservableTransitionState
import com.android.systemui.SysuiTestCase
import com.android.systemui.coroutines.collectLastValue
import com.android.systemui.deviceentry.data.repository.fakeDeviceEntryRepository
@@ -28,8 +29,7 @@
import com.android.systemui.scene.sceneContainerConfig
import com.android.systemui.scene.sceneKeys
import com.android.systemui.scene.shared.flag.fakeSceneContainerFlags
-import com.android.systemui.scene.shared.model.ObservableTransitionState
-import com.android.systemui.scene.shared.model.SceneKey
+import com.android.systemui.scene.shared.model.Scenes
import com.android.systemui.scene.shared.model.fakeSceneDataSource
import com.android.systemui.testKosmos
import com.google.common.truth.Truth.assertThat
@@ -67,23 +67,23 @@
fun changeScene() =
testScope.runTest {
val currentScene by collectLastValue(underTest.currentScene)
- assertThat(currentScene).isEqualTo(SceneKey.Lockscreen)
+ assertThat(currentScene).isEqualTo(Scenes.Lockscreen)
- underTest.changeScene(SceneKey.Shade, "reason")
- assertThat(currentScene).isEqualTo(SceneKey.Shade)
+ underTest.changeScene(Scenes.Shade, "reason")
+ assertThat(currentScene).isEqualTo(Scenes.Shade)
}
@Test
fun changeScene_toGoneWhenUnl_doesNotThrow() =
testScope.runTest {
val currentScene by collectLastValue(underTest.currentScene)
- assertThat(currentScene).isEqualTo(SceneKey.Lockscreen)
+ assertThat(currentScene).isEqualTo(Scenes.Lockscreen)
kosmos.fakeDeviceEntryRepository.setUnlocked(true)
runCurrent()
- underTest.changeScene(SceneKey.Gone, "reason")
- assertThat(currentScene).isEqualTo(SceneKey.Gone)
+ underTest.changeScene(Scenes.Gone, "reason")
+ assertThat(currentScene).isEqualTo(Scenes.Gone)
}
@Test(expected = IllegalStateException::class)
@@ -91,18 +91,18 @@
testScope.runTest {
kosmos.fakeDeviceEntryRepository.setUnlocked(false)
- underTest.changeScene(SceneKey.Gone, "reason")
+ underTest.changeScene(Scenes.Gone, "reason")
}
@Test
fun sceneChanged_inDataSource() =
testScope.runTest {
val currentScene by collectLastValue(underTest.currentScene)
- assertThat(currentScene).isEqualTo(SceneKey.Lockscreen)
+ assertThat(currentScene).isEqualTo(Scenes.Lockscreen)
- fakeSceneDataSource.changeScene(SceneKey.Shade)
+ fakeSceneDataSource.changeScene(Scenes.Shade)
- assertThat(currentScene).isEqualTo(SceneKey.Shade)
+ assertThat(currentScene).isEqualTo(Scenes.Shade)
}
@Test
@@ -111,7 +111,7 @@
val underTest = kosmos.sceneContainerRepository
val transitionState =
MutableStateFlow<ObservableTransitionState>(
- ObservableTransitionState.Idle(SceneKey.Lockscreen)
+ ObservableTransitionState.Idle(Scenes.Lockscreen)
)
underTest.setTransitionState(transitionState)
val reflectedTransitionState by collectLastValue(underTest.transitionState)
@@ -120,8 +120,8 @@
val progress = MutableStateFlow(1f)
transitionState.value =
ObservableTransitionState.Transition(
- fromScene = SceneKey.Lockscreen,
- toScene = SceneKey.Shade,
+ fromScene = Scenes.Lockscreen,
+ toScene = Scenes.Shade,
progress = progress,
isInitiatedByUserInput = false,
isUserInputOngoing = flowOf(false),
@@ -153,27 +153,27 @@
val transitionTo by collectLastValue(underTest.transitioningTo)
assertThat(transitionTo).isNull()
- underTest.changeScene(SceneKey.Shade, "reason")
+ underTest.changeScene(Scenes.Shade, "reason")
assertThat(transitionTo).isNull()
val progress = MutableStateFlow(0f)
transitionState.value =
ObservableTransitionState.Transition(
fromScene = underTest.currentScene.value,
- toScene = SceneKey.Shade,
+ toScene = Scenes.Shade,
progress = progress,
isInitiatedByUserInput = false,
isUserInputOngoing = flowOf(false),
)
- assertThat(transitionTo).isEqualTo(SceneKey.Shade)
+ assertThat(transitionTo).isEqualTo(Scenes.Shade)
progress.value = 0.5f
- assertThat(transitionTo).isEqualTo(SceneKey.Shade)
+ assertThat(transitionTo).isEqualTo(Scenes.Shade)
progress.value = 1f
- assertThat(transitionTo).isEqualTo(SceneKey.Shade)
+ assertThat(transitionTo).isEqualTo(Scenes.Shade)
- transitionState.value = ObservableTransitionState.Idle(SceneKey.Shade)
+ transitionState.value = ObservableTransitionState.Idle(Scenes.Shade)
assertThat(transitionTo).isNull()
}
@@ -182,7 +182,7 @@
testScope.runTest {
val transitionState =
MutableStateFlow<ObservableTransitionState>(
- ObservableTransitionState.Idle(SceneKey.Shade)
+ ObservableTransitionState.Idle(Scenes.Shade)
)
val isTransitionUserInputOngoing by
collectLastValue(underTest.isTransitionUserInputOngoing)
@@ -197,8 +197,8 @@
val transitionState =
MutableStateFlow<ObservableTransitionState>(
ObservableTransitionState.Transition(
- fromScene = SceneKey.Shade,
- toScene = SceneKey.Lockscreen,
+ fromScene = Scenes.Shade,
+ toScene = Scenes.Lockscreen,
progress = flowOf(0.5f),
isInitiatedByUserInput = true,
isUserInputOngoing = flowOf(true),
@@ -217,8 +217,8 @@
val transitionState =
MutableStateFlow<ObservableTransitionState>(
ObservableTransitionState.Transition(
- fromScene = SceneKey.Shade,
- toScene = SceneKey.Lockscreen,
+ fromScene = Scenes.Shade,
+ toScene = Scenes.Lockscreen,
progress = flowOf(0.5f),
isInitiatedByUserInput = true,
isUserInputOngoing = flowOf(true),
@@ -232,8 +232,8 @@
transitionState.value =
ObservableTransitionState.Transition(
- fromScene = SceneKey.Shade,
- toScene = SceneKey.Lockscreen,
+ fromScene = Scenes.Shade,
+ toScene = Scenes.Lockscreen,
progress = flowOf(0.6f),
isInitiatedByUserInput = true,
isUserInputOngoing = flowOf(false),
@@ -248,8 +248,8 @@
val transitionState =
MutableStateFlow<ObservableTransitionState>(
ObservableTransitionState.Transition(
- fromScene = SceneKey.Shade,
- toScene = SceneKey.Lockscreen,
+ fromScene = Scenes.Shade,
+ toScene = Scenes.Lockscreen,
progress = flowOf(0.5f),
isInitiatedByUserInput = true,
isUserInputOngoing = flowOf(true),
@@ -261,7 +261,7 @@
assertThat(isTransitionUserInputOngoing).isTrue()
- transitionState.value = ObservableTransitionState.Idle(scene = SceneKey.Lockscreen)
+ transitionState.value = ObservableTransitionState.Idle(scene = Scenes.Lockscreen)
assertThat(isTransitionUserInputOngoing).isFalse()
}
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/scene/domain/startable/SceneContainerStartableTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/scene/domain/startable/SceneContainerStartableTest.kt
index 4e16236..cc66f8b 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/scene/domain/startable/SceneContainerStartableTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/scene/domain/startable/SceneContainerStartableTest.kt
@@ -24,6 +24,8 @@
import android.view.Display
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
+import com.android.compose.animation.scene.ObservableTransitionState
+import com.android.compose.animation.scene.SceneKey
import com.android.systemui.Flags as AconfigFlags
import com.android.systemui.SysuiTestCase
import com.android.systemui.authentication.data.repository.fakeAuthenticationRepository
@@ -46,8 +48,7 @@
import com.android.systemui.power.domain.interactor.PowerInteractorFactory
import com.android.systemui.scene.domain.interactor.sceneInteractor
import com.android.systemui.scene.shared.flag.fakeSceneContainerFlags
-import com.android.systemui.scene.shared.model.ObservableTransitionState
-import com.android.systemui.scene.shared.model.SceneKey
+import com.android.systemui.scene.shared.model.Scenes
import com.android.systemui.scene.shared.model.fakeSceneDataSource
import com.android.systemui.statusbar.NotificationShadeWindowController
import com.android.systemui.statusbar.notification.stack.data.repository.headsUpNotificationRepository
@@ -136,42 +137,42 @@
val transitionStateFlow =
prepareState(
isDeviceUnlocked = true,
- initialSceneKey = SceneKey.Gone,
+ initialSceneKey = Scenes.Gone,
)
- assertThat(currentDesiredSceneKey).isEqualTo(SceneKey.Gone)
+ assertThat(currentDesiredSceneKey).isEqualTo(Scenes.Gone)
assertThat(isVisible).isTrue()
underTest.start()
assertThat(isVisible).isFalse()
fakeSceneDataSource.pause()
- sceneInteractor.changeScene(SceneKey.Shade, "reason")
+ sceneInteractor.changeScene(Scenes.Shade, "reason")
transitionStateFlow.value =
ObservableTransitionState.Transition(
- fromScene = SceneKey.Gone,
- toScene = SceneKey.Shade,
+ fromScene = Scenes.Gone,
+ toScene = Scenes.Shade,
progress = flowOf(0.5f),
isInitiatedByUserInput = false,
isUserInputOngoing = flowOf(false),
)
assertThat(isVisible).isTrue()
- fakeSceneDataSource.unpause(expectedScene = SceneKey.Shade)
- transitionStateFlow.value = ObservableTransitionState.Idle(SceneKey.Shade)
+ fakeSceneDataSource.unpause(expectedScene = Scenes.Shade)
+ transitionStateFlow.value = ObservableTransitionState.Idle(Scenes.Shade)
assertThat(isVisible).isTrue()
fakeSceneDataSource.pause()
- sceneInteractor.changeScene(SceneKey.Gone, "reason")
+ sceneInteractor.changeScene(Scenes.Gone, "reason")
transitionStateFlow.value =
ObservableTransitionState.Transition(
- fromScene = SceneKey.Shade,
- toScene = SceneKey.Gone,
+ fromScene = Scenes.Shade,
+ toScene = Scenes.Gone,
progress = flowOf(0.5f),
isInitiatedByUserInput = false,
isUserInputOngoing = flowOf(false),
)
assertThat(isVisible).isTrue()
- fakeSceneDataSource.unpause(expectedScene = SceneKey.Gone)
- transitionStateFlow.value = ObservableTransitionState.Idle(SceneKey.Gone)
+ fakeSceneDataSource.unpause(expectedScene = Scenes.Gone)
+ transitionStateFlow.value = ObservableTransitionState.Idle(Scenes.Gone)
assertThat(isVisible).isFalse()
kosmos.headsUpNotificationRepository.hasPinnedHeadsUp.value = true
@@ -187,7 +188,7 @@
val isVisible by collectLastValue(sceneInteractor.isVisible)
prepareState(
isDeviceUnlocked = true,
- initialSceneKey = SceneKey.Lockscreen,
+ initialSceneKey = Scenes.Lockscreen,
isDeviceProvisioned = false,
isFrpActive = true,
)
@@ -214,7 +215,7 @@
underTest.start()
runCurrent()
- assertThat(currentSceneKey).isEqualTo(SceneKey.Lockscreen)
+ assertThat(currentSceneKey).isEqualTo(Scenes.Lockscreen)
}
@Test
@@ -223,14 +224,14 @@
val currentSceneKey by collectLastValue(sceneInteractor.currentScene)
prepareState(
isDeviceUnlocked = true,
- initialSceneKey = SceneKey.Gone,
+ initialSceneKey = Scenes.Gone,
)
- assertThat(currentSceneKey).isEqualTo(SceneKey.Gone)
+ assertThat(currentSceneKey).isEqualTo(Scenes.Gone)
underTest.start()
kosmos.fakeDeviceEntryRepository.setUnlocked(false)
- assertThat(currentSceneKey).isEqualTo(SceneKey.Lockscreen)
+ assertThat(currentSceneKey).isEqualTo(Scenes.Lockscreen)
}
@Test
@@ -239,14 +240,14 @@
val currentSceneKey by collectLastValue(sceneInteractor.currentScene)
prepareState(
isDeviceUnlocked = false,
- initialSceneKey = SceneKey.Bouncer,
+ initialSceneKey = Scenes.Bouncer,
)
- assertThat(currentSceneKey).isEqualTo(SceneKey.Bouncer)
+ assertThat(currentSceneKey).isEqualTo(Scenes.Bouncer)
underTest.start()
kosmos.fakeDeviceEntryRepository.setUnlocked(true)
- assertThat(currentSceneKey).isEqualTo(SceneKey.Gone)
+ assertThat(currentSceneKey).isEqualTo(Scenes.Gone)
}
@Test
@@ -255,14 +256,14 @@
val currentSceneKey by collectLastValue(sceneInteractor.currentScene)
prepareState(
isBypassEnabled = true,
- initialSceneKey = SceneKey.Lockscreen,
+ initialSceneKey = Scenes.Lockscreen,
)
- assertThat(currentSceneKey).isEqualTo(SceneKey.Lockscreen)
+ assertThat(currentSceneKey).isEqualTo(Scenes.Lockscreen)
underTest.start()
kosmos.fakeDeviceEntryRepository.setUnlocked(true)
- assertThat(currentSceneKey).isEqualTo(SceneKey.Gone)
+ assertThat(currentSceneKey).isEqualTo(Scenes.Gone)
}
@Test
@@ -271,16 +272,16 @@
val currentSceneKey by collectLastValue(sceneInteractor.currentScene)
prepareState(
isBypassEnabled = false,
- initialSceneKey = SceneKey.Lockscreen,
+ initialSceneKey = Scenes.Lockscreen,
)
- assertThat(currentSceneKey).isEqualTo(SceneKey.Lockscreen)
+ assertThat(currentSceneKey).isEqualTo(Scenes.Lockscreen)
underTest.start()
// Authenticate using a passive auth method like face auth while bypass is disabled.
faceAuthRepository.isAuthenticated.value = true
kosmos.fakeDeviceEntryRepository.setUnlocked(true)
- assertThat(currentSceneKey).isEqualTo(SceneKey.Lockscreen)
+ assertThat(currentSceneKey).isEqualTo(Scenes.Lockscreen)
}
@Test
@@ -291,19 +292,19 @@
prepareState(
isBypassEnabled = true,
authenticationMethod = AuthenticationMethodModel.Pin,
- initialSceneKey = SceneKey.Lockscreen,
+ initialSceneKey = Scenes.Lockscreen,
)
underTest.start()
runCurrent()
- sceneInteractor.changeScene(SceneKey.Shade, "switch to shade")
- transitionStateFlowValue.value = ObservableTransitionState.Idle(SceneKey.Shade)
- assertThat(currentSceneKey).isEqualTo(SceneKey.Shade)
+ sceneInteractor.changeScene(Scenes.Shade, "switch to shade")
+ transitionStateFlowValue.value = ObservableTransitionState.Idle(Scenes.Shade)
+ assertThat(currentSceneKey).isEqualTo(Scenes.Shade)
kosmos.fakeDeviceEntryRepository.setUnlocked(true)
runCurrent()
- assertThat(currentSceneKey).isEqualTo(SceneKey.Shade)
+ assertThat(currentSceneKey).isEqualTo(Scenes.Shade)
}
@Test
@@ -312,16 +313,16 @@
val currentSceneKey by collectLastValue(sceneInteractor.currentScene)
prepareState(
isBypassEnabled = false,
- initialSceneKey = SceneKey.Bouncer,
+ initialSceneKey = Scenes.Bouncer,
)
- assertThat(currentSceneKey).isEqualTo(SceneKey.Bouncer)
+ assertThat(currentSceneKey).isEqualTo(Scenes.Bouncer)
underTest.start()
// Authenticate using a passive auth method like face auth while bypass is disabled.
faceAuthRepository.isAuthenticated.value = true
kosmos.fakeDeviceEntryRepository.setUnlocked(true)
- assertThat(currentSceneKey).isEqualTo(SceneKey.Gone)
+ assertThat(currentSceneKey).isEqualTo(Scenes.Gone)
}
@Test
@@ -330,13 +331,13 @@
val currentSceneKey by collectLastValue(sceneInteractor.currentScene)
prepareState(
isDeviceUnlocked = false,
- initialSceneKey = SceneKey.Shade,
+ initialSceneKey = Scenes.Shade,
)
- assertThat(currentSceneKey).isEqualTo(SceneKey.Shade)
+ assertThat(currentSceneKey).isEqualTo(Scenes.Shade)
underTest.start()
powerInteractor.setAsleepForTest()
- assertThat(currentSceneKey).isEqualTo(SceneKey.Lockscreen)
+ assertThat(currentSceneKey).isEqualTo(Scenes.Lockscreen)
}
@Test
@@ -348,14 +349,14 @@
clearInvocations(sysUiState)
listOf(
- SceneKey.Gone,
- SceneKey.Lockscreen,
- SceneKey.Bouncer,
- SceneKey.Shade,
- SceneKey.QuickSettings,
+ Scenes.Gone,
+ Scenes.Lockscreen,
+ Scenes.Bouncer,
+ Scenes.Shade,
+ Scenes.QuickSettings,
)
.forEachIndexed { index, sceneKey ->
- if (sceneKey == SceneKey.Gone) {
+ if (sceneKey == Scenes.Gone) {
kosmos.fakeDeviceEntryRepository.setUnlocked(true)
runCurrent()
}
@@ -379,15 +380,15 @@
testScope.runTest {
val currentSceneKey by collectLastValue(sceneInteractor.currentScene)
prepareState(
- initialSceneKey = SceneKey.Lockscreen,
+ initialSceneKey = Scenes.Lockscreen,
authenticationMethod = AuthenticationMethodModel.None,
isLockscreenEnabled = false,
)
- assertThat(currentSceneKey).isEqualTo(SceneKey.Lockscreen)
+ assertThat(currentSceneKey).isEqualTo(Scenes.Lockscreen)
underTest.start()
powerInteractor.setAwakeForTest()
- assertThat(currentSceneKey).isEqualTo(SceneKey.Gone)
+ assertThat(currentSceneKey).isEqualTo(Scenes.Gone)
}
@Test
@@ -395,15 +396,15 @@
testScope.runTest {
val currentSceneKey by collectLastValue(sceneInteractor.currentScene)
prepareState(
- initialSceneKey = SceneKey.Lockscreen,
+ initialSceneKey = Scenes.Lockscreen,
authenticationMethod = AuthenticationMethodModel.None,
isLockscreenEnabled = true,
)
- assertThat(currentSceneKey).isEqualTo(SceneKey.Lockscreen)
+ assertThat(currentSceneKey).isEqualTo(Scenes.Lockscreen)
underTest.start()
powerInteractor.setAwakeForTest()
- assertThat(currentSceneKey).isEqualTo(SceneKey.Lockscreen)
+ assertThat(currentSceneKey).isEqualTo(Scenes.Lockscreen)
}
@Test
@@ -411,14 +412,14 @@
testScope.runTest {
val currentSceneKey by collectLastValue(sceneInteractor.currentScene)
prepareState(
- initialSceneKey = SceneKey.Lockscreen,
+ initialSceneKey = Scenes.Lockscreen,
authenticationMethod = AuthenticationMethodModel.Pin,
)
- assertThat(currentSceneKey).isEqualTo(SceneKey.Lockscreen)
+ assertThat(currentSceneKey).isEqualTo(Scenes.Lockscreen)
underTest.start()
powerInteractor.setAwakeForTest()
- assertThat(currentSceneKey).isEqualTo(SceneKey.Lockscreen)
+ assertThat(currentSceneKey).isEqualTo(Scenes.Lockscreen)
}
@Test
@@ -426,12 +427,12 @@
testScope.runTest {
val currentSceneKey by collectLastValue(sceneInteractor.currentScene)
prepareState(
- initialSceneKey = SceneKey.Lockscreen,
+ initialSceneKey = Scenes.Lockscreen,
authenticationMethod = AuthenticationMethodModel.Pin,
isDeviceUnlocked = false,
startsAwake = false
)
- assertThat(currentSceneKey).isEqualTo(SceneKey.Lockscreen)
+ assertThat(currentSceneKey).isEqualTo(Scenes.Lockscreen)
underTest.start()
kosmos.fakeDeviceEntryRepository.setUnlocked(true)
@@ -439,14 +440,14 @@
powerInteractor.setAwakeForTest()
runCurrent()
- assertThat(currentSceneKey).isEqualTo(SceneKey.Gone)
+ assertThat(currentSceneKey).isEqualTo(Scenes.Gone)
}
@Test
fun collectFalsingSignals_onSuccessfulUnlock() =
testScope.runTest {
prepareState(
- initialSceneKey = SceneKey.Lockscreen,
+ initialSceneKey = Scenes.Lockscreen,
authenticationMethod = AuthenticationMethodModel.Pin,
isDeviceUnlocked = false,
)
@@ -456,11 +457,11 @@
// Move around scenes without unlocking.
listOf(
- SceneKey.Shade,
- SceneKey.QuickSettings,
- SceneKey.Shade,
- SceneKey.Lockscreen,
- SceneKey.Bouncer,
+ Scenes.Shade,
+ Scenes.QuickSettings,
+ Scenes.Shade,
+ Scenes.Lockscreen,
+ Scenes.Bouncer,
)
.forEach { sceneKey ->
sceneInteractor.changeScene(sceneKey, "reason")
@@ -471,17 +472,17 @@
// Changing to the Gone scene should report a successful unlock.
kosmos.fakeDeviceEntryRepository.setUnlocked(true)
runCurrent()
- sceneInteractor.changeScene(SceneKey.Gone, "reason")
+ sceneInteractor.changeScene(Scenes.Gone, "reason")
runCurrent()
verify(falsingCollector).onSuccessfulUnlock()
// Move around scenes without changing back to Lockscreen, shouldn't report another
// unlock.
listOf(
- SceneKey.Shade,
- SceneKey.QuickSettings,
- SceneKey.Shade,
- SceneKey.Gone,
+ Scenes.Shade,
+ Scenes.QuickSettings,
+ Scenes.Shade,
+ Scenes.Gone,
)
.forEach { sceneKey ->
sceneInteractor.changeScene(sceneKey, "reason")
@@ -490,17 +491,17 @@
}
// Changing to the Lockscreen scene shouldn't report a successful unlock.
- sceneInteractor.changeScene(SceneKey.Lockscreen, "reason")
+ sceneInteractor.changeScene(Scenes.Lockscreen, "reason")
runCurrent()
verify(falsingCollector, times(1)).onSuccessfulUnlock()
// Move around scenes without unlocking.
listOf(
- SceneKey.Shade,
- SceneKey.QuickSettings,
- SceneKey.Shade,
- SceneKey.Lockscreen,
- SceneKey.Bouncer,
+ Scenes.Shade,
+ Scenes.QuickSettings,
+ Scenes.Shade,
+ Scenes.Lockscreen,
+ Scenes.Bouncer,
)
.forEach { sceneKey ->
sceneInteractor.changeScene(sceneKey, "reason")
@@ -509,7 +510,7 @@
}
// Changing to the Gone scene should report a second successful unlock.
- sceneInteractor.changeScene(SceneKey.Gone, "reason")
+ sceneInteractor.changeScene(Scenes.Gone, "reason")
runCurrent()
verify(falsingCollector, times(2)).onSuccessfulUnlock()
}
@@ -518,7 +519,7 @@
fun collectFalsingSignals_setShowingAod() =
testScope.runTest {
prepareState(
- initialSceneKey = SceneKey.Lockscreen,
+ initialSceneKey = Scenes.Lockscreen,
authenticationMethod = AuthenticationMethodModel.Pin,
isDeviceUnlocked = false,
)
@@ -540,7 +541,7 @@
testScope.runTest {
val currentSceneKey by collectLastValue(sceneInteractor.currentScene)
prepareState(
- initialSceneKey = SceneKey.Lockscreen,
+ initialSceneKey = Scenes.Lockscreen,
authenticationMethod = AuthenticationMethodModel.Password,
isDeviceUnlocked = false,
)
@@ -550,7 +551,7 @@
bouncerInteractor.onImeHiddenByUser()
runCurrent()
- assertThat(currentSceneKey).isEqualTo(SceneKey.Lockscreen)
+ assertThat(currentSceneKey).isEqualTo(Scenes.Lockscreen)
}
@Test
@@ -559,7 +560,7 @@
kosmos.fakeKeyguardRepository.setAodAvailable(false)
runCurrent()
prepareState(
- initialSceneKey = SceneKey.Lockscreen,
+ initialSceneKey = Scenes.Lockscreen,
authenticationMethod = AuthenticationMethodModel.Pin,
isDeviceUnlocked = false,
startsAwake = false,
@@ -607,7 +608,7 @@
kosmos.fakeKeyguardRepository.setAodAvailable(true)
runCurrent()
prepareState(
- initialSceneKey = SceneKey.Lockscreen,
+ initialSceneKey = Scenes.Lockscreen,
authenticationMethod = AuthenticationMethodModel.Pin,
isDeviceUnlocked = false,
)
@@ -652,7 +653,7 @@
fun collectFalsingSignals_bouncerVisibility() =
testScope.runTest {
prepareState(
- initialSceneKey = SceneKey.Lockscreen,
+ initialSceneKey = Scenes.Lockscreen,
authenticationMethod = AuthenticationMethodModel.Pin,
isDeviceUnlocked = false,
)
@@ -660,13 +661,13 @@
runCurrent()
verify(falsingCollector).onBouncerHidden()
- sceneInteractor.changeScene(SceneKey.Bouncer, "reason")
+ sceneInteractor.changeScene(Scenes.Bouncer, "reason")
runCurrent()
verify(falsingCollector).onBouncerShown()
kosmos.fakeDeviceEntryRepository.setUnlocked(true)
runCurrent()
- sceneInteractor.changeScene(SceneKey.Gone, "reason")
+ sceneInteractor.changeScene(Scenes.Gone, "reason")
runCurrent()
verify(falsingCollector, times(2)).onBouncerHidden()
}
@@ -677,7 +678,7 @@
val currentSceneKey by collectLastValue(sceneInteractor.currentScene)
prepareState(
- initialSceneKey = SceneKey.Lockscreen,
+ initialSceneKey = Scenes.Lockscreen,
authenticationMethod = AuthenticationMethodModel.Pin,
isDeviceUnlocked = false,
)
@@ -687,7 +688,7 @@
kosmos.fakeMobileConnectionsRepository.isAnySimSecure.value = true
runCurrent()
- assertThat(currentSceneKey).isEqualTo(SceneKey.Bouncer)
+ assertThat(currentSceneKey).isEqualTo(Scenes.Bouncer)
}
@Test
@@ -697,7 +698,7 @@
val currentSceneKey by collectLastValue(sceneInteractor.currentScene)
prepareState(
- initialSceneKey = SceneKey.Bouncer,
+ initialSceneKey = Scenes.Bouncer,
authenticationMethod = AuthenticationMethodModel.Pin,
isDeviceUnlocked = false,
)
@@ -706,7 +707,7 @@
kosmos.fakeMobileConnectionsRepository.isAnySimSecure.value = false
runCurrent()
- assertThat(currentSceneKey).isEqualTo(SceneKey.Lockscreen)
+ assertThat(currentSceneKey).isEqualTo(Scenes.Lockscreen)
}
@Test
@@ -716,7 +717,7 @@
val currentSceneKey by collectLastValue(sceneInteractor.currentScene)
prepareState(
- initialSceneKey = SceneKey.Lockscreen,
+ initialSceneKey = Scenes.Lockscreen,
authenticationMethod = AuthenticationMethodModel.None,
isDeviceUnlocked = true,
isLockscreenEnabled = false,
@@ -726,7 +727,7 @@
kosmos.fakeMobileConnectionsRepository.isAnySimSecure.value = false
runCurrent()
- assertThat(currentSceneKey).isEqualTo(SceneKey.Gone)
+ assertThat(currentSceneKey).isEqualTo(Scenes.Gone)
}
@Test
@@ -736,9 +737,9 @@
val transitionStateFlow =
prepareState(
isDeviceUnlocked = true,
- initialSceneKey = SceneKey.Gone,
+ initialSceneKey = Scenes.Gone,
)
- assertThat(currentDesiredSceneKey).isEqualTo(SceneKey.Gone)
+ assertThat(currentDesiredSceneKey).isEqualTo(Scenes.Gone)
verify(windowController, never()).setNotificationShadeFocusable(anyBoolean())
underTest.start()
@@ -746,11 +747,11 @@
verify(windowController, times(1)).setNotificationShadeFocusable(false)
fakeSceneDataSource.pause()
- sceneInteractor.changeScene(SceneKey.Shade, "reason")
+ sceneInteractor.changeScene(Scenes.Shade, "reason")
transitionStateFlow.value =
ObservableTransitionState.Transition(
- fromScene = SceneKey.Gone,
- toScene = SceneKey.Shade,
+ fromScene = Scenes.Gone,
+ toScene = Scenes.Shade,
progress = flowOf(0.5f),
isInitiatedByUserInput = false,
isUserInputOngoing = flowOf(false),
@@ -758,17 +759,17 @@
runCurrent()
verify(windowController, times(1)).setNotificationShadeFocusable(false)
- fakeSceneDataSource.unpause(expectedScene = SceneKey.Shade)
- transitionStateFlow.value = ObservableTransitionState.Idle(SceneKey.Shade)
+ fakeSceneDataSource.unpause(expectedScene = Scenes.Shade)
+ transitionStateFlow.value = ObservableTransitionState.Idle(Scenes.Shade)
runCurrent()
verify(windowController, times(1)).setNotificationShadeFocusable(true)
fakeSceneDataSource.pause()
- sceneInteractor.changeScene(SceneKey.Gone, "reason")
+ sceneInteractor.changeScene(Scenes.Gone, "reason")
transitionStateFlow.value =
ObservableTransitionState.Transition(
- fromScene = SceneKey.Shade,
- toScene = SceneKey.Gone,
+ fromScene = Scenes.Shade,
+ toScene = Scenes.Gone,
progress = flowOf(0.5f),
isInitiatedByUserInput = false,
isUserInputOngoing = flowOf(false),
@@ -776,8 +777,8 @@
runCurrent()
verify(windowController, times(1)).setNotificationShadeFocusable(true)
- fakeSceneDataSource.unpause(expectedScene = SceneKey.Gone)
- transitionStateFlow.value = ObservableTransitionState.Idle(SceneKey.Gone)
+ fakeSceneDataSource.unpause(expectedScene = Scenes.Gone)
+ transitionStateFlow.value = ObservableTransitionState.Idle(Scenes.Gone)
runCurrent()
verify(windowController, times(2)).setNotificationShadeFocusable(false)
}
@@ -787,7 +788,7 @@
testScope.runTest {
val transitionStateFlow =
prepareState(
- initialSceneKey = SceneKey.Lockscreen,
+ initialSceneKey = Scenes.Lockscreen,
)
underTest.start()
runCurrent()
@@ -796,7 +797,7 @@
clearInvocations(centralSurfaces)
emulateSceneTransition(
transitionStateFlow = transitionStateFlow,
- toScene = SceneKey.Bouncer,
+ toScene = Scenes.Bouncer,
verifyBeforeTransition = {
verify(centralSurfaces, never()).setInteracting(anyInt(), anyBoolean())
},
@@ -815,7 +816,7 @@
clearInvocations(centralSurfaces)
emulateSceneTransition(
transitionStateFlow = transitionStateFlow,
- toScene = SceneKey.Lockscreen,
+ toScene = Scenes.Lockscreen,
verifyBeforeTransition = {
verify(centralSurfaces, never()).setInteracting(anyInt(), anyBoolean())
},
@@ -834,7 +835,7 @@
clearInvocations(centralSurfaces)
emulateSceneTransition(
transitionStateFlow = transitionStateFlow,
- toScene = SceneKey.Shade,
+ toScene = Scenes.Shade,
verifyBeforeTransition = {
verify(centralSurfaces, never()).setInteracting(anyInt(), anyBoolean())
},
@@ -853,7 +854,7 @@
clearInvocations(centralSurfaces)
emulateSceneTransition(
transitionStateFlow = transitionStateFlow,
- toScene = SceneKey.Lockscreen,
+ toScene = Scenes.Lockscreen,
verifyBeforeTransition = {
verify(centralSurfaces, never()).setInteracting(anyInt(), anyBoolean())
},
@@ -872,7 +873,7 @@
clearInvocations(centralSurfaces)
emulateSceneTransition(
transitionStateFlow = transitionStateFlow,
- toScene = SceneKey.QuickSettings,
+ toScene = Scenes.QuickSettings,
verifyBeforeTransition = {
verify(centralSurfaces, never()).setInteracting(anyInt(), anyBoolean())
},
@@ -891,7 +892,7 @@
val transitionStateFlow =
prepareState(
isDeviceUnlocked = true,
- initialSceneKey = SceneKey.Gone,
+ initialSceneKey = Scenes.Gone,
)
underTest.start()
verify(centralSurfaces, never()).setInteracting(anyInt(), anyBoolean())
@@ -899,7 +900,7 @@
clearInvocations(centralSurfaces)
emulateSceneTransition(
transitionStateFlow = transitionStateFlow,
- toScene = SceneKey.Bouncer,
+ toScene = Scenes.Bouncer,
verifyBeforeTransition = {
verify(centralSurfaces, never()).setInteracting(anyInt(), anyBoolean())
},
@@ -914,7 +915,7 @@
clearInvocations(centralSurfaces)
emulateSceneTransition(
transitionStateFlow = transitionStateFlow,
- toScene = SceneKey.Lockscreen,
+ toScene = Scenes.Lockscreen,
verifyBeforeTransition = {
verify(centralSurfaces, never()).setInteracting(anyInt(), anyBoolean())
},
@@ -929,7 +930,7 @@
clearInvocations(centralSurfaces)
emulateSceneTransition(
transitionStateFlow = transitionStateFlow,
- toScene = SceneKey.Shade,
+ toScene = Scenes.Shade,
verifyBeforeTransition = {
verify(centralSurfaces, never()).setInteracting(anyInt(), anyBoolean())
},
@@ -944,7 +945,7 @@
clearInvocations(centralSurfaces)
emulateSceneTransition(
transitionStateFlow = transitionStateFlow,
- toScene = SceneKey.Lockscreen,
+ toScene = Scenes.Lockscreen,
verifyBeforeTransition = {
verify(centralSurfaces, never()).setInteracting(anyInt(), anyBoolean())
},
@@ -959,7 +960,7 @@
clearInvocations(centralSurfaces)
emulateSceneTransition(
transitionStateFlow = transitionStateFlow,
- toScene = SceneKey.QuickSettings,
+ toScene = Scenes.QuickSettings,
verifyBeforeTransition = {
verify(centralSurfaces, never()).setInteracting(anyInt(), anyBoolean())
},
@@ -978,12 +979,12 @@
val currentScene by collectLastValue(sceneInteractor.currentScene)
val transitionStateFlow = prepareState()
underTest.start()
- emulateSceneTransition(transitionStateFlow, toScene = SceneKey.Bouncer)
- assertThat(currentScene).isNotEqualTo(SceneKey.Lockscreen)
+ emulateSceneTransition(transitionStateFlow, toScene = Scenes.Bouncer)
+ assertThat(currentScene).isNotEqualTo(Scenes.Lockscreen)
kosmos.falsingManager.sendFalsingBelief()
- assertThat(currentScene).isEqualTo(SceneKey.Lockscreen)
+ assertThat(currentScene).isEqualTo(Scenes.Lockscreen)
}
private fun TestScope.emulateSceneTransition(
@@ -1033,7 +1034,7 @@
}
}
- check(initialSceneKey != SceneKey.Gone || isDeviceUnlocked) {
+ check(initialSceneKey != Scenes.Gone || isDeviceUnlocked) {
"Cannot start on the Gone scene and have the device be locked at the same time."
}
@@ -1043,7 +1044,7 @@
runCurrent()
val transitionStateFlow =
MutableStateFlow<ObservableTransitionState>(
- ObservableTransitionState.Idle(SceneKey.Lockscreen)
+ ObservableTransitionState.Idle(Scenes.Lockscreen)
)
sceneInteractor.setTransitionState(transitionStateFlow)
initialSceneKey?.let {
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/scene/shared/model/SceneDataSourceDelegatorTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/scene/shared/model/SceneDataSourceDelegatorTest.kt
index ed4b1e6..32c0172 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/scene/shared/model/SceneDataSourceDelegatorTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/scene/shared/model/SceneDataSourceDelegatorTest.kt
@@ -53,9 +53,9 @@
testScope.runTest {
val currentScene by collectLastValue(underTest.currentScene)
underTest.setDelegate(null)
- assertThat(currentScene).isNotEqualTo(SceneKey.Bouncer)
+ assertThat(currentScene).isNotEqualTo(Scenes.Bouncer)
- underTest.changeScene(toScene = SceneKey.Bouncer)
+ underTest.changeScene(toScene = Scenes.Bouncer)
assertThat(currentScene).isEqualTo(initialSceneKey)
}
@@ -71,11 +71,11 @@
fun currentScene_withDelegate_changesScenes() =
testScope.runTest {
val currentScene by collectLastValue(underTest.currentScene)
- assertThat(currentScene).isNotEqualTo(SceneKey.Bouncer)
+ assertThat(currentScene).isNotEqualTo(Scenes.Bouncer)
- underTest.changeScene(toScene = SceneKey.Bouncer)
+ underTest.changeScene(toScene = Scenes.Bouncer)
- assertThat(currentScene).isEqualTo(SceneKey.Bouncer)
+ assertThat(currentScene).isEqualTo(Scenes.Bouncer)
}
@Test
@@ -83,8 +83,8 @@
testScope.runTest {
val currentScene by collectLastValue(underTest.currentScene)
- fakeSceneDataSource.changeScene(toScene = SceneKey.Bouncer)
+ fakeSceneDataSource.changeScene(toScene = Scenes.Bouncer)
- assertThat(currentScene).isEqualTo(SceneKey.Bouncer)
+ assertThat(currentScene).isEqualTo(Scenes.Bouncer)
}
}
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/scene/ui/viewmodel/SceneContainerViewModelTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/scene/ui/viewmodel/SceneContainerViewModelTest.kt
index 27ae8b6..7b0127e 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/scene/ui/viewmodel/SceneContainerViewModelTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/scene/ui/viewmodel/SceneContainerViewModelTest.kt
@@ -30,7 +30,7 @@
import com.android.systemui.scene.sceneContainerConfig
import com.android.systemui.scene.sceneKeys
import com.android.systemui.scene.shared.flag.fakeSceneContainerFlags
-import com.android.systemui.scene.shared.model.SceneKey
+import com.android.systemui.scene.shared.model.Scenes
import com.android.systemui.scene.shared.model.fakeSceneDataSource
import com.android.systemui.testKosmos
import com.android.systemui.util.mockito.mock
@@ -89,20 +89,20 @@
fun sceneTransition() =
testScope.runTest {
val currentScene by collectLastValue(underTest.currentScene)
- assertThat(currentScene).isEqualTo(SceneKey.Lockscreen)
+ assertThat(currentScene).isEqualTo(Scenes.Lockscreen)
- fakeSceneDataSource.changeScene(SceneKey.Shade)
+ fakeSceneDataSource.changeScene(Scenes.Shade)
- assertThat(currentScene).isEqualTo(SceneKey.Shade)
+ assertThat(currentScene).isEqualTo(Scenes.Shade)
}
@Test
fun canChangeScene_whenAllowed_switchingFromGone_returnsTrue() =
testScope.runTest {
val currentScene by collectLastValue(underTest.currentScene)
- fakeSceneDataSource.changeScene(toScene = SceneKey.Gone)
+ fakeSceneDataSource.changeScene(toScene = Scenes.Gone)
runCurrent()
- assertThat(currentScene).isEqualTo(SceneKey.Gone)
+ assertThat(currentScene).isEqualTo(Scenes.Gone)
sceneContainerConfig.sceneKeys
.filter { it != currentScene }
@@ -117,9 +117,9 @@
fun canChangeScene_whenAllowed_switchingFromLockscreen_returnsTrue() =
testScope.runTest {
val currentScene by collectLastValue(underTest.currentScene)
- fakeSceneDataSource.changeScene(toScene = SceneKey.Lockscreen)
+ fakeSceneDataSource.changeScene(toScene = Scenes.Lockscreen)
runCurrent()
- assertThat(currentScene).isEqualTo(SceneKey.Lockscreen)
+ assertThat(currentScene).isEqualTo(Scenes.Lockscreen)
sceneContainerConfig.sceneKeys
.filter { it != currentScene }
@@ -135,15 +135,15 @@
testScope.runTest {
falsingManager.setIsFalseTouch(true)
val currentScene by collectLastValue(underTest.currentScene)
- fakeSceneDataSource.changeScene(toScene = SceneKey.Lockscreen)
+ fakeSceneDataSource.changeScene(toScene = Scenes.Lockscreen)
runCurrent()
- assertThat(currentScene).isEqualTo(SceneKey.Lockscreen)
+ assertThat(currentScene).isEqualTo(Scenes.Lockscreen)
sceneContainerConfig.sceneKeys
.filter { it != currentScene }
.filter {
// Moving to the Communal scene is not currently falsing protected.
- it != SceneKey.Communal
+ it != Scenes.Communal
}
.forEach { toScene ->
assertWithMessage("Protected scene $toScene not properly protected")
@@ -157,14 +157,14 @@
testScope.runTest {
falsingManager.setIsFalseTouch(true)
val currentScene by collectLastValue(underTest.currentScene)
- fakeSceneDataSource.changeScene(toScene = SceneKey.Lockscreen)
+ fakeSceneDataSource.changeScene(toScene = Scenes.Lockscreen)
runCurrent()
- assertThat(currentScene).isEqualTo(SceneKey.Lockscreen)
+ assertThat(currentScene).isEqualTo(Scenes.Lockscreen)
sceneContainerConfig.sceneKeys
.filter {
// Moving to the Communal scene is not currently falsing protected.
- it == SceneKey.Communal
+ it == Scenes.Communal
}
.forEach { toScene ->
assertWithMessage("Unprotected scene $toScene is incorrectly protected")
@@ -178,9 +178,9 @@
testScope.runTest {
falsingManager.setIsFalseTouch(true)
val currentScene by collectLastValue(underTest.currentScene)
- fakeSceneDataSource.changeScene(toScene = SceneKey.Gone)
+ fakeSceneDataSource.changeScene(toScene = Scenes.Gone)
runCurrent()
- assertThat(currentScene).isEqualTo(SceneKey.Gone)
+ assertThat(currentScene).isEqualTo(Scenes.Gone)
sceneContainerConfig.sceneKeys
.filter { it != currentScene }
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/shade/ShadeControllerSceneImplTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/shade/ShadeControllerSceneImplTest.kt
index ec424b0..d3fa360 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/shade/ShadeControllerSceneImplTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/shade/ShadeControllerSceneImplTest.kt
@@ -18,6 +18,8 @@
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
+import com.android.compose.animation.scene.ObservableTransitionState
+import com.android.compose.animation.scene.SceneKey
import com.android.systemui.SysuiTestCase
import com.android.systemui.deviceentry.data.repository.fakeDeviceEntryRepository
import com.android.systemui.deviceentry.domain.interactor.deviceEntryInteractor
@@ -28,8 +30,7 @@
import com.android.systemui.kosmos.testScope
import com.android.systemui.scene.domain.interactor.sceneInteractor
import com.android.systemui.scene.shared.flag.fakeSceneContainerFlags
-import com.android.systemui.scene.shared.model.ObservableTransitionState
-import com.android.systemui.scene.shared.model.SceneKey
+import com.android.systemui.scene.shared.model.Scenes
import com.android.systemui.shade.domain.interactor.ShadeInteractor
import com.android.systemui.shade.domain.interactor.shadeInteractor
import com.android.systemui.statusbar.CommandQueue
@@ -87,7 +88,7 @@
runCurrent()
// THEN the shade remains collapsed and the post-collapse action ran
- assertThat(sceneInteractor.currentScene.value).isEqualTo(SceneKey.Gone)
+ assertThat(sceneInteractor.currentScene.value).isEqualTo(Scenes.Gone)
verify(testRunnable, times(1)).run()
}
@@ -105,7 +106,7 @@
runCurrent()
// THEN the shade remains expanded and the post-collapse action did not run
- assertThat(sceneInteractor.currentScene.value).isEqualTo(SceneKey.Shade)
+ assertThat(sceneInteractor.currentScene.value).isEqualTo(Scenes.Shade)
assertThat(shadeInteractor.isAnyFullyExpanded.value).isTrue()
verify(testRunnable, never()).run()
}
@@ -122,7 +123,7 @@
runCurrent()
// THEN the shade collapses back to lockscreen and the post-collapse action ran
- assertThat(sceneInteractor.currentScene.value).isEqualTo(SceneKey.Lockscreen)
+ assertThat(sceneInteractor.currentScene.value).isEqualTo(Scenes.Lockscreen)
}
@Test
@@ -137,7 +138,7 @@
runCurrent()
// THEN the shade collapses back to lockscreen and the post-collapse action ran
- assertThat(sceneInteractor.currentScene.value).isEqualTo(SceneKey.Gone)
+ assertThat(sceneInteractor.currentScene.value).isEqualTo(Scenes.Gone)
}
@Test
@@ -181,21 +182,21 @@
private fun setDeviceEntered(isEntered: Boolean) {
setScene(
if (isEntered) {
- SceneKey.Gone
+ Scenes.Gone
} else {
- SceneKey.Lockscreen
+ Scenes.Lockscreen
}
)
assertThat(deviceEntryInteractor.isDeviceEntered.value).isEqualTo(isEntered)
}
private fun setCollapsed() {
- setScene(SceneKey.Gone)
+ setScene(Scenes.Gone)
assertThat(shadeInteractor.isAnyExpanded.value).isFalse()
}
private fun setShadeFullyExpanded() {
- setScene(SceneKey.Shade)
+ setScene(Scenes.Shade)
assertThat(shadeInteractor.isAnyFullyExpanded.value).isTrue()
}
}
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/shade/domain/interactor/ShadeAnimationInteractorSceneContainerImplTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/shade/domain/interactor/ShadeAnimationInteractorSceneContainerImplTest.kt
index 1ef07fa..bb40591 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/shade/domain/interactor/ShadeAnimationInteractorSceneContainerImplTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/shade/domain/interactor/ShadeAnimationInteractorSceneContainerImplTest.kt
@@ -18,12 +18,12 @@
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
+import com.android.compose.animation.scene.ObservableTransitionState
import com.android.systemui.SysuiTestCase
import com.android.systemui.coroutines.collectLastValue
import com.android.systemui.kosmos.testScope
import com.android.systemui.scene.domain.interactor.sceneInteractor
-import com.android.systemui.scene.shared.model.ObservableTransitionState
-import com.android.systemui.scene.shared.model.SceneKey
+import com.android.systemui.scene.shared.model.Scenes
import com.android.systemui.testKosmos
import com.google.common.truth.Truth
import kotlinx.coroutines.ExperimentalCoroutinesApi
@@ -53,8 +53,8 @@
val transitionState =
MutableStateFlow<ObservableTransitionState>(
ObservableTransitionState.Transition(
- fromScene = SceneKey.QuickSettings,
- toScene = SceneKey.Shade,
+ fromScene = Scenes.QuickSettings,
+ toScene = Scenes.Shade,
progress = MutableStateFlow(.1f),
isInitiatedByUserInput = false,
isUserInputOngoing = flowOf(false),
@@ -76,8 +76,8 @@
val transitionState =
MutableStateFlow<ObservableTransitionState>(
ObservableTransitionState.Transition(
- fromScene = SceneKey.QuickSettings,
- toScene = SceneKey.Gone,
+ fromScene = Scenes.QuickSettings,
+ toScene = Scenes.Gone,
progress = MutableStateFlow(.1f),
isInitiatedByUserInput = false,
isUserInputOngoing = flowOf(false),
@@ -99,8 +99,8 @@
val transitionState =
MutableStateFlow<ObservableTransitionState>(
ObservableTransitionState.Transition(
- fromScene = SceneKey.QuickSettings,
- toScene = SceneKey.Gone,
+ fromScene = Scenes.QuickSettings,
+ toScene = Scenes.Gone,
progress = MutableStateFlow(.1f),
isInitiatedByUserInput = false,
isUserInputOngoing = flowOf(true),
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/shade/domain/interactor/ShadeBackActionInteractorImplTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/shade/domain/interactor/ShadeBackActionInteractorImplTest.kt
index ec4da04..b662133 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/shade/domain/interactor/ShadeBackActionInteractorImplTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/shade/domain/interactor/ShadeBackActionInteractorImplTest.kt
@@ -19,13 +19,14 @@
import android.content.applicationContext
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
+import com.android.compose.animation.scene.ObservableTransitionState
+import com.android.compose.animation.scene.SceneKey
import com.android.systemui.SysuiTestCase
import com.android.systemui.deviceentry.data.repository.fakeDeviceEntryRepository
import com.android.systemui.kosmos.testScope
import com.android.systemui.scene.domain.interactor.sceneInteractor
import com.android.systemui.scene.shared.flag.fakeSceneContainerFlags
-import com.android.systemui.scene.shared.model.ObservableTransitionState
-import com.android.systemui.scene.shared.model.SceneKey
+import com.android.systemui.scene.shared.model.Scenes
import com.android.systemui.shared.recents.utilities.Utilities
import com.android.systemui.testKosmos
import com.google.common.truth.Truth.assertThat
@@ -56,45 +57,45 @@
@Test
fun animateCollapseQs_notOnQs() =
testScope.runTest {
- setScene(SceneKey.Shade)
+ setScene(Scenes.Shade)
underTest.animateCollapseQs(true)
runCurrent()
- assertThat(sceneInteractor.currentScene.value).isEqualTo(SceneKey.Shade)
+ assertThat(sceneInteractor.currentScene.value).isEqualTo(Scenes.Shade)
}
@Test
fun animateCollapseQs_fullyCollapse_entered() =
testScope.runTest {
enterDevice()
- setScene(SceneKey.QuickSettings)
+ setScene(Scenes.QuickSettings)
underTest.animateCollapseQs(true)
runCurrent()
- assertThat(sceneInteractor.currentScene.value).isEqualTo(SceneKey.Gone)
+ assertThat(sceneInteractor.currentScene.value).isEqualTo(Scenes.Gone)
}
@Test
fun animateCollapseQs_fullyCollapse_locked() =
testScope.runTest {
deviceEntryRepository.setUnlocked(false)
- setScene(SceneKey.QuickSettings)
+ setScene(Scenes.QuickSettings)
underTest.animateCollapseQs(true)
runCurrent()
- assertThat(sceneInteractor.currentScene.value).isEqualTo(SceneKey.Lockscreen)
+ assertThat(sceneInteractor.currentScene.value).isEqualTo(Scenes.Lockscreen)
}
@Test
fun animateCollapseQs_notFullyCollapse() =
testScope.runTest {
- setScene(SceneKey.QuickSettings)
+ setScene(Scenes.QuickSettings)
underTest.animateCollapseQs(false)
runCurrent()
- assertThat(sceneInteractor.currentScene.value).isEqualTo(SceneKey.Shade)
+ assertThat(sceneInteractor.currentScene.value).isEqualTo(Scenes.Shade)
}
private fun enterDevice() {
deviceEntryRepository.setUnlocked(true)
testScope.runCurrent()
- setScene(SceneKey.Gone)
+ setScene(Scenes.Gone)
}
private fun setScene(key: SceneKey) {
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/shade/domain/interactor/ShadeInteractorSceneContainerImplTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/shade/domain/interactor/ShadeInteractorSceneContainerImplTest.kt
index bf136cd..4cd2c30 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/shade/domain/interactor/ShadeInteractorSceneContainerImplTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/shade/domain/interactor/ShadeInteractorSceneContainerImplTest.kt
@@ -18,6 +18,7 @@
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
+import com.android.compose.animation.scene.ObservableTransitionState
import com.android.systemui.SysuiTestCase
import com.android.systemui.common.ui.data.repository.fakeConfigurationRepository
import com.android.systemui.coroutines.collectLastValue
@@ -27,8 +28,7 @@
import com.android.systemui.kosmos.testScope
import com.android.systemui.res.R
import com.android.systemui.scene.domain.interactor.sceneInteractor
-import com.android.systemui.scene.shared.model.ObservableTransitionState
-import com.android.systemui.scene.shared.model.SceneKey
+import com.android.systemui.scene.shared.model.Scenes
import com.android.systemui.testKosmos
import com.android.systemui.user.data.repository.userRepository
import com.google.common.truth.Truth
@@ -67,8 +67,8 @@
val transitionState =
MutableStateFlow<ObservableTransitionState>(
ObservableTransitionState.Transition(
- fromScene = SceneKey.QuickSettings,
- toScene = SceneKey.Shade,
+ fromScene = Scenes.QuickSettings,
+ toScene = Scenes.Shade,
progress = MutableStateFlow(.3f),
isInitiatedByUserInput = false,
isUserInputOngoing = flowOf(false),
@@ -96,8 +96,8 @@
val transitionState =
MutableStateFlow<ObservableTransitionState>(
ObservableTransitionState.Transition(
- fromScene = SceneKey.QuickSettings,
- toScene = SceneKey.Shade,
+ fromScene = Scenes.QuickSettings,
+ toScene = Scenes.Shade,
progress = progress,
isInitiatedByUserInput = false,
isUserInputOngoing = flowOf(false),
@@ -120,8 +120,8 @@
val transitionState =
MutableStateFlow<ObservableTransitionState>(
ObservableTransitionState.Transition(
- fromScene = SceneKey.QuickSettings,
- toScene = SceneKey.Shade,
+ fromScene = Scenes.QuickSettings,
+ toScene = Scenes.Shade,
progress = MutableStateFlow(.3f),
isInitiatedByUserInput = false,
isUserInputOngoing = flowOf(false),
@@ -143,7 +143,7 @@
keyguardRepository.setStatusBarState(StatusBarState.SHADE)
val transitionState =
MutableStateFlow<ObservableTransitionState>(
- ObservableTransitionState.Idle(SceneKey.Shade)
+ ObservableTransitionState.Idle(Scenes.Shade)
)
sceneInteractor.setTransitionState(transitionState)
runCurrent()
@@ -161,7 +161,7 @@
keyguardRepository.setStatusBarState(StatusBarState.SHADE)
val transitionState =
MutableStateFlow<ObservableTransitionState>(
- ObservableTransitionState.Idle(SceneKey.QuickSettings)
+ ObservableTransitionState.Idle(Scenes.QuickSettings)
)
sceneInteractor.setTransitionState(transitionState)
runCurrent()
@@ -174,7 +174,7 @@
fun lockscreenShadeExpansion_idle_onScene() =
testComponent.runTest {
// GIVEN an expansion flow based on transitions to and from a scene
- val key = SceneKey.Shade
+ val key = Scenes.Shade
val expansion = underTest.sceneBasedExpansion(sceneInteractor, key)
val expansionAmount by collectLastValue(expansion)
@@ -191,13 +191,13 @@
fun lockscreenShadeExpansion_idle_onDifferentScene() =
testComponent.runTest {
// GIVEN an expansion flow based on transitions to and from a scene
- val expansion = underTest.sceneBasedExpansion(sceneInteractor, SceneKey.Shade)
+ val expansion = underTest.sceneBasedExpansion(sceneInteractor, Scenes.Shade)
val expansionAmount by collectLastValue(expansion)
// WHEN transition state is idle on a different scene
val transitionState =
MutableStateFlow<ObservableTransitionState>(
- ObservableTransitionState.Idle(SceneKey.Lockscreen)
+ ObservableTransitionState.Idle(Scenes.Lockscreen)
)
sceneInteractor.setTransitionState(transitionState)
@@ -209,7 +209,7 @@
fun lockscreenShadeExpansion_transitioning_toScene() =
testComponent.runTest {
// GIVEN an expansion flow based on transitions to and from a scene
- val key = SceneKey.QuickSettings
+ val key = Scenes.QuickSettings
val expansion = underTest.sceneBasedExpansion(sceneInteractor, key)
val expansionAmount by collectLastValue(expansion)
@@ -218,7 +218,7 @@
val transitionState =
MutableStateFlow<ObservableTransitionState>(
ObservableTransitionState.Transition(
- fromScene = SceneKey.Lockscreen,
+ fromScene = Scenes.Lockscreen,
toScene = key,
progress = progress,
isInitiatedByUserInput = false,
@@ -247,7 +247,7 @@
fun lockscreenShadeExpansion_transitioning_fromScene() =
testComponent.runTest {
// GIVEN an expansion flow based on transitions to and from a scene
- val key = SceneKey.QuickSettings
+ val key = Scenes.QuickSettings
val expansion = underTest.sceneBasedExpansion(sceneInteractor, key)
val expansionAmount by collectLastValue(expansion)
@@ -257,7 +257,7 @@
MutableStateFlow<ObservableTransitionState>(
ObservableTransitionState.Transition(
fromScene = key,
- toScene = SceneKey.Lockscreen,
+ toScene = Scenes.Lockscreen,
progress = progress,
isInitiatedByUserInput = false,
isUserInputOngoing = flowOf(false),
@@ -290,8 +290,8 @@
val transitionState =
MutableStateFlow<ObservableTransitionState>(
ObservableTransitionState.Transition(
- fromScene = SceneKey.Gone,
- toScene = SceneKey.QuickSettings,
+ fromScene = Scenes.Gone,
+ toScene = Scenes.QuickSettings,
progress = MutableStateFlow(.1f),
isInitiatedByUserInput = false,
isUserInputOngoing = flowOf(false),
@@ -313,8 +313,8 @@
val transitionState =
MutableStateFlow<ObservableTransitionState>(
ObservableTransitionState.Transition(
- fromScene = SceneKey.Shade,
- toScene = SceneKey.QuickSettings,
+ fromScene = Scenes.Shade,
+ toScene = Scenes.QuickSettings,
progress = MutableStateFlow(.1f),
isInitiatedByUserInput = false,
isUserInputOngoing = flowOf(false),
@@ -331,7 +331,7 @@
fun lockscreenShadeExpansion_transitioning_toAndFromDifferentScenes() =
testComponent.runTest {
// GIVEN an expansion flow based on transitions to and from a scene
- val expansion = underTest.sceneBasedExpansion(sceneInteractor, SceneKey.QuickSettings)
+ val expansion = underTest.sceneBasedExpansion(sceneInteractor, Scenes.QuickSettings)
val expansionAmount by collectLastValue(expansion)
// WHEN transition state is starting to between different scenes
@@ -339,8 +339,8 @@
val transitionState =
MutableStateFlow<ObservableTransitionState>(
ObservableTransitionState.Transition(
- fromScene = SceneKey.Lockscreen,
- toScene = SceneKey.Shade,
+ fromScene = Scenes.Lockscreen,
+ toScene = Scenes.Shade,
progress = progress,
isInitiatedByUserInput = false,
isUserInputOngoing = flowOf(false),
@@ -368,7 +368,7 @@
fun userInteracting_idle() =
testComponent.runTest {
// GIVEN an interacting flow based on transitions to and from a scene
- val key = SceneKey.Shade
+ val key = Scenes.Shade
val interactingFlow = underTest.sceneBasedInteracting(sceneInteractor, key)
val interacting by collectLastValue(interactingFlow)
@@ -385,7 +385,7 @@
fun userInteracting_transitioning_toScene_programmatic() =
testComponent.runTest {
// GIVEN an interacting flow based on transitions to and from a scene
- val key = SceneKey.QuickSettings
+ val key = Scenes.QuickSettings
val interactingFlow = underTest.sceneBasedInteracting(sceneInteractor, key)
val interacting by collectLastValue(interactingFlow)
@@ -394,7 +394,7 @@
val transitionState =
MutableStateFlow<ObservableTransitionState>(
ObservableTransitionState.Transition(
- fromScene = SceneKey.Lockscreen,
+ fromScene = Scenes.Lockscreen,
toScene = key,
progress = progress,
isInitiatedByUserInput = false,
@@ -423,7 +423,7 @@
fun userInteracting_transitioning_toScene_userInputDriven() =
testComponent.runTest {
// GIVEN an interacting flow based on transitions to and from a scene
- val key = SceneKey.QuickSettings
+ val key = Scenes.QuickSettings
val interactingFlow = underTest.sceneBasedInteracting(sceneInteractor, key)
val interacting by collectLastValue(interactingFlow)
@@ -432,7 +432,7 @@
val transitionState =
MutableStateFlow<ObservableTransitionState>(
ObservableTransitionState.Transition(
- fromScene = SceneKey.Lockscreen,
+ fromScene = Scenes.Lockscreen,
toScene = key,
progress = progress,
isInitiatedByUserInput = true,
@@ -461,7 +461,7 @@
fun userInteracting_transitioning_fromScene_programmatic() =
testComponent.runTest {
// GIVEN an interacting flow based on transitions to and from a scene
- val key = SceneKey.QuickSettings
+ val key = Scenes.QuickSettings
val interactingFlow = underTest.sceneBasedInteracting(sceneInteractor, key)
val interacting by collectLastValue(interactingFlow)
@@ -471,7 +471,7 @@
MutableStateFlow<ObservableTransitionState>(
ObservableTransitionState.Transition(
fromScene = key,
- toScene = SceneKey.Lockscreen,
+ toScene = Scenes.Lockscreen,
progress = progress,
isInitiatedByUserInput = false,
isUserInputOngoing = flowOf(false),
@@ -499,7 +499,7 @@
fun userInteracting_transitioning_fromScene_userInputDriven() =
testComponent.runTest {
// GIVEN an interacting flow based on transitions to and from a scene
- val key = SceneKey.QuickSettings
+ val key = Scenes.QuickSettings
val interactingFlow = underTest.sceneBasedInteracting(sceneInteractor, key)
val interacting by collectLastValue(interactingFlow)
@@ -509,7 +509,7 @@
MutableStateFlow<ObservableTransitionState>(
ObservableTransitionState.Transition(
fromScene = key,
- toScene = SceneKey.Lockscreen,
+ toScene = Scenes.Lockscreen,
progress = progress,
isInitiatedByUserInput = true,
isUserInputOngoing = flowOf(false),
@@ -537,7 +537,7 @@
fun userInteracting_transitioning_toAndFromDifferentScenes() =
testComponent.runTest {
// GIVEN an interacting flow based on transitions to and from a scene
- val interactingFlow = underTest.sceneBasedInteracting(sceneInteractor, SceneKey.Shade)
+ val interactingFlow = underTest.sceneBasedInteracting(sceneInteractor, Scenes.Shade)
val interacting by collectLastValue(interactingFlow)
// WHEN transition state is starting to between different scenes
@@ -545,8 +545,8 @@
val transitionState =
MutableStateFlow<ObservableTransitionState>(
ObservableTransitionState.Transition(
- fromScene = SceneKey.Lockscreen,
- toScene = SceneKey.QuickSettings,
+ fromScene = Scenes.Lockscreen,
+ toScene = Scenes.QuickSettings,
progress = MutableStateFlow(0f),
isInitiatedByUserInput = true,
isUserInputOngoing = flowOf(false),
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/shade/ui/viewmodel/ShadeSceneViewModelTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/shade/ui/viewmodel/ShadeSceneViewModelTest.kt
index d655ade..853b00d 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/shade/ui/viewmodel/ShadeSceneViewModelTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/shade/ui/viewmodel/ShadeSceneViewModelTest.kt
@@ -30,7 +30,7 @@
import com.android.systemui.media.controls.domain.pipeline.MediaDataManager
import com.android.systemui.qs.ui.adapter.FakeQSSceneAdapter
import com.android.systemui.scene.domain.interactor.sceneInteractor
-import com.android.systemui.scene.shared.model.SceneKey
+import com.android.systemui.scene.shared.model.Scenes
import com.android.systemui.shade.domain.interactor.privacyChipInteractor
import com.android.systemui.shade.domain.interactor.shadeHeaderClockInteractor
import com.android.systemui.statusbar.notification.stack.ui.viewmodel.notificationsPlaceholderViewModel
@@ -125,7 +125,7 @@
)
kosmos.fakeDeviceEntryRepository.setUnlocked(false)
- assertThat(upTransitionSceneKey).isEqualTo(SceneKey.Lockscreen)
+ assertThat(upTransitionSceneKey).isEqualTo(Scenes.Lockscreen)
}
@Test
@@ -137,7 +137,7 @@
)
kosmos.fakeDeviceEntryRepository.setUnlocked(true)
- assertThat(upTransitionSceneKey).isEqualTo(SceneKey.Gone)
+ assertThat(upTransitionSceneKey).isEqualTo(Scenes.Gone)
}
@Test
@@ -148,9 +148,9 @@
kosmos.fakeAuthenticationRepository.setAuthenticationMethod(
AuthenticationMethodModel.None
)
- sceneInteractor.changeScene(SceneKey.Lockscreen, "reason")
+ sceneInteractor.changeScene(Scenes.Lockscreen, "reason")
- assertThat(upTransitionSceneKey).isEqualTo(SceneKey.Lockscreen)
+ assertThat(upTransitionSceneKey).isEqualTo(Scenes.Lockscreen)
}
@Test
@@ -163,9 +163,9 @@
AuthenticationMethodModel.None
)
runCurrent()
- sceneInteractor.changeScene(SceneKey.Gone, "reason")
+ sceneInteractor.changeScene(Scenes.Gone, "reason")
- assertThat(upTransitionSceneKey).isEqualTo(SceneKey.Gone)
+ assertThat(upTransitionSceneKey).isEqualTo(Scenes.Gone)
}
@Test
@@ -206,7 +206,7 @@
underTest.onContentClicked()
- assertThat(currentScene).isEqualTo(SceneKey.Gone)
+ assertThat(currentScene).isEqualTo(Scenes.Gone)
}
@Test
@@ -221,7 +221,7 @@
underTest.onContentClicked()
- assertThat(currentScene).isEqualTo(SceneKey.Bouncer)
+ assertThat(currentScene).isEqualTo(Scenes.Bouncer)
}
@Test
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/NotificationStackAppearanceIntegrationTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/NotificationStackAppearanceIntegrationTest.kt
index efd8f00..47918c8 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/NotificationStackAppearanceIntegrationTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/NotificationStackAppearanceIntegrationTest.kt
@@ -20,6 +20,7 @@
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
+import com.android.compose.animation.scene.ObservableTransitionState
import com.android.systemui.SysuiTestCase
import com.android.systemui.common.shared.model.NotificationContainerBounds
import com.android.systemui.coroutines.collectLastValue
@@ -28,8 +29,7 @@
import com.android.systemui.kosmos.testScope
import com.android.systemui.scene.domain.interactor.sceneInteractor
import com.android.systemui.scene.shared.flag.fakeSceneContainerFlags
-import com.android.systemui.scene.shared.model.ObservableTransitionState
-import com.android.systemui.scene.shared.model.SceneKey
+import com.android.systemui.scene.shared.model.Scenes
import com.android.systemui.scene.shared.model.fakeSceneDataSource
import com.android.systemui.statusbar.notification.stack.ui.viewmodel.notificationStackAppearanceViewModel
import com.android.systemui.statusbar.notification.stack.ui.viewmodel.notificationsPlaceholderViewModel
@@ -92,19 +92,19 @@
testScope.runTest {
val transitionState =
MutableStateFlow<ObservableTransitionState>(
- ObservableTransitionState.Idle(scene = SceneKey.Gone)
+ ObservableTransitionState.Idle(scene = Scenes.Gone)
)
sceneInteractor.setTransitionState(transitionState)
val expandFraction by collectLastValue(appearanceViewModel.expandFraction)
assertThat(expandFraction).isEqualTo(0f)
fakeSceneDataSource.pause()
- sceneInteractor.changeScene(SceneKey.Shade, "reason")
+ sceneInteractor.changeScene(Scenes.Shade, "reason")
val transitionProgress = MutableStateFlow(0f)
transitionState.value =
ObservableTransitionState.Transition(
- fromScene = SceneKey.Gone,
- toScene = SceneKey.Shade,
+ fromScene = Scenes.Gone,
+ toScene = Scenes.Shade,
progress = transitionProgress,
isInitiatedByUserInput = false,
isUserInputOngoing = flowOf(false),
@@ -117,7 +117,7 @@
assertThat(expandFraction).isWithin(0.01f).of(progress)
}
- fakeSceneDataSource.unpause(expectedScene = SceneKey.Shade)
+ fakeSceneDataSource.unpause(expectedScene = Scenes.Shade)
assertThat(expandFraction).isWithin(0.01f).of(1f)
}
@@ -126,7 +126,7 @@
testScope.runTest {
val transitionState =
MutableStateFlow<ObservableTransitionState>(
- ObservableTransitionState.Idle(scene = SceneKey.Lockscreen)
+ ObservableTransitionState.Idle(scene = Scenes.Lockscreen)
)
sceneInteractor.setTransitionState(transitionState)
val expandFraction by collectLastValue(appearanceViewModel.expandFraction)
@@ -138,19 +138,19 @@
testScope.runTest {
val transitionState =
MutableStateFlow<ObservableTransitionState>(
- ObservableTransitionState.Idle(scene = SceneKey.Shade)
+ ObservableTransitionState.Idle(scene = Scenes.Shade)
)
sceneInteractor.setTransitionState(transitionState)
val expandFraction by collectLastValue(appearanceViewModel.expandFraction)
assertThat(expandFraction).isEqualTo(1f)
fakeSceneDataSource.pause()
- sceneInteractor.changeScene(SceneKey.QuickSettings, "reason")
+ sceneInteractor.changeScene(Scenes.QuickSettings, "reason")
val transitionProgress = MutableStateFlow(0f)
transitionState.value =
ObservableTransitionState.Transition(
- fromScene = SceneKey.Shade,
- toScene = SceneKey.QuickSettings,
+ fromScene = Scenes.Shade,
+ toScene = Scenes.QuickSettings,
progress = transitionProgress,
isInitiatedByUserInput = false,
isUserInputOngoing = flowOf(false),
@@ -163,7 +163,7 @@
assertThat(expandFraction).isEqualTo(1f)
}
- fakeSceneDataSource.unpause(expectedScene = SceneKey.QuickSettings)
+ fakeSceneDataSource.unpause(expectedScene = Scenes.QuickSettings)
assertThat(expandFraction).isEqualTo(1f)
}
}
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/SharedNotificationContainerViewModelTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/SharedNotificationContainerViewModelTest.kt
index 7f5a658..0de15b8 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/SharedNotificationContainerViewModelTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/SharedNotificationContainerViewModelTest.kt
@@ -21,13 +21,13 @@
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
+import com.android.compose.animation.scene.ObservableTransitionState
import com.android.systemui.Flags.FLAG_CENTRALIZED_STATUS_BAR_HEIGHT_FIX
import com.android.systemui.SysuiTestCase
import com.android.systemui.common.shared.model.NotificationContainerBounds
import com.android.systemui.common.ui.data.repository.fakeConfigurationRepository
import com.android.systemui.communal.domain.interactor.communalInteractor
-import com.android.systemui.communal.shared.model.CommunalSceneKey
-import com.android.systemui.communal.shared.model.ObservableCommunalTransitionState
+import com.android.systemui.communal.shared.model.CommunalScenes
import com.android.systemui.coroutines.collectLastValue
import com.android.systemui.flags.Flags
import com.android.systemui.flags.fakeFeatureFlagsClassic
@@ -278,8 +278,8 @@
)
)
val idleTransitionState =
- MutableStateFlow<ObservableCommunalTransitionState>(
- ObservableCommunalTransitionState.Idle(CommunalSceneKey.Communal)
+ MutableStateFlow<ObservableTransitionState>(
+ ObservableTransitionState.Idle(CommunalScenes.Communal)
)
communalInteractor.setTransitionState(idleTransitionState)
runCurrent()
@@ -391,8 +391,8 @@
// Move to glanceable hub
val idleTransitionState =
- MutableStateFlow<ObservableCommunalTransitionState>(
- ObservableCommunalTransitionState.Idle(CommunalSceneKey.Communal)
+ MutableStateFlow<ObservableTransitionState>(
+ ObservableTransitionState.Idle(CommunalScenes.Communal)
)
communalInteractor.setTransitionState(idleTransitionState)
runCurrent()
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/phone/ActivityStarterImplTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/phone/ActivityStarterImplTest.kt
index c01f1c7..8aa0e3fc 100644
--- a/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/phone/ActivityStarterImplTest.kt
+++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/phone/ActivityStarterImplTest.kt
@@ -35,10 +35,10 @@
import com.android.systemui.plugins.ActivityStarter.OnDismissAction
import com.android.systemui.settings.UserTracker
import com.android.systemui.shade.ShadeController
-import com.android.systemui.shade.ShadeViewController
import com.android.systemui.shade.data.repository.FakeShadeRepository
import com.android.systemui.shade.data.repository.ShadeAnimationRepository
import com.android.systemui.shade.domain.interactor.ShadeAnimationInteractorLegacyImpl
+import com.android.systemui.statusbar.CommandQueue
import com.android.systemui.statusbar.NotificationLockscreenUserManager
import com.android.systemui.statusbar.NotificationShadeWindowController
import com.android.systemui.statusbar.SysuiStatusBarStateController
@@ -76,7 +76,7 @@
@Mock private lateinit var biometricUnlockController: BiometricUnlockController
@Mock private lateinit var keyguardViewMediator: KeyguardViewMediator
@Mock private lateinit var shadeController: ShadeController
- @Mock private lateinit var shadeViewController: ShadeViewController
+ @Mock private lateinit var commandQueue: CommandQueue
@Mock private lateinit var statusBarKeyguardViewManager: StatusBarKeyguardViewManager
@Mock private lateinit var mActivityTransitionAnimator: ActivityTransitionAnimator
@Mock private lateinit var lockScreenUserManager: NotificationLockscreenUserManager
@@ -105,7 +105,7 @@
Lazy { biometricUnlockController },
Lazy { keyguardViewMediator },
Lazy { shadeController },
- Lazy { shadeViewController },
+ commandQueue,
shadeAnimationInteractor,
Lazy { statusBarKeyguardViewManager },
Lazy { notifShadeWindowController },
diff --git a/packages/SystemUI/res/values-af/strings.xml b/packages/SystemUI/res/values-af/strings.xml
index c4d7f8b..515ef61 100644
--- a/packages/SystemUI/res/values-af/strings.xml
+++ b/packages/SystemUI/res/values-af/strings.xml
@@ -575,10 +575,8 @@
<string name="volume_ringer_status_normal" msgid="1339039682222461143">"Lui"</string>
<string name="volume_ringer_status_vibrate" msgid="6970078708957857825">"Vibreer"</string>
<string name="volume_ringer_status_silent" msgid="3691324657849880883">"Demp"</string>
- <!-- no translation found for media_device_cast (4786241789687569892) -->
- <skip />
- <!-- no translation found for stream_notification_unavailable (4313854556205836435) -->
- <skip />
+ <string name="media_device_cast" msgid="4786241789687569892">"Saai uit"</string>
+ <string name="stream_notification_unavailable" msgid="4313854556205836435">"Onbeskikbaar omdat luitoon gedemp is"</string>
<string name="volume_stream_content_description_unmute" msgid="7729576371406792977">"%1$s. Tik om te ontdemp."</string>
<string name="volume_stream_content_description_vibrate" msgid="4858111994183089761">"%1$s. Tik om op vibreer te stel. Toeganklikheidsdienste kan dalk gedemp wees."</string>
<string name="volume_stream_content_description_mute" msgid="4079046784917920984">"%1$s. Tik om te demp. Toeganklikheidsdienste kan dalk gedemp wees."</string>
diff --git a/packages/SystemUI/res/values-af/tiles_states_strings.xml b/packages/SystemUI/res/values-af/tiles_states_strings.xml
index 662aa71..1c9a7941 100644
--- a/packages/SystemUI/res/values-af/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-af/tiles_states_strings.xml
@@ -126,6 +126,9 @@
<item msgid="8259411607272330225">"Af"</item>
<item msgid="578444932039713369">"Aan"</item>
</string-array>
+ <!-- no translation found for tile_states_record_issue:0 (1727196795383575383) -->
+ <!-- no translation found for tile_states_record_issue:1 (9061144428113385092) -->
+ <!-- no translation found for tile_states_record_issue:2 (2984256114867200368) -->
<string-array name="tile_states_reverse">
<item msgid="3574611556622963971">"Onbeskikbaar"</item>
<item msgid="8707481475312432575">"Af"</item>
diff --git a/packages/SystemUI/res/values-am/strings.xml b/packages/SystemUI/res/values-am/strings.xml
index 37ba3c1..9763ff2 100644
--- a/packages/SystemUI/res/values-am/strings.xml
+++ b/packages/SystemUI/res/values-am/strings.xml
@@ -575,10 +575,8 @@
<string name="volume_ringer_status_normal" msgid="1339039682222461143">"ጥሪ"</string>
<string name="volume_ringer_status_vibrate" msgid="6970078708957857825">"ንዘር"</string>
<string name="volume_ringer_status_silent" msgid="3691324657849880883">"ድምጸ-ከል አድርግ"</string>
- <!-- no translation found for media_device_cast (4786241789687569892) -->
- <skip />
- <!-- no translation found for stream_notification_unavailable (4313854556205836435) -->
- <skip />
+ <string name="media_device_cast" msgid="4786241789687569892">"Cast"</string>
+ <string name="stream_notification_unavailable" msgid="4313854556205836435">"የጥሪ ድምጽ ስለተዘጋ አይገኝም"</string>
<string name="volume_stream_content_description_unmute" msgid="7729576371406792977">"%1$s። ድምጸ-ከል ለማድረግ መታ ያድርጉ"</string>
<string name="volume_stream_content_description_vibrate" msgid="4858111994183089761">"%1$s። ወደ ንዝረት ለማቀናበር መታ ያድርጉ። የተደራሽነት አገልግሎቶች ድምጸ-ከል ሊደረግባቸው ይችላል።"</string>
<string name="volume_stream_content_description_mute" msgid="4079046784917920984">"%1$s። ድምጸ-ከል ለማድረግ መታ ያድርጉ። የተደራሽነት አገልግሎቶች ድምጸ-ከል ሊደረግባቸው ይችላል።"</string>
diff --git a/packages/SystemUI/res/values-am/tiles_states_strings.xml b/packages/SystemUI/res/values-am/tiles_states_strings.xml
index e5d68d9..3fb24b9 100644
--- a/packages/SystemUI/res/values-am/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-am/tiles_states_strings.xml
@@ -126,6 +126,9 @@
<item msgid="8259411607272330225">"ጠፍቷል"</item>
<item msgid="578444932039713369">"በርቷል"</item>
</string-array>
+ <!-- no translation found for tile_states_record_issue:0 (1727196795383575383) -->
+ <!-- no translation found for tile_states_record_issue:1 (9061144428113385092) -->
+ <!-- no translation found for tile_states_record_issue:2 (2984256114867200368) -->
<string-array name="tile_states_reverse">
<item msgid="3574611556622963971">"አይገኝም"</item>
<item msgid="8707481475312432575">"ጠፍቷል"</item>
diff --git a/packages/SystemUI/res/values-ar/strings.xml b/packages/SystemUI/res/values-ar/strings.xml
index 1de96ae..1b7e303 100644
--- a/packages/SystemUI/res/values-ar/strings.xml
+++ b/packages/SystemUI/res/values-ar/strings.xml
@@ -575,10 +575,8 @@
<string name="volume_ringer_status_normal" msgid="1339039682222461143">"استصدار رنين"</string>
<string name="volume_ringer_status_vibrate" msgid="6970078708957857825">"اهتزاز"</string>
<string name="volume_ringer_status_silent" msgid="3691324657849880883">"كتم الصوت"</string>
- <!-- no translation found for media_device_cast (4786241789687569892) -->
- <skip />
- <!-- no translation found for stream_notification_unavailable (4313854556205836435) -->
- <skip />
+ <string name="media_device_cast" msgid="4786241789687569892">"البثّ"</string>
+ <string name="stream_notification_unavailable" msgid="4313854556205836435">"يتعذّر التغيير بسبب كتم صوت الرنين."</string>
<string name="volume_stream_content_description_unmute" msgid="7729576371406792977">"%1$s. انقر لإلغاء التجاهل."</string>
<string name="volume_stream_content_description_vibrate" msgid="4858111994183089761">"%1$s. انقر للتعيين على الاهتزاز. قد يتم تجاهل خدمات \"سهولة الاستخدام\"."</string>
<string name="volume_stream_content_description_mute" msgid="4079046784917920984">"%1$s. انقر للتجاهل. قد يتم تجاهل خدمات \"سهولة الاستخدام\"."</string>
diff --git a/packages/SystemUI/res/values-ar/tiles_states_strings.xml b/packages/SystemUI/res/values-ar/tiles_states_strings.xml
index 856ae1d..cf050ac 100644
--- a/packages/SystemUI/res/values-ar/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-ar/tiles_states_strings.xml
@@ -126,6 +126,9 @@
<item msgid="8259411607272330225">"الميزة غير مفعّلة"</item>
<item msgid="578444932039713369">"الميزة مفعّلة"</item>
</string-array>
+ <!-- no translation found for tile_states_record_issue:0 (1727196795383575383) -->
+ <!-- no translation found for tile_states_record_issue:1 (9061144428113385092) -->
+ <!-- no translation found for tile_states_record_issue:2 (2984256114867200368) -->
<string-array name="tile_states_reverse">
<item msgid="3574611556622963971">"الميزة غير متاحة"</item>
<item msgid="8707481475312432575">"الميزة غير مفعّلة"</item>
diff --git a/packages/SystemUI/res/values-as/strings.xml b/packages/SystemUI/res/values-as/strings.xml
index da69f77..429f03e 100644
--- a/packages/SystemUI/res/values-as/strings.xml
+++ b/packages/SystemUI/res/values-as/strings.xml
@@ -575,10 +575,8 @@
<string name="volume_ringer_status_normal" msgid="1339039682222461143">"ৰিং"</string>
<string name="volume_ringer_status_vibrate" msgid="6970078708957857825">"কম্পন"</string>
<string name="volume_ringer_status_silent" msgid="3691324657849880883">"মিউট"</string>
- <!-- no translation found for media_device_cast (4786241789687569892) -->
- <skip />
- <!-- no translation found for stream_notification_unavailable (4313854556205836435) -->
- <skip />
+ <string name="media_device_cast" msgid="4786241789687569892">"কাষ্ট কৰক"</string>
+ <string name="stream_notification_unavailable" msgid="4313854556205836435">"ৰিং মিউট কৰি থোৱাৰ বাবে উপলব্ধ নহয়"</string>
<string name="volume_stream_content_description_unmute" msgid="7729576371406792977">"%1$s। আনমিউট কৰিবৰ বাবে টিপক।"</string>
<string name="volume_stream_content_description_vibrate" msgid="4858111994183089761">"%1$s। কম্পনৰ বাবে টিপক। দিব্য়াংগসকলৰ বাবে থকা সেৱা মিউট হৈ থাকিব পাৰে।"</string>
<string name="volume_stream_content_description_mute" msgid="4079046784917920984">"%1$s। মিউট কৰিবলৈ টিপক। দিব্য়াংগসকলৰ বাবে থকা সেৱা মিউট হৈ থাকিব পাৰে।"</string>
diff --git a/packages/SystemUI/res/values-as/tiles_states_strings.xml b/packages/SystemUI/res/values-as/tiles_states_strings.xml
index a9c3e3b..f4268ed 100644
--- a/packages/SystemUI/res/values-as/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-as/tiles_states_strings.xml
@@ -126,6 +126,9 @@
<item msgid="8259411607272330225">"অফ আছে"</item>
<item msgid="578444932039713369">"অন কৰা আছে"</item>
</string-array>
+ <!-- no translation found for tile_states_record_issue:0 (1727196795383575383) -->
+ <!-- no translation found for tile_states_record_issue:1 (9061144428113385092) -->
+ <!-- no translation found for tile_states_record_issue:2 (2984256114867200368) -->
<string-array name="tile_states_reverse">
<item msgid="3574611556622963971">"উপলব্ধ নহয়"</item>
<item msgid="8707481475312432575">"অফ আছে"</item>
diff --git a/packages/SystemUI/res/values-az/strings.xml b/packages/SystemUI/res/values-az/strings.xml
index 8857ddb..639cbbc 100644
--- a/packages/SystemUI/res/values-az/strings.xml
+++ b/packages/SystemUI/res/values-az/strings.xml
@@ -575,10 +575,8 @@
<string name="volume_ringer_status_normal" msgid="1339039682222461143">"Zəng"</string>
<string name="volume_ringer_status_vibrate" msgid="6970078708957857825">"Vibrasiya"</string>
<string name="volume_ringer_status_silent" msgid="3691324657849880883">"Susdurun"</string>
- <!-- no translation found for media_device_cast (4786241789687569892) -->
- <skip />
- <!-- no translation found for stream_notification_unavailable (4313854556205836435) -->
- <skip />
+ <string name="media_device_cast" msgid="4786241789687569892">"Yayım"</string>
+ <string name="stream_notification_unavailable" msgid="4313854556205836435">"Zəng səssiz edildiyi üçün əlçatan deyil"</string>
<string name="volume_stream_content_description_unmute" msgid="7729576371406792977">"%1$s. Səsli etmək üçün tıklayın."</string>
<string name="volume_stream_content_description_vibrate" msgid="4858111994183089761">"%1$s. Vibrasiyanı ayarlamaq üçün tıklayın. Əlçatımlılıq xidmətləri səssiz edilmiş ola bilər."</string>
<string name="volume_stream_content_description_mute" msgid="4079046784917920984">"%1$s. Səssiz etmək üçün tıklayın. Əlçatımlılıq xidmətləri səssiz edilmiş ola bilər."</string>
diff --git a/packages/SystemUI/res/values-az/tiles_states_strings.xml b/packages/SystemUI/res/values-az/tiles_states_strings.xml
index d973e4e..eeb81cc 100644
--- a/packages/SystemUI/res/values-az/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-az/tiles_states_strings.xml
@@ -126,6 +126,9 @@
<item msgid="8259411607272330225">"Deaktiv"</item>
<item msgid="578444932039713369">"Aktiv"</item>
</string-array>
+ <!-- no translation found for tile_states_record_issue:0 (1727196795383575383) -->
+ <!-- no translation found for tile_states_record_issue:1 (9061144428113385092) -->
+ <!-- no translation found for tile_states_record_issue:2 (2984256114867200368) -->
<string-array name="tile_states_reverse">
<item msgid="3574611556622963971">"Əlçatan deyil"</item>
<item msgid="8707481475312432575">"Deaktiv"</item>
diff --git a/packages/SystemUI/res/values-b+sr+Latn/strings.xml b/packages/SystemUI/res/values-b+sr+Latn/strings.xml
index 677f169..e97dbec 100644
--- a/packages/SystemUI/res/values-b+sr+Latn/strings.xml
+++ b/packages/SystemUI/res/values-b+sr+Latn/strings.xml
@@ -575,10 +575,8 @@
<string name="volume_ringer_status_normal" msgid="1339039682222461143">"Aktiviraj zvono"</string>
<string name="volume_ringer_status_vibrate" msgid="6970078708957857825">"Vibriraj"</string>
<string name="volume_ringer_status_silent" msgid="3691324657849880883">"Isključi zvuk"</string>
- <!-- no translation found for media_device_cast (4786241789687569892) -->
- <skip />
- <!-- no translation found for stream_notification_unavailable (4313854556205836435) -->
- <skip />
+ <string name="media_device_cast" msgid="4786241789687569892">"Prebacivanje"</string>
+ <string name="stream_notification_unavailable" msgid="4313854556205836435">"Nedostupno jer je zvuk isključen"</string>
<string name="volume_stream_content_description_unmute" msgid="7729576371406792977">"%1$s. Dodirnite da biste uključili zvuk."</string>
<string name="volume_stream_content_description_vibrate" msgid="4858111994183089761">"%1$s. Dodirnite da biste podesili na vibraciju. Zvuk usluga pristupačnosti će možda biti isključen."</string>
<string name="volume_stream_content_description_mute" msgid="4079046784917920984">"%1$s. Dodirnite da biste isključili zvuk. Zvuk usluga pristupačnosti će možda biti isključen."</string>
diff --git a/packages/SystemUI/res/values-b+sr+Latn/tiles_states_strings.xml b/packages/SystemUI/res/values-b+sr+Latn/tiles_states_strings.xml
index 32051ef..217d999 100644
--- a/packages/SystemUI/res/values-b+sr+Latn/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-b+sr+Latn/tiles_states_strings.xml
@@ -126,6 +126,9 @@
<item msgid="8259411607272330225">"Isključeno"</item>
<item msgid="578444932039713369">"Uključeno"</item>
</string-array>
+ <!-- no translation found for tile_states_record_issue:0 (1727196795383575383) -->
+ <!-- no translation found for tile_states_record_issue:1 (9061144428113385092) -->
+ <!-- no translation found for tile_states_record_issue:2 (2984256114867200368) -->
<string-array name="tile_states_reverse">
<item msgid="3574611556622963971">"Nedostupno"</item>
<item msgid="8707481475312432575">"Isključeno"</item>
diff --git a/packages/SystemUI/res/values-be/strings.xml b/packages/SystemUI/res/values-be/strings.xml
index 7feb160..3b06d05 100644
--- a/packages/SystemUI/res/values-be/strings.xml
+++ b/packages/SystemUI/res/values-be/strings.xml
@@ -575,10 +575,8 @@
<string name="volume_ringer_status_normal" msgid="1339039682222461143">"Званок"</string>
<string name="volume_ringer_status_vibrate" msgid="6970078708957857825">"Вібрацыя"</string>
<string name="volume_ringer_status_silent" msgid="3691324657849880883">"Гук выключаны"</string>
- <!-- no translation found for media_device_cast (4786241789687569892) -->
- <skip />
- <!-- no translation found for stream_notification_unavailable (4313854556205836435) -->
- <skip />
+ <string name="media_device_cast" msgid="4786241789687569892">"Трансляцыя"</string>
+ <string name="stream_notification_unavailable" msgid="4313854556205836435">"Недаступна, бо выключаны гук выклікаў"</string>
<string name="volume_stream_content_description_unmute" msgid="7729576371406792977">"%1$s. Дакраніцеся, каб уключыць гук."</string>
<string name="volume_stream_content_description_vibrate" msgid="4858111994183089761">"%1$s. Дакраніцеся, каб уключыць вібрацыю. Можа быць адключаны гук службаў спецыяльных магчымасцей."</string>
<string name="volume_stream_content_description_mute" msgid="4079046784917920984">"%1$s. Дакраніцеся, каб адключыць гук. Можа быць адключаны гук службаў спецыяльных магчымасцей."</string>
diff --git a/packages/SystemUI/res/values-be/tiles_states_strings.xml b/packages/SystemUI/res/values-be/tiles_states_strings.xml
index e71c29b..717e4c9 100644
--- a/packages/SystemUI/res/values-be/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-be/tiles_states_strings.xml
@@ -126,6 +126,9 @@
<item msgid="8259411607272330225">"Выключана"</item>
<item msgid="578444932039713369">"Уключана"</item>
</string-array>
+ <!-- no translation found for tile_states_record_issue:0 (1727196795383575383) -->
+ <!-- no translation found for tile_states_record_issue:1 (9061144428113385092) -->
+ <!-- no translation found for tile_states_record_issue:2 (2984256114867200368) -->
<string-array name="tile_states_reverse">
<item msgid="3574611556622963971">"Недаступна"</item>
<item msgid="8707481475312432575">"Выключана"</item>
diff --git a/packages/SystemUI/res/values-bg/strings.xml b/packages/SystemUI/res/values-bg/strings.xml
index d684d65..643ef9c 100644
--- a/packages/SystemUI/res/values-bg/strings.xml
+++ b/packages/SystemUI/res/values-bg/strings.xml
@@ -575,10 +575,8 @@
<string name="volume_ringer_status_normal" msgid="1339039682222461143">"Позвъняване"</string>
<string name="volume_ringer_status_vibrate" msgid="6970078708957857825">"Вибриране"</string>
<string name="volume_ringer_status_silent" msgid="3691324657849880883">"Без звук"</string>
- <!-- no translation found for media_device_cast (4786241789687569892) -->
- <skip />
- <!-- no translation found for stream_notification_unavailable (4313854556205836435) -->
- <skip />
+ <string name="media_device_cast" msgid="4786241789687569892">"Предаване"</string>
+ <string name="stream_notification_unavailable" msgid="4313854556205836435">"Не е налице, защото звъненето е спряно"</string>
<string name="volume_stream_content_description_unmute" msgid="7729576371406792977">"%1$s. Докоснете, за да включите отново звука."</string>
<string name="volume_stream_content_description_vibrate" msgid="4858111994183089761">"%1$s. Докоснете, за да зададете вибриране. Възможно е звукът на услугите за достъпност да бъде заглушен."</string>
<string name="volume_stream_content_description_mute" msgid="4079046784917920984">"%1$s. Докоснете, за да заглушите звука. Възможно е звукът на услугите за достъпност да бъде заглушен."</string>
diff --git a/packages/SystemUI/res/values-bg/tiles_states_strings.xml b/packages/SystemUI/res/values-bg/tiles_states_strings.xml
index 24b41d2..58fa82b 100644
--- a/packages/SystemUI/res/values-bg/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-bg/tiles_states_strings.xml
@@ -126,6 +126,9 @@
<item msgid="8259411607272330225">"Изкл."</item>
<item msgid="578444932039713369">"Вкл."</item>
</string-array>
+ <!-- no translation found for tile_states_record_issue:0 (1727196795383575383) -->
+ <!-- no translation found for tile_states_record_issue:1 (9061144428113385092) -->
+ <!-- no translation found for tile_states_record_issue:2 (2984256114867200368) -->
<string-array name="tile_states_reverse">
<item msgid="3574611556622963971">"Не е налице"</item>
<item msgid="8707481475312432575">"Изкл."</item>
diff --git a/packages/SystemUI/res/values-bn/strings.xml b/packages/SystemUI/res/values-bn/strings.xml
index db52b2e..9a2f040 100644
--- a/packages/SystemUI/res/values-bn/strings.xml
+++ b/packages/SystemUI/res/values-bn/strings.xml
@@ -575,10 +575,8 @@
<string name="volume_ringer_status_normal" msgid="1339039682222461143">"রিং"</string>
<string name="volume_ringer_status_vibrate" msgid="6970078708957857825">"ভাইব্রেট"</string>
<string name="volume_ringer_status_silent" msgid="3691324657849880883">"মিউট"</string>
- <!-- no translation found for media_device_cast (4786241789687569892) -->
- <skip />
- <!-- no translation found for stream_notification_unavailable (4313854556205836435) -->
- <skip />
+ <string name="media_device_cast" msgid="4786241789687569892">"কাস্ট করুন"</string>
+ <string name="stream_notification_unavailable" msgid="4313854556205836435">"রিং মিউট করা হয়েছে বলে উপলভ্য নেই"</string>
<string name="volume_stream_content_description_unmute" msgid="7729576371406792977">"%1$s। সশব্দ করতে আলতো চাপুন।"</string>
<string name="volume_stream_content_description_vibrate" msgid="4858111994183089761">"%1$s। কম্পন এ সেট করতে আলতো চাপুন। অ্যাক্সেসযোগ্যতার পরিষেবাগুলিকে মিউট করা হতে পারে।"</string>
<string name="volume_stream_content_description_mute" msgid="4079046784917920984">"%1$s। মিউট করতে আলতো চাপুন। অ্যাক্সেসযোগ্যতার পরিষেবাগুলিকে মিউট করা হতে পারে।"</string>
diff --git a/packages/SystemUI/res/values-bn/tiles_states_strings.xml b/packages/SystemUI/res/values-bn/tiles_states_strings.xml
index 59061c2..5c3c66c 100644
--- a/packages/SystemUI/res/values-bn/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-bn/tiles_states_strings.xml
@@ -126,6 +126,9 @@
<item msgid="8259411607272330225">"বন্ধ আছে"</item>
<item msgid="578444932039713369">"চালু আছে"</item>
</string-array>
+ <!-- no translation found for tile_states_record_issue:0 (1727196795383575383) -->
+ <!-- no translation found for tile_states_record_issue:1 (9061144428113385092) -->
+ <!-- no translation found for tile_states_record_issue:2 (2984256114867200368) -->
<string-array name="tile_states_reverse">
<item msgid="3574611556622963971">"উপলভ্য নেই"</item>
<item msgid="8707481475312432575">"বন্ধ আছে"</item>
diff --git a/packages/SystemUI/res/values-bs/strings.xml b/packages/SystemUI/res/values-bs/strings.xml
index 3d54f6c..db102a0 100644
--- a/packages/SystemUI/res/values-bs/strings.xml
+++ b/packages/SystemUI/res/values-bs/strings.xml
@@ -575,10 +575,8 @@
<string name="volume_ringer_status_normal" msgid="1339039682222461143">"Zvono"</string>
<string name="volume_ringer_status_vibrate" msgid="6970078708957857825">"Vibriranje"</string>
<string name="volume_ringer_status_silent" msgid="3691324657849880883">"Isključi zvuk"</string>
- <!-- no translation found for media_device_cast (4786241789687569892) -->
- <skip />
- <!-- no translation found for stream_notification_unavailable (4313854556205836435) -->
- <skip />
+ <string name="media_device_cast" msgid="4786241789687569892">"Emitiraj"</string>
+ <string name="stream_notification_unavailable" msgid="4313854556205836435">"Nedostupno zbog isključenog zvona"</string>
<string name="volume_stream_content_description_unmute" msgid="7729576371406792977">"%1$s. Dodirnite da uključite zvukove."</string>
<string name="volume_stream_content_description_vibrate" msgid="4858111994183089761">"%1$s. Dodirnite za postavljanje vibracije. Zvukovi usluga pristupačnosti mogu biti isključeni."</string>
<string name="volume_stream_content_description_mute" msgid="4079046784917920984">"%1$s. Dodirnite da isključite zvuk. Zvukovi usluga pristupačnosti mogu biti isključeni."</string>
diff --git a/packages/SystemUI/res/values-bs/tiles_states_strings.xml b/packages/SystemUI/res/values-bs/tiles_states_strings.xml
index 32051ef..217d999 100644
--- a/packages/SystemUI/res/values-bs/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-bs/tiles_states_strings.xml
@@ -126,6 +126,9 @@
<item msgid="8259411607272330225">"Isključeno"</item>
<item msgid="578444932039713369">"Uključeno"</item>
</string-array>
+ <!-- no translation found for tile_states_record_issue:0 (1727196795383575383) -->
+ <!-- no translation found for tile_states_record_issue:1 (9061144428113385092) -->
+ <!-- no translation found for tile_states_record_issue:2 (2984256114867200368) -->
<string-array name="tile_states_reverse">
<item msgid="3574611556622963971">"Nedostupno"</item>
<item msgid="8707481475312432575">"Isključeno"</item>
diff --git a/packages/SystemUI/res/values-ca/strings.xml b/packages/SystemUI/res/values-ca/strings.xml
index bcc451b..c528734 100644
--- a/packages/SystemUI/res/values-ca/strings.xml
+++ b/packages/SystemUI/res/values-ca/strings.xml
@@ -575,10 +575,8 @@
<string name="volume_ringer_status_normal" msgid="1339039682222461143">"Fes sonar"</string>
<string name="volume_ringer_status_vibrate" msgid="6970078708957857825">"Vibra"</string>
<string name="volume_ringer_status_silent" msgid="3691324657849880883">"Silencia"</string>
- <!-- no translation found for media_device_cast (4786241789687569892) -->
- <skip />
- <!-- no translation found for stream_notification_unavailable (4313854556205836435) -->
- <skip />
+ <string name="media_device_cast" msgid="4786241789687569892">"Emet"</string>
+ <string name="stream_notification_unavailable" msgid="4313854556205836435">"No disponible perquè el so està silenciat"</string>
<string name="volume_stream_content_description_unmute" msgid="7729576371406792977">"%1$s. Toca per activar el so."</string>
<string name="volume_stream_content_description_vibrate" msgid="4858111994183089761">"%1$s. Toca per activar la vibració. Pot ser que els serveis d\'accessibilitat se silenciïn."</string>
<string name="volume_stream_content_description_mute" msgid="4079046784917920984">"%1$s. Toca per silenciar el so. Pot ser que els serveis d\'accessibilitat se silenciïn."</string>
diff --git a/packages/SystemUI/res/values-ca/tiles_states_strings.xml b/packages/SystemUI/res/values-ca/tiles_states_strings.xml
index e99926c..c1ac5a3 100644
--- a/packages/SystemUI/res/values-ca/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-ca/tiles_states_strings.xml
@@ -126,6 +126,9 @@
<item msgid="8259411607272330225">"Desactivat"</item>
<item msgid="578444932039713369">"Activat"</item>
</string-array>
+ <!-- no translation found for tile_states_record_issue:0 (1727196795383575383) -->
+ <!-- no translation found for tile_states_record_issue:1 (9061144428113385092) -->
+ <!-- no translation found for tile_states_record_issue:2 (2984256114867200368) -->
<string-array name="tile_states_reverse">
<item msgid="3574611556622963971">"No disponible"</item>
<item msgid="8707481475312432575">"Desactivat"</item>
diff --git a/packages/SystemUI/res/values-cs/strings.xml b/packages/SystemUI/res/values-cs/strings.xml
index bf7566a..f29dabb 100644
--- a/packages/SystemUI/res/values-cs/strings.xml
+++ b/packages/SystemUI/res/values-cs/strings.xml
@@ -575,10 +575,8 @@
<string name="volume_ringer_status_normal" msgid="1339039682222461143">"Vyzvánění"</string>
<string name="volume_ringer_status_vibrate" msgid="6970078708957857825">"Vibrace"</string>
<string name="volume_ringer_status_silent" msgid="3691324657849880883">"Ztlumení"</string>
- <!-- no translation found for media_device_cast (4786241789687569892) -->
- <skip />
- <!-- no translation found for stream_notification_unavailable (4313854556205836435) -->
- <skip />
+ <string name="media_device_cast" msgid="4786241789687569892">"Odesílání"</string>
+ <string name="stream_notification_unavailable" msgid="4313854556205836435">"Nedostupné, protože vyzvánění je ztlumené"</string>
<string name="volume_stream_content_description_unmute" msgid="7729576371406792977">"%1$s. Klepnutím zapnete zvuk."</string>
<string name="volume_stream_content_description_vibrate" msgid="4858111994183089761">"%1$s. Klepnutím aktivujete režim vibrací. Služby přístupnosti mohou být ztlumeny."</string>
<string name="volume_stream_content_description_mute" msgid="4079046784917920984">"%1$s. Klepnutím vypnete zvuk. Služby přístupnosti mohou být ztlumeny."</string>
diff --git a/packages/SystemUI/res/values-cs/tiles_states_strings.xml b/packages/SystemUI/res/values-cs/tiles_states_strings.xml
index 6359f94..0a4d4d0 100644
--- a/packages/SystemUI/res/values-cs/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-cs/tiles_states_strings.xml
@@ -126,6 +126,9 @@
<item msgid="8259411607272330225">"Vypnuto"</item>
<item msgid="578444932039713369">"Zapnuto"</item>
</string-array>
+ <!-- no translation found for tile_states_record_issue:0 (1727196795383575383) -->
+ <!-- no translation found for tile_states_record_issue:1 (9061144428113385092) -->
+ <!-- no translation found for tile_states_record_issue:2 (2984256114867200368) -->
<string-array name="tile_states_reverse">
<item msgid="3574611556622963971">"Nedostupné"</item>
<item msgid="8707481475312432575">"Vypnuto"</item>
diff --git a/packages/SystemUI/res/values-da/strings.xml b/packages/SystemUI/res/values-da/strings.xml
index 60cf76a..ec899f2 100644
--- a/packages/SystemUI/res/values-da/strings.xml
+++ b/packages/SystemUI/res/values-da/strings.xml
@@ -575,10 +575,8 @@
<string name="volume_ringer_status_normal" msgid="1339039682222461143">"Ring"</string>
<string name="volume_ringer_status_vibrate" msgid="6970078708957857825">"Vibration"</string>
<string name="volume_ringer_status_silent" msgid="3691324657849880883">"Slå lyden fra"</string>
- <!-- no translation found for media_device_cast (4786241789687569892) -->
- <skip />
- <!-- no translation found for stream_notification_unavailable (4313854556205836435) -->
- <skip />
+ <string name="media_device_cast" msgid="4786241789687569892">"Cast"</string>
+ <string name="stream_notification_unavailable" msgid="4313854556205836435">"Ikke muligt, da ringetonen er slået fra"</string>
<string name="volume_stream_content_description_unmute" msgid="7729576371406792977">"%1$s. Tryk for at slå lyden til."</string>
<string name="volume_stream_content_description_vibrate" msgid="4858111994183089761">"%1$s. Tryk for at konfigurere til at vibrere. Tilgængelighedstjenester kan blive deaktiveret."</string>
<string name="volume_stream_content_description_mute" msgid="4079046784917920984">"%1$s. Tryk for at slå lyden fra. Lyden i tilgængelighedstjenester kan blive slået fra."</string>
diff --git a/packages/SystemUI/res/values-da/tiles_states_strings.xml b/packages/SystemUI/res/values-da/tiles_states_strings.xml
index 1daed4c..2391753 100644
--- a/packages/SystemUI/res/values-da/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-da/tiles_states_strings.xml
@@ -126,6 +126,9 @@
<item msgid="8259411607272330225">"Fra"</item>
<item msgid="578444932039713369">"Til"</item>
</string-array>
+ <!-- no translation found for tile_states_record_issue:0 (1727196795383575383) -->
+ <!-- no translation found for tile_states_record_issue:1 (9061144428113385092) -->
+ <!-- no translation found for tile_states_record_issue:2 (2984256114867200368) -->
<string-array name="tile_states_reverse">
<item msgid="3574611556622963971">"Ikke tilgængelig"</item>
<item msgid="8707481475312432575">"Fra"</item>
diff --git a/packages/SystemUI/res/values-de/strings.xml b/packages/SystemUI/res/values-de/strings.xml
index 60165d2..f7e74c9 100644
--- a/packages/SystemUI/res/values-de/strings.xml
+++ b/packages/SystemUI/res/values-de/strings.xml
@@ -575,10 +575,8 @@
<string name="volume_ringer_status_normal" msgid="1339039682222461143">"Klingeln lassen"</string>
<string name="volume_ringer_status_vibrate" msgid="6970078708957857825">"Vibrieren"</string>
<string name="volume_ringer_status_silent" msgid="3691324657849880883">"Stummschalten"</string>
- <!-- no translation found for media_device_cast (4786241789687569892) -->
- <skip />
- <!-- no translation found for stream_notification_unavailable (4313854556205836435) -->
- <skip />
+ <string name="media_device_cast" msgid="4786241789687569892">"Stream"</string>
+ <string name="stream_notification_unavailable" msgid="4313854556205836435">"Nicht verfügbar, da Klingelton stumm"</string>
<string name="volume_stream_content_description_unmute" msgid="7729576371406792977">"%1$s. Zum Aufheben der Stummschaltung tippen."</string>
<string name="volume_stream_content_description_vibrate" msgid="4858111994183089761">"%1$s. Tippen, um Vibrieren festzulegen. Bedienungshilfen werden unter Umständen stummgeschaltet."</string>
<string name="volume_stream_content_description_mute" msgid="4079046784917920984">"%1$s. Zum Stummschalten tippen. Bedienungshilfen werden unter Umständen stummgeschaltet."</string>
diff --git a/packages/SystemUI/res/values-de/tiles_states_strings.xml b/packages/SystemUI/res/values-de/tiles_states_strings.xml
index 9a08747..3aae04b 100644
--- a/packages/SystemUI/res/values-de/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-de/tiles_states_strings.xml
@@ -126,6 +126,9 @@
<item msgid="8259411607272330225">"Aus"</item>
<item msgid="578444932039713369">"An"</item>
</string-array>
+ <!-- no translation found for tile_states_record_issue:0 (1727196795383575383) -->
+ <!-- no translation found for tile_states_record_issue:1 (9061144428113385092) -->
+ <!-- no translation found for tile_states_record_issue:2 (2984256114867200368) -->
<string-array name="tile_states_reverse">
<item msgid="3574611556622963971">"Nicht verfügbar"</item>
<item msgid="8707481475312432575">"Aus"</item>
diff --git a/packages/SystemUI/res/values-el/strings.xml b/packages/SystemUI/res/values-el/strings.xml
index 6c45adf..6b341fd 100644
--- a/packages/SystemUI/res/values-el/strings.xml
+++ b/packages/SystemUI/res/values-el/strings.xml
@@ -575,10 +575,8 @@
<string name="volume_ringer_status_normal" msgid="1339039682222461143">"Κουδούνισμα"</string>
<string name="volume_ringer_status_vibrate" msgid="6970078708957857825">"Δόνηση"</string>
<string name="volume_ringer_status_silent" msgid="3691324657849880883">"Σίγαση"</string>
- <!-- no translation found for media_device_cast (4786241789687569892) -->
- <skip />
- <!-- no translation found for stream_notification_unavailable (4313854556205836435) -->
- <skip />
+ <string name="media_device_cast" msgid="4786241789687569892">"Μετάδοση"</string>
+ <string name="stream_notification_unavailable" msgid="4313854556205836435">"Μη διαθέσιμο λόγω σίγασης ήχου κλήσης"</string>
<string name="volume_stream_content_description_unmute" msgid="7729576371406792977">"%1$s. Πατήστε για κατάργηση σίγασης."</string>
<string name="volume_stream_content_description_vibrate" msgid="4858111994183089761">"%1$s. Πατήστε για ενεργοποιήσετε τη δόνηση. Οι υπηρεσίες προσβασιμότητας ενδέχεται να τεθούν σε σίγαση."</string>
<string name="volume_stream_content_description_mute" msgid="4079046784917920984">"%1$s. Πατήστε για σίγαση. Οι υπηρεσίες προσβασιμότητας ενδέχεται να τεθούν σε σίγαση."</string>
diff --git a/packages/SystemUI/res/values-el/tiles_states_strings.xml b/packages/SystemUI/res/values-el/tiles_states_strings.xml
index 4d94515..035f117 100644
--- a/packages/SystemUI/res/values-el/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-el/tiles_states_strings.xml
@@ -126,6 +126,9 @@
<item msgid="8259411607272330225">"Ανενεργό"</item>
<item msgid="578444932039713369">"Ενεργό"</item>
</string-array>
+ <!-- no translation found for tile_states_record_issue:0 (1727196795383575383) -->
+ <!-- no translation found for tile_states_record_issue:1 (9061144428113385092) -->
+ <!-- no translation found for tile_states_record_issue:2 (2984256114867200368) -->
<string-array name="tile_states_reverse">
<item msgid="3574611556622963971">"Μη διαθέσιμο"</item>
<item msgid="8707481475312432575">"Ανενεργό"</item>
diff --git a/packages/SystemUI/res/values-en-rAU/strings.xml b/packages/SystemUI/res/values-en-rAU/strings.xml
index 3dbe2dc..021f7db 100644
--- a/packages/SystemUI/res/values-en-rAU/strings.xml
+++ b/packages/SystemUI/res/values-en-rAU/strings.xml
@@ -429,8 +429,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"Add more widgets"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"Long press to customise widgets"</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"Customise widgets"</string>
- <!-- no translation found for icon_description_for_disabled_widget (4693151565003206943) -->
- <skip />
+ <string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"App icon for disabled widget"</string>
<string name="edit_widget" msgid="9030848101135393954">"Edit widget"</string>
<string name="button_to_remove_widget" msgid="3948204829181214098">"Remove"</string>
<string name="hub_mode_add_widget_button_text" msgid="4831464661209971729">"Add widget"</string>
@@ -575,10 +574,8 @@
<string name="volume_ringer_status_normal" msgid="1339039682222461143">"Ring"</string>
<string name="volume_ringer_status_vibrate" msgid="6970078708957857825">"Vibrate"</string>
<string name="volume_ringer_status_silent" msgid="3691324657849880883">"Mute"</string>
- <!-- no translation found for media_device_cast (4786241789687569892) -->
- <skip />
- <!-- no translation found for stream_notification_unavailable (4313854556205836435) -->
- <skip />
+ <string name="media_device_cast" msgid="4786241789687569892">"Cast"</string>
+ <string name="stream_notification_unavailable" msgid="4313854556205836435">"Unavailable because ring is muted"</string>
<string name="volume_stream_content_description_unmute" msgid="7729576371406792977">"%1$s. Tap to unmute."</string>
<string name="volume_stream_content_description_vibrate" msgid="4858111994183089761">"%1$s. Tap to set to vibrate. Accessibility services may be muted."</string>
<string name="volume_stream_content_description_mute" msgid="4079046784917920984">"%1$s. Tap to mute. Accessibility services may be muted."</string>
@@ -839,10 +836,8 @@
<string name="accessibility_quick_settings_power_menu" msgid="6820426108301758412">"Power menu"</string>
<string name="accessibility_quick_settings_page" msgid="7506322631645550961">"Page <xliff:g id="ID_1">%1$d</xliff:g> of <xliff:g id="ID_2">%2$d</xliff:g>"</string>
<string name="tuner_lock_screen" msgid="2267383813241144544">"Lock screen"</string>
- <!-- no translation found for finder_active (7907846989716941952) -->
- <skip />
- <!-- no translation found for shutdown_progress (5464239146561542178) -->
- <skip />
+ <string name="finder_active" msgid="7907846989716941952">"You can locate this phone with Find My Device even when powered off"</string>
+ <string name="shutdown_progress" msgid="5464239146561542178">"Shutting down…"</string>
<string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"See care steps"</string>
<string name="high_temp_dialog_help_text" msgid="7380171287943345858">"See care steps"</string>
<string name="high_temp_alarm_title" msgid="8654754369605452169">"Unplug your device"</string>
diff --git a/packages/SystemUI/res/values-en-rAU/tiles_states_strings.xml b/packages/SystemUI/res/values-en-rAU/tiles_states_strings.xml
index 0cf2868..2576b60 100644
--- a/packages/SystemUI/res/values-en-rAU/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-en-rAU/tiles_states_strings.xml
@@ -126,6 +126,9 @@
<item msgid="8259411607272330225">"Off"</item>
<item msgid="578444932039713369">"On"</item>
</string-array>
+ <!-- no translation found for tile_states_record_issue:0 (1727196795383575383) -->
+ <!-- no translation found for tile_states_record_issue:1 (9061144428113385092) -->
+ <!-- no translation found for tile_states_record_issue:2 (2984256114867200368) -->
<string-array name="tile_states_reverse">
<item msgid="3574611556622963971">"Unavailable"</item>
<item msgid="8707481475312432575">"Off"</item>
diff --git a/packages/SystemUI/res/values-en-rCA/tiles_states_strings.xml b/packages/SystemUI/res/values-en-rCA/tiles_states_strings.xml
index 0cf2868..2576b60 100644
--- a/packages/SystemUI/res/values-en-rCA/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-en-rCA/tiles_states_strings.xml
@@ -126,6 +126,9 @@
<item msgid="8259411607272330225">"Off"</item>
<item msgid="578444932039713369">"On"</item>
</string-array>
+ <!-- no translation found for tile_states_record_issue:0 (1727196795383575383) -->
+ <!-- no translation found for tile_states_record_issue:1 (9061144428113385092) -->
+ <!-- no translation found for tile_states_record_issue:2 (2984256114867200368) -->
<string-array name="tile_states_reverse">
<item msgid="3574611556622963971">"Unavailable"</item>
<item msgid="8707481475312432575">"Off"</item>
diff --git a/packages/SystemUI/res/values-en-rGB/strings.xml b/packages/SystemUI/res/values-en-rGB/strings.xml
index 3dbe2dc..021f7db 100644
--- a/packages/SystemUI/res/values-en-rGB/strings.xml
+++ b/packages/SystemUI/res/values-en-rGB/strings.xml
@@ -429,8 +429,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"Add more widgets"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"Long press to customise widgets"</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"Customise widgets"</string>
- <!-- no translation found for icon_description_for_disabled_widget (4693151565003206943) -->
- <skip />
+ <string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"App icon for disabled widget"</string>
<string name="edit_widget" msgid="9030848101135393954">"Edit widget"</string>
<string name="button_to_remove_widget" msgid="3948204829181214098">"Remove"</string>
<string name="hub_mode_add_widget_button_text" msgid="4831464661209971729">"Add widget"</string>
@@ -575,10 +574,8 @@
<string name="volume_ringer_status_normal" msgid="1339039682222461143">"Ring"</string>
<string name="volume_ringer_status_vibrate" msgid="6970078708957857825">"Vibrate"</string>
<string name="volume_ringer_status_silent" msgid="3691324657849880883">"Mute"</string>
- <!-- no translation found for media_device_cast (4786241789687569892) -->
- <skip />
- <!-- no translation found for stream_notification_unavailable (4313854556205836435) -->
- <skip />
+ <string name="media_device_cast" msgid="4786241789687569892">"Cast"</string>
+ <string name="stream_notification_unavailable" msgid="4313854556205836435">"Unavailable because ring is muted"</string>
<string name="volume_stream_content_description_unmute" msgid="7729576371406792977">"%1$s. Tap to unmute."</string>
<string name="volume_stream_content_description_vibrate" msgid="4858111994183089761">"%1$s. Tap to set to vibrate. Accessibility services may be muted."</string>
<string name="volume_stream_content_description_mute" msgid="4079046784917920984">"%1$s. Tap to mute. Accessibility services may be muted."</string>
@@ -839,10 +836,8 @@
<string name="accessibility_quick_settings_power_menu" msgid="6820426108301758412">"Power menu"</string>
<string name="accessibility_quick_settings_page" msgid="7506322631645550961">"Page <xliff:g id="ID_1">%1$d</xliff:g> of <xliff:g id="ID_2">%2$d</xliff:g>"</string>
<string name="tuner_lock_screen" msgid="2267383813241144544">"Lock screen"</string>
- <!-- no translation found for finder_active (7907846989716941952) -->
- <skip />
- <!-- no translation found for shutdown_progress (5464239146561542178) -->
- <skip />
+ <string name="finder_active" msgid="7907846989716941952">"You can locate this phone with Find My Device even when powered off"</string>
+ <string name="shutdown_progress" msgid="5464239146561542178">"Shutting down…"</string>
<string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"See care steps"</string>
<string name="high_temp_dialog_help_text" msgid="7380171287943345858">"See care steps"</string>
<string name="high_temp_alarm_title" msgid="8654754369605452169">"Unplug your device"</string>
diff --git a/packages/SystemUI/res/values-en-rGB/tiles_states_strings.xml b/packages/SystemUI/res/values-en-rGB/tiles_states_strings.xml
index 0cf2868..2576b60 100644
--- a/packages/SystemUI/res/values-en-rGB/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-en-rGB/tiles_states_strings.xml
@@ -126,6 +126,9 @@
<item msgid="8259411607272330225">"Off"</item>
<item msgid="578444932039713369">"On"</item>
</string-array>
+ <!-- no translation found for tile_states_record_issue:0 (1727196795383575383) -->
+ <!-- no translation found for tile_states_record_issue:1 (9061144428113385092) -->
+ <!-- no translation found for tile_states_record_issue:2 (2984256114867200368) -->
<string-array name="tile_states_reverse">
<item msgid="3574611556622963971">"Unavailable"</item>
<item msgid="8707481475312432575">"Off"</item>
diff --git a/packages/SystemUI/res/values-en-rIN/strings.xml b/packages/SystemUI/res/values-en-rIN/strings.xml
index 3dbe2dc..021f7db 100644
--- a/packages/SystemUI/res/values-en-rIN/strings.xml
+++ b/packages/SystemUI/res/values-en-rIN/strings.xml
@@ -429,8 +429,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"Add more widgets"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"Long press to customise widgets"</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"Customise widgets"</string>
- <!-- no translation found for icon_description_for_disabled_widget (4693151565003206943) -->
- <skip />
+ <string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"App icon for disabled widget"</string>
<string name="edit_widget" msgid="9030848101135393954">"Edit widget"</string>
<string name="button_to_remove_widget" msgid="3948204829181214098">"Remove"</string>
<string name="hub_mode_add_widget_button_text" msgid="4831464661209971729">"Add widget"</string>
@@ -575,10 +574,8 @@
<string name="volume_ringer_status_normal" msgid="1339039682222461143">"Ring"</string>
<string name="volume_ringer_status_vibrate" msgid="6970078708957857825">"Vibrate"</string>
<string name="volume_ringer_status_silent" msgid="3691324657849880883">"Mute"</string>
- <!-- no translation found for media_device_cast (4786241789687569892) -->
- <skip />
- <!-- no translation found for stream_notification_unavailable (4313854556205836435) -->
- <skip />
+ <string name="media_device_cast" msgid="4786241789687569892">"Cast"</string>
+ <string name="stream_notification_unavailable" msgid="4313854556205836435">"Unavailable because ring is muted"</string>
<string name="volume_stream_content_description_unmute" msgid="7729576371406792977">"%1$s. Tap to unmute."</string>
<string name="volume_stream_content_description_vibrate" msgid="4858111994183089761">"%1$s. Tap to set to vibrate. Accessibility services may be muted."</string>
<string name="volume_stream_content_description_mute" msgid="4079046784917920984">"%1$s. Tap to mute. Accessibility services may be muted."</string>
@@ -839,10 +836,8 @@
<string name="accessibility_quick_settings_power_menu" msgid="6820426108301758412">"Power menu"</string>
<string name="accessibility_quick_settings_page" msgid="7506322631645550961">"Page <xliff:g id="ID_1">%1$d</xliff:g> of <xliff:g id="ID_2">%2$d</xliff:g>"</string>
<string name="tuner_lock_screen" msgid="2267383813241144544">"Lock screen"</string>
- <!-- no translation found for finder_active (7907846989716941952) -->
- <skip />
- <!-- no translation found for shutdown_progress (5464239146561542178) -->
- <skip />
+ <string name="finder_active" msgid="7907846989716941952">"You can locate this phone with Find My Device even when powered off"</string>
+ <string name="shutdown_progress" msgid="5464239146561542178">"Shutting down…"</string>
<string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"See care steps"</string>
<string name="high_temp_dialog_help_text" msgid="7380171287943345858">"See care steps"</string>
<string name="high_temp_alarm_title" msgid="8654754369605452169">"Unplug your device"</string>
diff --git a/packages/SystemUI/res/values-en-rIN/tiles_states_strings.xml b/packages/SystemUI/res/values-en-rIN/tiles_states_strings.xml
index 0cf2868..2576b60 100644
--- a/packages/SystemUI/res/values-en-rIN/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-en-rIN/tiles_states_strings.xml
@@ -126,6 +126,9 @@
<item msgid="8259411607272330225">"Off"</item>
<item msgid="578444932039713369">"On"</item>
</string-array>
+ <!-- no translation found for tile_states_record_issue:0 (1727196795383575383) -->
+ <!-- no translation found for tile_states_record_issue:1 (9061144428113385092) -->
+ <!-- no translation found for tile_states_record_issue:2 (2984256114867200368) -->
<string-array name="tile_states_reverse">
<item msgid="3574611556622963971">"Unavailable"</item>
<item msgid="8707481475312432575">"Off"</item>
diff --git a/packages/SystemUI/res/values-en-rXC/tiles_states_strings.xml b/packages/SystemUI/res/values-en-rXC/tiles_states_strings.xml
index b9c8e5f..42daf8a 100644
--- a/packages/SystemUI/res/values-en-rXC/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-en-rXC/tiles_states_strings.xml
@@ -126,6 +126,9 @@
<item msgid="8259411607272330225">"Off"</item>
<item msgid="578444932039713369">"On"</item>
</string-array>
+ <!-- no translation found for tile_states_record_issue:0 (1727196795383575383) -->
+ <!-- no translation found for tile_states_record_issue:1 (9061144428113385092) -->
+ <!-- no translation found for tile_states_record_issue:2 (2984256114867200368) -->
<string-array name="tile_states_reverse">
<item msgid="3574611556622963971">"Unavailable"</item>
<item msgid="8707481475312432575">"Off"</item>
diff --git a/packages/SystemUI/res/values-es-rUS/strings.xml b/packages/SystemUI/res/values-es-rUS/strings.xml
index 15de0d5..1798e9a 100644
--- a/packages/SystemUI/res/values-es-rUS/strings.xml
+++ b/packages/SystemUI/res/values-es-rUS/strings.xml
@@ -429,8 +429,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"Agregar más widgets"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"Mantén presionado para personalizar los widgets"</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"Personalizar widgets"</string>
- <!-- no translation found for icon_description_for_disabled_widget (4693151565003206943) -->
- <skip />
+ <string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"Ícono de la app de widget inhabilitado"</string>
<string name="edit_widget" msgid="9030848101135393954">"Modificar widget"</string>
<string name="button_to_remove_widget" msgid="3948204829181214098">"Quitar"</string>
<string name="hub_mode_add_widget_button_text" msgid="4831464661209971729">"Agregar widget"</string>
@@ -575,10 +574,8 @@
<string name="volume_ringer_status_normal" msgid="1339039682222461143">"Timbre"</string>
<string name="volume_ringer_status_vibrate" msgid="6970078708957857825">"Vibrar"</string>
<string name="volume_ringer_status_silent" msgid="3691324657849880883">"Silenciar"</string>
- <!-- no translation found for media_device_cast (4786241789687569892) -->
- <skip />
- <!-- no translation found for stream_notification_unavailable (4313854556205836435) -->
- <skip />
+ <string name="media_device_cast" msgid="4786241789687569892">"Transmisión"</string>
+ <string name="stream_notification_unavailable" msgid="4313854556205836435">"No disponible por timbre silenciado"</string>
<string name="volume_stream_content_description_unmute" msgid="7729576371406792977">"%1$s. Presiona para dejar de silenciar."</string>
<string name="volume_stream_content_description_vibrate" msgid="4858111994183089761">"%1$s. Presiona para establecer el modo vibración. Es posible que los servicios de accesibilidad estén silenciados."</string>
<string name="volume_stream_content_description_mute" msgid="4079046784917920984">"%1$s. Presiona para silenciar. Es posible que los servicios de accesibilidad estén silenciados."</string>
@@ -839,10 +836,8 @@
<string name="accessibility_quick_settings_power_menu" msgid="6820426108301758412">"Menú de encendido"</string>
<string name="accessibility_quick_settings_page" msgid="7506322631645550961">"Página <xliff:g id="ID_1">%1$d</xliff:g> de <xliff:g id="ID_2">%2$d</xliff:g>"</string>
<string name="tuner_lock_screen" msgid="2267383813241144544">"Pantalla de bloqueo"</string>
- <!-- no translation found for finder_active (7907846989716941952) -->
- <skip />
- <!-- no translation found for shutdown_progress (5464239146561542178) -->
- <skip />
+ <string name="finder_active" msgid="7907846989716941952">"Puedes ubicar este teléfono con Encontrar mi dispositivo, incluso si está apagado"</string>
+ <string name="shutdown_progress" msgid="5464239146561542178">"Apagando…"</string>
<string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"Ver pasos de mantenimiento"</string>
<string name="high_temp_dialog_help_text" msgid="7380171287943345858">"Ver pasos de mantenimiento"</string>
<string name="high_temp_alarm_title" msgid="8654754369605452169">"Desenchufa el dispositivo"</string>
diff --git a/packages/SystemUI/res/values-es-rUS/tiles_states_strings.xml b/packages/SystemUI/res/values-es-rUS/tiles_states_strings.xml
index bb3983b..09abc54 100644
--- a/packages/SystemUI/res/values-es-rUS/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-es-rUS/tiles_states_strings.xml
@@ -126,6 +126,9 @@
<item msgid="8259411607272330225">"Desactivado"</item>
<item msgid="578444932039713369">"Activado"</item>
</string-array>
+ <!-- no translation found for tile_states_record_issue:0 (1727196795383575383) -->
+ <!-- no translation found for tile_states_record_issue:1 (9061144428113385092) -->
+ <!-- no translation found for tile_states_record_issue:2 (2984256114867200368) -->
<string-array name="tile_states_reverse">
<item msgid="3574611556622963971">"No disponible"</item>
<item msgid="8707481475312432575">"Desactivado"</item>
diff --git a/packages/SystemUI/res/values-es/strings.xml b/packages/SystemUI/res/values-es/strings.xml
index 3edc603..73c913f 100644
--- a/packages/SystemUI/res/values-es/strings.xml
+++ b/packages/SystemUI/res/values-es/strings.xml
@@ -575,10 +575,8 @@
<string name="volume_ringer_status_normal" msgid="1339039682222461143">"Hacer sonar"</string>
<string name="volume_ringer_status_vibrate" msgid="6970078708957857825">"Vibrar"</string>
<string name="volume_ringer_status_silent" msgid="3691324657849880883">"Silenciar"</string>
- <!-- no translation found for media_device_cast (4786241789687569892) -->
- <skip />
- <!-- no translation found for stream_notification_unavailable (4313854556205836435) -->
- <skip />
+ <string name="media_device_cast" msgid="4786241789687569892">"Enviar"</string>
+ <string name="stream_notification_unavailable" msgid="4313854556205836435">"No disponible (el tono está silenciado)"</string>
<string name="volume_stream_content_description_unmute" msgid="7729576371406792977">"%1$s. Toca para activar el sonido."</string>
<string name="volume_stream_content_description_vibrate" msgid="4858111994183089761">"%1$s. Toca para poner el dispositivo en vibración. Los servicios de accesibilidad pueden silenciarse."</string>
<string name="volume_stream_content_description_mute" msgid="4079046784917920984">"%1$s. Toca para silenciar. Los servicios de accesibilidad pueden silenciarse."</string>
diff --git a/packages/SystemUI/res/values-es/tiles_states_strings.xml b/packages/SystemUI/res/values-es/tiles_states_strings.xml
index 66c7ee5..83b4627 100644
--- a/packages/SystemUI/res/values-es/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-es/tiles_states_strings.xml
@@ -126,6 +126,9 @@
<item msgid="8259411607272330225">"Desactivado"</item>
<item msgid="578444932039713369">"Activado"</item>
</string-array>
+ <!-- no translation found for tile_states_record_issue:0 (1727196795383575383) -->
+ <!-- no translation found for tile_states_record_issue:1 (9061144428113385092) -->
+ <!-- no translation found for tile_states_record_issue:2 (2984256114867200368) -->
<string-array name="tile_states_reverse">
<item msgid="3574611556622963971">"No disponible"</item>
<item msgid="8707481475312432575">"Desactivado"</item>
diff --git a/packages/SystemUI/res/values-et/strings.xml b/packages/SystemUI/res/values-et/strings.xml
index 7ae5219..6fa7044 100644
--- a/packages/SystemUI/res/values-et/strings.xml
+++ b/packages/SystemUI/res/values-et/strings.xml
@@ -575,10 +575,8 @@
<string name="volume_ringer_status_normal" msgid="1339039682222461143">"Helisemine"</string>
<string name="volume_ringer_status_vibrate" msgid="6970078708957857825">"Vibreerimine"</string>
<string name="volume_ringer_status_silent" msgid="3691324657849880883">"Vaigistatud"</string>
- <!-- no translation found for media_device_cast (4786241789687569892) -->
- <skip />
- <!-- no translation found for stream_notification_unavailable (4313854556205836435) -->
- <skip />
+ <string name="media_device_cast" msgid="4786241789687569892">"Ülekandmine"</string>
+ <string name="stream_notification_unavailable" msgid="4313854556205836435">"Pole saadaval, kuna helin on vaigistatud"</string>
<string name="volume_stream_content_description_unmute" msgid="7729576371406792977">"%1$s. Puudutage vaigistuse tühistamiseks."</string>
<string name="volume_stream_content_description_vibrate" msgid="4858111994183089761">"%1$s. Puudutage värinarežiimi määramiseks. Juurdepääsetavuse teenused võidakse vaigistada."</string>
<string name="volume_stream_content_description_mute" msgid="4079046784917920984">"%1$s. Puudutage vaigistamiseks. Juurdepääsetavuse teenused võidakse vaigistada."</string>
diff --git a/packages/SystemUI/res/values-et/tiles_states_strings.xml b/packages/SystemUI/res/values-et/tiles_states_strings.xml
index 6a9edbb..4f0551d 100644
--- a/packages/SystemUI/res/values-et/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-et/tiles_states_strings.xml
@@ -126,6 +126,9 @@
<item msgid="8259411607272330225">"Väljas"</item>
<item msgid="578444932039713369">"Sees"</item>
</string-array>
+ <!-- no translation found for tile_states_record_issue:0 (1727196795383575383) -->
+ <!-- no translation found for tile_states_record_issue:1 (9061144428113385092) -->
+ <!-- no translation found for tile_states_record_issue:2 (2984256114867200368) -->
<string-array name="tile_states_reverse">
<item msgid="3574611556622963971">"Pole saadaval"</item>
<item msgid="8707481475312432575">"Väljas"</item>
diff --git a/packages/SystemUI/res/values-eu/strings.xml b/packages/SystemUI/res/values-eu/strings.xml
index d0b10a0..564fbb3 100644
--- a/packages/SystemUI/res/values-eu/strings.xml
+++ b/packages/SystemUI/res/values-eu/strings.xml
@@ -575,10 +575,8 @@
<string name="volume_ringer_status_normal" msgid="1339039682222461143">"Jo tonua"</string>
<string name="volume_ringer_status_vibrate" msgid="6970078708957857825">"Dardara"</string>
<string name="volume_ringer_status_silent" msgid="3691324657849880883">"Ez jo tonua"</string>
- <!-- no translation found for media_device_cast (4786241789687569892) -->
- <skip />
- <!-- no translation found for stream_notification_unavailable (4313854556205836435) -->
- <skip />
+ <string name="media_device_cast" msgid="4786241789687569892">"Igorri"</string>
+ <string name="stream_notification_unavailable" msgid="4313854556205836435">"Ez dago erabilgarri, tonua desaktibatuta dagoelako"</string>
<string name="volume_stream_content_description_unmute" msgid="7729576371406792977">"%1$s. Sakatu audioa aktibatzeko."</string>
<string name="volume_stream_content_description_vibrate" msgid="4858111994183089761">"%1$s. Sakatu dardara ezartzeko. Baliteke erabilerraztasun-eginbideen audioa desaktibatzea."</string>
<string name="volume_stream_content_description_mute" msgid="4079046784917920984">"%1$s. Sakatu audioa desaktibatzeko. Baliteke erabilerraztasun-eginbideen audioa desaktibatzea."</string>
@@ -732,7 +730,7 @@
<string name="group_system_full_screenshot" msgid="5742204844232667785">"Atera pantaila-argazki bat"</string>
<string name="group_system_access_system_app_shortcuts" msgid="8562482996626694026">"Erakutsi lasterbideak"</string>
<string name="group_system_go_back" msgid="2730322046244918816">"Egin atzera"</string>
- <string name="group_system_access_home_screen" msgid="4130366993484706483">"Joan hasierako pantailara"</string>
+ <string name="group_system_access_home_screen" msgid="4130366993484706483">"Joan orri nagusira"</string>
<string name="group_system_overview_open_apps" msgid="5659958952937994104">"Ikusi azkenaldiko aplikazioak"</string>
<string name="group_system_cycle_forward" msgid="5478663965957647805">"Ikusi azken aplikazioak banan-banan (aurrerantz)"</string>
<string name="group_system_cycle_back" msgid="8194102916946802902">"Ikusi azken aplikazioak banan-banan (atzerantz)"</string>
@@ -1096,7 +1094,7 @@
<string name="build_number_copy_toast" msgid="877720921605503046">"Kopiatu da konpilazio-zenbakia arbelean."</string>
<string name="basic_status" msgid="2315371112182658176">"Elkarrizketa irekia"</string>
<string name="select_conversation_title" msgid="6716364118095089519">"Elkarrizketa-widgetak"</string>
- <string name="select_conversation_text" msgid="3376048251434956013">"Sakatu elkarrizketa bat hasierako pantailan gehitzeko"</string>
+ <string name="select_conversation_text" msgid="3376048251434956013">"Sakatu elkarrizketa bat orri nagusian gehitzeko"</string>
<string name="no_conversations_text" msgid="5354115541282395015">"Azken elkarrizketak agertuko dira hemen"</string>
<string name="priority_conversations" msgid="3967482288896653039">"Lehentasunezko elkarrizketak"</string>
<string name="recent_conversations" msgid="8531874684782574622">"Azken elkarrizketak"</string>
diff --git a/packages/SystemUI/res/values-eu/tiles_states_strings.xml b/packages/SystemUI/res/values-eu/tiles_states_strings.xml
index d023076..accecac 100644
--- a/packages/SystemUI/res/values-eu/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-eu/tiles_states_strings.xml
@@ -126,6 +126,9 @@
<item msgid="8259411607272330225">"Desaktibatuta"</item>
<item msgid="578444932039713369">"Aktibatuta"</item>
</string-array>
+ <!-- no translation found for tile_states_record_issue:0 (1727196795383575383) -->
+ <!-- no translation found for tile_states_record_issue:1 (9061144428113385092) -->
+ <!-- no translation found for tile_states_record_issue:2 (2984256114867200368) -->
<string-array name="tile_states_reverse">
<item msgid="3574611556622963971">"Ez dago erabilgarri"</item>
<item msgid="8707481475312432575">"Desaktibatuta"</item>
diff --git a/packages/SystemUI/res/values-fa/strings.xml b/packages/SystemUI/res/values-fa/strings.xml
index 0f93781..95f17b0 100644
--- a/packages/SystemUI/res/values-fa/strings.xml
+++ b/packages/SystemUI/res/values-fa/strings.xml
@@ -575,10 +575,8 @@
<string name="volume_ringer_status_normal" msgid="1339039682222461143">"زنگ زدن"</string>
<string name="volume_ringer_status_vibrate" msgid="6970078708957857825">"لرزش"</string>
<string name="volume_ringer_status_silent" msgid="3691324657849880883">"صامت"</string>
- <!-- no translation found for media_device_cast (4786241789687569892) -->
- <skip />
- <!-- no translation found for stream_notification_unavailable (4313854556205836435) -->
- <skip />
+ <string name="media_device_cast" msgid="4786241789687569892">"ارسال محتوا"</string>
+ <string name="stream_notification_unavailable" msgid="4313854556205836435">"دردسترس نیست، چون زنگ بیصدا شده است"</string>
<string name="volume_stream_content_description_unmute" msgid="7729576371406792977">"%1$s. برای باصدا کردن ضربه بزنید."</string>
<string name="volume_stream_content_description_vibrate" msgid="4858111994183089761">"%1$s. برای تنظیم روی لرزش ضربه بزنید. ممکن است سرویسهای دسترسپذیری بیصدا شوند."</string>
<string name="volume_stream_content_description_mute" msgid="4079046784917920984">"%1$s. برای صامت کردن ضربه بزنید. ممکن است سرویسهای دسترسپذیری صامت شود."</string>
diff --git a/packages/SystemUI/res/values-fa/tiles_states_strings.xml b/packages/SystemUI/res/values-fa/tiles_states_strings.xml
index b341e9e..01a549e 100644
--- a/packages/SystemUI/res/values-fa/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-fa/tiles_states_strings.xml
@@ -126,6 +126,9 @@
<item msgid="8259411607272330225">"خاموش"</item>
<item msgid="578444932039713369">"روشن"</item>
</string-array>
+ <!-- no translation found for tile_states_record_issue:0 (1727196795383575383) -->
+ <!-- no translation found for tile_states_record_issue:1 (9061144428113385092) -->
+ <!-- no translation found for tile_states_record_issue:2 (2984256114867200368) -->
<string-array name="tile_states_reverse">
<item msgid="3574611556622963971">"دردسترس نیست"</item>
<item msgid="8707481475312432575">"خاموش"</item>
diff --git a/packages/SystemUI/res/values-fi/strings.xml b/packages/SystemUI/res/values-fi/strings.xml
index 5d3959d..ab022dd 100644
--- a/packages/SystemUI/res/values-fi/strings.xml
+++ b/packages/SystemUI/res/values-fi/strings.xml
@@ -575,10 +575,8 @@
<string name="volume_ringer_status_normal" msgid="1339039682222461143">"Soittoääni"</string>
<string name="volume_ringer_status_vibrate" msgid="6970078708957857825">"Värinä"</string>
<string name="volume_ringer_status_silent" msgid="3691324657849880883">"Äänetön"</string>
- <!-- no translation found for media_device_cast (4786241789687569892) -->
- <skip />
- <!-- no translation found for stream_notification_unavailable (4313854556205836435) -->
- <skip />
+ <string name="media_device_cast" msgid="4786241789687569892">"Striimaa"</string>
+ <string name="stream_notification_unavailable" msgid="4313854556205836435">"Ei käytettävissä, soittoääni mykistetty"</string>
<string name="volume_stream_content_description_unmute" msgid="7729576371406792977">"%1$s. Poista mykistys koskettamalla."</string>
<string name="volume_stream_content_description_vibrate" msgid="4858111994183089761">"%1$s. Siirry värinätilaan koskettamalla. Myös esteettömyyspalvelut saattavat mykistyä."</string>
<string name="volume_stream_content_description_mute" msgid="4079046784917920984">"%1$s. Mykistä koskettamalla. Myös esteettömyyspalvelut saattavat mykistyä."</string>
diff --git a/packages/SystemUI/res/values-fi/tiles_states_strings.xml b/packages/SystemUI/res/values-fi/tiles_states_strings.xml
index bbd64fd..f7a8ec9 100644
--- a/packages/SystemUI/res/values-fi/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-fi/tiles_states_strings.xml
@@ -126,6 +126,9 @@
<item msgid="8259411607272330225">"Poissa päältä"</item>
<item msgid="578444932039713369">"Päällä"</item>
</string-array>
+ <!-- no translation found for tile_states_record_issue:0 (1727196795383575383) -->
+ <!-- no translation found for tile_states_record_issue:1 (9061144428113385092) -->
+ <!-- no translation found for tile_states_record_issue:2 (2984256114867200368) -->
<string-array name="tile_states_reverse">
<item msgid="3574611556622963971">"Ei saatavilla"</item>
<item msgid="8707481475312432575">"Poissa päältä"</item>
diff --git a/packages/SystemUI/res/values-fr-rCA/strings.xml b/packages/SystemUI/res/values-fr-rCA/strings.xml
index e02c75c..1186c81 100644
--- a/packages/SystemUI/res/values-fr-rCA/strings.xml
+++ b/packages/SystemUI/res/values-fr-rCA/strings.xml
@@ -575,10 +575,8 @@
<string name="volume_ringer_status_normal" msgid="1339039682222461143">"Sonnerie"</string>
<string name="volume_ringer_status_vibrate" msgid="6970078708957857825">"Vibration"</string>
<string name="volume_ringer_status_silent" msgid="3691324657849880883">"Sonnerie désactivée"</string>
- <!-- no translation found for media_device_cast (4786241789687569892) -->
- <skip />
- <!-- no translation found for stream_notification_unavailable (4313854556205836435) -->
- <skip />
+ <string name="media_device_cast" msgid="4786241789687569892">"Diffuser"</string>
+ <string name="stream_notification_unavailable" msgid="4313854556205836435">"Inaccessible : sonnerie en sourdine"</string>
<string name="volume_stream_content_description_unmute" msgid="7729576371406792977">"%1$s. Touchez pour réactiver le son."</string>
<string name="volume_stream_content_description_vibrate" msgid="4858111994183089761">"%1$s. Touchez pour activer les vibrations. Il est possible de couper le son des services d\'accessibilité."</string>
<string name="volume_stream_content_description_mute" msgid="4079046784917920984">"%1$s. Touchez pour couper le son. Il est possible de couper le son des services d\'accessibilité."</string>
diff --git a/packages/SystemUI/res/values-fr-rCA/tiles_states_strings.xml b/packages/SystemUI/res/values-fr-rCA/tiles_states_strings.xml
index b969841..7b9708e 100644
--- a/packages/SystemUI/res/values-fr-rCA/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-fr-rCA/tiles_states_strings.xml
@@ -126,6 +126,9 @@
<item msgid="8259411607272330225">"Désactivé"</item>
<item msgid="578444932039713369">"Activé"</item>
</string-array>
+ <!-- no translation found for tile_states_record_issue:0 (1727196795383575383) -->
+ <!-- no translation found for tile_states_record_issue:1 (9061144428113385092) -->
+ <!-- no translation found for tile_states_record_issue:2 (2984256114867200368) -->
<string-array name="tile_states_reverse">
<item msgid="3574611556622963971">"Non disponible"</item>
<item msgid="8707481475312432575">"Désactivé"</item>
diff --git a/packages/SystemUI/res/values-fr/strings.xml b/packages/SystemUI/res/values-fr/strings.xml
index 2621a90..a02c9f7 100644
--- a/packages/SystemUI/res/values-fr/strings.xml
+++ b/packages/SystemUI/res/values-fr/strings.xml
@@ -575,10 +575,8 @@
<string name="volume_ringer_status_normal" msgid="1339039682222461143">"Sonnerie"</string>
<string name="volume_ringer_status_vibrate" msgid="6970078708957857825">"Vibreur"</string>
<string name="volume_ringer_status_silent" msgid="3691324657849880883">"Couper le son"</string>
- <!-- no translation found for media_device_cast (4786241789687569892) -->
- <skip />
- <!-- no translation found for stream_notification_unavailable (4313854556205836435) -->
- <skip />
+ <string name="media_device_cast" msgid="4786241789687569892">"Caster"</string>
+ <string name="stream_notification_unavailable" msgid="4313854556205836435">"Indisponible, car la sonnerie est coupée"</string>
<string name="volume_stream_content_description_unmute" msgid="7729576371406792977">"%1$s. Appuyez pour ne plus ignorer."</string>
<string name="volume_stream_content_description_vibrate" msgid="4858111994183089761">"%1$s. Appuyez pour mettre en mode vibreur. Vous pouvez ignorer les services d\'accessibilité."</string>
<string name="volume_stream_content_description_mute" msgid="4079046784917920984">"%1$s. Appuyez pour ignorer. Vous pouvez ignorer les services d\'accessibilité."</string>
diff --git a/packages/SystemUI/res/values-fr/tiles_states_strings.xml b/packages/SystemUI/res/values-fr/tiles_states_strings.xml
index 34440a0..af1d09d 100644
--- a/packages/SystemUI/res/values-fr/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-fr/tiles_states_strings.xml
@@ -126,6 +126,9 @@
<item msgid="8259411607272330225">"Désactivé"</item>
<item msgid="578444932039713369">"Activé"</item>
</string-array>
+ <!-- no translation found for tile_states_record_issue:0 (1727196795383575383) -->
+ <!-- no translation found for tile_states_record_issue:1 (9061144428113385092) -->
+ <!-- no translation found for tile_states_record_issue:2 (2984256114867200368) -->
<string-array name="tile_states_reverse">
<item msgid="3574611556622963971">"Indisponible"</item>
<item msgid="8707481475312432575">"Désactivée"</item>
diff --git a/packages/SystemUI/res/values-gl/strings.xml b/packages/SystemUI/res/values-gl/strings.xml
index 1955c04..e758af8 100644
--- a/packages/SystemUI/res/values-gl/strings.xml
+++ b/packages/SystemUI/res/values-gl/strings.xml
@@ -575,10 +575,8 @@
<string name="volume_ringer_status_normal" msgid="1339039682222461143">"Facer soar"</string>
<string name="volume_ringer_status_vibrate" msgid="6970078708957857825">"Vibrar"</string>
<string name="volume_ringer_status_silent" msgid="3691324657849880883">"Silenciar"</string>
- <!-- no translation found for media_device_cast (4786241789687569892) -->
- <skip />
- <!-- no translation found for stream_notification_unavailable (4313854556205836435) -->
- <skip />
+ <string name="media_device_cast" msgid="4786241789687569892">"Emitir"</string>
+ <string name="stream_notification_unavailable" msgid="4313854556205836435">"Non dispoñible (o son está silenciado)"</string>
<string name="volume_stream_content_description_unmute" msgid="7729576371406792977">"%1$s. Toca para activar o son."</string>
<string name="volume_stream_content_description_vibrate" msgid="4858111994183089761">"%1$s. Toca para establecer a vibración. Pódense silenciar os servizos de accesibilidade."</string>
<string name="volume_stream_content_description_mute" msgid="4079046784917920984">"%1$s. Toca para silenciar. Pódense silenciar os servizos de accesibilidade."</string>
diff --git a/packages/SystemUI/res/values-gl/tiles_states_strings.xml b/packages/SystemUI/res/values-gl/tiles_states_strings.xml
index b03f311..a963dec 100644
--- a/packages/SystemUI/res/values-gl/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-gl/tiles_states_strings.xml
@@ -126,6 +126,9 @@
<item msgid="8259411607272330225">"Non"</item>
<item msgid="578444932039713369">"Si"</item>
</string-array>
+ <!-- no translation found for tile_states_record_issue:0 (1727196795383575383) -->
+ <!-- no translation found for tile_states_record_issue:1 (9061144428113385092) -->
+ <!-- no translation found for tile_states_record_issue:2 (2984256114867200368) -->
<string-array name="tile_states_reverse">
<item msgid="3574611556622963971">"Non dispoñible"</item>
<item msgid="8707481475312432575">"Non"</item>
diff --git a/packages/SystemUI/res/values-gu/strings.xml b/packages/SystemUI/res/values-gu/strings.xml
index 5a1cf42..6d1d8df 100644
--- a/packages/SystemUI/res/values-gu/strings.xml
+++ b/packages/SystemUI/res/values-gu/strings.xml
@@ -575,10 +575,8 @@
<string name="volume_ringer_status_normal" msgid="1339039682222461143">"રિંગ કરો"</string>
<string name="volume_ringer_status_vibrate" msgid="6970078708957857825">"વાઇબ્રેટ"</string>
<string name="volume_ringer_status_silent" msgid="3691324657849880883">"મ્યૂટ કરો"</string>
- <!-- no translation found for media_device_cast (4786241789687569892) -->
- <skip />
- <!-- no translation found for stream_notification_unavailable (4313854556205836435) -->
- <skip />
+ <string name="media_device_cast" msgid="4786241789687569892">"કાસ્ટ કરો"</string>
+ <string name="stream_notification_unavailable" msgid="4313854556205836435">"રિંગ મ્યૂટ કરી હોવાના કારણે અનુપલબ્ધ છે"</string>
<string name="volume_stream_content_description_unmute" msgid="7729576371406792977">"%1$s. અનમ્યૂટ કરવા માટે ટૅપ કરો."</string>
<string name="volume_stream_content_description_vibrate" msgid="4858111994183089761">"%1$s. વાઇબ્રેટ પર સેટ કરવા માટે ટૅપ કરો. ઍક્સેસિબિલિટી સેવાઓ મ્યૂટ કરવામાં આવી શકે છે."</string>
<string name="volume_stream_content_description_mute" msgid="4079046784917920984">"%1$s. મ્યૂટ કરવા માટે ટૅપ કરો. ઍક્સેસિબિલિટી સેવાઓ મ્યૂટ કરવામાં આવી શકે છે."</string>
diff --git a/packages/SystemUI/res/values-gu/tiles_states_strings.xml b/packages/SystemUI/res/values-gu/tiles_states_strings.xml
index 5d1ad6f..580ec10 100644
--- a/packages/SystemUI/res/values-gu/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-gu/tiles_states_strings.xml
@@ -126,6 +126,9 @@
<item msgid="8259411607272330225">"બંધ છે"</item>
<item msgid="578444932039713369">"ચાલુ છે"</item>
</string-array>
+ <!-- no translation found for tile_states_record_issue:0 (1727196795383575383) -->
+ <!-- no translation found for tile_states_record_issue:1 (9061144428113385092) -->
+ <!-- no translation found for tile_states_record_issue:2 (2984256114867200368) -->
<string-array name="tile_states_reverse">
<item msgid="3574611556622963971">"ઉપલબ્ધ નથી"</item>
<item msgid="8707481475312432575">"બંધ છે"</item>
diff --git a/packages/SystemUI/res/values-hi/strings.xml b/packages/SystemUI/res/values-hi/strings.xml
index 4b8c959..2035429 100644
--- a/packages/SystemUI/res/values-hi/strings.xml
+++ b/packages/SystemUI/res/values-hi/strings.xml
@@ -575,10 +575,8 @@
<string name="volume_ringer_status_normal" msgid="1339039682222461143">"आवाज़ चालू है"</string>
<string name="volume_ringer_status_vibrate" msgid="6970078708957857825">"वाइब्रेशन"</string>
<string name="volume_ringer_status_silent" msgid="3691324657849880883">"आवाज़ बंद है"</string>
- <!-- no translation found for media_device_cast (4786241789687569892) -->
- <skip />
- <!-- no translation found for stream_notification_unavailable (4313854556205836435) -->
- <skip />
+ <string name="media_device_cast" msgid="4786241789687569892">"कास्ट करें"</string>
+ <string name="stream_notification_unavailable" msgid="4313854556205836435">"रिंग म्यूट होने से आवाज़ नहीं सुनाई दी"</string>
<string name="volume_stream_content_description_unmute" msgid="7729576371406792977">"%1$s. अनम्यूट करने के लिए टैप करें."</string>
<string name="volume_stream_content_description_vibrate" msgid="4858111994183089761">"%1$s. कंपन पर सेट करने के लिए टैप करें. सुलभता सेवाएं म्यूट हो सकती हैं."</string>
<string name="volume_stream_content_description_mute" msgid="4079046784917920984">"%1$s. म्यूट करने के लिए टैप करें. सुलभता सेवाएं म्यूट हो सकती हैं."</string>
diff --git a/packages/SystemUI/res/values-hi/tiles_states_strings.xml b/packages/SystemUI/res/values-hi/tiles_states_strings.xml
index cd29fb9..3fd0b30 100644
--- a/packages/SystemUI/res/values-hi/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-hi/tiles_states_strings.xml
@@ -126,6 +126,9 @@
<item msgid="8259411607272330225">"बंद है"</item>
<item msgid="578444932039713369">"चालू है"</item>
</string-array>
+ <!-- no translation found for tile_states_record_issue:0 (1727196795383575383) -->
+ <!-- no translation found for tile_states_record_issue:1 (9061144428113385092) -->
+ <!-- no translation found for tile_states_record_issue:2 (2984256114867200368) -->
<string-array name="tile_states_reverse">
<item msgid="3574611556622963971">"उपलब्ध नहीं है"</item>
<item msgid="8707481475312432575">"बंद है"</item>
diff --git a/packages/SystemUI/res/values-hr/strings.xml b/packages/SystemUI/res/values-hr/strings.xml
index 45666c0..d50a951 100644
--- a/packages/SystemUI/res/values-hr/strings.xml
+++ b/packages/SystemUI/res/values-hr/strings.xml
@@ -575,10 +575,8 @@
<string name="volume_ringer_status_normal" msgid="1339039682222461143">"Zvonjenje"</string>
<string name="volume_ringer_status_vibrate" msgid="6970078708957857825">"Vibriranje"</string>
<string name="volume_ringer_status_silent" msgid="3691324657849880883">"Zvuk je isključen"</string>
- <!-- no translation found for media_device_cast (4786241789687569892) -->
- <skip />
- <!-- no translation found for stream_notification_unavailable (4313854556205836435) -->
- <skip />
+ <string name="media_device_cast" msgid="4786241789687569892">"Emitiraj"</string>
+ <string name="stream_notification_unavailable" msgid="4313854556205836435">"Nedostupno jer je zvono utišano"</string>
<string name="volume_stream_content_description_unmute" msgid="7729576371406792977">"%1$s. Dodirnite da biste uključili zvuk."</string>
<string name="volume_stream_content_description_vibrate" msgid="4858111994183089761">"%1$s. Dodirnite da biste postavili na vibraciju. Usluge pristupačnosti možda neće imati zvuk."</string>
<string name="volume_stream_content_description_mute" msgid="4079046784917920984">"%1$s. Dodirnite da biste isključili zvuk. Usluge pristupačnosti možda neće imati zvuk."</string>
diff --git a/packages/SystemUI/res/values-hr/tiles_states_strings.xml b/packages/SystemUI/res/values-hr/tiles_states_strings.xml
index 32051ef..217d999 100644
--- a/packages/SystemUI/res/values-hr/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-hr/tiles_states_strings.xml
@@ -126,6 +126,9 @@
<item msgid="8259411607272330225">"Isključeno"</item>
<item msgid="578444932039713369">"Uključeno"</item>
</string-array>
+ <!-- no translation found for tile_states_record_issue:0 (1727196795383575383) -->
+ <!-- no translation found for tile_states_record_issue:1 (9061144428113385092) -->
+ <!-- no translation found for tile_states_record_issue:2 (2984256114867200368) -->
<string-array name="tile_states_reverse">
<item msgid="3574611556622963971">"Nedostupno"</item>
<item msgid="8707481475312432575">"Isključeno"</item>
diff --git a/packages/SystemUI/res/values-hu/strings.xml b/packages/SystemUI/res/values-hu/strings.xml
index 3606d74..b09419b 100644
--- a/packages/SystemUI/res/values-hu/strings.xml
+++ b/packages/SystemUI/res/values-hu/strings.xml
@@ -575,10 +575,8 @@
<string name="volume_ringer_status_normal" msgid="1339039682222461143">"Csörgés"</string>
<string name="volume_ringer_status_vibrate" msgid="6970078708957857825">"Rezgés"</string>
<string name="volume_ringer_status_silent" msgid="3691324657849880883">"Néma"</string>
- <!-- no translation found for media_device_cast (4786241789687569892) -->
- <skip />
- <!-- no translation found for stream_notification_unavailable (4313854556205836435) -->
- <skip />
+ <string name="media_device_cast" msgid="4786241789687569892">"Átküldés"</string>
+ <string name="stream_notification_unavailable" msgid="4313854556205836435">"Nem lehetséges, a csörgés le van némítva"</string>
<string name="volume_stream_content_description_unmute" msgid="7729576371406792977">"%1$s. Koppintson a némítás megszüntetéséhez."</string>
<string name="volume_stream_content_description_vibrate" msgid="4858111994183089761">"%1$s. Koppintson a rezgés beállításához. Előfordulhat, hogy a kisegítő lehetőségek szolgáltatásai le vannak némítva."</string>
<string name="volume_stream_content_description_mute" msgid="4079046784917920984">"%1$s. Koppintson a némításhoz. Előfordulhat, hogy a kisegítő lehetőségek szolgáltatásai le vannak némítva."</string>
diff --git a/packages/SystemUI/res/values-hu/tiles_states_strings.xml b/packages/SystemUI/res/values-hu/tiles_states_strings.xml
index 157c552..fad2cd4 100644
--- a/packages/SystemUI/res/values-hu/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-hu/tiles_states_strings.xml
@@ -126,6 +126,9 @@
<item msgid="8259411607272330225">"Ki"</item>
<item msgid="578444932039713369">"Be"</item>
</string-array>
+ <!-- no translation found for tile_states_record_issue:0 (1727196795383575383) -->
+ <!-- no translation found for tile_states_record_issue:1 (9061144428113385092) -->
+ <!-- no translation found for tile_states_record_issue:2 (2984256114867200368) -->
<string-array name="tile_states_reverse">
<item msgid="3574611556622963971">"Nem áll rendelkezésre"</item>
<item msgid="8707481475312432575">"Ki"</item>
diff --git a/packages/SystemUI/res/values-hy/strings.xml b/packages/SystemUI/res/values-hy/strings.xml
index 1510291..4ea86d0 100644
--- a/packages/SystemUI/res/values-hy/strings.xml
+++ b/packages/SystemUI/res/values-hy/strings.xml
@@ -575,10 +575,8 @@
<string name="volume_ringer_status_normal" msgid="1339039682222461143">"Սովորական"</string>
<string name="volume_ringer_status_vibrate" msgid="6970078708957857825">"Թրթռոց"</string>
<string name="volume_ringer_status_silent" msgid="3691324657849880883">"Անձայն"</string>
- <!-- no translation found for media_device_cast (4786241789687569892) -->
- <skip />
- <!-- no translation found for stream_notification_unavailable (4313854556205836435) -->
- <skip />
+ <string name="media_device_cast" msgid="4786241789687569892">"Հեռարձակում"</string>
+ <string name="stream_notification_unavailable" msgid="4313854556205836435">"Հասանելի չէ, երբ զանգի ձայնն անջատված է"</string>
<string name="volume_stream_content_description_unmute" msgid="7729576371406792977">"%1$s: Հպեք՝ ձայնը միացնելու համար:"</string>
<string name="volume_stream_content_description_vibrate" msgid="4858111994183089761">"%1$s: Հպեք՝ թրթռումը միացնելու համար: Մատչելիության ծառայությունների ձայնը կարող է անջատվել:"</string>
<string name="volume_stream_content_description_mute" msgid="4079046784917920984">"%1$s: Հպեք՝ ձայնն անջատելու համար: Մատչելիության ծառայությունների ձայնը կարող է անջատվել:"</string>
diff --git a/packages/SystemUI/res/values-hy/tiles_states_strings.xml b/packages/SystemUI/res/values-hy/tiles_states_strings.xml
index 089716f..380d9d2 100644
--- a/packages/SystemUI/res/values-hy/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-hy/tiles_states_strings.xml
@@ -126,6 +126,9 @@
<item msgid="8259411607272330225">"Անջատված է"</item>
<item msgid="578444932039713369">"Միացված է"</item>
</string-array>
+ <!-- no translation found for tile_states_record_issue:0 (1727196795383575383) -->
+ <!-- no translation found for tile_states_record_issue:1 (9061144428113385092) -->
+ <!-- no translation found for tile_states_record_issue:2 (2984256114867200368) -->
<string-array name="tile_states_reverse">
<item msgid="3574611556622963971">"Հասանելի չէ"</item>
<item msgid="8707481475312432575">"Անջատված է"</item>
diff --git a/packages/SystemUI/res/values-in/strings.xml b/packages/SystemUI/res/values-in/strings.xml
index 09a9938..188f3fb 100644
--- a/packages/SystemUI/res/values-in/strings.xml
+++ b/packages/SystemUI/res/values-in/strings.xml
@@ -575,10 +575,8 @@
<string name="volume_ringer_status_normal" msgid="1339039682222461143">"Dering"</string>
<string name="volume_ringer_status_vibrate" msgid="6970078708957857825">"Getar"</string>
<string name="volume_ringer_status_silent" msgid="3691324657849880883">"Nonaktifkan"</string>
- <!-- no translation found for media_device_cast (4786241789687569892) -->
- <skip />
- <!-- no translation found for stream_notification_unavailable (4313854556205836435) -->
- <skip />
+ <string name="media_device_cast" msgid="4786241789687569892">"Transmisi"</string>
+ <string name="stream_notification_unavailable" msgid="4313854556205836435">"Tidak tersedia karena volume dering dibisukan"</string>
<string name="volume_stream_content_description_unmute" msgid="7729576371406792977">"%1$s. Ketuk untuk menyuarakan."</string>
<string name="volume_stream_content_description_vibrate" msgid="4858111994183089761">"%1$s. Ketuk untuk menyetel agar bergetar. Layanan aksesibilitas mungkin dibisukan."</string>
<string name="volume_stream_content_description_mute" msgid="4079046784917920984">"%1$s. Ketuk untuk membisukan. Layanan aksesibilitas mungkin dibisukan."</string>
diff --git a/packages/SystemUI/res/values-in/tiles_states_strings.xml b/packages/SystemUI/res/values-in/tiles_states_strings.xml
index 71460a71..9be5d02 100644
--- a/packages/SystemUI/res/values-in/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-in/tiles_states_strings.xml
@@ -126,6 +126,9 @@
<item msgid="8259411607272330225">"Nonaktif"</item>
<item msgid="578444932039713369">"Aktif"</item>
</string-array>
+ <!-- no translation found for tile_states_record_issue:0 (1727196795383575383) -->
+ <!-- no translation found for tile_states_record_issue:1 (9061144428113385092) -->
+ <!-- no translation found for tile_states_record_issue:2 (2984256114867200368) -->
<string-array name="tile_states_reverse">
<item msgid="3574611556622963971">"Tidak tersedia"</item>
<item msgid="8707481475312432575">"Nonaktif"</item>
diff --git a/packages/SystemUI/res/values-is/strings.xml b/packages/SystemUI/res/values-is/strings.xml
index bbc8eab..47756c2 100644
--- a/packages/SystemUI/res/values-is/strings.xml
+++ b/packages/SystemUI/res/values-is/strings.xml
@@ -575,10 +575,8 @@
<string name="volume_ringer_status_normal" msgid="1339039682222461143">"Hringing"</string>
<string name="volume_ringer_status_vibrate" msgid="6970078708957857825">"Titringur"</string>
<string name="volume_ringer_status_silent" msgid="3691324657849880883">"Hljóð af"</string>
- <!-- no translation found for media_device_cast (4786241789687569892) -->
- <skip />
- <!-- no translation found for stream_notification_unavailable (4313854556205836435) -->
- <skip />
+ <string name="media_device_cast" msgid="4786241789687569892">"Senda út"</string>
+ <string name="stream_notification_unavailable" msgid="4313854556205836435">"Ekki í boði þar sem hringing er þögguð"</string>
<string name="volume_stream_content_description_unmute" msgid="7729576371406792977">"%1$s. Ýttu til að hætta að þagga."</string>
<string name="volume_stream_content_description_vibrate" msgid="4858111994183089761">"%1$s. Ýttu til að stilla á titring. Hugsanlega verður slökkt á hljóði aðgengisþjónustu."</string>
<string name="volume_stream_content_description_mute" msgid="4079046784917920984">"%1$s. Ýttu til að þagga. Hugsanlega verður slökkt á hljóði aðgengisþjónustu."</string>
diff --git a/packages/SystemUI/res/values-is/tiles_states_strings.xml b/packages/SystemUI/res/values-is/tiles_states_strings.xml
index 17aaf6c..1ee6e47 100644
--- a/packages/SystemUI/res/values-is/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-is/tiles_states_strings.xml
@@ -126,6 +126,9 @@
<item msgid="8259411607272330225">"Slökkt"</item>
<item msgid="578444932039713369">"Kveikt"</item>
</string-array>
+ <!-- no translation found for tile_states_record_issue:0 (1727196795383575383) -->
+ <!-- no translation found for tile_states_record_issue:1 (9061144428113385092) -->
+ <!-- no translation found for tile_states_record_issue:2 (2984256114867200368) -->
<string-array name="tile_states_reverse">
<item msgid="3574611556622963971">"Ekki í boði"</item>
<item msgid="8707481475312432575">"Slökkt"</item>
diff --git a/packages/SystemUI/res/values-it/strings.xml b/packages/SystemUI/res/values-it/strings.xml
index 7c09c59..5bad44c 100644
--- a/packages/SystemUI/res/values-it/strings.xml
+++ b/packages/SystemUI/res/values-it/strings.xml
@@ -575,10 +575,8 @@
<string name="volume_ringer_status_normal" msgid="1339039682222461143">"Attiva suoneria"</string>
<string name="volume_ringer_status_vibrate" msgid="6970078708957857825">"Attiva vibrazione"</string>
<string name="volume_ringer_status_silent" msgid="3691324657849880883">"Silenzia"</string>
- <!-- no translation found for media_device_cast (4786241789687569892) -->
- <skip />
- <!-- no translation found for stream_notification_unavailable (4313854556205836435) -->
- <skip />
+ <string name="media_device_cast" msgid="4786241789687569892">"Trasmissione"</string>
+ <string name="stream_notification_unavailable" msgid="4313854556205836435">"Non disponibile con l\'audio disattivato"</string>
<string name="volume_stream_content_description_unmute" msgid="7729576371406792977">"%1$s. Tocca per riattivare l\'audio."</string>
<string name="volume_stream_content_description_vibrate" msgid="4858111994183089761">"%1$s. Tocca per attivare la vibrazione. L\'audio dei servizi di accessibilità può essere disattivato."</string>
<string name="volume_stream_content_description_mute" msgid="4079046784917920984">"%1$s. Tocca per disattivare l\'audio. L\'audio dei servizi di accessibilità può essere disattivato."</string>
diff --git a/packages/SystemUI/res/values-it/tiles_states_strings.xml b/packages/SystemUI/res/values-it/tiles_states_strings.xml
index 7aa09d4..28e28ae 100644
--- a/packages/SystemUI/res/values-it/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-it/tiles_states_strings.xml
@@ -126,6 +126,9 @@
<item msgid="8259411607272330225">"Off"</item>
<item msgid="578444932039713369">"On"</item>
</string-array>
+ <!-- no translation found for tile_states_record_issue:0 (1727196795383575383) -->
+ <!-- no translation found for tile_states_record_issue:1 (9061144428113385092) -->
+ <!-- no translation found for tile_states_record_issue:2 (2984256114867200368) -->
<string-array name="tile_states_reverse">
<item msgid="3574611556622963971">"Non disponibile"</item>
<item msgid="8707481475312432575">"Off"</item>
diff --git a/packages/SystemUI/res/values-iw/strings.xml b/packages/SystemUI/res/values-iw/strings.xml
index 644b599..154de15 100644
--- a/packages/SystemUI/res/values-iw/strings.xml
+++ b/packages/SystemUI/res/values-iw/strings.xml
@@ -575,10 +575,8 @@
<string name="volume_ringer_status_normal" msgid="1339039682222461143">"צלצול"</string>
<string name="volume_ringer_status_vibrate" msgid="6970078708957857825">"רטט"</string>
<string name="volume_ringer_status_silent" msgid="3691324657849880883">"השתקה"</string>
- <!-- no translation found for media_device_cast (4786241789687569892) -->
- <skip />
- <!-- no translation found for stream_notification_unavailable (4313854556205836435) -->
- <skip />
+ <string name="media_device_cast" msgid="4786241789687569892">"הפעלת Cast"</string>
+ <string name="stream_notification_unavailable" msgid="4313854556205836435">"לא זמין כי הצלצול מושתק"</string>
<string name="volume_stream_content_description_unmute" msgid="7729576371406792977">"%1$s. יש להקיש כדי לבטל את ההשתקה."</string>
<string name="volume_stream_content_description_vibrate" msgid="4858111994183089761">"%1$s. צריך להקיש כדי להגדיר רטט. ייתכן ששירותי הנגישות מושתקים."</string>
<string name="volume_stream_content_description_mute" msgid="4079046784917920984">"%1$s. יש להקיש כדי להשתיק. ייתכן ששירותי הנגישות יושתקו."</string>
diff --git a/packages/SystemUI/res/values-iw/tiles_states_strings.xml b/packages/SystemUI/res/values-iw/tiles_states_strings.xml
index bd2a6f7..bb3eb10 100644
--- a/packages/SystemUI/res/values-iw/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-iw/tiles_states_strings.xml
@@ -126,6 +126,9 @@
<item msgid="8259411607272330225">"כבוי"</item>
<item msgid="578444932039713369">"פועל"</item>
</string-array>
+ <!-- no translation found for tile_states_record_issue:0 (1727196795383575383) -->
+ <!-- no translation found for tile_states_record_issue:1 (9061144428113385092) -->
+ <!-- no translation found for tile_states_record_issue:2 (2984256114867200368) -->
<string-array name="tile_states_reverse">
<item msgid="3574611556622963971">"לא זמין"</item>
<item msgid="8707481475312432575">"כבוי"</item>
diff --git a/packages/SystemUI/res/values-ja/strings.xml b/packages/SystemUI/res/values-ja/strings.xml
index 3e0d245..227edd3 100644
--- a/packages/SystemUI/res/values-ja/strings.xml
+++ b/packages/SystemUI/res/values-ja/strings.xml
@@ -429,8 +429,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"ウィジェットの追加"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"長押ししてウィジェットをカスタマイズ"</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"ウィジェットのカスタマイズ"</string>
- <!-- no translation found for icon_description_for_disabled_widget (4693151565003206943) -->
- <skip />
+ <string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"無効なウィジェットのアプリアイコン"</string>
<string name="edit_widget" msgid="9030848101135393954">"ウィジェットを編集"</string>
<string name="button_to_remove_widget" msgid="3948204829181214098">"削除"</string>
<string name="hub_mode_add_widget_button_text" msgid="4831464661209971729">"ウィジェットを追加"</string>
@@ -575,10 +574,8 @@
<string name="volume_ringer_status_normal" msgid="1339039682222461143">"着信音"</string>
<string name="volume_ringer_status_vibrate" msgid="6970078708957857825">"バイブレーション"</string>
<string name="volume_ringer_status_silent" msgid="3691324657849880883">"ミュート"</string>
- <!-- no translation found for media_device_cast (4786241789687569892) -->
- <skip />
- <!-- no translation found for stream_notification_unavailable (4313854556205836435) -->
- <skip />
+ <string name="media_device_cast" msgid="4786241789687569892">"キャスト"</string>
+ <string name="stream_notification_unavailable" msgid="4313854556205836435">"着信音がミュートされているため利用できません"</string>
<string name="volume_stream_content_description_unmute" msgid="7729576371406792977">"%1$s。タップしてミュートを解除します。"</string>
<string name="volume_stream_content_description_vibrate" msgid="4858111994183089761">"%1$s。タップしてバイブレーションに設定します。ユーザー補助機能サービスがミュートされる場合があります。"</string>
<string name="volume_stream_content_description_mute" msgid="4079046784917920984">"%1$s。タップしてミュートします。ユーザー補助機能サービスがミュートされる場合があります。"</string>
@@ -839,10 +836,8 @@
<string name="accessibility_quick_settings_power_menu" msgid="6820426108301758412">"電源ボタン メニュー"</string>
<string name="accessibility_quick_settings_page" msgid="7506322631645550961">"ページ <xliff:g id="ID_1">%1$d</xliff:g>/<xliff:g id="ID_2">%2$d</xliff:g>"</string>
<string name="tuner_lock_screen" msgid="2267383813241144544">"ロック画面"</string>
- <!-- no translation found for finder_active (7907846989716941952) -->
- <skip />
- <!-- no translation found for shutdown_progress (5464239146561542178) -->
- <skip />
+ <string name="finder_active" msgid="7907846989716941952">"「デバイスを探す」を使うと、電源が OFF の状態でもこのスマートフォンの現在地を確認できます"</string>
+ <string name="shutdown_progress" msgid="5464239146561542178">"シャットダウン中…"</string>
<string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"取り扱いに関する手順をご覧ください"</string>
<string name="high_temp_dialog_help_text" msgid="7380171287943345858">"取り扱いに関する手順をご覧ください"</string>
<string name="high_temp_alarm_title" msgid="8654754369605452169">"デバイスを電源から外します"</string>
diff --git a/packages/SystemUI/res/values-ja/tiles_states_strings.xml b/packages/SystemUI/res/values-ja/tiles_states_strings.xml
index 31158ca..ebadf3b 100644
--- a/packages/SystemUI/res/values-ja/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-ja/tiles_states_strings.xml
@@ -126,6 +126,9 @@
<item msgid="8259411607272330225">"OFF"</item>
<item msgid="578444932039713369">"ON"</item>
</string-array>
+ <!-- no translation found for tile_states_record_issue:0 (1727196795383575383) -->
+ <!-- no translation found for tile_states_record_issue:1 (9061144428113385092) -->
+ <!-- no translation found for tile_states_record_issue:2 (2984256114867200368) -->
<string-array name="tile_states_reverse">
<item msgid="3574611556622963971">"使用不可"</item>
<item msgid="8707481475312432575">"OFF"</item>
diff --git a/packages/SystemUI/res/values-ka/strings.xml b/packages/SystemUI/res/values-ka/strings.xml
index 973af6f..70eeb33 100644
--- a/packages/SystemUI/res/values-ka/strings.xml
+++ b/packages/SystemUI/res/values-ka/strings.xml
@@ -575,10 +575,8 @@
<string name="volume_ringer_status_normal" msgid="1339039682222461143">"დარეკვა"</string>
<string name="volume_ringer_status_vibrate" msgid="6970078708957857825">"ვიბრაცია"</string>
<string name="volume_ringer_status_silent" msgid="3691324657849880883">"დადუმება"</string>
- <!-- no translation found for media_device_cast (4786241789687569892) -->
- <skip />
- <!-- no translation found for stream_notification_unavailable (4313854556205836435) -->
- <skip />
+ <string name="media_device_cast" msgid="4786241789687569892">"ტრანსლირება"</string>
+ <string name="stream_notification_unavailable" msgid="4313854556205836435">"ზარის დადუმების გამო ხელმისაწვდომი არაა"</string>
<string name="volume_stream_content_description_unmute" msgid="7729576371406792977">"%1$s. შეეხეთ დადუმების გასაუქმებლად."</string>
<string name="volume_stream_content_description_vibrate" msgid="4858111994183089761">"%1$s. შეეხეთ ვიბრაციაზე დასაყენებლად. შეიძლება დადუმდეს მარტივი წვდომის სერვისებიც."</string>
<string name="volume_stream_content_description_mute" msgid="4079046784917920984">"%1$s. შეეხეთ დასადუმებლად. შეიძლება დადუმდეს მარტივი წვდომის სერვისებიც."</string>
diff --git a/packages/SystemUI/res/values-ka/tiles_states_strings.xml b/packages/SystemUI/res/values-ka/tiles_states_strings.xml
index 366030a..07a8a76 100644
--- a/packages/SystemUI/res/values-ka/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-ka/tiles_states_strings.xml
@@ -126,6 +126,9 @@
<item msgid="8259411607272330225">"გამორთულია"</item>
<item msgid="578444932039713369">"ჩართულია"</item>
</string-array>
+ <!-- no translation found for tile_states_record_issue:0 (1727196795383575383) -->
+ <!-- no translation found for tile_states_record_issue:1 (9061144428113385092) -->
+ <!-- no translation found for tile_states_record_issue:2 (2984256114867200368) -->
<string-array name="tile_states_reverse">
<item msgid="3574611556622963971">"მიუწვდომელია"</item>
<item msgid="8707481475312432575">"გამორთულია"</item>
diff --git a/packages/SystemUI/res/values-kk/strings.xml b/packages/SystemUI/res/values-kk/strings.xml
index d5ae0ac..c2525d9 100644
--- a/packages/SystemUI/res/values-kk/strings.xml
+++ b/packages/SystemUI/res/values-kk/strings.xml
@@ -575,10 +575,8 @@
<string name="volume_ringer_status_normal" msgid="1339039682222461143">"Шылдырлау"</string>
<string name="volume_ringer_status_vibrate" msgid="6970078708957857825">"Діріл"</string>
<string name="volume_ringer_status_silent" msgid="3691324657849880883">"Дыбысын өшіру"</string>
- <!-- no translation found for media_device_cast (4786241789687569892) -->
- <skip />
- <!-- no translation found for stream_notification_unavailable (4313854556205836435) -->
- <skip />
+ <string name="media_device_cast" msgid="4786241789687569892">"Трансляциялау"</string>
+ <string name="stream_notification_unavailable" msgid="4313854556205836435">"Қолжетімді емес, шылдырлату өшірулі."</string>
<string name="volume_stream_content_description_unmute" msgid="7729576371406792977">"%1$s. Дыбысын қосу үшін түртіңіз."</string>
<string name="volume_stream_content_description_vibrate" msgid="4858111994183089761">"%1$s. Діріл режимін орнату үшін түртіңіз. Арнайы мүмкіндік қызметтерінің дыбысы өшуі мүмкін."</string>
<string name="volume_stream_content_description_mute" msgid="4079046784917920984">"%1$s. Дыбысын өшіру үшін түртіңіз. Арнайы мүмкіндік қызметтерінің дыбысы өшуі мүмкін."</string>
diff --git a/packages/SystemUI/res/values-kk/tiles_states_strings.xml b/packages/SystemUI/res/values-kk/tiles_states_strings.xml
index b8089e4..f5b0948 100644
--- a/packages/SystemUI/res/values-kk/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-kk/tiles_states_strings.xml
@@ -126,6 +126,9 @@
<item msgid="8259411607272330225">"Өшірулі"</item>
<item msgid="578444932039713369">"Қосулы"</item>
</string-array>
+ <!-- no translation found for tile_states_record_issue:0 (1727196795383575383) -->
+ <!-- no translation found for tile_states_record_issue:1 (9061144428113385092) -->
+ <!-- no translation found for tile_states_record_issue:2 (2984256114867200368) -->
<string-array name="tile_states_reverse">
<item msgid="3574611556622963971">"Қолжетімсіз"</item>
<item msgid="8707481475312432575">"Өшірулі"</item>
diff --git a/packages/SystemUI/res/values-km/strings.xml b/packages/SystemUI/res/values-km/strings.xml
index 11a284d..0d25033 100644
--- a/packages/SystemUI/res/values-km/strings.xml
+++ b/packages/SystemUI/res/values-km/strings.xml
@@ -575,10 +575,8 @@
<string name="volume_ringer_status_normal" msgid="1339039682222461143">"រោទ៍"</string>
<string name="volume_ringer_status_vibrate" msgid="6970078708957857825">"ញ័រ"</string>
<string name="volume_ringer_status_silent" msgid="3691324657849880883">"បិទសំឡេង"</string>
- <!-- no translation found for media_device_cast (4786241789687569892) -->
- <skip />
- <!-- no translation found for stream_notification_unavailable (4313854556205836435) -->
- <skip />
+ <string name="media_device_cast" msgid="4786241789687569892">"បញ្ជូន"</string>
+ <string name="stream_notification_unavailable" msgid="4313854556205836435">"មិនអាចប្រើបានទេ ព្រោះសំឡេងរោទ៍ត្រូវបានបិទ"</string>
<string name="volume_stream_content_description_unmute" msgid="7729576371406792977">"%1$s។ ប៉ះដើម្បីបើកសំឡេង។"</string>
<string name="volume_stream_content_description_vibrate" msgid="4858111994183089761">"%1$s។ ប៉ះដើម្បីកំណត់ឲ្យញ័រ។ សេវាកម្មលទ្ធភាពប្រើប្រាស់អាចនឹងត្រូវបានបិទសំឡេង។"</string>
<string name="volume_stream_content_description_mute" msgid="4079046784917920984">"%1$s។ ប៉ះដើម្បីបិទសំឡេង។ សេវាកម្មលទ្ធភាពប្រើប្រាស់អាចនឹងត្រូវបានបិទសំឡេង។"</string>
diff --git a/packages/SystemUI/res/values-km/tiles_states_strings.xml b/packages/SystemUI/res/values-km/tiles_states_strings.xml
index 8c5c8d1..a2031b0 100644
--- a/packages/SystemUI/res/values-km/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-km/tiles_states_strings.xml
@@ -126,6 +126,9 @@
<item msgid="8259411607272330225">"បិទ"</item>
<item msgid="578444932039713369">"បើក"</item>
</string-array>
+ <!-- no translation found for tile_states_record_issue:0 (1727196795383575383) -->
+ <!-- no translation found for tile_states_record_issue:1 (9061144428113385092) -->
+ <!-- no translation found for tile_states_record_issue:2 (2984256114867200368) -->
<string-array name="tile_states_reverse">
<item msgid="3574611556622963971">"មិនមានទេ"</item>
<item msgid="8707481475312432575">"បិទ"</item>
diff --git a/packages/SystemUI/res/values-kn/strings.xml b/packages/SystemUI/res/values-kn/strings.xml
index a311a86..66b8e72 100644
--- a/packages/SystemUI/res/values-kn/strings.xml
+++ b/packages/SystemUI/res/values-kn/strings.xml
@@ -575,10 +575,8 @@
<string name="volume_ringer_status_normal" msgid="1339039682222461143">"ರಿಂಗ್"</string>
<string name="volume_ringer_status_vibrate" msgid="6970078708957857825">"ವೈಬ್ರೇಟ್"</string>
<string name="volume_ringer_status_silent" msgid="3691324657849880883">"ಮ್ಯೂಟ್"</string>
- <!-- no translation found for media_device_cast (4786241789687569892) -->
- <skip />
- <!-- no translation found for stream_notification_unavailable (4313854556205836435) -->
- <skip />
+ <string name="media_device_cast" msgid="4786241789687569892">"ಬಿತ್ತರಿಸಿ"</string>
+ <string name="stream_notification_unavailable" msgid="4313854556205836435">"ರಿಂಗ್ ಮ್ಯೂಟ್ ಆಗಿರುವ ಕಾರಣ ಲಭ್ಯವಿಲ್ಲ"</string>
<string name="volume_stream_content_description_unmute" msgid="7729576371406792977">"%1$s. ಅನ್ಮ್ಯೂಟ್ ಮಾಡುವುದಕ್ಕಾಗಿ ಟ್ಯಾಪ್ ಮಾಡಿ."</string>
<string name="volume_stream_content_description_vibrate" msgid="4858111994183089761">"%1$s. ಕಂಪನಕ್ಕೆ ಹೊಂದಿಸಲು ಟ್ಯಾಪ್ ಮಾಡಿ. ಆ್ಯಕ್ಸೆಸಿಬಿಲಿಟಿ ಸೇವೆಗಳನ್ನು ಮ್ಯೂಟ್ ಮಾಡಬಹುದು."</string>
<string name="volume_stream_content_description_mute" msgid="4079046784917920984">"%1$s. ಮ್ಯೂಟ್ ಮಾಡಲು ಟ್ಯಾಪ್ ಮಾಡಿ. ಆ್ಯಕ್ಸೆಸಿಬಿಲಿಟಿ ಸೇವೆಗಳನ್ನು ಮ್ಯೂಟ್ ಮಾಡಬಹುದು."</string>
diff --git a/packages/SystemUI/res/values-kn/tiles_states_strings.xml b/packages/SystemUI/res/values-kn/tiles_states_strings.xml
index 250eb5a..de0fcae 100644
--- a/packages/SystemUI/res/values-kn/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-kn/tiles_states_strings.xml
@@ -126,6 +126,9 @@
<item msgid="8259411607272330225">"ಆಫ್"</item>
<item msgid="578444932039713369">"ಆನ್"</item>
</string-array>
+ <!-- no translation found for tile_states_record_issue:0 (1727196795383575383) -->
+ <!-- no translation found for tile_states_record_issue:1 (9061144428113385092) -->
+ <!-- no translation found for tile_states_record_issue:2 (2984256114867200368) -->
<string-array name="tile_states_reverse">
<item msgid="3574611556622963971">"ಲಭ್ಯವಿಲ್ಲ"</item>
<item msgid="8707481475312432575">"ಆಫ್"</item>
diff --git a/packages/SystemUI/res/values-ko/strings.xml b/packages/SystemUI/res/values-ko/strings.xml
index 1fe5f90..028c8cf 100644
--- a/packages/SystemUI/res/values-ko/strings.xml
+++ b/packages/SystemUI/res/values-ko/strings.xml
@@ -575,10 +575,8 @@
<string name="volume_ringer_status_normal" msgid="1339039682222461143">"벨소리"</string>
<string name="volume_ringer_status_vibrate" msgid="6970078708957857825">"진동"</string>
<string name="volume_ringer_status_silent" msgid="3691324657849880883">"음소거"</string>
- <!-- no translation found for media_device_cast (4786241789687569892) -->
- <skip />
- <!-- no translation found for stream_notification_unavailable (4313854556205836435) -->
- <skip />
+ <string name="media_device_cast" msgid="4786241789687569892">"전송"</string>
+ <string name="stream_notification_unavailable" msgid="4313854556205836435">"벨소리가 음소거되어 있으므로 사용할 수 없음"</string>
<string name="volume_stream_content_description_unmute" msgid="7729576371406792977">"%1$s. 탭하여 음소거를 해제하세요."</string>
<string name="volume_stream_content_description_vibrate" msgid="4858111994183089761">"%1$s. 탭하여 진동으로 설정하세요. 접근성 서비스가 음소거될 수 있습니다."</string>
<string name="volume_stream_content_description_mute" msgid="4079046784917920984">"%1$s. 탭하여 음소거로 설정하세요. 접근성 서비스가 음소거될 수 있습니다."</string>
diff --git a/packages/SystemUI/res/values-ko/tiles_states_strings.xml b/packages/SystemUI/res/values-ko/tiles_states_strings.xml
index 7981d28..c9b2846 100644
--- a/packages/SystemUI/res/values-ko/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-ko/tiles_states_strings.xml
@@ -126,6 +126,9 @@
<item msgid="8259411607272330225">"꺼짐"</item>
<item msgid="578444932039713369">"켜짐"</item>
</string-array>
+ <!-- no translation found for tile_states_record_issue:0 (1727196795383575383) -->
+ <!-- no translation found for tile_states_record_issue:1 (9061144428113385092) -->
+ <!-- no translation found for tile_states_record_issue:2 (2984256114867200368) -->
<string-array name="tile_states_reverse">
<item msgid="3574611556622963971">"이용 불가"</item>
<item msgid="8707481475312432575">"꺼짐"</item>
diff --git a/packages/SystemUI/res/values-ky/strings.xml b/packages/SystemUI/res/values-ky/strings.xml
index 789f7d8..0f00555 100644
--- a/packages/SystemUI/res/values-ky/strings.xml
+++ b/packages/SystemUI/res/values-ky/strings.xml
@@ -575,10 +575,8 @@
<string name="volume_ringer_status_normal" msgid="1339039682222461143">"Шыңгыратуу"</string>
<string name="volume_ringer_status_vibrate" msgid="6970078708957857825">"Дирилдөө"</string>
<string name="volume_ringer_status_silent" msgid="3691324657849880883">"Үнсүз"</string>
- <!-- no translation found for media_device_cast (4786241789687569892) -->
- <skip />
- <!-- no translation found for stream_notification_unavailable (4313854556205836435) -->
- <skip />
+ <string name="media_device_cast" msgid="4786241789687569892">"Тышкы экранга чыгруу"</string>
+ <string name="stream_notification_unavailable" msgid="4313854556205836435">"Үнсүз режимде жеткиликсиз"</string>
<string name="volume_stream_content_description_unmute" msgid="7729576371406792977">"%1$s. Үнүн чыгаруу үчүн таптап коюңуз."</string>
<string name="volume_stream_content_description_vibrate" msgid="4858111994183089761">"%1$s. Дирилдөөгө коюу үчүн таптап коюңуз. Атайын мүмкүнчүлүктөр кызматынын үнүн өчүрүп койсо болот."</string>
<string name="volume_stream_content_description_mute" msgid="4079046784917920984">"%1$s. Үнүн өчүрүү үчүн таптап коюңуз. Атайын мүмкүнчүлүктөр кызматынын үнүн өчүрүп койсо болот."</string>
diff --git a/packages/SystemUI/res/values-ky/tiles_states_strings.xml b/packages/SystemUI/res/values-ky/tiles_states_strings.xml
index 0f277f9..bc47e5a 100644
--- a/packages/SystemUI/res/values-ky/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-ky/tiles_states_strings.xml
@@ -126,6 +126,9 @@
<item msgid="8259411607272330225">"Өчүк"</item>
<item msgid="578444932039713369">"Күйүк"</item>
</string-array>
+ <!-- no translation found for tile_states_record_issue:0 (1727196795383575383) -->
+ <!-- no translation found for tile_states_record_issue:1 (9061144428113385092) -->
+ <!-- no translation found for tile_states_record_issue:2 (2984256114867200368) -->
<string-array name="tile_states_reverse">
<item msgid="3574611556622963971">"Жеткиликсиз"</item>
<item msgid="8707481475312432575">"Өчүк"</item>
diff --git a/packages/SystemUI/res/values-lo/strings.xml b/packages/SystemUI/res/values-lo/strings.xml
index 1ca3b2f..db97655 100644
--- a/packages/SystemUI/res/values-lo/strings.xml
+++ b/packages/SystemUI/res/values-lo/strings.xml
@@ -429,8 +429,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"ເພີ່ມວິດເຈັດເພີ່ມເຕີມ"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"ກົດຄ້າງໄວ້ເພື່ອປັບແຕ່ງວິດເຈັດ"</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"ປັບແຕ່ງວິດເຈັດ"</string>
- <!-- no translation found for icon_description_for_disabled_widget (4693151565003206943) -->
- <skip />
+ <string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"ໄອຄອນແອັບສຳລັບວິດເຈັດທີ່ຖືກປິດການນຳໃຊ້"</string>
<string name="edit_widget" msgid="9030848101135393954">"ແກ້ໄຂວິດເຈັດ"</string>
<string name="button_to_remove_widget" msgid="3948204829181214098">"ລຶບອອກ"</string>
<string name="hub_mode_add_widget_button_text" msgid="4831464661209971729">"ເພີ່ມວິດເຈັດ"</string>
@@ -837,10 +836,8 @@
<string name="accessibility_quick_settings_power_menu" msgid="6820426108301758412">"ເມນູເປີດປິດ"</string>
<string name="accessibility_quick_settings_page" msgid="7506322631645550961">"<xliff:g id="ID_1">%1$d</xliff:g> ຈາກທັງໝົດ <xliff:g id="ID_2">%2$d</xliff:g>"</string>
<string name="tuner_lock_screen" msgid="2267383813241144544">"ໜ້າຈໍລັອກ"</string>
- <!-- no translation found for finder_active (7907846989716941952) -->
- <skip />
- <!-- no translation found for shutdown_progress (5464239146561542178) -->
- <skip />
+ <string name="finder_active" msgid="7907846989716941952">"ທ່ານສາມາດຊອກຫາສະຖານທີ່ຂອງໂທລະສັບເຄື່ອງນີ້ໄດ້ດ້ວຍແອັບຊອກຫາອຸປະກອນຂອງຂ້ອຍເຖິງແມ່ນວ່າຈະປິດເຄື່ອງຢູ່ກໍຕາມ"</string>
+ <string name="shutdown_progress" msgid="5464239146561542178">"ກຳລັງປິດເຄື່ອງ…"</string>
<string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"ເບິ່ງຂັ້ນຕອນການເບິ່ງແຍງ"</string>
<string name="high_temp_dialog_help_text" msgid="7380171287943345858">"ເບິ່ງຂັ້ນຕອນການເບິ່ງແຍງ"</string>
<string name="high_temp_alarm_title" msgid="8654754369605452169">"ຖອດອຸປະກອນຂອງທ່ານອອກ"</string>
diff --git a/packages/SystemUI/res/values-lo/tiles_states_strings.xml b/packages/SystemUI/res/values-lo/tiles_states_strings.xml
index d54cf4d..7595897 100644
--- a/packages/SystemUI/res/values-lo/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-lo/tiles_states_strings.xml
@@ -126,6 +126,9 @@
<item msgid="8259411607272330225">"ປິດ"</item>
<item msgid="578444932039713369">"ເປີດ"</item>
</string-array>
+ <!-- no translation found for tile_states_record_issue:0 (1727196795383575383) -->
+ <!-- no translation found for tile_states_record_issue:1 (9061144428113385092) -->
+ <!-- no translation found for tile_states_record_issue:2 (2984256114867200368) -->
<string-array name="tile_states_reverse">
<item msgid="3574611556622963971">"ບໍ່ສາມາດໃຊ້ໄດ້"</item>
<item msgid="8707481475312432575">"ປິດ"</item>
diff --git a/packages/SystemUI/res/values-lt/strings.xml b/packages/SystemUI/res/values-lt/strings.xml
index eac5ee4..9eaab8f 100644
--- a/packages/SystemUI/res/values-lt/strings.xml
+++ b/packages/SystemUI/res/values-lt/strings.xml
@@ -575,10 +575,8 @@
<string name="volume_ringer_status_normal" msgid="1339039682222461143">"Skambinti"</string>
<string name="volume_ringer_status_vibrate" msgid="6970078708957857825">"Vibruoti"</string>
<string name="volume_ringer_status_silent" msgid="3691324657849880883">"Nutildyti"</string>
- <!-- no translation found for media_device_cast (4786241789687569892) -->
- <skip />
- <!-- no translation found for stream_notification_unavailable (4313854556205836435) -->
- <skip />
+ <string name="media_device_cast" msgid="4786241789687569892">"Perdavimas"</string>
+ <string name="stream_notification_unavailable" msgid="4313854556205836435">"Nepasiekiama, nes skambutis nutildytas"</string>
<string name="volume_stream_content_description_unmute" msgid="7729576371406792977">"%1$s. Palieskite, kad įjungtumėte garsą."</string>
<string name="volume_stream_content_description_vibrate" msgid="4858111994183089761">"%1$s. Palieskite, kad nustatytumėte vibravimą. Gali būti nutildytos pritaikymo neįgaliesiems paslaugos."</string>
<string name="volume_stream_content_description_mute" msgid="4079046784917920984">"%1$s. Palieskite, kad nutildytumėte. Gali būti nutildytos pritaikymo neįgaliesiems paslaugos."</string>
diff --git a/packages/SystemUI/res/values-lt/tiles_states_strings.xml b/packages/SystemUI/res/values-lt/tiles_states_strings.xml
index e66f590..94343ba 100644
--- a/packages/SystemUI/res/values-lt/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-lt/tiles_states_strings.xml
@@ -126,6 +126,9 @@
<item msgid="8259411607272330225">"Išjungta"</item>
<item msgid="578444932039713369">"Įjungta"</item>
</string-array>
+ <!-- no translation found for tile_states_record_issue:0 (1727196795383575383) -->
+ <!-- no translation found for tile_states_record_issue:1 (9061144428113385092) -->
+ <!-- no translation found for tile_states_record_issue:2 (2984256114867200368) -->
<string-array name="tile_states_reverse">
<item msgid="3574611556622963971">"Nepasiekiama"</item>
<item msgid="8707481475312432575">"Išjungta"</item>
diff --git a/packages/SystemUI/res/values-lv/tiles_states_strings.xml b/packages/SystemUI/res/values-lv/tiles_states_strings.xml
index d32efec..d8b2467 100644
--- a/packages/SystemUI/res/values-lv/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-lv/tiles_states_strings.xml
@@ -126,6 +126,9 @@
<item msgid="8259411607272330225">"Izslēgta"</item>
<item msgid="578444932039713369">"Ieslēgta"</item>
</string-array>
+ <!-- no translation found for tile_states_record_issue:0 (1727196795383575383) -->
+ <!-- no translation found for tile_states_record_issue:1 (9061144428113385092) -->
+ <!-- no translation found for tile_states_record_issue:2 (2984256114867200368) -->
<string-array name="tile_states_reverse">
<item msgid="3574611556622963971">"Nav pieejama"</item>
<item msgid="8707481475312432575">"Izslēgta"</item>
diff --git a/packages/SystemUI/res/values-mk/strings.xml b/packages/SystemUI/res/values-mk/strings.xml
index b244fe9..6ea4d1f 100644
--- a/packages/SystemUI/res/values-mk/strings.xml
+++ b/packages/SystemUI/res/values-mk/strings.xml
@@ -575,10 +575,8 @@
<string name="volume_ringer_status_normal" msgid="1339039682222461143">"Ѕвони"</string>
<string name="volume_ringer_status_vibrate" msgid="6970078708957857825">"Вибрации"</string>
<string name="volume_ringer_status_silent" msgid="3691324657849880883">"Исклучи звук"</string>
- <!-- no translation found for media_device_cast (4786241789687569892) -->
- <skip />
- <!-- no translation found for stream_notification_unavailable (4313854556205836435) -->
- <skip />
+ <string name="media_device_cast" msgid="4786241789687569892">"Емитување"</string>
+ <string name="stream_notification_unavailable" msgid="4313854556205836435">"Недостапно бидејќи ѕвонењето е исклучено"</string>
<string name="volume_stream_content_description_unmute" msgid="7729576371406792977">"%1$s. Допрете за да вклучите звук."</string>
<string name="volume_stream_content_description_vibrate" msgid="4858111994183089761">"%1$s. Допрете за да поставите на вибрации. Можеби ќе се исклучи звукот на услугите за достапност."</string>
<string name="volume_stream_content_description_mute" msgid="4079046784917920984">"%1$s. Допрете за да исклучите звук. Можеби ќе се исклучи звукот на услугите за достапност."</string>
diff --git a/packages/SystemUI/res/values-mk/tiles_states_strings.xml b/packages/SystemUI/res/values-mk/tiles_states_strings.xml
index 0a42d7c..8b0faf7 100644
--- a/packages/SystemUI/res/values-mk/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-mk/tiles_states_strings.xml
@@ -126,6 +126,9 @@
<item msgid="8259411607272330225">"Исклучено"</item>
<item msgid="578444932039713369">"Вклучено"</item>
</string-array>
+ <!-- no translation found for tile_states_record_issue:0 (1727196795383575383) -->
+ <!-- no translation found for tile_states_record_issue:1 (9061144428113385092) -->
+ <!-- no translation found for tile_states_record_issue:2 (2984256114867200368) -->
<string-array name="tile_states_reverse">
<item msgid="3574611556622963971">"Недостапно"</item>
<item msgid="8707481475312432575">"Исклучено"</item>
diff --git a/packages/SystemUI/res/values-ml/strings.xml b/packages/SystemUI/res/values-ml/strings.xml
index 8678b66..82d257a 100644
--- a/packages/SystemUI/res/values-ml/strings.xml
+++ b/packages/SystemUI/res/values-ml/strings.xml
@@ -429,8 +429,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"കൂടുതൽ വിജറ്റുകൾ ചേർക്കുക"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"വിജറ്റുകൾ ഇഷ്ടാനുസൃതമാക്കാൻ ദീർഘനേരം അമർത്തുക"</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"വിജറ്റുകൾ ഇഷ്ടാനുസൃതമാക്കുക"</string>
- <!-- no translation found for icon_description_for_disabled_widget (4693151565003206943) -->
- <skip />
+ <string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"പ്രവർത്തനരഹിതമാക്കിയ വിജറ്റിനുള്ള ആപ്പ് ഐക്കൺ"</string>
<string name="edit_widget" msgid="9030848101135393954">"വിജറ്റ് എഡിറ്റ് ചെയ്യുക"</string>
<string name="button_to_remove_widget" msgid="3948204829181214098">"നീക്കം ചെയ്യുക"</string>
<string name="hub_mode_add_widget_button_text" msgid="4831464661209971729">"വിജറ്റ് ചേർക്കുക"</string>
@@ -837,10 +836,8 @@
<string name="accessibility_quick_settings_power_menu" msgid="6820426108301758412">"പവർ മെനു"</string>
<string name="accessibility_quick_settings_page" msgid="7506322631645550961">"പേജ് <xliff:g id="ID_1">%1$d</xliff:g> / <xliff:g id="ID_2">%2$d</xliff:g>"</string>
<string name="tuner_lock_screen" msgid="2267383813241144544">"ലോക്ക് സ്ക്രീൻ"</string>
- <!-- no translation found for finder_active (7907846989716941952) -->
- <skip />
- <!-- no translation found for shutdown_progress (5464239146561542178) -->
- <skip />
+ <string name="finder_active" msgid="7907846989716941952">"ഓഫായിരിക്കുമ്പോഴും Find My Device ഉപയോഗിച്ച് നിങ്ങൾക്ക് ഈ ഫോൺ കണ്ടെത്താനാകും"</string>
+ <string name="shutdown_progress" msgid="5464239146561542178">"ഷട്ട്ഡൗൺ ചെയ്യുന്നു…"</string>
<string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"പരിപാലന നിർദ്ദേശങ്ങൾ കാണുക"</string>
<string name="high_temp_dialog_help_text" msgid="7380171287943345858">"പരിപാലന നിർദ്ദേശങ്ങൾ കാണുക"</string>
<string name="high_temp_alarm_title" msgid="8654754369605452169">"ഉപകരണം അൺപ്ലഗ് ചെയ്യുക"</string>
diff --git a/packages/SystemUI/res/values-ml/tiles_states_strings.xml b/packages/SystemUI/res/values-ml/tiles_states_strings.xml
index 62bac5c..529d0de 100644
--- a/packages/SystemUI/res/values-ml/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-ml/tiles_states_strings.xml
@@ -126,6 +126,9 @@
<item msgid="8259411607272330225">"ഓഫാണ്"</item>
<item msgid="578444932039713369">"ഓണാണ്"</item>
</string-array>
+ <!-- no translation found for tile_states_record_issue:0 (1727196795383575383) -->
+ <!-- no translation found for tile_states_record_issue:1 (9061144428113385092) -->
+ <!-- no translation found for tile_states_record_issue:2 (2984256114867200368) -->
<string-array name="tile_states_reverse">
<item msgid="3574611556622963971">"ലഭ്യമല്ല"</item>
<item msgid="8707481475312432575">"ഓഫാണ്"</item>
diff --git a/packages/SystemUI/res/values-mn/strings.xml b/packages/SystemUI/res/values-mn/strings.xml
index 8aafee3..aad6a13 100644
--- a/packages/SystemUI/res/values-mn/strings.xml
+++ b/packages/SystemUI/res/values-mn/strings.xml
@@ -575,10 +575,8 @@
<string name="volume_ringer_status_normal" msgid="1339039682222461143">"Хонх дуугаргах"</string>
<string name="volume_ringer_status_vibrate" msgid="6970078708957857825">"Чичиргэх"</string>
<string name="volume_ringer_status_silent" msgid="3691324657849880883">"Хаах"</string>
- <!-- no translation found for media_device_cast (4786241789687569892) -->
- <skip />
- <!-- no translation found for stream_notification_unavailable (4313854556205836435) -->
- <skip />
+ <string name="media_device_cast" msgid="4786241789687569892">"Дамжуулах"</string>
+ <string name="stream_notification_unavailable" msgid="4313854556205836435">"Хонхны дууг хаасан тул боломжгүй"</string>
<string name="volume_stream_content_description_unmute" msgid="7729576371406792977">"%1$s. Дууг нь нээхийн тулд товшино уу."</string>
<string name="volume_stream_content_description_vibrate" msgid="4858111994183089761">"%1$s. Чичиргээнд тохируулахын тулд товшино уу. Хүртээмжийн үйлчилгээний дууг хаасан."</string>
<string name="volume_stream_content_description_mute" msgid="4079046784917920984">"%1$s. Дууг нь хаахын тулд товшино уу. Хүртээмжийн үйлчилгээний дууг хаасан."</string>
diff --git a/packages/SystemUI/res/values-mn/tiles_states_strings.xml b/packages/SystemUI/res/values-mn/tiles_states_strings.xml
index 33f3596..0db1229 100644
--- a/packages/SystemUI/res/values-mn/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-mn/tiles_states_strings.xml
@@ -126,6 +126,9 @@
<item msgid="8259411607272330225">"Унтраалттай"</item>
<item msgid="578444932039713369">"Асаалттай"</item>
</string-array>
+ <!-- no translation found for tile_states_record_issue:0 (1727196795383575383) -->
+ <!-- no translation found for tile_states_record_issue:1 (9061144428113385092) -->
+ <!-- no translation found for tile_states_record_issue:2 (2984256114867200368) -->
<string-array name="tile_states_reverse">
<item msgid="3574611556622963971">"Боломжгүй"</item>
<item msgid="8707481475312432575">"Унтраалттай"</item>
diff --git a/packages/SystemUI/res/values-mr/strings.xml b/packages/SystemUI/res/values-mr/strings.xml
index e781b45..d7acf5f 100644
--- a/packages/SystemUI/res/values-mr/strings.xml
+++ b/packages/SystemUI/res/values-mr/strings.xml
@@ -575,10 +575,8 @@
<string name="volume_ringer_status_normal" msgid="1339039682222461143">"रिंग करा"</string>
<string name="volume_ringer_status_vibrate" msgid="6970078708957857825">"व्हायब्रेट"</string>
<string name="volume_ringer_status_silent" msgid="3691324657849880883">"म्यूट करा"</string>
- <!-- no translation found for media_device_cast (4786241789687569892) -->
- <skip />
- <!-- no translation found for stream_notification_unavailable (4313854556205836435) -->
- <skip />
+ <string name="media_device_cast" msgid="4786241789687569892">"कास्ट करा"</string>
+ <string name="stream_notification_unavailable" msgid="4313854556205836435">"रिंग म्यूट केल्यामुळे उपलब्ध नाही"</string>
<string name="volume_stream_content_description_unmute" msgid="7729576371406792977">"%1$s. अनम्यूट करण्यासाठी टॅप करा."</string>
<string name="volume_stream_content_description_vibrate" msgid="4858111994183089761">"%1$s. व्हायब्रेट सेट करण्यासाठी टॅप करा. प्रवेशयोग्यता सेवा म्यूट केल्या जाऊ शकतात."</string>
<string name="volume_stream_content_description_mute" msgid="4079046784917920984">"%1$s. म्यूट करण्यासाठी टॅप करा. प्रवेशक्षमता सेवा म्यूट केल्या जाऊ शकतात."</string>
diff --git a/packages/SystemUI/res/values-mr/tiles_states_strings.xml b/packages/SystemUI/res/values-mr/tiles_states_strings.xml
index 24d3b47..b70a5cc 100644
--- a/packages/SystemUI/res/values-mr/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-mr/tiles_states_strings.xml
@@ -126,6 +126,9 @@
<item msgid="8259411607272330225">"बंद आहे"</item>
<item msgid="578444932039713369">"सुरू आहे"</item>
</string-array>
+ <!-- no translation found for tile_states_record_issue:0 (1727196795383575383) -->
+ <!-- no translation found for tile_states_record_issue:1 (9061144428113385092) -->
+ <!-- no translation found for tile_states_record_issue:2 (2984256114867200368) -->
<string-array name="tile_states_reverse">
<item msgid="3574611556622963971">"उपलब्ध नाही"</item>
<item msgid="8707481475312432575">"बंद आहे"</item>
diff --git a/packages/SystemUI/res/values-ms/tiles_states_strings.xml b/packages/SystemUI/res/values-ms/tiles_states_strings.xml
index 07a8426..b72a375 100644
--- a/packages/SystemUI/res/values-ms/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-ms/tiles_states_strings.xml
@@ -126,6 +126,9 @@
<item msgid="8259411607272330225">"Mati"</item>
<item msgid="578444932039713369">"Hidup"</item>
</string-array>
+ <!-- no translation found for tile_states_record_issue:0 (1727196795383575383) -->
+ <!-- no translation found for tile_states_record_issue:1 (9061144428113385092) -->
+ <!-- no translation found for tile_states_record_issue:2 (2984256114867200368) -->
<string-array name="tile_states_reverse">
<item msgid="3574611556622963971">"Tidak tersedia"</item>
<item msgid="8707481475312432575">"Mati"</item>
diff --git a/packages/SystemUI/res/values-my/strings.xml b/packages/SystemUI/res/values-my/strings.xml
index c408118..c6d46bc 100644
--- a/packages/SystemUI/res/values-my/strings.xml
+++ b/packages/SystemUI/res/values-my/strings.xml
@@ -575,10 +575,8 @@
<string name="volume_ringer_status_normal" msgid="1339039682222461143">"အသံမြည်သည်"</string>
<string name="volume_ringer_status_vibrate" msgid="6970078708957857825">"တုန်ခါသည်"</string>
<string name="volume_ringer_status_silent" msgid="3691324657849880883">"အသံတိတ်သည်"</string>
- <!-- no translation found for media_device_cast (4786241789687569892) -->
- <skip />
- <!-- no translation found for stream_notification_unavailable (4313854556205836435) -->
- <skip />
+ <string name="media_device_cast" msgid="4786241789687569892">"ကာစ်လုပ်ရန်"</string>
+ <string name="stream_notification_unavailable" msgid="4313854556205836435">"ဖုန်းမြည်သံပိတ်ထားသဖြင့် မရနိုင်ပါ"</string>
<string name="volume_stream_content_description_unmute" msgid="7729576371406792977">"%1$s။ အသံပြန်ဖွင့်ရန် တို့ပါ။"</string>
<string name="volume_stream_content_description_vibrate" msgid="4858111994183089761">"%1$s။ တုန်ခါမှုကို သတ်မှတ်ရန် တို့ပါ။ အများသုံးနိုင်မှု ဝန်ဆောင်မှုများကို အသံပိတ်ထားနိုင်ပါသည်။"</string>
<string name="volume_stream_content_description_mute" msgid="4079046784917920984">"%1$s။ အသံပိတ်ရန် တို့ပါ။ အများသုံးနိုင်မှု ဝန်ဆောင်မှုများကို အသံပိတ်ထားနိုင်ပါသည်။"</string>
diff --git a/packages/SystemUI/res/values-my/tiles_states_strings.xml b/packages/SystemUI/res/values-my/tiles_states_strings.xml
index fd375d4..d223dc9 100644
--- a/packages/SystemUI/res/values-my/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-my/tiles_states_strings.xml
@@ -126,6 +126,9 @@
<item msgid="8259411607272330225">"ပိတ်"</item>
<item msgid="578444932039713369">"ဖွင့်"</item>
</string-array>
+ <!-- no translation found for tile_states_record_issue:0 (1727196795383575383) -->
+ <!-- no translation found for tile_states_record_issue:1 (9061144428113385092) -->
+ <!-- no translation found for tile_states_record_issue:2 (2984256114867200368) -->
<string-array name="tile_states_reverse">
<item msgid="3574611556622963971">"မရနိုင်ပါ"</item>
<item msgid="8707481475312432575">"ပိတ်"</item>
diff --git a/packages/SystemUI/res/values-nb/strings.xml b/packages/SystemUI/res/values-nb/strings.xml
index 2ce016a..a2b97ee 100644
--- a/packages/SystemUI/res/values-nb/strings.xml
+++ b/packages/SystemUI/res/values-nb/strings.xml
@@ -575,10 +575,8 @@
<string name="volume_ringer_status_normal" msgid="1339039682222461143">"Ring"</string>
<string name="volume_ringer_status_vibrate" msgid="6970078708957857825">"Vibrer"</string>
<string name="volume_ringer_status_silent" msgid="3691324657849880883">"Ignorer"</string>
- <!-- no translation found for media_device_cast (4786241789687569892) -->
- <skip />
- <!-- no translation found for stream_notification_unavailable (4313854556205836435) -->
- <skip />
+ <string name="media_device_cast" msgid="4786241789687569892">"Cast"</string>
+ <string name="stream_notification_unavailable" msgid="4313854556205836435">"Utilgjengelig fordi ringelyden er kuttet"</string>
<string name="volume_stream_content_description_unmute" msgid="7729576371406792977">"%1$s. Trykk for å slå på lyden."</string>
<string name="volume_stream_content_description_vibrate" msgid="4858111994183089761">"%1$s. Trykk for å angi vibrasjon. Lyden kan bli slått av for tilgjengelighetstjenestene."</string>
<string name="volume_stream_content_description_mute" msgid="4079046784917920984">"%1$s. Trykk for å slå av lyden. Lyden kan bli slått av for tilgjengelighetstjenestene."</string>
diff --git a/packages/SystemUI/res/values-nb/tiles_states_strings.xml b/packages/SystemUI/res/values-nb/tiles_states_strings.xml
index e4a81194..2ed0096 100644
--- a/packages/SystemUI/res/values-nb/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-nb/tiles_states_strings.xml
@@ -126,6 +126,9 @@
<item msgid="8259411607272330225">"Av"</item>
<item msgid="578444932039713369">"På"</item>
</string-array>
+ <!-- no translation found for tile_states_record_issue:0 (1727196795383575383) -->
+ <!-- no translation found for tile_states_record_issue:1 (9061144428113385092) -->
+ <!-- no translation found for tile_states_record_issue:2 (2984256114867200368) -->
<string-array name="tile_states_reverse">
<item msgid="3574611556622963971">"Utilgjengelig"</item>
<item msgid="8707481475312432575">"Av"</item>
diff --git a/packages/SystemUI/res/values-ne/strings.xml b/packages/SystemUI/res/values-ne/strings.xml
index 0096f48..1388a85 100644
--- a/packages/SystemUI/res/values-ne/strings.xml
+++ b/packages/SystemUI/res/values-ne/strings.xml
@@ -575,10 +575,8 @@
<string name="volume_ringer_status_normal" msgid="1339039682222461143">"घन्टी"</string>
<string name="volume_ringer_status_vibrate" msgid="6970078708957857825">"कम्पन"</string>
<string name="volume_ringer_status_silent" msgid="3691324657849880883">"म्युट गर्नुहोस्"</string>
- <!-- no translation found for media_device_cast (4786241789687569892) -->
- <skip />
- <!-- no translation found for stream_notification_unavailable (4313854556205836435) -->
- <skip />
+ <string name="media_device_cast" msgid="4786241789687569892">"कास्ट गर्नुहोस्"</string>
+ <string name="stream_notification_unavailable" msgid="4313854556205836435">"डिभाइस म्युट गरिएकाले यो सुविधा उपलब्ध छैन"</string>
<string name="volume_stream_content_description_unmute" msgid="7729576371406792977">"%1$s। अनम्यूट गर्नाका लागि ट्याप गर्नुहोस्।"</string>
<string name="volume_stream_content_description_vibrate" msgid="4858111994183089761">"%1$s। कम्पनमा सेट गर्नाका लागि ट्याप गर्नुहोस्। पहुँच सम्बन्धी सेवाहरू म्यूट हुन सक्छन्।"</string>
<string name="volume_stream_content_description_mute" msgid="4079046784917920984">"%1$s। म्यूट गर्नाका लागि ट्याप गर्नुहोस्। पहुँच सम्बन्धी सेवाहरू म्यूट हुन सक्छन्।"</string>
diff --git a/packages/SystemUI/res/values-ne/tiles_states_strings.xml b/packages/SystemUI/res/values-ne/tiles_states_strings.xml
index 5cf91e5..40159fb 100644
--- a/packages/SystemUI/res/values-ne/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-ne/tiles_states_strings.xml
@@ -126,6 +126,9 @@
<item msgid="8259411607272330225">"अफ छ"</item>
<item msgid="578444932039713369">"अन छ"</item>
</string-array>
+ <!-- no translation found for tile_states_record_issue:0 (1727196795383575383) -->
+ <!-- no translation found for tile_states_record_issue:1 (9061144428113385092) -->
+ <!-- no translation found for tile_states_record_issue:2 (2984256114867200368) -->
<string-array name="tile_states_reverse">
<item msgid="3574611556622963971">"उपलब्ध छैन"</item>
<item msgid="8707481475312432575">"अफ छ"</item>
diff --git a/packages/SystemUI/res/values-nl/strings.xml b/packages/SystemUI/res/values-nl/strings.xml
index 723b909..09156cf 100644
--- a/packages/SystemUI/res/values-nl/strings.xml
+++ b/packages/SystemUI/res/values-nl/strings.xml
@@ -575,10 +575,8 @@
<string name="volume_ringer_status_normal" msgid="1339039682222461143">"Bellen"</string>
<string name="volume_ringer_status_vibrate" msgid="6970078708957857825">"Trillen"</string>
<string name="volume_ringer_status_silent" msgid="3691324657849880883">"Geluid staat uit"</string>
- <!-- no translation found for media_device_cast (4786241789687569892) -->
- <skip />
- <!-- no translation found for stream_notification_unavailable (4313854556205836435) -->
- <skip />
+ <string name="media_device_cast" msgid="4786241789687569892">"Casten"</string>
+ <string name="stream_notification_unavailable" msgid="4313854556205836435">"Niet beschikbaar, belgeluid staat uit"</string>
<string name="volume_stream_content_description_unmute" msgid="7729576371406792977">"%1$s. Tik om dempen op te heffen."</string>
<string name="volume_stream_content_description_vibrate" msgid="4858111994183089761">"%1$s. Tik om in te stellen op trillen. Het geluid van toegankelijkheidsservices kan hierdoor uitgaan."</string>
<string name="volume_stream_content_description_mute" msgid="4079046784917920984">"%1$s. Tik om te dempen. Het geluid van toegankelijkheidsservices kan hierdoor uitgaan."</string>
diff --git a/packages/SystemUI/res/values-nl/tiles_states_strings.xml b/packages/SystemUI/res/values-nl/tiles_states_strings.xml
index 592ecf5..60e35da 100644
--- a/packages/SystemUI/res/values-nl/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-nl/tiles_states_strings.xml
@@ -126,6 +126,9 @@
<item msgid="8259411607272330225">"Uit"</item>
<item msgid="578444932039713369">"Aan"</item>
</string-array>
+ <!-- no translation found for tile_states_record_issue:0 (1727196795383575383) -->
+ <!-- no translation found for tile_states_record_issue:1 (9061144428113385092) -->
+ <!-- no translation found for tile_states_record_issue:2 (2984256114867200368) -->
<string-array name="tile_states_reverse">
<item msgid="3574611556622963971">"Niet beschikbaar"</item>
<item msgid="8707481475312432575">"Uit"</item>
diff --git a/packages/SystemUI/res/values-or/strings.xml b/packages/SystemUI/res/values-or/strings.xml
index 612e012..b49c297 100644
--- a/packages/SystemUI/res/values-or/strings.xml
+++ b/packages/SystemUI/res/values-or/strings.xml
@@ -287,7 +287,7 @@
<string name="quick_settings_media_device_label" msgid="8034019242363789941">"ମିଡିଆ ଡିଭାଇସ୍"</string>
<string name="quick_settings_user_title" msgid="8673045967216204537">"ୟୁଜର"</string>
<string name="quick_settings_wifi_label" msgid="2879507532983487244">"ୱାଇ-ଫାଇ"</string>
- <string name="quick_settings_internet_label" msgid="6603068555872455463">"ଇଣ୍ଟରନେଟ"</string>
+ <string name="quick_settings_internet_label" msgid="6603068555872455463">"ଇଣ୍ଟର୍ନେଟ"</string>
<string name="quick_settings_networks_available" msgid="1875138606855420438">"ନେଟୱାର୍କଗୁଡ଼ିକ ଉପଲବ୍ଧ"</string>
<string name="quick_settings_networks_unavailable" msgid="1167847013337940082">"ନେଟୱାର୍କ ଉପଲବ୍ଧ ନାହିଁ"</string>
<string name="quick_settings_wifi_detail_empty_text" msgid="483130889414601732">"କୌଣସି ୱାଇ-ଫାଇ ନେଟ୍ୱର୍କ ଉପଲବ୍ଧ ନାହିଁ"</string>
@@ -575,10 +575,8 @@
<string name="volume_ringer_status_normal" msgid="1339039682222461143">"ରିଙ୍ଗ"</string>
<string name="volume_ringer_status_vibrate" msgid="6970078708957857825">"ଭାଇବ୍ରେଟ୍"</string>
<string name="volume_ringer_status_silent" msgid="3691324657849880883">"ମ୍ୟୁଟ"</string>
- <!-- no translation found for media_device_cast (4786241789687569892) -->
- <skip />
- <!-- no translation found for stream_notification_unavailable (4313854556205836435) -->
- <skip />
+ <string name="media_device_cast" msgid="4786241789687569892">"କାଷ୍ଟ କରନ୍ତୁ"</string>
+ <string name="stream_notification_unavailable" msgid="4313854556205836435">"ରିଂକୁ ମ୍ୟୁଟ କରାଯାଇଥିବା ଯୋଗୁଁ ଉପଲବ୍ଧ ନାହିଁ"</string>
<string name="volume_stream_content_description_unmute" msgid="7729576371406792977">"%1$s। ଅନମ୍ୟୁଟ୍ କରିବା ପାଇଁ ଟାପ୍ କରନ୍ତୁ।"</string>
<string name="volume_stream_content_description_vibrate" msgid="4858111994183089761">"%1$s। ଭାଇବ୍ରେଟ୍ ସେଟ୍ କରିବାକୁ ଟାପ୍ କରନ୍ତୁ। ଆକ୍ସେସିବିଲିଟୀ ସର୍ଭିସ୍ ମ୍ୟୁଟ୍ କରାଯାଇପାରେ।"</string>
<string name="volume_stream_content_description_mute" msgid="4079046784917920984">"%1$s। ମ୍ୟୁଟ୍ କରିବାକୁ ଟାପ୍ କରନ୍ତୁ। ଆକ୍ସେସିବିଲିଟୀ ସର୍ଭିସ୍ ମ୍ୟୁଟ୍ କରାଯାଇପାରେ।"</string>
diff --git a/packages/SystemUI/res/values-or/tiles_states_strings.xml b/packages/SystemUI/res/values-or/tiles_states_strings.xml
index d362c65f..43bddbf 100644
--- a/packages/SystemUI/res/values-or/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-or/tiles_states_strings.xml
@@ -126,6 +126,9 @@
<item msgid="8259411607272330225">"ବନ୍ଦ ଅଛି"</item>
<item msgid="578444932039713369">"ଚାଲୁ ଅଛି"</item>
</string-array>
+ <!-- no translation found for tile_states_record_issue:0 (1727196795383575383) -->
+ <!-- no translation found for tile_states_record_issue:1 (9061144428113385092) -->
+ <!-- no translation found for tile_states_record_issue:2 (2984256114867200368) -->
<string-array name="tile_states_reverse">
<item msgid="3574611556622963971">"ଉପଲବ୍ଧ ନାହିଁ"</item>
<item msgid="8707481475312432575">"ବନ୍ଦ ଅଛି"</item>
diff --git a/packages/SystemUI/res/values-pa/strings.xml b/packages/SystemUI/res/values-pa/strings.xml
index c026413..cd55198 100644
--- a/packages/SystemUI/res/values-pa/strings.xml
+++ b/packages/SystemUI/res/values-pa/strings.xml
@@ -575,10 +575,8 @@
<string name="volume_ringer_status_normal" msgid="1339039682222461143">"ਘੰਟੀ"</string>
<string name="volume_ringer_status_vibrate" msgid="6970078708957857825">"ਥਰਥਰਾਹਟ"</string>
<string name="volume_ringer_status_silent" msgid="3691324657849880883">"ਮਿਊਟ"</string>
- <!-- no translation found for media_device_cast (4786241789687569892) -->
- <skip />
- <!-- no translation found for stream_notification_unavailable (4313854556205836435) -->
- <skip />
+ <string name="media_device_cast" msgid="4786241789687569892">"ਕਾਸਟ ਕਰੋ"</string>
+ <string name="stream_notification_unavailable" msgid="4313854556205836435">"ਉਪਲਬਧ ਨਹੀਂ ਹੈ ਕਿਉਂਕਿ ਘੰਟੀ ਮਿਊਟ ਕੀਤੀ ਹੋਈ ਹੈ"</string>
<string name="volume_stream_content_description_unmute" msgid="7729576371406792977">"%1$s। ਅਣਮਿਊਟ ਕਰਨ ਲਈ ਟੈਪ ਕਰੋ।"</string>
<string name="volume_stream_content_description_vibrate" msgid="4858111994183089761">"%1$s। ਥਰਥਰਾਹਟ ਸੈੱਟ ਕਰਨ ਲਈ ਟੈਪ ਕਰੋ। ਪਹੁੰਚਯੋਗਤਾ ਸੇਵਾਵਾਂ ਮਿਊਟ ਹੋ ਸਕਦੀਆਂ ਹਨ।"</string>
<string name="volume_stream_content_description_mute" msgid="4079046784917920984">"%1$s। ਮਿਊਟ ਕਰਨ ਲਈ ਟੈਪ ਕਰੋ। ਪਹੁੰਚਯੋਗਤਾ ਸੇਵਾਵਾਂ ਮਿਊਟ ਹੋ ਸਕਦੀਆਂ ਹਨ।"</string>
diff --git a/packages/SystemUI/res/values-pa/tiles_states_strings.xml b/packages/SystemUI/res/values-pa/tiles_states_strings.xml
index f249afb..5f0ca17 100644
--- a/packages/SystemUI/res/values-pa/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-pa/tiles_states_strings.xml
@@ -126,6 +126,9 @@
<item msgid="8259411607272330225">"ਬੰਦ ਹੈ"</item>
<item msgid="578444932039713369">"ਚਾਲੂ ਹੈ"</item>
</string-array>
+ <!-- no translation found for tile_states_record_issue:0 (1727196795383575383) -->
+ <!-- no translation found for tile_states_record_issue:1 (9061144428113385092) -->
+ <!-- no translation found for tile_states_record_issue:2 (2984256114867200368) -->
<string-array name="tile_states_reverse">
<item msgid="3574611556622963971">"ਅਣਉਪਲਬਧ ਹੈ"</item>
<item msgid="8707481475312432575">"ਬੰਦ ਹੈ"</item>
diff --git a/packages/SystemUI/res/values-pl/strings.xml b/packages/SystemUI/res/values-pl/strings.xml
index 44639b9..76547ed 100644
--- a/packages/SystemUI/res/values-pl/strings.xml
+++ b/packages/SystemUI/res/values-pl/strings.xml
@@ -575,10 +575,8 @@
<string name="volume_ringer_status_normal" msgid="1339039682222461143">"Dzwonek"</string>
<string name="volume_ringer_status_vibrate" msgid="6970078708957857825">"Wibracje"</string>
<string name="volume_ringer_status_silent" msgid="3691324657849880883">"Wyciszenie"</string>
- <!-- no translation found for media_device_cast (4786241789687569892) -->
- <skip />
- <!-- no translation found for stream_notification_unavailable (4313854556205836435) -->
- <skip />
+ <string name="media_device_cast" msgid="4786241789687569892">"Przesyłanie"</string>
+ <string name="stream_notification_unavailable" msgid="4313854556205836435">"Niedostępne, bo dzwonek jest wyciszony"</string>
<string name="volume_stream_content_description_unmute" msgid="7729576371406792977">"%1$s. Kliknij, by wyłączyć wyciszenie."</string>
<string name="volume_stream_content_description_vibrate" msgid="4858111994183089761">"%1$s. Kliknij, by włączyć wibracje. Ułatwienia dostępu mogą być wyciszone."</string>
<string name="volume_stream_content_description_mute" msgid="4079046784917920984">"%1$s. Kliknij, by wyciszyć. Ułatwienia dostępu mogą być wyciszone."</string>
diff --git a/packages/SystemUI/res/values-pl/tiles_states_strings.xml b/packages/SystemUI/res/values-pl/tiles_states_strings.xml
index ea6ad58..5e3a118 100644
--- a/packages/SystemUI/res/values-pl/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-pl/tiles_states_strings.xml
@@ -126,6 +126,9 @@
<item msgid="8259411607272330225">"Wyłączony"</item>
<item msgid="578444932039713369">"Włączony"</item>
</string-array>
+ <!-- no translation found for tile_states_record_issue:0 (1727196795383575383) -->
+ <!-- no translation found for tile_states_record_issue:1 (9061144428113385092) -->
+ <!-- no translation found for tile_states_record_issue:2 (2984256114867200368) -->
<string-array name="tile_states_reverse">
<item msgid="3574611556622963971">"Niedostępne"</item>
<item msgid="8707481475312432575">"Wyłączone"</item>
diff --git a/packages/SystemUI/res/values-pt-rBR/strings.xml b/packages/SystemUI/res/values-pt-rBR/strings.xml
index 639a488..598ef78 100644
--- a/packages/SystemUI/res/values-pt-rBR/strings.xml
+++ b/packages/SystemUI/res/values-pt-rBR/strings.xml
@@ -575,10 +575,8 @@
<string name="volume_ringer_status_normal" msgid="1339039682222461143">"Tocar"</string>
<string name="volume_ringer_status_vibrate" msgid="6970078708957857825">"Vibrar"</string>
<string name="volume_ringer_status_silent" msgid="3691324657849880883">"Desativar som"</string>
- <!-- no translation found for media_device_cast (4786241789687569892) -->
- <skip />
- <!-- no translation found for stream_notification_unavailable (4313854556205836435) -->
- <skip />
+ <string name="media_device_cast" msgid="4786241789687569892">"Transmitir"</string>
+ <string name="stream_notification_unavailable" msgid="4313854556205836435">"Indisponível com o toque foi silenciado"</string>
<string name="volume_stream_content_description_unmute" msgid="7729576371406792977">"%1$s. Toque para ativar o som."</string>
<string name="volume_stream_content_description_vibrate" msgid="4858111994183089761">"%1$s. Toque para configurar para vibrar. É possível que os serviços de acessibilidade sejam silenciados."</string>
<string name="volume_stream_content_description_mute" msgid="4079046784917920984">"%1$s. Toque para silenciar. É possível que os serviços de acessibilidade sejam silenciados."</string>
diff --git a/packages/SystemUI/res/values-pt-rBR/tiles_states_strings.xml b/packages/SystemUI/res/values-pt-rBR/tiles_states_strings.xml
index 28c07f4..d4fd838 100644
--- a/packages/SystemUI/res/values-pt-rBR/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-pt-rBR/tiles_states_strings.xml
@@ -126,6 +126,9 @@
<item msgid="8259411607272330225">"Desativada"</item>
<item msgid="578444932039713369">"Ativada"</item>
</string-array>
+ <!-- no translation found for tile_states_record_issue:0 (1727196795383575383) -->
+ <!-- no translation found for tile_states_record_issue:1 (9061144428113385092) -->
+ <!-- no translation found for tile_states_record_issue:2 (2984256114867200368) -->
<string-array name="tile_states_reverse">
<item msgid="3574611556622963971">"Indisponível"</item>
<item msgid="8707481475312432575">"Desativado"</item>
diff --git a/packages/SystemUI/res/values-pt-rPT/strings.xml b/packages/SystemUI/res/values-pt-rPT/strings.xml
index f34dea1d..7e5a736 100644
--- a/packages/SystemUI/res/values-pt-rPT/strings.xml
+++ b/packages/SystemUI/res/values-pt-rPT/strings.xml
@@ -429,8 +429,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"Adicionar mais widgets"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"Mantenha premido para personalizar os widgets"</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"Personalizar widgets"</string>
- <!-- no translation found for icon_description_for_disabled_widget (4693151565003206943) -->
- <skip />
+ <string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"Ícone da app do widget desativado"</string>
<string name="edit_widget" msgid="9030848101135393954">"Editar widget"</string>
<string name="button_to_remove_widget" msgid="3948204829181214098">"Remover"</string>
<string name="hub_mode_add_widget_button_text" msgid="4831464661209971729">"Adicionar widget"</string>
@@ -575,10 +574,8 @@
<string name="volume_ringer_status_normal" msgid="1339039682222461143">"Toque"</string>
<string name="volume_ringer_status_vibrate" msgid="6970078708957857825">"Vibrar"</string>
<string name="volume_ringer_status_silent" msgid="3691324657849880883">"Desativar som"</string>
- <!-- no translation found for media_device_cast (4786241789687569892) -->
- <skip />
- <!-- no translation found for stream_notification_unavailable (4313854556205836435) -->
- <skip />
+ <string name="media_device_cast" msgid="4786241789687569892">"Transmitir"</string>
+ <string name="stream_notification_unavailable" msgid="4313854556205836435">"Indisponível porque o toque está desat."</string>
<string name="volume_stream_content_description_unmute" msgid="7729576371406792977">"%1$s. Toque para reativar o som."</string>
<string name="volume_stream_content_description_vibrate" msgid="4858111994183089761">"%1$s. Toque para ativar a vibração. Os serviços de acessibilidade podem ser silenciados."</string>
<string name="volume_stream_content_description_mute" msgid="4079046784917920984">"%1$s. Toque para desativar o som. Os serviços de acessibilidade podem ser silenciados."</string>
@@ -839,10 +836,8 @@
<string name="accessibility_quick_settings_power_menu" msgid="6820426108301758412">"Menu ligar/desligar"</string>
<string name="accessibility_quick_settings_page" msgid="7506322631645550961">"Página <xliff:g id="ID_1">%1$d</xliff:g> de <xliff:g id="ID_2">%2$d</xliff:g>"</string>
<string name="tuner_lock_screen" msgid="2267383813241144544">"Ecrã de bloqueio"</string>
- <!-- no translation found for finder_active (7907846989716941952) -->
- <skip />
- <!-- no translation found for shutdown_progress (5464239146561542178) -->
- <skip />
+ <string name="finder_active" msgid="7907846989716941952">"Pode localizar este telemóvel com o serviço Localizar o meu dispositivo mesmo quando está desligado"</string>
+ <string name="shutdown_progress" msgid="5464239146561542178">"A encerrar…"</string>
<string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"Veja os passos de manutenção"</string>
<string name="high_temp_dialog_help_text" msgid="7380171287943345858">"Veja os passos de manutenção"</string>
<string name="high_temp_alarm_title" msgid="8654754369605452169">"Desligue o dispositivo"</string>
diff --git a/packages/SystemUI/res/values-pt-rPT/tiles_states_strings.xml b/packages/SystemUI/res/values-pt-rPT/tiles_states_strings.xml
index b58b848..e94b1ec 100644
--- a/packages/SystemUI/res/values-pt-rPT/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-pt-rPT/tiles_states_strings.xml
@@ -126,6 +126,9 @@
<item msgid="8259411607272330225">"Desligado"</item>
<item msgid="578444932039713369">"Ligado"</item>
</string-array>
+ <!-- no translation found for tile_states_record_issue:0 (1727196795383575383) -->
+ <!-- no translation found for tile_states_record_issue:1 (9061144428113385092) -->
+ <!-- no translation found for tile_states_record_issue:2 (2984256114867200368) -->
<string-array name="tile_states_reverse">
<item msgid="3574611556622963971">"Indisponível"</item>
<item msgid="8707481475312432575">"Desligado"</item>
diff --git a/packages/SystemUI/res/values-pt/strings.xml b/packages/SystemUI/res/values-pt/strings.xml
index 639a488..598ef78 100644
--- a/packages/SystemUI/res/values-pt/strings.xml
+++ b/packages/SystemUI/res/values-pt/strings.xml
@@ -575,10 +575,8 @@
<string name="volume_ringer_status_normal" msgid="1339039682222461143">"Tocar"</string>
<string name="volume_ringer_status_vibrate" msgid="6970078708957857825">"Vibrar"</string>
<string name="volume_ringer_status_silent" msgid="3691324657849880883">"Desativar som"</string>
- <!-- no translation found for media_device_cast (4786241789687569892) -->
- <skip />
- <!-- no translation found for stream_notification_unavailable (4313854556205836435) -->
- <skip />
+ <string name="media_device_cast" msgid="4786241789687569892">"Transmitir"</string>
+ <string name="stream_notification_unavailable" msgid="4313854556205836435">"Indisponível com o toque foi silenciado"</string>
<string name="volume_stream_content_description_unmute" msgid="7729576371406792977">"%1$s. Toque para ativar o som."</string>
<string name="volume_stream_content_description_vibrate" msgid="4858111994183089761">"%1$s. Toque para configurar para vibrar. É possível que os serviços de acessibilidade sejam silenciados."</string>
<string name="volume_stream_content_description_mute" msgid="4079046784917920984">"%1$s. Toque para silenciar. É possível que os serviços de acessibilidade sejam silenciados."</string>
diff --git a/packages/SystemUI/res/values-pt/tiles_states_strings.xml b/packages/SystemUI/res/values-pt/tiles_states_strings.xml
index 28c07f4..d4fd838 100644
--- a/packages/SystemUI/res/values-pt/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-pt/tiles_states_strings.xml
@@ -126,6 +126,9 @@
<item msgid="8259411607272330225">"Desativada"</item>
<item msgid="578444932039713369">"Ativada"</item>
</string-array>
+ <!-- no translation found for tile_states_record_issue:0 (1727196795383575383) -->
+ <!-- no translation found for tile_states_record_issue:1 (9061144428113385092) -->
+ <!-- no translation found for tile_states_record_issue:2 (2984256114867200368) -->
<string-array name="tile_states_reverse">
<item msgid="3574611556622963971">"Indisponível"</item>
<item msgid="8707481475312432575">"Desativado"</item>
diff --git a/packages/SystemUI/res/values-ro/strings.xml b/packages/SystemUI/res/values-ro/strings.xml
index 7d8c2a3..026e22b 100644
--- a/packages/SystemUI/res/values-ro/strings.xml
+++ b/packages/SystemUI/res/values-ro/strings.xml
@@ -575,10 +575,8 @@
<string name="volume_ringer_status_normal" msgid="1339039682222461143">"Sonerie"</string>
<string name="volume_ringer_status_vibrate" msgid="6970078708957857825">"Vibrații"</string>
<string name="volume_ringer_status_silent" msgid="3691324657849880883">"Blochează"</string>
- <!-- no translation found for media_device_cast (4786241789687569892) -->
- <skip />
- <!-- no translation found for stream_notification_unavailable (4313854556205836435) -->
- <skip />
+ <string name="media_device_cast" msgid="4786241789687569892">"Proiectează"</string>
+ <string name="stream_notification_unavailable" msgid="4313854556205836435">"Indisponibil; soneria este dezactivată"</string>
<string name="volume_stream_content_description_unmute" msgid="7729576371406792977">"%1$s. Atinge pentru a activa sunetul."</string>
<string name="volume_stream_content_description_vibrate" msgid="4858111994183089761">"%1$s. Atinge pentru a seta vibrarea. Sunetul se poate dezactiva pentru serviciile de accesibilitate."</string>
<string name="volume_stream_content_description_mute" msgid="4079046784917920984">"%1$s. Atinge pentru a dezactiva sunetul. Sunetul se poate dezactiva pentru serviciile de accesibilitate."</string>
diff --git a/packages/SystemUI/res/values-ro/tiles_states_strings.xml b/packages/SystemUI/res/values-ro/tiles_states_strings.xml
index 5a5eb9f..75565f9 100644
--- a/packages/SystemUI/res/values-ro/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-ro/tiles_states_strings.xml
@@ -126,6 +126,9 @@
<item msgid="8259411607272330225">"Dezactivată"</item>
<item msgid="578444932039713369">"Activată"</item>
</string-array>
+ <!-- no translation found for tile_states_record_issue:0 (1727196795383575383) -->
+ <!-- no translation found for tile_states_record_issue:1 (9061144428113385092) -->
+ <!-- no translation found for tile_states_record_issue:2 (2984256114867200368) -->
<string-array name="tile_states_reverse">
<item msgid="3574611556622963971">"Indisponibilă"</item>
<item msgid="8707481475312432575">"Dezactivată"</item>
diff --git a/packages/SystemUI/res/values-ru/strings.xml b/packages/SystemUI/res/values-ru/strings.xml
index 37b7ae5..1df112b 100644
--- a/packages/SystemUI/res/values-ru/strings.xml
+++ b/packages/SystemUI/res/values-ru/strings.xml
@@ -575,10 +575,8 @@
<string name="volume_ringer_status_normal" msgid="1339039682222461143">"Со звуком"</string>
<string name="volume_ringer_status_vibrate" msgid="6970078708957857825">"Вибрация"</string>
<string name="volume_ringer_status_silent" msgid="3691324657849880883">"Без звука"</string>
- <!-- no translation found for media_device_cast (4786241789687569892) -->
- <skip />
- <!-- no translation found for stream_notification_unavailable (4313854556205836435) -->
- <skip />
+ <string name="media_device_cast" msgid="4786241789687569892">"Трансляция"</string>
+ <string name="stream_notification_unavailable" msgid="4313854556205836435">"Недоступно, когда отключен звук вызовов"</string>
<string name="volume_stream_content_description_unmute" msgid="7729576371406792977">"%1$s. Нажмите, чтобы включить звук."</string>
<string name="volume_stream_content_description_vibrate" msgid="4858111994183089761">"%1$s. Нажмите, чтобы включить вибрацию. Специальные возможности могут прекратить работу."</string>
<string name="volume_stream_content_description_mute" msgid="4079046784917920984">"%1$s. Нажмите, чтобы выключить звук. Специальные возможности могут прекратить работу."</string>
diff --git a/packages/SystemUI/res/values-ru/tiles_states_strings.xml b/packages/SystemUI/res/values-ru/tiles_states_strings.xml
index cd14079..3099e00 100644
--- a/packages/SystemUI/res/values-ru/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-ru/tiles_states_strings.xml
@@ -126,6 +126,9 @@
<item msgid="8259411607272330225">"Откл."</item>
<item msgid="578444932039713369">"Вкл."</item>
</string-array>
+ <!-- no translation found for tile_states_record_issue:0 (1727196795383575383) -->
+ <!-- no translation found for tile_states_record_issue:1 (9061144428113385092) -->
+ <!-- no translation found for tile_states_record_issue:2 (2984256114867200368) -->
<string-array name="tile_states_reverse">
<item msgid="3574611556622963971">"Функция недоступна"</item>
<item msgid="8707481475312432575">"Откл."</item>
diff --git a/packages/SystemUI/res/values-si/strings.xml b/packages/SystemUI/res/values-si/strings.xml
index c851f85..f4b7d1e 100644
--- a/packages/SystemUI/res/values-si/strings.xml
+++ b/packages/SystemUI/res/values-si/strings.xml
@@ -575,10 +575,8 @@
<string name="volume_ringer_status_normal" msgid="1339039682222461143">"නාද කරන්න"</string>
<string name="volume_ringer_status_vibrate" msgid="6970078708957857825">"කම්පනය කරන්න"</string>
<string name="volume_ringer_status_silent" msgid="3691324657849880883">"නිහඬ කරන්න"</string>
- <!-- no translation found for media_device_cast (4786241789687569892) -->
- <skip />
- <!-- no translation found for stream_notification_unavailable (4313854556205836435) -->
- <skip />
+ <string name="media_device_cast" msgid="4786241789687569892">"විකාශය"</string>
+ <string name="stream_notification_unavailable" msgid="4313854556205836435">"නාදය නිහඬ කර ඇති නිසා නොලැබේ"</string>
<string name="volume_stream_content_description_unmute" msgid="7729576371406792977">"%1$s. නිහඬ කිරීම ඉවත් කිරීමට තට්ටු කරන්න."</string>
<string name="volume_stream_content_description_vibrate" msgid="4858111994183089761">"%1$s. කම්පනය කිරීමට තට්ටු කරන්න. ප්රවේශ්යතා සේවා නිහඬ කළ හැකිය."</string>
<string name="volume_stream_content_description_mute" msgid="4079046784917920984">"%1$s. නිහඬ කිරීමට තට්ටු කරන්න. ප්රවේශ්යතා සේවා නිහඬ කළ හැකිය."</string>
diff --git a/packages/SystemUI/res/values-si/tiles_states_strings.xml b/packages/SystemUI/res/values-si/tiles_states_strings.xml
index fcd768b..48e8cc4 100644
--- a/packages/SystemUI/res/values-si/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-si/tiles_states_strings.xml
@@ -126,6 +126,9 @@
<item msgid="8259411607272330225">"අක්රියයි"</item>
<item msgid="578444932039713369">"සක්රියයි"</item>
</string-array>
+ <!-- no translation found for tile_states_record_issue:0 (1727196795383575383) -->
+ <!-- no translation found for tile_states_record_issue:1 (9061144428113385092) -->
+ <!-- no translation found for tile_states_record_issue:2 (2984256114867200368) -->
<string-array name="tile_states_reverse">
<item msgid="3574611556622963971">"නොමැත"</item>
<item msgid="8707481475312432575">"අක්රියයි"</item>
diff --git a/packages/SystemUI/res/values-sk/strings.xml b/packages/SystemUI/res/values-sk/strings.xml
index d25e368..0f579da 100644
--- a/packages/SystemUI/res/values-sk/strings.xml
+++ b/packages/SystemUI/res/values-sk/strings.xml
@@ -575,10 +575,8 @@
<string name="volume_ringer_status_normal" msgid="1339039682222461143">"Prezvoniť"</string>
<string name="volume_ringer_status_vibrate" msgid="6970078708957857825">"Vibrovať"</string>
<string name="volume_ringer_status_silent" msgid="3691324657849880883">"Vypnúť zvuk"</string>
- <!-- no translation found for media_device_cast (4786241789687569892) -->
- <skip />
- <!-- no translation found for stream_notification_unavailable (4313854556205836435) -->
- <skip />
+ <string name="media_device_cast" msgid="4786241789687569892">"Prenos"</string>
+ <string name="stream_notification_unavailable" msgid="4313854556205836435">"Nedostupné, pretože je vypnuté zvonenie"</string>
<string name="volume_stream_content_description_unmute" msgid="7729576371406792977">"%1$s. Klepnutím zapnite zvuk."</string>
<string name="volume_stream_content_description_vibrate" msgid="4858111994183089761">"%1$s. Klepnutím aktivujte režim vibrovania. Služby dostupnosti je možné stlmiť."</string>
<string name="volume_stream_content_description_mute" msgid="4079046784917920984">"%1$s. Klepnutím vypnite zvuk. Služby dostupnosti je možné stlmiť."</string>
diff --git a/packages/SystemUI/res/values-sk/tiles_states_strings.xml b/packages/SystemUI/res/values-sk/tiles_states_strings.xml
index 660f85d..fdfcd27db 100644
--- a/packages/SystemUI/res/values-sk/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-sk/tiles_states_strings.xml
@@ -126,6 +126,9 @@
<item msgid="8259411607272330225">"Vypnuté"</item>
<item msgid="578444932039713369">"Zapnuté"</item>
</string-array>
+ <!-- no translation found for tile_states_record_issue:0 (1727196795383575383) -->
+ <!-- no translation found for tile_states_record_issue:1 (9061144428113385092) -->
+ <!-- no translation found for tile_states_record_issue:2 (2984256114867200368) -->
<string-array name="tile_states_reverse">
<item msgid="3574611556622963971">"Nie je k dispozícii"</item>
<item msgid="8707481475312432575">"Vypnuté"</item>
diff --git a/packages/SystemUI/res/values-sl/strings.xml b/packages/SystemUI/res/values-sl/strings.xml
index eb56a44..7acaa54 100644
--- a/packages/SystemUI/res/values-sl/strings.xml
+++ b/packages/SystemUI/res/values-sl/strings.xml
@@ -575,10 +575,8 @@
<string name="volume_ringer_status_normal" msgid="1339039682222461143">"Zvonjenje"</string>
<string name="volume_ringer_status_vibrate" msgid="6970078708957857825">"Vibriranje"</string>
<string name="volume_ringer_status_silent" msgid="3691324657849880883">"Utišano"</string>
- <!-- no translation found for media_device_cast (4786241789687569892) -->
- <skip />
- <!-- no translation found for stream_notification_unavailable (4313854556205836435) -->
- <skip />
+ <string name="media_device_cast" msgid="4786241789687569892">"Predvajanje"</string>
+ <string name="stream_notification_unavailable" msgid="4313854556205836435">"Ni na voljo, ker je zvonjenje izklopljeno"</string>
<string name="volume_stream_content_description_unmute" msgid="7729576371406792977">"%1$s. Dotaknite se, če želite vklopiti zvok."</string>
<string name="volume_stream_content_description_vibrate" msgid="4858111994183089761">"%1$s. Dotaknite se, če želite nastaviti vibriranje. V storitvah za dostopnost bo morda izklopljen zvok."</string>
<string name="volume_stream_content_description_mute" msgid="4079046784917920984">"%1$s. Dotaknite se, če želite izklopiti zvok. V storitvah za dostopnost bo morda izklopljen zvok."</string>
diff --git a/packages/SystemUI/res/values-sl/tiles_states_strings.xml b/packages/SystemUI/res/values-sl/tiles_states_strings.xml
index d7e62ca..3804d63 100644
--- a/packages/SystemUI/res/values-sl/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-sl/tiles_states_strings.xml
@@ -126,6 +126,9 @@
<item msgid="8259411607272330225">"Izklopljeno"</item>
<item msgid="578444932039713369">"Vklopljeno"</item>
</string-array>
+ <!-- no translation found for tile_states_record_issue:0 (1727196795383575383) -->
+ <!-- no translation found for tile_states_record_issue:1 (9061144428113385092) -->
+ <!-- no translation found for tile_states_record_issue:2 (2984256114867200368) -->
<string-array name="tile_states_reverse">
<item msgid="3574611556622963971">"Ni na voljo"</item>
<item msgid="8707481475312432575">"Izklopljeno"</item>
diff --git a/packages/SystemUI/res/values-sq/strings.xml b/packages/SystemUI/res/values-sq/strings.xml
index eb8fa43..21a974f 100644
--- a/packages/SystemUI/res/values-sq/strings.xml
+++ b/packages/SystemUI/res/values-sq/strings.xml
@@ -575,10 +575,8 @@
<string name="volume_ringer_status_normal" msgid="1339039682222461143">"Bjeri ziles"</string>
<string name="volume_ringer_status_vibrate" msgid="6970078708957857825">"Dridhje"</string>
<string name="volume_ringer_status_silent" msgid="3691324657849880883">"Pa zë"</string>
- <!-- no translation found for media_device_cast (4786241789687569892) -->
- <skip />
- <!-- no translation found for stream_notification_unavailable (4313854556205836435) -->
- <skip />
+ <string name="media_device_cast" msgid="4786241789687569892">"Transmeto"</string>
+ <string name="stream_notification_unavailable" msgid="4313854556205836435">"Nuk ofrohet; ziles i është hequr zëri"</string>
<string name="volume_stream_content_description_unmute" msgid="7729576371406792977">"%1$s. Trokit për të aktivizuar."</string>
<string name="volume_stream_content_description_vibrate" msgid="4858111994183089761">"%1$s. Trokit për ta caktuar te dridhja. Shërbimet e qasshmërisë mund të çaktivizohen."</string>
<string name="volume_stream_content_description_mute" msgid="4079046784917920984">"%1$s. Trokit për të çaktivizuar. Shërbimet e qasshmërisë mund të çaktivizohen."</string>
diff --git a/packages/SystemUI/res/values-sq/tiles_states_strings.xml b/packages/SystemUI/res/values-sq/tiles_states_strings.xml
index b8e1355..6318700 100644
--- a/packages/SystemUI/res/values-sq/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-sq/tiles_states_strings.xml
@@ -126,6 +126,9 @@
<item msgid="8259411607272330225">"Joaktive"</item>
<item msgid="578444932039713369">"Aktiv"</item>
</string-array>
+ <!-- no translation found for tile_states_record_issue:0 (1727196795383575383) -->
+ <!-- no translation found for tile_states_record_issue:1 (9061144428113385092) -->
+ <!-- no translation found for tile_states_record_issue:2 (2984256114867200368) -->
<string-array name="tile_states_reverse">
<item msgid="3574611556622963971">"Nuk ofrohet"</item>
<item msgid="8707481475312432575">"Joaktive"</item>
diff --git a/packages/SystemUI/res/values-sr/strings.xml b/packages/SystemUI/res/values-sr/strings.xml
index 0644a80..2f52f90 100644
--- a/packages/SystemUI/res/values-sr/strings.xml
+++ b/packages/SystemUI/res/values-sr/strings.xml
@@ -575,10 +575,8 @@
<string name="volume_ringer_status_normal" msgid="1339039682222461143">"Активирај звоно"</string>
<string name="volume_ringer_status_vibrate" msgid="6970078708957857825">"Вибрирај"</string>
<string name="volume_ringer_status_silent" msgid="3691324657849880883">"Искључи звук"</string>
- <!-- no translation found for media_device_cast (4786241789687569892) -->
- <skip />
- <!-- no translation found for stream_notification_unavailable (4313854556205836435) -->
- <skip />
+ <string name="media_device_cast" msgid="4786241789687569892">"Пребацивање"</string>
+ <string name="stream_notification_unavailable" msgid="4313854556205836435">"Недоступно јер је звук искључен"</string>
<string name="volume_stream_content_description_unmute" msgid="7729576371406792977">"%1$s. Додирните да бисте укључили звук."</string>
<string name="volume_stream_content_description_vibrate" msgid="4858111994183089761">"%1$s. Додирните да бисте подесили на вибрацију. Звук услуга приступачности ће можда бити искључен."</string>
<string name="volume_stream_content_description_mute" msgid="4079046784917920984">"%1$s. Додирните да бисте искључили звук. Звук услуга приступачности ће можда бити искључен."</string>
diff --git a/packages/SystemUI/res/values-sr/tiles_states_strings.xml b/packages/SystemUI/res/values-sr/tiles_states_strings.xml
index c959bfb..e4cf0b6 100644
--- a/packages/SystemUI/res/values-sr/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-sr/tiles_states_strings.xml
@@ -126,6 +126,9 @@
<item msgid="8259411607272330225">"Искључено"</item>
<item msgid="578444932039713369">"Укључено"</item>
</string-array>
+ <!-- no translation found for tile_states_record_issue:0 (1727196795383575383) -->
+ <!-- no translation found for tile_states_record_issue:1 (9061144428113385092) -->
+ <!-- no translation found for tile_states_record_issue:2 (2984256114867200368) -->
<string-array name="tile_states_reverse">
<item msgid="3574611556622963971">"Недоступно"</item>
<item msgid="8707481475312432575">"Искључено"</item>
diff --git a/packages/SystemUI/res/values-sv/strings.xml b/packages/SystemUI/res/values-sv/strings.xml
index 208891f..20bc7e7 100644
--- a/packages/SystemUI/res/values-sv/strings.xml
+++ b/packages/SystemUI/res/values-sv/strings.xml
@@ -575,10 +575,8 @@
<string name="volume_ringer_status_normal" msgid="1339039682222461143">"Ringsignal"</string>
<string name="volume_ringer_status_vibrate" msgid="6970078708957857825">"Vibration"</string>
<string name="volume_ringer_status_silent" msgid="3691324657849880883">"Dölj"</string>
- <!-- no translation found for media_device_cast (4786241789687569892) -->
- <skip />
- <!-- no translation found for stream_notification_unavailable (4313854556205836435) -->
- <skip />
+ <string name="media_device_cast" msgid="4786241789687569892">"Casta"</string>
+ <string name="stream_notification_unavailable" msgid="4313854556205836435">"Otillgängligt eftersom ringljudet är av"</string>
<string name="volume_stream_content_description_unmute" msgid="7729576371406792977">"%1$s. Tryck här om du vill slå på ljudet."</string>
<string name="volume_stream_content_description_vibrate" msgid="4858111994183089761">"%1$s. Tryck här om du vill sätta på vibrationen. Tillgänglighetstjänster kanske inaktiveras."</string>
<string name="volume_stream_content_description_mute" msgid="4079046784917920984">"%1$s. Tryck här om du vill stänga av ljudet. Tillgänglighetstjänsterna kanske inaktiveras."</string>
diff --git a/packages/SystemUI/res/values-sv/tiles_states_strings.xml b/packages/SystemUI/res/values-sv/tiles_states_strings.xml
index 28717df..8981ac7 100644
--- a/packages/SystemUI/res/values-sv/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-sv/tiles_states_strings.xml
@@ -126,6 +126,9 @@
<item msgid="8259411607272330225">"Av"</item>
<item msgid="578444932039713369">"På"</item>
</string-array>
+ <!-- no translation found for tile_states_record_issue:0 (1727196795383575383) -->
+ <!-- no translation found for tile_states_record_issue:1 (9061144428113385092) -->
+ <!-- no translation found for tile_states_record_issue:2 (2984256114867200368) -->
<string-array name="tile_states_reverse">
<item msgid="3574611556622963971">"Inte tillgängligt"</item>
<item msgid="8707481475312432575">"Av"</item>
diff --git a/packages/SystemUI/res/values-sw/strings.xml b/packages/SystemUI/res/values-sw/strings.xml
index 404cb48..fa0e7b5 100644
--- a/packages/SystemUI/res/values-sw/strings.xml
+++ b/packages/SystemUI/res/values-sw/strings.xml
@@ -575,10 +575,8 @@
<string name="volume_ringer_status_normal" msgid="1339039682222461143">"Piga"</string>
<string name="volume_ringer_status_vibrate" msgid="6970078708957857825">"Kutetema"</string>
<string name="volume_ringer_status_silent" msgid="3691324657849880883">"Zima sauti"</string>
- <!-- no translation found for media_device_cast (4786241789687569892) -->
- <skip />
- <!-- no translation found for stream_notification_unavailable (4313854556205836435) -->
- <skip />
+ <string name="media_device_cast" msgid="4786241789687569892">"Tuma"</string>
+ <string name="stream_notification_unavailable" msgid="4313854556205836435">"Halipatikani kwa sababu sauti imezimwa"</string>
<string name="volume_stream_content_description_unmute" msgid="7729576371406792977">"%1$s. Gusa ili urejeshe."</string>
<string name="volume_stream_content_description_vibrate" msgid="4858111994183089761">"%1$s. Gusa ili uweke mtetemo. Huenda ikakomesha huduma za zana za walio na matatizo ya kuona au kusikia."</string>
<string name="volume_stream_content_description_mute" msgid="4079046784917920984">"%1$s. Gusa ili ukomeshe. Huenda ikakomesha huduma za zana za walio na matatizo ya kuona au kusikia."</string>
diff --git a/packages/SystemUI/res/values-sw/tiles_states_strings.xml b/packages/SystemUI/res/values-sw/tiles_states_strings.xml
index 2fe4060..08a1f14 100644
--- a/packages/SystemUI/res/values-sw/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-sw/tiles_states_strings.xml
@@ -126,6 +126,9 @@
<item msgid="8259411607272330225">"Kimezimwa"</item>
<item msgid="578444932039713369">"Kimewashwa"</item>
</string-array>
+ <!-- no translation found for tile_states_record_issue:0 (1727196795383575383) -->
+ <!-- no translation found for tile_states_record_issue:1 (9061144428113385092) -->
+ <!-- no translation found for tile_states_record_issue:2 (2984256114867200368) -->
<string-array name="tile_states_reverse">
<item msgid="3574611556622963971">"Hakipatikani"</item>
<item msgid="8707481475312432575">"Kimezimwa"</item>
diff --git a/packages/SystemUI/res/values-ta/strings.xml b/packages/SystemUI/res/values-ta/strings.xml
index 03dd362..0f360e6 100644
--- a/packages/SystemUI/res/values-ta/strings.xml
+++ b/packages/SystemUI/res/values-ta/strings.xml
@@ -575,10 +575,8 @@
<string name="volume_ringer_status_normal" msgid="1339039682222461143">"ஒலி"</string>
<string name="volume_ringer_status_vibrate" msgid="6970078708957857825">"அதிர்வு"</string>
<string name="volume_ringer_status_silent" msgid="3691324657849880883">"அமைதி"</string>
- <!-- no translation found for media_device_cast (4786241789687569892) -->
- <skip />
- <!-- no translation found for stream_notification_unavailable (4313854556205836435) -->
- <skip />
+ <string name="media_device_cast" msgid="4786241789687569892">"அலைபரப்பு"</string>
+ <string name="stream_notification_unavailable" msgid="4313854556205836435">"\'ரிங்\' மியூட்டில் உள்ளதால் கிடைக்கவில்லை"</string>
<string name="volume_stream_content_description_unmute" msgid="7729576371406792977">"%1$s. ஒலி இயக்க, தட்டவும்."</string>
<string name="volume_stream_content_description_vibrate" msgid="4858111994183089761">"%1$s. அதிர்விற்கு அமைக்க, தட்டவும். அணுகல்தன்மை சேவைகள் ஒலியடக்கப்படக்கூடும்."</string>
<string name="volume_stream_content_description_mute" msgid="4079046784917920984">"%1$s. ஒலியடக்க, தட்டவும். அணுகல்தன்மை சேவைகள் ஒலியடக்கப்படக்கூடும்."</string>
diff --git a/packages/SystemUI/res/values-ta/tiles_states_strings.xml b/packages/SystemUI/res/values-ta/tiles_states_strings.xml
index 5bcc6c7..741d6de 100644
--- a/packages/SystemUI/res/values-ta/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-ta/tiles_states_strings.xml
@@ -126,6 +126,9 @@
<item msgid="8259411607272330225">"முடக்கப்பட்டுள்ளது"</item>
<item msgid="578444932039713369">"இயக்கப்பட்டுள்ளது"</item>
</string-array>
+ <!-- no translation found for tile_states_record_issue:0 (1727196795383575383) -->
+ <!-- no translation found for tile_states_record_issue:1 (9061144428113385092) -->
+ <!-- no translation found for tile_states_record_issue:2 (2984256114867200368) -->
<string-array name="tile_states_reverse">
<item msgid="3574611556622963971">"கிடைக்கவில்லை"</item>
<item msgid="8707481475312432575">"முடக்கப்பட்டுள்ளது"</item>
diff --git a/packages/SystemUI/res/values-te/strings.xml b/packages/SystemUI/res/values-te/strings.xml
index 08067c9..4e8e2d0 100644
--- a/packages/SystemUI/res/values-te/strings.xml
+++ b/packages/SystemUI/res/values-te/strings.xml
@@ -575,10 +575,8 @@
<string name="volume_ringer_status_normal" msgid="1339039682222461143">"రింగ్"</string>
<string name="volume_ringer_status_vibrate" msgid="6970078708957857825">"వైబ్రేట్"</string>
<string name="volume_ringer_status_silent" msgid="3691324657849880883">"మ్యూట్"</string>
- <!-- no translation found for media_device_cast (4786241789687569892) -->
- <skip />
- <!-- no translation found for stream_notification_unavailable (4313854556205836435) -->
- <skip />
+ <string name="media_device_cast" msgid="4786241789687569892">"ప్రసారం చేయండి"</string>
+ <string name="stream_notification_unavailable" msgid="4313854556205836435">"వాల్యూమ్ మ్యూట్ అయినందున అందుబాటులో లేదు"</string>
<string name="volume_stream_content_description_unmute" msgid="7729576371406792977">"%1$s. అన్మ్యూట్ చేయడానికి నొక్కండి."</string>
<string name="volume_stream_content_description_vibrate" msgid="4858111994183089761">"%1$s. వైబ్రేషన్కు సెట్ చేయడానికి నొక్కండి. యాక్సెస్ సామర్థ్య సేవలు మ్యూట్ చేయబడవచ్చు."</string>
<string name="volume_stream_content_description_mute" msgid="4079046784917920984">"%1$s. మ్యూట్ చేయడానికి నొక్కండి. యాక్సెస్ సామర్థ్య సేవలు మ్యూట్ చేయబడవచ్చు."</string>
diff --git a/packages/SystemUI/res/values-te/tiles_states_strings.xml b/packages/SystemUI/res/values-te/tiles_states_strings.xml
index 9d2b407..6ff2934 100644
--- a/packages/SystemUI/res/values-te/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-te/tiles_states_strings.xml
@@ -126,6 +126,9 @@
<item msgid="8259411607272330225">"ఆఫ్లో ఉంది"</item>
<item msgid="578444932039713369">"ఆన్లో ఉంది"</item>
</string-array>
+ <!-- no translation found for tile_states_record_issue:0 (1727196795383575383) -->
+ <!-- no translation found for tile_states_record_issue:1 (9061144428113385092) -->
+ <!-- no translation found for tile_states_record_issue:2 (2984256114867200368) -->
<string-array name="tile_states_reverse">
<item msgid="3574611556622963971">"అందుబాటులో లేదు"</item>
<item msgid="8707481475312432575">"ఆఫ్లో ఉంది"</item>
diff --git a/packages/SystemUI/res/values-th/tiles_states_strings.xml b/packages/SystemUI/res/values-th/tiles_states_strings.xml
index 69449a7..d961385 100644
--- a/packages/SystemUI/res/values-th/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-th/tiles_states_strings.xml
@@ -126,6 +126,9 @@
<item msgid="8259411607272330225">"ปิด"</item>
<item msgid="578444932039713369">"เปิด"</item>
</string-array>
+ <!-- no translation found for tile_states_record_issue:0 (1727196795383575383) -->
+ <!-- no translation found for tile_states_record_issue:1 (9061144428113385092) -->
+ <!-- no translation found for tile_states_record_issue:2 (2984256114867200368) -->
<string-array name="tile_states_reverse">
<item msgid="3574611556622963971">"ไม่พร้อมใช้งาน"</item>
<item msgid="8707481475312432575">"ปิด"</item>
diff --git a/packages/SystemUI/res/values-tl/tiles_states_strings.xml b/packages/SystemUI/res/values-tl/tiles_states_strings.xml
index 689c2a2..a12c010 100644
--- a/packages/SystemUI/res/values-tl/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-tl/tiles_states_strings.xml
@@ -126,6 +126,9 @@
<item msgid="8259411607272330225">"Naka-off"</item>
<item msgid="578444932039713369">"Naka-on"</item>
</string-array>
+ <!-- no translation found for tile_states_record_issue:0 (1727196795383575383) -->
+ <!-- no translation found for tile_states_record_issue:1 (9061144428113385092) -->
+ <!-- no translation found for tile_states_record_issue:2 (2984256114867200368) -->
<string-array name="tile_states_reverse">
<item msgid="3574611556622963971">"Hindi available"</item>
<item msgid="8707481475312432575">"Naka-off"</item>
diff --git a/packages/SystemUI/res/values-tr/strings.xml b/packages/SystemUI/res/values-tr/strings.xml
index 495000b..2cdc6e7 100644
--- a/packages/SystemUI/res/values-tr/strings.xml
+++ b/packages/SystemUI/res/values-tr/strings.xml
@@ -575,10 +575,8 @@
<string name="volume_ringer_status_normal" msgid="1339039682222461143">"Zili çaldır"</string>
<string name="volume_ringer_status_vibrate" msgid="6970078708957857825">"Titreşim"</string>
<string name="volume_ringer_status_silent" msgid="3691324657849880883">"Sesi kapat"</string>
- <!-- no translation found for media_device_cast (4786241789687569892) -->
- <skip />
- <!-- no translation found for stream_notification_unavailable (4313854556205836435) -->
- <skip />
+ <string name="media_device_cast" msgid="4786241789687569892">"Yayınla"</string>
+ <string name="stream_notification_unavailable" msgid="4313854556205836435">"Zil sesi kapatıldığı için kullanılamıyor"</string>
<string name="volume_stream_content_description_unmute" msgid="7729576371406792977">"%1$s. Sesi açmak için dokunun."</string>
<string name="volume_stream_content_description_vibrate" msgid="4858111994183089761">"%1$s. Titreşime ayarlamak için dokunun. Erişilebilirlik hizmetlerinin sesi kapatılabilir."</string>
<string name="volume_stream_content_description_mute" msgid="4079046784917920984">"%1$s. Sesi kapatmak için dokunun. Erişilebilirlik hizmetlerinin sesi kapatılabilir."</string>
diff --git a/packages/SystemUI/res/values-tr/tiles_states_strings.xml b/packages/SystemUI/res/values-tr/tiles_states_strings.xml
index a8c7f78..c6a8aec 100644
--- a/packages/SystemUI/res/values-tr/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-tr/tiles_states_strings.xml
@@ -126,6 +126,9 @@
<item msgid="8259411607272330225">"Kapalı"</item>
<item msgid="578444932039713369">"Açık"</item>
</string-array>
+ <!-- no translation found for tile_states_record_issue:0 (1727196795383575383) -->
+ <!-- no translation found for tile_states_record_issue:1 (9061144428113385092) -->
+ <!-- no translation found for tile_states_record_issue:2 (2984256114867200368) -->
<string-array name="tile_states_reverse">
<item msgid="3574611556622963971">"Kullanılamıyor"</item>
<item msgid="8707481475312432575">"Kapalı"</item>
diff --git a/packages/SystemUI/res/values-uk/strings.xml b/packages/SystemUI/res/values-uk/strings.xml
index 67d5ffc..c89ae75 100644
--- a/packages/SystemUI/res/values-uk/strings.xml
+++ b/packages/SystemUI/res/values-uk/strings.xml
@@ -575,10 +575,8 @@
<string name="volume_ringer_status_normal" msgid="1339039682222461143">"Дзвінок"</string>
<string name="volume_ringer_status_vibrate" msgid="6970078708957857825">"Вібросигнал"</string>
<string name="volume_ringer_status_silent" msgid="3691324657849880883">"Без звуку"</string>
- <!-- no translation found for media_device_cast (4786241789687569892) -->
- <skip />
- <!-- no translation found for stream_notification_unavailable (4313854556205836435) -->
- <skip />
+ <string name="media_device_cast" msgid="4786241789687569892">"Трансляція"</string>
+ <string name="stream_notification_unavailable" msgid="4313854556205836435">"Недоступно: звук дзвінків вимкнено"</string>
<string name="volume_stream_content_description_unmute" msgid="7729576371406792977">"%1$s. Торкніться, щоб увімкнути звук."</string>
<string name="volume_stream_content_description_vibrate" msgid="4858111994183089761">"%1$s. Торкніться, щоб налаштувати вібросигнал. Спеціальні можливості може бути вимкнено."</string>
<string name="volume_stream_content_description_mute" msgid="4079046784917920984">"%1$s. Торкніться, щоб вимкнути звук. Спеціальні можливості може бути вимкнено."</string>
diff --git a/packages/SystemUI/res/values-uk/tiles_states_strings.xml b/packages/SystemUI/res/values-uk/tiles_states_strings.xml
index 4062f1b..a8e1ab8 100644
--- a/packages/SystemUI/res/values-uk/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-uk/tiles_states_strings.xml
@@ -126,6 +126,9 @@
<item msgid="8259411607272330225">"Вимкнено"</item>
<item msgid="578444932039713369">"Увімкнено"</item>
</string-array>
+ <!-- no translation found for tile_states_record_issue:0 (1727196795383575383) -->
+ <!-- no translation found for tile_states_record_issue:1 (9061144428113385092) -->
+ <!-- no translation found for tile_states_record_issue:2 (2984256114867200368) -->
<string-array name="tile_states_reverse">
<item msgid="3574611556622963971">"Недоступно"</item>
<item msgid="8707481475312432575">"Вимкнено"</item>
diff --git a/packages/SystemUI/res/values-ur/strings.xml b/packages/SystemUI/res/values-ur/strings.xml
index 7414ac6..3237f32 100644
--- a/packages/SystemUI/res/values-ur/strings.xml
+++ b/packages/SystemUI/res/values-ur/strings.xml
@@ -429,8 +429,7 @@
<string name="cta_label_to_open_widget_picker" msgid="3874946756976360699">"مزید ویجٹس شامل کریں"</string>
<string name="popup_on_dismiss_cta_tile_text" msgid="8292501780996070019">"ویجٹس کو حسب ضرورت بنانے کے لیے لانگ پریس کریں"</string>
<string name="button_to_configure_widgets_text" msgid="4191862850185256901">"ویجیٹس کو حسب ضرورت بنائیں"</string>
- <!-- no translation found for icon_description_for_disabled_widget (4693151565003206943) -->
- <skip />
+ <string name="icon_description_for_disabled_widget" msgid="4693151565003206943">"غیر فعال ویجیٹ کے لئے ایپ آئیکن"</string>
<string name="edit_widget" msgid="9030848101135393954">"ویجیٹ میں ترمیم کریں"</string>
<string name="button_to_remove_widget" msgid="3948204829181214098">"ہٹائیں"</string>
<string name="hub_mode_add_widget_button_text" msgid="4831464661209971729">"ویجیٹ شامل کریں"</string>
@@ -575,10 +574,8 @@
<string name="volume_ringer_status_normal" msgid="1339039682222461143">"رِنگ کریں"</string>
<string name="volume_ringer_status_vibrate" msgid="6970078708957857825">"وائبریٹ"</string>
<string name="volume_ringer_status_silent" msgid="3691324657849880883">"خاموش کریں"</string>
- <!-- no translation found for media_device_cast (4786241789687569892) -->
- <skip />
- <!-- no translation found for stream_notification_unavailable (4313854556205836435) -->
- <skip />
+ <string name="media_device_cast" msgid="4786241789687569892">"کاسٹ"</string>
+ <string name="stream_notification_unavailable" msgid="4313854556205836435">"دستیاب نہیں ہے کیونکہ رنگ خاموش ہے"</string>
<string name="volume_stream_content_description_unmute" msgid="7729576371406792977">"%1$s۔ آواز چالو کرنے کیلئے تھپتھپائیں۔"</string>
<string name="volume_stream_content_description_vibrate" msgid="4858111994183089761">"%1$s۔ ارتعاش پر سیٹ کرنے کیلئے تھپتھپائیں۔ ایکسیسبیلٹی سروسز شاید خاموش ہوں۔"</string>
<string name="volume_stream_content_description_mute" msgid="4079046784917920984">"%1$s۔ خاموش کرنے کیلئے تھپتھپائیں۔ ایکسیسبیلٹی سروسز شاید خاموش ہوں۔"</string>
@@ -839,10 +836,8 @@
<string name="accessibility_quick_settings_power_menu" msgid="6820426108301758412">"پاور مینیو"</string>
<string name="accessibility_quick_settings_page" msgid="7506322631645550961">"صفحہ <xliff:g id="ID_1">%1$d</xliff:g> از <xliff:g id="ID_2">%2$d</xliff:g>"</string>
<string name="tuner_lock_screen" msgid="2267383813241144544">"مقفل اسکرین"</string>
- <!-- no translation found for finder_active (7907846989716941952) -->
- <skip />
- <!-- no translation found for shutdown_progress (5464239146561542178) -->
- <skip />
+ <string name="finder_active" msgid="7907846989716941952">"پاور آف ہونے پر بھی آپ میرا آلہ ڈھونڈیں کے ساتھ اس فون کو تلاش کر سکتے ہیں"</string>
+ <string name="shutdown_progress" msgid="5464239146561542178">"بند ہو رہا ہے…"</string>
<string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"نگہداشت کے اقدامات ملاحظہ کریں"</string>
<string name="high_temp_dialog_help_text" msgid="7380171287943345858">"نگہداشت کے اقدامات ملاحظہ کریں"</string>
<string name="high_temp_alarm_title" msgid="8654754369605452169">"اپنے آلہ کو ان پلگ کریں"</string>
diff --git a/packages/SystemUI/res/values-ur/tiles_states_strings.xml b/packages/SystemUI/res/values-ur/tiles_states_strings.xml
index bb27b9f..6d1e707 100644
--- a/packages/SystemUI/res/values-ur/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-ur/tiles_states_strings.xml
@@ -126,6 +126,9 @@
<item msgid="8259411607272330225">"آف ہے"</item>
<item msgid="578444932039713369">"آن ہے"</item>
</string-array>
+ <!-- no translation found for tile_states_record_issue:0 (1727196795383575383) -->
+ <!-- no translation found for tile_states_record_issue:1 (9061144428113385092) -->
+ <!-- no translation found for tile_states_record_issue:2 (2984256114867200368) -->
<string-array name="tile_states_reverse">
<item msgid="3574611556622963971">"دستیاب نہیں ہے"</item>
<item msgid="8707481475312432575">"آف ہے"</item>
diff --git a/packages/SystemUI/res/values-uz/strings.xml b/packages/SystemUI/res/values-uz/strings.xml
index 09e5ff0..478fcdb 100644
--- a/packages/SystemUI/res/values-uz/strings.xml
+++ b/packages/SystemUI/res/values-uz/strings.xml
@@ -575,10 +575,8 @@
<string name="volume_ringer_status_normal" msgid="1339039682222461143">"Jiringlatish"</string>
<string name="volume_ringer_status_vibrate" msgid="6970078708957857825">"Tebranish"</string>
<string name="volume_ringer_status_silent" msgid="3691324657849880883">"Ovozsiz"</string>
- <!-- no translation found for media_device_cast (4786241789687569892) -->
- <skip />
- <!-- no translation found for stream_notification_unavailable (4313854556205836435) -->
- <skip />
+ <string name="media_device_cast" msgid="4786241789687569892">"Translatsiya"</string>
+ <string name="stream_notification_unavailable" msgid="4313854556205836435">"Jiringlash ovozsizligi uchun ishlamaydi"</string>
<string name="volume_stream_content_description_unmute" msgid="7729576371406792977">"%1$s. Ovozini yoqish uchun ustiga bosing."</string>
<string name="volume_stream_content_description_vibrate" msgid="4858111994183089761">"%1$s. Tebranishni yoqish uchun ustiga bosing. Qulayliklar ishlamasligi mumkin."</string>
<string name="volume_stream_content_description_mute" msgid="4079046784917920984">"%1$s. Ovozini o‘chirish uchun ustiga bosing. Qulayliklar ishlamasligi mumkin."</string>
diff --git a/packages/SystemUI/res/values-uz/tiles_states_strings.xml b/packages/SystemUI/res/values-uz/tiles_states_strings.xml
index bd5ee89..0558c4a 100644
--- a/packages/SystemUI/res/values-uz/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-uz/tiles_states_strings.xml
@@ -126,6 +126,9 @@
<item msgid="8259411607272330225">"Oʻchiq"</item>
<item msgid="578444932039713369">"Yoniq"</item>
</string-array>
+ <!-- no translation found for tile_states_record_issue:0 (1727196795383575383) -->
+ <!-- no translation found for tile_states_record_issue:1 (9061144428113385092) -->
+ <!-- no translation found for tile_states_record_issue:2 (2984256114867200368) -->
<string-array name="tile_states_reverse">
<item msgid="3574611556622963971">"Ishlamaydi"</item>
<item msgid="8707481475312432575">"Oʻchiq"</item>
diff --git a/packages/SystemUI/res/values-vi/strings.xml b/packages/SystemUI/res/values-vi/strings.xml
index f7057e9..7e8638b 100644
--- a/packages/SystemUI/res/values-vi/strings.xml
+++ b/packages/SystemUI/res/values-vi/strings.xml
@@ -575,10 +575,8 @@
<string name="volume_ringer_status_normal" msgid="1339039682222461143">"Đổ chuông"</string>
<string name="volume_ringer_status_vibrate" msgid="6970078708957857825">"Rung"</string>
<string name="volume_ringer_status_silent" msgid="3691324657849880883">"Tắt tiếng"</string>
- <!-- no translation found for media_device_cast (4786241789687569892) -->
- <skip />
- <!-- no translation found for stream_notification_unavailable (4313854556205836435) -->
- <skip />
+ <string name="media_device_cast" msgid="4786241789687569892">"Truyền"</string>
+ <string name="stream_notification_unavailable" msgid="4313854556205836435">"Không hoạt động vì chuông bị tắt"</string>
<string name="volume_stream_content_description_unmute" msgid="7729576371406792977">"%1$s. Nhấn để bật tiếng."</string>
<string name="volume_stream_content_description_vibrate" msgid="4858111994183089761">"%1$s. Nhấn để đặt chế độ rung. Bạn có thể tắt tiếng dịch vụ trợ năng."</string>
<string name="volume_stream_content_description_mute" msgid="4079046784917920984">"%1$s. Nhấn để tắt tiếng. Bạn có thể tắt tiếng dịch vụ trợ năng."</string>
diff --git a/packages/SystemUI/res/values-vi/tiles_states_strings.xml b/packages/SystemUI/res/values-vi/tiles_states_strings.xml
index 201a45b..eee10d3 100644
--- a/packages/SystemUI/res/values-vi/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-vi/tiles_states_strings.xml
@@ -126,6 +126,9 @@
<item msgid="8259411607272330225">"Đang tắt"</item>
<item msgid="578444932039713369">"Đang bật"</item>
</string-array>
+ <!-- no translation found for tile_states_record_issue:0 (1727196795383575383) -->
+ <!-- no translation found for tile_states_record_issue:1 (9061144428113385092) -->
+ <!-- no translation found for tile_states_record_issue:2 (2984256114867200368) -->
<string-array name="tile_states_reverse">
<item msgid="3574611556622963971">"Không hoạt động"</item>
<item msgid="8707481475312432575">"Đang tắt"</item>
diff --git a/packages/SystemUI/res/values-zh-rCN/strings.xml b/packages/SystemUI/res/values-zh-rCN/strings.xml
index 2c87e24..2552138 100644
--- a/packages/SystemUI/res/values-zh-rCN/strings.xml
+++ b/packages/SystemUI/res/values-zh-rCN/strings.xml
@@ -575,10 +575,8 @@
<string name="volume_ringer_status_normal" msgid="1339039682222461143">"响铃"</string>
<string name="volume_ringer_status_vibrate" msgid="6970078708957857825">"振动"</string>
<string name="volume_ringer_status_silent" msgid="3691324657849880883">"静音"</string>
- <!-- no translation found for media_device_cast (4786241789687569892) -->
- <skip />
- <!-- no translation found for stream_notification_unavailable (4313854556205836435) -->
- <skip />
+ <string name="media_device_cast" msgid="4786241789687569892">"投屏"</string>
+ <string name="stream_notification_unavailable" msgid="4313854556205836435">"该功能无法使用,因为铃声被静音"</string>
<string name="volume_stream_content_description_unmute" msgid="7729576371406792977">"%1$s。点按即可取消静音。"</string>
<string name="volume_stream_content_description_vibrate" msgid="4858111994183089761">"%1$s。点按即可设为振动,但可能会同时将无障碍服务设为静音。"</string>
<string name="volume_stream_content_description_mute" msgid="4079046784917920984">"%1$s。点按即可设为静音,但可能会同时将无障碍服务设为静音。"</string>
diff --git a/packages/SystemUI/res/values-zh-rCN/tiles_states_strings.xml b/packages/SystemUI/res/values-zh-rCN/tiles_states_strings.xml
index 3ab2d7a..82ab671 100644
--- a/packages/SystemUI/res/values-zh-rCN/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-zh-rCN/tiles_states_strings.xml
@@ -126,6 +126,9 @@
<item msgid="8259411607272330225">"已关闭"</item>
<item msgid="578444932039713369">"已开启"</item>
</string-array>
+ <!-- no translation found for tile_states_record_issue:0 (1727196795383575383) -->
+ <!-- no translation found for tile_states_record_issue:1 (9061144428113385092) -->
+ <!-- no translation found for tile_states_record_issue:2 (2984256114867200368) -->
<string-array name="tile_states_reverse">
<item msgid="3574611556622963971">"不可用"</item>
<item msgid="8707481475312432575">"已关闭"</item>
diff --git a/packages/SystemUI/res/values-zh-rHK/strings.xml b/packages/SystemUI/res/values-zh-rHK/strings.xml
index 78d7c7a..5941dad 100644
--- a/packages/SystemUI/res/values-zh-rHK/strings.xml
+++ b/packages/SystemUI/res/values-zh-rHK/strings.xml
@@ -575,10 +575,8 @@
<string name="volume_ringer_status_normal" msgid="1339039682222461143">"鈴聲"</string>
<string name="volume_ringer_status_vibrate" msgid="6970078708957857825">"震動"</string>
<string name="volume_ringer_status_silent" msgid="3691324657849880883">"靜音"</string>
- <!-- no translation found for media_device_cast (4786241789687569892) -->
- <skip />
- <!-- no translation found for stream_notification_unavailable (4313854556205836435) -->
- <skip />
+ <string name="media_device_cast" msgid="4786241789687569892">"投放"</string>
+ <string name="stream_notification_unavailable" msgid="4313854556205836435">"鈴聲已設定為靜音,因此無法使用"</string>
<string name="volume_stream_content_description_unmute" msgid="7729576371406792977">"%1$s。輕按即可取消靜音。"</string>
<string name="volume_stream_content_description_vibrate" msgid="4858111994183089761">"%1$s。輕按即可設為震動。無障礙功能服務可能已經設為靜音。"</string>
<string name="volume_stream_content_description_mute" msgid="4079046784917920984">"%1$s。輕按即可設為靜音。無障礙功能服務可能已經設為靜音。"</string>
diff --git a/packages/SystemUI/res/values-zh-rHK/tiles_states_strings.xml b/packages/SystemUI/res/values-zh-rHK/tiles_states_strings.xml
index 89d6628..6bac275 100644
--- a/packages/SystemUI/res/values-zh-rHK/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-zh-rHK/tiles_states_strings.xml
@@ -126,6 +126,9 @@
<item msgid="8259411607272330225">"已關閉"</item>
<item msgid="578444932039713369">"已開啟"</item>
</string-array>
+ <!-- no translation found for tile_states_record_issue:0 (1727196795383575383) -->
+ <!-- no translation found for tile_states_record_issue:1 (9061144428113385092) -->
+ <!-- no translation found for tile_states_record_issue:2 (2984256114867200368) -->
<string-array name="tile_states_reverse">
<item msgid="3574611556622963971">"無法使用"</item>
<item msgid="8707481475312432575">"已關閉"</item>
diff --git a/packages/SystemUI/res/values-zh-rTW/strings.xml b/packages/SystemUI/res/values-zh-rTW/strings.xml
index 46d7750..c46d831 100644
--- a/packages/SystemUI/res/values-zh-rTW/strings.xml
+++ b/packages/SystemUI/res/values-zh-rTW/strings.xml
@@ -575,10 +575,8 @@
<string name="volume_ringer_status_normal" msgid="1339039682222461143">"鈴聲"</string>
<string name="volume_ringer_status_vibrate" msgid="6970078708957857825">"震動"</string>
<string name="volume_ringer_status_silent" msgid="3691324657849880883">"靜音"</string>
- <!-- no translation found for media_device_cast (4786241789687569892) -->
- <skip />
- <!-- no translation found for stream_notification_unavailable (4313854556205836435) -->
- <skip />
+ <string name="media_device_cast" msgid="4786241789687569892">"投放"</string>
+ <string name="stream_notification_unavailable" msgid="4313854556205836435">"鈴聲已設為靜音,因此無法使用"</string>
<string name="volume_stream_content_description_unmute" msgid="7729576371406792977">"%1$s。輕觸即可取消靜音。"</string>
<string name="volume_stream_content_description_vibrate" msgid="4858111994183089761">"%1$s。輕觸即可設為震動,但系統可能會將無障礙服務一併設為靜音。"</string>
<string name="volume_stream_content_description_mute" msgid="4079046784917920984">"%1$s。輕觸即可設為靜音,但系統可能會將無障礙服務一併設為靜音。"</string>
diff --git a/packages/SystemUI/res/values-zh-rTW/tiles_states_strings.xml b/packages/SystemUI/res/values-zh-rTW/tiles_states_strings.xml
index a046e33..5794bf1 100644
--- a/packages/SystemUI/res/values-zh-rTW/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-zh-rTW/tiles_states_strings.xml
@@ -126,6 +126,9 @@
<item msgid="8259411607272330225">"已關閉"</item>
<item msgid="578444932039713369">"已開啟"</item>
</string-array>
+ <!-- no translation found for tile_states_record_issue:0 (1727196795383575383) -->
+ <!-- no translation found for tile_states_record_issue:1 (9061144428113385092) -->
+ <!-- no translation found for tile_states_record_issue:2 (2984256114867200368) -->
<string-array name="tile_states_reverse">
<item msgid="3574611556622963971">"無法使用"</item>
<item msgid="8707481475312432575">"已關閉"</item>
diff --git a/packages/SystemUI/res/values-zu/strings.xml b/packages/SystemUI/res/values-zu/strings.xml
index f12c2bb..0bbac05 100644
--- a/packages/SystemUI/res/values-zu/strings.xml
+++ b/packages/SystemUI/res/values-zu/strings.xml
@@ -575,10 +575,8 @@
<string name="volume_ringer_status_normal" msgid="1339039682222461143">"Khalisa"</string>
<string name="volume_ringer_status_vibrate" msgid="6970078708957857825">"Dlidlizela"</string>
<string name="volume_ringer_status_silent" msgid="3691324657849880883">"Thulisa"</string>
- <!-- no translation found for media_device_cast (4786241789687569892) -->
- <skip />
- <!-- no translation found for stream_notification_unavailable (4313854556205836435) -->
- <skip />
+ <string name="media_device_cast" msgid="4786241789687569892">"Sakaza"</string>
+ <string name="stream_notification_unavailable" msgid="4313854556205836435">"Ayitholakali ngoba ukukhala kuthulisiwe"</string>
<string name="volume_stream_content_description_unmute" msgid="7729576371406792977">"%1$s. Thepha ukuze ususe ukuthula."</string>
<string name="volume_stream_content_description_vibrate" msgid="4858111994183089761">"%1$s. Thepha ukuze usethe ukudlidliza. Amasevisi okufinyelela angathuliswa."</string>
<string name="volume_stream_content_description_mute" msgid="4079046784917920984">"%1$s. Thepha ukuze uthulise. Amasevisi okufinyelela angathuliswa."</string>
diff --git a/packages/SystemUI/res/values-zu/tiles_states_strings.xml b/packages/SystemUI/res/values-zu/tiles_states_strings.xml
index e35840b..8c7b652 100644
--- a/packages/SystemUI/res/values-zu/tiles_states_strings.xml
+++ b/packages/SystemUI/res/values-zu/tiles_states_strings.xml
@@ -126,6 +126,9 @@
<item msgid="8259411607272330225">"Valiwe"</item>
<item msgid="578444932039713369">"Vuliwe"</item>
</string-array>
+ <!-- no translation found for tile_states_record_issue:0 (1727196795383575383) -->
+ <!-- no translation found for tile_states_record_issue:1 (9061144428113385092) -->
+ <!-- no translation found for tile_states_record_issue:2 (2984256114867200368) -->
<string-array name="tile_states_reverse">
<item msgid="3574611556622963971">"Akutholakali"</item>
<item msgid="8707481475312432575">"Valiwe"</item>
diff --git a/packages/SystemUI/src/com/android/keyguard/CarrierTextManager.java b/packages/SystemUI/src/com/android/keyguard/CarrierTextManager.java
index 75cace4..b9b8fbe 100644
--- a/packages/SystemUI/src/com/android/keyguard/CarrierTextManager.java
+++ b/packages/SystemUI/src/com/android/keyguard/CarrierTextManager.java
@@ -209,6 +209,9 @@
// This will set/remove the listeners appropriately. Note that it will never double
// add the listeners.
handleSetListening(mCarrierTextCallback);
+ mainExecutor.execute(() -> {
+ mKeyguardUpdateMonitor.registerCallback(mCallback);
+ });
}
});
}
@@ -276,7 +279,6 @@
if (mNetworkSupported.get()) {
// Keyguard update monitor expects callbacks from main thread
mMainExecutor.execute(() -> {
- mKeyguardUpdateMonitor.registerCallback(mCallback);
mWakefulnessLifecycle.addObserver(mWakefulnessObserver);
});
mTelephonyListenerManager.addActiveDataSubscriptionIdListener(mPhoneStateListener);
@@ -289,7 +291,6 @@
} else {
mCarrierTextCallback = null;
mMainExecutor.execute(() -> {
- mKeyguardUpdateMonitor.removeCallback(mCallback);
mWakefulnessLifecycle.removeObserver(mWakefulnessObserver);
});
mTelephonyListenerManager.removeActiveDataSubscriptionIdListener(mPhoneStateListener);
diff --git a/packages/SystemUI/src/com/android/keyguard/ClockEventController.kt b/packages/SystemUI/src/com/android/keyguard/ClockEventController.kt
index 169a4e0..f28d405 100644
--- a/packages/SystemUI/src/com/android/keyguard/ClockEventController.kt
+++ b/packages/SystemUI/src/com/android/keyguard/ClockEventController.kt
@@ -15,8 +15,6 @@
*/
package com.android.keyguard
-import com.android.systemui.keyguard.shared.model.KeyguardState.AOD
-import com.android.systemui.keyguard.shared.model.KeyguardState.LOCKSCREEN
import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
@@ -43,14 +41,16 @@
import com.android.systemui.flags.Flags.REGION_SAMPLING
import com.android.systemui.keyguard.domain.interactor.KeyguardInteractor
import com.android.systemui.keyguard.domain.interactor.KeyguardTransitionInteractor
+import com.android.systemui.keyguard.shared.model.KeyguardState.AOD
+import com.android.systemui.keyguard.shared.model.KeyguardState.LOCKSCREEN
import com.android.systemui.keyguard.shared.model.TransitionState
import com.android.systemui.lifecycle.repeatWhenAttached
import com.android.systemui.log.core.Logger
+import com.android.systemui.plugins.clocks.AlarmData
import com.android.systemui.plugins.clocks.ClockController
import com.android.systemui.plugins.clocks.ClockFaceController
import com.android.systemui.plugins.clocks.ClockMessageBuffers
import com.android.systemui.plugins.clocks.ClockTickRate
-import com.android.systemui.plugins.clocks.AlarmData
import com.android.systemui.plugins.clocks.WeatherData
import com.android.systemui.plugins.clocks.ZenData
import com.android.systemui.plugins.clocks.ZenData.ZenMode
@@ -61,16 +61,18 @@
import com.android.systemui.statusbar.policy.ConfigurationController
import com.android.systemui.statusbar.policy.ZenModeController
import com.android.systemui.util.concurrency.DelayableExecutor
+import java.util.Locale
+import java.util.TimeZone
+import java.util.concurrent.Executor
+import javax.inject.Inject
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.DisposableHandle
import kotlinx.coroutines.Job
import kotlinx.coroutines.flow.combine
import kotlinx.coroutines.flow.filter
+import kotlinx.coroutines.flow.map
+import kotlinx.coroutines.flow.merge
import kotlinx.coroutines.launch
-import java.util.Locale
-import java.util.TimeZone
-import java.util.concurrent.Executor
-import javax.inject.Inject
/**
* Controller for a Clock provided by the registry and used on the keyguard. Instantiated by
@@ -93,11 +95,13 @@
private val featureFlags: FeatureFlagsClassic,
private val zenModeController: ZenModeController,
) {
- var loggers = listOf(
- clockBuffers.infraMessageBuffer,
- clockBuffers.smallClockMessageBuffer,
- clockBuffers.largeClockMessageBuffer
- ).map { Logger(it, TAG) }
+ var loggers =
+ listOf(
+ clockBuffers.infraMessageBuffer,
+ clockBuffers.smallClockMessageBuffer,
+ clockBuffers.largeClockMessageBuffer
+ )
+ .map { Logger(it, TAG) }
var clock: ClockController? = null
get() = field
@@ -108,11 +112,12 @@
}
private fun disconnectClock(clock: ClockController?) {
- if (clock == null) { return; }
+ if (clock == null) {
+ return
+ }
smallClockOnAttachStateChangeListener?.let {
clock.smallClock.view.removeOnAttachStateChangeListener(it)
- smallClockFrame?.viewTreeObserver
- ?.removeOnGlobalLayoutListener(onGlobalLayoutListener)
+ smallClockFrame?.viewTreeObserver?.removeOnGlobalLayoutListener(onGlobalLayoutListener)
}
largeClockOnAttachStateChangeListener?.let {
clock.largeClock.view.removeOnAttachStateChangeListener(it)
@@ -120,7 +125,9 @@
}
private fun connectClock(clock: ClockController?) {
- if (clock == null) { return; }
+ if (clock == null) {
+ return
+ }
val clockStr = clock.toString()
loggers.forEach { it.d({ "New Clock: $str1" }) { str1 = clockStr } }
@@ -129,23 +136,27 @@
if (!regionSamplingEnabled) {
updateColors()
} else {
- smallRegionSampler = createRegionSampler(
- clock.smallClock.view,
- mainExecutor,
- bgExecutor,
- regionSamplingEnabled,
- isLockscreen = true,
- ::updateColors
- ).apply { startRegionSampler() }
+ smallRegionSampler =
+ createRegionSampler(
+ clock.smallClock.view,
+ mainExecutor,
+ bgExecutor,
+ regionSamplingEnabled,
+ isLockscreen = true,
+ ::updateColors
+ )
+ .apply { startRegionSampler() }
- largeRegionSampler = createRegionSampler(
- clock.largeClock.view,
- mainExecutor,
- bgExecutor,
- regionSamplingEnabled,
- isLockscreen = true,
- ::updateColors
- ).apply { startRegionSampler() }
+ largeRegionSampler =
+ createRegionSampler(
+ clock.largeClock.view,
+ mainExecutor,
+ bgExecutor,
+ regionSamplingEnabled,
+ isLockscreen = true,
+ ::updateColors
+ )
+ .apply { startRegionSampler() }
updateColors()
}
@@ -158,49 +169,49 @@
}
clock.events.onWeatherDataChanged(it)
}
- zenData?.let {
- clock.events.onZenDataChanged(it)
- }
- alarmData?.let {
- clock.events.onAlarmDataChanged(it)
- }
+ zenData?.let { clock.events.onZenDataChanged(it) }
+ alarmData?.let { clock.events.onAlarmDataChanged(it) }
- smallClockOnAttachStateChangeListener = object : OnAttachStateChangeListener {
- var pastVisibility: Int? = null
- override fun onViewAttachedToWindow(view: View) {
- clock.events.onTimeFormatChanged(DateFormat.is24HourFormat(context))
- // Match the asing for view.parent's layout classes.
- smallClockFrame = (view.parent as ViewGroup)?.also { frame ->
- pastVisibility = frame.visibility
- onGlobalLayoutListener = OnGlobalLayoutListener {
- val currentVisibility = frame.visibility
- if (pastVisibility != currentVisibility) {
- pastVisibility = currentVisibility
- // when small clock is visible,
- // recalculate bounds and sample
- if (currentVisibility == View.VISIBLE) {
- smallRegionSampler?.stopRegionSampler()
- smallRegionSampler?.startRegionSampler()
+ smallClockOnAttachStateChangeListener =
+ object : OnAttachStateChangeListener {
+ var pastVisibility: Int? = null
+ override fun onViewAttachedToWindow(view: View) {
+ clock.events.onTimeFormatChanged(DateFormat.is24HourFormat(context))
+ // Match the asing for view.parent's layout classes.
+ smallClockFrame =
+ (view.parent as ViewGroup)?.also { frame ->
+ pastVisibility = frame.visibility
+ onGlobalLayoutListener = OnGlobalLayoutListener {
+ val currentVisibility = frame.visibility
+ if (pastVisibility != currentVisibility) {
+ pastVisibility = currentVisibility
+ // when small clock is visible,
+ // recalculate bounds and sample
+ if (currentVisibility == View.VISIBLE) {
+ smallRegionSampler?.stopRegionSampler()
+ smallRegionSampler?.startRegionSampler()
+ }
+ }
}
+ frame.viewTreeObserver.addOnGlobalLayoutListener(onGlobalLayoutListener)
}
- }
- frame.viewTreeObserver.addOnGlobalLayoutListener(onGlobalLayoutListener)
+ }
+
+ override fun onViewDetachedFromWindow(p0: View) {
+ smallClockFrame
+ ?.viewTreeObserver
+ ?.removeOnGlobalLayoutListener(onGlobalLayoutListener)
}
}
-
- override fun onViewDetachedFromWindow(p0: View) {
- smallClockFrame?.viewTreeObserver
- ?.removeOnGlobalLayoutListener(onGlobalLayoutListener)
- }
- }
clock.smallClock.view.addOnAttachStateChangeListener(smallClockOnAttachStateChangeListener)
- largeClockOnAttachStateChangeListener = object : OnAttachStateChangeListener {
- override fun onViewAttachedToWindow(p0: View) {
- clock.events.onTimeFormatChanged(DateFormat.is24HourFormat(context))
+ largeClockOnAttachStateChangeListener =
+ object : OnAttachStateChangeListener {
+ override fun onViewAttachedToWindow(p0: View) {
+ clock.events.onTimeFormatChanged(DateFormat.is24HourFormat(context))
+ }
+ override fun onViewDetachedFromWindow(p0: View) {}
}
- override fun onViewDetachedFromWindow(p0: View) {}
- }
clock.largeClock.view.addOnAttachStateChangeListener(largeClockOnAttachStateChangeListener)
}
@@ -263,7 +274,9 @@
bgExecutor,
regionSamplingEnabled,
isLockscreen,
- ) { updateColors() }
+ ) {
+ updateColors()
+ }
}
var smallRegionSampler: RegionSampler? = null
@@ -364,35 +377,36 @@
}
}
- private val zenModeCallback = object : ZenModeController.Callback {
- override fun onZenChanged(zen: Int) {
- var mode = ZenMode.fromInt(zen)
- if (mode == null) {
- Log.e(TAG, "Failed to get zen mode from int: $zen")
- return
- }
-
- zenData = ZenData(
- mode,
- if (mode == ZenMode.OFF) SysuiR.string::dnd_is_off.name
- else SysuiR.string::dnd_is_on.name
- ).also { data ->
- mainExecutor.execute {
- clock?.run { events.onZenDataChanged(data) }
+ private val zenModeCallback =
+ object : ZenModeController.Callback {
+ override fun onZenChanged(zen: Int) {
+ var mode = ZenMode.fromInt(zen)
+ if (mode == null) {
+ Log.e(TAG, "Failed to get zen mode from int: $zen")
+ return
}
- }
- }
- override fun onNextAlarmChanged() {
- val nextAlarmMillis = zenModeController.getNextAlarm()
- alarmData = AlarmData(
- if (nextAlarmMillis > 0) nextAlarmMillis else null,
- SysuiR.string::status_bar_alarm.name
- ).also { data ->
- clock?.run { events.onAlarmDataChanged(data) }
+ zenData =
+ ZenData(
+ mode,
+ if (mode == ZenMode.OFF) SysuiR.string::dnd_is_off.name
+ else SysuiR.string::dnd_is_on.name
+ )
+ .also { data ->
+ mainExecutor.execute { clock?.run { events.onZenDataChanged(data) } }
+ }
+ }
+
+ override fun onNextAlarmChanged() {
+ val nextAlarmMillis = zenModeController.getNextAlarm()
+ alarmData =
+ AlarmData(
+ if (nextAlarmMillis > 0) nextAlarmMillis else null,
+ SysuiR.string::status_bar_alarm.name
+ )
+ .also { data -> clock?.run { events.onAlarmDataChanged(data) } }
}
}
- }
fun registerListeners(parent: View) {
if (isRegistered) {
@@ -413,6 +427,7 @@
listenForDozing(this)
if (migrateClocksToBlueprint()) {
listenForDozeAmountTransition(this)
+ listenForAnyStateToAodTransition(this)
} else {
listenForDozeAmount(this)
}
@@ -444,12 +459,15 @@
largeRegionSampler?.stopRegionSampler()
smallTimeListener?.stop()
largeTimeListener?.stop()
- clock?.smallClock?.view
- ?.removeOnAttachStateChangeListener(smallClockOnAttachStateChangeListener)
- smallClockFrame?.viewTreeObserver
- ?.removeOnGlobalLayoutListener(onGlobalLayoutListener)
- clock?.largeClock?.view
- ?.removeOnAttachStateChangeListener(largeClockOnAttachStateChangeListener)
+ clock
+ ?.smallClock
+ ?.view
+ ?.removeOnAttachStateChangeListener(smallClockOnAttachStateChangeListener)
+ smallClockFrame?.viewTreeObserver?.removeOnGlobalLayoutListener(onGlobalLayoutListener)
+ clock
+ ?.largeClock
+ ?.view
+ ?.removeOnAttachStateChangeListener(largeClockOnAttachStateChangeListener)
}
/**
@@ -473,12 +491,10 @@
largeTimeListener = null
clock?.let {
- smallTimeListener = TimeListener(it.smallClock, mainExecutor).apply {
- update(shouldTimeListenerRun)
- }
- largeTimeListener = TimeListener(it.largeClock, mainExecutor).apply {
- update(shouldTimeListenerRun)
- }
+ smallTimeListener =
+ TimeListener(it.smallClock, mainExecutor).apply { update(shouldTimeListenerRun) }
+ largeTimeListener =
+ TimeListener(it.largeClock, mainExecutor).apply { update(shouldTimeListenerRun) }
}
}
@@ -517,7 +533,27 @@
@VisibleForTesting
internal fun listenForDozeAmountTransition(scope: CoroutineScope): Job {
return scope.launch {
- keyguardTransitionInteractor.dozeAmountTransition.collect { handleDoze(it.value) }
+ merge(
+ keyguardTransitionInteractor.aodToLockscreenTransition.map { step ->
+ step.copy(value = 1f - step.value)
+ },
+ keyguardTransitionInteractor.lockscreenToAodTransition,
+ )
+ .collect { handleDoze(it.value) }
+ }
+ }
+
+ /**
+ * When keyguard is displayed again after being gone, the clock must be reset to full dozing.
+ */
+ @VisibleForTesting
+ internal fun listenForAnyStateToAodTransition(scope: CoroutineScope): Job {
+ return scope.launch {
+ keyguardTransitionInteractor
+ .transitionStepsToState(AOD)
+ .filter { it.transitionState == TransitionState.STARTED }
+ .filter { it.from != LOCKSCREEN }
+ .collect { handleDoze(1f) }
}
}
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java b/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java
index b7667a8..8c51a4e 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java
@@ -3313,6 +3313,7 @@
becameAbsent |= ABSENT_SIM_STATE_LIST.contains(state);
+ // TODO(b/327476182): Preserve SIM_STATE_CARD_IO_ERROR sims in a separate data source.
SimData data = mSimDatas.get(subId);
final boolean changed;
if (data == null) {
diff --git a/packages/SystemUI/src/com/android/systemui/bouncer/ui/binder/BouncerViewBinder.kt b/packages/SystemUI/src/com/android/systemui/bouncer/ui/binder/BouncerViewBinder.kt
index 36d3ed52..f1a0e5e 100644
--- a/packages/SystemUI/src/com/android/systemui/bouncer/ui/binder/BouncerViewBinder.kt
+++ b/packages/SystemUI/src/com/android/systemui/bouncer/ui/binder/BouncerViewBinder.kt
@@ -11,7 +11,6 @@
import com.android.systemui.bouncer.ui.BouncerDialogFactory
import com.android.systemui.bouncer.ui.viewmodel.BouncerViewModel
import com.android.systemui.bouncer.ui.viewmodel.KeyguardBouncerViewModel
-import com.android.systemui.compose.ComposeFacade
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.flags.Flags.COMPOSE_BOUNCER_ENABLED
import com.android.systemui.keyguard.ui.viewmodel.PrimaryBouncerToGoneTransitionViewModel
@@ -60,11 +59,7 @@
private val composeBouncerDependencies: Lazy<ComposeBouncerDependencies>,
) {
fun bind(view: ViewGroup) {
- if (
- COMPOSE_BOUNCER_ENABLED &&
- composeBouncerFlags.isOnlyComposeBouncerEnabled() &&
- ComposeFacade.isComposeAvailable()
- ) {
+ if (COMPOSE_BOUNCER_ENABLED && composeBouncerFlags.isOnlyComposeBouncerEnabled()) {
val deps = composeBouncerDependencies.get()
ComposeBouncerViewBinder.bind(
view,
diff --git a/packages/SystemUI/src/com/android/systemui/bouncer/ui/binder/ComposeBouncerViewBinder.kt b/packages/SystemUI/src/com/android/systemui/bouncer/ui/binder/ComposeBouncerViewBinder.kt
index 7b05395..179fa87 100644
--- a/packages/SystemUI/src/com/android/systemui/bouncer/ui/binder/ComposeBouncerViewBinder.kt
+++ b/packages/SystemUI/src/com/android/systemui/bouncer/ui/binder/ComposeBouncerViewBinder.kt
@@ -1,15 +1,17 @@
package com.android.systemui.bouncer.ui.binder
import android.view.ViewGroup
+import androidx.compose.ui.platform.ComposeView
import androidx.core.view.isVisible
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.repeatOnLifecycle
+import com.android.compose.theme.PlatformTheme
import com.android.keyguard.ViewMediatorCallback
import com.android.systemui.authentication.domain.interactor.AuthenticationInteractor
import com.android.systemui.bouncer.domain.interactor.PrimaryBouncerInteractor
import com.android.systemui.bouncer.ui.BouncerDialogFactory
+import com.android.systemui.bouncer.ui.composable.BouncerContent
import com.android.systemui.bouncer.ui.viewmodel.BouncerViewModel
-import com.android.systemui.compose.ComposeFacade
import com.android.systemui.lifecycle.repeatWhenAttached
import com.android.systemui.user.domain.interactor.SelectedUserInteractor
import kotlinx.coroutines.flow.collectLatest
@@ -27,12 +29,11 @@
viewMediatorCallback: ViewMediatorCallback?,
) {
view.addView(
- ComposeFacade.createBouncer(
- view.context,
- viewModel,
- dialogFactory,
- )
+ ComposeView(view.context).apply {
+ setContent { PlatformTheme { BouncerContent(viewModel, dialogFactory) } }
+ }
)
+
view.repeatWhenAttached {
repeatOnLifecycle(Lifecycle.State.CREATED) {
launch {
diff --git a/packages/SystemUI/src/com/android/systemui/communal/CommunalSceneStartable.kt b/packages/SystemUI/src/com/android/systemui/communal/CommunalSceneStartable.kt
index 8397372..d5cb4d5 100644
--- a/packages/SystemUI/src/com/android/systemui/communal/CommunalSceneStartable.kt
+++ b/packages/SystemUI/src/com/android/systemui/communal/CommunalSceneStartable.kt
@@ -16,9 +16,10 @@
package com.android.systemui.communal
+import com.android.compose.animation.scene.SceneKey
import com.android.systemui.CoreStartable
import com.android.systemui.communal.domain.interactor.CommunalInteractor
-import com.android.systemui.communal.shared.model.CommunalSceneKey
+import com.android.systemui.communal.shared.model.CommunalScenes
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.dagger.qualifiers.Application
import com.android.systemui.dagger.qualifiers.Background
@@ -74,7 +75,7 @@
.sample(keyguardTransitionInteractor.startedKeyguardState, ::Pair)
.onEach { (docked, lastStartedState) ->
if (docked && lastStartedState == KeyguardState.LOCKSCREEN) {
- communalInteractor.onSceneChanged(CommunalSceneKey.Communal)
+ communalInteractor.onSceneChanged(CommunalScenes.Communal)
}
}
.launchIn(bgScope)
@@ -82,21 +83,21 @@
private suspend fun determineSceneAfterTransition(
lastStartedTransition: TransitionStep,
- ): CommunalSceneKey? {
+ ): SceneKey? {
val to = lastStartedTransition.to
val from = lastStartedTransition.from
val docked = dockManager.isDocked
return when {
docked && to == KeyguardState.LOCKSCREEN && from != KeyguardState.GLANCEABLE_HUB -> {
- CommunalSceneKey.Communal
+ CommunalScenes.Communal
}
- to == KeyguardState.GONE -> CommunalSceneKey.Blank
+ to == KeyguardState.GONE -> CommunalScenes.Blank
!docked && !KeyguardState.deviceIsAwakeInState(to) -> {
// If the user taps the screen and wakes the device within this timeout, we don't
// want to dismiss the hub
delay(AWAKE_DEBOUNCE_DELAY)
- CommunalSceneKey.Blank
+ CommunalScenes.Blank
}
else -> null
}
diff --git a/packages/SystemUI/src/com/android/systemui/communal/data/repository/CommunalRepository.kt b/packages/SystemUI/src/com/android/systemui/communal/data/repository/CommunalRepository.kt
index f4a3bcb..201ce83 100644
--- a/packages/SystemUI/src/com/android/systemui/communal/data/repository/CommunalRepository.kt
+++ b/packages/SystemUI/src/com/android/systemui/communal/data/repository/CommunalRepository.kt
@@ -16,8 +16,9 @@
package com.android.systemui.communal.data.repository
-import com.android.systemui.communal.shared.model.CommunalSceneKey
-import com.android.systemui.communal.shared.model.ObservableCommunalTransitionState
+import com.android.compose.animation.scene.ObservableTransitionState
+import com.android.compose.animation.scene.SceneKey
+import com.android.systemui.communal.shared.model.CommunalScenes
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.dagger.qualifiers.Background
import com.android.systemui.scene.data.repository.SceneContainerRepository
@@ -40,20 +41,20 @@
* Target scene as requested by the underlying [SceneTransitionLayout] or through
* [setDesiredScene].
*/
- val desiredScene: StateFlow<CommunalSceneKey>
+ val desiredScene: StateFlow<SceneKey>
/** Exposes the transition state of the communal [SceneTransitionLayout]. */
- val transitionState: StateFlow<ObservableCommunalTransitionState>
+ val transitionState: StateFlow<ObservableTransitionState>
/** Updates the requested scene. */
- fun setDesiredScene(desiredScene: CommunalSceneKey)
+ fun setDesiredScene(desiredScene: SceneKey)
/**
* Updates the transition state of the hub [SceneTransitionLayout].
*
* Note that you must call is with `null` when the UI is done or risk a memory leak.
*/
- fun setTransitionState(transitionState: Flow<ObservableCommunalTransitionState>?)
+ fun setTransitionState(transitionState: Flow<ObservableTransitionState>?)
}
@OptIn(ExperimentalCoroutinesApi::class)
@@ -66,14 +67,12 @@
sceneContainerRepository: SceneContainerRepository,
) : CommunalRepository {
- private val _desiredScene: MutableStateFlow<CommunalSceneKey> =
- MutableStateFlow(CommunalSceneKey.DEFAULT)
- override val desiredScene: StateFlow<CommunalSceneKey> = _desiredScene.asStateFlow()
+ private val _desiredScene: MutableStateFlow<SceneKey> = MutableStateFlow(CommunalScenes.Default)
+ override val desiredScene: StateFlow<SceneKey> = _desiredScene.asStateFlow()
- private val defaultTransitionState =
- ObservableCommunalTransitionState.Idle(CommunalSceneKey.DEFAULT)
- private val _transitionState = MutableStateFlow<Flow<ObservableCommunalTransitionState>?>(null)
- override val transitionState: StateFlow<ObservableCommunalTransitionState> =
+ private val defaultTransitionState = ObservableTransitionState.Idle(CommunalScenes.Default)
+ private val _transitionState = MutableStateFlow<Flow<ObservableTransitionState>?>(null)
+ override val transitionState: StateFlow<ObservableTransitionState> =
_transitionState
.flatMapLatest { innerFlowOrNull -> innerFlowOrNull ?: flowOf(defaultTransitionState) }
.stateIn(
@@ -82,7 +81,7 @@
initialValue = defaultTransitionState,
)
- override fun setDesiredScene(desiredScene: CommunalSceneKey) {
+ override fun setDesiredScene(desiredScene: SceneKey) {
_desiredScene.value = desiredScene
}
@@ -91,7 +90,7 @@
*
* Note that you must call is with `null` when the UI is done or risk a memory leak.
*/
- override fun setTransitionState(transitionState: Flow<ObservableCommunalTransitionState>?) {
+ override fun setTransitionState(transitionState: Flow<ObservableTransitionState>?) {
_transitionState.value = transitionState
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/communal/domain/interactor/CommunalInteractor.kt b/packages/SystemUI/src/com/android/systemui/communal/domain/interactor/CommunalInteractor.kt
index 151e1ee..8142957 100644
--- a/packages/SystemUI/src/com/android/systemui/communal/domain/interactor/CommunalInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/communal/domain/interactor/CommunalInteractor.kt
@@ -19,6 +19,8 @@
import android.app.smartspace.SmartspaceTarget
import android.content.ComponentName
import android.os.UserHandle
+import com.android.compose.animation.scene.ObservableTransitionState
+import com.android.compose.animation.scene.SceneKey
import com.android.systemui.communal.data.repository.CommunalMediaRepository
import com.android.systemui.communal.data.repository.CommunalPrefsRepository
import com.android.systemui.communal.data.repository.CommunalRepository
@@ -29,9 +31,8 @@
import com.android.systemui.communal.shared.model.CommunalContentSize.FULL
import com.android.systemui.communal.shared.model.CommunalContentSize.HALF
import com.android.systemui.communal.shared.model.CommunalContentSize.THIRD
-import com.android.systemui.communal.shared.model.CommunalSceneKey
+import com.android.systemui.communal.shared.model.CommunalScenes
import com.android.systemui.communal.shared.model.CommunalWidgetContentModel
-import com.android.systemui.communal.shared.model.ObservableCommunalTransitionState
import com.android.systemui.communal.widgets.CommunalAppWidgetHost
import com.android.systemui.communal.widgets.EditWidgetsActivityStarter
import com.android.systemui.communal.widgets.WidgetConfigurator
@@ -46,7 +47,7 @@
import com.android.systemui.log.table.logDiffsForTable
import com.android.systemui.scene.domain.interactor.SceneInteractor
import com.android.systemui.scene.shared.flag.SceneContainerFlags
-import com.android.systemui.scene.shared.model.SceneKey
+import com.android.systemui.scene.shared.model.Scenes
import com.android.systemui.settings.UserTracker
import com.android.systemui.smartspace.data.repository.SmartspaceRepository
import com.android.systemui.util.kotlin.BooleanFlowOperators.and
@@ -131,34 +132,33 @@
* Target scene as requested by the underlying [SceneTransitionLayout] or through
* [onSceneChanged].
*
- * If [isCommunalAvailable] is false, will return [CommunalSceneKey.Blank]
+ * If [isCommunalAvailable] is false, will return [CommunalScenes.Blank]
*/
- val desiredScene: Flow<CommunalSceneKey> =
+ val desiredScene: Flow<SceneKey> =
communalRepository.desiredScene.combine(isCommunalAvailable) { scene, available ->
- if (available) scene else CommunalSceneKey.Blank
+ if (available) scene else CommunalScenes.Blank
}
/** Transition state of the hub mode. */
- val transitionState: StateFlow<ObservableCommunalTransitionState> =
- communalRepository.transitionState
+ val transitionState: StateFlow<ObservableTransitionState> = communalRepository.transitionState
/**
* Updates the transition state of the hub [SceneTransitionLayout].
*
* Note that you must call is with `null` when the UI is done or risk a memory leak.
*/
- fun setTransitionState(transitionState: Flow<ObservableCommunalTransitionState>?) {
+ fun setTransitionState(transitionState: Flow<ObservableTransitionState>?) {
communalRepository.setTransitionState(transitionState)
}
/** Returns a flow that tracks the progress of transitions to the given scene from 0-1. */
- fun transitionProgressToScene(targetScene: CommunalSceneKey) =
+ fun transitionProgressToScene(targetScene: SceneKey) =
transitionState
.flatMapLatest { state ->
when (state) {
- is ObservableCommunalTransitionState.Idle ->
+ is ObservableTransitionState.Idle ->
flowOf(CommunalTransitionProgress.Idle(state.scene))
- is ObservableCommunalTransitionState.Transition ->
+ is ObservableTransitionState.Transition ->
if (state.toScene == targetScene) {
state.progress.map {
CommunalTransitionProgress.Transition(
@@ -176,7 +176,7 @@
/**
* Flow that emits a boolean if the communal UI is the target scene, ie. the [desiredScene] is
- * the [CommunalSceneKey.Communal].
+ * the [CommunalScenes.Communal].
*
* This will be true as soon as the desired scene is set programmatically or at whatever point
* during a fling that SceneTransitionLayout determines that the end state will be the communal
@@ -191,9 +191,9 @@
flow { emit(sceneContainerFlags.isEnabled()) }
.flatMapLatest { sceneContainerEnabled ->
if (sceneContainerEnabled) {
- sceneInteractor.currentScene.map { it == SceneKey.Communal }
+ sceneInteractor.currentScene.map { it == Scenes.Communal }
} else {
- desiredScene.map { it == CommunalSceneKey.Communal }
+ desiredScene.map { it == CommunalScenes.Communal }
}
}
.distinctUntilChanged()
@@ -220,7 +220,7 @@
*/
val isIdleOnCommunal: Flow<Boolean> =
communalRepository.transitionState.map {
- it is ObservableCommunalTransitionState.Idle && it.scene == CommunalSceneKey.Communal
+ it is ObservableTransitionState.Idle && it.scene == CommunalScenes.Communal
}
/**
@@ -230,11 +230,11 @@
*/
val isCommunalVisible: Flow<Boolean> =
communalRepository.transitionState.map {
- !(it is ObservableCommunalTransitionState.Idle && it.scene == CommunalSceneKey.Blank)
+ !(it is ObservableTransitionState.Idle && it.scene == CommunalScenes.Blank)
}
/** Callback received whenever the [SceneTransitionLayout] finishes a scene transition. */
- fun onSceneChanged(newScene: CommunalSceneKey) {
+ fun onSceneChanged(newScene: SceneKey) {
communalRepository.setDesiredScene(newScene)
}
@@ -422,7 +422,7 @@
/** Simplified transition progress data class for tracking a single transition between scenes. */
sealed class CommunalTransitionProgress {
/** No transition/animation is currently running. */
- data class Idle(val scene: CommunalSceneKey) : CommunalTransitionProgress()
+ data class Idle(val scene: SceneKey) : CommunalTransitionProgress()
/** There is a transition animating to the expected scene. */
data class Transition(
diff --git a/packages/SystemUI/src/com/android/systemui/communal/log/CommunalLoggerStartable.kt b/packages/SystemUI/src/com/android/systemui/communal/log/CommunalLoggerStartable.kt
index 889023e..f2b4738 100644
--- a/packages/SystemUI/src/com/android/systemui/communal/log/CommunalLoggerStartable.kt
+++ b/packages/SystemUI/src/com/android/systemui/communal/log/CommunalLoggerStartable.kt
@@ -16,12 +16,12 @@
package com.android.systemui.communal.log
+import com.android.compose.animation.scene.ObservableTransitionState
import com.android.internal.logging.UiEventLogger
import com.android.systemui.CoreStartable
import com.android.systemui.communal.domain.interactor.CommunalInteractor
import com.android.systemui.communal.shared.log.CommunalUiEvent
-import com.android.systemui.communal.shared.model.CommunalSceneKey
-import com.android.systemui.communal.shared.model.ObservableCommunalTransitionState
+import com.android.systemui.communal.shared.model.CommunalScenes
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.dagger.qualifiers.Background
import com.android.systemui.util.kotlin.pairwise
@@ -87,25 +87,25 @@
}
/** Whether currently in communal scene. */
-private fun ObservableCommunalTransitionState.isOnCommunal(): Boolean {
- return this is ObservableCommunalTransitionState.Idle && scene == CommunalSceneKey.Communal
+private fun ObservableTransitionState.isOnCommunal(): Boolean {
+ return this is ObservableTransitionState.Idle && scene == CommunalScenes.Communal
}
/** Whether currently in a scene other than communal. */
-private fun ObservableCommunalTransitionState.isNotOnCommunal(): Boolean {
- return this is ObservableCommunalTransitionState.Idle && scene != CommunalSceneKey.Communal
+private fun ObservableTransitionState.isNotOnCommunal(): Boolean {
+ return this is ObservableTransitionState.Idle && scene != CommunalScenes.Communal
}
/** Whether currently transitioning from another scene to communal. */
-private fun ObservableCommunalTransitionState.isSwipingToCommunal(): Boolean {
- return this is ObservableCommunalTransitionState.Transition &&
- toScene == CommunalSceneKey.Communal &&
+private fun ObservableTransitionState.isSwipingToCommunal(): Boolean {
+ return this is ObservableTransitionState.Transition &&
+ toScene == CommunalScenes.Communal &&
isInitiatedByUserInput
}
/** Whether currently transitioning from communal to another scene. */
-private fun ObservableCommunalTransitionState.isSwipingFromCommunal(): Boolean {
- return this is ObservableCommunalTransitionState.Transition &&
- fromScene == CommunalSceneKey.Communal &&
+private fun ObservableTransitionState.isSwipingFromCommunal(): Boolean {
+ return this is ObservableTransitionState.Transition &&
+ fromScene == CommunalScenes.Communal &&
isInitiatedByUserInput
}
diff --git a/packages/SystemUI/src/com/android/systemui/communal/shared/model/CommunalSceneKey.kt b/packages/SystemUI/src/com/android/systemui/communal/shared/model/CommunalScenes.kt
similarity index 74%
rename from packages/SystemUI/src/com/android/systemui/communal/shared/model/CommunalSceneKey.kt
rename to packages/SystemUI/src/com/android/systemui/communal/shared/model/CommunalScenes.kt
index c68dd4f..d5a56c1 100644
--- a/packages/SystemUI/src/com/android/systemui/communal/shared/model/CommunalSceneKey.kt
+++ b/packages/SystemUI/src/com/android/systemui/communal/shared/model/CommunalScenes.kt
@@ -16,21 +16,15 @@
package com.android.systemui.communal.shared.model
+import com.android.compose.animation.scene.SceneKey
+
/** Definition of the possible scenes for the communal UI. */
-sealed class CommunalSceneKey(
- private val loggingName: String,
-) {
- /** The communal scene containing the hub UI. */
- object Communal : CommunalSceneKey("communal")
-
+object CommunalScenes {
/** The default scene, shows nothing and is only there to allow swiping to communal. */
- object Blank : CommunalSceneKey("blank")
+ @JvmField val Blank = SceneKey("blank")
- override fun toString(): String {
- return loggingName
- }
+ /** The communal scene containing the hub UI. */
+ @JvmField val Communal = SceneKey("communal")
- companion object {
- val DEFAULT = Blank
- }
+ @JvmField val Default = Blank
}
diff --git a/packages/SystemUI/src/com/android/systemui/communal/shared/model/ObservableCommunalTransitionState.kt b/packages/SystemUI/src/com/android/systemui/communal/shared/model/ObservableCommunalTransitionState.kt
deleted file mode 100644
index d834715..0000000
--- a/packages/SystemUI/src/com/android/systemui/communal/shared/model/ObservableCommunalTransitionState.kt
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (C) 2023 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.systemui.communal.shared.model
-
-import kotlinx.coroutines.flow.Flow
-
-/**
- * This is a fork of the `com.android.compose.animation.scene.ObservableTransitionState` class.
- *
- * TODO(b/315490861): remove this fork, once we can compile Compose into System UI.
- */
-sealed class ObservableCommunalTransitionState {
- /** No transition/animation is currently running. */
- data class Idle(val scene: CommunalSceneKey) : ObservableCommunalTransitionState()
-
- /** There is a transition animating between two scenes. */
- data class Transition(
- val fromScene: CommunalSceneKey,
- val toScene: CommunalSceneKey,
- val progress: Flow<Float>,
-
- /**
- * Whether the transition was originally triggered by user input rather than being
- * programmatic. If this value is initially true, it will remain true until the transition
- * fully completes, even if the user input that triggered the transition has ended. Any
- * sub-transitions launched by this one will inherit this value. For example, if the user
- * drags a pointer but does not exceed the threshold required to transition to another
- * scene, this value will remain true after the pointer is no longer touching the screen and
- * will be true in any transition created to animate back to the original position.
- */
- val isInitiatedByUserInput: Boolean,
-
- /**
- * Whether user input is currently driving the transition. For example, if a user is
- * dragging a pointer, this emits true. Once they lift their finger, this emits false while
- * the transition completes/settles.
- */
- val isUserInputOngoing: Flow<Boolean>,
- ) : ObservableCommunalTransitionState()
-}
diff --git a/packages/SystemUI/src/com/android/systemui/communal/ui/viewmodel/BaseCommunalViewModel.kt b/packages/SystemUI/src/com/android/systemui/communal/ui/viewmodel/BaseCommunalViewModel.kt
index 3ec9a26..35372cd 100644
--- a/packages/SystemUI/src/com/android/systemui/communal/ui/viewmodel/BaseCommunalViewModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/communal/ui/viewmodel/BaseCommunalViewModel.kt
@@ -18,10 +18,10 @@
import android.content.ComponentName
import android.os.UserHandle
+import com.android.compose.animation.scene.ObservableTransitionState
+import com.android.compose.animation.scene.SceneKey
import com.android.systemui.communal.domain.interactor.CommunalInteractor
import com.android.systemui.communal.domain.model.CommunalContentModel
-import com.android.systemui.communal.shared.model.CommunalSceneKey
-import com.android.systemui.communal.shared.model.ObservableCommunalTransitionState
import com.android.systemui.communal.widgets.WidgetConfigurator
import com.android.systemui.media.controls.ui.view.MediaHost
import kotlinx.coroutines.flow.Flow
@@ -34,7 +34,7 @@
private val communalInteractor: CommunalInteractor,
val mediaHost: MediaHost,
) {
- val currentScene: Flow<CommunalSceneKey> = communalInteractor.desiredScene
+ val currentScene: Flow<SceneKey> = communalInteractor.desiredScene
/** Whether widgets are currently being re-ordered. */
open val reorderingWidgets: StateFlow<Boolean> = MutableStateFlow(false)
@@ -45,7 +45,7 @@
val selectedKey: StateFlow<String?>
get() = _selectedKey
- fun onSceneChanged(scene: CommunalSceneKey) {
+ fun onSceneChanged(scene: SceneKey) {
communalInteractor.onSceneChanged(scene)
}
@@ -54,7 +54,7 @@
*
* Note that you must call is with `null` when the UI is done or risk a memory leak.
*/
- fun setTransitionState(transitionState: Flow<ObservableCommunalTransitionState>?) {
+ fun setTransitionState(transitionState: Flow<ObservableTransitionState>?) {
communalInteractor.setTransitionState(transitionState)
}
diff --git a/packages/SystemUI/src/com/android/systemui/communal/widgets/EditWidgetsActivity.kt b/packages/SystemUI/src/com/android/systemui/communal/widgets/EditWidgetsActivity.kt
index a5a390d..b6ad26b 100644
--- a/packages/SystemUI/src/com/android/systemui/communal/widgets/EditWidgetsActivity.kt
+++ b/packages/SystemUI/src/com/android/systemui/communal/widgets/EditWidgetsActivity.kt
@@ -25,14 +25,21 @@
import android.view.IWindowManager
import android.view.WindowInsets
import androidx.activity.ComponentActivity
+import androidx.activity.compose.setContent
import androidx.activity.result.ActivityResultLauncher
import androidx.activity.result.contract.ActivityResultContracts.StartActivityForResult
+import androidx.compose.foundation.background
+import androidx.compose.foundation.layout.Box
+import androidx.compose.foundation.layout.fillMaxSize
+import androidx.compose.ui.Modifier
+import com.android.compose.theme.LocalAndroidColorScheme
+import com.android.compose.theme.PlatformTheme
import com.android.internal.logging.UiEventLogger
import com.android.systemui.communal.shared.log.CommunalUiEvent
-import com.android.systemui.communal.shared.model.CommunalSceneKey
+import com.android.systemui.communal.shared.model.CommunalScenes
+import com.android.systemui.communal.ui.compose.CommunalHub
import com.android.systemui.communal.ui.viewmodel.CommunalEditModeViewModel
import com.android.systemui.communal.util.WidgetPickerIntentUtils.getWidgetExtraFromIntent
-import com.android.systemui.compose.ComposeFacade.setCommunalEditWidgetActivityContent
import com.android.systemui.log.LogBuffer
import com.android.systemui.log.core.Logger
import com.android.systemui.log.dagger.CommunalLog
@@ -110,56 +117,68 @@
val preselectedKey = intent.getStringExtra(EXTRA_PRESELECTED_KEY)
communalViewModel.setSelectedKey(preselectedKey)
- setCommunalEditWidgetActivityContent(
- activity = this,
- viewModel = communalViewModel,
- widgetConfigurator = widgetConfigurator,
- onOpenWidgetPicker = {
- val intent =
- Intent(Intent.ACTION_MAIN).also { it.addCategory(Intent.CATEGORY_HOME) }
- packageManager
- .resolveActivity(intent, PackageManager.MATCH_DEFAULT_ONLY)
- ?.activityInfo
- ?.packageName
- ?.let { packageName ->
- try {
- addWidgetActivityLauncher.launch(
- Intent(Intent.ACTION_PICK).apply {
- setPackage(packageName)
- putExtra(
- EXTRA_DESIRED_WIDGET_WIDTH,
- resources.getDimensionPixelSize(
- R.dimen.communal_widget_picker_desired_width
- )
- )
- putExtra(
- EXTRA_DESIRED_WIDGET_HEIGHT,
- resources.getDimensionPixelSize(
- R.dimen.communal_widget_picker_desired_height
- )
- )
- putExtra(
- AppWidgetManager.EXTRA_CATEGORY_FILTER,
- communalViewModel.getCommunalWidgetCategories
- )
- }
- )
- } catch (e: Exception) {
- Log.e(TAG, "Failed to launch widget picker activity", e)
- }
- }
- ?: run { Log.e(TAG, "Couldn't resolve launcher package name") }
- },
- onEditDone = {
- try {
- communalViewModel.onSceneChanged(CommunalSceneKey.Communal)
- checkNotNull(windowManagerService).lockNow(/* options */ null)
- finish()
- } catch (e: RemoteException) {
- Log.e(TAG, "Couldn't lock the device as WindowManager is dead.")
+ setContent {
+ PlatformTheme {
+ Box(
+ modifier =
+ Modifier.fillMaxSize()
+ .background(LocalAndroidColorScheme.current.outlineVariant),
+ ) {
+ CommunalHub(
+ viewModel = communalViewModel,
+ onOpenWidgetPicker = ::onOpenWidgetPicker,
+ widgetConfigurator = widgetConfigurator,
+ onEditDone = ::onEditDone,
+ )
}
}
- )
+ }
+ }
+
+ private fun onOpenWidgetPicker() {
+ val intent = Intent(Intent.ACTION_MAIN).also { it.addCategory(Intent.CATEGORY_HOME) }
+ packageManager
+ .resolveActivity(intent, PackageManager.MATCH_DEFAULT_ONLY)
+ ?.activityInfo
+ ?.packageName
+ ?.let { packageName ->
+ try {
+ addWidgetActivityLauncher.launch(
+ Intent(Intent.ACTION_PICK).apply {
+ setPackage(packageName)
+ putExtra(
+ EXTRA_DESIRED_WIDGET_WIDTH,
+ resources.getDimensionPixelSize(
+ R.dimen.communal_widget_picker_desired_width
+ )
+ )
+ putExtra(
+ EXTRA_DESIRED_WIDGET_HEIGHT,
+ resources.getDimensionPixelSize(
+ R.dimen.communal_widget_picker_desired_height
+ )
+ )
+ putExtra(
+ AppWidgetManager.EXTRA_CATEGORY_FILTER,
+ communalViewModel.getCommunalWidgetCategories
+ )
+ }
+ )
+ } catch (e: Exception) {
+ Log.e(TAG, "Failed to launch widget picker activity", e)
+ }
+ }
+ ?: run { Log.e(TAG, "Couldn't resolve launcher package name") }
+ }
+
+ private fun onEditDone() {
+ try {
+ communalViewModel.onSceneChanged(CommunalScenes.Communal)
+ checkNotNull(windowManagerService).lockNow(/* options */ null)
+ finish()
+ } catch (e: RemoteException) {
+ Log.e(TAG, "Couldn't lock the device as WindowManager is dead.")
+ }
}
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
diff --git a/packages/SystemUI/src/com/android/systemui/compose/BaseComposeFacade.kt b/packages/SystemUI/src/com/android/systemui/compose/BaseComposeFacade.kt
deleted file mode 100644
index a0aaa90..0000000
--- a/packages/SystemUI/src/com/android/systemui/compose/BaseComposeFacade.kt
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- * Copyright (C) 2022 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.systemui.compose
-
-import android.content.Context
-import android.view.View
-import android.view.WindowInsets
-import androidx.activity.ComponentActivity
-import androidx.lifecycle.LifecycleOwner
-import com.android.systemui.bouncer.ui.BouncerDialogFactory
-import com.android.systemui.bouncer.ui.viewmodel.BouncerViewModel
-import com.android.systemui.communal.ui.viewmodel.BaseCommunalViewModel
-import com.android.systemui.communal.ui.viewmodel.CommunalViewModel
-import com.android.systemui.communal.widgets.WidgetConfigurator
-import com.android.systemui.keyboard.stickykeys.ui.viewmodel.StickyKeysIndicatorViewModel
-import com.android.systemui.keyguard.shared.model.LockscreenSceneBlueprint
-import com.android.systemui.keyguard.ui.viewmodel.LockscreenContentViewModel
-import com.android.systemui.people.ui.viewmodel.PeopleViewModel
-import com.android.systemui.qs.footer.ui.viewmodel.FooterActionsViewModel
-import com.android.systemui.scene.shared.model.Scene
-import com.android.systemui.scene.shared.model.SceneDataSourceDelegator
-import com.android.systemui.scene.shared.model.SceneKey
-import com.android.systemui.scene.ui.viewmodel.SceneContainerViewModel
-import com.android.systemui.volume.panel.ui.viewmodel.VolumePanelViewModel
-import kotlinx.coroutines.CoroutineScope
-import kotlinx.coroutines.flow.StateFlow
-
-/**
- * A facade to interact with Compose, when it is available.
- *
- * You should access this facade by calling the static methods on
- * [com.android.systemui.compose.ComposeFacade] directly.
- */
-interface BaseComposeFacade {
- /**
- * Whether Compose is currently available. This function should be checked before calling any
- * other functions on this facade.
- *
- * This value will never change at runtime.
- */
- fun isComposeAvailable(): Boolean
-
- /**
- * Return the [ComposeInitializer] to make Compose usable in windows outside normal activities.
- */
- fun composeInitializer(): ComposeInitializer
-
- /** Bind the content of [activity] to [viewModel]. */
- fun setPeopleSpaceActivityContent(
- activity: ComponentActivity,
- viewModel: PeopleViewModel,
- onResult: (PeopleViewModel.Result) -> Unit,
- )
-
- /** Bind the content of [activity] to [viewModel]. */
- fun setCommunalEditWidgetActivityContent(
- activity: ComponentActivity,
- viewModel: BaseCommunalViewModel,
- widgetConfigurator: WidgetConfigurator,
- onOpenWidgetPicker: () -> Unit,
- onEditDone: () -> Unit,
- )
-
- fun setVolumePanelActivityContent(
- activity: ComponentActivity,
- viewModel: VolumePanelViewModel,
- onDismiss: () -> Unit,
- )
-
- /** Create a [View] to represent [viewModel] on screen. */
- fun createFooterActionsView(
- context: Context,
- viewModel: FooterActionsViewModel,
- qsVisibilityLifecycleOwner: LifecycleOwner,
- ): View
-
- /** Create a [View] to represent [viewModel] on screen. */
- fun createSceneContainerView(
- scope: CoroutineScope,
- context: Context,
- viewModel: SceneContainerViewModel,
- windowInsets: StateFlow<WindowInsets?>,
- sceneByKey: Map<SceneKey, Scene>,
- dataSourceDelegator: SceneDataSourceDelegator,
- ): View
-
- /** Creates sticky key indicator content presenting provided [viewModel] */
- fun createStickyKeysIndicatorContent(
- context: Context,
- viewModel: StickyKeysIndicatorViewModel
- ): View
-
- /** Create a [View] to represent [viewModel] on screen. */
- fun createCommunalView(
- context: Context,
- viewModel: BaseCommunalViewModel,
- ): View
-
- /** Create a [View] to represent the [BouncerViewModel]. */
- fun createBouncer(
- context: Context,
- viewModel: BouncerViewModel,
- dialogFactory: BouncerDialogFactory,
- ): View
-
- /** Creates a container that hosts the communal UI and handles gesture transitions. */
- fun createCommunalContainer(context: Context, viewModel: CommunalViewModel): View
-
- /** Creates a [View] that represents the Lockscreen. */
- fun createLockscreen(
- context: Context,
- viewModel: LockscreenContentViewModel,
- blueprints: Set<@JvmSuppressWildcards LockscreenSceneBlueprint>,
- ): View
-}
diff --git a/packages/SystemUI/src/com/android/systemui/compose/ComposeInitializer.kt b/packages/SystemUI/src/com/android/systemui/compose/ComposeInitializer.kt
index 90dc3a0..813e0e0 100644
--- a/packages/SystemUI/src/com/android/systemui/compose/ComposeInitializer.kt
+++ b/packages/SystemUI/src/com/android/systemui/compose/ComposeInitializer.kt
@@ -17,6 +17,13 @@
package com.android.systemui.compose
import android.view.View
+import androidx.lifecycle.Lifecycle
+import androidx.lifecycle.findViewTreeLifecycleOwner
+import androidx.lifecycle.setViewTreeLifecycleOwner
+import androidx.savedstate.SavedStateRegistryController
+import androidx.savedstate.SavedStateRegistryOwner
+import com.android.compose.animation.ViewTreeSavedStateRegistryOwner
+import com.android.systemui.lifecycle.ViewLifecycleOwner
/**
* An initializer to use Compose outside of an Activity, e.g. inside a window added directly using
@@ -39,10 +46,55 @@
* }
* ```
*/
-interface ComposeInitializer {
+object ComposeInitializer {
/** Function to be called on your window root view's [View.onAttachedToWindow] function. */
- fun onAttachedToWindow(root: View)
+ fun onAttachedToWindow(root: View) {
+ if (root.findViewTreeLifecycleOwner() != null) {
+ error("root $root already has a LifecycleOwner")
+ }
+
+ val parent = root.parent
+ if (parent is View && parent.id != android.R.id.content) {
+ error(
+ "ComposeInitializer.onAttachedToWindow(View) must be called on the content child." +
+ "Outside of activities and dialogs, this is usually the top-most View of a " +
+ "window."
+ )
+ }
+
+ // The lifecycle owner, which is STARTED when [root] is visible and RESUMED when [root] is
+ // both visible and focused.
+ val lifecycleOwner = ViewLifecycleOwner(root)
+
+ // We create a trivial implementation of [SavedStateRegistryOwner] that does not do any save
+ // or restore because SystemUI process is always running and top-level windows using this
+ // initializer are created once, when the process is started.
+ val savedStateRegistryOwner =
+ object : SavedStateRegistryOwner {
+ private val savedStateRegistryController =
+ SavedStateRegistryController.create(this).apply { performRestore(null) }
+
+ override val savedStateRegistry = savedStateRegistryController.savedStateRegistry
+
+ override val lifecycle: Lifecycle
+ get() = lifecycleOwner.lifecycle
+ }
+
+ // We must call [ViewLifecycleOwner.onCreate] after creating the [SavedStateRegistryOwner]
+ // because `onCreate` might move the lifecycle state to STARTED which will make
+ // [SavedStateRegistryController.performRestore] throw.
+ lifecycleOwner.onCreate()
+
+ // Set the owners on the root. They will be reused by any ComposeView inside the root
+ // hierarchy.
+ root.setViewTreeLifecycleOwner(lifecycleOwner)
+ ViewTreeSavedStateRegistryOwner.set(root, savedStateRegistryOwner)
+ }
/** Function to be called on your window root view's [View.onDetachedFromWindow] function. */
- fun onDetachedFromWindow(root: View)
+ fun onDetachedFromWindow(root: View) {
+ (root.findViewTreeLifecycleOwner() as ViewLifecycleOwner).onDestroy()
+ root.setViewTreeLifecycleOwner(null)
+ ViewTreeSavedStateRegistryOwner.set(root, null)
+ }
}
diff --git a/packages/SystemUI/src/com/android/systemui/deviceentry/domain/interactor/DeviceEntryInteractor.kt b/packages/SystemUI/src/com/android/systemui/deviceentry/domain/interactor/DeviceEntryInteractor.kt
index 21fd87c..029a4f3 100644
--- a/packages/SystemUI/src/com/android/systemui/deviceentry/domain/interactor/DeviceEntryInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/deviceentry/domain/interactor/DeviceEntryInteractor.kt
@@ -25,7 +25,7 @@
import com.android.systemui.keyguard.data.repository.TrustRepository
import com.android.systemui.scene.domain.interactor.SceneInteractor
import com.android.systemui.scene.shared.flag.SceneContainerFlags
-import com.android.systemui.scene.shared.model.SceneKey
+import com.android.systemui.scene.shared.model.Scenes
import javax.inject.Inject
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.ExperimentalCoroutinesApi
@@ -81,9 +81,9 @@
val isDeviceEntered: StateFlow<Boolean> =
sceneInteractor.currentScene
.filter { currentScene ->
- currentScene == SceneKey.Gone || currentScene == SceneKey.Lockscreen
+ currentScene == Scenes.Gone || currentScene == Scenes.Lockscreen
}
- .map { it == SceneKey.Gone }
+ .map { it == Scenes.Gone }
.stateIn(
scope = applicationScope,
started = SharingStarted.Eagerly,
@@ -148,12 +148,12 @@
applicationScope.launch {
if (isAuthenticationRequired()) {
sceneInteractor.changeScene(
- toScene = SceneKey.Bouncer,
+ toScene = Scenes.Bouncer,
loggingReason = "request to unlock device while authentication required",
)
} else {
sceneInteractor.changeScene(
- toScene = SceneKey.Gone,
+ toScene = Scenes.Gone,
loggingReason = "request to unlock device while authentication isn't required",
)
}
diff --git a/packages/SystemUI/src/com/android/systemui/keyboard/stickykeys/ui/StickyKeyDialogFactory.kt b/packages/SystemUI/src/com/android/systemui/keyboard/stickykeys/ui/StickyKeyDialogFactory.kt
index 3ed58a7..3501f51 100644
--- a/packages/SystemUI/src/com/android/systemui/keyboard/stickykeys/ui/StickyKeyDialogFactory.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyboard/stickykeys/ui/StickyKeyDialogFactory.kt
@@ -20,15 +20,16 @@
import android.content.Context
import android.view.Gravity
import android.view.Window
+import android.view.WindowInsets
import android.view.WindowManager
import android.view.WindowManager.LayoutParams.FLAG_DIM_BEHIND
import android.view.WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE
import android.view.WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE
import android.view.WindowManager.LayoutParams.TYPE_STATUS_BAR_SUB_PANEL
import androidx.activity.ComponentDialog
-import com.android.systemui.compose.ComposeFacade
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.dagger.qualifiers.Application
+import com.android.systemui.keyboard.stickykeys.ui.view.createStickyKeyIndicatorView
import com.android.systemui.keyboard.stickykeys.ui.viewmodel.StickyKeysIndicatorViewModel
import com.android.systemui.res.R
import javax.inject.Inject
@@ -48,7 +49,7 @@
return ComponentDialog(context, R.style.Theme_SystemUI_Dialog).apply {
// because we're requesting window feature it must be called before setting content
window?.setStickyKeyWindowAttributes()
- setContentView(ComposeFacade.createStickyKeysIndicatorContent(context, viewModel))
+ setContentView(createStickyKeyIndicatorView(context, viewModel))
}
}
@@ -61,6 +62,9 @@
attributes =
WindowManager.LayoutParams().apply {
copyFrom(attributes)
+ // needed because we're above system bars windows, see [TYPE_STATUS_BAR_SUB_PANEL]
+ receiveInsetsIgnoringZOrder = true
+ fitInsetsTypes = WindowInsets.Type.systemBars()
title = "StickyKeysIndicator"
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/keyboard/stickykeys/ui/StickyKeysIndicatorCoordinator.kt b/packages/SystemUI/src/com/android/systemui/keyboard/stickykeys/ui/StickyKeysIndicatorCoordinator.kt
index 842fd04..78c4e77 100644
--- a/packages/SystemUI/src/com/android/systemui/keyboard/stickykeys/ui/StickyKeysIndicatorCoordinator.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyboard/stickykeys/ui/StickyKeysIndicatorCoordinator.kt
@@ -17,15 +17,13 @@
package com.android.systemui.keyboard.stickykeys.ui
import android.app.Dialog
-import android.util.Log
-import com.android.systemui.compose.ComposeFacade
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.dagger.qualifiers.Application
import com.android.systemui.keyboard.stickykeys.StickyKeysLogger
import com.android.systemui.keyboard.stickykeys.ui.viewmodel.StickyKeysIndicatorViewModel
+import javax.inject.Inject
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.launch
-import javax.inject.Inject
@SysUISingleton
class StickyKeysIndicatorCoordinator
@@ -40,11 +38,6 @@
private var dialog: Dialog? = null
fun startListening() {
- // this check needs to be moved to PhysicalKeyboardCoreStartable
- if (!ComposeFacade.isComposeAvailable()) {
- Log.e("StickyKeysIndicatorCoordinator", "Compose is required for this UI")
- return
- }
applicationScope.launch {
viewModel.indicatorContent.collect { stickyKeys ->
stickyKeysLogger.logNewUiState(stickyKeys)
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewConfigurator.kt b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewConfigurator.kt
index 301942f..106fdf1 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewConfigurator.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewConfigurator.kt
@@ -20,6 +20,9 @@
import android.content.Context
import android.view.LayoutInflater
import android.view.View
+import androidx.compose.foundation.layout.fillMaxSize
+import androidx.compose.ui.Modifier
+import androidx.compose.ui.platform.ComposeView
import androidx.constraintlayout.widget.ConstraintSet
import androidx.constraintlayout.widget.ConstraintSet.BOTTOM
import androidx.constraintlayout.widget.ConstraintSet.END
@@ -35,7 +38,6 @@
import com.android.systemui.CoreStartable
import com.android.systemui.Flags.keyguardBottomAreaRefactor
import com.android.systemui.common.ui.ConfigurationState
-import com.android.systemui.compose.ComposeFacade
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.deviceentry.domain.interactor.DeviceEntryHapticsInteractor
import com.android.systemui.deviceentry.shared.DeviceEntryUdfpsRefactor
@@ -45,6 +47,8 @@
import com.android.systemui.keyguard.ui.binder.KeyguardBlueprintViewBinder
import com.android.systemui.keyguard.ui.binder.KeyguardIndicationAreaBinder
import com.android.systemui.keyguard.ui.binder.KeyguardRootViewBinder
+import com.android.systemui.keyguard.ui.composable.LockscreenContent
+import com.android.systemui.keyguard.ui.composable.blueprint.ComposableLockscreenSceneBlueprint
import com.android.systemui.keyguard.ui.view.KeyguardIndicationArea
import com.android.systemui.keyguard.ui.view.KeyguardRootView
import com.android.systemui.keyguard.ui.view.layout.KeyguardBlueprintCommandListener
@@ -132,7 +136,7 @@
if (!SceneContainerFlag.isEnabled) {
if (ComposeLockscreen.isEnabled) {
val composeView =
- ComposeFacade.createLockscreen(
+ createLockscreen(
context = context,
viewModel = lockscreenContentViewModel,
blueprints = lockscreenSceneBlueprintsLazy.get(),
@@ -207,6 +211,21 @@
)
}
+ private fun createLockscreen(
+ context: Context,
+ viewModel: LockscreenContentViewModel,
+ blueprints: Set<@JvmSuppressWildcards LockscreenSceneBlueprint>,
+ ): View {
+ val sceneBlueprints =
+ blueprints.mapNotNull { it as? ComposableLockscreenSceneBlueprint }.toSet()
+ return ComposeView(context).apply {
+ setContent {
+ LockscreenContent(viewModel = viewModel, blueprints = sceneBlueprints)
+ .Content(modifier = Modifier.fillMaxSize())
+ }
+ }
+ }
+
/**
* Temporary, to allow NotificationPanelViewController to use the same instance while code is
* migrated: b/288242803
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/FromAodTransitionInteractor.kt b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/FromAodTransitionInteractor.kt
index e0b5c0e..617982f 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/FromAodTransitionInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/FromAodTransitionInteractor.kt
@@ -27,12 +27,14 @@
import com.android.systemui.keyguard.shared.model.DozeStateModel
import com.android.systemui.keyguard.shared.model.KeyguardState
import com.android.systemui.keyguard.shared.model.TransitionModeOnCanceled
+import com.android.systemui.power.domain.interactor.PowerInteractor
import com.android.systemui.util.kotlin.Utils.Companion.sample
import com.android.systemui.util.kotlin.sample
import javax.inject.Inject
import kotlin.time.Duration.Companion.milliseconds
import kotlinx.coroutines.CoroutineDispatcher
import kotlinx.coroutines.CoroutineScope
+import kotlinx.coroutines.flow.debounce
import kotlinx.coroutines.launch
@SysUISingleton
@@ -45,6 +47,7 @@
@Background bgDispatcher: CoroutineDispatcher,
@Main mainDispatcher: CoroutineDispatcher,
private val keyguardInteractor: KeyguardInteractor,
+ private val powerInteractor: PowerInteractor,
) :
TransitionInteractor(
fromState = KeyguardState.AOD,
@@ -68,15 +71,16 @@
*/
private fun listenForAodToOccluded() {
scope.launch {
- keyguardInteractor.isKeyguardOccluded.sample(startedKeyguardState, ::Pair).collect {
- (isOccluded, startedKeyguardState) ->
- if (isOccluded && startedKeyguardState == KeyguardState.AOD) {
- startTransitionTo(
- toState = KeyguardState.OCCLUDED,
- modeOnCanceled = TransitionModeOnCanceled.RESET
- )
+ keyguardInteractor.isKeyguardOccluded
+ .sample(startedKeyguardTransitionStep, ::Pair)
+ .collect { (isOccluded, lastStartedStep) ->
+ if (isOccluded && lastStartedStep.to == KeyguardState.AOD) {
+ startTransitionTo(
+ toState = KeyguardState.OCCLUDED,
+ modeOnCanceled = TransitionModeOnCanceled.RESET
+ )
+ }
}
- }
}
}
@@ -85,15 +89,18 @@
keyguardInteractor
.dozeTransitionTo(DozeStateModel.FINISH)
.sample(
+ keyguardInteractor.isKeyguardShowing,
startedKeyguardTransitionStep,
keyguardInteractor.isKeyguardOccluded,
keyguardInteractor.biometricUnlockState,
)
- .collect { (_, lastStartedStep, occluded, biometricUnlockState) ->
+ .collect { (_, isKeyguardShowing, lastStartedStep, occluded, biometricUnlockState)
+ ->
if (
lastStartedStep.to == KeyguardState.AOD &&
!occluded &&
- !isWakeAndUnlock(biometricUnlockState)
+ !isWakeAndUnlock(biometricUnlockState) &&
+ isKeyguardShowing
) {
val modeOnCanceled =
if (lastStartedStep.from == KeyguardState.LOCKSCREEN) {
@@ -134,13 +141,31 @@
}
scope.launch {
- keyguardInteractor.biometricUnlockState.sample(finishedKeyguardState, ::Pair).collect {
- (biometricUnlockState, keyguardState) ->
- KeyguardWmStateRefactor.assertInLegacyMode()
- if (keyguardState == KeyguardState.AOD && isWakeAndUnlock(biometricUnlockState)) {
- startTransitionTo(KeyguardState.GONE)
+ powerInteractor.isAwake
+ .debounce(50L)
+ .sample(
+ keyguardInteractor.biometricUnlockState,
+ startedKeyguardTransitionStep,
+ keyguardInteractor.isKeyguardShowing,
+ keyguardInteractor.isKeyguardDismissible,
+ )
+ .collect {
+ (
+ isAwake,
+ biometricUnlockState,
+ lastStartedTransitionStep,
+ isKeyguardShowing,
+ isKeyguardDismissible) ->
+ KeyguardWmStateRefactor.assertInLegacyMode()
+ if (
+ isAwake &&
+ lastStartedTransitionStep.to == KeyguardState.AOD &&
+ (isWakeAndUnlock(biometricUnlockState) ||
+ (!isKeyguardShowing && isKeyguardDismissible))
+ ) {
+ startTransitionTo(KeyguardState.GONE)
+ }
}
- }
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/FromDozingTransitionInteractor.kt b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/FromDozingTransitionInteractor.kt
index 54d5908..baa865d 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/FromDozingTransitionInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/FromDozingTransitionInteractor.kt
@@ -26,13 +26,12 @@
import com.android.systemui.keyguard.shared.model.BiometricUnlockModel.Companion.isWakeAndUnlock
import com.android.systemui.keyguard.shared.model.KeyguardState
import com.android.systemui.power.domain.interactor.PowerInteractor
-import com.android.systemui.util.kotlin.Utils.Companion.toQuad
-import com.android.systemui.util.kotlin.sample
+import com.android.systemui.util.kotlin.Utils.Companion.sample
import javax.inject.Inject
import kotlin.time.Duration.Companion.milliseconds
import kotlinx.coroutines.CoroutineDispatcher
import kotlinx.coroutines.CoroutineScope
-import kotlinx.coroutines.flow.combine
+import kotlinx.coroutines.flow.debounce
import kotlinx.coroutines.launch
@SysUISingleton
@@ -56,50 +55,47 @@
) {
override fun start() {
- listenForDozingToLockscreenHubOrOccluded()
- listenForDozingToGone()
+ listenForDozingToAny()
listenForTransitionToCamera(scope, keyguardInteractor)
}
- private fun listenForDozingToLockscreenHubOrOccluded() {
+ private fun listenForDozingToAny() {
scope.launch {
powerInteractor.isAwake
+ .debounce(50L)
.sample(
- combine(
- startedKeyguardTransitionStep,
- keyguardInteractor.isKeyguardOccluded,
- communalInteractor.isIdleOnCommunal,
- ::Triple
- ),
- ::toQuad
+ keyguardInteractor.biometricUnlockState,
+ startedKeyguardTransitionStep,
+ keyguardInteractor.isKeyguardOccluded,
+ communalInteractor.isIdleOnCommunal,
+ keyguardInteractor.isKeyguardShowing,
+ keyguardInteractor.isKeyguardDismissible,
)
- .collect { (isAwake, lastStartedTransition, occluded, isIdleOnCommunal) ->
- if (isAwake && lastStartedTransition.to == KeyguardState.DOZING) {
- startTransitionTo(
- if (occluded) {
- KeyguardState.OCCLUDED
- } else if (isIdleOnCommunal) {
- KeyguardState.GLANCEABLE_HUB
- } else {
- KeyguardState.LOCKSCREEN
- }
- )
+ .collect {
+ (
+ isAwake,
+ biometricUnlockState,
+ lastStartedTransition,
+ occluded,
+ isIdleOnCommunal,
+ isKeyguardShowing,
+ isKeyguardDismissible) ->
+ if (!(isAwake && lastStartedTransition.to == KeyguardState.DOZING)) {
+ return@collect
}
- }
- }
- }
-
- private fun listenForDozingToGone() {
- scope.launch {
- keyguardInteractor.biometricUnlockState
- .sample(startedKeyguardTransitionStep, ::Pair)
- .collect { (biometricUnlockState, lastStartedTransition) ->
- if (
- lastStartedTransition.to == KeyguardState.DOZING &&
- isWakeAndUnlock(biometricUnlockState)
- ) {
- startTransitionTo(KeyguardState.GONE)
- }
+ startTransitionTo(
+ if (isWakeAndUnlock(biometricUnlockState)) {
+ KeyguardState.GONE
+ } else if (isKeyguardDismissible && !isKeyguardShowing) {
+ KeyguardState.GONE
+ } else if (occluded) {
+ KeyguardState.OCCLUDED
+ } else if (isIdleOnCommunal) {
+ KeyguardState.GLANCEABLE_HUB
+ } else {
+ KeyguardState.LOCKSCREEN
+ }
+ )
}
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/GlanceableHubTransitions.kt b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/GlanceableHubTransitions.kt
index 6cb1eb4..7443010 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/GlanceableHubTransitions.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/GlanceableHubTransitions.kt
@@ -20,7 +20,7 @@
import com.android.app.animation.Interpolators
import com.android.systemui.communal.domain.interactor.CommunalInteractor
import com.android.systemui.communal.domain.interactor.CommunalTransitionProgress
-import com.android.systemui.communal.shared.model.CommunalSceneKey
+import com.android.systemui.communal.shared.model.CommunalScenes
import com.android.systemui.dagger.qualifiers.Background
import com.android.systemui.keyguard.data.repository.KeyguardTransitionRepository
import com.android.systemui.keyguard.shared.model.KeyguardState
@@ -55,9 +55,9 @@
) {
val toScene =
if (fromState == KeyguardState.GLANCEABLE_HUB) {
- CommunalSceneKey.Blank
+ CommunalScenes.Blank
} else {
- CommunalSceneKey.Communal
+ CommunalScenes.Communal
}
var transitionId: UUID? = null
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardInteractor.kt b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardInteractor.kt
index 8b06b85..fbf1e22 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardInteractor.kt
@@ -42,7 +42,7 @@
import com.android.systemui.res.R
import com.android.systemui.scene.domain.interactor.SceneInteractor
import com.android.systemui.scene.shared.flag.SceneContainerFlags
-import com.android.systemui.scene.shared.model.SceneKey
+import com.android.systemui.scene.shared.model.Scenes
import com.android.systemui.shade.data.repository.ShadeRepository
import com.android.systemui.statusbar.CommandQueue
import com.android.systemui.util.kotlin.sample
@@ -288,7 +288,7 @@
sceneInteractorProvider
.get()
.transitioningTo
- .map { it == SceneKey.Lockscreen }
+ .map { it == Scenes.Lockscreen }
.distinctUntilChanged()
.flatMapLatest { isTransitioningToLockscreenScene ->
if (isTransitioningToLockscreenScene) {
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardTransitionAuditLogger.kt b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardTransitionAuditLogger.kt
index a03fa38..d81f1f1 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardTransitionAuditLogger.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardTransitionAuditLogger.kt
@@ -21,6 +21,8 @@
import com.android.systemui.dagger.qualifiers.Application
import com.android.systemui.log.core.LogLevel.VERBOSE
import com.android.systemui.power.domain.interactor.PowerInteractor
+import com.android.systemui.shade.domain.interactor.ShadeInteractor
+import com.android.systemui.statusbar.notification.stack.ui.viewmodel.SharedNotificationContainerViewModel
import javax.inject.Inject
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.launch
@@ -37,6 +39,8 @@
private val keyguardInteractor: KeyguardInteractor,
private val logger: KeyguardLogger,
private val powerInteractor: PowerInteractor,
+ private val sharedNotificationContainerViewModel: SharedNotificationContainerViewModel,
+ private val shadeInteractor: ShadeInteractor,
) {
fun start() {
@@ -47,6 +51,30 @@
}
scope.launch {
+ sharedNotificationContainerViewModel
+ .getMaxNotifications { height, useExtraShelfSpace -> height.toInt() }
+ .collect { logger.log(TAG, VERBOSE, "Notif: max height in px", it) }
+ }
+
+ scope.launch {
+ sharedNotificationContainerViewModel.isOnLockscreen.collect {
+ logger.log(TAG, VERBOSE, "Notif: isOnLockscreen", it)
+ }
+ }
+
+ scope.launch {
+ shadeInteractor.isUserInteracting.collect {
+ logger.log(TAG, VERBOSE, "Shade: isUserInteracting", it)
+ }
+ }
+
+ scope.launch {
+ sharedNotificationContainerViewModel.isOnLockscreenWithoutShade.collect {
+ logger.log(TAG, VERBOSE, "Notif: isOnLockscreenWithoutShade", it)
+ }
+ }
+
+ scope.launch {
keyguardInteractor.primaryBouncerShowing.collect {
logger.log(TAG, VERBOSE, "Primary bouncer showing", it)
}
@@ -75,6 +103,18 @@
}
scope.launch {
+ keyguardInteractor.isKeyguardDismissible.collect {
+ logger.log(TAG, VERBOSE, "isDismissible", it)
+ }
+ }
+
+ scope.launch {
+ keyguardInteractor.isKeyguardShowing.collect {
+ logger.log(TAG, VERBOSE, "isShowing", it)
+ }
+ }
+
+ scope.launch {
keyguardInteractor.dozeTransitionModel.collect {
logger.log(TAG, VERBOSE, "Doze transition", it)
}
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/shared/ComposeLockscreen.kt b/packages/SystemUI/src/com/android/systemui/keyguard/shared/ComposeLockscreen.kt
index 7f0b483..601fbfa 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/shared/ComposeLockscreen.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/shared/ComposeLockscreen.kt
@@ -17,7 +17,6 @@
package com.android.systemui.keyguard.shared
import com.android.systemui.Flags
-import com.android.systemui.compose.ComposeFacade
import com.android.systemui.flags.FlagToken
import com.android.systemui.flags.RefactorFlagUtils
@@ -34,7 +33,7 @@
/** Is the refactor enabled */
@JvmStatic
inline val isEnabled
- get() = Flags.composeLockscreen() && ComposeFacade.isComposeAvailable()
+ get() = Flags.composeLockscreen()
/**
* Called to ensure code is only run when the flag is enabled. This protects users from the
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/AodToGoneTransitionViewModel.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/AodToGoneTransitionViewModel.kt
index b92a9a0..a9eec18 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/AodToGoneTransitionViewModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/AodToGoneTransitionViewModel.kt
@@ -16,13 +16,16 @@
package com.android.systemui.keyguard.ui.viewmodel
+import android.util.MathUtils
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.keyguard.domain.interactor.FromAodTransitionInteractor
import com.android.systemui.keyguard.shared.model.KeyguardState
import com.android.systemui.keyguard.ui.KeyguardTransitionAnimationFlow
import com.android.systemui.keyguard.ui.transitions.DeviceEntryIconTransition
import javax.inject.Inject
+import kotlin.time.Duration.Companion.milliseconds
import kotlinx.coroutines.ExperimentalCoroutinesApi
+import kotlinx.coroutines.flow.Flow
/** Breaks down AOD->GONE transition into discrete steps for corresponding views to consume. */
@ExperimentalCoroutinesApi
@@ -40,5 +43,15 @@
to = KeyguardState.GONE,
)
+ fun lockscreenAlpha(viewState: ViewStateAccessor): Flow<Float> {
+ var startAlpha = 1f
+ return transitionAnimation.sharedFlow(
+ duration = 200.milliseconds,
+ onStart = { startAlpha = viewState.alpha() },
+ onStep = { MathUtils.lerp(startAlpha, 0f, it) },
+ onFinish = { 0f },
+ )
+ }
+
override val deviceEntryParentViewAlpha = transitionAnimation.immediatelyTransitionTo(0f)
}
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/DozingToGoneTransitionViewModel.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/DozingToGoneTransitionViewModel.kt
index fca1604..8851a51 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/DozingToGoneTransitionViewModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/DozingToGoneTransitionViewModel.kt
@@ -16,12 +16,14 @@
package com.android.systemui.keyguard.ui.viewmodel
+import android.util.MathUtils
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.keyguard.domain.interactor.FromDozingTransitionInteractor.Companion.TO_GONE_DURATION
import com.android.systemui.keyguard.shared.model.KeyguardState
import com.android.systemui.keyguard.ui.KeyguardTransitionAnimationFlow
import com.android.systemui.keyguard.ui.transitions.DeviceEntryIconTransition
import javax.inject.Inject
+import kotlin.time.Duration.Companion.milliseconds
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.flow.Flow
@@ -41,6 +43,16 @@
to = KeyguardState.GONE,
)
+ fun lockscreenAlpha(viewState: ViewStateAccessor): Flow<Float> {
+ var startAlpha = 1f
+ return transitionAnimation.sharedFlow(
+ duration = 200.milliseconds,
+ onStart = { startAlpha = viewState.alpha() },
+ onStep = { MathUtils.lerp(startAlpha, 0f, it) },
+ onFinish = { 0f },
+ )
+ }
+
override val deviceEntryParentViewAlpha: Flow<Float> =
transitionAnimation.immediatelyTransitionTo(0f)
}
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardRootViewModel.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardRootViewModel.kt
index bdcaf09..38d5e0f 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardRootViewModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardRootViewModel.kt
@@ -31,6 +31,7 @@
import com.android.systemui.keyguard.shared.model.KeyguardState.AOD
import com.android.systemui.keyguard.shared.model.KeyguardState.GONE
import com.android.systemui.keyguard.shared.model.KeyguardState.LOCKSCREEN
+import com.android.systemui.keyguard.shared.model.KeyguardState.OCCLUDED
import com.android.systemui.keyguard.shared.model.TransitionState.RUNNING
import com.android.systemui.keyguard.shared.model.TransitionState.STARTED
import com.android.systemui.keyguard.ui.StateToValue
@@ -70,7 +71,9 @@
private val notificationsKeyguardInteractor: NotificationsKeyguardInteractor,
private val alternateBouncerToGoneTransitionViewModel:
AlternateBouncerToGoneTransitionViewModel,
+ private val aodToGoneTransitionViewModel: AodToGoneTransitionViewModel,
private val aodToLockscreenTransitionViewModel: AodToLockscreenTransitionViewModel,
+ private val dozingToGoneTransitionViewModel: DozingToGoneTransitionViewModel,
private val dozingToLockscreenTransitionViewModel: DozingToLockscreenTransitionViewModel,
private val glanceableHubToLockscreenTransitionViewModel:
GlanceableHubToLockscreenTransitionViewModel,
@@ -120,6 +123,27 @@
}
.distinctUntilChanged()
+ /**
+ * Keyguard should not show while the communal hub is fully visible. This check is added since
+ * at the moment, closing the notification shade will cause the keyguard alpha to be set back to
+ * 1. Also ensure keyguard is never visible when GONE.
+ */
+ private val hideKeyguard: Flow<Boolean> =
+ combine(
+ communalInteractor.isIdleOnCommunal,
+ keyguardTransitionInteractor
+ .transitionValue(GONE)
+ .map { it == 1f }
+ .onStart { emit(false) },
+ keyguardTransitionInteractor
+ .transitionValue(OCCLUDED)
+ .map { it == 1f }
+ .onStart { emit(false) },
+ ) { isIdleOnCommunal, isGone, isOccluded ->
+ isIdleOnCommunal || isGone || isOccluded
+ }
+ .distinctUntilChanged()
+
/** Last point that the root view was tapped */
val lastRootViewTapPosition: Flow<Point?> = keyguardInteractor.lastRootViewTapPosition
@@ -136,19 +160,16 @@
/** An observable for the alpha level for the entire keyguard root view. */
fun alpha(viewState: ViewStateAccessor): Flow<Float> {
return combine(
- communalInteractor.isIdleOnCommunal,
- keyguardTransitionInteractor
- .transitionValue(GONE)
- .map { it == 1f }
- .onStart { emit(false) }
- .distinctUntilChanged(),
+ hideKeyguard,
// The transitions are mutually exclusive, so they are safe to merge to get the last
// value emitted by any of them. Do not add flows that cannot make this guarantee.
merge(
alphaOnShadeExpansion,
keyguardInteractor.dismissAlpha.filterNotNull(),
alternateBouncerToGoneTransitionViewModel.lockscreenAlpha,
+ aodToGoneTransitionViewModel.lockscreenAlpha(viewState),
aodToLockscreenTransitionViewModel.lockscreenAlpha(viewState),
+ dozingToGoneTransitionViewModel.lockscreenAlpha(viewState),
dozingToLockscreenTransitionViewModel.lockscreenAlpha,
glanceableHubToLockscreenTransitionViewModel.keyguardAlpha,
goneToAodTransitionViewModel.enterFromTopAnimationAlpha,
@@ -167,12 +188,8 @@
primaryBouncerToLockscreenTransitionViewModel.lockscreenAlpha,
)
.onStart { emit(1f) }
- ) { isIdleOnCommunal, gone, alpha ->
- if (isIdleOnCommunal || gone) {
- // Keyguard should not show while the communal hub is fully visible. This check
- // is added since at the moment, closing the notification shade will cause the
- // keyguard alpha to be set back to 1. Also ensure keyguard is never visible
- // when GONE.
+ ) { hideKeyguard, alpha ->
+ if (hideKeyguard) {
0f
} else {
alpha
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/LockscreenSceneViewModel.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/LockscreenSceneViewModel.kt
index 9afe8fc..b60e999 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/LockscreenSceneViewModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/LockscreenSceneViewModel.kt
@@ -16,11 +16,12 @@
package com.android.systemui.keyguard.ui.viewmodel
+import com.android.compose.animation.scene.SceneKey
import com.android.systemui.communal.domain.interactor.CommunalInteractor
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.dagger.qualifiers.Application
import com.android.systemui.deviceentry.domain.interactor.DeviceEntryInteractor
-import com.android.systemui.scene.shared.model.SceneKey
+import com.android.systemui.scene.shared.model.Scenes
import com.android.systemui.statusbar.notification.stack.ui.viewmodel.NotificationsPlaceholderViewModel
import javax.inject.Inject
import kotlinx.coroutines.CoroutineScope
@@ -51,13 +52,13 @@
)
private fun upDestinationSceneKey(isUnlocked: Boolean): SceneKey {
- return if (isUnlocked) SceneKey.Gone else SceneKey.Bouncer
+ return if (isUnlocked) Scenes.Gone else Scenes.Bouncer
}
/** The key of the scene we should switch to when swiping left. */
val leftDestinationSceneKey: StateFlow<SceneKey?> =
communalInteractor.isCommunalAvailable
- .map { available -> if (available) SceneKey.Communal else null }
+ .map { available -> if (available) Scenes.Communal else null }
.stateIn(
scope = applicationScope,
started = SharingStarted.WhileSubscribed(),
diff --git a/packages/SystemUI/src/com/android/systemui/log/dagger/LogModule.java b/packages/SystemUI/src/com/android/systemui/log/dagger/LogModule.java
index 8b7c85b..f2013be 100644
--- a/packages/SystemUI/src/com/android/systemui/log/dagger/LogModule.java
+++ b/packages/SystemUI/src/com/android/systemui/log/dagger/LogModule.java
@@ -546,7 +546,7 @@
@SysUISingleton
@KeyguardLog
public static LogBuffer provideKeyguardLogBuffer(LogBufferFactory factory) {
- return factory.create("KeyguardLog", 250);
+ return factory.create("KeyguardLog", 500);
}
/**
diff --git a/packages/SystemUI/src/com/android/systemui/mediaprojection/MediaProjectionServiceHelper.kt b/packages/SystemUI/src/com/android/systemui/mediaprojection/MediaProjectionServiceHelper.kt
index f1cade7..0b19bab 100644
--- a/packages/SystemUI/src/com/android/systemui/mediaprojection/MediaProjectionServiceHelper.kt
+++ b/packages/SystemUI/src/com/android/systemui/mediaprojection/MediaProjectionServiceHelper.kt
@@ -24,12 +24,14 @@
import android.os.RemoteException
import android.os.ServiceManager
import android.util.Log
+import android.window.WindowContainerToken
+import javax.inject.Inject
/**
* Helper class that handles the media projection service related actions. It simplifies invoking
* the MediaProjectionManagerService and updating the permission consent.
*/
-class MediaProjectionServiceHelper {
+class MediaProjectionServiceHelper @Inject constructor() {
companion object {
private const val TAG = "MediaProjectionServiceHelper"
private val service =
@@ -90,4 +92,16 @@
}
}
}
+
+ /** Updates the projected task to the task that has a matching [WindowContainerToken]. */
+ fun updateTaskRecordingSession(token: WindowContainerToken): Boolean {
+ return try {
+ true
+ // TODO: actually call the service once it is implemented
+ // service.updateTaskRecordingSession(token)
+ } catch (e: RemoteException) {
+ Log.e(TAG, "Unable to updateTaskRecordingSession", e)
+ false
+ }
+ }
}
diff --git a/packages/SystemUI/src/com/android/systemui/mediaprojection/appselector/view/MediaProjectionRecentsViewController.kt b/packages/SystemUI/src/com/android/systemui/mediaprojection/appselector/view/MediaProjectionRecentsViewController.kt
index e1741c7..7c7efd0 100644
--- a/packages/SystemUI/src/com/android/systemui/mediaprojection/appselector/view/MediaProjectionRecentsViewController.kt
+++ b/packages/SystemUI/src/com/android/systemui/mediaprojection/appselector/view/MediaProjectionRecentsViewController.kt
@@ -26,12 +26,13 @@
import android.view.ViewGroup
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
-import com.android.systemui.res.R
+import com.android.systemui.Flags.pssAppSelectorAbruptExitFix
import com.android.systemui.mediaprojection.appselector.MediaProjectionAppSelectorResultHandler
import com.android.systemui.mediaprojection.appselector.MediaProjectionAppSelectorScope
import com.android.systemui.mediaprojection.appselector.data.RecentTask
import com.android.systemui.mediaprojection.appselector.view.RecentTasksAdapter.RecentTaskClickListener
import com.android.systemui.mediaprojection.appselector.view.TaskPreviewSizeProvider.TaskPreviewSizeListener
+import com.android.systemui.res.R
import com.android.systemui.util.recycler.HorizontalSpacerItemDecoration
import javax.inject.Inject
@@ -122,14 +123,7 @@
override fun onRecentAppClicked(task: RecentTask, view: View) {
val launchCookie = LaunchCookie()
- val activityOptions =
- ActivityOptions.makeScaleUpAnimation(
- view,
- /* startX= */ 0,
- /* startY= */ 0,
- view.width,
- view.height
- )
+ val activityOptions = createAnimation(task, view)
activityOptions.pendingIntentBackgroundActivityStartMode =
MODE_BACKGROUND_ACTIVITY_START_ALLOWED
activityOptions.setLaunchCookie(launchCookie)
@@ -139,6 +133,28 @@
resultHandler.returnSelectedApp(launchCookie)
}
+ private fun createAnimation(task: RecentTask, view: View): ActivityOptions =
+ if (pssAppSelectorAbruptExitFix() && task.isForegroundTask) {
+ // When the selected task is in the foreground, the scale up animation doesn't work.
+ // We fallback to the default close animation.
+ ActivityOptions.makeCustomTaskAnimation(
+ view.context,
+ /* enterResId= */ 0,
+ /* exitResId= */ com.android.internal.R.anim.resolver_close_anim,
+ /* handler = */ null,
+ /* startedListener = */ null,
+ /* finishedListener = */ null
+ )
+ } else {
+ ActivityOptions.makeScaleUpAnimation(
+ view,
+ /* startX= */ 0,
+ /* startY= */ 0,
+ view.width,
+ view.height
+ )
+ }
+
override fun onTaskSizeChanged(size: Rect) {
views?.recentsContainer?.setTaskHeightSize()
}
diff --git a/packages/SystemUI/src/com/android/systemui/mediaprojection/taskswitcher/data/model/MediaProjectionState.kt b/packages/SystemUI/src/com/android/systemui/mediaprojection/taskswitcher/data/model/MediaProjectionState.kt
index 9938f11..cfbcaf9 100644
--- a/packages/SystemUI/src/com/android/systemui/mediaprojection/taskswitcher/data/model/MediaProjectionState.kt
+++ b/packages/SystemUI/src/com/android/systemui/mediaprojection/taskswitcher/data/model/MediaProjectionState.kt
@@ -16,11 +16,11 @@
package com.android.systemui.mediaprojection.taskswitcher.data.model
-import android.app.TaskInfo
+import android.app.ActivityManager.RunningTaskInfo
/** Represents the state of media projection. */
sealed interface MediaProjectionState {
object NotProjecting : MediaProjectionState
object EntireScreen : MediaProjectionState
- data class SingleTask(val task: TaskInfo) : MediaProjectionState
+ data class SingleTask(val task: RunningTaskInfo) : MediaProjectionState
}
diff --git a/packages/SystemUI/src/com/android/systemui/mediaprojection/taskswitcher/data/repository/ActivityTaskManagerTasksRepository.kt b/packages/SystemUI/src/com/android/systemui/mediaprojection/taskswitcher/data/repository/ActivityTaskManagerTasksRepository.kt
index 492d482..4ff54d4e 100644
--- a/packages/SystemUI/src/com/android/systemui/mediaprojection/taskswitcher/data/repository/ActivityTaskManagerTasksRepository.kt
+++ b/packages/SystemUI/src/com/android/systemui/mediaprojection/taskswitcher/data/repository/ActivityTaskManagerTasksRepository.kt
@@ -17,10 +17,14 @@
package com.android.systemui.mediaprojection.taskswitcher.data.repository
import android.app.ActivityManager.RunningTaskInfo
+import android.app.ActivityOptions
+import android.app.ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_ALLOWED
import android.app.ActivityTaskManager
+import android.app.IActivityTaskManager
import android.app.TaskStackListener
import android.os.IBinder
import android.util.Log
+import android.view.Display
import com.android.systemui.common.coroutine.ChannelExt.trySendWithFailureLogging
import com.android.systemui.common.coroutine.ConflatedCallbackFlow.conflatedCallbackFlow
import com.android.systemui.dagger.SysUISingleton
@@ -40,11 +44,24 @@
class ActivityTaskManagerTasksRepository
@Inject
constructor(
- private val activityTaskManager: ActivityTaskManager,
+ private val activityTaskManager: IActivityTaskManager,
@Application private val applicationScope: CoroutineScope,
@Background private val backgroundDispatcher: CoroutineDispatcher,
) : TasksRepository {
+ override suspend fun launchRecentTask(taskInfo: RunningTaskInfo) {
+ withContext(backgroundDispatcher) {
+ val activityOptions = ActivityOptions.makeBasic()
+ activityOptions.pendingIntentBackgroundActivityStartMode =
+ MODE_BACKGROUND_ACTIVITY_START_ALLOWED
+ activityOptions.launchDisplayId = taskInfo.displayId
+ activityTaskManager.startActivityFromRecents(
+ taskInfo.taskId,
+ activityOptions.toBundle()
+ )
+ }
+ }
+
override suspend fun findRunningTaskFromWindowContainerToken(
windowContainerToken: IBinder
): RunningTaskInfo? =
@@ -53,7 +70,14 @@
}
private suspend fun getRunningTasks(): List<RunningTaskInfo> =
- withContext(backgroundDispatcher) { activityTaskManager.getTasks(Integer.MAX_VALUE) }
+ withContext(backgroundDispatcher) {
+ activityTaskManager.getTasks(
+ /* maxNum = */ Integer.MAX_VALUE,
+ /* filterForVisibleRecents = */ false,
+ /* keepIntentExtra = */ false,
+ /* displayId = */ Display.INVALID_DISPLAY
+ )
+ }
override val foregroundTask: Flow<RunningTaskInfo> =
conflatedCallbackFlow {
diff --git a/packages/SystemUI/src/com/android/systemui/mediaprojection/taskswitcher/data/repository/MediaProjectionManagerRepository.kt b/packages/SystemUI/src/com/android/systemui/mediaprojection/taskswitcher/data/repository/MediaProjectionManagerRepository.kt
index 6480a47..74d1992 100644
--- a/packages/SystemUI/src/com/android/systemui/mediaprojection/taskswitcher/data/repository/MediaProjectionManagerRepository.kt
+++ b/packages/SystemUI/src/com/android/systemui/mediaprojection/taskswitcher/data/repository/MediaProjectionManagerRepository.kt
@@ -16,6 +16,7 @@
package com.android.systemui.mediaprojection.taskswitcher.data.repository
+import android.app.ActivityManager.RunningTaskInfo
import android.media.projection.MediaProjectionInfo
import android.media.projection.MediaProjectionManager
import android.os.Handler
@@ -26,15 +27,19 @@
import com.android.systemui.common.coroutine.ConflatedCallbackFlow.conflatedCallbackFlow
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.dagger.qualifiers.Application
+import com.android.systemui.dagger.qualifiers.Background
import com.android.systemui.dagger.qualifiers.Main
+import com.android.systemui.mediaprojection.MediaProjectionServiceHelper
import com.android.systemui.mediaprojection.taskswitcher.data.model.MediaProjectionState
import javax.inject.Inject
+import kotlinx.coroutines.CoroutineDispatcher
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.channels.awaitClose
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.SharingStarted
import kotlinx.coroutines.flow.shareIn
import kotlinx.coroutines.launch
+import kotlinx.coroutines.withContext
@SysUISingleton
class MediaProjectionManagerRepository
@@ -43,9 +48,21 @@
private val mediaProjectionManager: MediaProjectionManager,
@Main private val handler: Handler,
@Application private val applicationScope: CoroutineScope,
+ @Background private val backgroundDispatcher: CoroutineDispatcher,
private val tasksRepository: TasksRepository,
+ private val mediaProjectionServiceHelper: MediaProjectionServiceHelper,
) : MediaProjectionRepository {
+ override suspend fun switchProjectedTask(task: RunningTaskInfo) {
+ withContext(backgroundDispatcher) {
+ if (mediaProjectionServiceHelper.updateTaskRecordingSession(task.token)) {
+ Log.d(TAG, "Successfully switched projected task")
+ } else {
+ Log.d(TAG, "Failed to switch projected task")
+ }
+ }
+ }
+
override val mediaProjectionState: Flow<MediaProjectionState> =
conflatedCallbackFlow {
val callback =
@@ -82,7 +99,9 @@
}
val matchingTask =
tasksRepository.findRunningTaskFromWindowContainerToken(
- checkNotNull(session.tokenToRecord)) ?: return MediaProjectionState.EntireScreen
+ checkNotNull(session.tokenToRecord)
+ )
+ ?: return MediaProjectionState.EntireScreen
return MediaProjectionState.SingleTask(matchingTask)
}
diff --git a/packages/SystemUI/src/com/android/systemui/mediaprojection/taskswitcher/data/repository/MediaProjectionRepository.kt b/packages/SystemUI/src/com/android/systemui/mediaprojection/taskswitcher/data/repository/MediaProjectionRepository.kt
index 5bec692..e495466 100644
--- a/packages/SystemUI/src/com/android/systemui/mediaprojection/taskswitcher/data/repository/MediaProjectionRepository.kt
+++ b/packages/SystemUI/src/com/android/systemui/mediaprojection/taskswitcher/data/repository/MediaProjectionRepository.kt
@@ -16,12 +16,16 @@
package com.android.systemui.mediaprojection.taskswitcher.data.repository
+import android.app.ActivityManager.RunningTaskInfo
import com.android.systemui.mediaprojection.taskswitcher.data.model.MediaProjectionState
import kotlinx.coroutines.flow.Flow
/** Represents a repository to retrieve and change data related to media projection. */
interface MediaProjectionRepository {
+ /** Switches the task that should be projected. */
+ suspend fun switchProjectedTask(task: RunningTaskInfo)
+
/** Represents the current [MediaProjectionState]. */
val mediaProjectionState: Flow<MediaProjectionState>
}
diff --git a/packages/SystemUI/src/com/android/systemui/mediaprojection/taskswitcher/data/repository/NoOpMediaProjectionRepository.kt b/packages/SystemUI/src/com/android/systemui/mediaprojection/taskswitcher/data/repository/NoOpMediaProjectionRepository.kt
deleted file mode 100644
index 544eb6b..0000000
--- a/packages/SystemUI/src/com/android/systemui/mediaprojection/taskswitcher/data/repository/NoOpMediaProjectionRepository.kt
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright (C) 2023 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.systemui.mediaprojection.taskswitcher.data.repository
-
-import com.android.systemui.dagger.SysUISingleton
-import com.android.systemui.mediaprojection.taskswitcher.data.model.MediaProjectionState
-import javax.inject.Inject
-import kotlinx.coroutines.flow.Flow
-import kotlinx.coroutines.flow.emptyFlow
-
-/**
- * No-op implementation of [MediaProjectionRepository] that does nothing. Currently used as a
- * placeholder, while the real implementation is not completed.
- */
-@SysUISingleton
-class NoOpMediaProjectionRepository @Inject constructor() : MediaProjectionRepository {
-
- override val mediaProjectionState: Flow<MediaProjectionState> = emptyFlow()
-}
diff --git a/packages/SystemUI/src/com/android/systemui/mediaprojection/taskswitcher/data/repository/TasksRepository.kt b/packages/SystemUI/src/com/android/systemui/mediaprojection/taskswitcher/data/repository/TasksRepository.kt
index 6a535e4..9ef42b4 100644
--- a/packages/SystemUI/src/com/android/systemui/mediaprojection/taskswitcher/data/repository/TasksRepository.kt
+++ b/packages/SystemUI/src/com/android/systemui/mediaprojection/taskswitcher/data/repository/TasksRepository.kt
@@ -23,6 +23,8 @@
/** Repository responsible for retrieving data related to running tasks. */
interface TasksRepository {
+ suspend fun launchRecentTask(taskInfo: RunningTaskInfo)
+
/**
* Tries to find a [RunningTaskInfo] with a matching window container token. Returns `null` when
* no matching task was found.
diff --git a/packages/SystemUI/src/com/android/systemui/mediaprojection/taskswitcher/domain/interactor/TaskSwitchInteractor.kt b/packages/SystemUI/src/com/android/systemui/mediaprojection/taskswitcher/domain/interactor/TaskSwitchInteractor.kt
index fc5cf7d..eb9e6a5 100644
--- a/packages/SystemUI/src/com/android/systemui/mediaprojection/taskswitcher/domain/interactor/TaskSwitchInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/mediaprojection/taskswitcher/domain/interactor/TaskSwitchInteractor.kt
@@ -16,6 +16,7 @@
package com.android.systemui.mediaprojection.taskswitcher.domain.interactor
+import android.app.ActivityManager.RunningTaskInfo
import android.app.TaskInfo
import android.content.Intent
import android.util.Log
@@ -37,10 +38,18 @@
class TaskSwitchInteractor
@Inject
constructor(
- mediaProjectionRepository: MediaProjectionRepository,
+ private val mediaProjectionRepository: MediaProjectionRepository,
private val tasksRepository: TasksRepository,
) {
+ suspend fun switchProjectedTask(task: RunningTaskInfo) {
+ mediaProjectionRepository.switchProjectedTask(task)
+ }
+
+ suspend fun goBackToTask(task: RunningTaskInfo) {
+ tasksRepository.launchRecentTask(task)
+ }
+
/**
* Emits a stream of changes to the state of task switching, in the context of media projection.
*/
diff --git a/packages/SystemUI/src/com/android/systemui/mediaprojection/taskswitcher/domain/model/TaskSwitchState.kt b/packages/SystemUI/src/com/android/systemui/mediaprojection/taskswitcher/domain/model/TaskSwitchState.kt
index cd1258e..caabc64 100644
--- a/packages/SystemUI/src/com/android/systemui/mediaprojection/taskswitcher/domain/model/TaskSwitchState.kt
+++ b/packages/SystemUI/src/com/android/systemui/mediaprojection/taskswitcher/domain/model/TaskSwitchState.kt
@@ -16,7 +16,7 @@
package com.android.systemui.mediaprojection.taskswitcher.domain.model
-import android.app.TaskInfo
+import android.app.ActivityManager.RunningTaskInfo
/** Represents tha state of task switching in the context of single task media projection. */
sealed interface TaskSwitchState {
@@ -25,6 +25,8 @@
/** The foreground task is the same as the task that is currently being projected. */
object TaskUnchanged : TaskSwitchState
/** The foreground task is a different one to the task it currently being projected. */
- data class TaskSwitched(val projectedTask: TaskInfo, val foregroundTask: TaskInfo) :
- TaskSwitchState
+ data class TaskSwitched(
+ val projectedTask: RunningTaskInfo,
+ val foregroundTask: RunningTaskInfo
+ ) : TaskSwitchState
}
diff --git a/packages/SystemUI/src/com/android/systemui/mediaprojection/taskswitcher/ui/TaskSwitcherNotificationCoordinator.kt b/packages/SystemUI/src/com/android/systemui/mediaprojection/taskswitcher/ui/TaskSwitcherNotificationCoordinator.kt
index 7840da9..dab7439 100644
--- a/packages/SystemUI/src/com/android/systemui/mediaprojection/taskswitcher/ui/TaskSwitcherNotificationCoordinator.kt
+++ b/packages/SystemUI/src/com/android/systemui/mediaprojection/taskswitcher/ui/TaskSwitcherNotificationCoordinator.kt
@@ -16,23 +16,25 @@
package com.android.systemui.mediaprojection.taskswitcher.ui
+import android.app.ActivityManager.RunningTaskInfo
import android.app.Notification
-import android.app.NotificationChannel
import android.app.NotificationManager
+import android.app.PendingIntent
import android.content.Context
+import android.content.Intent
+import android.content.IntentFilter
+import android.os.Parcelable
import android.util.Log
-import com.android.systemui.res.R
+import com.android.systemui.broadcast.BroadcastDispatcher
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.dagger.qualifiers.Application
-import com.android.systemui.dagger.qualifiers.Main
import com.android.systemui.mediaprojection.taskswitcher.ui.model.TaskSwitcherNotificationUiState.NotShowing
import com.android.systemui.mediaprojection.taskswitcher.ui.model.TaskSwitcherNotificationUiState.Showing
import com.android.systemui.mediaprojection.taskswitcher.ui.viewmodel.TaskSwitcherNotificationViewModel
+import com.android.systemui.res.R
import com.android.systemui.util.NotificationChannels
import javax.inject.Inject
-import kotlinx.coroutines.CoroutineDispatcher
import kotlinx.coroutines.CoroutineScope
-import kotlinx.coroutines.flow.flowOn
import kotlinx.coroutines.launch
/** Coordinator responsible for showing/hiding the task switcher notification. */
@@ -43,32 +45,54 @@
private val context: Context,
private val notificationManager: NotificationManager,
@Application private val applicationScope: CoroutineScope,
- @Main private val mainDispatcher: CoroutineDispatcher,
private val viewModel: TaskSwitcherNotificationViewModel,
+ private val broadcastDispatcher: BroadcastDispatcher,
) {
+
fun start() {
applicationScope.launch {
- viewModel.uiState.flowOn(mainDispatcher).collect { uiState ->
- Log.d(TAG, "uiState -> $uiState")
- when (uiState) {
- is Showing -> showNotification()
- is NotShowing -> hideNotification()
+ launch {
+ viewModel.uiState.collect { uiState ->
+ Log.d(TAG, "uiState -> $uiState")
+ when (uiState) {
+ is Showing -> showNotification(uiState)
+ is NotShowing -> hideNotification()
+ }
}
}
+ launch {
+ broadcastDispatcher
+ .broadcastFlow(IntentFilter(SWITCH_ACTION)) { intent, _ ->
+ intent.requireParcelableExtra<RunningTaskInfo>(EXTRA_ACTION_TASK)
+ }
+ .collect { task: RunningTaskInfo ->
+ Log.d(TAG, "Switch action triggered: $task")
+ viewModel.onSwitchTaskClicked(task)
+ }
+ }
+ launch {
+ broadcastDispatcher
+ .broadcastFlow(IntentFilter(GO_BACK_ACTION)) { intent, _ ->
+ intent.requireParcelableExtra<RunningTaskInfo>(EXTRA_ACTION_TASK)
+ }
+ .collect { task ->
+ Log.d(TAG, "Go back action triggered: $task")
+ viewModel.onGoBackToTaskClicked(task)
+ }
+ }
}
}
- private fun showNotification() {
- notificationManager.notify(TAG, NOTIFICATION_ID, createNotification())
+ private fun showNotification(uiState: Showing) {
+ notificationManager.notify(TAG, NOTIFICATION_ID, createNotification(uiState))
}
- private fun createNotification(): Notification {
- // TODO(b/286201261): implement actions
+ private fun createNotification(uiState: Showing): Notification {
val actionSwitch =
Notification.Action.Builder(
/* icon = */ null,
context.getString(R.string.media_projection_task_switcher_action_switch),
- /* intent = */ null
+ createActionPendingIntent(action = SWITCH_ACTION, task = uiState.foregroundTask)
)
.build()
@@ -76,34 +100,40 @@
Notification.Action.Builder(
/* icon = */ null,
context.getString(R.string.media_projection_task_switcher_action_back),
- /* intent = */ null
+ createActionPendingIntent(action = GO_BACK_ACTION, task = uiState.projectedTask)
)
.build()
-
- val channel =
- NotificationChannel(
- NotificationChannels.HINTS,
- context.getString(R.string.media_projection_task_switcher_notification_channel),
- NotificationManager.IMPORTANCE_HIGH
- )
- notificationManager.createNotificationChannel(channel)
- return Notification.Builder(context, channel.id)
+ return Notification.Builder(context, NotificationChannels.ALERTS)
.setSmallIcon(R.drawable.qs_screen_record_icon_on)
.setAutoCancel(true)
.setContentText(context.getString(R.string.media_projection_task_switcher_text))
.addAction(actionSwitch)
.addAction(actionBack)
- .setPriority(Notification.PRIORITY_HIGH)
- .setDefaults(Notification.DEFAULT_VIBRATE)
.build()
}
private fun hideNotification() {
- notificationManager.cancel(NOTIFICATION_ID)
+ notificationManager.cancel(TAG, NOTIFICATION_ID)
}
+ private fun createActionPendingIntent(action: String, task: RunningTaskInfo) =
+ PendingIntent.getBroadcast(
+ context,
+ /* requestCode= */ 0,
+ Intent(action).apply { putExtra(EXTRA_ACTION_TASK, task) },
+ /* flags= */ PendingIntent.FLAG_IMMUTABLE or PendingIntent.FLAG_UPDATE_CURRENT
+ )
+
companion object {
private const val TAG = "TaskSwitchNotifCoord"
private const val NOTIFICATION_ID = 5566
+
+ private const val EXTRA_ACTION_TASK = "extra_task"
+
+ private const val SWITCH_ACTION = "com.android.systemui.mediaprojection.SWITCH_TASK"
+ private const val GO_BACK_ACTION = "com.android.systemui.mediaprojection.GO_BACK"
}
}
+
+private fun <T : Parcelable> Intent.requireParcelableExtra(key: String) =
+ getParcelableExtra<T>(key)!!
diff --git a/packages/SystemUI/src/com/android/systemui/mediaprojection/taskswitcher/ui/model/TaskSwitcherNotificationUiState.kt b/packages/SystemUI/src/com/android/systemui/mediaprojection/taskswitcher/ui/model/TaskSwitcherNotificationUiState.kt
index 21aee72..f307761 100644
--- a/packages/SystemUI/src/com/android/systemui/mediaprojection/taskswitcher/ui/model/TaskSwitcherNotificationUiState.kt
+++ b/packages/SystemUI/src/com/android/systemui/mediaprojection/taskswitcher/ui/model/TaskSwitcherNotificationUiState.kt
@@ -16,7 +16,7 @@
package com.android.systemui.mediaprojection.taskswitcher.ui.model
-import android.app.TaskInfo
+import android.app.ActivityManager.RunningTaskInfo
/** Represents the UI state for the task switcher notification. */
sealed interface TaskSwitcherNotificationUiState {
@@ -24,7 +24,7 @@
object NotShowing : TaskSwitcherNotificationUiState
/** The notification should be shown. */
data class Showing(
- val projectedTask: TaskInfo,
- val foregroundTask: TaskInfo,
+ val projectedTask: RunningTaskInfo,
+ val foregroundTask: RunningTaskInfo,
) : TaskSwitcherNotificationUiState
}
diff --git a/packages/SystemUI/src/com/android/systemui/mediaprojection/taskswitcher/ui/viewmodel/TaskSwitcherNotificationViewModel.kt b/packages/SystemUI/src/com/android/systemui/mediaprojection/taskswitcher/ui/viewmodel/TaskSwitcherNotificationViewModel.kt
index d9754d4..cc8cc51 100644
--- a/packages/SystemUI/src/com/android/systemui/mediaprojection/taskswitcher/ui/viewmodel/TaskSwitcherNotificationViewModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/mediaprojection/taskswitcher/ui/viewmodel/TaskSwitcherNotificationViewModel.kt
@@ -16,15 +16,24 @@
package com.android.systemui.mediaprojection.taskswitcher.ui.viewmodel
+import android.app.ActivityManager.RunningTaskInfo
import android.util.Log
+import com.android.systemui.dagger.qualifiers.Background
import com.android.systemui.mediaprojection.taskswitcher.domain.interactor.TaskSwitchInteractor
import com.android.systemui.mediaprojection.taskswitcher.domain.model.TaskSwitchState
import com.android.systemui.mediaprojection.taskswitcher.ui.model.TaskSwitcherNotificationUiState
import javax.inject.Inject
+import kotlinx.coroutines.CoroutineDispatcher
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.map
+import kotlinx.coroutines.withContext
-class TaskSwitcherNotificationViewModel @Inject constructor(interactor: TaskSwitchInteractor) {
+class TaskSwitcherNotificationViewModel
+@Inject
+constructor(
+ private val interactor: TaskSwitchInteractor,
+ @Background private val backgroundDispatcher: CoroutineDispatcher,
+) {
val uiState: Flow<TaskSwitcherNotificationUiState> =
interactor.taskSwitchChanges.map { taskSwitchChange ->
@@ -43,6 +52,13 @@
}
}
+ suspend fun onSwitchTaskClicked(task: RunningTaskInfo) {
+ interactor.switchProjectedTask(task)
+ }
+
+ suspend fun onGoBackToTaskClicked(task: RunningTaskInfo) =
+ withContext(backgroundDispatcher) { interactor.goBackToTask(task) }
+
companion object {
private const val TAG = "TaskSwitchNotifVM"
}
diff --git a/packages/SystemUI/src/com/android/systemui/model/SceneContainerPlugin.kt b/packages/SystemUI/src/com/android/systemui/model/SceneContainerPlugin.kt
index 6eb6226..e7b6e63 100644
--- a/packages/SystemUI/src/com/android/systemui/model/SceneContainerPlugin.kt
+++ b/packages/SystemUI/src/com/android/systemui/model/SceneContainerPlugin.kt
@@ -16,11 +16,12 @@
package com.android.systemui.model
+import com.android.compose.animation.scene.ObservableTransitionState
+import com.android.compose.animation.scene.SceneKey
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.scene.domain.interactor.SceneInteractor
import com.android.systemui.scene.shared.flag.SceneContainerFlag
-import com.android.systemui.scene.shared.model.ObservableTransitionState
-import com.android.systemui.scene.shared.model.SceneKey
+import com.android.systemui.scene.shared.model.Scenes
import com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_BOUNCER_SHOWING
import com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_NOTIFICATION_PANEL_EXPANDED
import com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_NOTIFICATION_PANEL_VISIBLE
@@ -67,11 +68,11 @@
*/
val EvaluatorByFlag =
mapOf<Int, (SceneKey) -> Boolean>(
- SYSUI_STATE_NOTIFICATION_PANEL_VISIBLE to { it != SceneKey.Gone },
- SYSUI_STATE_NOTIFICATION_PANEL_EXPANDED to { it == SceneKey.Shade },
- SYSUI_STATE_QUICK_SETTINGS_EXPANDED to { it == SceneKey.QuickSettings },
- SYSUI_STATE_BOUNCER_SHOWING to { it == SceneKey.Bouncer },
- SYSUI_STATE_STATUS_BAR_KEYGUARD_SHOWING to { it == SceneKey.Lockscreen },
+ SYSUI_STATE_NOTIFICATION_PANEL_VISIBLE to { it != Scenes.Gone },
+ SYSUI_STATE_NOTIFICATION_PANEL_EXPANDED to { it == Scenes.Shade },
+ SYSUI_STATE_QUICK_SETTINGS_EXPANDED to { it == Scenes.QuickSettings },
+ SYSUI_STATE_BOUNCER_SHOWING to { it == Scenes.Bouncer },
+ SYSUI_STATE_STATUS_BAR_KEYGUARD_SHOWING to { it == Scenes.Lockscreen },
)
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/model/SysUiStateExt.kt b/packages/SystemUI/src/com/android/systemui/model/SysUiStateExt.kt
index c74a71c..5c49156 100644
--- a/packages/SystemUI/src/com/android/systemui/model/SysUiStateExt.kt
+++ b/packages/SystemUI/src/com/android/systemui/model/SysUiStateExt.kt
@@ -25,11 +25,11 @@
* ```
* sysuiState.updateFlags(
* displayId,
- * SYSUI_STATE_NOTIFICATION_PANEL_VISIBLE to (sceneKey != SceneKey.Gone),
- * SYSUI_STATE_NOTIFICATION_PANEL_EXPANDED to (sceneKey == SceneKey.Shade),
- * SYSUI_STATE_QUICK_SETTINGS_EXPANDED to (sceneKey == SceneKey.QuickSettings),
- * SYSUI_STATE_BOUNCER_SHOWING to (sceneKey == SceneKey.Bouncer),
- * SYSUI_STATE_STATUS_BAR_KEYGUARD_SHOWING to (sceneKey == SceneKey.Lockscreen),
+ * SYSUI_STATE_NOTIFICATION_PANEL_VISIBLE to (sceneKey != Scenes.Gone),
+ * SYSUI_STATE_NOTIFICATION_PANEL_EXPANDED to (sceneKey == Scenes.Shade),
+ * SYSUI_STATE_QUICK_SETTINGS_EXPANDED to (sceneKey == Scenes.QuickSettings),
+ * SYSUI_STATE_BOUNCER_SHOWING to (sceneKey == Scenes.Bouncer),
+ * SYSUI_STATE_STATUS_BAR_KEYGUARD_SHOWING to (sceneKey == Scenes.Lockscreen),
* )
* ```
*
diff --git a/packages/SystemUI/src/com/android/systemui/people/PeopleSpaceActivity.kt b/packages/SystemUI/src/com/android/systemui/people/PeopleSpaceActivity.kt
index 5b7eb45..deb0fed 100644
--- a/packages/SystemUI/src/com/android/systemui/people/PeopleSpaceActivity.kt
+++ b/packages/SystemUI/src/com/android/systemui/people/PeopleSpaceActivity.kt
@@ -20,14 +20,15 @@
import android.os.Bundle
import android.util.Log
import androidx.activity.ComponentActivity
+import androidx.activity.compose.setContent
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.ViewModelProvider
import androidx.lifecycle.lifecycleScope
import androidx.lifecycle.repeatOnLifecycle
-import com.android.systemui.compose.ComposeFacade.isComposeAvailable
-import com.android.systemui.compose.ComposeFacade.setPeopleSpaceActivityContent
+import com.android.compose.theme.PlatformTheme
import com.android.systemui.flags.FeatureFlags
import com.android.systemui.flags.Flags
+import com.android.systemui.people.ui.compose.PeopleScreen
import com.android.systemui.people.ui.view.PeopleViewBinder
import com.android.systemui.people.ui.view.PeopleViewBinder.bind
import com.android.systemui.people.ui.viewmodel.PeopleViewModel
@@ -65,13 +66,11 @@
}
// Set the content of the activity, using either the View or Compose implementation.
- if (featureFlags.isEnabled(Flags.COMPOSE_PEOPLE_SPACE) && isComposeAvailable()) {
+ if (featureFlags.isEnabled(Flags.COMPOSE_PEOPLE_SPACE)) {
Log.d(TAG, "Using the Compose implementation of the PeopleSpaceActivity")
- setPeopleSpaceActivityContent(
- activity = this,
- viewModel,
- onResult = { finishActivity(it) },
- )
+ setContent {
+ PlatformTheme { PeopleScreen(viewModel, onResult = { finishActivity(it) }) }
+ }
} else {
Log.d(TAG, "Using the View implementation of the PeopleSpaceActivity")
val view = PeopleViewBinder.create(this)
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSImpl.java b/packages/SystemUI/src/com/android/systemui/qs/QSImpl.java
index 7413362..a000d63 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QSImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QSImpl.java
@@ -47,7 +47,6 @@
import com.android.keyguard.BouncerPanelExpansionCalculator;
import com.android.systemui.Dumpable;
import com.android.systemui.animation.ShadeInterpolation;
-import com.android.systemui.compose.ComposeFacade;
import com.android.systemui.dump.DumpManager;
import com.android.systemui.flags.FeatureFlags;
import com.android.systemui.flags.Flags;
@@ -301,8 +300,7 @@
private void bindFooterActionsView(View root) {
LinearLayout footerActionsView = root.findViewById(R.id.qs_footer_actions);
- if (!mFeatureFlags.isEnabled(Flags.COMPOSE_QS_FOOTER_ACTIONS)
- || !ComposeFacade.INSTANCE.isComposeAvailable()) {
+ if (!mFeatureFlags.isEnabled(Flags.COMPOSE_QS_FOOTER_ACTIONS)) {
Log.d(TAG, "Binding the View implementation of the QS footer actions");
mFooterActionsView = footerActionsView;
mFooterActionsViewBinder.bind(footerActionsView, mQSFooterActionsViewModel,
@@ -312,7 +310,7 @@
// Compose is available, so let's use the Compose implementation of the footer actions.
Log.d(TAG, "Binding the Compose implementation of the QS footer actions");
- View composeView = ComposeFacade.INSTANCE.createFooterActionsView(root.getContext(),
+ View composeView = QSUtils.createFooterActionsView(root.getContext(),
mQSFooterActionsViewModel, mListeningAndVisibilityLifecycleOwner);
mFooterActionsView = composeView;
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSUtils.kt b/packages/SystemUI/src/com/android/systemui/qs/QSUtils.kt
index e42264f24..15c3f27 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QSUtils.kt
+++ b/packages/SystemUI/src/com/android/systemui/qs/QSUtils.kt
@@ -1,7 +1,13 @@
package com.android.systemui.qs
import android.content.Context
+import android.view.View
+import androidx.lifecycle.LifecycleOwner
+import com.android.compose.theme.PlatformTheme
+import com.android.compose.ui.platform.DensityAwareComposeView
import com.android.internal.policy.SystemBarUtils
+import com.android.systemui.qs.footer.ui.compose.FooterActions
+import com.android.systemui.qs.footer.ui.viewmodel.FooterActionsViewModel
import com.android.systemui.util.LargeScreenUtils.shouldUseLargeScreenShadeHeader
object QSUtils {
@@ -21,4 +27,15 @@
SystemBarUtils.getQuickQsOffsetHeight(context)
}
}
-}
\ No newline at end of file
+
+ @JvmStatic
+ fun createFooterActionsView(
+ context: Context,
+ viewModel: FooterActionsViewModel,
+ qsVisibilityLifecycleOwner: LifecycleOwner,
+ ): View {
+ return DensityAwareComposeView(context).apply {
+ setContent { PlatformTheme { FooterActions(viewModel, qsVisibilityLifecycleOwner) } }
+ }
+ }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/qs/ui/viewmodel/QuickSettingsSceneViewModel.kt b/packages/SystemUI/src/com/android/systemui/qs/ui/viewmodel/QuickSettingsSceneViewModel.kt
index 17454a9..34f66b8 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/ui/viewmodel/QuickSettingsSceneViewModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/qs/ui/viewmodel/QuickSettingsSceneViewModel.kt
@@ -17,14 +17,16 @@
package com.android.systemui.qs.ui.viewmodel
import androidx.lifecycle.LifecycleOwner
+import com.android.compose.animation.scene.Back
+import com.android.compose.animation.scene.Swipe
+import com.android.compose.animation.scene.SwipeDirection
+import com.android.compose.animation.scene.UserAction
+import com.android.compose.animation.scene.UserActionResult
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.qs.FooterActionsController
import com.android.systemui.qs.footer.ui.viewmodel.FooterActionsViewModel
import com.android.systemui.qs.ui.adapter.QSSceneAdapter
-import com.android.systemui.scene.shared.model.Direction
-import com.android.systemui.scene.shared.model.SceneKey
-import com.android.systemui.scene.shared.model.UserAction
-import com.android.systemui.scene.shared.model.UserActionResult
+import com.android.systemui.scene.shared.model.Scenes
import com.android.systemui.shade.ui.viewmodel.ShadeHeaderViewModel
import com.android.systemui.statusbar.notification.stack.ui.viewmodel.NotificationsPlaceholderViewModel
import java.util.concurrent.atomic.AtomicBoolean
@@ -45,13 +47,11 @@
val destinationScenes =
qsSceneAdapter.isCustomizing.map { customizing ->
if (customizing) {
- mapOf<UserAction, UserActionResult>(
- UserAction.Back to UserActionResult(SceneKey.QuickSettings)
- )
+ mapOf<UserAction, UserActionResult>(Back to UserActionResult(Scenes.QuickSettings))
} else {
mapOf(
- UserAction.Back to UserActionResult(SceneKey.Shade),
- UserAction.Swipe(Direction.UP) to UserActionResult(SceneKey.Shade),
+ Back to UserActionResult(Scenes.Shade),
+ Swipe(SwipeDirection.Up) to UserActionResult(Scenes.Shade),
)
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/scene/KeyguardlessSceneContainerFrameworkModule.kt b/packages/SystemUI/src/com/android/systemui/scene/KeyguardlessSceneContainerFrameworkModule.kt
index 356eb85..afd0746 100644
--- a/packages/SystemUI/src/com/android/systemui/scene/KeyguardlessSceneContainerFrameworkModule.kt
+++ b/packages/SystemUI/src/com/android/systemui/scene/KeyguardlessSceneContainerFrameworkModule.kt
@@ -18,7 +18,7 @@
import com.android.systemui.scene.shared.flag.SceneContainerFlagsModule
import com.android.systemui.scene.shared.model.SceneContainerConfig
-import com.android.systemui.scene.shared.model.SceneKey
+import com.android.systemui.scene.shared.model.Scenes
import dagger.Module
import dagger.Provides
@@ -44,11 +44,11 @@
// last one is top-most.
sceneKeys =
listOf(
- SceneKey.Gone,
- SceneKey.QuickSettings,
- SceneKey.Shade,
+ Scenes.Gone,
+ Scenes.QuickSettings,
+ Scenes.Shade,
),
- initialSceneKey = SceneKey.Gone,
+ initialSceneKey = Scenes.Gone,
)
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/scene/SceneContainerFrameworkModule.kt b/packages/SystemUI/src/com/android/systemui/scene/SceneContainerFrameworkModule.kt
index 7d2468b..62b0914 100644
--- a/packages/SystemUI/src/com/android/systemui/scene/SceneContainerFrameworkModule.kt
+++ b/packages/SystemUI/src/com/android/systemui/scene/SceneContainerFrameworkModule.kt
@@ -22,7 +22,7 @@
import com.android.systemui.scene.domain.startable.SceneContainerStartable
import com.android.systemui.scene.shared.flag.SceneContainerFlagsModule
import com.android.systemui.scene.shared.model.SceneContainerConfig
-import com.android.systemui.scene.shared.model.SceneKey
+import com.android.systemui.scene.shared.model.Scenes
import dagger.Binds
import dagger.Module
import dagger.Provides
@@ -67,14 +67,14 @@
// last one is top-most.
sceneKeys =
listOf(
- SceneKey.Gone,
- SceneKey.Communal,
- SceneKey.Lockscreen,
- SceneKey.Bouncer,
- SceneKey.QuickSettings,
- SceneKey.Shade,
+ Scenes.Gone,
+ Scenes.Communal,
+ Scenes.Lockscreen,
+ Scenes.Bouncer,
+ Scenes.QuickSettings,
+ Scenes.Shade,
),
- initialSceneKey = SceneKey.Lockscreen,
+ initialSceneKey = Scenes.Lockscreen,
)
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/scene/ShadelessSceneContainerFrameworkModule.kt b/packages/SystemUI/src/com/android/systemui/scene/ShadelessSceneContainerFrameworkModule.kt
index c10e51b..0665c9e 100644
--- a/packages/SystemUI/src/com/android/systemui/scene/ShadelessSceneContainerFrameworkModule.kt
+++ b/packages/SystemUI/src/com/android/systemui/scene/ShadelessSceneContainerFrameworkModule.kt
@@ -18,7 +18,7 @@
import com.android.systemui.scene.shared.flag.SceneContainerFlagsModule
import com.android.systemui.scene.shared.model.SceneContainerConfig
-import com.android.systemui.scene.shared.model.SceneKey
+import com.android.systemui.scene.shared.model.Scenes
import dagger.Module
import dagger.Provides
@@ -44,11 +44,11 @@
// last one is top-most.
sceneKeys =
listOf(
- SceneKey.Gone,
- SceneKey.Lockscreen,
- SceneKey.Bouncer,
+ Scenes.Gone,
+ Scenes.Lockscreen,
+ Scenes.Bouncer,
),
- initialSceneKey = SceneKey.Lockscreen,
+ initialSceneKey = Scenes.Lockscreen,
)
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/scene/data/repository/SceneContainerRepository.kt b/packages/SystemUI/src/com/android/systemui/scene/data/repository/SceneContainerRepository.kt
index e60dff1..994b012 100644
--- a/packages/SystemUI/src/com/android/systemui/scene/data/repository/SceneContainerRepository.kt
+++ b/packages/SystemUI/src/com/android/systemui/scene/data/repository/SceneContainerRepository.kt
@@ -18,12 +18,12 @@
package com.android.systemui.scene.data.repository
+import com.android.compose.animation.scene.ObservableTransitionState
+import com.android.compose.animation.scene.SceneKey
+import com.android.compose.animation.scene.TransitionKey
import com.android.systemui.dagger.qualifiers.Application
-import com.android.systemui.scene.shared.model.ObservableTransitionState
import com.android.systemui.scene.shared.model.SceneContainerConfig
import com.android.systemui.scene.shared.model.SceneDataSource
-import com.android.systemui.scene.shared.model.SceneKey
-import com.android.systemui.scene.shared.model.TransitionKey
import javax.inject.Inject
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.ExperimentalCoroutinesApi
diff --git a/packages/SystemUI/src/com/android/systemui/scene/domain/interactor/PanelExpansionInteractor.kt b/packages/SystemUI/src/com/android/systemui/scene/domain/interactor/PanelExpansionInteractor.kt
index 36350f8..3a5ea5c 100644
--- a/packages/SystemUI/src/com/android/systemui/scene/domain/interactor/PanelExpansionInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/scene/domain/interactor/PanelExpansionInteractor.kt
@@ -18,10 +18,11 @@
package com.android.systemui.scene.domain.interactor
+import com.android.compose.animation.scene.ObservableTransitionState
+import com.android.compose.animation.scene.SceneKey
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.scene.shared.flag.SceneContainerFlag
-import com.android.systemui.scene.shared.model.ObservableTransitionState
-import com.android.systemui.scene.shared.model.SceneKey
+import com.android.systemui.scene.shared.model.Scenes
import com.android.systemui.shade.data.repository.ShadeRepository
import javax.inject.Inject
import kotlinx.coroutines.ExperimentalCoroutinesApi
@@ -53,7 +54,7 @@
when (state) {
is ObservableTransitionState.Idle ->
flowOf(
- if (state.scene != SceneKey.Gone) {
+ if (state.scene != Scenes.Gone) {
// When resting on a non-Gone scene, the panel is fully expanded.
1f
} else {
@@ -64,7 +65,7 @@
)
is ObservableTransitionState.Transition ->
when {
- state.fromScene == SceneKey.Gone ->
+ state.fromScene == Scenes.Gone ->
if (state.toScene.isExpandable()) {
// Moving from Gone to a scene that can animate-expand has a
// panel
@@ -77,7 +78,7 @@
// the panel fully expanded.
flowOf(1f)
}
- state.toScene == SceneKey.Gone ->
+ state.toScene == Scenes.Gone ->
if (state.fromScene.isExpandable()) {
// Moving to Gone from a scene that can animate-expand has a
// panel
@@ -99,6 +100,6 @@
}
private fun SceneKey.isExpandable(): Boolean {
- return this == SceneKey.Shade || this == SceneKey.QuickSettings
+ return this == Scenes.Shade || this == Scenes.QuickSettings
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/scene/domain/interactor/SceneInteractor.kt b/packages/SystemUI/src/com/android/systemui/scene/domain/interactor/SceneInteractor.kt
index 6b7c672..306aad1 100644
--- a/packages/SystemUI/src/com/android/systemui/scene/domain/interactor/SceneInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/scene/domain/interactor/SceneInteractor.kt
@@ -16,14 +16,15 @@
package com.android.systemui.scene.domain.interactor
+import com.android.compose.animation.scene.ObservableTransitionState
+import com.android.compose.animation.scene.SceneKey
+import com.android.compose.animation.scene.TransitionKey
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.dagger.qualifiers.Application
import com.android.systemui.deviceentry.domain.interactor.DeviceUnlockedInteractor
import com.android.systemui.scene.data.repository.SceneContainerRepository
import com.android.systemui.scene.shared.logger.SceneLogger
-import com.android.systemui.scene.shared.model.ObservableTransitionState
-import com.android.systemui.scene.shared.model.SceneKey
-import com.android.systemui.scene.shared.model.TransitionKey
+import com.android.systemui.scene.shared.model.Scenes
import com.android.systemui.util.kotlin.pairwiseBy
import javax.inject.Inject
import kotlinx.coroutines.CoroutineScope
@@ -160,7 +161,7 @@
loggingReason: String,
transitionKey: TransitionKey? = null,
) {
- check(toScene != SceneKey.Gone || deviceUnlockedInteractor.isDeviceUnlocked.value) {
+ check(toScene != Scenes.Gone || deviceUnlockedInteractor.isDeviceUnlocked.value) {
"Cannot change to the Gone scene while the device is locked. Logging reason for scene" +
" change was: $loggingReason"
}
diff --git a/packages/SystemUI/src/com/android/systemui/scene/domain/interactor/WindowRootViewVisibilityInteractor.kt b/packages/SystemUI/src/com/android/systemui/scene/domain/interactor/WindowRootViewVisibilityInteractor.kt
index 1c37908..c736707 100644
--- a/packages/SystemUI/src/com/android/systemui/scene/domain/interactor/WindowRootViewVisibilityInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/scene/domain/interactor/WindowRootViewVisibilityInteractor.kt
@@ -16,6 +16,7 @@
package com.android.systemui.scene.domain.interactor
+import com.android.compose.animation.scene.ObservableTransitionState
import com.android.systemui.CoreStartable
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.dagger.qualifiers.Application
@@ -24,8 +25,7 @@
import com.android.systemui.power.domain.interactor.PowerInteractor
import com.android.systemui.scene.data.repository.WindowRootViewVisibilityRepository
import com.android.systemui.scene.shared.flag.SceneContainerFlags
-import com.android.systemui.scene.shared.model.ObservableTransitionState
-import com.android.systemui.scene.shared.model.SceneKey
+import com.android.systemui.scene.shared.model.Scenes
import com.android.systemui.statusbar.NotificationPresenter
import com.android.systemui.statusbar.notification.domain.interactor.ActiveNotificationsInteractor
import com.android.systemui.statusbar.notification.init.NotificationsController
@@ -77,12 +77,12 @@
.map { state ->
when (state) {
is ObservableTransitionState.Idle ->
- state.scene == SceneKey.Shade || state.scene == SceneKey.Lockscreen
+ state.scene == Scenes.Shade || state.scene == Scenes.Lockscreen
is ObservableTransitionState.Transition ->
- state.toScene == SceneKey.Shade ||
- state.toScene == SceneKey.Lockscreen ||
- state.fromScene == SceneKey.Shade ||
- state.fromScene == SceneKey.Lockscreen
+ state.toScene == Scenes.Shade ||
+ state.toScene == Scenes.Lockscreen ||
+ state.fromScene == Scenes.Shade ||
+ state.fromScene == Scenes.Lockscreen
}
}
.distinctUntilChanged()
diff --git a/packages/SystemUI/src/com/android/systemui/scene/domain/startable/SceneContainerStartable.kt b/packages/SystemUI/src/com/android/systemui/scene/domain/startable/SceneContainerStartable.kt
index 034f87f..6df57ed 100644
--- a/packages/SystemUI/src/com/android/systemui/scene/domain/startable/SceneContainerStartable.kt
+++ b/packages/SystemUI/src/com/android/systemui/scene/domain/startable/SceneContainerStartable.kt
@@ -19,6 +19,8 @@
package com.android.systemui.scene.domain.startable
import android.app.StatusBarManager
+import com.android.compose.animation.scene.ObservableTransitionState
+import com.android.compose.animation.scene.SceneKey
import com.android.systemui.CoreStartable
import com.android.systemui.authentication.domain.interactor.AuthenticationInteractor
import com.android.systemui.authentication.shared.model.AuthenticationMethodModel
@@ -41,8 +43,7 @@
import com.android.systemui.scene.domain.interactor.SceneInteractor
import com.android.systemui.scene.shared.flag.SceneContainerFlags
import com.android.systemui.scene.shared.logger.SceneLogger
-import com.android.systemui.scene.shared.model.ObservableTransitionState
-import com.android.systemui.scene.shared.model.SceneKey
+import com.android.systemui.scene.shared.model.Scenes
import com.android.systemui.statusbar.NotificationShadeWindowController
import com.android.systemui.statusbar.notification.domain.interactor.HeadsUpNotificationInteractor
import com.android.systemui.statusbar.notification.stack.shared.flexiNotifsEnabled
@@ -140,14 +141,14 @@
.mapNotNull { state ->
when (state) {
is ObservableTransitionState.Idle -> {
- if (state.scene != SceneKey.Gone) {
+ if (state.scene != Scenes.Gone) {
true to "scene is not Gone"
} else {
false to "scene is Gone"
}
}
is ObservableTransitionState.Transition -> {
- if (state.fromScene == SceneKey.Gone) {
+ if (state.fromScene == Scenes.Gone) {
true to "scene transitioning away from Gone"
} else {
null
@@ -180,9 +181,9 @@
applicationScope.launch {
// TODO (b/308001302): Move this to a bouncer specific interactor.
bouncerInteractor.onImeHiddenByUser.collectLatest {
- if (sceneInteractor.currentScene.value == SceneKey.Bouncer) {
+ if (sceneInteractor.currentScene.value == Scenes.Bouncer) {
sceneInteractor.changeScene(
- toScene = SceneKey.Lockscreen,
+ toScene = Scenes.Lockscreen,
loggingReason = "IME hidden",
)
}
@@ -196,13 +197,13 @@
when {
isAnySimLocked -> {
switchToScene(
- targetSceneKey = SceneKey.Bouncer,
+ targetSceneKey = Scenes.Bouncer,
loggingReason = "Need to authenticate locked SIM card."
)
}
isUnlocked && canSwipeToEnter == false -> {
switchToScene(
- targetSceneKey = SceneKey.Gone,
+ targetSceneKey = Scenes.Gone,
loggingReason =
"All SIM cards unlocked and device already" +
" unlocked and lockscreen doesn't require a swipe to dismiss."
@@ -210,7 +211,7 @@
}
else -> {
switchToScene(
- targetSceneKey = SceneKey.Lockscreen,
+ targetSceneKey = Scenes.Lockscreen,
loggingReason =
"All SIM cards unlocked and device still locked" +
" or lockscreen still requires a swipe to dismiss."
@@ -231,8 +232,8 @@
transitionState.toScene,
)
}
- val isOnLockscreen = renderedScenes.contains(SceneKey.Lockscreen)
- val isOnBouncer = renderedScenes.contains(SceneKey.Bouncer)
+ val isOnLockscreen = renderedScenes.contains(Scenes.Lockscreen)
+ val isOnBouncer = renderedScenes.contains(Scenes.Bouncer)
if (!isUnlocked) {
return@mapNotNull if (isOnLockscreen || isOnBouncer) {
// Already on lockscreen or bouncer, no need to change scenes.
@@ -240,7 +241,7 @@
} else {
// The device locked while on a scene that's not Lockscreen or Bouncer,
// go to Lockscreen.
- SceneKey.Lockscreen to
+ Scenes.Lockscreen to
"device locked in non-Lockscreen and non-Bouncer scene"
}
}
@@ -250,7 +251,7 @@
when {
isOnBouncer ->
// When the device becomes unlocked in Bouncer, go to Gone.
- SceneKey.Gone to "device was unlocked in Bouncer scene"
+ Scenes.Gone to "device was unlocked in Bouncer scene"
isOnLockscreen ->
// The lockscreen should be dismissed automatically in 2 scenarios:
// 1. When face auth bypass is enabled and authentication happens while
@@ -262,11 +263,11 @@
// authentication attempt.
when {
isBypassEnabled ->
- SceneKey.Gone to
+ Scenes.Gone to
"device has been unlocked on lockscreen with bypass" +
" enabled"
canSwipeToEnter == false ->
- SceneKey.Gone to
+ Scenes.Gone to
"device has been unlocked on lockscreen using an active" +
" authentication mechanism"
else -> null
@@ -287,7 +288,7 @@
powerInteractor.isAsleep.collect { isAsleep ->
if (isAsleep) {
switchToScene(
- targetSceneKey = SceneKey.Lockscreen,
+ targetSceneKey = Scenes.Lockscreen,
loggingReason = "device is starting to sleep",
)
} else {
@@ -295,7 +296,7 @@
val isUnlocked = deviceEntryInteractor.isUnlocked.value
if (isUnlocked && canSwipeToEnter == false) {
switchToScene(
- targetSceneKey = SceneKey.Gone,
+ targetSceneKey = Scenes.Gone,
loggingReason =
"device is waking up while unlocked without the ability" +
" to swipe up on lockscreen to enter.",
@@ -305,7 +306,7 @@
AuthenticationMethodModel.Sim
) {
switchToScene(
- targetSceneKey = SceneKey.Bouncer,
+ targetSceneKey = Scenes.Bouncer,
loggingReason = "device is starting to wake up with a locked sim"
)
}
@@ -370,7 +371,7 @@
applicationScope.launch {
sceneInteractor.currentScene
- .map { it == SceneKey.Bouncer }
+ .map { it == Scenes.Bouncer }
.distinctUntilChanged()
.collect { switchedToBouncerScene ->
if (switchedToBouncerScene) {
@@ -390,7 +391,7 @@
falsingManager.addFalsingBeliefListener(listener)
awaitClose { falsingManager.removeFalsingBeliefListener(listener) }
}
- .collect { switchToScene(SceneKey.Lockscreen, "Falsing detected.") }
+ .collect { switchToScene(Scenes.Lockscreen, "Falsing detected.") }
}
}
@@ -403,7 +404,7 @@
}
.distinctUntilChanged()
.collect { sceneKey ->
- windowController.setNotificationShadeFocusable(sceneKey != SceneKey.Gone)
+ windowController.setNotificationShadeFocusable(sceneKey != Scenes.Gone)
}
}
}
@@ -427,9 +428,9 @@
//
// This is done here in order to match the legacy
// implementation. The real reason why is lost to lore and myth.
- SceneKey.Lockscreen -> true
- SceneKey.Bouncer -> false
- SceneKey.Shade -> false
+ Scenes.Lockscreen -> true
+ Scenes.Bouncer -> false
+ Scenes.Shade -> false
else -> null
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/scene/shared/flag/SceneContainerFlags.kt b/packages/SystemUI/src/com/android/systemui/scene/shared/flag/SceneContainerFlags.kt
index 8408c51..1808d98 100644
--- a/packages/SystemUI/src/com/android/systemui/scene/shared/flag/SceneContainerFlags.kt
+++ b/packages/SystemUI/src/com/android/systemui/scene/shared/flag/SceneContainerFlags.kt
@@ -24,7 +24,6 @@
import com.android.systemui.Flags.keyguardBottomAreaRefactor
import com.android.systemui.Flags.migrateClocksToBlueprint
import com.android.systemui.Flags.sceneContainer
-import com.android.systemui.compose.ComposeFacade
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.flags.FlagToken
import com.android.systemui.flags.Flags.SCENE_CONTAINER_ENABLED
@@ -47,9 +46,8 @@
keyguardBottomAreaRefactor() &&
migrateClocksToBlueprint() &&
ComposeLockscreen.isEnabled &&
- MediaInSceneContainerFlag.isEnabled &&
- // NOTE: Changes should also be made in getSecondaryFlags and @EnableSceneContainer
- ComposeFacade.isComposeAvailable()
+ MediaInSceneContainerFlag.isEnabled
+ // NOTE: Changes should also be made in getSecondaryFlags and @EnableSceneContainer
/**
* The main static flag, SCENE_CONTAINER_ENABLED. This is an explicit static flag check that
@@ -74,11 +72,7 @@
/** The full set of requirements for SceneContainer */
inline fun getAllRequirements(): Sequence<FlagToken> {
- val composeRequirement =
- FlagToken("ComposeFacade.isComposeAvailable()", ComposeFacade.isComposeAvailable())
- return sequenceOf(getMainStaticFlag(), getMainAconfigFlag()) +
- getSecondaryFlags() +
- composeRequirement
+ return sequenceOf(getMainStaticFlag(), getMainAconfigFlag()) + getSecondaryFlags()
}
/** Return all dependencies of this flag in pairs where [Pair.first] depends on [Pair.second] */
diff --git a/packages/SystemUI/src/com/android/systemui/scene/shared/logger/SceneLogger.kt b/packages/SystemUI/src/com/android/systemui/scene/shared/logger/SceneLogger.kt
index cbf7b3e..f44779a 100644
--- a/packages/SystemUI/src/com/android/systemui/scene/shared/logger/SceneLogger.kt
+++ b/packages/SystemUI/src/com/android/systemui/scene/shared/logger/SceneLogger.kt
@@ -16,10 +16,10 @@
package com.android.systemui.scene.shared.logger
+import com.android.compose.animation.scene.SceneKey
import com.android.systemui.log.LogBuffer
import com.android.systemui.log.core.LogLevel
import com.android.systemui.log.dagger.SceneFrameworkLog
-import com.android.systemui.scene.shared.model.SceneKey
import javax.inject.Inject
class SceneLogger @Inject constructor(@SceneFrameworkLog private val logBuffer: LogBuffer) {
diff --git a/packages/SystemUI/src/com/android/systemui/scene/shared/model/ObservableTransitionState.kt b/packages/SystemUI/src/com/android/systemui/scene/shared/model/ObservableTransitionState.kt
deleted file mode 100644
index f704894..0000000
--- a/packages/SystemUI/src/com/android/systemui/scene/shared/model/ObservableTransitionState.kt
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright 2023 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.systemui.scene.shared.model
-
-import kotlinx.coroutines.flow.Flow
-
-/**
- * This is a fork of a class by the same name in the `com.android.compose.animation.scene` package.
- *
- * TODO(b/293899074): remove this fork, once we can compile Compose into System UI.
- */
-sealed class ObservableTransitionState {
- /** No transition/animation is currently running. */
- data class Idle(val scene: SceneKey) : ObservableTransitionState()
-
- /** There is a transition animating between two scenes. */
- data class Transition(
- val fromScene: SceneKey,
- val toScene: SceneKey,
- val progress: Flow<Float>,
-
- /**
- * Whether the transition was originally triggered by user input rather than being
- * programmatic. If this value is initially true, it will remain true until the transition
- * fully completes, even if the user input that triggered the transition has ended. Any
- * sub-transitions launched by this one will inherit this value. For example, if the user
- * drags a pointer but does not exceed the threshold required to transition to another
- * scene, this value will remain true after the pointer is no longer touching the screen and
- * will be true in any transition created to animate back to the original position.
- */
- val isInitiatedByUserInput: Boolean,
-
- /**
- * Whether user input is currently driving the transition. For example, if a user is
- * dragging a pointer, this emits true. Once they lift their finger, this emits false while
- * the transition completes/settles.
- */
- val isUserInputOngoing: Flow<Boolean>,
- ) : ObservableTransitionState()
-}
diff --git a/packages/SystemUI/src/com/android/systemui/scene/shared/model/Scene.kt b/packages/SystemUI/src/com/android/systemui/scene/shared/model/Scene.kt
index 05056c1..939d5bc 100644
--- a/packages/SystemUI/src/com/android/systemui/scene/shared/model/Scene.kt
+++ b/packages/SystemUI/src/com/android/systemui/scene/shared/model/Scene.kt
@@ -16,6 +16,9 @@
package com.android.systemui.scene.shared.model
+import com.android.compose.animation.scene.SceneKey
+import com.android.compose.animation.scene.UserAction
+import com.android.compose.animation.scene.UserActionResult
import kotlinx.coroutines.flow.StateFlow
/**
@@ -53,39 +56,3 @@
*/
val destinationScenes: StateFlow<Map<UserAction, UserActionResult>>
}
-
-/** Enumerates all scene framework supported user actions. */
-sealed interface UserAction {
-
- /** The user is scrolling, dragging, swiping, or flinging. */
- data class Swipe(
- /** The direction of the swipe. */
- val direction: Direction,
- /**
- * The edge from which the swipe originated or `null`, if the swipe didn't start close to an
- * edge.
- */
- val fromEdge: Edge? = null,
- /** The number of pointers that were used (for example, one or two fingers). */
- val pointerCount: Int = 1,
- ) : UserAction
-
- /** The user has hit the back button or performed the back navigation gesture. */
- data object Back : UserAction
-}
-
-/** Enumerates all known "cardinal" directions for user actions. */
-enum class Direction {
- LEFT,
- UP,
- RIGHT,
- DOWN,
-}
-
-/** Enumerates all known edges from which a swipe can start. */
-enum class Edge {
- LEFT,
- TOP,
- RIGHT,
- BOTTOM,
-}
diff --git a/packages/SystemUI/src/com/android/systemui/scene/shared/model/SceneContainerConfig.kt b/packages/SystemUI/src/com/android/systemui/scene/shared/model/SceneContainerConfig.kt
index 8204edc..53cdaaa 100644
--- a/packages/SystemUI/src/com/android/systemui/scene/shared/model/SceneContainerConfig.kt
+++ b/packages/SystemUI/src/com/android/systemui/scene/shared/model/SceneContainerConfig.kt
@@ -16,6 +16,8 @@
package com.android.systemui.scene.shared.model
+import com.android.compose.animation.scene.SceneKey
+
/** Models the configuration of the scene container. */
data class SceneContainerConfig(
diff --git a/packages/SystemUI/src/com/android/systemui/scene/shared/model/SceneDataSource.kt b/packages/SystemUI/src/com/android/systemui/scene/shared/model/SceneDataSource.kt
index f7b45e5..0e078d5 100644
--- a/packages/SystemUI/src/com/android/systemui/scene/shared/model/SceneDataSource.kt
+++ b/packages/SystemUI/src/com/android/systemui/scene/shared/model/SceneDataSource.kt
@@ -16,6 +16,8 @@
package com.android.systemui.scene.shared.model
+import com.android.compose.animation.scene.SceneKey
+import com.android.compose.animation.scene.TransitionKey
import kotlinx.coroutines.flow.StateFlow
/** Defines interface for classes that provide access to scene state. */
diff --git a/packages/SystemUI/src/com/android/systemui/scene/shared/model/SceneDataSourceDelegator.kt b/packages/SystemUI/src/com/android/systemui/scene/shared/model/SceneDataSourceDelegator.kt
index a50830c..69dce83 100644
--- a/packages/SystemUI/src/com/android/systemui/scene/shared/model/SceneDataSourceDelegator.kt
+++ b/packages/SystemUI/src/com/android/systemui/scene/shared/model/SceneDataSourceDelegator.kt
@@ -18,6 +18,8 @@
package com.android.systemui.scene.shared.model
+import com.android.compose.animation.scene.SceneKey
+import com.android.compose.animation.scene.TransitionKey
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.dagger.qualifiers.Application
import javax.inject.Inject
diff --git a/packages/SystemUI/src/com/android/systemui/scene/shared/model/SceneKey.kt b/packages/SystemUI/src/com/android/systemui/scene/shared/model/Scenes.kt
similarity index 77%
rename from packages/SystemUI/src/com/android/systemui/scene/shared/model/SceneKey.kt
rename to packages/SystemUI/src/com/android/systemui/scene/shared/model/Scenes.kt
index 609d2b9..73fcca8 100644
--- a/packages/SystemUI/src/com/android/systemui/scene/shared/model/SceneKey.kt
+++ b/packages/SystemUI/src/com/android/systemui/scene/shared/model/Scenes.kt
@@ -16,41 +16,37 @@
package com.android.systemui.scene.shared.model
+import com.android.compose.animation.scene.SceneKey
+
/**
* Keys of all known scenes.
*
* PLEASE KEEP THE KEYS SORTED ALPHABETICALLY.
*/
-sealed class SceneKey(
- private val loggingName: String,
-) {
+object Scenes {
/**
* The bouncer is the scene that displays authentication challenges like PIN, password, or
* pattern.
*/
- object Bouncer : SceneKey("bouncer")
+ @JvmField val Bouncer = SceneKey("bouncer")
/** The communal scene shows the glanceable hub when device is locked and docked. */
- object Communal : SceneKey("communal")
+ @JvmField val Communal = SceneKey("communal")
/**
* "Gone" is not a real scene but rather the absence of scenes when we want to skip showing any
* content from the scene framework.
*/
- object Gone : SceneKey("gone")
+ @JvmField val Gone = SceneKey("gone")
/** The lockscreen is the scene that shows when the device is locked. */
- object Lockscreen : SceneKey("lockscreen")
+ @JvmField val Lockscreen = SceneKey("lockscreen")
/** The quick settings scene shows the quick setting tiles. */
- object QuickSettings : SceneKey("quick_settings")
+ @JvmField val QuickSettings = SceneKey("quick_settings")
/**
* The shade is the scene whose primary purpose is to show a scrollable list of notifications.
*/
- object Shade : SceneKey("shade")
-
- override fun toString(): String {
- return loggingName
- }
+ @JvmField val Shade = SceneKey("shade")
}
diff --git a/packages/SystemUI/src/com/android/systemui/scene/shared/model/TransitionKeys.kt b/packages/SystemUI/src/com/android/systemui/scene/shared/model/TransitionKeys.kt
index 926878c..b91dd04 100644
--- a/packages/SystemUI/src/com/android/systemui/scene/shared/model/TransitionKeys.kt
+++ b/packages/SystemUI/src/com/android/systemui/scene/shared/model/TransitionKeys.kt
@@ -16,6 +16,8 @@
package com.android.systemui.scene.shared.model
+import com.android.compose.animation.scene.TransitionKey
+
/**
* Defines all known named transitions.
*
diff --git a/packages/SystemUI/src/com/android/systemui/scene/shared/model/UserActionResult.kt b/packages/SystemUI/src/com/android/systemui/scene/shared/model/UserActionResult.kt
deleted file mode 100644
index c6ae215..0000000
--- a/packages/SystemUI/src/com/android/systemui/scene/shared/model/UserActionResult.kt
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright (C) 2024 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.systemui.scene.shared.model
-
-data class UserActionResult(
-
- /** The scene we should be transitioning due to the [UserAction]. */
- val toScene: SceneKey,
-
- /**
- * The key of the transition that should be used, if a specific one should be used.
- *
- * If `null`, the transition used will be the corresponding transition from the collection
- * passed into the UI layer.
- */
- val transitionKey: TransitionKey? = null,
-)
diff --git a/packages/SystemUI/src/com/android/systemui/scene/ui/view/SceneWindowRootViewBinder.kt b/packages/SystemUI/src/com/android/systemui/scene/ui/view/SceneWindowRootViewBinder.kt
index ee76c05..7c31ca2 100644
--- a/packages/SystemUI/src/com/android/systemui/scene/ui/view/SceneWindowRootViewBinder.kt
+++ b/packages/SystemUI/src/com/android/systemui/scene/ui/view/SceneWindowRootViewBinder.kt
@@ -16,28 +16,43 @@
package com.android.systemui.scene.ui.view
+import android.content.Context
+import android.graphics.Point
import android.view.View
import android.view.ViewGroup
import android.view.WindowInsets
import androidx.activity.OnBackPressedDispatcher
import androidx.activity.OnBackPressedDispatcherOwner
import androidx.activity.setViewTreeOnBackPressedDispatcherOwner
+import androidx.compose.ui.platform.ComposeView
+import androidx.compose.ui.unit.Dp
+import androidx.compose.ui.unit.dp
import androidx.core.view.isVisible
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.lifecycleScope
import androidx.lifecycle.repeatOnLifecycle
-import com.android.systemui.compose.ComposeFacade
+import com.android.compose.animation.scene.SceneKey
+import com.android.compose.theme.PlatformTheme
+import com.android.internal.policy.ScreenDecorationsUtils
+import com.android.systemui.common.ui.compose.windowinsets.CutoutLocation
+import com.android.systemui.common.ui.compose.windowinsets.DisplayCutout
+import com.android.systemui.common.ui.compose.windowinsets.ScreenDecorProvider
import com.android.systemui.lifecycle.repeatWhenAttached
import com.android.systemui.res.R
import com.android.systemui.scene.shared.flag.SceneContainerFlags
import com.android.systemui.scene.shared.model.Scene
import com.android.systemui.scene.shared.model.SceneContainerConfig
import com.android.systemui.scene.shared.model.SceneDataSourceDelegator
-import com.android.systemui.scene.shared.model.SceneKey
+import com.android.systemui.scene.ui.composable.ComposableScene
+import com.android.systemui.scene.ui.composable.SceneContainer
import com.android.systemui.scene.ui.viewmodel.SceneContainerViewModel
import com.android.systemui.statusbar.notification.stack.shared.flexiNotifsEnabled
import com.android.systemui.statusbar.notification.stack.ui.view.SharedNotificationContainer
+import kotlinx.coroutines.CoroutineScope
+import kotlinx.coroutines.flow.SharingStarted
import kotlinx.coroutines.flow.StateFlow
+import kotlinx.coroutines.flow.map
+import kotlinx.coroutines.flow.stateIn
import kotlinx.coroutines.launch
object SceneWindowRootViewBinder {
@@ -83,7 +98,7 @@
)
view.addView(
- ComposeFacade.createSceneContainerView(
+ createSceneContainerView(
scope = this,
context = view.context,
viewModel = viewModel,
@@ -120,4 +135,74 @@
}
}
}
+
+ private fun createSceneContainerView(
+ scope: CoroutineScope,
+ context: Context,
+ viewModel: SceneContainerViewModel,
+ windowInsets: StateFlow<WindowInsets?>,
+ sceneByKey: Map<SceneKey, Scene>,
+ dataSourceDelegator: SceneDataSourceDelegator,
+ ): View {
+ return ComposeView(context).apply {
+ setContent {
+ PlatformTheme {
+ ScreenDecorProvider(
+ displayCutout = displayCutoutFromWindowInsets(scope, context, windowInsets),
+ screenCornerRadius = ScreenDecorationsUtils.getWindowCornerRadius(context)
+ ) {
+ SceneContainer(
+ viewModel = viewModel,
+ sceneByKey =
+ sceneByKey.mapValues { (_, scene) -> scene as ComposableScene },
+ dataSourceDelegator = dataSourceDelegator,
+ )
+ }
+ }
+ }
+ }
+ }
+
+ // TODO(b/298525212): remove once Compose exposes window inset bounds.
+ private fun displayCutoutFromWindowInsets(
+ scope: CoroutineScope,
+ context: Context,
+ windowInsets: StateFlow<WindowInsets?>,
+ ): StateFlow<DisplayCutout> =
+ windowInsets
+ .map {
+ val boundingRect = it?.displayCutout?.boundingRectTop
+ val width = boundingRect?.let { boundingRect.right - boundingRect.left } ?: 0
+ val left = boundingRect?.left?.toDp(context) ?: 0.dp
+ val top = boundingRect?.top?.toDp(context) ?: 0.dp
+ val right = boundingRect?.right?.toDp(context) ?: 0.dp
+ val bottom = boundingRect?.bottom?.toDp(context) ?: 0.dp
+ val location =
+ when {
+ width <= 0f -> CutoutLocation.NONE
+ left <= 0.dp -> CutoutLocation.LEFT
+ right >= getDisplayWidth(context) -> CutoutLocation.RIGHT
+ else -> CutoutLocation.CENTER
+ }
+ DisplayCutout(
+ left,
+ top,
+ right,
+ bottom,
+ location,
+ )
+ }
+ .stateIn(scope, SharingStarted.WhileSubscribed(), DisplayCutout())
+
+ // TODO(b/298525212): remove once Compose exposes window inset bounds.
+ private fun getDisplayWidth(context: Context): Dp {
+ val point = Point()
+ checkNotNull(context.display).getRealSize(point)
+ return point.x.dp
+ }
+
+ // TODO(b/298525212): remove once Compose exposes window inset bounds.
+ private fun Int.toDp(context: Context): Dp {
+ return (this.toFloat() / context.resources.displayMetrics.density).dp
+ }
}
diff --git a/packages/SystemUI/src/com/android/systemui/scene/ui/view/WindowRootView.kt b/packages/SystemUI/src/com/android/systemui/scene/ui/view/WindowRootView.kt
index 4c2c979..22645c4 100644
--- a/packages/SystemUI/src/com/android/systemui/scene/ui/view/WindowRootView.kt
+++ b/packages/SystemUI/src/com/android/systemui/scene/ui/view/WindowRootView.kt
@@ -25,7 +25,7 @@
import android.view.WindowInsets
import android.widget.FrameLayout
import androidx.core.view.updateMargins
-import com.android.systemui.compose.ComposeFacade
+import com.android.systemui.compose.ComposeInitializer
import com.android.systemui.res.R
/** A view that can serve as the root of the main SysUI window. */
@@ -45,16 +45,16 @@
override fun onAttachedToWindow() {
super.onAttachedToWindow()
- if (ComposeFacade.isComposeAvailable() && isRoot()) {
- ComposeFacade.composeInitializer().onAttachedToWindow(this)
+ if (isRoot()) {
+ ComposeInitializer.onAttachedToWindow(this)
}
}
override fun onDetachedFromWindow() {
super.onDetachedFromWindow()
- if (ComposeFacade.isComposeAvailable() && isRoot()) {
- ComposeFacade.composeInitializer().onDetachedFromWindow(this)
+ if (isRoot()) {
+ ComposeInitializer.onDetachedFromWindow(this)
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/scene/ui/viewmodel/SceneContainerViewModel.kt b/packages/SystemUI/src/com/android/systemui/scene/ui/viewmodel/SceneContainerViewModel.kt
index 91861aa..231b284 100644
--- a/packages/SystemUI/src/com/android/systemui/scene/ui/viewmodel/SceneContainerViewModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/scene/ui/viewmodel/SceneContainerViewModel.kt
@@ -17,13 +17,14 @@
package com.android.systemui.scene.ui.viewmodel
import android.view.MotionEvent
+import com.android.compose.animation.scene.ObservableTransitionState
+import com.android.compose.animation.scene.SceneKey
import com.android.systemui.classifier.Classifier
import com.android.systemui.classifier.domain.interactor.FalsingInteractor
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.power.domain.interactor.PowerInteractor
import com.android.systemui.scene.domain.interactor.SceneInteractor
-import com.android.systemui.scene.shared.model.ObservableTransitionState
-import com.android.systemui.scene.shared.model.SceneKey
+import com.android.systemui.scene.shared.model.Scenes
import javax.inject.Inject
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.StateFlow
@@ -96,10 +97,10 @@
fun canChangeScene(toScene: SceneKey): Boolean {
val interactionTypeOrNull =
when (toScene) {
- SceneKey.Bouncer -> Classifier.BOUNCER_UNLOCK
- SceneKey.Gone -> Classifier.UNLOCK
- SceneKey.Shade -> Classifier.NOTIFICATION_DRAG_DOWN
- SceneKey.QuickSettings -> Classifier.QUICK_SETTINGS
+ Scenes.Bouncer -> Classifier.BOUNCER_UNLOCK
+ Scenes.Gone -> Classifier.UNLOCK
+ Scenes.Shade -> Classifier.NOTIFICATION_DRAG_DOWN
+ Scenes.QuickSettings -> Classifier.QUICK_SETTINGS
else -> null
}
@@ -109,7 +110,7 @@
val isFalseTouch = falsingInteractor.isFalseTouch(interactionType)
// Only enforce falsing if moving from the lockscreen scene to a new scene.
- val fromLockscreenScene = currentScene.value == SceneKey.Lockscreen
+ val fromLockscreenScene = currentScene.value == Scenes.Lockscreen
!fromLockscreenScene || !isFalseTouch
}
diff --git a/packages/SystemUI/src/com/android/systemui/settings/brightness/BrightnessController.java b/packages/SystemUI/src/com/android/systemui/settings/brightness/BrightnessController.java
index 6af9b73..e92630f 100644
--- a/packages/SystemUI/src/com/android/systemui/settings/brightness/BrightnessController.java
+++ b/packages/SystemUI/src/com/android/systemui/settings/brightness/BrightnessController.java
@@ -55,15 +55,15 @@
import com.android.systemui.statusbar.policy.BrightnessMirrorController;
import com.android.systemui.util.settings.SecureSettings;
-import java.util.concurrent.Executor;
-
import dagger.assisted.Assisted;
import dagger.assisted.AssistedFactory;
import dagger.assisted.AssistedInject;
+import java.util.concurrent.Executor;
+
public class BrightnessController implements ToggleSlider.Listener, MirroredBrightnessController {
private static final String TAG = "CentralSurfaces.BrightnessController";
- private static final int SLIDER_ANIMATION_DURATION = 3000;
+ private static final int SLIDER_ANIMATION_DURATION = 1000;
private static final int MSG_UPDATE_SLIDER = 1;
private static final int MSG_ATTACH_LISTENER = 2;
diff --git a/packages/SystemUI/src/com/android/systemui/shade/GlanceableHubContainerController.kt b/packages/SystemUI/src/com/android/systemui/shade/GlanceableHubContainerController.kt
index df845f5..d3869ba 100644
--- a/packages/SystemUI/src/com/android/systemui/shade/GlanceableHubContainerController.kt
+++ b/packages/SystemUI/src/com/android/systemui/shade/GlanceableHubContainerController.kt
@@ -23,11 +23,12 @@
import android.view.MotionEvent
import android.view.View
import android.view.ViewGroup
+import androidx.compose.ui.platform.ComposeView
+import com.android.compose.theme.PlatformTheme
import com.android.internal.annotations.VisibleForTesting
import com.android.systemui.communal.domain.interactor.CommunalInteractor
+import com.android.systemui.communal.ui.compose.CommunalContainer
import com.android.systemui.communal.ui.viewmodel.CommunalViewModel
-import com.android.systemui.compose.ComposeFacade.createCommunalContainer
-import com.android.systemui.compose.ComposeFacade.isComposeAvailable
import com.android.systemui.keyguard.domain.interactor.KeyguardTransitionInteractor
import com.android.systemui.keyguard.shared.model.KeyguardState
import com.android.systemui.res.R
@@ -35,7 +36,6 @@
import com.android.systemui.util.kotlin.collectFlow
import javax.inject.Inject
import kotlinx.coroutines.flow.Flow
-import kotlinx.coroutines.flow.flowOf
/**
* Controller that's responsible for the glanceable hub container view and its touch handling.
@@ -107,8 +107,7 @@
private var shadeShowing = false
/** Returns a flow that tracks whether communal hub is available. */
- fun communalAvailable(): Flow<Boolean> =
- if (isComposeAvailable()) communalInteractor.isCommunalAvailable else flowOf(false)
+ fun communalAvailable(): Flow<Boolean> = communalInteractor.isCommunalAvailable
/**
* Creates the container view containing the glanceable hub UI.
@@ -118,7 +117,11 @@
fun initView(
context: Context,
): View {
- return initView(createCommunalContainer(context, communalViewModel))
+ return initView(
+ ComposeView(context).apply {
+ setContent { PlatformTheme { CommunalContainer(viewModel = communalViewModel) } }
+ }
+ )
}
/** Override for testing. */
diff --git a/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java b/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java
index 7bcb1da..cf7c3e0 100644
--- a/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java
+++ b/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java
@@ -111,8 +111,6 @@
import com.android.systemui.DejankUtils;
import com.android.systemui.Dumpable;
import com.android.systemui.Gefingerpoken;
-import com.android.systemui.animation.ActivityTransitionAnimator;
-import com.android.systemui.animation.TransitionAnimator;
import com.android.systemui.biometrics.AuthController;
import com.android.systemui.bouncer.domain.interactor.AlternateBouncerInteractor;
import com.android.systemui.bouncer.shared.constants.KeyguardBouncerConstants;
@@ -219,7 +217,6 @@
import com.android.systemui.statusbar.phone.StatusBarTouchableRegionManager;
import com.android.systemui.statusbar.phone.TapAgainViewController;
import com.android.systemui.statusbar.phone.UnlockedScreenOffAnimationController;
-import com.android.systemui.statusbar.phone.fragment.CollapsedStatusBarFragment;
import com.android.systemui.statusbar.policy.ConfigurationController;
import com.android.systemui.statusbar.policy.HeadsUpManager;
import com.android.systemui.statusbar.policy.KeyguardQsUserSwitchController;
@@ -259,10 +256,6 @@
private static final boolean DEBUG_DRAWABLE = false;
/** The parallax amount of the quick settings translation when dragging down the panel. */
public static final float QS_PARALLAX_AMOUNT = 0.175f;
- private static final long ANIMATION_DELAY_ICON_FADE_IN =
- ActivityTransitionAnimator.TIMINGS.getTotalDuration()
- - CollapsedStatusBarFragment.FADE_IN_DURATION
- - CollapsedStatusBarFragment.FADE_IN_DELAY - 48;
private static final int NO_FIXED_DURATION = -1;
private static final long SHADE_OPEN_SPRING_OUT_DURATION = 350L;
private static final long SHADE_OPEN_SPRING_BACK_DURATION = 400L;
@@ -463,7 +456,6 @@
*/
private float mLinearDarkAmount;
private boolean mPulsing;
- private boolean mHideIconsDuringLaunchAnimation = true;
private int mStackScrollerMeasuringPass;
/** Non-null if a heads-up notification's position is being tracked. */
@Nullable
@@ -2053,7 +2045,6 @@
mView.animate().cancel();
}
- @Override
public void expandToQs() {
if (mQsController.isExpansionEnabled()) {
mQsController.setExpandImmediate(true);
@@ -2820,7 +2811,6 @@
mQsController.setListening(listening);
}
- @Override
public void expand(boolean animate) {
if (isFullyCollapsed() || isCollapsing()) {
mInstantExpanding = true;
@@ -3159,10 +3149,9 @@
return mUnlockedScreenOffAnimationController.isAnimationPlaying();
}
- @Override
public boolean shouldHideStatusBarIconsWhenExpanded() {
if (isLaunchingActivity()) {
- return mHideIconsDuringLaunchAnimation;
+ return false;
}
if (mHeadsUpAppearanceController != null
&& mHeadsUpAppearanceController.shouldBeVisible()) {
@@ -3260,18 +3249,6 @@
}
@Override
- public void applyLaunchAnimationProgress(float linearProgress) {
- boolean hideIcons = TransitionAnimator.getProgress(ActivityTransitionAnimator.TIMINGS,
- linearProgress, ANIMATION_DELAY_ICON_FADE_IN, 100) == 0.0f;
- if (hideIcons != mHideIconsDuringLaunchAnimation) {
- mHideIconsDuringLaunchAnimation = hideIcons;
- if (!hideIcons) {
- mCommandQueue.recomputeDisableFlags(mDisplayId, true /* animate */);
- }
- }
- }
-
- @Override
public void performHapticFeedback(int constant) {
mVibratorHelper.performHapticFeedback(mView, constant);
}
@@ -3482,7 +3459,6 @@
ipw.print("mInterpolatedDarkAmount="); ipw.println(mInterpolatedDarkAmount);
ipw.print("mLinearDarkAmount="); ipw.println(mLinearDarkAmount);
ipw.print("mPulsing="); ipw.println(mPulsing);
- ipw.print("mHideIconsDuringLaunchAnimation="); ipw.println(mHideIconsDuringLaunchAnimation);
ipw.print("mStackScrollerMeasuringPass="); ipw.println(mStackScrollerMeasuringPass);
ipw.print("mPanelAlpha="); ipw.println(mPanelAlpha);
ipw.print("mBottomAreaShadeAlpha="); ipw.println(mBottomAreaShadeAlpha);
@@ -4174,7 +4150,6 @@
return mShadeRepository.getLegacyIsClosing().getValue();
}
- @Override
public void collapseWithDuration(int animationDuration) {
mFixedDuration = animationDuration;
collapse(false /* delayed */, 1.0f /* speedUpFactor */);
diff --git a/packages/SystemUI/src/com/android/systemui/shade/ShadeController.java b/packages/SystemUI/src/com/android/systemui/shade/ShadeController.java
index ec4b23a..0a57b64 100644
--- a/packages/SystemUI/src/com/android/systemui/shade/ShadeController.java
+++ b/packages/SystemUI/src/com/android/systemui/shade/ShadeController.java
@@ -78,6 +78,14 @@
*/
void animateCollapseShade(int flags, boolean force, boolean delayed, float speedUpFactor);
+ /**
+ * Collapses the shade with an animation duration in milliseconds.
+ *
+ * @deprecated use animateCollapseShade with a speed up factor instead
+ */
+ @Deprecated
+ void collapseWithDuration(int animationDuration);
+
/** Expand the shade with an animation. */
void animateExpandShade();
diff --git a/packages/SystemUI/src/com/android/systemui/shade/ShadeControllerEmptyImpl.kt b/packages/SystemUI/src/com/android/systemui/shade/ShadeControllerEmptyImpl.kt
index 08a0c93..093690f 100644
--- a/packages/SystemUI/src/com/android/systemui/shade/ShadeControllerEmptyImpl.kt
+++ b/packages/SystemUI/src/com/android/systemui/shade/ShadeControllerEmptyImpl.kt
@@ -33,6 +33,7 @@
delayed: Boolean,
speedUpFactor: Float
) {}
+ override fun collapseWithDuration(animationDuration: Int) {}
override fun animateExpandShade() {}
override fun animateExpandQs() {}
override fun postAnimateCollapseShade() {}
diff --git a/packages/SystemUI/src/com/android/systemui/shade/ShadeControllerImpl.java b/packages/SystemUI/src/com/android/systemui/shade/ShadeControllerImpl.java
index e6555f2e..d99d607 100644
--- a/packages/SystemUI/src/com/android/systemui/shade/ShadeControllerImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/shade/ShadeControllerImpl.java
@@ -147,6 +147,11 @@
}
@Override
+ public void collapseWithDuration(int animationDuration) {
+ mNpvc.get().collapseWithDuration(animationDuration);
+ }
+
+ @Override
protected void expandToNotifications() {
getNpvc().expandToNotifications();
}
@@ -221,7 +226,6 @@
}
}
-
@Override
public void collapseShade(boolean animate) {
if (animate) {
diff --git a/packages/SystemUI/src/com/android/systemui/shade/ShadeControllerSceneImpl.kt b/packages/SystemUI/src/com/android/systemui/shade/ShadeControllerSceneImpl.kt
index 6a2a6a4..27168a7 100644
--- a/packages/SystemUI/src/com/android/systemui/shade/ShadeControllerSceneImpl.kt
+++ b/packages/SystemUI/src/com/android/systemui/shade/ShadeControllerSceneImpl.kt
@@ -17,6 +17,7 @@
package com.android.systemui.shade
import android.view.MotionEvent
+import com.android.compose.animation.scene.SceneKey
import com.android.systemui.assist.AssistManager
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.dagger.qualifiers.Background
@@ -25,7 +26,7 @@
import com.android.systemui.log.LogBuffer
import com.android.systemui.log.dagger.ShadeTouchLog
import com.android.systemui.scene.domain.interactor.SceneInteractor
-import com.android.systemui.scene.shared.model.SceneKey
+import com.android.systemui.scene.shared.model.Scenes
import com.android.systemui.scene.shared.model.TransitionKeys.CollapseShadeInstantly
import com.android.systemui.scene.shared.model.TransitionKeys.SlightlyFasterShadeCollapse
import com.android.systemui.shade.ShadeController.ShadeVisibilityListener
@@ -96,7 +97,7 @@
}
override fun instantCollapseShade() {
- // TODO(b/315921512) add support for instant transition
+ // TODO(b/325602936) add support for instant transition
sceneInteractor.changeScene(
getCollapseDestinationScene(),
"hide shade",
@@ -121,7 +122,7 @@
// release focus immediately to kick off focus change transition
notificationShadeWindowController.setNotificationShadeFocusable(false)
notificationStackScrollLayout.cancelExpandHelper()
- sceneInteractor.changeScene(SceneKey.Shade, "ShadeController.animateExpandShade")
+ sceneInteractor.changeScene(Scenes.Shade, "ShadeController.animateExpandShade")
if (delayed) {
scope.launch {
delay(125)
@@ -133,6 +134,11 @@
}
}
+ override fun collapseWithDuration(animationDuration: Int) {
+ // TODO(b/300258424) inline this. The only caller uses the default duration.
+ animateCollapseShade()
+ }
+
private fun animateCollapseShadeInternal() {
sceneInteractor.changeScene(
getCollapseDestinationScene(),
@@ -143,9 +149,9 @@
private fun getCollapseDestinationScene(): SceneKey {
return if (deviceEntryInteractor.isDeviceEntered.value) {
- SceneKey.Gone
+ Scenes.Gone
} else {
- SceneKey.Lockscreen
+ Scenes.Lockscreen
}
}
@@ -183,11 +189,11 @@
}
override fun expandToNotifications() {
- sceneInteractor.changeScene(SceneKey.Shade, "ShadeController.animateExpandShade")
+ sceneInteractor.changeScene(Scenes.Shade, "ShadeController.animateExpandShade")
}
override fun expandToQs() {
- sceneInteractor.changeScene(SceneKey.QuickSettings, "ShadeController.animateExpandQs")
+ sceneInteractor.changeScene(Scenes.QuickSettings, "ShadeController.animateExpandQs")
}
override fun setVisibilityListener(listener: ShadeVisibilityListener) {
@@ -237,7 +243,7 @@
}
override fun isExpandedVisible(): Boolean {
- return sceneInteractor.currentScene.value != SceneKey.Gone
+ return sceneInteractor.currentScene.value != Scenes.Gone
}
override fun onStatusBarTouch(event: MotionEvent) {
diff --git a/packages/SystemUI/src/com/android/systemui/shade/ShadeViewController.kt b/packages/SystemUI/src/com/android/systemui/shade/ShadeViewController.kt
index 44c6a82..7a1637e 100644
--- a/packages/SystemUI/src/com/android/systemui/shade/ShadeViewController.kt
+++ b/packages/SystemUI/src/com/android/systemui/shade/ShadeViewController.kt
@@ -31,12 +31,6 @@
* @see NotificationPanelViewController
*/
interface ShadeViewController {
- /** Expand the shade either animated or instantly. */
- fun expand(animate: Boolean)
-
- /** Animates to an expanded shade with QS expanded. If the shade starts expanded, expands QS. */
- fun expandToQs()
-
/** Returns whether the shade is expanding or collapsing itself or quick settings. */
val isExpandingOrCollapsing: Boolean
@@ -58,9 +52,6 @@
/** Collapses the shade. */
fun collapse(animate: Boolean, delayed: Boolean, speedUpFactor: Float)
- /** Collapses the shade with an animation duration in milliseconds. */
- fun collapseWithDuration(animationDuration: Int)
-
/** Collapses the shade instantly without animation. */
fun instantCollapse()
@@ -102,9 +93,6 @@
/** Returns the StatusBarState. */
val barState: Int
- /** Sets the amount of progress in the status bar launch animation. */
- fun applyLaunchAnimationProgress(linearProgress: Float)
-
/** Sets the alpha value of the shade to a value between 0 and 255. */
fun setAlpha(alpha: Int, animate: Boolean)
diff --git a/packages/SystemUI/src/com/android/systemui/shade/ShadeViewControllerEmptyImpl.kt b/packages/SystemUI/src/com/android/systemui/shade/ShadeViewControllerEmptyImpl.kt
index 7a181f1..3be3f6b 100644
--- a/packages/SystemUI/src/com/android/systemui/shade/ShadeViewControllerEmptyImpl.kt
+++ b/packages/SystemUI/src/com/android/systemui/shade/ShadeViewControllerEmptyImpl.kt
@@ -28,8 +28,6 @@
/** Empty implementation of ShadeViewController for variants with no shade. */
class ShadeViewControllerEmptyImpl @Inject constructor() :
ShadeViewController, ShadeBackActionInteractor, ShadeLockscreenInteractor {
- override fun expand(animate: Boolean) {}
- override fun expandToQs() {}
override fun expandToNotifications() {}
override val isExpandingOrCollapsing: Boolean = false
override val isExpanded: Boolean = false
@@ -37,7 +35,6 @@
override val isShadeFullyExpanded: Boolean = false
override fun collapse(delayed: Boolean, speedUpFactor: Float) {}
override fun collapse(animate: Boolean, delayed: Boolean, speedUpFactor: Float) {}
- override fun collapseWithDuration(animationDuration: Int) {}
override fun instantCollapse() {}
override fun animateCollapseQs(fullyCollapse: Boolean) {}
override fun canBeCollapsed(): Boolean = false
@@ -55,7 +52,6 @@
override fun dozeTimeTick() {}
override fun resetViews(animate: Boolean) {}
override val barState: Int = 0
- override fun applyLaunchAnimationProgress(linearProgress: Float) {}
override fun closeUserSwitcherIfOpen(): Boolean {
return false
}
diff --git a/packages/SystemUI/src/com/android/systemui/shade/domain/interactor/ShadeAnimationInteractorSceneContainerImpl.kt b/packages/SystemUI/src/com/android/systemui/shade/domain/interactor/ShadeAnimationInteractorSceneContainerImpl.kt
index 1ee6d38..eaac8ae 100644
--- a/packages/SystemUI/src/com/android/systemui/shade/domain/interactor/ShadeAnimationInteractorSceneContainerImpl.kt
+++ b/packages/SystemUI/src/com/android/systemui/shade/domain/interactor/ShadeAnimationInteractorSceneContainerImpl.kt
@@ -16,10 +16,10 @@
package com.android.systemui.shade.domain.interactor
+import com.android.compose.animation.scene.ObservableTransitionState
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.scene.domain.interactor.SceneInteractor
-import com.android.systemui.scene.shared.model.ObservableTransitionState
-import com.android.systemui.scene.shared.model.SceneKey
+import com.android.systemui.scene.shared.model.Scenes
import com.android.systemui.shade.data.repository.ShadeAnimationRepository
import javax.inject.Inject
import kotlinx.coroutines.ExperimentalCoroutinesApi
@@ -44,10 +44,10 @@
is ObservableTransitionState.Idle -> flowOf(false)
is ObservableTransitionState.Transition ->
if (
- (state.fromScene == SceneKey.Shade &&
- state.toScene != SceneKey.QuickSettings) ||
- (state.fromScene == SceneKey.QuickSettings &&
- state.toScene != SceneKey.Shade)
+ (state.fromScene == Scenes.Shade &&
+ state.toScene != Scenes.QuickSettings) ||
+ (state.fromScene == Scenes.QuickSettings &&
+ state.toScene != Scenes.Shade)
) {
state.isUserInputOngoing.map { !it }
} else {
diff --git a/packages/SystemUI/src/com/android/systemui/shade/domain/interactor/ShadeBackActionInteractorImpl.kt b/packages/SystemUI/src/com/android/systemui/shade/domain/interactor/ShadeBackActionInteractorImpl.kt
index a2e2598..3a8ba7a 100644
--- a/packages/SystemUI/src/com/android/systemui/shade/domain/interactor/ShadeBackActionInteractorImpl.kt
+++ b/packages/SystemUI/src/com/android/systemui/shade/domain/interactor/ShadeBackActionInteractorImpl.kt
@@ -18,7 +18,7 @@
import com.android.systemui.deviceentry.domain.interactor.DeviceEntryInteractor
import com.android.systemui.scene.domain.interactor.SceneInteractor
-import com.android.systemui.scene.shared.model.SceneKey
+import com.android.systemui.scene.shared.model.Scenes
import javax.inject.Inject
import kotlinx.coroutines.ExperimentalCoroutinesApi
@@ -36,12 +36,12 @@
val key =
if (fullyCollapse) {
if (deviceEntryInteractor.isDeviceEntered.value) {
- SceneKey.Gone
+ Scenes.Gone
} else {
- SceneKey.Lockscreen
+ Scenes.Lockscreen
}
} else {
- SceneKey.Shade
+ Scenes.Shade
}
sceneInteractor.changeScene(key, "animateCollapseQs")
}
diff --git a/packages/SystemUI/src/com/android/systemui/shade/domain/interactor/ShadeInteractorSceneContainerImpl.kt b/packages/SystemUI/src/com/android/systemui/shade/domain/interactor/ShadeInteractorSceneContainerImpl.kt
index 08f2c40..67cac3d 100644
--- a/packages/SystemUI/src/com/android/systemui/shade/domain/interactor/ShadeInteractorSceneContainerImpl.kt
+++ b/packages/SystemUI/src/com/android/systemui/shade/domain/interactor/ShadeInteractorSceneContainerImpl.kt
@@ -16,11 +16,12 @@
package com.android.systemui.shade.domain.interactor
+import com.android.compose.animation.scene.ObservableTransitionState
+import com.android.compose.animation.scene.SceneKey
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.dagger.qualifiers.Application
import com.android.systemui.scene.domain.interactor.SceneInteractor
-import com.android.systemui.scene.shared.model.ObservableTransitionState
-import com.android.systemui.scene.shared.model.SceneKey
+import com.android.systemui.scene.shared.model.Scenes
import com.android.systemui.statusbar.notification.stack.domain.interactor.SharedNotificationContainerInteractor
import javax.inject.Inject
import kotlinx.coroutines.CoroutineScope
@@ -45,9 +46,9 @@
sceneInteractor: SceneInteractor,
sharedNotificationContainerInteractor: SharedNotificationContainerInteractor,
) : BaseShadeInteractor {
- override val shadeExpansion: Flow<Float> = sceneBasedExpansion(sceneInteractor, SceneKey.Shade)
+ override val shadeExpansion: Flow<Float> = sceneBasedExpansion(sceneInteractor, Scenes.Shade)
- private val sceneBasedQsExpansion = sceneBasedExpansion(sceneInteractor, SceneKey.QuickSettings)
+ private val sceneBasedQsExpansion = sceneBasedExpansion(sceneInteractor, Scenes.QuickSettings)
override val qsExpansion: StateFlow<Float> =
combine(
@@ -75,7 +76,7 @@
when (state) {
is ObservableTransitionState.Idle -> false
is ObservableTransitionState.Transition ->
- state.toScene == SceneKey.QuickSettings && state.fromScene != SceneKey.Shade
+ state.toScene == Scenes.QuickSettings && state.fromScene != Scenes.Shade
}
}
.distinctUntilChanged()
@@ -84,7 +85,7 @@
sceneInteractor.transitionState
.map { state ->
when (state) {
- is ObservableTransitionState.Idle -> state.scene == SceneKey.QuickSettings
+ is ObservableTransitionState.Idle -> state.scene == Scenes.QuickSettings
is ObservableTransitionState.Transition -> false
}
}
@@ -100,10 +101,10 @@
.stateIn(scope, SharingStarted.Eagerly, false)
override val isUserInteractingWithShade: Flow<Boolean> =
- sceneBasedInteracting(sceneInteractor, SceneKey.Shade)
+ sceneBasedInteracting(sceneInteractor, Scenes.Shade)
override val isUserInteractingWithQs: Flow<Boolean> =
- sceneBasedInteracting(sceneInteractor, SceneKey.QuickSettings)
+ sceneBasedInteracting(sceneInteractor, Scenes.QuickSettings)
/**
* Returns a flow that uses scene transition progress to and from a scene that is pulled down
diff --git a/packages/SystemUI/src/com/android/systemui/shade/domain/interactor/ShadeLockscreenInteractorImpl.kt b/packages/SystemUI/src/com/android/systemui/shade/domain/interactor/ShadeLockscreenInteractorImpl.kt
index 21a782e..1f78ae8 100644
--- a/packages/SystemUI/src/com/android/systemui/shade/domain/interactor/ShadeLockscreenInteractorImpl.kt
+++ b/packages/SystemUI/src/com/android/systemui/shade/domain/interactor/ShadeLockscreenInteractorImpl.kt
@@ -19,7 +19,7 @@
import com.android.keyguard.LockIconViewController
import com.android.systemui.dagger.qualifiers.Background
import com.android.systemui.scene.domain.interactor.SceneInteractor
-import com.android.systemui.scene.shared.model.SceneKey
+import com.android.systemui.scene.shared.model.Scenes
import com.android.systemui.shade.ShadeLockscreenInteractor
import javax.inject.Inject
import kotlinx.coroutines.CoroutineScope
@@ -87,7 +87,7 @@
private fun changeToShadeScene() {
sceneInteractor.changeScene(
- SceneKey.Shade,
+ Scenes.Shade,
"ShadeLockscreenInteractorImpl.expandToNotifications",
)
}
diff --git a/packages/SystemUI/src/com/android/systemui/shade/ui/viewmodel/ShadeSceneViewModel.kt b/packages/SystemUI/src/com/android/systemui/shade/ui/viewmodel/ShadeSceneViewModel.kt
index 38358a8..c9aa51c 100644
--- a/packages/SystemUI/src/com/android/systemui/shade/ui/viewmodel/ShadeSceneViewModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/shade/ui/viewmodel/ShadeSceneViewModel.kt
@@ -16,12 +16,13 @@
package com.android.systemui.shade.ui.viewmodel
+import com.android.compose.animation.scene.SceneKey
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.dagger.qualifiers.Application
import com.android.systemui.deviceentry.domain.interactor.DeviceEntryInteractor
import com.android.systemui.media.controls.domain.pipeline.MediaDataManager
import com.android.systemui.qs.ui.adapter.QSSceneAdapter
-import com.android.systemui.scene.shared.model.SceneKey
+import com.android.systemui.scene.shared.model.Scenes
import com.android.systemui.statusbar.notification.stack.ui.viewmodel.NotificationsPlaceholderViewModel
import javax.inject.Inject
import kotlinx.coroutines.CoroutineScope
@@ -67,7 +68,7 @@
/** Whether or not the shade container should be clickable. */
val isClickable: StateFlow<Boolean> =
upDestinationSceneKey
- .map { it == SceneKey.Lockscreen }
+ .map { it == Scenes.Lockscreen }
.stateIn(
scope = applicationScope,
started = SharingStarted.WhileSubscribed(),
@@ -82,9 +83,9 @@
canSwipeToDismiss: Boolean?,
): SceneKey {
return when {
- canSwipeToDismiss == true -> SceneKey.Lockscreen
- isUnlocked -> SceneKey.Gone
- else -> SceneKey.Lockscreen
+ canSwipeToDismiss == true -> Scenes.Lockscreen
+ isUnlocked -> Scenes.Gone
+ else -> Scenes.Lockscreen
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarStateControllerImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarStateControllerImpl.java
index 36fc9bb..e0dd7f0 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarStateControllerImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarStateControllerImpl.java
@@ -36,6 +36,7 @@
import androidx.annotation.NonNull;
import com.android.app.animation.Interpolators;
+import com.android.compose.animation.scene.SceneKey;
import com.android.internal.annotations.GuardedBy;
import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.jank.InteractionJankMonitor;
@@ -49,7 +50,7 @@
import com.android.systemui.res.R;
import com.android.systemui.scene.domain.interactor.SceneInteractor;
import com.android.systemui.scene.shared.flag.SceneContainerFlag;
-import com.android.systemui.scene.shared.model.SceneKey;
+import com.android.systemui.scene.shared.model.Scenes;
import com.android.systemui.shade.domain.interactor.ShadeInteractor;
import com.android.systemui.statusbar.notification.stack.StackStateAnimator;
import com.android.systemui.statusbar.policy.CallbackController;
@@ -659,11 +660,11 @@
}
private static final Map<SceneKey, Integer> sStatusBarStateByLockedSceneKey = Map.of(
- SceneKey.Lockscreen.INSTANCE, StatusBarState.KEYGUARD,
- SceneKey.Bouncer.INSTANCE, StatusBarState.KEYGUARD,
- SceneKey.Communal.INSTANCE, StatusBarState.KEYGUARD,
- SceneKey.Shade.INSTANCE, StatusBarState.SHADE_LOCKED,
- SceneKey.QuickSettings.INSTANCE, StatusBarState.SHADE_LOCKED
+ Scenes.Lockscreen, StatusBarState.KEYGUARD,
+ Scenes.Bouncer, StatusBarState.KEYGUARD,
+ Scenes.Communal, StatusBarState.KEYGUARD,
+ Scenes.Shade, StatusBarState.SHADE_LOCKED,
+ Scenes.QuickSettings, StatusBarState.SHADE_LOCKED
);
/**
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java
index 8d53022..5f3a83a 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java
@@ -1761,7 +1761,7 @@
* Constructs an ExpandableNotificationRow. Used by layout inflation.
*
* @param context passed to image resolver
- * @param attrs attributes used to initialize parent view
+ * @param attrs attributes used to initialize parent view
*/
public ExpandableNotificationRow(Context context, AttributeSet attrs) {
this(context, attrs, context);
@@ -1775,9 +1775,9 @@
* AsyncLayoutFactory} in {@link RowInflaterTask}.
*
* @param context context context of the view
- * @param attrs attributes used to initialize parent view
- * @param entry notification that the row will be associated to (determines the user for the
- * ImageResolver)
+ * @param attrs attributes used to initialize parent view
+ * @param entry notification that the row will be associated to (determines the user for the
+ * ImageResolver)
*/
public ExpandableNotificationRow(Context context, AttributeSet attrs, NotificationEntry entry) {
this(context, attrs, userContextForEntry(context, entry));
@@ -2028,7 +2028,7 @@
return traceTag;
}
- return traceTag + "(" + getEntry().getNotificationStyle() + ")";
+ return traceTag + "(" + getEntry().getNotificationStyle() + ")";
}
@Override
@@ -3083,6 +3083,7 @@
onStartedRunnable.run();
}
}
+
@Override
public void onAnimationEnd(Animator animation) {
ExpandableNotificationRow.super.performRemoveAnimation(
@@ -3777,6 +3778,9 @@
pw.print(", privateShowing: " + (showingLayout == mPrivateLayout));
pw.print(", mShowNoBackground: " + mShowNoBackground);
pw.println();
+ if (NotificationContentView.INCLUDE_HEIGHTS_TO_DUMP) {
+ dumpHeights(pw);
+ }
showingLayout.dump(pw, args);
if (getViewState() != null) {
@@ -3820,6 +3824,34 @@
});
}
+ private void dumpHeights(IndentingPrintWriter pw) {
+ pw.print("Heights: ");
+ pw.print("intrinsic", getIntrinsicHeight());
+ pw.print("actual", getActualHeight());
+ pw.print("maxContent", getMaxContentHeight());
+ pw.print("maxExpanded", getMaxExpandHeight());
+ pw.print("collapsed", getCollapsedHeight());
+ pw.print("headsup", getHeadsUpHeight());
+ pw.print("headsup without header", getHeadsUpHeightWithoutHeader());
+ pw.print("minHeight", getMinHeight());
+ pw.print("pinned headsup", getPinnedHeadsUpHeight(
+ true /* atLeastMinHeight */));
+ pw.println();
+ pw.print("Intrinsic Height Factors: ");
+ pw.print("isUserLocked()", isUserLocked());
+ pw.print("isChildInGroup()", isChildInGroup());
+ pw.print("isGroupExpanded()", isGroupExpanded());
+ pw.print("sensitive", mSensitive);
+ pw.print("hideSensitiveForIntrinsicHeight", mHideSensitiveForIntrinsicHeight);
+ pw.print("isSummaryWithChildren", mIsSummaryWithChildren);
+ pw.print("canShowHeadsUp()", canShowHeadsUp());
+ pw.print("isHeadsUpState()", isHeadsUpState());
+ pw.print("isPinned()", isPinned());
+ pw.print("headsupDisappearRunning", mHeadsupDisappearRunning);
+ pw.print("isExpanded()", isExpanded());
+ pw.println();
+ }
+
private void logKeepInParentChildDetached(ExpandableNotificationRow child) {
if (mLogger != null) {
mLogger.logKeepInParentChildDetached(child.getEntry(), getEntry());
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationContentView.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationContentView.java
index 50bc3d3..137e1b2 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationContentView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationContentView.java
@@ -70,6 +70,7 @@
import com.android.systemui.statusbar.policy.SmartReplyView;
import com.android.systemui.statusbar.policy.dagger.RemoteInputViewSubcomponent;
import com.android.systemui.util.Compile;
+import com.android.systemui.util.DumpUtilsKt;
import java.io.PrintWriter;
import java.util.ArrayList;
@@ -97,6 +98,8 @@
private static final int UNDEFINED = -1;
+ protected static final boolean INCLUDE_HEIGHTS_TO_DUMP = true;
+
private final Rect mClipBounds = new Rect();
private int mMinContractedHeight;
@@ -2196,6 +2199,11 @@
pw.print("null");
}
pw.println();
+
+ if (INCLUDE_HEIGHTS_TO_DUMP) {
+ dumpContentDimensions(DumpUtilsKt.asIndenting(pw));
+ }
+
pw.println("mBubblesEnabledForUser: " + mBubblesEnabledForUser);
pw.print("RemoteInputViews { ");
@@ -2216,6 +2224,69 @@
pw.println(" }");
}
+ private String visibleTypeToString(int visibleType) {
+ return switch (visibleType) {
+ case VISIBLE_TYPE_CONTRACTED -> "CONTRACTED";
+ case VISIBLE_TYPE_EXPANDED -> "EXPANDED";
+ case VISIBLE_TYPE_HEADSUP -> "HEADSUP";
+ case VISIBLE_TYPE_SINGLELINE -> "SINGLELINE";
+ default -> "NONE";
+ };
+ }
+
+ /** Add content views to dump */
+ private void dumpContentDimensions(IndentingPrintWriter pw) {
+ pw.print("ContentDimensions: ");
+ pw.print("visibleType(String)", visibleTypeToString(mVisibleType));
+ pw.print("measured width", getMeasuredWidth());
+ pw.print("measured height", getMeasuredHeight());
+ pw.print("maxHeight", getMaxHeight());
+ pw.print("minHeight", getMinHeight());
+ pw.println();
+ pw.println("ChildViews:");
+ DumpUtilsKt.withIncreasedIndent(pw, () -> {
+ final View contractedChild = mContractedChild;
+ if (contractedChild != null) {
+ dumpChildViewDimensions(pw, contractedChild, "Contracted Child:");
+ pw.println();
+ }
+
+ final View expandedChild = mExpandedChild;
+ if (expandedChild != null) {
+ dumpChildViewDimensions(pw, expandedChild, "Expanded Child:");
+ pw.println();
+ }
+
+ final View headsUpChild = mHeadsUpChild;
+ if (headsUpChild != null) {
+ dumpChildViewDimensions(pw, headsUpChild, "HeadsUp Child:");
+ pw.println();
+ }
+ final View singleLineView = mSingleLineView;
+ if (singleLineView != null) {
+ dumpChildViewDimensions(pw, singleLineView, "Single Line View:");
+ pw.println();
+ }
+
+ });
+ final int expandedRemoteInputHeight = getExtraRemoteInputHeight(mExpandedRemoteInput);
+ final int headsUpRemoteInputHeight = getExtraRemoteInputHeight(mHeadsUpRemoteInput);
+ pw.print("expandedRemoteInputHeight", expandedRemoteInputHeight);
+ pw.print("headsUpRemoteInputHeight", headsUpRemoteInputHeight);
+ pw.println();
+ }
+
+ private void dumpChildViewDimensions(IndentingPrintWriter pw, View view,
+ String name) {
+ pw.print(name + " ");
+ DumpUtilsKt.withIncreasedIndent(pw, () -> {
+ pw.print("width", view.getWidth());
+ pw.print("height", view.getHeight());
+ pw.print("measuredWidth", view.getMeasuredWidth());
+ pw.print("measuredHeight", view.getMeasuredHeight());
+ });
+ }
+
/** Add any existing SmartReplyView to the dump */
public void dumpSmartReplies(IndentingPrintWriter pw) {
if (mHeadsUpSmartReplyView != null) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java
index 9c03405..27db84f 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java
@@ -319,6 +319,10 @@
= new ViewTreeObserver.OnPreDrawListener() {
@Override
public boolean onPreDraw() {
+ if (SceneContainerFlag.isEnabled() && !mChildrenUpdateRequested) {
+ getViewTreeObserver().removeOnPreDrawListener(this);
+ return true;
+ }
updateForcedScroll();
updateChildren();
mChildrenUpdateRequested = false;
@@ -680,7 +684,10 @@
res.getBoolean(R.bool.config_drawNotificationBackground);
setOutlineProvider(mOutlineProvider);
- boolean willDraw = mShouldDrawNotificationBackground || mDebugLines;
+ // We could set this whenever we 'requestChildUpdate' much like the viewTreeObserver, but
+ // that adds a bunch of complexity, and drawing nothing isn't *that* expensive.
+ boolean willDraw = SceneContainerFlag.isEnabled()
+ || mShouldDrawNotificationBackground || mDebugLines;
setWillNotDraw(!willDraw);
mBackgroundPaint.setAntiAlias(true);
if (mDebugLines) {
@@ -816,7 +823,18 @@
}
}
+ private void onJustBeforeDraw() {
+ if (SceneContainerFlag.isEnabled()) {
+ if (mChildrenUpdateRequested) {
+ updateForcedScroll();
+ updateChildren();
+ mChildrenUpdateRequested = false;
+ }
+ }
+ }
+
protected void onDraw(Canvas canvas) {
+ onJustBeforeDraw();
if (mShouldDrawNotificationBackground
&& (mSections[0].getCurrentBounds().top
< mSections[mSections.length - 1].getCurrentBounds().bottom
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/NotificationStackAppearanceViewModel.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/NotificationStackAppearanceViewModel.kt
index 3a0f03f..8d1cdfa 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/NotificationStackAppearanceViewModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/NotificationStackAppearanceViewModel.kt
@@ -17,13 +17,15 @@
package com.android.systemui.statusbar.notification.stack.ui.viewmodel
+import com.android.compose.animation.scene.ObservableTransitionState
import com.android.systemui.common.shared.model.NotificationContainerBounds
import com.android.systemui.dagger.SysUISingleton
+import com.android.systemui.dump.DumpManager
import com.android.systemui.scene.domain.interactor.SceneInteractor
-import com.android.systemui.scene.shared.model.ObservableTransitionState
-import com.android.systemui.scene.shared.model.SceneKey
+import com.android.systemui.scene.shared.model.Scenes
import com.android.systemui.shade.domain.interactor.ShadeInteractor
import com.android.systemui.statusbar.notification.stack.domain.interactor.NotificationStackAppearanceInteractor
+import com.android.systemui.util.kotlin.FlowDumperImpl
import javax.inject.Inject
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.StateFlow
@@ -35,10 +37,11 @@
class NotificationStackAppearanceViewModel
@Inject
constructor(
+ dumpManager: DumpManager,
stackAppearanceInteractor: NotificationStackAppearanceInteractor,
shadeInteractor: ShadeInteractor,
sceneInteractor: SceneInteractor,
-) {
+) : FlowDumperImpl(dumpManager) {
/**
* The expansion fraction of the notification stack. It should go from 0 to 1 when transitioning
* from Gone to Shade scenes, and remain at 1 when in Lockscreen or Shade scenes and while
@@ -51,7 +54,7 @@
) { shadeExpansion, transitionState ->
when (transitionState) {
is ObservableTransitionState.Idle -> {
- if (transitionState.scene == SceneKey.Lockscreen) {
+ if (transitionState.scene == Scenes.Lockscreen) {
1f
} else {
shadeExpansion
@@ -59,10 +62,10 @@
}
is ObservableTransitionState.Transition -> {
if (
- (transitionState.fromScene == SceneKey.Shade &&
- transitionState.toScene == SceneKey.QuickSettings) ||
- (transitionState.fromScene == SceneKey.QuickSettings &&
- transitionState.toScene == SceneKey.Shade)
+ (transitionState.fromScene == Scenes.Shade &&
+ transitionState.toScene == Scenes.QuickSettings) ||
+ (transitionState.fromScene == Scenes.QuickSettings &&
+ transitionState.toScene == Scenes.Shade)
) {
1f
} else {
@@ -72,10 +75,12 @@
}
}
.distinctUntilChanged()
+ .dumpWhileCollecting("expandFraction")
/** The bounds of the notification stack in the current scene. */
- val stackBounds: Flow<NotificationContainerBounds> = stackAppearanceInteractor.stackBounds
+ val stackBounds: Flow<NotificationContainerBounds> =
+ stackAppearanceInteractor.stackBounds.dumpValue("stackBounds")
/** The y-coordinate in px of top of the contents of the notification stack. */
- val contentTop: StateFlow<Float> = stackAppearanceInteractor.contentTop
+ val contentTop: StateFlow<Float> = stackAppearanceInteractor.contentTop.dumpValue("contentTop")
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/SharedNotificationContainerViewModel.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/SharedNotificationContainerViewModel.kt
index b4c88c5..f523793 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/SharedNotificationContainerViewModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/SharedNotificationContainerViewModel.kt
@@ -23,6 +23,7 @@
import com.android.systemui.communal.domain.interactor.CommunalInteractor
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.dagger.qualifiers.Application
+import com.android.systemui.dump.DumpManager
import com.android.systemui.keyguard.domain.interactor.KeyguardInteractor
import com.android.systemui.keyguard.domain.interactor.KeyguardTransitionInteractor
import com.android.systemui.keyguard.shared.model.KeyguardState
@@ -60,6 +61,7 @@
import com.android.systemui.keyguard.ui.viewmodel.ViewStateAccessor
import com.android.systemui.shade.domain.interactor.ShadeInteractor
import com.android.systemui.statusbar.notification.stack.domain.interactor.SharedNotificationContainerInteractor
+import com.android.systemui.util.kotlin.FlowDumperImpl
import com.android.systemui.util.kotlin.Utils.Companion.sample as sampleCombine
import javax.inject.Inject
import kotlinx.coroutines.CoroutineScope
@@ -88,6 +90,7 @@
@Inject
constructor(
private val interactor: SharedNotificationContainerInteractor,
+ dumpManager: DumpManager,
@Application applicationScope: CoroutineScope,
private val keyguardInteractor: KeyguardInteractor,
private val keyguardTransitionInteractor: KeyguardTransitionInteractor,
@@ -116,7 +119,7 @@
private val primaryBouncerToLockscreenTransitionViewModel:
PrimaryBouncerToLockscreenTransitionViewModel,
private val aodBurnInViewModel: AodBurnInViewModel,
-) {
+) : FlowDumperImpl(dumpManager) {
private val statesForConstrainedNotifications: Set<KeyguardState> =
setOf(AOD, LOCKSCREEN, DOZING, ALTERNATE_BOUNCER, PRIMARY_BOUNCER)
@@ -126,6 +129,7 @@
.map { it.transitionState == STARTED || it.transitionState == RUNNING }
.distinctUntilChanged()
.onStart { emit(false) }
+ .dumpWhileCollecting("lockscreenToGlanceableHubRunning")
private val glanceableHubToLockscreenRunning =
keyguardTransitionInteractor
@@ -133,6 +137,7 @@
.map { it.transitionState == STARTED || it.transitionState == RUNNING }
.distinctUntilChanged()
.onStart { emit(false) }
+ .dumpWhileCollecting("glanceableHubToLockscreenRunning")
/**
* Shade locked is a legacy concept, but necessary to mimic current functionality. Listen for
@@ -148,8 +153,10 @@
isShadeLocked && (isQsExpanded || isShadeExpanded)
}
.distinctUntilChanged()
+ .dumpWhileCollecting("isShadeLocked")
- val shadeCollapseFadeInComplete = MutableStateFlow(false)
+ private val shadeCollapseFadeInComplete = MutableStateFlow(false)
+ .dumpValue("shadeCollapseFadeInComplete")
val configurationBasedDimensions: Flow<ConfigurationBasedDimensions> =
interactor.configurationBasedDimensions
@@ -171,6 +178,7 @@
)
}
.distinctUntilChanged()
+ .dumpWhileCollecting("configurationBasedDimensions")
/** If the user is visually on one of the unoccluded lockscreen states. */
val isOnLockscreen: Flow<Boolean> =
@@ -186,6 +194,7 @@
constrainedNotificationState || transitioningToOrFromLockscreen
}
.distinctUntilChanged()
+ .dumpWhileCollecting("isOnLockscreen")
/** Are we purely on the keyguard without the shade/qs? */
val isOnLockscreenWithoutShade: Flow<Boolean> =
@@ -204,6 +213,7 @@
started = SharingStarted.Eagerly,
initialValue = false,
)
+ .dumpValue("isOnLockscreenWithoutShade")
/** Are we purely on the glanceable hub without the shade/qs? */
val isOnGlanceableHubWithoutShade: Flow<Boolean> =
@@ -222,6 +232,7 @@
started = SharingStarted.WhileSubscribed(),
initialValue = false,
)
+ .dumpWhileCollecting("isOnGlanceableHubWithoutShade")
/**
* Fade in if the user swipes the shade back up, not if collapsed by going to AOD. This is
@@ -284,6 +295,7 @@
started = SharingStarted.WhileSubscribed(),
initialValue = false,
)
+ .dumpWhileCollecting("shadeCollapseFadeIn")
/**
* The container occupies the entire screen, and must be positioned relative to other elements.
@@ -322,6 +334,7 @@
started = SharingStarted.Lazily,
initialValue = NotificationContainerBounds(),
)
+ .dumpValue("bounds")
/**
* Ensure view is visible when the shade/qs are expanded. Also, as QS is expanding, fade out
@@ -345,6 +358,7 @@
}
}
.onStart { emit(0f) }
+ .dumpWhileCollecting("alphaForShadeAndQsExpansion")
private val alphaWhenGoneAndShadeState: Flow<Float> =
combineTransform(
@@ -357,6 +371,7 @@
emit(1f)
}
}
+ .dumpWhileCollecting("alphaWhenGoneAndShadeState")
fun expansionAlpha(viewState: ViewStateAccessor): Flow<Float> {
// All transition view models are mututally exclusive, and safe to merge
@@ -389,7 +404,9 @@
isOnLockscreenWithoutShade,
shadeCollapseFadeIn,
alphaForShadeAndQsExpansion,
- keyguardInteractor.dismissAlpha,
+ keyguardInteractor.dismissAlpha.dumpWhileCollecting(
+ "keyguardInteractor.keyguardAlpha"
+ ),
) {
isOnLockscreenWithoutShade,
shadeCollapseFadeIn,
@@ -405,6 +422,7 @@
},
)
.distinctUntilChanged()
+ .dumpWhileCollecting("expansionAlpha")
}
/**
@@ -438,6 +456,7 @@
}
}
}
+ .dumpWhileCollecting("glanceableHubAlpha")
/**
* Under certain scenarios, such as swiping up on the lockscreen, the container will need to be
@@ -458,6 +477,7 @@
0f
}
}
+ .dumpWhileCollecting("translationY")
}
/**
@@ -469,6 +489,7 @@
lockscreenToGlanceableHubTransitionViewModel.notificationTranslationX,
glanceableHubToLockscreenTransitionViewModel.notificationTranslationX,
)
+ .dumpWhileCollecting("translationX")
/**
* When on keyguard, there is limited space to display notifications so calculate how many could
@@ -510,6 +531,7 @@
}
}
.distinctUntilChanged()
+ .dumpWhileCollecting("maxNotifications")
}
fun notificationStackChanged() {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ActivityStarterImpl.kt b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ActivityStarterImpl.kt
index 270b94b..23a080b 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ActivityStarterImpl.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ActivityStarterImpl.kt
@@ -45,8 +45,8 @@
import com.android.systemui.res.R
import com.android.systemui.settings.UserTracker
import com.android.systemui.shade.ShadeController
-import com.android.systemui.shade.ShadeViewController
import com.android.systemui.shade.domain.interactor.ShadeAnimationInteractor
+import com.android.systemui.statusbar.CommandQueue
import com.android.systemui.statusbar.NotificationLockscreenUserManager
import com.android.systemui.statusbar.NotificationShadeWindowController
import com.android.systemui.statusbar.SysuiStatusBarStateController
@@ -71,7 +71,7 @@
private val biometricUnlockControllerLazy: Lazy<BiometricUnlockController>,
private val keyguardViewMediatorLazy: Lazy<KeyguardViewMediator>,
private val shadeControllerLazy: Lazy<ShadeController>,
- private val shadeViewControllerLazy: Lazy<ShadeViewController>,
+ private val commandQueue: CommandQueue,
private val shadeAnimationInteractor: ShadeAnimationInteractor,
private val statusBarKeyguardViewManagerLazy: Lazy<StatusBarKeyguardViewManager>,
private val notifShadeWindowControllerLazy: Lazy<NotificationShadeWindowController>,
@@ -853,10 +853,11 @@
if (dismissShade) {
return StatusBarTransitionAnimatorController(
animationController,
- shadeViewControllerLazy.get(),
shadeAnimationInteractor,
shadeControllerLazy.get(),
notifShadeWindowControllerLazy.get(),
+ commandQueue,
+ displayId,
isLaunchForActivity
)
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesCommandQueueCallbacks.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesCommandQueueCallbacks.java
index 3669ba8..560d5ba 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesCommandQueueCallbacks.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesCommandQueueCallbacks.java
@@ -309,7 +309,7 @@
if (mVibrateOnOpening) {
vibrateOnNavigationKeyDown();
}
- mShadeViewController.expand(true /* animate */);
+ mShadeController.animateExpandShade();
mNotificationStackScrollLayoutController.setWillExpand(true);
mHeadsUpManager.unpinAll(true /* userUnpinned */);
mMetricsLogger.count("panel_open", 1);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarViewController.kt b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarViewController.kt
index 68a0e9c..f29ec8f3 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarViewController.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarViewController.kt
@@ -91,7 +91,7 @@
if (event.source == InputDevice.SOURCE_MOUSE) {
if (event.action == MotionEvent.ACTION_UP) {
v.performClick()
- shadeViewController.expand(/* animate= */ true)
+ shadeController.animateExpandShade()
}
return true
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarNotificationActivityStarter.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarNotificationActivityStarter.java
index 5610ed9..b5ab4e3 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarNotificationActivityStarter.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarNotificationActivityStarter.java
@@ -63,6 +63,7 @@
import com.android.systemui.shade.ShadeController;
import com.android.systemui.shade.ShadeViewController;
import com.android.systemui.shade.domain.interactor.ShadeAnimationInteractor;
+import com.android.systemui.statusbar.CommandQueue;
import com.android.systemui.statusbar.NotificationClickNotifier;
import com.android.systemui.statusbar.NotificationLockscreenUserManager;
import com.android.systemui.statusbar.NotificationPresenter;
@@ -105,6 +106,7 @@
private final NotificationVisibilityProvider mVisibilityProvider;
private final HeadsUpManager mHeadsUpManager;
private final ActivityStarter mActivityStarter;
+ private final CommandQueue mCommandQueue;
private final NotificationClickNotifier mClickNotifier;
private final StatusBarKeyguardViewManager mStatusBarKeyguardViewManager;
private final KeyguardManager mKeyguardManager;
@@ -143,6 +145,7 @@
NotificationVisibilityProvider visibilityProvider,
HeadsUpManager headsUpManager,
ActivityStarter activityStarter,
+ CommandQueue commandQueue,
NotificationClickNotifier clickNotifier,
StatusBarKeyguardViewManager statusBarKeyguardViewManager,
KeyguardManager keyguardManager,
@@ -175,6 +178,7 @@
mVisibilityProvider = visibilityProvider;
mHeadsUpManager = headsUpManager;
mActivityStarter = activityStarter;
+ mCommandQueue = commandQueue;
mClickNotifier = clickNotifier;
mStatusBarKeyguardViewManager = statusBarKeyguardViewManager;
mKeyguardManager = keyguardManager;
@@ -444,10 +448,11 @@
ActivityTransitionAnimator.Controller animationController =
new StatusBarTransitionAnimatorController(
mNotificationAnimationProvider.getAnimatorController(row, null),
- mShadeViewController,
mShadeAnimationInteractor,
mShadeController,
mNotificationShadeWindowController,
+ mCommandQueue,
+ mDisplayId,
isActivityIntent);
mActivityTransitionAnimator.startPendingIntentWithAnimation(
animationController,
@@ -486,10 +491,11 @@
ActivityTransitionAnimator.Controller animationController =
new StatusBarTransitionAnimatorController(
mNotificationAnimationProvider.getAnimatorController(row),
- mShadeViewController,
mShadeAnimationInteractor,
mShadeController,
mNotificationShadeWindowController,
+ mCommandQueue,
+ mDisplayId,
true /* isActivityIntent */);
mActivityTransitionAnimator.startIntentWithAnimation(
@@ -537,10 +543,11 @@
viewController == null ? null
: new StatusBarTransitionAnimatorController(
viewController,
- mShadeViewController,
mShadeAnimationInteractor,
mShadeController,
mNotificationShadeWindowController,
+ mCommandQueue,
+ mDisplayId,
true /* isActivityIntent */);
mActivityTransitionAnimator.startIntentWithAnimation(
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarTransitionAnimatorController.kt b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarTransitionAnimatorController.kt
index 7e907d8..705a11d 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarTransitionAnimatorController.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarTransitionAnimatorController.kt
@@ -3,10 +3,13 @@
import android.view.View
import com.android.systemui.animation.ActivityTransitionAnimator
import com.android.systemui.animation.TransitionAnimator
+import com.android.systemui.animation.TransitionAnimator.Companion.getProgress
+import com.android.systemui.dagger.qualifiers.DisplayId
import com.android.systemui.shade.ShadeController
-import com.android.systemui.shade.ShadeViewController
import com.android.systemui.shade.domain.interactor.ShadeAnimationInteractor
+import com.android.systemui.statusbar.CommandQueue
import com.android.systemui.statusbar.NotificationShadeWindowController
+import com.android.systemui.statusbar.phone.fragment.CollapsedStatusBarFragment
/**
* A [ActivityTransitionAnimator.Controller] that takes care of collapsing the status bar at the
@@ -14,12 +17,15 @@
*/
class StatusBarTransitionAnimatorController(
private val delegate: ActivityTransitionAnimator.Controller,
- private val shadeViewController: ShadeViewController,
private val shadeAnimationInteractor: ShadeAnimationInteractor,
private val shadeController: ShadeController,
private val notificationShadeWindowController: NotificationShadeWindowController,
+ private val commandQueue: CommandQueue,
+ @DisplayId private val displayId: Int,
private val isLaunchForActivity: Boolean = true
) : ActivityTransitionAnimator.Controller by delegate {
+ private var hideIconsDuringLaunchAnimation: Boolean = true
+
// Always sync the opening window with the shade, given that we draw a hole punch in the shade
// of the same size and position as the opening app to make it visible.
override val openingWindowSyncView: View?
@@ -38,7 +44,7 @@
delegate.onTransitionAnimationStart(isExpandingFullyAbove)
shadeAnimationInteractor.setIsLaunchingActivity(true)
if (!isExpandingFullyAbove) {
- shadeViewController.collapseWithDuration(
+ shadeController.collapseWithDuration(
ActivityTransitionAnimator.TIMINGS.totalDuration.toInt()
)
}
@@ -56,7 +62,19 @@
linearProgress: Float
) {
delegate.onTransitionAnimationProgress(state, progress, linearProgress)
- shadeViewController.applyLaunchAnimationProgress(linearProgress)
+ val hideIcons =
+ getProgress(
+ ActivityTransitionAnimator.TIMINGS,
+ linearProgress,
+ ANIMATION_DELAY_ICON_FADE_IN,
+ 100
+ ) == 0.0f
+ if (hideIcons != hideIconsDuringLaunchAnimation) {
+ hideIconsDuringLaunchAnimation = hideIcons
+ if (!hideIcons) {
+ commandQueue.recomputeDisableFlags(displayId, true /* animate */)
+ }
+ }
}
override fun onTransitionAnimationCancelled(newKeyguardOccludedState: Boolean?) {
@@ -64,4 +82,12 @@
shadeAnimationInteractor.setIsLaunchingActivity(false)
shadeController.onLaunchAnimationCancelled(isLaunchForActivity)
}
+
+ companion object {
+ val ANIMATION_DELAY_ICON_FADE_IN =
+ (ActivityTransitionAnimator.TIMINGS.totalDuration -
+ CollapsedStatusBarFragment.FADE_IN_DURATION -
+ CollapsedStatusBarFragment.FADE_IN_DELAY -
+ 48)
+ }
}
diff --git a/packages/SystemUI/src/com/android/systemui/volume/panel/shared/flag/VolumePanelFlag.kt b/packages/SystemUI/src/com/android/systemui/volume/panel/shared/flag/VolumePanelFlag.kt
index d90a9c7..485f4b5 100644
--- a/packages/SystemUI/src/com/android/systemui/volume/panel/shared/flag/VolumePanelFlag.kt
+++ b/packages/SystemUI/src/com/android/systemui/volume/panel/shared/flag/VolumePanelFlag.kt
@@ -17,23 +17,18 @@
package com.android.systemui.volume.panel.shared.flag
import com.android.systemui.Flags
-import com.android.systemui.compose.ComposeFacade
import com.android.systemui.flags.RefactorFlagUtils
import javax.inject.Inject
/** Provides a flag to check for the new Compose based Volume Panel availability. */
class VolumePanelFlag @Inject constructor() {
- /**
- * Returns true when the new Volume Panel is available and false the otherwise. The new panel
- * can only be available when [ComposeFacade.isComposeAvailable] is true.
- */
+ /** Returns true when the new Volume Panel is available and false the otherwise. */
fun canUseNewVolumePanel(): Boolean {
- return ComposeFacade.isComposeAvailable() && Flags.newVolumePanel()
+ return Flags.newVolumePanel()
}
fun assertNewVolumePanel() {
- require(ComposeFacade.isComposeAvailable())
RefactorFlagUtils.assertInNewMode(Flags.newVolumePanel(), Flags.FLAG_NEW_VOLUME_PANEL)
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/volume/panel/ui/activity/VolumePanelActivity.kt b/packages/SystemUI/src/com/android/systemui/volume/panel/ui/activity/VolumePanelActivity.kt
index 53e1b8b..d430e65 100644
--- a/packages/SystemUI/src/com/android/systemui/volume/panel/ui/activity/VolumePanelActivity.kt
+++ b/packages/SystemUI/src/com/android/systemui/volume/panel/ui/activity/VolumePanelActivity.kt
@@ -18,11 +18,12 @@
import android.os.Bundle
import androidx.activity.ComponentActivity
+import androidx.activity.compose.setContent
import androidx.activity.enableEdgeToEdge
import androidx.activity.viewModels
-import com.android.systemui.compose.ComposeFacade
import com.android.systemui.statusbar.policy.ConfigurationController
import com.android.systemui.volume.panel.shared.flag.VolumePanelFlag
+import com.android.systemui.volume.panel.ui.composable.VolumePanelRoot
import com.android.systemui.volume.panel.ui.viewmodel.VolumePanelViewModel
import javax.inject.Inject
import javax.inject.Provider
@@ -44,7 +45,7 @@
volumePanelFlag.assertNewVolumePanel()
- ComposeFacade.setVolumePanelActivityContent(this, viewModel) { finish() }
+ setContent { VolumePanelRoot(viewModel = viewModel, onDismiss = ::finish) }
}
override fun onContentChanged() {
diff --git a/packages/SystemUI/tests/src/com/android/keyguard/ClockEventControllerTest.kt b/packages/SystemUI/tests/src/com/android/keyguard/ClockEventControllerTest.kt
index 0f8a813..3d0d8fb 100644
--- a/packages/SystemUI/tests/src/com/android/keyguard/ClockEventControllerTest.kt
+++ b/packages/SystemUI/tests/src/com/android/keyguard/ClockEventControllerTest.kt
@@ -21,8 +21,8 @@
import android.view.ViewTreeObserver
import android.widget.FrameLayout
import androidx.test.filters.SmallTest
-import com.android.systemui.SysuiTestCase
import com.android.systemui.Flags as AConfigFlags
+import com.android.systemui.SysuiTestCase
import com.android.systemui.broadcast.BroadcastDispatcher
import com.android.systemui.flags.Flags
import com.android.systemui.keyguard.data.repository.FakeKeyguardRepository
@@ -319,7 +319,10 @@
fun listenForDozeAmountTransition_updatesClockDozeAmount() =
runBlocking(IMMEDIATE) {
val transitionStep = MutableStateFlow(TransitionStep())
- whenever(keyguardTransitionInteractor.dozeAmountTransition).thenReturn(transitionStep)
+ whenever(keyguardTransitionInteractor.lockscreenToAodTransition)
+ .thenReturn(transitionStep)
+ whenever(keyguardTransitionInteractor.aodToLockscreenTransition)
+ .thenReturn(transitionStep)
val job = underTest.listenForDozeAmountTransition(this)
transitionStep.value =
@@ -336,6 +339,48 @@
}
@Test
+ fun listenForTransitionToAodFromGone_updatesClockDozeAmountToOne() =
+ runBlocking(IMMEDIATE) {
+ val transitionStep = MutableStateFlow(TransitionStep())
+ whenever(keyguardTransitionInteractor.transitionStepsToState(KeyguardState.AOD))
+ .thenReturn(transitionStep)
+
+ val job = underTest.listenForAnyStateToAodTransition(this)
+ transitionStep.value =
+ TransitionStep(
+ from = KeyguardState.GONE,
+ to = KeyguardState.AOD,
+ transitionState = TransitionState.STARTED,
+ )
+ yield()
+
+ verify(animations, times(2)).doze(1f)
+
+ job.cancel()
+ }
+
+ @Test
+ fun listenForTransitionToAodFromLockscreen_neverUpdatesClockDozeAmount() =
+ runBlocking(IMMEDIATE) {
+ val transitionStep = MutableStateFlow(TransitionStep())
+ whenever(keyguardTransitionInteractor.transitionStepsToState(KeyguardState.AOD))
+ .thenReturn(transitionStep)
+
+ val job = underTest.listenForAnyStateToAodTransition(this)
+ transitionStep.value =
+ TransitionStep(
+ from = KeyguardState.LOCKSCREEN,
+ to = KeyguardState.AOD,
+ transitionState = TransitionState.STARTED,
+ )
+ yield()
+
+ verify(animations, never()).doze(1f)
+
+ job.cancel()
+ }
+
+ @Test
fun unregisterListeners_validate() =
runBlocking(IMMEDIATE) {
underTest.unregisterListeners()
diff --git a/packages/SystemUI/tests/src/com/android/systemui/compose/ComposeInitializerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/compose/ComposeInitializerTest.kt
index 3e6cc3b..03e4f9a 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/compose/ComposeInitializerTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/compose/ComposeInitializerTest.kt
@@ -32,10 +32,6 @@
class ComposeInitializerTest : SysuiTestCase() {
@Test
fun testCanAddComposeViewInInitializedWindow() {
- if (!ComposeFacade.isComposeAvailable()) {
- return
- }
-
val root = TestWindowRoot(context)
try {
runOnMainThreadAndWaitForIdleSync { ViewUtils.attachView(root) }
@@ -55,12 +51,12 @@
class TestWindowRoot(context: Context) : FrameLayout(context) {
override fun onAttachedToWindow() {
super.onAttachedToWindow()
- ComposeFacade.composeInitializer().onAttachedToWindow(this)
+ ComposeInitializer.onAttachedToWindow(this)
}
override fun onDetachedFromWindow() {
super.onDetachedFromWindow()
- ComposeFacade.composeInitializer().onDetachedFromWindow(this)
+ ComposeInitializer.onDetachedFromWindow(this)
}
}
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyboard/stickykeys/ui/StickyKeysIndicatorCoordinatorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/keyboard/stickykeys/ui/StickyKeysIndicatorCoordinatorTest.kt
index a992956..59d8fc3 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/keyboard/stickykeys/ui/StickyKeysIndicatorCoordinatorTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/keyboard/stickykeys/ui/StickyKeysIndicatorCoordinatorTest.kt
@@ -19,7 +19,6 @@
import android.app.Dialog
import androidx.test.filters.SmallTest
import com.android.systemui.SysuiTestCase
-import com.android.systemui.compose.ComposeFacade
import com.android.systemui.keyboard.data.repository.FakeStickyKeysRepository
import com.android.systemui.keyboard.data.repository.keyboardRepository
import com.android.systemui.keyboard.stickykeys.StickyKeysLogger
@@ -34,7 +33,6 @@
import kotlinx.coroutines.test.StandardTestDispatcher
import kotlinx.coroutines.test.TestScope
import kotlinx.coroutines.test.runCurrent
-import org.junit.Assume
import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith
@@ -54,19 +52,22 @@
@Before
fun setup() {
- Assume.assumeTrue(ComposeFacade.isComposeAvailable())
val dialogFactory = mock<StickyKeyDialogFactory>()
whenever(dialogFactory.create(any())).thenReturn(dialog)
val keyboardRepository = Kosmos().keyboardRepository
- val viewModel = StickyKeysIndicatorViewModel(
+ val viewModel =
+ StickyKeysIndicatorViewModel(
stickyKeysRepository,
keyboardRepository,
- testScope.backgroundScope)
- coordinator = StickyKeysIndicatorCoordinator(
+ testScope.backgroundScope
+ )
+ coordinator =
+ StickyKeysIndicatorCoordinator(
testScope.backgroundScope,
dialogFactory,
viewModel,
- mock<StickyKeysLogger>())
+ mock<StickyKeysLogger>()
+ )
coordinator.startListening()
keyboardRepository.setIsAnyKeyboardConnected(true)
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/KeyguardTransitionScenariosTest.kt b/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/KeyguardTransitionScenariosTest.kt
index 69cd173..eae0467 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/KeyguardTransitionScenariosTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/KeyguardTransitionScenariosTest.kt
@@ -18,6 +18,7 @@
import android.app.StatusBarManager
import androidx.test.filters.SmallTest
+import com.android.compose.animation.scene.ObservableTransitionState
import com.android.keyguard.KeyguardSecurityModel
import com.android.keyguard.KeyguardSecurityModel.SecurityMode.PIN
import com.android.systemui.Flags.FLAG_COMMUNAL_HUB
@@ -25,8 +26,7 @@
import com.android.systemui.SysuiTestCase
import com.android.systemui.bouncer.data.repository.fakeKeyguardBouncerRepository
import com.android.systemui.communal.domain.interactor.communalInteractor
-import com.android.systemui.communal.shared.model.CommunalSceneKey
-import com.android.systemui.communal.shared.model.ObservableCommunalTransitionState
+import com.android.systemui.communal.shared.model.CommunalScenes
import com.android.systemui.flags.FakeFeatureFlags
import com.android.systemui.keyguard.data.repository.FakeKeyguardTransitionRepository
import com.android.systemui.keyguard.data.repository.fakeCommandQueue
@@ -169,6 +169,7 @@
keyguardInteractor = keyguardInteractor,
transitionRepository = transitionRepository,
transitionInteractor = transitionInteractor,
+ powerInteractor = powerInteractor,
)
.apply { start() }
@@ -574,8 +575,9 @@
runCurrent()
// WHEN the device begins to wake
+ keyguardRepository.setKeyguardShowing(true)
powerInteractor.setAwakeForTest()
- runCurrent()
+ advanceTimeBy(60L)
assertThat(transitionRepository)
.startedTransition(
@@ -630,15 +632,42 @@
}
@Test
- fun dozingToGone() =
+ fun dozingToGoneWithUnlock() =
testScope.runTest {
// GIVEN a prior transition has run to DOZING
runTransitionAndSetWakefulness(KeyguardState.LOCKSCREEN, KeyguardState.DOZING)
+ runCurrent()
// WHEN biometrics succeeds with wake and unlock mode
+ powerInteractor.setAwakeForTest()
keyguardRepository.setBiometricUnlockState(BiometricUnlockModel.WAKE_AND_UNLOCK)
+ advanceTimeBy(60L)
+
+ assertThat(transitionRepository)
+ .startedTransition(
+ to = KeyguardState.GONE,
+ from = KeyguardState.DOZING,
+ ownerName = "FromDozingTransitionInteractor",
+ animatorAssertion = { it.isNotNull() }
+ )
+
+ coroutineContext.cancelChildren()
+ }
+
+ /** This handles security method NONE and screen off with lock timeout */
+ @Test
+ fun dozingToGoneWithKeyguardNotShowing() =
+ testScope.runTest {
+ // GIVEN a prior transition has run to DOZING
+ runTransitionAndSetWakefulness(KeyguardState.LOCKSCREEN, KeyguardState.DOZING)
runCurrent()
+ // WHEN the device wakes up without a keyguard
+ keyguardRepository.setKeyguardShowing(false)
+ keyguardRepository.setKeyguardDismissible(true)
+ powerInteractor.setAwakeForTest()
+ advanceTimeBy(60L)
+
assertThat(transitionRepository)
.startedTransition(
to = KeyguardState.GONE,
@@ -659,15 +688,16 @@
// GIVEN the device is idle on the glanceable hub
val idleTransitionState =
- MutableStateFlow<ObservableCommunalTransitionState>(
- ObservableCommunalTransitionState.Idle(CommunalSceneKey.Communal)
+ MutableStateFlow<ObservableTransitionState>(
+ ObservableTransitionState.Idle(CommunalScenes.Communal)
)
communalInteractor.setTransitionState(idleTransitionState)
runCurrent()
// WHEN the device begins to wake
+ keyguardRepository.setKeyguardShowing(true)
powerInteractor.setAwakeForTest()
- runCurrent()
+ advanceTimeBy(60L)
assertThat(transitionRepository)
.startedTransition(
@@ -816,8 +846,8 @@
// GIVEN the device is idle on the glanceable hub
val idleTransitionState =
- MutableStateFlow<ObservableCommunalTransitionState>(
- ObservableCommunalTransitionState.Idle(CommunalSceneKey.Communal)
+ MutableStateFlow<ObservableTransitionState>(
+ ObservableTransitionState.Idle(CommunalScenes.Communal)
)
communalInteractor.setTransitionState(idleTransitionState)
runCurrent()
@@ -965,8 +995,8 @@
// GIVEN the device is idle on the glanceable hub
val idleTransitionState =
- MutableStateFlow<ObservableCommunalTransitionState>(
- ObservableCommunalTransitionState.Idle(CommunalSceneKey.Communal)
+ MutableStateFlow<ObservableTransitionState>(
+ ObservableTransitionState.Idle(CommunalScenes.Communal)
)
communalInteractor.setTransitionState(idleTransitionState)
runCurrent()
@@ -1073,8 +1103,8 @@
// GIVEN the device is idle on the glanceable hub
val idleTransitionState =
- MutableStateFlow<ObservableCommunalTransitionState>(
- ObservableCommunalTransitionState.Idle(CommunalSceneKey.Communal)
+ MutableStateFlow<ObservableTransitionState>(
+ ObservableTransitionState.Idle(CommunalScenes.Communal)
)
communalInteractor.setTransitionState(idleTransitionState)
runCurrent()
@@ -1108,8 +1138,8 @@
// GIVEN the device is idle on the glanceable hub
val idleTransitionState =
- MutableStateFlow<ObservableCommunalTransitionState>(
- ObservableCommunalTransitionState.Idle(CommunalSceneKey.Communal)
+ MutableStateFlow<ObservableTransitionState>(
+ ObservableTransitionState.Idle(CommunalScenes.Communal)
)
communalInteractor.setTransitionState(idleTransitionState)
runCurrent()
@@ -1226,8 +1256,8 @@
// GIVEN the device is idle on the glanceable hub
val idleTransitionState =
- MutableStateFlow<ObservableCommunalTransitionState>(
- ObservableCommunalTransitionState.Idle(CommunalSceneKey.Communal)
+ MutableStateFlow<ObservableTransitionState>(
+ ObservableTransitionState.Idle(CommunalScenes.Communal)
)
communalInteractor.setTransitionState(idleTransitionState)
runCurrent()
@@ -1335,8 +1365,9 @@
// WHEN the keyguard is occluded and device wakes up
keyguardRepository.setKeyguardOccluded(true)
+ keyguardRepository.setKeyguardShowing(true)
powerInteractor.setAwakeForTest()
- runCurrent()
+ advanceTimeBy(60L)
// THEN a transition to OCCLUDED should occur
assertThat(transitionRepository)
@@ -1414,13 +1445,13 @@
runCurrent()
// WHEN a transition to the glanceable hub starts
- val currentScene = CommunalSceneKey.Blank
- val targetScene = CommunalSceneKey.Communal
+ val currentScene = CommunalScenes.Blank
+ val targetScene = CommunalScenes.Communal
val progress = MutableStateFlow(0f)
val transitionState =
- MutableStateFlow<ObservableCommunalTransitionState>(
- ObservableCommunalTransitionState.Transition(
+ MutableStateFlow<ObservableTransitionState>(
+ ObservableTransitionState.Transition(
fromScene = currentScene,
toScene = targetScene,
progress = progress,
@@ -1593,13 +1624,13 @@
runCurrent()
// WHEN a glanceable hub transition starts
- val currentScene = CommunalSceneKey.Blank
- val targetScene = CommunalSceneKey.Communal
+ val currentScene = CommunalScenes.Blank
+ val targetScene = CommunalScenes.Communal
val progress = MutableStateFlow(0f)
val transitionState =
- MutableStateFlow<ObservableCommunalTransitionState>(
- ObservableCommunalTransitionState.Transition(
+ MutableStateFlow<ObservableTransitionState>(
+ ObservableTransitionState.Transition(
fromScene = currentScene,
toScene = targetScene,
progress = progress,
@@ -1624,8 +1655,8 @@
clearInvocations(transitionRepository)
runTransitionAndSetWakefulness(KeyguardState.LOCKSCREEN, KeyguardState.GLANCEABLE_HUB)
val idleTransitionState =
- MutableStateFlow<ObservableCommunalTransitionState>(
- ObservableCommunalTransitionState.Idle(currentScene)
+ MutableStateFlow<ObservableTransitionState>(
+ ObservableTransitionState.Idle(currentScene)
)
communalInteractor.setTransitionState(idleTransitionState)
runCurrent()
@@ -1649,13 +1680,13 @@
runCurrent()
// WHEN a transition away from glanceable hub starts
- val currentScene = CommunalSceneKey.Communal
- val targetScene = CommunalSceneKey.Blank
+ val currentScene = CommunalScenes.Communal
+ val targetScene = CommunalScenes.Blank
val progress = MutableStateFlow(0f)
val transitionState =
- MutableStateFlow<ObservableCommunalTransitionState>(
- ObservableCommunalTransitionState.Transition(
+ MutableStateFlow<ObservableTransitionState>(
+ ObservableTransitionState.Transition(
fromScene = currentScene,
toScene = targetScene,
progress = progress,
@@ -1679,8 +1710,8 @@
clearInvocations(transitionRepository)
runTransitionAndSetWakefulness(KeyguardState.GLANCEABLE_HUB, KeyguardState.LOCKSCREEN)
val idleTransitionState =
- MutableStateFlow<ObservableCommunalTransitionState>(
- ObservableCommunalTransitionState.Idle(currentScene)
+ MutableStateFlow<ObservableTransitionState>(
+ ObservableTransitionState.Idle(currentScene)
)
communalInteractor.setTransitionState(idleTransitionState)
runCurrent()
@@ -1766,8 +1797,8 @@
// GIVEN the device is idle on the glanceable hub
val idleTransitionState =
- MutableStateFlow<ObservableCommunalTransitionState>(
- ObservableCommunalTransitionState.Idle(CommunalSceneKey.Communal)
+ MutableStateFlow<ObservableTransitionState>(
+ ObservableTransitionState.Idle(CommunalScenes.Communal)
)
communalInteractor.setTransitionState(idleTransitionState)
runCurrent()
@@ -1823,12 +1854,12 @@
runCurrent()
// WHEN a transition away from glanceable hub starts
- val currentScene = CommunalSceneKey.Communal
- val targetScene = CommunalSceneKey.Blank
+ val currentScene = CommunalScenes.Communal
+ val targetScene = CommunalScenes.Blank
val transitionState =
- MutableStateFlow<ObservableCommunalTransitionState>(
- ObservableCommunalTransitionState.Transition(
+ MutableStateFlow<ObservableTransitionState>(
+ ObservableTransitionState.Transition(
fromScene = currentScene,
toScene = targetScene,
progress = flowOf(0f, 0.1f),
diff --git a/packages/SystemUI/tests/src/com/android/systemui/media/controls/ui/controller/MediaHierarchyManagerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/media/controls/ui/controller/MediaHierarchyManagerTest.kt
index 45f49f0..29820f7 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/media/controls/ui/controller/MediaHierarchyManagerTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/media/controls/ui/controller/MediaHierarchyManagerTest.kt
@@ -28,7 +28,7 @@
import com.android.systemui.SysuiTestCase
import com.android.systemui.communal.domain.interactor.communalInteractor
import com.android.systemui.communal.domain.interactor.setCommunalAvailable
-import com.android.systemui.communal.shared.model.CommunalSceneKey
+import com.android.systemui.communal.shared.model.CommunalScenes
import com.android.systemui.controls.controller.ControlsControllerImplTest.Companion.eq
import com.android.systemui.dreams.DreamOverlayStateController
import com.android.systemui.keyguard.WakefulnessLifecycle
@@ -514,7 +514,7 @@
kosmos.setCommunalAvailable(true)
runCurrent()
- communalInteractor.onSceneChanged(CommunalSceneKey.Communal)
+ communalInteractor.onSceneChanged(CommunalScenes.Communal)
runCurrent()
verify(mediaCarouselController)
.onDesiredLocationChanged(
@@ -526,7 +526,7 @@
)
clearInvocations(mediaCarouselController)
- communalInteractor.onSceneChanged(CommunalSceneKey.Blank)
+ communalInteractor.onSceneChanged(CommunalScenes.Blank)
runCurrent()
verify(mediaCarouselController)
.onDesiredLocationChanged(
@@ -549,7 +549,7 @@
whenever(statusBarStateController.state).thenReturn(StatusBarState.KEYGUARD)
// UMO goes to communal even over the lock screen.
- communalInteractor.onSceneChanged(CommunalSceneKey.Communal)
+ communalInteractor.onSceneChanged(CommunalScenes.Communal)
runCurrent()
verify(mediaCarouselController)
.onDesiredLocationChanged(
@@ -571,7 +571,7 @@
// Device is on lock screen.
whenever(statusBarStateController.state).thenReturn(StatusBarState.KEYGUARD)
- communalInteractor.onSceneChanged(CommunalSceneKey.Communal)
+ communalInteractor.onSceneChanged(CommunalScenes.Communal)
runCurrent()
verify(mediaCarouselController)
.onDesiredLocationChanged(
diff --git a/packages/SystemUI/tests/src/com/android/systemui/mediaprojection/appselector/view/MediaProjectionRecentsViewControllerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/mediaprojection/appselector/view/MediaProjectionRecentsViewControllerTest.kt
new file mode 100644
index 0000000..ac41073
--- /dev/null
+++ b/packages/SystemUI/tests/src/com/android/systemui/mediaprojection/appselector/view/MediaProjectionRecentsViewControllerTest.kt
@@ -0,0 +1,129 @@
+/*
+ * Copyright (C) 2024 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.systemui.mediaprojection.appselector.view
+
+import android.app.ActivityOptions
+import android.app.IActivityTaskManager
+import android.os.Bundle
+import android.view.View
+import android.view.ViewGroup
+import androidx.test.filters.SmallTest
+import com.android.systemui.Flags.FLAG_PSS_APP_SELECTOR_ABRUPT_EXIT_FIX
+import com.android.systemui.SysuiTestCase
+import com.android.systemui.mediaprojection.appselector.MediaProjectionAppSelectorResultHandler
+import com.android.systemui.mediaprojection.appselector.data.RecentTask
+import com.android.systemui.util.mockito.mock
+import com.google.common.truth.Expect
+import com.google.common.truth.Truth.assertThat
+import org.junit.Rule
+import org.junit.Test
+import org.mockito.ArgumentCaptor
+import org.mockito.ArgumentMatchers.eq
+import org.mockito.Mockito.any
+import org.mockito.Mockito.verify
+
+@SmallTest
+class MediaProjectionRecentsViewControllerTest : SysuiTestCase() {
+
+ @get:Rule val expect: Expect = Expect.create()
+
+ private val recentTasksAdapter = mock<RecentTasksAdapter>()
+ private val tasksAdapterFactory = RecentTasksAdapter.Factory { _, _ -> recentTasksAdapter }
+ private val taskViewSizeProvider = mock<TaskPreviewSizeProvider>()
+ private val activityTaskManager = mock<IActivityTaskManager>()
+ private val resultHandler = mock<MediaProjectionAppSelectorResultHandler>()
+ private val bundleCaptor = ArgumentCaptor.forClass(Bundle::class.java)
+
+ private val task =
+ RecentTask(
+ taskId = 123,
+ displayId = 456,
+ userId = 789,
+ topActivityComponent = null,
+ baseIntentComponent = null,
+ colorBackground = null,
+ isForegroundTask = false
+ )
+
+ private val taskView =
+ View(context).apply {
+ layoutParams = ViewGroup.LayoutParams(/* width = */ 100, /* height = */ 200)
+ }
+
+ private val controller =
+ MediaProjectionRecentsViewController(
+ tasksAdapterFactory,
+ taskViewSizeProvider,
+ activityTaskManager,
+ resultHandler
+ )
+
+ @Test
+ fun onRecentAppClicked_taskWithSameIdIsStartedFromRecents() {
+ controller.onRecentAppClicked(task, taskView)
+
+ verify(activityTaskManager).startActivityFromRecents(eq(task.taskId), any())
+ }
+
+ @Test
+ fun onRecentAppClicked_launchDisplayIdIsSet() {
+ controller.onRecentAppClicked(task, taskView)
+
+ assertThat(getStartedTaskActivityOptions().launchDisplayId).isEqualTo(task.displayId)
+ }
+
+ @Test
+ fun onRecentAppClicked_taskNotInForeground_usesScaleUpAnimation() {
+ controller.onRecentAppClicked(task, taskView)
+
+ assertThat(getStartedTaskActivityOptions().animationType)
+ .isEqualTo(ActivityOptions.ANIM_SCALE_UP)
+ }
+
+ @Test
+ fun onRecentAppClicked_taskInForeground_flagOff_usesScaleUpAnimation() {
+ mSetFlagsRule.disableFlags(FLAG_PSS_APP_SELECTOR_ABRUPT_EXIT_FIX)
+
+ controller.onRecentAppClicked(task, taskView)
+
+ assertThat(getStartedTaskActivityOptions().animationType)
+ .isEqualTo(ActivityOptions.ANIM_SCALE_UP)
+ }
+
+ @Test
+ fun onRecentAppClicked_taskInForeground_flagOn_usesDefaultAnimation() {
+ mSetFlagsRule.enableFlags(FLAG_PSS_APP_SELECTOR_ABRUPT_EXIT_FIX)
+ val foregroundTask = task.copy(isForegroundTask = true)
+
+ controller.onRecentAppClicked(foregroundTask, taskView)
+
+ expect
+ .that(getStartedTaskActivityOptions().animationType)
+ .isEqualTo(ActivityOptions.ANIM_CUSTOM)
+ expect.that(getStartedTaskActivityOptions().overrideTaskTransition).isTrue()
+ expect
+ .that(getStartedTaskActivityOptions().customExitResId)
+ .isEqualTo(com.android.internal.R.anim.resolver_close_anim)
+ expect.that(getStartedTaskActivityOptions().customEnterResId).isEqualTo(0)
+ }
+
+ private fun getStartedTaskActivityOptions(): ActivityOptions {
+ verify(activityTaskManager)
+ .startActivityFromRecents(eq(task.taskId), bundleCaptor.capture())
+ return ActivityOptions.fromBundle(bundleCaptor.value)
+ }
+}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/mediaprojection/taskswitcher/data/repository/ActivityTaskManagerTasksRepositoryTest.kt b/packages/SystemUI/tests/src/com/android/systemui/mediaprojection/taskswitcher/data/repository/ActivityTaskManagerTasksRepositoryTest.kt
index 83932b0..dbfab64 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/mediaprojection/taskswitcher/data/repository/ActivityTaskManagerTasksRepositoryTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/mediaprojection/taskswitcher/data/repository/ActivityTaskManagerTasksRepositoryTest.kt
@@ -49,6 +49,19 @@
)
@Test
+ fun launchRecentTask_taskIsMovedToForeground() =
+ testScope.runTest {
+ val currentForegroundTask by collectLastValue(repo.foregroundTask)
+ val newForegroundTask = createTask(taskId = 1)
+ val backgroundTask = createTask(taskId = 2)
+ fakeActivityTaskManager.addRunningTasks(backgroundTask, newForegroundTask)
+
+ repo.launchRecentTask(newForegroundTask)
+
+ assertThat(currentForegroundTask).isEqualTo(newForegroundTask)
+ }
+
+ @Test
fun findRunningTaskFromWindowContainerToken_noMatch_returnsNull() {
fakeActivityTaskManager.addRunningTasks(createTask(taskId = 1), createTask(taskId = 2))
diff --git a/packages/SystemUI/tests/src/com/android/systemui/mediaprojection/taskswitcher/data/repository/FakeActivityTaskManager.kt b/packages/SystemUI/tests/src/com/android/systemui/mediaprojection/taskswitcher/data/repository/FakeActivityTaskManager.kt
index 1c4870b..920e5ee 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/mediaprojection/taskswitcher/data/repository/FakeActivityTaskManager.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/mediaprojection/taskswitcher/data/repository/FakeActivityTaskManager.kt
@@ -17,7 +17,7 @@
package com.android.systemui.mediaprojection.taskswitcher.data.repository
import android.app.ActivityManager.RunningTaskInfo
-import android.app.ActivityTaskManager
+import android.app.IActivityTaskManager
import android.app.TaskStackListener
import android.content.Intent
import android.window.IWindowContainerToken
@@ -31,7 +31,7 @@
private val runningTasks = mutableListOf<RunningTaskInfo>()
private val taskTaskListeners = mutableListOf<TaskStackListener>()
- val activityTaskManager = mock<ActivityTaskManager>()
+ val activityTaskManager = mock<IActivityTaskManager>()
init {
whenever(activityTaskManager.registerTaskStackListener(any())).thenAnswer {
@@ -42,10 +42,20 @@
taskTaskListeners -= it.arguments[0] as TaskStackListener
return@thenAnswer Unit
}
- whenever(activityTaskManager.getTasks(any())).thenAnswer {
+ whenever(activityTaskManager.getTasks(any(), any(), any(), any())).thenAnswer {
val maxNumTasks = it.arguments[0] as Int
return@thenAnswer runningTasks.take(maxNumTasks)
}
+ whenever(activityTaskManager.startActivityFromRecents(any(), any())).thenAnswer {
+ val taskId = it.arguments[0] as Int
+ val runningTask = runningTasks.find { runningTask -> runningTask.taskId == taskId }
+ if (runningTask != null) {
+ moveTaskToForeground(runningTask)
+ return@thenAnswer 0
+ } else {
+ return@thenAnswer -1
+ }
+ }
}
fun moveTaskToForeground(task: RunningTaskInfo) {
diff --git a/packages/SystemUI/tests/src/com/android/systemui/mediaprojection/taskswitcher/data/repository/FakeMediaProjectionManager.kt b/packages/SystemUI/tests/src/com/android/systemui/mediaprojection/taskswitcher/data/repository/FakeMediaProjectionManager.kt
index 44c411f..28393e8 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/mediaprojection/taskswitcher/data/repository/FakeMediaProjectionManager.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/mediaprojection/taskswitcher/data/repository/FakeMediaProjectionManager.kt
@@ -22,6 +22,8 @@
import android.os.IBinder
import android.os.UserHandle
import android.view.ContentRecordingSession
+import android.window.WindowContainerToken
+import com.android.systemui.mediaprojection.MediaProjectionServiceHelper
import com.android.systemui.util.mockito.any
import com.android.systemui.util.mockito.mock
import com.android.systemui.util.mockito.whenever
@@ -29,6 +31,7 @@
class FakeMediaProjectionManager {
val mediaProjectionManager = mock<MediaProjectionManager>()
+ val helper = mock<MediaProjectionServiceHelper>()
private val callbacks = mutableListOf<MediaProjectionManager.Callback>()
@@ -41,6 +44,11 @@
callbacks -= it.arguments[0] as MediaProjectionManager.Callback
return@thenAnswer Unit
}
+ whenever(helper.updateTaskRecordingSession(any())).thenAnswer {
+ val token = it.arguments[0] as WindowContainerToken
+ dispatchOnSessionSet(session = createSingleTaskSession(token.asBinder()))
+ return@thenAnswer true
+ }
}
fun dispatchOnStart(info: MediaProjectionInfo = DEFAULT_INFO) {
@@ -61,6 +69,7 @@
companion object {
fun createDisplaySession(): ContentRecordingSession =
ContentRecordingSession.createDisplaySession(/* displayToMirror = */ 123)
+
fun createSingleTaskSession(token: IBinder = Binder()): ContentRecordingSession =
ContentRecordingSession.createTaskSession(token)
diff --git a/packages/SystemUI/tests/src/com/android/systemui/mediaprojection/taskswitcher/data/repository/MediaProjectionManagerRepositoryTest.kt b/packages/SystemUI/tests/src/com/android/systemui/mediaprojection/taskswitcher/data/repository/MediaProjectionManagerRepositoryTest.kt
index 7bd97ce..fdd434a 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/mediaprojection/taskswitcher/data/repository/MediaProjectionManagerRepositoryTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/mediaprojection/taskswitcher/data/repository/MediaProjectionManagerRepositoryTest.kt
@@ -28,9 +28,8 @@
import com.android.systemui.mediaprojection.taskswitcher.data.repository.FakeActivityTaskManager.Companion.createToken
import com.google.common.truth.Truth.assertThat
import kotlinx.coroutines.ExperimentalCoroutinesApi
-import kotlinx.coroutines.test.StandardTestDispatcher
import kotlinx.coroutines.test.TestScope
-import kotlinx.coroutines.test.runCurrent
+import kotlinx.coroutines.test.UnconfinedTestDispatcher
import kotlinx.coroutines.test.runTest
import org.junit.Test
import org.junit.runner.RunWith
@@ -40,7 +39,7 @@
@SmallTest
class MediaProjectionManagerRepositoryTest : SysuiTestCase() {
- private val dispatcher = StandardTestDispatcher()
+ private val dispatcher = UnconfinedTestDispatcher()
private val testScope = TestScope(dispatcher)
private val fakeMediaProjectionManager = FakeMediaProjectionManager()
@@ -58,14 +57,27 @@
mediaProjectionManager = fakeMediaProjectionManager.mediaProjectionManager,
handler = Handler.getMain(),
applicationScope = testScope.backgroundScope,
- tasksRepository = tasksRepo
+ tasksRepository = tasksRepo,
+ backgroundDispatcher = dispatcher,
+ mediaProjectionServiceHelper = fakeMediaProjectionManager.helper
)
@Test
+ fun switchProjectedTask_stateIsUpdatedWithNewTask() =
+ testScope.runTest {
+ val task = createTask(taskId = 1)
+ val state by collectLastValue(repo.mediaProjectionState)
+
+ fakeActivityTaskManager.addRunningTasks(task)
+ repo.switchProjectedTask(task)
+
+ assertThat(state).isEqualTo(MediaProjectionState.SingleTask(task))
+ }
+
+ @Test
fun mediaProjectionState_onStart_emitsNotProjecting() =
testScope.runTest {
val state by collectLastValue(repo.mediaProjectionState)
- runCurrent()
fakeMediaProjectionManager.dispatchOnStart()
@@ -76,7 +88,6 @@
fun mediaProjectionState_onStop_emitsNotProjecting() =
testScope.runTest {
val state by collectLastValue(repo.mediaProjectionState)
- runCurrent()
fakeMediaProjectionManager.dispatchOnStop()
@@ -87,7 +98,6 @@
fun mediaProjectionState_onSessionSet_sessionNull_emitsNotProjecting() =
testScope.runTest {
val state by collectLastValue(repo.mediaProjectionState)
- runCurrent()
fakeMediaProjectionManager.dispatchOnSessionSet(session = null)
@@ -98,7 +108,6 @@
fun mediaProjectionState_onSessionSet_contentToRecordDisplay_emitsEntireScreen() =
testScope.runTest {
val state by collectLastValue(repo.mediaProjectionState)
- runCurrent()
fakeMediaProjectionManager.dispatchOnSessionSet(
session = ContentRecordingSession.createDisplaySession(/* displayToMirror= */ 123)
@@ -111,7 +120,6 @@
fun mediaProjectionState_sessionSet_taskWithToken_noMatchingRunningTask_emitsEntireScreen() =
testScope.runTest {
val state by collectLastValue(repo.mediaProjectionState)
- runCurrent()
val taskWindowContainerToken = Binder()
fakeMediaProjectionManager.dispatchOnSessionSet(
@@ -128,7 +136,6 @@
val task = createTask(taskId = 1, token = token)
fakeActivityTaskManager.addRunningTasks(task)
val state by collectLastValue(repo.mediaProjectionState)
- runCurrent()
fakeMediaProjectionManager.dispatchOnSessionSet(
session = ContentRecordingSession.createTaskSession(token.asBinder())
diff --git a/packages/SystemUI/tests/src/com/android/systemui/mediaprojection/taskswitcher/domain/interactor/TaskSwitchInteractorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/mediaprojection/taskswitcher/domain/interactor/TaskSwitchInteractorTest.kt
index b2ebe1bc..dfb688b 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/mediaprojection/taskswitcher/domain/interactor/TaskSwitchInteractorTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/mediaprojection/taskswitcher/domain/interactor/TaskSwitchInteractorTest.kt
@@ -61,6 +61,8 @@
handler = Handler.getMain(),
applicationScope = testScope.backgroundScope,
tasksRepository = tasksRepo,
+ backgroundDispatcher = dispatcher,
+ mediaProjectionServiceHelper = fakeMediaProjectionManager.helper,
)
private val interactor = TaskSwitchInteractor(mediaRepo, tasksRepo)
@@ -118,6 +120,40 @@
}
@Test
+ fun taskSwitchChanges_projectingTask_foregroundTaskDifferent_thenSwitched_emitsUnchanged() =
+ testScope.runTest {
+ val projectedTask = createTask(taskId = 0)
+ val foregroundTask = createTask(taskId = 1)
+ val taskSwitchState by collectLastValue(interactor.taskSwitchChanges)
+
+ fakeActivityTaskManager.addRunningTasks(projectedTask, foregroundTask)
+ fakeMediaProjectionManager.dispatchOnSessionSet(
+ session = createSingleTaskSession(token = projectedTask.token.asBinder())
+ )
+ fakeActivityTaskManager.moveTaskToForeground(foregroundTask)
+ interactor.switchProjectedTask(foregroundTask)
+
+ assertThat(taskSwitchState).isEqualTo(TaskSwitchState.TaskUnchanged)
+ }
+
+ @Test
+ fun taskSwitchChanges_projectingTask_foregroundTaskDifferent_thenWentBack_emitsUnchanged() =
+ testScope.runTest {
+ val projectedTask = createTask(taskId = 0)
+ val foregroundTask = createTask(taskId = 1)
+ val taskSwitchState by collectLastValue(interactor.taskSwitchChanges)
+
+ fakeActivityTaskManager.addRunningTasks(projectedTask, foregroundTask)
+ fakeMediaProjectionManager.dispatchOnSessionSet(
+ session = createSingleTaskSession(token = projectedTask.token.asBinder())
+ )
+ fakeActivityTaskManager.moveTaskToForeground(foregroundTask)
+ interactor.goBackToTask(projectedTask)
+
+ assertThat(taskSwitchState).isEqualTo(TaskSwitchState.TaskUnchanged)
+ }
+
+ @Test
fun taskSwitchChanges_projectingTask_foregroundTaskLauncher_emitsTaskUnchanged() =
testScope.runTest {
val projectedTask = createTask(taskId = 0)
diff --git a/packages/SystemUI/tests/src/com/android/systemui/mediaprojection/taskswitcher/ui/TaskSwitcherNotificationCoordinatorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/mediaprojection/taskswitcher/ui/TaskSwitcherNotificationCoordinatorTest.kt
index d0c6d7c..c4e9393 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/mediaprojection/taskswitcher/ui/TaskSwitcherNotificationCoordinatorTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/mediaprojection/taskswitcher/ui/TaskSwitcherNotificationCoordinatorTest.kt
@@ -21,14 +21,15 @@
import android.os.Handler
import android.testing.AndroidTestingRunner
import androidx.test.filters.SmallTest
-import com.android.systemui.res.R
import com.android.systemui.SysuiTestCase
import com.android.systemui.mediaprojection.taskswitcher.data.repository.ActivityTaskManagerTasksRepository
import com.android.systemui.mediaprojection.taskswitcher.data.repository.FakeActivityTaskManager
+import com.android.systemui.mediaprojection.taskswitcher.data.repository.FakeActivityTaskManager.Companion.createTask
import com.android.systemui.mediaprojection.taskswitcher.data.repository.FakeMediaProjectionManager
import com.android.systemui.mediaprojection.taskswitcher.data.repository.MediaProjectionManagerRepository
import com.android.systemui.mediaprojection.taskswitcher.domain.interactor.TaskSwitchInteractor
import com.android.systemui.mediaprojection.taskswitcher.ui.viewmodel.TaskSwitcherNotificationViewModel
+import com.android.systemui.res.R
import com.android.systemui.util.mockito.any
import com.android.systemui.util.mockito.argumentCaptor
import com.android.systemui.util.mockito.mock
@@ -42,6 +43,7 @@
import org.junit.Test
import org.junit.runner.RunWith
import org.mockito.ArgumentCaptor
+import org.mockito.Mockito.never
import org.mockito.Mockito.verify
@OptIn(ExperimentalCoroutinesApi::class)
@@ -49,7 +51,7 @@
@SmallTest
class TaskSwitcherNotificationCoordinatorTest : SysuiTestCase() {
- private val notificationManager: NotificationManager = mock()
+ private val notificationManager = mock<NotificationManager>()
private val dispatcher = UnconfinedTestDispatcher()
private val testScope = TestScope(dispatcher)
@@ -70,22 +72,26 @@
handler = Handler.getMain(),
applicationScope = testScope.backgroundScope,
tasksRepository = tasksRepo,
+ backgroundDispatcher = dispatcher,
+ mediaProjectionServiceHelper = fakeMediaProjectionManager.helper,
)
private val interactor = TaskSwitchInteractor(mediaRepo, tasksRepo)
- private val viewModel = TaskSwitcherNotificationViewModel(interactor)
+ private val viewModel =
+ TaskSwitcherNotificationViewModel(interactor, backgroundDispatcher = dispatcher)
- private val coordinator =
- TaskSwitcherNotificationCoordinator(
- context,
- notificationManager,
- testScope.backgroundScope,
- dispatcher,
- viewModel
- )
+ private lateinit var coordinator: TaskSwitcherNotificationCoordinator
@Before
fun setup() {
+ coordinator =
+ TaskSwitcherNotificationCoordinator(
+ context,
+ notificationManager,
+ testScope.backgroundScope,
+ viewModel,
+ fakeBroadcastDispatcher,
+ )
coordinator.start()
}
@@ -105,7 +111,7 @@
testScope.runTest {
fakeMediaProjectionManager.dispatchOnStop()
- verify(notificationManager).cancel(any())
+ verify(notificationManager).cancel(any(), any())
}
}
@@ -114,7 +120,7 @@
testScope.runTest {
fakeMediaProjectionManager.dispatchOnStop()
val idCancel = argumentCaptor<Int>()
- verify(notificationManager).cancel(idCancel.capture())
+ verify(notificationManager).cancel(any(), idCancel.capture())
switchTask()
val idNotify = argumentCaptor<Int>()
@@ -124,9 +130,55 @@
}
}
+ @Test
+ fun switchTaskAction_hidesNotification() =
+ testScope.runTest {
+ switchTask()
+ val notification = argumentCaptor<Notification>()
+ verify(notificationManager).notify(any(), any(), notification.capture())
+ verify(notificationManager, never()).cancel(any(), any())
+
+ val action = findSwitchAction(notification.value)
+ fakeBroadcastDispatcher.sendIntentToMatchingReceiversOnly(
+ context,
+ action.actionIntent.intent
+ )
+
+ verify(notificationManager).cancel(any(), any())
+ }
+
+ @Test
+ fun goBackAction_hidesNotification() =
+ testScope.runTest {
+ switchTask()
+ val notification = argumentCaptor<Notification>()
+ verify(notificationManager).notify(any(), any(), notification.capture())
+ verify(notificationManager, never()).cancel(any(), any())
+
+ val action = findGoBackAction(notification.value)
+ fakeBroadcastDispatcher.sendIntentToMatchingReceiversOnly(
+ context,
+ action.actionIntent.intent
+ )
+
+ verify(notificationManager).cancel(any(), any())
+ }
+
+ private fun findSwitchAction(notification: Notification): Notification.Action {
+ return notification.actions.first {
+ it.title == context.getString(R.string.media_projection_task_switcher_action_switch)
+ }
+ }
+
+ private fun findGoBackAction(notification: Notification): Notification.Action {
+ return notification.actions.first {
+ it.title == context.getString(R.string.media_projection_task_switcher_action_back)
+ }
+ }
+
private fun switchTask() {
- val projectedTask = FakeActivityTaskManager.createTask(taskId = 1)
- val foregroundTask = FakeActivityTaskManager.createTask(taskId = 2)
+ val projectedTask = createTask(taskId = 1)
+ val foregroundTask = createTask(taskId = 2)
fakeActivityTaskManager.addRunningTasks(projectedTask, foregroundTask)
fakeMediaProjectionManager.dispatchOnSessionSet(
session =
diff --git a/packages/SystemUI/tests/src/com/android/systemui/mediaprojection/taskswitcher/ui/viewmodel/TaskSwitcherNotificationViewModelTest.kt b/packages/SystemUI/tests/src/com/android/systemui/mediaprojection/taskswitcher/ui/viewmodel/TaskSwitcherNotificationViewModelTest.kt
index 7d38de4..5dadf21 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/mediaprojection/taskswitcher/ui/viewmodel/TaskSwitcherNotificationViewModelTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/mediaprojection/taskswitcher/ui/viewmodel/TaskSwitcherNotificationViewModelTest.kt
@@ -63,11 +63,14 @@
handler = Handler.getMain(),
applicationScope = testScope.backgroundScope,
tasksRepository = tasksRepo,
+ backgroundDispatcher = dispatcher,
+ mediaProjectionServiceHelper = fakeMediaProjectionManager.helper,
)
private val interactor = TaskSwitchInteractor(mediaRepo, tasksRepo)
- private val viewModel = TaskSwitcherNotificationViewModel(interactor)
+ private val viewModel =
+ TaskSwitcherNotificationViewModel(interactor, backgroundDispatcher = dispatcher)
@Test
fun uiState_notProjecting_emitsNotShowing() =
@@ -135,6 +138,40 @@
}
@Test
+ fun uiState_projectingTask_foregroundTaskChanged_thenTaskSwitched_emitsNotShowing() =
+ testScope.runTest {
+ val projectedTask = createTask(taskId = 1)
+ val foregroundTask = createTask(taskId = 2)
+ val uiState by collectLastValue(viewModel.uiState)
+
+ fakeActivityTaskManager.addRunningTasks(projectedTask, foregroundTask)
+ fakeMediaProjectionManager.dispatchOnSessionSet(
+ session = createSingleTaskSession(projectedTask.token.asBinder())
+ )
+ fakeActivityTaskManager.moveTaskToForeground(foregroundTask)
+ viewModel.onSwitchTaskClicked(foregroundTask)
+
+ assertThat(uiState).isEqualTo(TaskSwitcherNotificationUiState.NotShowing)
+ }
+
+ @Test
+ fun uiState_projectingTask_foregroundTaskChanged_thenGoBack_emitsNotShowing() =
+ testScope.runTest {
+ val projectedTask = createTask(taskId = 1)
+ val foregroundTask = createTask(taskId = 2)
+ val uiState by collectLastValue(viewModel.uiState)
+
+ fakeActivityTaskManager.addRunningTasks(projectedTask, foregroundTask)
+ fakeMediaProjectionManager.dispatchOnSessionSet(
+ session = createSingleTaskSession(projectedTask.token.asBinder())
+ )
+ fakeActivityTaskManager.moveTaskToForeground(foregroundTask)
+ viewModel.onGoBackToTaskClicked(projectedTask)
+
+ assertThat(uiState).isEqualTo(TaskSwitcherNotificationUiState.NotShowing)
+ }
+
+ @Test
fun uiState_projectingTask_foregroundTaskChanged_same_emitsNotShowing() =
testScope.runTest {
val projectedTask = createTask(taskId = 1)
diff --git a/packages/SystemUI/tests/src/com/android/systemui/shade/GlanceableHubContainerControllerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/shade/GlanceableHubContainerControllerTest.kt
index 665fc75..62d2d0e 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/shade/GlanceableHubContainerControllerTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/shade/GlanceableHubContainerControllerTest.kt
@@ -26,6 +26,7 @@
import android.view.WindowManager
import android.widget.FrameLayout
import androidx.test.filters.SmallTest
+import com.android.compose.animation.scene.SceneKey
import com.android.systemui.Flags
import com.android.systemui.SysuiTestCase
import com.android.systemui.communal.data.repository.FakeCommunalRepository
@@ -33,9 +34,8 @@
import com.android.systemui.communal.domain.interactor.CommunalInteractor
import com.android.systemui.communal.domain.interactor.communalInteractor
import com.android.systemui.communal.domain.interactor.setCommunalAvailable
-import com.android.systemui.communal.shared.model.CommunalSceneKey
+import com.android.systemui.communal.shared.model.CommunalScenes
import com.android.systemui.communal.ui.viewmodel.CommunalViewModel
-import com.android.systemui.compose.ComposeFacade
import com.android.systemui.keyguard.domain.interactor.KeyguardTransitionInteractor
import com.android.systemui.kosmos.Kosmos
import com.android.systemui.kosmos.testDispatcher
@@ -52,9 +52,7 @@
import kotlinx.coroutines.test.UnconfinedTestDispatcher
import org.junit.After
import org.junit.Assert.assertThrows
-import org.junit.Assume.assumeTrue
import org.junit.Before
-import org.junit.BeforeClass
import org.junit.Test
import org.junit.runner.RunWith
import org.mockito.Mock
@@ -155,7 +153,7 @@
@Test
fun onTouchEvent_communalClosed_doesNotIntercept() {
// Communal is closed.
- goToScene(CommunalSceneKey.Blank)
+ goToScene(CommunalScenes.Blank)
assertThat(underTest.onTouchEvent(DOWN_EVENT)).isFalse()
}
@@ -163,7 +161,7 @@
@Test
fun onTouchEvent_openGesture_interceptsTouches() {
// Communal is closed.
- goToScene(CommunalSceneKey.Blank)
+ goToScene(CommunalScenes.Blank)
// Initial touch down is intercepted, and so are touches outside of the region, until an
// up event is received.
@@ -176,7 +174,7 @@
@Test
fun onTouchEvent_communalOpen_interceptsTouches() {
// Communal is open.
- goToScene(CommunalSceneKey.Communal)
+ goToScene(CommunalScenes.Communal)
// Touch events are intercepted outside of any gesture areas.
assertThat(underTest.onTouchEvent(DOWN_EVENT)).isTrue()
@@ -187,7 +185,7 @@
@Test
fun onTouchEvent_topSwipeWhenCommunalOpen_doesNotIntercept() {
// Communal is open.
- goToScene(CommunalSceneKey.Communal)
+ goToScene(CommunalScenes.Communal)
// Touch event in the top swipe reqgion is not intercepted.
assertThat(underTest.onTouchEvent(DOWN_IN_TOP_SWIPE_REGION_EVENT)).isFalse()
@@ -196,7 +194,7 @@
@Test
fun onTouchEvent_bottomSwipeWhenCommunalOpen_doesNotIntercept() {
// Communal is open.
- goToScene(CommunalSceneKey.Communal)
+ goToScene(CommunalScenes.Communal)
// Touch event in the bottom swipe reqgion is not intercepted.
assertThat(underTest.onTouchEvent(DOWN_IN_BOTTOM_SWIPE_REGION_EVENT)).isFalse()
@@ -205,7 +203,7 @@
@Test
fun onTouchEvent_communalAndBouncerShowing_doesNotIntercept() {
// Communal is open.
- goToScene(CommunalSceneKey.Communal)
+ goToScene(CommunalScenes.Communal)
// Bouncer is visible.
bouncerShowingFlow.value = true
@@ -220,7 +218,7 @@
@Test
fun onTouchEvent_communalAndShadeShowing_doesNotIntercept() {
// Communal is open.
- goToScene(CommunalSceneKey.Communal)
+ goToScene(CommunalScenes.Communal)
shadeShowingFlow.value = true
testableLooper.processAllMessages()
@@ -232,7 +230,7 @@
@Test
fun onTouchEvent_containerViewDisposed_doesNotIntercept() {
// Communal is open.
- goToScene(CommunalSceneKey.Communal)
+ goToScene(CommunalScenes.Communal)
// Touch events are intercepted.
assertThat(underTest.onTouchEvent(DOWN_EVENT)).isTrue()
@@ -265,7 +263,7 @@
wm.updateViewLayout(parentView, lp)
}
- private fun goToScene(scene: CommunalSceneKey) {
+ private fun goToScene(scene: SceneKey) {
communalRepository.setDesiredScene(scene)
testableLooper.processAllMessages()
}
@@ -305,13 +303,5 @@
MotionEvent.obtain(0L, 0L, MotionEvent.ACTION_DOWN, 0f, CONTAINER_HEIGHT.toFloat(), 0)
private val MOVE_EVENT = MotionEvent.obtain(0L, 0L, MotionEvent.ACTION_MOVE, 0f, 0f, 0)
private val UP_EVENT = MotionEvent.obtain(0L, 0L, MotionEvent.ACTION_UP, 0f, 0f, 0)
-
- @BeforeClass
- @JvmStatic
- fun beforeClass() {
- // Glanceable hub requires Compose, no point running any of these tests if compose isn't
- // enabled.
- assumeTrue(ComposeFacade.isComposeAvailable())
- }
}
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationShadeWindowViewControllerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationShadeWindowViewControllerTest.kt
index b426d1d..960fd59 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationShadeWindowViewControllerTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationShadeWindowViewControllerTest.kt
@@ -16,6 +16,7 @@
package com.android.systemui.shade
+import org.mockito.Mockito.`when` as whenever
import android.content.Context
import android.testing.AndroidTestingRunner
import android.testing.TestableLooper.RunWithLooper
@@ -33,7 +34,6 @@
import com.android.systemui.bouncer.domain.interactor.PrimaryBouncerInteractor
import com.android.systemui.bouncer.ui.binder.BouncerViewBinder
import com.android.systemui.classifier.FalsingCollectorFake
-import com.android.systemui.compose.ComposeFacade.isComposeAvailable
import com.android.systemui.dock.DockManager
import com.android.systemui.dump.DumpManager
import com.android.systemui.flags.FakeFeatureFlagsClassic
@@ -88,7 +88,6 @@
import org.mockito.Mockito.never
import org.mockito.Mockito.times
import org.mockito.Mockito.verify
-import org.mockito.Mockito.`when` as whenever
import org.mockito.MockitoAnnotations
@OptIn(ExperimentalCoroutinesApi::class)
@@ -511,10 +510,6 @@
@Test
@Ignore("b/321332798")
fun setsUpCommunalHubLayout_whenFlagEnabled() {
- if (!isComposeAvailable()) {
- return
- }
-
whenever(mGlanceableHubContainerController.communalAvailable())
.thenReturn(MutableStateFlow(true))
@@ -537,10 +532,6 @@
@Test
fun doesNotSetupCommunalHubLayout_whenFlagDisabled() {
- if (!isComposeAvailable()) {
- return
- }
-
whenever(mGlanceableHubContainerController.communalAvailable())
.thenReturn(MutableStateFlow(false))
diff --git a/packages/SystemUI/tests/src/com/android/systemui/shade/transition/ShadeTransitionControllerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/shade/transition/ShadeTransitionControllerTest.kt
index 651006d..2f957b0 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/shade/transition/ShadeTransitionControllerTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/shade/transition/ShadeTransitionControllerTest.kt
@@ -5,6 +5,8 @@
import android.platform.test.annotations.DisableFlags
import android.testing.AndroidTestingRunner
import androidx.test.filters.SmallTest
+import com.android.compose.animation.scene.ObservableTransitionState
+import com.android.compose.animation.scene.SceneKey
import com.android.systemui.Flags.FLAG_SCENE_CONTAINER
import com.android.systemui.SysuiTestCase
import com.android.systemui.coroutines.collectLastValue
@@ -20,8 +22,7 @@
import com.android.systemui.scene.domain.interactor.SceneInteractor
import com.android.systemui.scene.domain.interactor.sceneInteractor
import com.android.systemui.scene.shared.model.FakeSceneDataSource
-import com.android.systemui.scene.shared.model.ObservableTransitionState
-import com.android.systemui.scene.shared.model.SceneKey
+import com.android.systemui.scene.shared.model.Scenes
import com.android.systemui.scene.shared.model.fakeSceneDataSource
import com.android.systemui.shade.STATE_OPENING
import com.android.systemui.shade.ShadeExpansionChangeEvent
@@ -117,13 +118,13 @@
setUnlocked(true)
val transitionState =
MutableStateFlow<ObservableTransitionState>(
- ObservableTransitionState.Idle(SceneKey.Gone)
+ ObservableTransitionState.Idle(Scenes.Gone)
)
sceneInteractor.setTransitionState(transitionState)
- changeScene(SceneKey.Gone, transitionState)
+ changeScene(Scenes.Gone, transitionState)
val currentScene by collectLastValue(sceneInteractor.currentScene)
- assertThat(currentScene).isEqualTo(SceneKey.Gone)
+ assertThat(currentScene).isEqualTo(Scenes.Gone)
assertThat(latestChangeEvent)
.isEqualTo(
@@ -135,7 +136,7 @@
)
)
- changeScene(SceneKey.Shade, transitionState) { progress ->
+ changeScene(Scenes.Shade, transitionState) { progress ->
assertThat(latestChangeEvent)
.isEqualTo(
ShadeExpansionChangeEvent(
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/StatusBarStateControllerImplTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/StatusBarStateControllerImplTest.kt
index fe16347..dfbb6ea 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/StatusBarStateControllerImplTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/StatusBarStateControllerImplTest.kt
@@ -54,7 +54,6 @@
import com.android.systemui.power.domain.interactor.PowerInteractor
import com.android.systemui.scene.domain.interactor.sceneInteractor
import com.android.systemui.scene.shared.flag.FakeSceneContainerFlags
-import com.android.systemui.scene.shared.model.SceneKey
import com.android.systemui.shade.LargeScreenHeaderHelper
import com.android.systemui.shade.data.repository.FakeShadeRepository
import com.android.systemui.shade.domain.interactor.ShadeInteractor
@@ -87,6 +86,7 @@
import org.mockito.Mockito.mock
import org.mockito.Mockito.verify
import org.mockito.Mockito.`when` as whenever
+import com.android.systemui.scene.shared.model.Scenes
import org.mockito.MockitoAnnotations
@SmallTest
@@ -313,48 +313,48 @@
kosmos.fakeDeviceEntryRepository.setUnlocked(false)
runCurrent()
kosmos.sceneInteractor.changeScene(
- toScene = SceneKey.Lockscreen,
+ toScene = Scenes.Lockscreen,
loggingReason = "reason"
)
runCurrent()
assertThat(kosmos.deviceUnlockedInteractor.isDeviceUnlocked.value).isFalse()
- assertThat(currentScene).isEqualTo(SceneKey.Lockscreen)
+ assertThat(currentScene).isEqualTo(Scenes.Lockscreen)
// Call start to begin hydrating based on the scene framework:
underTest.start()
- kosmos.sceneInteractor.changeScene(toScene = SceneKey.Bouncer, loggingReason = "reason")
+ kosmos.sceneInteractor.changeScene(toScene = Scenes.Bouncer, loggingReason = "reason")
runCurrent()
- assertThat(currentScene).isEqualTo(SceneKey.Bouncer)
+ assertThat(currentScene).isEqualTo(Scenes.Bouncer)
assertThat(statusBarState).isEqualTo(StatusBarState.KEYGUARD)
- kosmos.sceneInteractor.changeScene(toScene = SceneKey.Shade, loggingReason = "reason")
+ kosmos.sceneInteractor.changeScene(toScene = Scenes.Shade, loggingReason = "reason")
runCurrent()
- assertThat(currentScene).isEqualTo(SceneKey.Shade)
+ assertThat(currentScene).isEqualTo(Scenes.Shade)
assertThat(statusBarState).isEqualTo(StatusBarState.SHADE_LOCKED)
kosmos.sceneInteractor.changeScene(
- toScene = SceneKey.QuickSettings,
+ toScene = Scenes.QuickSettings,
loggingReason = "reason"
)
runCurrent()
- assertThat(currentScene).isEqualTo(SceneKey.QuickSettings)
+ assertThat(currentScene).isEqualTo(Scenes.QuickSettings)
assertThat(statusBarState).isEqualTo(StatusBarState.SHADE_LOCKED)
kosmos.sceneInteractor.changeScene(
- toScene = SceneKey.Communal,
+ toScene = Scenes.Communal,
loggingReason = "reason"
)
runCurrent()
- assertThat(currentScene).isEqualTo(SceneKey.Communal)
+ assertThat(currentScene).isEqualTo(Scenes.Communal)
assertThat(statusBarState).isEqualTo(StatusBarState.KEYGUARD)
kosmos.sceneInteractor.changeScene(
- toScene = SceneKey.Lockscreen,
+ toScene = Scenes.Lockscreen,
loggingReason = "reason"
)
runCurrent()
- assertThat(currentScene).isEqualTo(SceneKey.Lockscreen)
+ assertThat(currentScene).isEqualTo(Scenes.Lockscreen)
assertThat(statusBarState).isEqualTo(StatusBarState.KEYGUARD)
}
@@ -377,25 +377,25 @@
)
kosmos.fakeDeviceEntryRepository.setUnlocked(true)
runCurrent()
- kosmos.sceneInteractor.changeScene(toScene = SceneKey.Gone, loggingReason = "reason")
+ kosmos.sceneInteractor.changeScene(toScene = Scenes.Gone, loggingReason = "reason")
runCurrent()
assertThat(kosmos.deviceUnlockedInteractor.isDeviceUnlocked.value).isTrue()
- assertThat(currentScene).isEqualTo(SceneKey.Gone)
+ assertThat(currentScene).isEqualTo(Scenes.Gone)
// Call start to begin hydrating based on the scene framework:
underTest.start()
- kosmos.sceneInteractor.changeScene(toScene = SceneKey.Shade, loggingReason = "reason")
+ kosmos.sceneInteractor.changeScene(toScene = Scenes.Shade, loggingReason = "reason")
runCurrent()
- assertThat(currentScene).isEqualTo(SceneKey.Shade)
+ assertThat(currentScene).isEqualTo(Scenes.Shade)
assertThat(statusBarState).isEqualTo(StatusBarState.SHADE)
kosmos.sceneInteractor.changeScene(
- toScene = SceneKey.QuickSettings,
+ toScene = Scenes.QuickSettings,
loggingReason = "reason"
)
runCurrent()
- assertThat(currentScene).isEqualTo(SceneKey.QuickSettings)
+ assertThat(currentScene).isEqualTo(Scenes.QuickSettings)
assertThat(statusBarState).isEqualTo(StatusBarState.SHADE)
}
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationGutsManagerWithScenesTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationGutsManagerWithScenesTest.kt
index dbf7b6c..012ff2e 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationGutsManagerWithScenesTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationGutsManagerWithScenesTest.kt
@@ -38,6 +38,7 @@
import android.view.View
import android.view.accessibility.accessibilityManager
import androidx.test.filters.SmallTest
+import com.android.compose.animation.scene.ObservableTransitionState
import com.android.internal.logging.MetricsLogger
import com.android.internal.logging.UiEventLogger
import com.android.internal.logging.metricsLogger
@@ -55,8 +56,7 @@
import com.android.systemui.scene.domain.interactor.WindowRootViewVisibilityInteractor
import com.android.systemui.scene.domain.interactor.sceneInteractor
import com.android.systemui.scene.shared.flag.fakeSceneContainerFlags
-import com.android.systemui.scene.shared.model.ObservableTransitionState
-import com.android.systemui.scene.shared.model.SceneKey
+import com.android.systemui.scene.shared.model.Scenes
import com.android.systemui.settings.UserContextProvider
import com.android.systemui.shade.shadeControllerSceneImpl
import com.android.systemui.statusbar.NotificationEntryHelper
@@ -602,9 +602,9 @@
private fun setIsLockscreenOrShadeVisible(isVisible: Boolean) {
val key =
if (isVisible) {
- SceneKey.Lockscreen
+ Scenes.Lockscreen
} else {
- SceneKey.Bouncer
+ Scenes.Bouncer
}
sceneInteractor.changeScene(key, "test")
sceneInteractor.setTransitionState(
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/CentralSurfacesImplTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/CentralSurfacesImplTest.java
index 3a94295d..84156ee1 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/CentralSurfacesImplTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/CentralSurfacesImplTest.java
@@ -73,6 +73,7 @@
import androidx.test.filters.SmallTest;
+import com.android.compose.animation.scene.ObservableTransitionState;
import com.android.internal.colorextraction.ColorExtractor;
import com.android.internal.logging.UiEventLogger;
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
@@ -95,8 +96,7 @@
import com.android.systemui.colorextraction.SysuiColorExtractor;
import com.android.systemui.communal.data.repository.CommunalRepository;
import com.android.systemui.communal.domain.interactor.CommunalInteractor;
-import com.android.systemui.communal.shared.model.CommunalSceneKey;
-import com.android.systemui.communal.shared.model.ObservableCommunalTransitionState;
+import com.android.systemui.communal.shared.model.CommunalScenes;
import com.android.systemui.demomode.DemoModeController;
import com.android.systemui.dump.DumpManager;
import com.android.systemui.flags.FakeFeatureFlags;
@@ -842,16 +842,16 @@
@Test
public void testEnteringGlanceableHub_updatesScrim() {
// Transition to the glanceable hub.
- mCommunalRepository.setTransitionState(flowOf(new ObservableCommunalTransitionState.Idle(
- CommunalSceneKey.Communal.INSTANCE)));
+ mCommunalRepository.setTransitionState(flowOf(new ObservableTransitionState.Idle(
+ CommunalScenes.Communal)));
mTestScope.getTestScheduler().runCurrent();
// ScrimState also transitions.
verify(mScrimController).transitionTo(ScrimState.GLANCEABLE_HUB);
// Transition away from the glanceable hub.
- mCommunalRepository.setTransitionState(flowOf(new ObservableCommunalTransitionState.Idle(
- CommunalSceneKey.Blank.INSTANCE)));
+ mCommunalRepository.setTransitionState(flowOf(new ObservableTransitionState.Idle(
+ CommunalScenes.Blank)));
mTestScope.getTestScheduler().runCurrent();
// ScrimState goes back to UNLOCKED.
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/PhoneStatusBarViewControllerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/PhoneStatusBarViewControllerTest.kt
index 3792d5c..443dd6a 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/PhoneStatusBarViewControllerTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/PhoneStatusBarViewControllerTest.kt
@@ -234,21 +234,16 @@
}
@Test
- fun shadeIsExpandedOnStatusIconClick() {
+ fun shadeIsExpandedOnStatusIconMouseClick() {
val view = createViewMock()
InstrumentationRegistry.getInstrumentation().runOnMainSync {
controller = createAndInitController(view)
}
val statusContainer = view.requireViewById<View>(R.id.system_icons)
statusContainer.dispatchTouchEvent(
- getMotionEventFromSource(
- MotionEvent.ACTION_UP,
- 0,
- 0,
- InputDevice.SOURCE_MOUSE
- )
+ getActionUpEventFromSource(InputDevice.SOURCE_MOUSE)
)
- verify(shadeViewController).expand(any())
+ verify(shadeControllerImpl).animateExpandShade()
}
@Test
@@ -259,18 +254,13 @@
}
val statusContainer = view.requireViewById<View>(R.id.system_icons)
val handled = statusContainer.dispatchTouchEvent(
- getMotionEventFromSource(
- MotionEvent.ACTION_UP,
- 0,
- 0,
- InputDevice.SOURCE_TOUCHSCREEN
- )
+ getActionUpEventFromSource(InputDevice.SOURCE_TOUCHSCREEN)
)
assertThat(handled).isFalse()
}
- private fun getMotionEventFromSource(action: Int, x: Int, y: Int, source: Int): MotionEvent {
- val ev = MotionEvent.obtain(0, 0, action, x.toFloat(), y.toFloat(), 0)
+ private fun getActionUpEventFromSource(source: Int): MotionEvent {
+ val ev = MotionEvent.obtain(0, 0, MotionEvent.ACTION_UP, 0f, 0f, 0)
ev.source = source
return ev
}
@@ -282,7 +272,7 @@
controller = createAndInitController(view)
}
view.performClick()
- verify(shadeViewController, never()).expand(any())
+ verify(shadeControllerImpl, never()).animateExpandShade()
}
private fun getCommandQueueCallback(): CommandQueue.Callbacks {
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarNotificationActivityStarterTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarNotificationActivityStarterTest.java
index 41514ce..938b2f8 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarNotificationActivityStarterTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarNotificationActivityStarterTest.java
@@ -79,6 +79,7 @@
import com.android.systemui.shade.data.repository.FakeShadeRepository;
import com.android.systemui.shade.data.repository.ShadeAnimationRepository;
import com.android.systemui.shade.domain.interactor.ShadeAnimationInteractorLegacyImpl;
+import com.android.systemui.statusbar.CommandQueue;
import com.android.systemui.statusbar.NotificationClickNotifier;
import com.android.systemui.statusbar.NotificationLockscreenUserManager;
import com.android.systemui.statusbar.NotificationPresenter;
@@ -130,6 +131,8 @@
@Mock
private ActivityStarter mActivityStarter;
@Mock
+ private CommandQueue mCommandQueue;
+ @Mock
private NotificationClickNotifier mClickNotifier;
@Mock
private StatusBarStateController mStatusBarStateController;
@@ -236,6 +239,7 @@
mVisibilityProvider,
headsUpManager,
mActivityStarter,
+ mCommandQueue,
mClickNotifier,
mStatusBarKeyguardViewManager,
mock(KeyguardManager.class),
@@ -257,7 +261,9 @@
mock(NotificationShadeWindowController.class),
mActivityTransitionAnimator,
new ShadeAnimationInteractorLegacyImpl(
- new ShadeAnimationRepository(), new FakeShadeRepository()),
+ new ShadeAnimationRepository(),
+ new FakeShadeRepository()
+ ),
notificationAnimationProvider,
mock(LaunchFullScreenIntentProvider.class),
mPowerInteractor,
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/communal/data/repository/FakeCommunalRepository.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/communal/data/repository/FakeCommunalRepository.kt
index 9d508d2..5ff588f 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/communal/data/repository/FakeCommunalRepository.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/communal/data/repository/FakeCommunalRepository.kt
@@ -1,7 +1,8 @@
package com.android.systemui.communal.data.repository
-import com.android.systemui.communal.shared.model.CommunalSceneKey
-import com.android.systemui.communal.shared.model.ObservableCommunalTransitionState
+import com.android.compose.animation.scene.ObservableTransitionState
+import com.android.compose.animation.scene.SceneKey
+import com.android.systemui.communal.shared.model.CommunalScenes
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.flow.Flow
@@ -16,17 +17,16 @@
@OptIn(ExperimentalCoroutinesApi::class)
class FakeCommunalRepository(
applicationScope: CoroutineScope,
- override val desiredScene: MutableStateFlow<CommunalSceneKey> =
- MutableStateFlow(CommunalSceneKey.DEFAULT),
+ override val desiredScene: MutableStateFlow<SceneKey> =
+ MutableStateFlow(CommunalScenes.Default),
) : CommunalRepository {
- override fun setDesiredScene(desiredScene: CommunalSceneKey) {
+ override fun setDesiredScene(desiredScene: SceneKey) {
this.desiredScene.value = desiredScene
}
- private val defaultTransitionState =
- ObservableCommunalTransitionState.Idle(CommunalSceneKey.DEFAULT)
- private val _transitionState = MutableStateFlow<Flow<ObservableCommunalTransitionState>?>(null)
- override val transitionState: StateFlow<ObservableCommunalTransitionState> =
+ private val defaultTransitionState = ObservableTransitionState.Idle(CommunalScenes.Default)
+ private val _transitionState = MutableStateFlow<Flow<ObservableTransitionState>?>(null)
+ override val transitionState: StateFlow<ObservableTransitionState> =
_transitionState
.flatMapLatest { innerFlowOrNull -> innerFlowOrNull ?: flowOf(defaultTransitionState) }
.stateIn(
@@ -35,7 +35,7 @@
initialValue = defaultTransitionState,
)
- override fun setTransitionState(transitionState: Flow<ObservableCommunalTransitionState>?) {
+ override fun setTransitionState(transitionState: Flow<ObservableTransitionState>?) {
_transitionState.value = transitionState
}
}
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/flags/SceneContainerRule.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/flags/SceneContainerRule.kt
index 3faa6eb..4e05de2 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/flags/SceneContainerRule.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/flags/SceneContainerRule.kt
@@ -17,7 +17,6 @@
package com.android.systemui.flags
import android.util.Log
-import com.android.systemui.compose.ComposeFacade
import com.android.systemui.scene.shared.flag.SceneContainerFlag
import org.junit.Assert
import org.junit.Assume
@@ -42,10 +41,6 @@
null || description?.getAnnotation(EnableSceneContainer::class.java) != null
if (hasAnnotation) {
Assume.assumeTrue(
- "Compose must be available for @EnableSceneContainer test",
- ComposeFacade.isComposeAvailable()
- )
- Assume.assumeTrue(
"Couldn't set Flags.SCENE_CONTAINER_ENABLED for @EnableSceneContainer test",
trySetSceneContainerEnabled(true)
)
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/domain/interactor/FromAodTransitionInteractorKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/domain/interactor/FromAodTransitionInteractorKosmos.kt
index da5cd67..2477415 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/domain/interactor/FromAodTransitionInteractorKosmos.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/domain/interactor/FromAodTransitionInteractorKosmos.kt
@@ -20,6 +20,7 @@
import com.android.systemui.kosmos.Kosmos
import com.android.systemui.kosmos.testDispatcher
import com.android.systemui.kosmos.testScope
+import com.android.systemui.power.domain.interactor.powerInteractor
val Kosmos.fromAodTransitionInteractor by
Kosmos.Fixture {
@@ -30,5 +31,6 @@
bgDispatcher = testDispatcher,
mainDispatcher = testDispatcher,
keyguardInteractor = keyguardInteractor,
+ powerInteractor = powerInteractor,
)
}
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardRootViewModelKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardRootViewModelKosmos.kt
index 8ca53e6..d5d357f 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardRootViewModelKosmos.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardRootViewModelKosmos.kt
@@ -39,7 +39,9 @@
keyguardTransitionInteractor = keyguardTransitionInteractor,
notificationsKeyguardInteractor = notificationsKeyguardInteractor,
alternateBouncerToGoneTransitionViewModel = alternateBouncerToGoneTransitionViewModel,
+ aodToGoneTransitionViewModel = aodToGoneTransitionViewModel,
aodToLockscreenTransitionViewModel = aodToLockscreenTransitionViewModel,
+ dozingToGoneTransitionViewModel = dozingToGoneTransitionViewModel,
dozingToLockscreenTransitionViewModel = dozingToLockscreenTransitionViewModel,
glanceableHubToLockscreenTransitionViewModel = glanceableHubToLockscreenTransitionViewModel,
goneToAodTransitionViewModel = goneToAodTransitionViewModel,
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/scene/SceneKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/scene/SceneKosmos.kt
index 8fc419c..2cdf76d 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/scene/SceneKosmos.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/scene/SceneKosmos.kt
@@ -3,18 +3,18 @@
import com.android.systemui.kosmos.Kosmos
import com.android.systemui.kosmos.Kosmos.Fixture
import com.android.systemui.scene.shared.model.SceneContainerConfig
-import com.android.systemui.scene.shared.model.SceneKey
+import com.android.systemui.scene.shared.model.Scenes
var Kosmos.sceneKeys by Fixture {
listOf(
- SceneKey.QuickSettings,
- SceneKey.Shade,
- SceneKey.Lockscreen,
- SceneKey.Bouncer,
- SceneKey.Gone,
- SceneKey.Communal,
+ Scenes.QuickSettings,
+ Scenes.Shade,
+ Scenes.Lockscreen,
+ Scenes.Bouncer,
+ Scenes.Gone,
+ Scenes.Communal,
)
}
-val Kosmos.initialSceneKey by Fixture { SceneKey.Lockscreen }
+val Kosmos.initialSceneKey by Fixture { Scenes.Lockscreen }
val Kosmos.sceneContainerConfig by Fixture { SceneContainerConfig(sceneKeys, initialSceneKey) }
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/scene/shared/model/FakeSceneDataSource.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/scene/shared/model/FakeSceneDataSource.kt
index c208aad..59a01cb 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/scene/shared/model/FakeSceneDataSource.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/scene/shared/model/FakeSceneDataSource.kt
@@ -16,6 +16,8 @@
package com.android.systemui.scene.shared.model
+import com.android.compose.animation.scene.SceneKey
+import com.android.compose.animation.scene.TransitionKey
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.StateFlow
import kotlinx.coroutines.flow.asStateFlow
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/NotificationStackAppearanceViewModelKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/NotificationStackAppearanceViewModelKosmos.kt
index d79633a..bada2a6 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/NotificationStackAppearanceViewModelKosmos.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/NotificationStackAppearanceViewModelKosmos.kt
@@ -16,6 +16,7 @@
package com.android.systemui.statusbar.notification.stack.ui.viewmodel
+import com.android.systemui.dump.dumpManager
import com.android.systemui.kosmos.Kosmos
import com.android.systemui.kosmos.Kosmos.Fixture
import com.android.systemui.scene.domain.interactor.sceneInteractor
@@ -24,6 +25,7 @@
val Kosmos.notificationStackAppearanceViewModel by Fixture {
NotificationStackAppearanceViewModel(
+ dumpManager = dumpManager,
stackAppearanceInteractor = notificationStackAppearanceInteractor,
shadeInteractor = shadeInteractor,
sceneInteractor = sceneInteractor,
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/SharedNotificationContainerViewModelKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/SharedNotificationContainerViewModelKosmos.kt
index 832344d..106e85c 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/SharedNotificationContainerViewModelKosmos.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/SharedNotificationContainerViewModelKosmos.kt
@@ -17,6 +17,7 @@
package com.android.systemui.statusbar.notification.stack.ui.viewmodel
import com.android.systemui.communal.domain.interactor.communalInteractor
+import com.android.systemui.dump.dumpManager
import com.android.systemui.keyguard.domain.interactor.keyguardInteractor
import com.android.systemui.keyguard.domain.interactor.keyguardTransitionInteractor
import com.android.systemui.keyguard.ui.viewmodel.alternateBouncerToGoneTransitionViewModel
@@ -48,6 +49,7 @@
val Kosmos.sharedNotificationContainerViewModel by Fixture {
SharedNotificationContainerViewModel(
interactor = sharedNotificationContainerInteractor,
+ dumpManager = dumpManager,
applicationScope = applicationCoroutineScope,
keyguardInteractor = keyguardInteractor,
keyguardTransitionInteractor = keyguardTransitionInteractor,
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/phone/StatusBarNotificationActivityStarterKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/phone/StatusBarNotificationActivityStarterKosmos.kt
index 41c11ad6..7a86c4f 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/phone/StatusBarNotificationActivityStarterKosmos.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/phone/StatusBarNotificationActivityStarterKosmos.kt
@@ -33,6 +33,7 @@
import com.android.systemui.shade.domain.interactor.shadeAnimationInteractor
import com.android.systemui.shade.shadeController
import com.android.systemui.shade.shadeViewController
+import com.android.systemui.statusbar.commandQueue
import com.android.systemui.statusbar.notification.collection.provider.launchFullScreenIntentProvider
import com.android.systemui.statusbar.notification.collection.render.notificationVisibilityProvider
import com.android.systemui.statusbar.notification.notificationTransitionAnimatorControllerProvider
@@ -59,6 +60,7 @@
notificationVisibilityProvider,
headsUpManager,
activityStarter,
+ commandQueue,
notificationClickNotifier,
statusBarKeyguardViewManager,
keyguardManager,
diff --git a/packages/WallpaperBackup/src/com/android/wallpaperbackup/WallpaperBackupAgent.java b/packages/WallpaperBackup/src/com/android/wallpaperbackup/WallpaperBackupAgent.java
index 6ca60be..f31eb44 100644
--- a/packages/WallpaperBackup/src/com/android/wallpaperbackup/WallpaperBackupAgent.java
+++ b/packages/WallpaperBackup/src/com/android/wallpaperbackup/WallpaperBackupAgent.java
@@ -39,9 +39,7 @@
import android.content.SharedPreferences;
import android.content.pm.IPackageManager;
import android.content.pm.PackageInfo;
-import android.graphics.Point;
import android.graphics.Rect;
-import android.hardware.display.DisplayManager;
import android.os.FileUtils;
import android.os.ParcelFileDescriptor;
import android.os.RemoteException;
@@ -51,22 +49,16 @@
import android.util.Slog;
import android.util.SparseArray;
import android.util.Xml;
-import android.view.Display;
-import android.view.DisplayInfo;
import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.content.PackageMonitor;
-import com.android.modules.utils.TypedXmlPullParser;
-import com.android.modules.utils.TypedXmlSerializer;
import org.xmlpull.v1.XmlPullParser;
-import org.xmlpull.v1.XmlPullParserException;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
-import java.util.ArrayList;
import java.util.List;
/**
@@ -110,9 +102,6 @@
@VisibleForTesting
static final String WALLPAPER_INFO_STAGE = "wallpaper-info-stage";
- @VisibleForTesting
- static final String WALLPAPER_BACKUP_DEVICE_INFO_STAGE = "wallpaper-backup-device-info-stage";
-
static final String EMPTY_SENTINEL = "empty";
static final String QUOTA_SENTINEL = "quota";
@@ -121,11 +110,6 @@
static final String SYSTEM_GENERATION = "system_gen";
static final String LOCK_GENERATION = "lock_gen";
- /**
- * An approximate area threshold to compare device dimension similarity
- */
- static final int AREA_THRESHOLD = 50; // TODO: determine appropriate threshold
-
// If this file exists, it means we exceeded our quota last time
private File mQuotaFile;
private boolean mQuotaExceeded;
@@ -137,8 +121,6 @@
private boolean mSystemHasLiveComponent;
private boolean mLockHasLiveComponent;
- private DisplayManager mDisplayManager;
-
@Override
public void onCreate() {
if (DEBUG) {
@@ -155,8 +137,6 @@
mBackupManager = new BackupManager(getBaseContext());
mEventLogger = new WallpaperEventLogger(mBackupManager, /* wallpaperAgent */ this);
-
- mDisplayManager = getSystemService(DisplayManager.class);
}
@Override
@@ -195,7 +175,6 @@
mSystemHasLiveComponent = mWallpaperManager.getWallpaperInfo(FLAG_SYSTEM) != null;
mLockHasLiveComponent = mWallpaperManager.getWallpaperInfo(FLAG_LOCK) != null;
- backupDeviceInfoFile(data);
backupWallpaperInfoFile(/* sysOrLockChanged= */ sysChanged || lockChanged, data);
backupSystemWallpaperFile(sharedPrefs, sysChanged, sysGeneration, data);
backupLockWallpaperFileIfItExists(sharedPrefs, lockChanged, lockGeneration, data);
@@ -212,50 +191,6 @@
}
}
- /**
- * This method backs up the device dimension information. The device data will always get
- * overwritten when triggering a backup
- */
- private void backupDeviceInfoFile(FullBackupDataOutput data)
- throws IOException {
- final File deviceInfoStage = new File(getFilesDir(), WALLPAPER_BACKUP_DEVICE_INFO_STAGE);
-
- // save the dimensions of the device with xml formatting
- Point dimensions = getScreenDimensions();
- Point secondaryDimensions = getRealSize(getSmallerDisplay());
-
- deviceInfoStage.createNewFile();
- FileOutputStream fstream = new FileOutputStream(deviceInfoStage, false);
- TypedXmlSerializer out = Xml.resolveSerializer(fstream);
- out.startDocument(null, true);
- out.startTag(null, "dimensions");
-
- out.startTag(null, "width");
- out.text(String.valueOf(dimensions.x));
- out.endTag(null, "width");
-
- out.startTag(null, "height");
- out.text(String.valueOf(dimensions.y));
- out.endTag(null, "height");
-
- out.startTag(null, "secondarywidth");
- out.text(String.valueOf(secondaryDimensions != null ? secondaryDimensions.x : 0));
- out.endTag(null, "secondarywidth");
-
- out.startTag(null, "secondaryheight");
- out.text(String.valueOf(secondaryDimensions != null ? secondaryDimensions.y : 0));
- out.endTag(null, "secondaryheight");
-
- out.endTag(null, "dimensions");
- out.endDocument();
- fstream.flush();
- FileUtils.sync(fstream);
- fstream.close();
-
- if (DEBUG) Slog.v(TAG, "Storing device dimension data");
- backupFile(deviceInfoStage, data);
- }
-
private void backupWallpaperInfoFile(boolean sysOrLockChanged, FullBackupDataOutput data)
throws IOException {
final ParcelFileDescriptor wallpaperInfoFd = mWallpaperManager.getWallpaperInfoFile();
@@ -429,22 +364,9 @@
final File infoStage = new File(filesDir, WALLPAPER_INFO_STAGE);
final File imageStage = new File(filesDir, SYSTEM_WALLPAPER_STAGE);
final File lockImageStage = new File(filesDir, LOCK_WALLPAPER_STAGE);
- final File deviceDimensionsStage = new File(filesDir, WALLPAPER_BACKUP_DEVICE_INFO_STAGE);
boolean lockImageStageExists = lockImageStage.exists();
try {
- // Parse the device dimensions of the source device and compare with target to
- // to identify whether we need to skip the remainder of the restore process
- Pair<Point, Point> sourceDeviceDimensions = parseDeviceDimensions(
- deviceDimensionsStage);
-
- Point targetDeviceDimensions = getScreenDimensions();
- if (sourceDeviceDimensions != null
- && isSourceDeviceSignificantlySmallerThanTarget(sourceDeviceDimensions.first,
- targetDeviceDimensions)) {
- Slog.d(TAG, "The source device is significantly smaller than target");
- }
-
// First parse the live component name so that we know for logging if we care about
// logging errors with the image restore.
ComponentName wpService = parseWallpaperComponent(infoStage, "wp");
@@ -478,7 +400,6 @@
infoStage.delete();
imageStage.delete();
lockImageStage.delete();
- deviceDimensionsStage.delete();
SharedPreferences prefs = getSharedPreferences(PREFS_NAME, Context.MODE_PRIVATE);
prefs.edit()
@@ -488,66 +409,6 @@
}
}
- /**
- * This method parses the given file for the backed up device dimensions
- *
- * @param deviceDimensions the file which holds the device dimensions
- * @return the backed up device dimensions
- */
- private Pair<Point, Point> parseDeviceDimensions(File deviceDimensions) {
- int width = 0, height = 0, secondaryHeight = 0, secondaryWidth = 0;
- try {
- TypedXmlPullParser parser = Xml.resolvePullParser(
- new FileInputStream(deviceDimensions));
-
- while (parser.next() != XmlPullParser.END_TAG) {
- if (parser.getEventType() != XmlPullParser.START_TAG) {
- continue;
- }
-
- String name = parser.getName();
-
- switch (name) {
- case "width":
- String widthText = readText(parser);
- width = Integer.valueOf(widthText);
- break;
-
- case "height":
- String textHeight = readText(parser);
- height = Integer.valueOf(textHeight);
- break;
-
- case "secondarywidth":
- String secondaryWidthText = readText(parser);
- secondaryWidth = Integer.valueOf(secondaryWidthText);
- break;
-
- case "secondaryheight":
- String secondaryHeightText = readText(parser);
- secondaryHeight = Integer.valueOf(secondaryHeightText);
- break;
- default:
- break;
- }
- }
- return new Pair<>(new Point(width, height), new Point(secondaryWidth, secondaryHeight));
-
- } catch (Exception e) {
- return null;
- }
- }
-
- private static String readText(TypedXmlPullParser parser)
- throws IOException, XmlPullParserException {
- String result = "";
- if (parser.next() == XmlPullParser.TEXT) {
- result = parser.getText();
- parser.nextTag();
- }
- return result;
- }
-
@VisibleForTesting
void updateWallpaperComponent(ComponentName wpService, int which)
throws IOException {
@@ -639,7 +500,6 @@
mEventLogger.onLockImageWallpaperRestoreFailed(error);
}
}
-
private Rect parseCropHint(File wallpaperInfo, String sectionTag) {
Rect cropHint = new Rect();
try (FileInputStream stream = new FileInputStream(wallpaperInfo)) {
@@ -677,7 +537,7 @@
if (type != XmlPullParser.START_TAG) continue;
String tag = parser.getName();
if (!sectionTag.equals(tag)) continue;
- for (Pair<Integer, String> pair : List.of(
+ for (Pair<Integer, String> pair: List.of(
new Pair<>(WallpaperManager.PORTRAIT, "Portrait"),
new Pair<>(WallpaperManager.LANDSCAPE, "Landscape"),
new Pair<>(WallpaperManager.SQUARE_PORTRAIT, "SquarePortrait"),
@@ -831,94 +691,6 @@
};
}
- /**
- * This method retrieves the dimensions of the largest display of the device
- *
- * @return a @{Point} object that contains the dimensions of the largest display on the device
- */
- private Point getScreenDimensions() {
- Point largetDimensions = null;
- int maxArea = 0;
-
- for (Display display : getInternalDisplays()) {
- Point displaySize = getRealSize(display);
-
- int width = displaySize.x;
- int height = displaySize.y;
- int area = width * height;
-
- if (area > maxArea) {
- maxArea = area;
- largetDimensions = displaySize;
- }
- }
-
- return largetDimensions;
- }
-
- private Point getRealSize(Display display) {
- DisplayInfo displayInfo = new DisplayInfo();
- display.getDisplayInfo(displayInfo);
- return new Point(displayInfo.logicalWidth, displayInfo.logicalHeight);
- }
-
- /**
- * This method returns the smaller display on a multi-display device
- *
- * @return Display that corresponds to the smaller display on a device or null if ther is only
- * one Display on a device
- */
- private Display getSmallerDisplay() {
- List<Display> internalDisplays = getInternalDisplays();
- Point largestDisplaySize = getScreenDimensions();
-
- // Find the first non-matching internal display
- for (Display display : internalDisplays) {
- Point displaySize = getRealSize(display);
- if (displaySize.x != largestDisplaySize.x || displaySize.y != largestDisplaySize.y) {
- return display;
- }
- }
-
- // If no smaller display found, return null, as there is only a single display
- return null;
- }
-
- /**
- * This method retrieves the collection of Display objects available in the device.
- * i.e. non-external displays are ignored
- *
- * @return list of displays corresponding to each display in the device
- */
- private List<Display> getInternalDisplays() {
- Display[] allDisplays = mDisplayManager.getDisplays(
- DisplayManager.DISPLAY_CATEGORY_ALL_INCLUDING_DISABLED);
-
- List<Display> internalDisplays = new ArrayList<>();
- for (Display display : allDisplays) {
- if (display.getType() == Display.TYPE_INTERNAL) {
- internalDisplays.add(display);
- }
- }
- return internalDisplays;
- }
-
- /**
- * This method compares the source and target dimensions, and returns true if there is a
- * significant difference in area between them and the source dimensions are smaller than the
- * target dimensions.
- *
- * @param sourceDimensions is the dimensions of the source device
- * @param targetDimensions is the dimensions of the target device
- */
- @VisibleForTesting
- boolean isSourceDeviceSignificantlySmallerThanTarget(Point sourceDimensions,
- Point targetDimensions) {
- int rawAreaDelta = (targetDimensions.x * targetDimensions.y)
- - (sourceDimensions.x * sourceDimensions.y);
- return rawAreaDelta > AREA_THRESHOLD;
- }
-
@VisibleForTesting
boolean isDeviceInRestore() {
try {
diff --git a/packages/WallpaperBackup/test/src/com/android/wallpaperbackup/WallpaperBackupAgentTest.java b/packages/WallpaperBackup/test/src/com/android/wallpaperbackup/WallpaperBackupAgentTest.java
index 79e7bf0..3ecdf3f 100644
--- a/packages/WallpaperBackup/test/src/com/android/wallpaperbackup/WallpaperBackupAgentTest.java
+++ b/packages/WallpaperBackup/test/src/com/android/wallpaperbackup/WallpaperBackupAgentTest.java
@@ -59,7 +59,6 @@
import android.content.Intent;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
-import android.graphics.Point;
import android.graphics.Rect;
import android.os.FileUtils;
import android.os.ParcelFileDescriptor;
@@ -677,7 +676,7 @@
mWallpaperBackupAgent.onRestoreFinished();
- for (String wallpaper : List.of(WALLPAPER_IMG_LOCK, WALLPAPER_IMG_SYSTEM)) {
+ for (String wallpaper: List.of(WALLPAPER_IMG_LOCK, WALLPAPER_IMG_SYSTEM)) {
DataTypeResult result = getLoggingResult(wallpaper,
mWallpaperBackupAgent.getBackupRestoreEventLogger().getLoggingResults());
assertThat(result).isNotNull();
@@ -841,26 +840,6 @@
testParseCropHints(testMap);
}
- @Test
- public void test_sourceDimensionsAreLargerThanTarget() {
- // source device is larger than target, expecting to get false
- Point sourceDimensions = new Point(2208, 1840);
- Point targetDimensions = new Point(1080, 2092);
- boolean isSourceSmaller = mWallpaperBackupAgent
- .isSourceDeviceSignificantlySmallerThanTarget(sourceDimensions, targetDimensions);
- assertThat(isSourceSmaller).isEqualTo(false);
- }
-
- @Test
- public void test_sourceDimensionsMuchSmallerThanTarget() {
- // source device is smaller than target, expecting to get true
- Point sourceDimensions = new Point(1080, 2092);
- Point targetDimensions = new Point(2208, 1840);
- boolean isSourceSmaller = mWallpaperBackupAgent
- .isSourceDeviceSignificantlySmallerThanTarget(sourceDimensions, targetDimensions);
- assertThat(isSourceSmaller).isEqualTo(true);
- }
-
private void testParseCropHints(Map<Integer, Rect> testMap) throws Exception {
assumeTrue(multiCrop());
mockRestoredStaticWallpaperFile(testMap);
@@ -955,7 +934,7 @@
TypedXmlSerializer out = Xml.resolveSerializer(fstream);
out.startDocument(null, true);
out.startTag(null, "wp");
- for (Map.Entry<Integer, Rect> entry : crops.entrySet()) {
+ for (Map.Entry<Integer, Rect> entry: crops.entrySet()) {
String orientation = switch (entry.getKey()) {
case WallpaperManager.PORTRAIT -> "Portrait";
case WallpaperManager.LANDSCAPE -> "Landscape";
diff --git a/ravenwood/Android.bp b/ravenwood/Android.bp
index e535f0a..178102e 100644
--- a/ravenwood/Android.bp
+++ b/ravenwood/Android.bp
@@ -86,6 +86,21 @@
jarjar_rules: ":ravenwood-services-jarjar-rules",
}
+// Separated out from ravenwood-junit-impl since it needs to compile
+// against `module_current`
+java_library {
+ name: "ravenwood-junit-impl-flag",
+ srcs: [
+ "junit-flag-src/**/*.java",
+ ],
+ sdk_version: "module_current",
+ libs: [
+ "junit",
+ "flag-junit",
+ ],
+ visibility: ["//visibility:public"],
+}
+
// Carefully compiles against only test_current to support tests that
// want to verify they're unbundled. The "impl" library above is what
// ships inside the Ravenwood environment to actually drive any API
@@ -95,10 +110,12 @@
srcs: [
"junit-src/**/*.java",
"junit-stub-src/**/*.java",
+ "junit-flag-src/**/*.java",
],
sdk_version: "test_current",
libs: [
"junit",
+ "flag-junit",
],
visibility: ["//visibility:public"],
}
diff --git a/ravenwood/junit-flag-src/android/platform/test/flag/junit/RavenwoodFlagsValueProvider.java b/ravenwood/junit-flag-src/android/platform/test/flag/junit/RavenwoodFlagsValueProvider.java
new file mode 100644
index 0000000..9d62774
--- /dev/null
+++ b/ravenwood/junit-flag-src/android/platform/test/flag/junit/RavenwoodFlagsValueProvider.java
@@ -0,0 +1,54 @@
+/*
+ * Copyright (C) 2024 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 android.platform.test.flag.junit;
+
+import android.platform.test.flag.junit.CheckFlagsRule;
+import android.platform.test.flag.junit.IFlagsValueProvider;
+
+/**
+ * Offer to create {@link CheckFlagsRule} instances that are useful on the Ravenwood deviceless
+ * testing environment.
+ *
+ * At the moment, default flag values are not available on Ravenwood, so the only options offered
+ * here are "all-on" and "all-off" options. Tests that want to exercise specific flag states should
+ * use {@link android.platform.test.flag.junit.SetFlagsRule}.
+ */
+public class RavenwoodFlagsValueProvider {
+ /**
+ * Create a {@link CheckFlagsRule} instance where flags are in an "all-on" state.
+ */
+ public static CheckFlagsRule createAllOnCheckFlagsRule() {
+ return new CheckFlagsRule(new IFlagsValueProvider() {
+ @Override
+ public boolean getBoolean(String flag) {
+ return true;
+ }
+ });
+ }
+
+ /**
+ * Create a {@link CheckFlagsRule} instance where flags are in an "all-off" state.
+ */
+ public static CheckFlagsRule createAllOffCheckFlagsRule() {
+ return new CheckFlagsRule(new IFlagsValueProvider() {
+ @Override
+ public boolean getBoolean(String flag) {
+ return false;
+ }
+ });
+ }
+}
diff --git a/ravenwood/test-authors.md b/ravenwood/test-authors.md
index 9179a62..7c0cee8 100644
--- a/ravenwood/test-authors.md
+++ b/ravenwood/test-authors.md
@@ -112,6 +112,24 @@
This naturally composes together well with any `RavenwoodRule` that your test may need.
+While `SetFlagsRule` is generally a best-practice (as it can explicitly confirm behaviors for both "on" and "off" states), you may need to write tests that use `CheckFlagsRule` (such as when writing CTS). Ravenwood currently supports `CheckFlagsRule` by offering "all-on" and "all-off" behaviors:
+
+```
+import android.platform.test.flag.junit.CheckFlagsRule;
+import android.platform.test.flag.junit.DeviceFlagsValueProvider;
+import android.platform.test.flag.junit.RavenwoodFlagsValueProvider;
+import android.platform.test.ravenwood.RavenwoodRule;
+
+@RunWith(AndroidJUnit4.class)
+public class MyCodeTest {
+ @Rule
+ public final CheckFlagsRule mCheckFlagsRule = RavenwoodRule.isUnderRavenwood()
+ ? RavenwoodFlagsValueProvider.createAllOnCheckFlagsRule()
+ : DeviceFlagsValueProvider.createCheckFlagsRule();
+```
+
+Ravenwood currently doesn't have knowledge of the "default" value of any flags, so using `createAllOnCheckFlagsRule()` is recommended to verify the widest possible set of behaviors. The example code above falls back to using default values from `DeviceFlagsValueProvider` when not running on Ravenwood.
+
## Strategies for migration/bivalent tests
Ravenwood aims to support tests that are written in a “bivalent” way, where the same test code can be dual-compiled to run on both a real Android device and under a Ravenwood environment.
diff --git a/services/autofill/java/com/android/server/autofill/Session.java b/services/autofill/java/com/android/server/autofill/Session.java
index d779fbf..551297b 100644
--- a/services/autofill/java/com/android/server/autofill/Session.java
+++ b/services/autofill/java/com/android/server/autofill/Session.java
@@ -4782,7 +4782,6 @@
}
if (isCredmanIntegrationActive(response)) {
- Slog.d(TAG, "Attempting to add Credential Manager callback to pinned entries");
addCredentialManagerCallback(response);
}
@@ -5713,7 +5712,6 @@
/* isPrimary= */ true);
updateFillDialogTriggerIdsLocked();
updateTrackedIdsLocked();
-
if (mCurrentViewId == null) {
return;
}
diff --git a/services/core/java/com/android/server/audio/AudioService.java b/services/core/java/com/android/server/audio/AudioService.java
index 19dd7b7..d4f04b5 100644
--- a/services/core/java/com/android/server/audio/AudioService.java
+++ b/services/core/java/com/android/server/audio/AudioService.java
@@ -3713,7 +3713,7 @@
&& AudioSystem.DEVICE_OUT_ALL_A2DP_SET.contains(device)
&& (flags & AudioManager.FLAG_BLUETOOTH_ABS_VOLUME) == 0) {
if (DEBUG_VOL) {
- Log.d(TAG, "adjustSreamVolume: postSetAvrcpAbsoluteVolumeIndex index="
+ Log.d(TAG, "adjustStreamVolume: postSetAvrcpAbsoluteVolumeIndex index="
+ newIndex + "stream=" + streamType);
}
mDeviceBroker.postSetAvrcpAbsoluteVolumeIndex(newIndex / 10);
@@ -3727,7 +3727,7 @@
&& streamType == getBluetoothContextualVolumeStream()
&& (flags & AudioManager.FLAG_BLUETOOTH_ABS_VOLUME) == 0) {
if (DEBUG_VOL) {
- Log.d(TAG, "adjustSreamVolume postSetLeAudioVolumeIndex index="
+ Log.d(TAG, "adjustStreamVolume postSetLeAudioVolumeIndex index="
+ newIndex + " stream=" + streamType);
}
mDeviceBroker.postSetLeAudioVolumeIndex(newIndex,
@@ -3740,7 +3740,7 @@
// the one expected by the hearing aid
if (streamType == getBluetoothContextualVolumeStream()) {
if (DEBUG_VOL) {
- Log.d(TAG, "adjustSreamVolume postSetHearingAidVolumeIndex index="
+ Log.d(TAG, "adjustStreamVolume postSetHearingAidVolumeIndex index="
+ newIndex + " stream=" + streamType);
}
mDeviceBroker.postSetHearingAidVolumeIndex(newIndex, streamType);
@@ -4722,7 +4722,7 @@
&& streamType == getBluetoothContextualVolumeStream()
&& (flags & AudioManager.FLAG_BLUETOOTH_ABS_VOLUME) == 0) {
if (DEBUG_VOL) {
- Log.d(TAG, "adjustSreamVolume postSetLeAudioVolumeIndex index="
+ Log.d(TAG, "setStreamVolume postSetLeAudioVolumeIndex index="
+ index + " stream=" + streamType);
}
mDeviceBroker.postSetLeAudioVolumeIndex(index, mStreamStates[streamType].getMaxIndex(),
diff --git a/services/core/java/com/android/server/biometrics/sensors/face/FaceService.java b/services/core/java/com/android/server/biometrics/sensors/face/FaceService.java
index 68b4e3f..6b8586a 100644
--- a/services/core/java/com/android/server/biometrics/sensors/face/FaceService.java
+++ b/services/core/java/com/android/server/biometrics/sensors/face/FaceService.java
@@ -119,7 +119,7 @@
* Receives the incoming binder calls from FaceManager.
*/
@VisibleForTesting final class FaceServiceWrapper extends IFaceService.Stub {
- @android.annotation.EnforcePermission(android.Manifest.permission.USE_BIOMETRIC_INTERNAL)
+ @android.annotation.EnforcePermission(android.Manifest.permission.TEST_BIOMETRIC)
@Override
public ITestSession createTestSession(int sensorId, @NonNull ITestSessionCallback callback,
@NonNull String opPackageName) {
diff --git a/services/core/java/com/android/server/display/AutomaticBrightnessController.java b/services/core/java/com/android/server/display/AutomaticBrightnessController.java
index fb4976d..b2a738f 100644
--- a/services/core/java/com/android/server/display/AutomaticBrightnessController.java
+++ b/services/core/java/com/android/server/display/AutomaticBrightnessController.java
@@ -463,12 +463,6 @@
boolean userChangedAutoBrightnessAdjustment, int displayPolicy,
boolean shouldResetShortTermModel) {
mState = state;
- // While dozing, the application processor may be suspended which will prevent us from
- // receiving new information from the light sensor. On some devices, we may be able to
- // switch to a wake-up light sensor instead but for now we will simply disable the sensor
- // and hold onto the last computed screen auto brightness. We save the dozing flag for
- // debugging purposes.
- boolean dozing = (displayPolicy == DisplayPowerRequest.POLICY_DOZE);
boolean changed = setBrightnessConfiguration(configuration, shouldResetShortTermModel);
changed |= setDisplayPolicy(displayPolicy);
if (userChangedAutoBrightnessAdjustment) {
@@ -482,10 +476,10 @@
}
final boolean userInitiatedChange =
userChangedBrightness || userChangedAutoBrightnessAdjustment;
- if (userInitiatedChange && enable && !dozing) {
+ if (userInitiatedChange && enable) {
prepareBrightnessAdjustmentSample();
}
- changed |= setLightSensorEnabled(enable && !dozing);
+ changed |= setLightSensorEnabled(enable);
if (mIsBrightnessThrottled != mBrightnessThrottler.isThrottled()) {
// Maximum brightness has changed, so recalculate display brightness.
diff --git a/services/core/java/com/android/server/display/DisplayPowerController.java b/services/core/java/com/android/server/display/DisplayPowerController.java
index 76f3035..2010aca 100644
--- a/services/core/java/com/android/server/display/DisplayPowerController.java
+++ b/services/core/java/com/android/server/display/DisplayPowerController.java
@@ -1485,8 +1485,7 @@
}
// Use default brightness when dozing unless overridden.
- if ((Float.isNaN(brightnessState))
- && Display.isDozeState(state)) {
+ if (Float.isNaN(brightnessState) && mPowerRequest.policy == POLICY_DOZE) {
rawBrightnessState = mScreenBrightnessDozeConfig;
brightnessState = clampScreenBrightness(rawBrightnessState);
mBrightnessReasonTemp.setReason(BrightnessReason.REASON_DOZE_DEFAULT);
diff --git a/services/core/java/com/android/server/display/brightness/DisplayBrightnessStrategySelector.java b/services/core/java/com/android/server/display/brightness/DisplayBrightnessStrategySelector.java
index babc36e..8e84450 100644
--- a/services/core/java/com/android/server/display/brightness/DisplayBrightnessStrategySelector.java
+++ b/services/core/java/com/android/server/display/brightness/DisplayBrightnessStrategySelector.java
@@ -200,12 +200,9 @@
// We are not checking the targetDisplayState, but rather relying on the policy because
// a user can define a different display state(displayPowerRequest.dozeScreenState) too
// in the request with the Doze policy
- if (displayPowerRequest.policy == DisplayManagerInternal.DisplayPowerRequest.POLICY_DOZE) {
- if (!mAllowAutoBrightnessWhileDozingConfig) {
- return true;
- }
- }
- return false;
+ return displayPowerRequest.policy == DisplayManagerInternal.DisplayPowerRequest.POLICY_DOZE
+ && !mAllowAutoBrightnessWhileDozingConfig
+ && BrightnessUtils.isValidBrightnessValue(displayPowerRequest.dozeScreenBrightness);
}
@VisibleForTesting
diff --git a/services/core/java/com/android/server/display/brightness/strategy/AutomaticBrightnessStrategy.java b/services/core/java/com/android/server/display/brightness/strategy/AutomaticBrightnessStrategy.java
index 8eaecef..d1ca49b 100644
--- a/services/core/java/com/android/server/display/brightness/strategy/AutomaticBrightnessStrategy.java
+++ b/services/core/java/com/android/server/display/brightness/strategy/AutomaticBrightnessStrategy.java
@@ -15,6 +15,8 @@
*/
package com.android.server.display.brightness.strategy;
+import static android.hardware.display.DisplayManagerInternal.DisplayPowerRequest.POLICY_DOZE;
+
import android.annotation.Nullable;
import android.content.Context;
import android.hardware.display.BrightnessConfiguration;
@@ -102,8 +104,7 @@
boolean allowAutoBrightnessWhileDozingConfig, int brightnessReason, int policy,
float lastUserSetScreenBrightness, boolean userSetBrightnessChanged) {
final boolean autoBrightnessEnabledInDoze =
- allowAutoBrightnessWhileDozingConfig
- && Display.isDozeState(targetDisplayState);
+ allowAutoBrightnessWhileDozingConfig && policy == POLICY_DOZE;
mIsAutoBrightnessEnabled = shouldUseAutoBrightness()
&& (targetDisplayState == Display.STATE_ON || autoBrightnessEnabledInDoze)
&& brightnessReason != BrightnessReason.REASON_OVERRIDE
diff --git a/services/core/java/com/android/server/inputmethod/DefaultImeVisibilityApplier.java b/services/core/java/com/android/server/inputmethod/DefaultImeVisibilityApplier.java
index f1698dd..8826e3d 100644
--- a/services/core/java/com/android/server/inputmethod/DefaultImeVisibilityApplier.java
+++ b/services/core/java/com/android/server/inputmethod/DefaultImeVisibilityApplier.java
@@ -36,6 +36,7 @@
import android.os.ResultReceiver;
import android.util.EventLog;
import android.util.Slog;
+import android.view.MotionEvent;
import android.view.inputmethod.ImeTracker;
import android.view.inputmethod.InputMethod;
import android.view.inputmethod.InputMethodManager;
@@ -75,7 +76,7 @@
@GuardedBy("ImfLock.class")
@Override
- public void performShowIme(IBinder showInputToken, @Nullable ImeTracker.Token statsToken,
+ public void performShowIme(IBinder showInputToken, @NonNull ImeTracker.Token statsToken,
@InputMethod.ShowFlags int showFlags, ResultReceiver resultReceiver,
@SoftInputShowHideReason int reason) {
final IInputMethodInvoker curMethod = mService.getCurMethodLocked();
@@ -88,7 +89,8 @@
// TODO(b/192412909): Check if we can always call onShowHideSoftInputRequested() or not.
if (curMethod.showSoftInput(showInputToken, statsToken, showFlags, resultReceiver)) {
if (DEBUG_IME_VISIBILITY) {
- EventLog.writeEvent(IMF_SHOW_IME, statsToken.getTag(),
+ EventLog.writeEvent(IMF_SHOW_IME,
+ statsToken != null ? statsToken.getTag() : ImeTracker.TOKEN_NONE,
Objects.toString(mService.mCurFocusedWindow),
InputMethodDebug.softInputDisplayReasonToString(reason),
InputMethodDebug.softInputModeToString(
@@ -102,7 +104,7 @@
@GuardedBy("ImfLock.class")
@Override
- public void performHideIme(IBinder hideInputToken, @Nullable ImeTracker.Token statsToken,
+ public void performHideIme(IBinder hideInputToken, @NonNull ImeTracker.Token statsToken,
ResultReceiver resultReceiver, @SoftInputShowHideReason int reason) {
final IInputMethodInvoker curMethod = mService.getCurMethodLocked();
if (curMethod != null) {
@@ -118,7 +120,8 @@
// TODO(b/192412909): Check if we can always call onShowHideSoftInputRequested() or not.
if (curMethod.hideSoftInput(hideInputToken, statsToken, 0, resultReceiver)) {
if (DEBUG_IME_VISIBILITY) {
- EventLog.writeEvent(IMF_HIDE_IME, statsToken.getTag(),
+ EventLog.writeEvent(IMF_HIDE_IME,
+ statsToken != null ? statsToken.getTag() : ImeTracker.TOKEN_NONE,
Objects.toString(mService.mCurFocusedWindow),
InputMethodDebug.softInputDisplayReasonToString(reason),
InputMethodDebug.softInputModeToString(
@@ -132,14 +135,16 @@
@GuardedBy("ImfLock.class")
@Override
- public void applyImeVisibility(IBinder windowToken, @Nullable ImeTracker.Token statsToken,
+ public void applyImeVisibility(IBinder windowToken, @NonNull ImeTracker.Token statsToken,
@ImeVisibilityStateComputer.VisibilityState int state) {
- applyImeVisibility(windowToken, statsToken, state, -1 /* ignore reason */);
+ applyImeVisibility(windowToken, statsToken, state,
+ SoftInputShowHideReason.NOT_SET /* ignore reason */);
}
@GuardedBy("ImfLock.class")
void applyImeVisibility(IBinder windowToken, @Nullable ImeTracker.Token statsToken,
- @ImeVisibilityStateComputer.VisibilityState int state, int reason) {
+ @ImeVisibilityStateComputer.VisibilityState int state,
+ @SoftInputShowHideReason int reason) {
switch (state) {
case STATE_SHOW_IME:
ImeTracker.forLogging().onProgress(statsToken,
@@ -164,18 +169,20 @@
}
break;
case STATE_HIDE_IME_EXPLICIT:
- mService.hideCurrentInputLocked(windowToken, statsToken, 0, null, reason);
+ mService.hideCurrentInputLocked(windowToken, statsToken,
+ 0 /* flags */, null /* resultReceiver */, reason);
break;
case STATE_HIDE_IME_NOT_ALWAYS:
mService.hideCurrentInputLocked(windowToken, statsToken,
- InputMethodManager.HIDE_NOT_ALWAYS, null, reason);
+ InputMethodManager.HIDE_NOT_ALWAYS, null /* resultReceiver */, reason);
break;
case STATE_SHOW_IME_IMPLICIT:
mService.showCurrentInputLocked(windowToken, statsToken,
- InputMethodManager.SHOW_IMPLICIT, null, reason);
+ InputMethodManager.SHOW_IMPLICIT, MotionEvent.TOOL_TYPE_UNKNOWN,
+ null /* resultReceiver */, reason);
break;
case STATE_SHOW_IME_SNAPSHOT:
- showImeScreenshot(windowToken, mService.getDisplayIdToShowImeLocked(), null);
+ showImeScreenshot(windowToken, mService.getDisplayIdToShowImeLocked());
break;
case STATE_REMOVE_IME_SNAPSHOT:
removeImeScreenshot(mService.getDisplayIdToShowImeLocked());
@@ -187,11 +194,10 @@
@GuardedBy("ImfLock.class")
@Override
- public boolean showImeScreenshot(@NonNull IBinder imeTarget, int displayId,
- @Nullable ImeTracker.Token statsToken) {
+ public boolean showImeScreenshot(@NonNull IBinder imeTarget, int displayId) {
if (mImeTargetVisibilityPolicy.showImeScreenshot(imeTarget, displayId)) {
mService.onShowHideSoftInputRequested(false /* show */, imeTarget,
- SHOW_IME_SCREENSHOT_FROM_IMMS, statsToken);
+ SHOW_IME_SCREENSHOT_FROM_IMMS, null /* statsToken */);
return true;
}
return false;
@@ -202,7 +208,7 @@
public boolean removeImeScreenshot(int displayId) {
if (mImeTargetVisibilityPolicy.removeImeScreenshot(displayId)) {
mService.onShowHideSoftInputRequested(false /* show */, mService.mCurFocusedWindow,
- REMOVE_IME_SCREENSHOT_FROM_IMMS, null);
+ REMOVE_IME_SCREENSHOT_FROM_IMMS, null /* statsToken */);
return true;
}
return false;
diff --git a/services/core/java/com/android/server/inputmethod/IInputMethodInvoker.java b/services/core/java/com/android/server/inputmethod/IInputMethodInvoker.java
index 776184f..a380bc1 100644
--- a/services/core/java/com/android/server/inputmethod/IInputMethodInvoker.java
+++ b/services/core/java/com/android/server/inputmethod/IInputMethodInvoker.java
@@ -201,7 +201,7 @@
// TODO(b/192412909): Convert this back to void method
@AnyThread
- boolean showSoftInput(IBinder showInputToken, @Nullable ImeTracker.Token statsToken,
+ boolean showSoftInput(IBinder showInputToken, @NonNull ImeTracker.Token statsToken,
@InputMethod.ShowFlags int flags, ResultReceiver resultReceiver) {
try {
mTarget.showSoftInput(showInputToken, statsToken, flags, resultReceiver);
@@ -214,8 +214,8 @@
// TODO(b/192412909): Convert this back to void method
@AnyThread
- boolean hideSoftInput(IBinder hideInputToken, @Nullable ImeTracker.Token statsToken, int flags,
- ResultReceiver resultReceiver) {
+ boolean hideSoftInput(IBinder hideInputToken, @NonNull ImeTracker.Token statsToken,
+ int flags, ResultReceiver resultReceiver) {
try {
mTarget.hideSoftInput(hideInputToken, statsToken, flags, resultReceiver);
} catch (RemoteException e) {
diff --git a/services/core/java/com/android/server/inputmethod/ImeTrackerService.java b/services/core/java/com/android/server/inputmethod/ImeTrackerService.java
index d06c31c..85ab773 100644
--- a/services/core/java/com/android/server/inputmethod/ImeTrackerService.java
+++ b/services/core/java/com/android/server/inputmethod/ImeTrackerService.java
@@ -75,34 +75,12 @@
@NonNull
@Override
- public ImeTracker.Token onRequestShow(@NonNull String tag, int uid,
+ public ImeTracker.Token onStart(@NonNull String tag, int uid, @ImeTracker.Type int type,
@ImeTracker.Origin int origin, @SoftInputShowHideReason int reason, boolean fromUser) {
final var binder = new Binder();
final var token = new ImeTracker.Token(binder, tag);
- final var entry = new History.Entry(tag, uid, ImeTracker.TYPE_SHOW, ImeTracker.STATUS_RUN,
- origin, reason, fromUser);
- synchronized (mLock) {
- mHistory.addEntry(binder, entry);
-
- // Register a delayed task to handle the case where the new entry times out.
- mHandler.postDelayed(() -> {
- synchronized (mLock) {
- mHistory.setFinished(token, ImeTracker.STATUS_TIMEOUT,
- ImeTracker.PHASE_NOT_SET);
- }
- }, TIMEOUT_MS);
- }
- return token;
- }
-
- @NonNull
- @Override
- public ImeTracker.Token onRequestHide(@NonNull String tag, int uid,
- @ImeTracker.Origin int origin, @SoftInputShowHideReason int reason, boolean fromUser) {
- final var binder = new Binder();
- final var token = new ImeTracker.Token(binder, tag);
- final var entry = new History.Entry(tag, uid, ImeTracker.TYPE_HIDE, ImeTracker.STATUS_RUN,
- origin, reason, fromUser);
+ final var entry = new History.Entry(tag, uid, type, ImeTracker.STATUS_RUN, origin, reason,
+ fromUser);
synchronized (mLock) {
mHistory.addEntry(binder, entry);
@@ -158,7 +136,7 @@
/**
* Updates the IME request tracking token with new information available in IMMS.
*
- * @param statsToken the token corresponding to the current IME request.
+ * @param statsToken the token tracking the current IME request.
* @param requestWindowName the name of the window that created the IME request.
*/
public void onImmsUpdate(@NonNull ImeTracker.Token statsToken,
@@ -223,7 +201,7 @@
* Sets the live entry corresponding to the tracking token, if it exists, as finished,
* and uploads the data for metrics.
*
- * @param statsToken the token corresponding to the current IME request.
+ * @param statsToken the token tracking the current IME request.
* @param status the finish status of the IME request.
* @param phase the phase the IME request finished at, if it exists
* (or {@link ImeTracker#PHASE_NOT_SET} otherwise).
diff --git a/services/core/java/com/android/server/inputmethod/ImeVisibilityApplier.java b/services/core/java/com/android/server/inputmethod/ImeVisibilityApplier.java
index 29fa369..9f2b84d 100644
--- a/services/core/java/com/android/server/inputmethod/ImeVisibilityApplier.java
+++ b/services/core/java/com/android/server/inputmethod/ImeVisibilityApplier.java
@@ -17,7 +17,6 @@
package com.android.server.inputmethod;
import android.annotation.NonNull;
-import android.annotation.Nullable;
import android.os.IBinder;
import android.os.ResultReceiver;
import android.view.inputmethod.ImeTracker;
@@ -34,12 +33,12 @@
* Performs showing IME on top of the given window.
*
* @param showInputToken A token that represents the requester to show IME.
- * @param statsToken A token that tracks the progress of an IME request.
+ * @param statsToken The token tracking the current IME request.
* @param resultReceiver If non-null, this will be called back to the caller when
* it has processed request to tell what it has done.
* @param reason The reason for requesting to show IME.
*/
- default void performShowIme(IBinder showInputToken, @Nullable ImeTracker.Token statsToken,
+ default void performShowIme(IBinder showInputToken, @NonNull ImeTracker.Token statsToken,
@InputMethod.ShowFlags int showFlags, ResultReceiver resultReceiver,
@SoftInputShowHideReason int reason) {}
@@ -47,12 +46,12 @@
* Performs hiding IME to the given window
*
* @param hideInputToken A token that represents the requester to hide IME.
- * @param statsToken A token that tracks the progress of an IME request.
+ * @param statsToken The token tracking the current IME request.
* @param resultReceiver If non-null, this will be called back to the caller when
* it has processed request to tell what it has done.
* @param reason The reason for requesting to hide IME.
*/
- default void performHideIme(IBinder hideInputToken, @Nullable ImeTracker.Token statsToken,
+ default void performHideIme(IBinder hideInputToken, @NonNull ImeTracker.Token statsToken,
ResultReceiver resultReceiver, @SoftInputShowHideReason int reason) {}
/**
@@ -60,10 +59,10 @@
* according to the given visibility state.
*
* @param windowToken The token of a window for applying the IME visibility
- * @param statsToken A token that tracks the progress of an IME request.
+ * @param statsToken The token tracking the current IME request.
* @param state The new IME visibility state for the applier to handle
*/
- default void applyImeVisibility(IBinder windowToken, @Nullable ImeTracker.Token statsToken,
+ default void applyImeVisibility(IBinder windowToken, @NonNull ImeTracker.Token statsToken,
@ImeVisibilityStateComputer.VisibilityState int state) {}
/**
@@ -84,11 +83,9 @@
*
* @param windowToken The token of a window to show the IME screenshot.
* @param displayId The unique id to identify the display
- * @param statsToken A token that tracks the progress of an IME request.
* @return {@code true} if success, {@code false} otherwise.
*/
- default boolean showImeScreenshot(@NonNull IBinder windowToken, int displayId,
- @Nullable ImeTracker.Token statsToken) {
+ default boolean showImeScreenshot(@NonNull IBinder windowToken, int displayId) {
return false;
}
diff --git a/services/core/java/com/android/server/inputmethod/ImeVisibilityStateComputer.java b/services/core/java/com/android/server/inputmethod/ImeVisibilityStateComputer.java
index 0dd48ae..743b8e3 100644
--- a/services/core/java/com/android/server/inputmethod/ImeVisibilityStateComputer.java
+++ b/services/core/java/com/android/server/inputmethod/ImeVisibilityStateComputer.java
@@ -212,9 +212,11 @@
boolean visibleRequested, boolean removed) {
if (mCurVisibleImeInputTarget == imeInputTarget && (!visibleRequested || removed)
&& mCurVisibleImeLayeringOverlay != null) {
- mService.onApplyImeVisibilityFromComputer(imeInputTarget,
- new ImeVisibilityResult(STATE_HIDE_IME_EXPLICIT,
- SoftInputShowHideReason.HIDE_WHEN_INPUT_TARGET_INVISIBLE));
+ final int reason = SoftInputShowHideReason.HIDE_WHEN_INPUT_TARGET_INVISIBLE;
+ final var statsToken = ImeTracker.forLogging().onStart(ImeTracker.TYPE_HIDE,
+ ImeTracker.ORIGIN_SERVER, reason, false /* fromUser */);
+ mService.onApplyImeVisibilityFromComputer(imeInputTarget, statsToken,
+ new ImeVisibilityResult(STATE_HIDE_IME_EXPLICIT, reason));
}
mCurVisibleImeInputTarget = (visibleRequested && !removed) ? imeInputTarget : null;
}
@@ -224,7 +226,7 @@
/**
* Called when {@link InputMethodManagerService} is processing the show IME request.
*
- * @param statsToken The token for tracking this show request.
+ * @param statsToken The token tracking the current IME request.
* @return {@code true} when the show request can proceed.
*/
boolean onImeShowFlags(@NonNull ImeTracker.Token statsToken,
@@ -250,7 +252,7 @@
/**
* Called when {@link InputMethodManagerService} is processing the hide IME request.
*
- * @param statsToken The token for tracking this hide request.
+ * @param statsToken The token tracking the current IME request.
* @return {@code true} when the hide request can proceed.
*/
boolean canHideIme(@NonNull ImeTracker.Token statsToken,
diff --git a/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java b/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java
index 3dedca9..1564b2f 100644
--- a/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java
+++ b/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java
@@ -578,7 +578,10 @@
return mBindingController.hasMainConnection();
}
- /** The token tracking the current IME request or {@code null} otherwise. */
+ /**
+ * The token tracking the current IME show request that is waiting for a connection to an IME,
+ * otherwise {@code null}.
+ */
@Nullable
private ImeTracker.Token mCurStatsToken;
@@ -1128,11 +1131,10 @@
mVisibilityStateComputer.getImePolicy().setA11yRequestNoSoftKeyboard(
accessibilitySoftKeyboardSetting);
if (mVisibilityStateComputer.getImePolicy().isA11yRequestNoSoftKeyboard()) {
- hideCurrentInputLocked(mCurFocusedWindow, null /* statsToken */,
- 0 /* flags */, null /* resultReceiver */,
+ hideCurrentInputLocked(mCurFocusedWindow, 0 /* flags */,
SoftInputShowHideReason.HIDE_SETTINGS_ON_CHANGE);
} else if (isShowRequestedForCurrentWindow()) {
- showCurrentInputImplicitLocked(mCurFocusedWindow,
+ showCurrentInputLocked(mCurFocusedWindow, InputMethodManager.SHOW_IMPLICIT,
SoftInputShowHideReason.SHOW_SETTINGS_ON_CHANGE);
}
} else if (stylusHandwritingEnabledUri.equals(uri)) {
@@ -1627,8 +1629,8 @@
}
// Hide soft input before user switch task since switch task may block main handler a while
// and delayed the hideCurrentInputLocked().
- hideCurrentInputLocked(mCurFocusedWindow, null /* statsToken */, 0 /* flags */,
- null /* resultReceiver */, SoftInputShowHideReason.HIDE_SWITCH_USER);
+ hideCurrentInputLocked(mCurFocusedWindow, 0 /* flags */,
+ SoftInputShowHideReason.HIDE_SWITCH_USER);
final UserSwitchHandlerTask task = new UserSwitchHandlerTask(this, userId,
clientToBeReset);
mUserSwitchHandlerTask = task;
@@ -2216,8 +2218,8 @@
clearClientSessionLocked(client);
clearClientSessionForAccessibilityLocked(client);
if (mCurClient == client) {
- hideCurrentInputLocked(mCurFocusedWindow, null /* statsToken */, 0 /* flags */,
- null /* resultReceiver */, SoftInputShowHideReason.HIDE_REMOVE_CLIENT);
+ hideCurrentInputLocked(mCurFocusedWindow, 0 /* flags */,
+ SoftInputShowHideReason.HIDE_REMOVE_CLIENT);
if (mBoundToMethod) {
mBoundToMethod = false;
IInputMethodInvoker curMethod = getCurMethodLocked();
@@ -2291,8 +2293,9 @@
// service, that wouldn't make the attached IME token validity check in time)
// As a result, we have to notify WM to apply IME visibility before clearing the
// binding states in the first place.
- mVisibilityApplier.applyImeVisibility(mCurFocusedWindow, mCurStatsToken,
- STATE_HIDE_IME);
+ final var statsToken = createStatsTokenForFocusedClient(false /* show */,
+ SoftInputShowHideReason.UNBIND_CURRENT_METHOD);
+ mVisibilityApplier.applyImeVisibility(mCurFocusedWindow, statsToken, STATE_HIDE_IME);
}
}
@@ -2369,10 +2372,12 @@
if (isShowRequestedForCurrentWindow()) {
if (DEBUG) Slog.v(TAG, "Attach new input asks to show input");
// Re-use current statsToken, if it exists.
- final ImeTracker.Token statsToken = mCurStatsToken;
+ final var statsToken = mCurStatsToken != null ? mCurStatsToken
+ : createStatsTokenForFocusedClient(true /* show */,
+ SoftInputShowHideReason.ATTACH_NEW_INPUT);
mCurStatsToken = null;
showCurrentInputLocked(mCurFocusedWindow, statsToken,
- mVisibilityStateComputer.getShowFlags(),
+ mVisibilityStateComputer.getShowFlags(), MotionEvent.TOOL_TYPE_UNKNOWN,
null /* resultReceiver */, SoftInputShowHideReason.ATTACH_NEW_INPUT);
}
@@ -2464,8 +2469,7 @@
}
if (mVisibilityStateComputer.getImePolicy().isImeHiddenByDisplayPolicy()) {
- hideCurrentInputLocked(mCurFocusedWindow, null /* statsToken */, 0 /* flags */,
- null /* resultReceiver */,
+ hideCurrentInputLocked(mCurFocusedWindow, 0 /* flags */,
SoftInputShowHideReason.HIDE_DISPLAY_IME_POLICY_HIDE);
return InputBindResult.NO_IME;
}
@@ -3385,8 +3389,8 @@
@Override
public boolean showSoftInput(IInputMethodClient client, IBinder windowToken,
- @Nullable ImeTracker.Token statsToken, @InputMethodManager.ShowFlags int flags,
- int lastClickTooType, ResultReceiver resultReceiver,
+ @NonNull ImeTracker.Token statsToken, @InputMethodManager.ShowFlags int flags,
+ int lastClickToolType, ResultReceiver resultReceiver,
@SoftInputShowHideReason int reason) {
Trace.traceBegin(TRACE_TAG_WINDOW_MANAGER, "IMMS.showSoftInput");
int uid = Binder.getCallingUid();
@@ -3402,7 +3406,7 @@
final long ident = Binder.clearCallingIdentity();
try {
if (DEBUG) Slog.v(TAG, "Client requesting input be shown");
- return showCurrentInputLocked(windowToken, statsToken, flags, lastClickTooType,
+ return showCurrentInputLocked(windowToken, statsToken, flags, lastClickToolType,
resultReceiver, reason);
} finally {
Binder.restoreCallingIdentity(ident);
@@ -3644,24 +3648,18 @@
}
@GuardedBy("ImfLock.class")
- boolean showCurrentInputLocked(IBinder windowToken, @Nullable ImeTracker.Token statsToken,
- @InputMethodManager.ShowFlags int flags, ResultReceiver resultReceiver,
- @SoftInputShowHideReason int reason) {
+ private boolean showCurrentInputLocked(IBinder windowToken,
+ @InputMethodManager.ShowFlags int flags, @SoftInputShowHideReason int reason) {
+ final var statsToken = createStatsTokenForFocusedClient(true /* show */, reason);
return showCurrentInputLocked(windowToken, statsToken, flags,
- MotionEvent.TOOL_TYPE_UNKNOWN, resultReceiver, reason);
+ MotionEvent.TOOL_TYPE_UNKNOWN, null /* resultReceiver */, reason);
}
@GuardedBy("ImfLock.class")
- private boolean showCurrentInputLocked(IBinder windowToken,
- @Nullable ImeTracker.Token statsToken, @InputMethodManager.ShowFlags int flags,
- int lastClickToolType, ResultReceiver resultReceiver,
+ boolean showCurrentInputLocked(IBinder windowToken,
+ @NonNull ImeTracker.Token statsToken, @InputMethodManager.ShowFlags int flags,
+ int lastClickToolType, @Nullable ResultReceiver resultReceiver,
@SoftInputShowHideReason int reason) {
- // Create statsToken is none exists.
- if (statsToken == null) {
- statsToken = createStatsTokenForFocusedClient(true /* show */,
- ImeTracker.ORIGIN_SERVER_START_INPUT, reason, false /* fromUser */);
- }
-
if (!mVisibilityStateComputer.onImeShowFlags(statsToken, flags)) {
return false;
}
@@ -3699,7 +3697,7 @@
@Override
public boolean hideSoftInput(IInputMethodClient client, IBinder windowToken,
- @Nullable ImeTracker.Token statsToken, @InputMethodManager.HideFlags int flags,
+ @NonNull ImeTracker.Token statsToken, @InputMethodManager.HideFlags int flags,
ResultReceiver resultReceiver, @SoftInputShowHideReason int reason) {
int uid = Binder.getCallingUid();
ImeTracing.getInstance().triggerManagerServiceDump(
@@ -3728,17 +3726,29 @@
}
}
- @GuardedBy("ImfLock.class")
- boolean hideCurrentInputLocked(IBinder windowToken, @Nullable ImeTracker.Token statsToken,
- @InputMethodManager.HideFlags int flags, ResultReceiver resultReceiver,
- @SoftInputShowHideReason int reason) {
- // Create statsToken is none exists.
- if (statsToken == null) {
- final boolean fromUser = reason == SoftInputShowHideReason.HIDE_SOFT_INPUT_BY_BACK_KEY;
- statsToken = createStatsTokenForFocusedClient(false /* show */,
- ImeTracker.ORIGIN_SERVER_HIDE_INPUT, reason, fromUser);
- }
+ @Override
+ @EnforcePermission(Manifest.permission.TEST_INPUT_METHOD)
+ public void hideSoftInputFromServerForTest() {
+ super.hideSoftInputFromServerForTest_enforcePermission();
+ synchronized (ImfLock.class) {
+ hideCurrentInputLocked(mCurFocusedWindow, 0 /* flags */,
+ SoftInputShowHideReason.HIDE_SOFT_INPUT);
+ }
+ }
+
+ @GuardedBy("ImfLock.class")
+ private boolean hideCurrentInputLocked(IBinder windowToken,
+ @InputMethodManager.HideFlags int flags, @SoftInputShowHideReason int reason) {
+ final var statsToken = createStatsTokenForFocusedClient(false /* show */, reason);
+ return hideCurrentInputLocked(windowToken, statsToken, flags, null /* resultReceiver */,
+ reason);
+ }
+
+ @GuardedBy("ImfLock.class")
+ boolean hideCurrentInputLocked(IBinder windowToken, @NonNull ImeTracker.Token statsToken,
+ @InputMethodManager.HideFlags int flags, @Nullable ResultReceiver resultReceiver,
+ @SoftInputShowHideReason int reason) {
if (!mVisibilityStateComputer.canHideIme(statsToken, flags)) {
return false;
}
@@ -3915,9 +3925,7 @@
Slog.w(TAG, "If you need to impersonate a foreground user/profile from"
+ " a background user, use EditorInfo.targetInputMethodUser with"
+ " INTERACT_ACROSS_USERS_FULL permission.");
- hideCurrentInputLocked(mCurFocusedWindow, null /* statsToken */,
- 0 /* flags */,
- null /* resultReceiver */,
+ hideCurrentInputLocked(mCurFocusedWindow, 0 /* flags */,
SoftInputShowHideReason.HIDE_INVALID_USER);
return InputBindResult.INVALID_USER;
}
@@ -4025,11 +4033,14 @@
final ImeVisibilityResult imeVisRes = mVisibilityStateComputer.computeState(windowState,
isSoftInputModeStateVisibleAllowed(unverifiedTargetSdkVersion, startInputFlags));
if (imeVisRes != null) {
+ boolean isShow = false;
switch (imeVisRes.getReason()) {
case SoftInputShowHideReason.SHOW_RESTORE_IME_VISIBILITY:
case SoftInputShowHideReason.SHOW_AUTO_EDITOR_FORWARD_NAV:
case SoftInputShowHideReason.SHOW_STATE_VISIBLE_FORWARD_NAV:
case SoftInputShowHideReason.SHOW_STATE_ALWAYS_VISIBLE:
+ isShow = true;
+
if (editorInfo != null) {
res = startInputUncheckedLocked(cs, inputContext,
remoteAccessibilityInputConnection, editorInfo, startInputFlags,
@@ -4039,8 +4050,8 @@
}
break;
}
-
- mVisibilityApplier.applyImeVisibility(mCurFocusedWindow, null /* statsToken */,
+ final var statsToken = createStatsTokenForFocusedClient(isShow, imeVisRes.getReason());
+ mVisibilityApplier.applyImeVisibility(mCurFocusedWindow, statsToken,
imeVisRes.getState(), imeVisRes.getReason());
if (imeVisRes.getReason() == SoftInputShowHideReason.HIDE_UNSPECIFIED_WINDOW) {
@@ -4068,13 +4079,6 @@
}
@GuardedBy("ImfLock.class")
- private void showCurrentInputImplicitLocked(@NonNull IBinder windowToken,
- @SoftInputShowHideReason int reason) {
- showCurrentInputLocked(windowToken, null /* statsToken */, InputMethodManager.SHOW_IMPLICIT,
- null /* resultReceiver */, reason);
- }
-
- @GuardedBy("ImfLock.class")
private boolean canInteractWithImeLocked(int uid, IInputMethodClient client, String methodName,
@Nullable ImeTracker.Token statsToken) {
if (mCurClient == null || client == null
@@ -4776,15 +4780,17 @@
@BinderThread
private void applyImeVisibility(IBinder token, IBinder windowToken, boolean setVisible,
- @Nullable ImeTracker.Token statsToken) {
+ @NonNull ImeTracker.Token statsToken) {
try {
Trace.traceBegin(TRACE_TAG_WINDOW_MANAGER, "IMMS.applyImeVisibility");
synchronized (ImfLock.class) {
if (!calledWithValidTokenLocked(token)) {
ImeTracker.forLogging().onFailed(statsToken,
- ImeTracker.PHASE_SERVER_APPLY_IME_VISIBILITY);
+ ImeTracker.PHASE_SERVER_CURRENT_ACTIVE_IME);
return;
}
+ ImeTracker.forLogging().onProgress(statsToken,
+ ImeTracker.PHASE_SERVER_CURRENT_ACTIVE_IME);
final IBinder requestToken = mVisibilityStateComputer.getWindowTokenFrom(
windowToken);
mVisibilityApplier.applyImeVisibility(requestToken, statsToken,
@@ -4862,17 +4868,21 @@
}
@BinderThread
- private void hideMySoftInput(@NonNull IBinder token, @InputMethodManager.HideFlags int flags,
- @SoftInputShowHideReason int reason) {
+ private void hideMySoftInput(@NonNull IBinder token, @NonNull ImeTracker.Token statsToken,
+ @InputMethodManager.HideFlags int flags, @SoftInputShowHideReason int reason) {
try {
Trace.traceBegin(TRACE_TAG_WINDOW_MANAGER, "IMMS.hideMySoftInput");
synchronized (ImfLock.class) {
if (!calledWithValidTokenLocked(token)) {
+ ImeTracker.forLogging().onFailed(statsToken,
+ ImeTracker.PHASE_SERVER_CURRENT_ACTIVE_IME);
return;
}
+ ImeTracker.forLogging().onProgress(statsToken,
+ ImeTracker.PHASE_SERVER_CURRENT_ACTIVE_IME);
final long ident = Binder.clearCallingIdentity();
try {
- hideCurrentInputLocked(mLastImeTargetWindow, null /* statsToken */, flags,
+ hideCurrentInputLocked(mLastImeTargetWindow, statsToken, flags,
null /* resultReceiver */, reason);
} finally {
Binder.restoreCallingIdentity(ident);
@@ -4884,18 +4894,22 @@
}
@BinderThread
- private void showMySoftInput(@NonNull IBinder token, @InputMethodManager.ShowFlags int flags) {
+ private void showMySoftInput(@NonNull IBinder token, @NonNull ImeTracker.Token statsToken,
+ @InputMethodManager.ShowFlags int flags, @SoftInputShowHideReason int reason) {
try {
Trace.traceBegin(TRACE_TAG_WINDOW_MANAGER, "IMMS.showMySoftInput");
synchronized (ImfLock.class) {
if (!calledWithValidTokenLocked(token)) {
+ ImeTracker.forLogging().onFailed(statsToken,
+ ImeTracker.PHASE_SERVER_CURRENT_ACTIVE_IME);
return;
}
+ ImeTracker.forLogging().onProgress(statsToken,
+ ImeTracker.PHASE_SERVER_CURRENT_ACTIVE_IME);
final long ident = Binder.clearCallingIdentity();
try {
- showCurrentInputLocked(mLastImeTargetWindow, null /* statsToken */, flags,
- null /* resultReceiver */,
- SoftInputShowHideReason.SHOW_SOFT_INPUT_FROM_IME);
+ showCurrentInputLocked(mLastImeTargetWindow, statsToken, flags,
+ MotionEvent.TOOL_TYPE_UNKNOWN, null /* resultReceiver */, reason);
} finally {
Binder.restoreCallingIdentity(ident);
}
@@ -4912,10 +4926,10 @@
}
}
- void onApplyImeVisibilityFromComputer(IBinder windowToken,
+ void onApplyImeVisibilityFromComputer(IBinder windowToken, @NonNull ImeTracker.Token statsToken,
@NonNull ImeVisibilityResult result) {
synchronized (ImfLock.class) {
- mVisibilityApplier.applyImeVisibility(windowToken, null, result.getState(),
+ mVisibilityApplier.applyImeVisibility(windowToken, statsToken, result.getState(),
result.getReason());
}
}
@@ -5016,9 +5030,8 @@
case MSG_HIDE_ALL_INPUT_METHODS:
synchronized (ImfLock.class) {
- final @SoftInputShowHideReason int reason = (int) msg.obj;
- hideCurrentInputLocked(mCurFocusedWindow, null /* statsToken */, 0 /* flags */,
- null /* resultReceiver */, reason);
+ @SoftInputShowHideReason final int reason = (int) msg.obj;
+ hideCurrentInputLocked(mCurFocusedWindow, 0 /* flags */, reason);
}
return true;
@@ -5176,7 +5189,8 @@
final ImeVisibilityResult imeVisRes = mVisibilityStateComputer.onInteractiveChanged(
mCurFocusedWindow, interactive);
if (imeVisRes != null) {
- mVisibilityApplier.applyImeVisibility(mCurFocusedWindow, null,
+ // Pass in a null statsToken as the IME snapshot is not tracked by ImeTracker.
+ mVisibilityApplier.applyImeVisibility(mCurFocusedWindow, null /* statsToken */,
imeVisRes.getState(), imeVisRes.getReason());
}
// Eligible IME processes use new "setInteractive" protocol.
@@ -6684,8 +6698,7 @@
final String nextIme;
final List<InputMethodInfo> nextEnabledImes;
if (userId == mSettings.getUserId()) {
- hideCurrentInputLocked(mCurFocusedWindow, null /* statsToken */,
- 0 /* flags */, null /* resultReceiver */,
+ hideCurrentInputLocked(mCurFocusedWindow, 0 /* flags */,
SoftInputShowHideReason.HIDE_RESET_SHELL_COMMAND);
mBindingController.unbindCurrentMethod();
@@ -6814,13 +6827,11 @@
* Creates an IME request tracking token for the current focused client.
*
* @param show whether this is a show or a hide request.
- * @param origin the origin of the IME request.
* @param reason the reason why the IME request was created.
- * @param fromUser whether this request was created directly from user interaction.
*/
@NonNull
private ImeTracker.Token createStatsTokenForFocusedClient(boolean show,
- @ImeTracker.Origin int origin, @SoftInputShowHideReason int reason, boolean fromUser) {
+ @SoftInputShowHideReason int reason) {
final int uid = mCurFocusedWindowClient != null
? mCurFocusedWindowClient.mUid
: -1;
@@ -6828,13 +6839,9 @@
? mCurFocusedWindowEditorInfo.packageName
: "uid(" + uid + ")";
- if (show) {
- return ImeTracker.forLogging()
- .onRequestShow(packageName, uid, origin, reason, fromUser);
- } else {
- return ImeTracker.forLogging()
- .onRequestHide(packageName, uid, origin, reason, fromUser);
- }
+ return ImeTracker.forLogging().onStart(packageName, uid,
+ show ? ImeTracker.TYPE_SHOW : ImeTracker.TYPE_HIDE, ImeTracker.ORIGIN_SERVER,
+ reason, false /* fromUser */);
}
private static final class InputMethodPrivilegedOperationsImpl
@@ -6909,12 +6916,13 @@
@BinderThread
@Override
- public void hideMySoftInput(@InputMethodManager.HideFlags int flags,
- @SoftInputShowHideReason int reason, AndroidFuture future /* T=Void */) {
+ public void hideMySoftInput(@NonNull ImeTracker.Token statsToken,
+ @InputMethodManager.HideFlags int flags, @SoftInputShowHideReason int reason,
+ AndroidFuture future /* T=Void */) {
@SuppressWarnings("unchecked")
final AndroidFuture<Void> typedFuture = future;
try {
- mImms.hideMySoftInput(mToken, flags, reason);
+ mImms.hideMySoftInput(mToken, statsToken, flags, reason);
typedFuture.complete(null);
} catch (Throwable e) {
typedFuture.completeExceptionally(e);
@@ -6923,12 +6931,13 @@
@BinderThread
@Override
- public void showMySoftInput(@InputMethodManager.ShowFlags int flags,
+ public void showMySoftInput(@NonNull ImeTracker.Token statsToken,
+ @InputMethodManager.ShowFlags int flags, @SoftInputShowHideReason int reason,
AndroidFuture future /* T=Void */) {
@SuppressWarnings("unchecked")
final AndroidFuture<Void> typedFuture = future;
try {
- mImms.showMySoftInput(mToken, flags);
+ mImms.showMySoftInput(mToken, statsToken, flags, reason);
typedFuture.complete(null);
} catch (Throwable e) {
typedFuture.completeExceptionally(e);
@@ -6987,7 +6996,7 @@
@BinderThread
@Override
public void applyImeVisibilityAsync(IBinder windowToken, boolean setVisible,
- @Nullable ImeTracker.Token statsToken) {
+ @NonNull ImeTracker.Token statsToken) {
mImms.applyImeVisibility(mToken, windowToken, setVisible, statsToken);
}
diff --git a/services/core/java/com/android/server/inputmethod/ZeroJankProxy.java b/services/core/java/com/android/server/inputmethod/ZeroJankProxy.java
index db6a9af..9caf5cf 100644
--- a/services/core/java/com/android/server/inputmethod/ZeroJankProxy.java
+++ b/services/core/java/com/android/server/inputmethod/ZeroJankProxy.java
@@ -184,6 +184,13 @@
return true;
}
+ @Override
+ @EnforcePermission(Manifest.permission.TEST_INPUT_METHOD)
+ public void hideSoftInputFromServerForTest() throws RemoteException {
+ super.hideSoftInputFromServerForTest_enforcePermission();
+ mInner.hideSoftInputFromServerForTest();
+ }
+
@RequiresPermission(android.Manifest.permission.INTERACT_ACROSS_USERS_FULL)
@Override
public void startInputOrWindowGainedFocusAsync(
diff --git a/services/core/java/com/android/server/media/MediaRouter2ServiceImpl.java b/services/core/java/com/android/server/media/MediaRouter2ServiceImpl.java
index 1f7d549..2a48785 100644
--- a/services/core/java/com/android/server/media/MediaRouter2ServiceImpl.java
+++ b/services/core/java/com/android/server/media/MediaRouter2ServiceImpl.java
@@ -851,7 +851,6 @@
}
}
- @RequiresPermission(value = Manifest.permission.MEDIA_ROUTING_CONTROL, conditional = true)
private boolean checkMediaRoutingControlPermission(
int callerUid, int callerPid, @Nullable String callerPackageName) {
return PermissionChecker.checkPermissionForDataDelivery(
diff --git a/services/core/java/com/android/server/media/MediaSession2Record.java b/services/core/java/com/android/server/media/MediaSession2Record.java
index a110e56..1dc86f2 100644
--- a/services/core/java/com/android/server/media/MediaSession2Record.java
+++ b/services/core/java/com/android/server/media/MediaSession2Record.java
@@ -35,12 +35,11 @@
* Keeps the record of {@link Session2Token} to help send command to the corresponding session.
*/
// TODO(jaewan): Do not call service method directly -- introduce listener instead.
-public class MediaSession2Record implements MediaSessionRecordImpl {
+public class MediaSession2Record extends MediaSessionRecordImpl {
private static final String TAG = "MediaSession2Record";
private static final boolean DEBUG = Log.isLoggable(TAG, Log.DEBUG);
private final Object mLock = new Object();
- private final int mUniqueId;
@GuardedBy("mLock")
private final Session2Token mSessionToken;
@GuardedBy("mLock")
@@ -57,20 +56,18 @@
private boolean mIsClosed;
private final int mPid;
- private final ForegroundServiceDelegationOptions mForegroundServiceDelegationOptions;
public MediaSession2Record(
Session2Token sessionToken,
MediaSessionService service,
Looper handlerLooper,
int pid,
- int policies,
- int uniqueId) {
+ int policies) {
// The lock is required to prevent `Controller2Callback` from using partially initialized
// `MediaSession2Record.this`.
synchronized (mLock) {
+ mUniqueId = sNextMediaSessionRecordId.getAndIncrement();
mSessionToken = sessionToken;
- mUniqueId = uniqueId;
mService = service;
mHandlerExecutor = new HandlerExecutor(new Handler(handlerLooper));
mController = new MediaController2.Builder(service.getContext(), sessionToken)
@@ -78,32 +75,6 @@
.build();
mPid = pid;
mPolicies = policies;
- mForegroundServiceDelegationOptions =
- new ForegroundServiceDelegationOptions.Builder()
- .setClientPid(mPid)
- .setClientUid(getUid())
- .setClientPackageName(getPackageName())
- .setClientAppThread(null)
- .setSticky(false)
- .setClientInstanceName(
- "MediaSessionFgsDelegate_"
- + getUid()
- + "_"
- + mPid
- + "_"
- + getPackageName())
- .setForegroundServiceTypes(0)
- .setDelegationService(
- ForegroundServiceDelegationOptions
- .DELEGATION_SERVICE_MEDIA_PLAYBACK)
- .build();
- }
- }
-
- @Override
- public int getUniqueId() {
- synchronized (mLock) {
- return mUniqueId;
}
}
@@ -128,7 +99,10 @@
@Override
public ForegroundServiceDelegationOptions getForegroundServiceDelegationOptions() {
- return mForegroundServiceDelegationOptions;
+ // For an app to be eligible for FGS delegation, it needs a media session liked to a media
+ // notification. Currently, notifications cannot be linked to MediaSession2 so it is not
+ // supported.
+ return null;
}
@Override
@@ -210,7 +184,7 @@
@Override
public void dump(PrintWriter pw, String prefix) {
- pw.println(prefix + "uniqueId=" + mUniqueId);
+ pw.println(prefix + "uniqueId=" + getUniqueId());
pw.println(prefix + "token=" + mSessionToken);
pw.println(prefix + "controller=" + mController);
@@ -220,7 +194,7 @@
@Override
public String toString() {
- return getPackageName() + "/" + mUniqueId + " (userId=" + getUserId() + ")";
+ return getPackageName() + "/" + getUniqueId() + " (userId=" + getUserId() + ")";
}
private class Controller2Callback extends MediaController2.ControllerCallback {
diff --git a/services/core/java/com/android/server/media/MediaSessionRecord.java b/services/core/java/com/android/server/media/MediaSessionRecord.java
index 1552704..a9a8272 100644
--- a/services/core/java/com/android/server/media/MediaSessionRecord.java
+++ b/services/core/java/com/android/server/media/MediaSessionRecord.java
@@ -96,7 +96,7 @@
* MediaSession wrapper class instead.
*/
// TODO(jaewan): Do not call service method directly -- introduce listener instead.
-public class MediaSessionRecord implements IBinder.DeathRecipient, MediaSessionRecordImpl {
+public class MediaSessionRecord extends MediaSessionRecordImpl implements IBinder.DeathRecipient {
/**
* {@link android.media.session.MediaSession#setMediaButtonBroadcastReceiver(
@@ -173,7 +173,6 @@
private final int mUserId;
private final String mPackageName;
private final String mTag;
- private final int mUniqueId;
private final Bundle mSessionInfo;
private final ControllerStub mController;
private final MediaSession.Token mSessionToken;
@@ -231,18 +230,17 @@
String ownerPackageName,
ISessionCallback cb,
String tag,
- int uniqueId,
Bundle sessionInfo,
MediaSessionService service,
Looper handlerLooper,
int policies)
throws RemoteException {
+ mUniqueId = sNextMediaSessionRecordId.getAndIncrement();
mOwnerPid = ownerPid;
mOwnerUid = ownerUid;
mUserId = userId;
mPackageName = ownerPackageName;
mTag = tag;
- mUniqueId = uniqueId;
mSessionInfo = sessionInfo;
mController = new ControllerStub();
mSessionToken = new MediaSession.Token(ownerUid, mController);
@@ -303,16 +301,6 @@
}
/**
- * Get the unique id of this session record.
- *
- * @return a unique id of this session record.
- */
- @Override
- public int getUniqueId() {
- return mUniqueId;
- }
-
- /**
* Get the info for this session.
*
* @return Info that identifies this session.
@@ -724,7 +712,7 @@
@Override
public String toString() {
- return mPackageName + "/" + mTag + "/" + mUniqueId + " (userId=" + mUserId + ")";
+ return mPackageName + "/" + mTag + "/" + getUniqueId() + " (userId=" + mUserId + ")";
}
@Override
diff --git a/services/core/java/com/android/server/media/MediaSessionRecordImpl.java b/services/core/java/com/android/server/media/MediaSessionRecordImpl.java
index e53a2db..e4b2fad 100644
--- a/services/core/java/com/android/server/media/MediaSessionRecordImpl.java
+++ b/services/core/java/com/android/server/media/MediaSessionRecordImpl.java
@@ -25,39 +25,37 @@
import com.android.server.media.MediaSessionPolicyProvider.SessionPolicy;
import java.io.PrintWriter;
+import java.util.Objects;
+import java.util.concurrent.atomic.AtomicInteger;
/**
* Common interfaces between {@link MediaSessionRecord} and {@link MediaSession2Record}.
*/
-public interface MediaSessionRecordImpl extends AutoCloseable {
+public abstract class MediaSessionRecordImpl {
- /**
- * Get the unique id of this session record.
- *
- * @return a unique id of this session record.
- */
- int getUniqueId();
+ static final AtomicInteger sNextMediaSessionRecordId = new AtomicInteger(1);
+ int mUniqueId;
/**
* Get the info for this session.
*
* @return Info that identifies this session.
*/
- String getPackageName();
+ public abstract String getPackageName();
/**
* Get the UID this session was created for.
*
* @return The UID for this session.
*/
- int getUid();
+ public abstract int getUid();
/**
* Get the user id this session was created for.
*
* @return The user id for this session.
*/
- int getUserId();
+ public abstract int getUserId();
/**
* Get the {@link ForegroundServiceDelegationOptions} needed for notifying activity manager
@@ -66,7 +64,7 @@
* @return the {@link ForegroundServiceDelegationOptions} needed for notifying the activity
* manager service with changes in the {@link PlaybackState} for this session.
*/
- ForegroundServiceDelegationOptions getForegroundServiceDelegationOptions();
+ public abstract ForegroundServiceDelegationOptions getForegroundServiceDelegationOptions();
/**
* Check if this session has system priority and should receive media buttons before any other
@@ -74,7 +72,7 @@
*
* @return True if this is a system priority session, false otherwise
*/
- boolean isSystemPriority();
+ public abstract boolean isSystemPriority();
/**
* Send a volume adjustment to the session owner. Direction must be one of
@@ -95,7 +93,7 @@
* @param useSuggested True to use adjustSuggestedStreamVolumeForUid instead of
* adjustStreamVolumeForUid
*/
- void adjustVolume(String packageName, String opPackageName, int pid, int uid,
+ public abstract void adjustVolume(String packageName, String opPackageName, int pid, int uid,
boolean asSystemService, int direction, int flags, boolean useSuggested);
/**
@@ -105,7 +103,7 @@
* @return True if the session is active, false otherwise.
*/
// TODO(jaewan): Find better naming, or remove this from the MediaSessionRecordImpl.
- boolean isActive();
+ public abstract boolean isActive();
/**
* Check if the session's playback active state matches with the expectation. This always
@@ -115,7 +113,7 @@
* @param expected True if playback is expected to be active. False otherwise.
* @return True if the session's playback matches with the expectation. False otherwise.
*/
- boolean checkPlaybackActiveState(boolean expected);
+ public abstract boolean checkPlaybackActiveState(boolean expected);
/**
* Check whether the playback type is local or remote.
@@ -128,7 +126,7 @@
*
* @return {@code true} if the playback is local. {@code false} if the playback is remote.
*/
- boolean isPlaybackTypeLocal();
+ public abstract boolean isPlaybackTypeLocal();
/**
* Sends media button.
@@ -145,27 +143,27 @@
* @return {@code true} if the attempt to send media button was successfully.
* {@code false} otherwise.
*/
- boolean sendMediaButton(String packageName, int pid, int uid, boolean asSystemService,
- KeyEvent ke, int sequenceId, ResultReceiver cb);
+ public abstract boolean sendMediaButton(String packageName, int pid, int uid,
+ boolean asSystemService, KeyEvent ke, int sequenceId, ResultReceiver cb);
/**
* Returns whether the media session can handle volume key events.
*
* @return True if this media session can handle volume key events, false otherwise.
*/
- boolean canHandleVolumeKey();
+ public abstract boolean canHandleVolumeKey();
/**
* Get session policies from custom policy provider set when MediaSessionRecord is instantiated.
* If custom policy does not exist, will return null.
*/
@SessionPolicy
- int getSessionPolicies();
+ public abstract int getSessionPolicies();
/**
* Overwrite session policies that have been set when MediaSessionRecord is instantiated.
*/
- void setSessionPolicies(@SessionPolicy int policies);
+ public abstract void setSessionPolicies(@SessionPolicy int policies);
/**
* Dumps internal state
@@ -173,16 +171,37 @@
* @param pw print writer
* @param prefix prefix
*/
- void dump(PrintWriter pw, String prefix);
+ public abstract void dump(PrintWriter pw, String prefix);
/**
- * Override {@link AutoCloseable#close} to tell it not to throw exception.
+ * Similar to {@link AutoCloseable#close} without throwing an exception.
*/
- @Override
- void close();
+ public abstract void close();
+
+ /**
+ * Get the unique id of this session record.
+ *
+ * @return a unique id of this session record.
+ */
+ public int getUniqueId() {
+ return mUniqueId;
+ }
/**
* Returns whether {@link #close()} is called before.
*/
- boolean isClosed();
+ public abstract boolean isClosed();
+
+ @Override
+ public final boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || !(o instanceof MediaSessionRecordImpl)) return false;
+ MediaSessionRecordImpl that = (MediaSessionRecordImpl) o;
+ return mUniqueId == that.mUniqueId;
+ }
+
+ @Override
+ public final int hashCode() {
+ return Objects.hash(mUniqueId);
+ }
}
diff --git a/services/core/java/com/android/server/media/MediaSessionService.java b/services/core/java/com/android/server/media/MediaSessionService.java
index 09c6dc0e6..e2163c5 100644
--- a/services/core/java/com/android/server/media/MediaSessionService.java
+++ b/services/core/java/com/android/server/media/MediaSessionService.java
@@ -106,7 +106,6 @@
import java.util.HashSet;
import java.util.List;
import java.util.Set;
-import java.util.concurrent.atomic.AtomicInteger;
/**
* System implementation of MediaSessionManager
@@ -170,9 +169,8 @@
private UsageStatsManagerInternal mUsageStatsManagerInternal;
/* Maps uid with all user engaging session tokens associated to it */
- private final SparseArray<Set<MediaSession.Token>> mUserEngagingSessions = new SparseArray<>();
-
- private final AtomicInteger mNextMediaSessionRecordId = new AtomicInteger(1);
+ private final SparseArray<Set<MediaSessionRecordImpl>> mUserEngagingSessions =
+ new SparseArray<>();
// The FullUserRecord of the current users. (i.e. The foreground user that isn't a profile)
// It's always not null after the MediaSessionService is started.
@@ -212,8 +210,7 @@
MediaSessionService.this,
mRecordThread.getLooper(),
pid,
- /* policies= */ 0,
- /* uniqueId= */ mNextMediaSessionRecordId.getAndIncrement());
+ /* policies= */ 0);
synchronized (mLock) {
FullUserRecord user = getFullUserRecordLocked(record.getUserId());
if (user != null) {
@@ -629,9 +626,7 @@
}
ForegroundServiceDelegationOptions foregroundServiceDelegationOptions =
record.getForegroundServiceDelegationOptions();
- if (foregroundServiceDelegationOptions == null
- || foregroundServiceDelegationOptions.mClientPid == Process.INVALID_PID) {
- // This record doesn't support FGS delegation. In practice, this is MediaSession2.
+ if (foregroundServiceDelegationOptions == null) {
return;
}
if (allowRunningInForeground) {
@@ -644,23 +639,21 @@
}
private void reportMediaInteractionEvent(MediaSessionRecordImpl record, boolean userEngaged) {
- if (!android.app.usage.Flags.userInteractionTypeApi()
- || !(record instanceof MediaSessionRecord)) {
+ if (!android.app.usage.Flags.userInteractionTypeApi()) {
return;
}
String packageName = record.getPackageName();
int sessionUid = record.getUid();
- MediaSession.Token token = ((MediaSessionRecord) record).getSessionToken();
if (userEngaged) {
if (!mUserEngagingSessions.contains(sessionUid)) {
mUserEngagingSessions.put(sessionUid, new HashSet<>());
reportUserInteractionEvent(
USAGE_STATS_ACTION_START, record.getUserId(), packageName);
}
- mUserEngagingSessions.get(sessionUid).add(token);
+ mUserEngagingSessions.get(sessionUid).add(record);
} else if (mUserEngagingSessions.contains(sessionUid)) {
- mUserEngagingSessions.get(sessionUid).remove(token);
+ mUserEngagingSessions.get(sessionUid).remove(record);
if (mUserEngagingSessions.get(sessionUid).isEmpty()) {
reportUserInteractionEvent(
USAGE_STATS_ACTION_STOP, record.getUserId(), packageName);
@@ -824,7 +817,6 @@
callerPackageName,
cb,
tag,
- /* uniqueId= */ mNextMediaSessionRecordId.getAndIncrement(),
sessionInfo,
this,
mRecordThread.getLooper(),
diff --git a/services/core/java/com/android/server/net/NetworkPolicyManagerService.java b/services/core/java/com/android/server/net/NetworkPolicyManagerService.java
index 31bfc695..18b495b 100644
--- a/services/core/java/com/android/server/net/NetworkPolicyManagerService.java
+++ b/services/core/java/com/android/server/net/NetworkPolicyManagerService.java
@@ -1252,7 +1252,7 @@
if (isUidStateChangeRelevant(callbackInfo, procState, procStateSeq, capability)) {
callbackInfo.update(uid, procState, procStateSeq, capability);
if (!callbackInfo.isPending) {
- mUidEventHandler.obtainMessage(UID_MSG_STATE_CHANGED, callbackInfo)
+ mUidEventHandler.obtainMessage(UID_MSG_STATE_CHANGED, uid, 0)
.sendToTarget();
callbackInfo.isPending = true;
}
@@ -1264,7 +1264,6 @@
synchronized (mUidStateCallbackInfos) {
mUidStateCallbackInfos.remove(uid);
}
- // TODO: b/327058756 - Remove any pending UID_MSG_STATE_CHANGED on the handler.
mUidEventHandler.obtainMessage(UID_MSG_GONE, uid, 0).sendToTarget();
}
};
@@ -5870,13 +5869,13 @@
private final Handler.Callback mUidEventHandlerCallback = new Handler.Callback() {
@Override
public boolean handleMessage(Message msg) {
+ final int uid = msg.arg1;
switch (msg.what) {
case UID_MSG_STATE_CHANGED: {
- handleUidChanged((UidStateCallbackInfo) msg.obj);
+ handleUidChanged(uid);
return true;
}
case UID_MSG_GONE: {
- final int uid = msg.arg1;
handleUidGone(uid);
return true;
}
@@ -5887,23 +5886,27 @@
}
};
- void handleUidChanged(@NonNull UidStateCallbackInfo uidStateCallbackInfo) {
+ void handleUidChanged(int uid) {
Trace.traceBegin(Trace.TRACE_TAG_NETWORK, "onUidStateChanged");
try {
- boolean updated;
- final int uid;
final int procState;
final long procStateSeq;
final int capability;
- synchronized (mUidRulesFirstLock) {
- synchronized (mUidStateCallbackInfos) {
- uid = uidStateCallbackInfo.uid;
- procState = uidStateCallbackInfo.procState;
- procStateSeq = uidStateCallbackInfo.procStateSeq;
- capability = uidStateCallbackInfo.capability;
- uidStateCallbackInfo.isPending = false;
+ synchronized (mUidStateCallbackInfos) {
+ final UidStateCallbackInfo uidStateCallbackInfo = mUidStateCallbackInfos.get(uid);
+ if (uidStateCallbackInfo == null) {
+ // This can happen if UidObserver#onUidGone gets called before we reach
+ // here. In this case, there is no point in processing this change as this
+ // will immediately be followed by a call to handleUidGone anyway.
+ return;
}
-
+ procState = uidStateCallbackInfo.procState;
+ procStateSeq = uidStateCallbackInfo.procStateSeq;
+ capability = uidStateCallbackInfo.capability;
+ uidStateCallbackInfo.isPending = false;
+ }
+ final boolean updated;
+ synchronized (mUidRulesFirstLock) {
// We received a uid state change callback, add it to the history so that it
// will be useful for debugging.
mLogger.uidStateChanged(uid, procState, procStateSeq, capability);
@@ -5926,6 +5929,14 @@
void handleUidGone(int uid) {
Trace.traceBegin(Trace.TRACE_TAG_NETWORK, "onUidGone");
try {
+ synchronized (mUidStateCallbackInfos) {
+ if (mUidStateCallbackInfos.contains(uid)) {
+ // This can happen if UidObserver#onUidStateChanged gets called before we
+ // reach here. In this case, there is no point in processing this change as this
+ // will immediately be followed by a call to handleUidChanged anyway.
+ return;
+ }
+ }
final boolean updated;
synchronized (mUidRulesFirstLock) {
updated = removeUidStateUL(uid);
diff --git a/services/core/java/com/android/server/notification/DefaultDeviceEffectsApplier.java b/services/core/java/com/android/server/notification/DefaultDeviceEffectsApplier.java
index ab650af..27b8574 100644
--- a/services/core/java/com/android/server/notification/DefaultDeviceEffectsApplier.java
+++ b/services/core/java/com/android/server/notification/DefaultDeviceEffectsApplier.java
@@ -65,7 +65,9 @@
mColorDisplayManager = context.getSystemService(ColorDisplayManager.class);
mPowerManager = context.getSystemService(PowerManager.class);
mUiModeManager = context.getSystemService(UiModeManager.class);
- mWallpaperManager = context.getSystemService(WallpaperManager.class);
+ WallpaperManager wallpaperManager = context.getSystemService(WallpaperManager.class);
+ mWallpaperManager = wallpaperManager != null && wallpaperManager.isWallpaperSupported()
+ ? wallpaperManager : null;
}
@Override
diff --git a/services/core/java/com/android/server/policy/PhoneWindowManager.java b/services/core/java/com/android/server/policy/PhoneWindowManager.java
index e9a7fe1..ec4b38b 100644
--- a/services/core/java/com/android/server/policy/PhoneWindowManager.java
+++ b/services/core/java/com/android/server/policy/PhoneWindowManager.java
@@ -3504,7 +3504,7 @@
if (firstDown && event.isMetaPressed() && event.isCtrlPressed()) {
StatusBarManagerInternal statusbar = getStatusBarManagerInternal();
if (statusbar != null) {
- statusbar.moveFocusedTaskToFullscreen(event.getDisplayId());
+ statusbar.moveFocusedTaskToFullscreen(getTargetDisplayIdForKeyEvent(event));
logKeyboardSystemsEvent(event, KeyboardLogEvent.MULTI_WINDOW_NAVIGATION);
return true;
}
@@ -3514,7 +3514,7 @@
if (firstDown && event.isMetaPressed() && event.isCtrlPressed()) {
StatusBarManagerInternal statusbar = getStatusBarManagerInternal();
if (statusbar != null) {
- statusbar.enterDesktop(event.getDisplayId());
+ statusbar.enterDesktop(getTargetDisplayIdForKeyEvent(event));
logKeyboardSystemsEvent(event, KeyboardLogEvent.DESKTOP_MODE);
return true;
}
@@ -6951,4 +6951,18 @@
== PERMISSION_GRANTED;
}
}
+
+ private int getTargetDisplayIdForKeyEvent(KeyEvent event) {
+ int displayId = event.getDisplayId();
+
+ if (displayId == INVALID_DISPLAY) {
+ displayId = mTopFocusedDisplayId;
+ }
+
+ if (displayId == INVALID_DISPLAY) {
+ return DEFAULT_DISPLAY;
+ } else {
+ return displayId;
+ }
+ }
}
diff --git a/services/core/java/com/android/server/power/Android.bp b/services/core/java/com/android/server/power/Android.bp
index 607d435..863ff76 100644
--- a/services/core/java/com/android/server/power/Android.bp
+++ b/services/core/java/com/android/server/power/Android.bp
@@ -9,4 +9,5 @@
java_aconfig_library {
name: "backstage_power_flags_lib",
aconfig_declarations: "backstage_power_flags",
+ sdk_version: "system_current",
}
diff --git a/services/core/java/com/android/server/webkit/WebViewUpdateServiceImpl2.java b/services/core/java/com/android/server/webkit/WebViewUpdateServiceImpl2.java
index 596de68..1f9d265 100644
--- a/services/core/java/com/android/server/webkit/WebViewUpdateServiceImpl2.java
+++ b/services/core/java/com/android/server/webkit/WebViewUpdateServiceImpl2.java
@@ -96,6 +96,9 @@
private boolean mWebViewPackageDirty = false;
private boolean mAnyWebViewInstalled = false;
+ // Keeps track of whether we attempted to repair WebView before.
+ private boolean mAttemptedToRepairBefore = false;
+
private static final int NUMBER_OF_RELROS_UNKNOWN = Integer.MAX_VALUE;
// The WebView package currently in use (or the one we are preparing).
@@ -136,6 +139,7 @@
boolean removedOrChangedOldPackage = false;
String oldProviderName = null;
PackageInfo newPackage = null;
+ boolean repairNeeded = false;
synchronized (mLock) {
try {
newPackage = findPreferredWebViewPackage();
@@ -161,6 +165,7 @@
Slog.e(TAG, "Could not find valid WebView package to create relro with "
+ e);
}
+ repairNeeded = shouldTriggerRepairLocked();
}
if (updateWebView && !removedOrChangedOldPackage
&& oldProviderName != null) {
@@ -170,12 +175,18 @@
// only kills dependents of packages that are being removed.
mSystemInterface.killPackageDependents(oldProviderName);
}
+ if (repairNeeded) {
+ attemptRepair();
+ }
return;
}
}
}
private boolean shouldTriggerRepairLocked() {
+ if (mAttemptedToRepairBefore) {
+ return false;
+ }
if (mCurrentWebViewPackage == null) {
return true;
}
@@ -189,6 +200,26 @@
}
}
+ private void attemptRepair() {
+ // We didn't find a valid WebView implementation. Try explicitly re-installing and
+ // re-enabling the default package for all users in case it was disabled. If this actually
+ // changes the state, we will see the PackageManager broadcast shortly and try again.
+ synchronized (mLock) {
+ if (mAttemptedToRepairBefore) {
+ return;
+ }
+ mAttemptedToRepairBefore = true;
+ }
+ Slog.w(
+ TAG,
+ "No provider available for all users, trying to install and enable "
+ + mDefaultProvider.packageName);
+ mSystemInterface.installExistingPackageForAllUsers(
+ mContext, mDefaultProvider.packageName);
+ mSystemInterface.enablePackageForAllUsers(
+ mContext, mDefaultProvider.packageName, true);
+ }
+
@Override
public void prepareWebViewInSystemServer() {
try {
@@ -211,18 +242,7 @@
}
if (repairNeeded) {
- // We didn't find a valid WebView implementation. Try explicitly re-installing and
- // re-enabling the default package for all users in case it was disabled, even if we
- // already did the one-time migration before. If this actually changes the state, we
- // will see the PackageManager broadcast shortly and try again.
- Slog.w(
- TAG,
- "No provider available for all users, trying to install and enable "
- + mDefaultProvider.packageName);
- mSystemInterface.installExistingPackageForAllUsers(
- mContext, mDefaultProvider.packageName);
- mSystemInterface.enablePackageForAllUsers(
- mContext, mDefaultProvider.packageName, true);
+ attemptRepair();
}
} catch (Throwable t) {
@@ -332,6 +352,7 @@
PackageInfo oldPackage = null;
PackageInfo newPackage = null;
boolean providerChanged = false;
+ boolean repairNeeded = false;
synchronized (mLock) {
oldPackage = mCurrentWebViewPackage;
@@ -354,11 +375,19 @@
if (providerChanged) {
onWebViewProviderChanged(newPackage);
}
+ // Choosing another provider shouldn't break our state. Only check if repair
+ // is needed if this function is called as a result of a user change.
+ if (newProviderName == null) {
+ repairNeeded = shouldTriggerRepairLocked();
+ }
}
// Kill apps using the old provider only if we changed provider
if (providerChanged && oldPackage != null) {
mSystemInterface.killPackageDependents(oldPackage.packageName);
}
+ if (repairNeeded) {
+ attemptRepair();
+ }
// Return the new provider, this is not necessarily the one we were asked to switch to,
// but the persistent setting will now be pointing to the provider we were asked to
// switch to anyway.
diff --git a/services/core/java/com/android/server/wm/AccessibilityController.java b/services/core/java/com/android/server/wm/AccessibilityController.java
index d08e272..91eff18 100644
--- a/services/core/java/com/android/server/wm/AccessibilityController.java
+++ b/services/core/java/com/android/server/wm/AccessibilityController.java
@@ -817,14 +817,9 @@
switch (transition) {
case WindowManagerPolicy.TRANSIT_ENTER:
case WindowManagerPolicy.TRANSIT_SHOW: {
- if (!isMagnifierActivated) {
+ if (!isMagnifierActivated || !windowState.shouldMagnify()) {
break;
}
- if (Flags.doNotCheckIntersectionWhenNonMagnifiableWindowTransitions()) {
- if (!windowState.shouldMagnify()) {
- break;
- }
- }
switch (type) {
case WindowManager.LayoutParams.TYPE_APPLICATION:
case WindowManager.LayoutParams.TYPE_DRAWN_APPLICATION:
diff --git a/services/core/java/com/android/server/wm/ActivityRecord.java b/services/core/java/com/android/server/wm/ActivityRecord.java
index 92fde18..7d5aa96d 100644
--- a/services/core/java/com/android/server/wm/ActivityRecord.java
+++ b/services/core/java/com/android/server/wm/ActivityRecord.java
@@ -2894,6 +2894,11 @@
/** Makes starting window always fill the associated task. */
private void attachStartingSurfaceToAssociatedTask() {
+ if (mSyncState == SYNC_STATE_NONE && isEmbedded()) {
+ // Collect this activity since it's starting window will reparent to task. To ensure
+ // any starting window's transaction will occur in order.
+ mTransitionController.collect(this);
+ }
// Associate the configuration of starting window with the task.
overrideConfigurationPropagation(mStartingWindow, mStartingData.mAssociatedTask);
getSyncTransaction().reparent(mStartingWindow.mSurfaceControl,
@@ -6867,6 +6872,7 @@
// stop tracking
mSplashScreenStyleSolidColor = true;
+ mAtmService.mBackNavigationController.removePredictiveSurfaceIfNeeded(this);
if (mStartingWindow != null) {
ProtoLog.v(WM_DEBUG_STARTING_WINDOW, "Finish starting %s"
+ ": first real window is shown, no animation", win.mToken);
diff --git a/services/core/java/com/android/server/wm/ActivityTaskManagerService.java b/services/core/java/com/android/server/wm/ActivityTaskManagerService.java
index 218b751..e283f3e 100644
--- a/services/core/java/com/android/server/wm/ActivityTaskManagerService.java
+++ b/services/core/java/com/android/server/wm/ActivityTaskManagerService.java
@@ -4163,19 +4163,21 @@
@Override
public void onPictureInPictureUiStateChanged(PictureInPictureUiState pipState) {
enforceTaskPermission("onPictureInPictureUiStateChanged");
- // The PictureInPictureUiState is sent to current pip task if there is any
- // -or- the top standard task (state like entering PiP does not require a pinned task).
- final Task task;
- if (mRootWindowContainer.getDefaultTaskDisplayArea().hasPinnedTask()) {
- task = mRootWindowContainer.getDefaultTaskDisplayArea().getRootPinnedTask();
- } else {
- task = mRootWindowContainer.getDefaultTaskDisplayArea().getRootTask(
- t -> t.isActivityTypeStandard());
- }
- if (task != null && task.getTopMostActivity() != null
- && !task.getTopMostActivity().isState(FINISHING, DESTROYING, DESTROYED)) {
- mWindowManager.mAtmService.mActivityClientController.onPictureInPictureUiStateChanged(
- task.getTopMostActivity(), pipState);
+ synchronized (mGlobalLock) {
+ // The PictureInPictureUiState is sent to current pip task if there is any
+ // -or- the top standard task (state like entering PiP does not require a pinned task).
+ final Task task;
+ if (mRootWindowContainer.getDefaultTaskDisplayArea().hasPinnedTask()) {
+ task = mRootWindowContainer.getDefaultTaskDisplayArea().getRootPinnedTask();
+ } else {
+ task = mRootWindowContainer.getDefaultTaskDisplayArea().getRootTask(
+ t -> t.isActivityTypeStandard());
+ }
+ if (task != null && task.getTopMostActivity() != null
+ && !task.getTopMostActivity().isState(FINISHING, DESTROYING, DESTROYED)) {
+ mWindowManager.mAtmService.mActivityClientController
+ .onPictureInPictureUiStateChanged(task.getTopMostActivity(), pipState);
+ }
}
}
diff --git a/services/core/java/com/android/server/wm/ActivityTaskSupervisor.java b/services/core/java/com/android/server/wm/ActivityTaskSupervisor.java
index d1d498d..2cda1f5 100644
--- a/services/core/java/com/android/server/wm/ActivityTaskSupervisor.java
+++ b/services/core/java/com/android/server/wm/ActivityTaskSupervisor.java
@@ -74,6 +74,7 @@
import static com.android.server.wm.ActivityTaskManagerService.ANIMATE;
import static com.android.server.wm.ActivityTaskManagerService.H.FIRST_SUPERVISOR_TASK_MSG;
import static com.android.server.wm.ActivityTaskManagerService.RELAUNCH_REASON_NONE;
+import static com.android.server.wm.ClientLifecycleManager.shouldDispatchCompatClientTransactionIndependently;
import static com.android.server.wm.LockTaskController.LOCK_TASK_AUTH_ALLOWLISTED;
import static com.android.server.wm.LockTaskController.LOCK_TASK_AUTH_LAUNCHABLE;
import static com.android.server.wm.LockTaskController.LOCK_TASK_AUTH_LAUNCHABLE_PRIV;
@@ -948,6 +949,13 @@
}
// Schedule transaction.
+ if (shouldDispatchCompatClientTransactionIndependently(r.mTargetSdk)) {
+ // LaunchActivityItem has @UnsupportedAppUsage usages.
+ // Guard the bundleClientTransactionFlag feature with targetSDK on Android 15+.
+ // To not bundle the transaction, dispatch the pending before schedule new
+ // transaction.
+ mService.getLifecycleManager().dispatchPendingTransaction(proc.getThread());
+ }
mService.getLifecycleManager().scheduleTransactionAndLifecycleItems(
proc.getThread(), launchActivityItem, lifecycleItem,
// Immediately dispatch the transaction, so that if it fails, the server can
diff --git a/services/core/java/com/android/server/wm/BackNavigationController.java b/services/core/java/com/android/server/wm/BackNavigationController.java
index b51f899..e155126 100644
--- a/services/core/java/com/android/server/wm/BackNavigationController.java
+++ b/services/core/java/com/android/server/wm/BackNavigationController.java
@@ -61,6 +61,7 @@
import com.android.internal.policy.TransitionAnimation;
import com.android.internal.protolog.common.ProtoLog;
import com.android.server.wm.utils.InsetUtils;
+import com.android.window.flags.Flags;
import java.io.PrintWriter;
import java.util.ArrayList;
@@ -644,6 +645,10 @@
return false;
}
+ void removePredictiveSurfaceIfNeeded(ActivityRecord openActivity) {
+ mAnimationHandler.markWindowHasDrawn(openActivity);
+ }
+
private class NavigationMonitor {
// The window which triggering the back navigation.
private WindowState mNavigatingWindow;
@@ -897,7 +902,8 @@
mWindowManagerService = wms;
final Context context = wms.mContext;
mShowWindowlessSurface = context.getResources().getBoolean(
- com.android.internal.R.bool.config_predictShowStartingSurface);
+ com.android.internal.R.bool.config_predictShowStartingSurface)
+ && Flags.activitySnapshotByDefault();
}
private static final int UNKNOWN = 0;
private static final int TASK_SWITCH = 1;
@@ -1032,6 +1038,23 @@
return isAnimateTarget(wc, mCloseAdaptor.mTarget, mSwitchType);
}
+ void markWindowHasDrawn(ActivityRecord activity) {
+ if (!mComposed || mWaitTransition) {
+ return;
+ }
+ boolean allWindowDrawn = true;
+ for (int i = mOpenAnimAdaptor.mAdaptors.length - 1; i >= 0; --i) {
+ final BackWindowAnimationAdaptor next = mOpenAnimAdaptor.mAdaptors[i];
+ if (isAnimateTarget(activity, next.mTarget, mSwitchType)) {
+ next.mAppWindowDrawn = true;
+ }
+ allWindowDrawn &= next.mAppWindowDrawn;
+ }
+ if (allWindowDrawn) {
+ mOpenAnimAdaptor.cleanUpWindowlessSurface(true);
+ }
+ }
+
private static boolean isAnimateTarget(@NonNull WindowContainer window,
@NonNull WindowContainer animationTarget, int switchType) {
if (switchType == TASK_SWITCH) {
@@ -1134,15 +1157,17 @@
final BackWindowAnimationAdaptor adaptor =
new BackWindowAnimationAdaptor(target, isOpen, switchType);
final SurfaceControl.Transaction pt = target.getPendingTransaction();
- target.startAnimation(pt, adaptor, false /* hidden */, ANIMATION_TYPE_PREDICT_BACK);
// Workaround to show TaskFragment which can be hide in Transitions and won't show
// during isAnimating.
if (isOpen && target.asActivityRecord() != null) {
final TaskFragment fragment = target.asActivityRecord().getTaskFragment();
if (fragment != null) {
+ // Ensure task fragment surface has updated, in case configuration has changed.
+ fragment.updateOrganizedTaskFragmentSurface();
pt.show(fragment.mSurfaceControl);
}
}
+ target.startAnimation(pt, adaptor, false /* hidden */, ANIMATION_TYPE_PREDICT_BACK);
return adaptor;
}
@@ -1181,8 +1206,6 @@
for (int i = mAdaptors.length - 1; i >= 0; --i) {
mAdaptors[i].mTarget.cancelAnimation();
}
- mRequestedStartingSurfaceId = INVALID_TASK_ID;
- mStartingSurface = null;
if (mCloseTransaction != null) {
mCloseTransaction.apply();
mCloseTransaction = null;
@@ -1235,7 +1258,7 @@
represent.allowEnterPip);
}
- void createStartingSurface(ActivityRecord[] visibleOpenActivities) {
+ void createStartingSurface(@Nullable TaskSnapshot snapshot) {
if (mAdaptors[0].mSwitchType == DIALOG_CLOSE) {
return;
}
@@ -1253,7 +1276,6 @@
if (mainActivity == null) {
return;
}
- final TaskSnapshot snapshot = getSnapshot(mainOpen, visibleOpenActivities);
// If there is only one adaptor, attach the windowless window to top activity,
// because fixed rotation only applies on activity.
// Note that embedded activity won't use fixed rotation.
@@ -1321,11 +1343,13 @@
.removeWindowlessStartingSurface(mRequestedStartingSurfaceId,
!openTransitionMatch);
mRequestedStartingSurfaceId = INVALID_TASK_ID;
+ mStartingSurface = null;
}
}
private static class BackWindowAnimationAdaptor implements AnimationAdapter {
SurfaceControl mCapturedLeash;
+ boolean mAppWindowDrawn;
private final Rect mBounds = new Rect();
private final WindowContainer mTarget;
private final boolean mIsOpen;
@@ -1507,9 +1531,16 @@
private void applyPreviewStrategy(
@NonNull BackWindowAnimationAdaptorWrapper openAnimationAdaptor,
@NonNull ActivityRecord[] visibleOpenActivities) {
+ boolean needsLaunchBehind = true;
if (isSupportWindowlessSurface() && mShowWindowlessSurface && !mIsLaunchBehind) {
- openAnimationAdaptor.createStartingSurface(visibleOpenActivities);
- } else {
+ final WindowContainer mainOpen = openAnimationAdaptor.mAdaptors[0].mTarget;
+ final TaskSnapshot snapshot = getSnapshot(mainOpen, visibleOpenActivities);
+ openAnimationAdaptor.createStartingSurface(snapshot);
+ // set LaunchBehind if we are creating splash screen surface.
+ needsLaunchBehind = snapshot == null
+ && openAnimationAdaptor.mRequestedStartingSurfaceId != INVALID_TASK_ID;
+ }
+ if (needsLaunchBehind) {
for (int i = visibleOpenActivities.length - 1; i >= 0; --i) {
setLaunchBehind(visibleOpenActivities[i]);
}
diff --git a/services/core/java/com/android/server/wm/ClientLifecycleManager.java b/services/core/java/com/android/server/wm/ClientLifecycleManager.java
index e48e4e8..816fe1d 100644
--- a/services/core/java/com/android/server/wm/ClientLifecycleManager.java
+++ b/services/core/java/com/android/server/wm/ClientLifecycleManager.java
@@ -22,6 +22,7 @@
import android.app.servertransaction.ClientTransaction;
import android.app.servertransaction.ClientTransactionItem;
import android.os.Binder;
+import android.os.Build;
import android.os.IBinder;
import android.os.RemoteException;
import android.os.Trace;
@@ -179,6 +180,22 @@
Trace.traceEnd(Trace.TRACE_TAG_WINDOW_MANAGER);
}
+ /** Executes the pending transaction for the given client process. */
+ void dispatchPendingTransaction(@NonNull IApplicationThread client) {
+ if (!Flags.bundleClientTransactionFlag()) {
+ return;
+ }
+ final ClientTransaction pendingTransaction = mPendingTransactions.remove(client.asBinder());
+ if (pendingTransaction != null) {
+ try {
+ scheduleTransaction(pendingTransaction);
+ } catch (RemoteException e) {
+ Slog.e(TAG, "Failed to deliver pending transaction", e);
+ // TODO(b/323801078): apply cleanup for individual transaction item if needed.
+ }
+ }
+ }
+
/**
* Called to when {@link WindowSurfacePlacer#continueLayout}.
* Dispatches all pending transactions unless there is an ongoing/scheduled layout, in which
@@ -233,4 +250,17 @@
&& !mWms.mWindowPlacerLocked.isTraversalScheduled()
&& !mWms.mWindowPlacerLocked.isInLayout();
}
+
+ /**
+ * Guards the bundleClientTransactionFlag feature with targetSDK on Android 15+.
+ *
+ * Suppressing because it can't guard with @EnabledSince on VANILLA_ICE_CREAM yet since the
+ * version is not published.
+ *
+ * TODO(b/324203798): update in V
+ */
+ @SuppressWarnings("AndroidFrameworkCompatChange")
+ static boolean shouldDispatchCompatClientTransactionIndependently(int appTargetSdk) {
+ return appTargetSdk <= Build.VERSION_CODES.UPSIDE_DOWN_CAKE;
+ }
}
diff --git a/services/core/java/com/android/server/wm/ContentRecorder.java b/services/core/java/com/android/server/wm/ContentRecorder.java
index 8717098..a914c07 100644
--- a/services/core/java/com/android/server/wm/ContentRecorder.java
+++ b/services/core/java/com/android/server/wm/ContentRecorder.java
@@ -650,6 +650,14 @@
if (isCurrentlyRecording() && mLastRecordedBounds != null) {
mMediaProjectionManager.notifyActiveProjectionCapturedContentVisibilityChanged(
isVisibleRequested);
+
+ if (mContentRecordingSession.getContentToRecord() == RECORD_CONTENT_TASK) {
+ // If capturing a task, then the toggle visibility of the recorded surface to match
+ // visibility of the task, so we don't capture any mid-transition frames
+ mRecordedWindowContainer.getSyncTransaction()
+ .setVisibility(mRecordedSurface, isVisibleRequested);
+ mRecordedWindowContainer.scheduleAnimation();
+ }
}
}
diff --git a/services/core/java/com/android/server/wm/ImeInsetsSourceProvider.java b/services/core/java/com/android/server/wm/ImeInsetsSourceProvider.java
index ea31e63..9fee343 100644
--- a/services/core/java/com/android/server/wm/ImeInsetsSourceProvider.java
+++ b/services/core/java/com/android/server/wm/ImeInsetsSourceProvider.java
@@ -215,11 +215,11 @@
* when {@link android.inputmethodservice.InputMethodService} requests to show IME
* on {@param imeTarget}.
*
- * @param imeTarget imeTarget on which IME show request is coming from.
- * @param statsToken the token tracking the current IME show request or {@code null} otherwise.
+ * @param imeTarget imeTarget on which IME request is coming from.
+ * @param statsToken the token tracking the current IME request.
*/
void scheduleShowImePostLayout(InsetsControlTarget imeTarget,
- @Nullable ImeTracker.Token statsToken) {
+ @NonNull ImeTracker.Token statsToken) {
boolean targetChanged = isTargetChangedWithinActivity(imeTarget);
mImeRequester = imeTarget;
// Cancel the pre-existing stats token, if any.
diff --git a/services/core/java/com/android/server/wm/InsetsControlTarget.java b/services/core/java/com/android/server/wm/InsetsControlTarget.java
index b74eb56..cc3de7a 100644
--- a/services/core/java/com/android/server/wm/InsetsControlTarget.java
+++ b/services/core/java/com/android/server/wm/InsetsControlTarget.java
@@ -60,8 +60,8 @@
* Instructs the control target to show inset sources.
*
* @param types to specify which types of insets source window should be shown.
- * @param fromIme {@code true} if IME show request originated from {@link InputMethodService}.
- * @param statsToken the token tracking the current IME show request or {@code null} otherwise.
+ * @param fromIme {@code true} if the IME request originated from {@link InputMethodService}.
+ * @param statsToken the token tracking the current IME request or {@code null} otherwise.
*/
default void showInsets(@InsetsType int types, boolean fromIme,
@Nullable ImeTracker.Token statsToken) {
@@ -71,8 +71,8 @@
* Instructs the control target to hide inset sources.
*
* @param types to specify which types of insets source window should be hidden.
- * @param fromIme {@code true} if IME hide request originated from {@link InputMethodService}.
- * @param statsToken the token tracking the current IME hide request or {@code null} otherwise.
+ * @param fromIme {@code true} if the IME request originated from {@link InputMethodService}.
+ * @param statsToken the token tracking the current IME request or {@code null} otherwise.
*/
default void hideInsets(@InsetsType int types, boolean fromIme,
@Nullable ImeTracker.Token statsToken) {
diff --git a/services/core/java/com/android/server/wm/SnapshotCache.java b/services/core/java/com/android/server/wm/SnapshotCache.java
index 8680436..64d8c75 100644
--- a/services/core/java/com/android/server/wm/SnapshotCache.java
+++ b/services/core/java/com/android/server/wm/SnapshotCache.java
@@ -16,6 +16,7 @@
package com.android.server.wm;
import android.annotation.Nullable;
+import android.hardware.HardwareBuffer;
import android.util.ArrayMap;
import android.window.TaskSnapshot;
@@ -92,6 +93,10 @@
if (entry != null) {
mAppIdMap.remove(entry.topApp);
mRunningCache.remove(id);
+ final HardwareBuffer buffer = entry.snapshot.getHardwareBuffer();
+ if (buffer != null) {
+ buffer.close();
+ }
}
}
}
diff --git a/services/core/java/com/android/server/wm/WindowManagerInternal.java b/services/core/java/com/android/server/wm/WindowManagerInternal.java
index 5df2edc..77319cc 100644
--- a/services/core/java/com/android/server/wm/WindowManagerInternal.java
+++ b/services/core/java/com/android/server/wm/WindowManagerInternal.java
@@ -829,20 +829,20 @@
* Show IME on imeTargetWindow once IME has finished layout.
*
* @param imeTargetWindowToken token of the (IME target) window which IME should be shown.
- * @param statsToken the token tracking the current IME show request or {@code null} otherwise.
+ * @param statsToken the token tracking the current IME request.
*/
public abstract void showImePostLayout(IBinder imeTargetWindowToken,
- @Nullable ImeTracker.Token statsToken);
+ @NonNull ImeTracker.Token statsToken);
/**
* Hide IME using imeTargetWindow when requested.
*
- * @param imeTargetWindowToken token of the (IME target) window on which requests hiding IME.
+ * @param imeTargetWindowToken token of the (IME target) window which requests hiding IME.
* @param displayId the id of the display the IME is on.
- * @param statsToken the token tracking the current IME hide request or {@code null} otherwise.
+ * @param statsToken the token tracking the current IME request.
*/
public abstract void hideIme(IBinder imeTargetWindowToken, int displayId,
- @Nullable ImeTracker.Token statsToken);
+ @NonNull ImeTracker.Token statsToken);
/**
* Tell window manager about a package that should be running with a restricted range of
diff --git a/services/core/java/com/android/server/wm/WindowManagerService.java b/services/core/java/com/android/server/wm/WindowManagerService.java
index 7e061298..ae5a5cb 100644
--- a/services/core/java/com/android/server/wm/WindowManagerService.java
+++ b/services/core/java/com/android/server/wm/WindowManagerService.java
@@ -8258,12 +8258,17 @@
@Override
public void showImePostLayout(IBinder imeTargetWindowToken,
- @Nullable ImeTracker.Token statsToken) {
+ @NonNull ImeTracker.Token statsToken) {
synchronized (mGlobalLock) {
InputTarget imeTarget = getInputTargetFromWindowTokenLocked(imeTargetWindowToken);
if (imeTarget == null) {
+ ImeTracker.forLogging().onFailed(statsToken,
+ ImeTracker.PHASE_WM_HAS_IME_INSETS_CONTROL_TARGET);
return;
}
+ ImeTracker.forLogging().onProgress(statsToken,
+ ImeTracker.PHASE_WM_HAS_IME_INSETS_CONTROL_TARGET);
+
Trace.asyncTraceBegin(TRACE_TAG_WINDOW_MANAGER, "WMS.showImePostLayout", 0);
final InsetsControlTarget controlTarget = imeTarget.getImeControlTarget();
imeTarget = controlTarget.getWindow();
@@ -8278,7 +8283,7 @@
@Override
public void hideIme(IBinder imeTargetWindowToken, int displayId,
- @Nullable ImeTracker.Token statsToken) {
+ @NonNull ImeTracker.Token statsToken) {
Trace.traceBegin(TRACE_TAG_WINDOW_MANAGER, "WMS.hideIme");
synchronized (mGlobalLock) {
WindowState imeTarget = mWindowMap.get(imeTargetWindowToken);
diff --git a/services/core/java/com/android/server/wm/WindowOrganizerController.java b/services/core/java/com/android/server/wm/WindowOrganizerController.java
index d6fc01a..a7eb444 100644
--- a/services/core/java/com/android/server/wm/WindowOrganizerController.java
+++ b/services/core/java/com/android/server/wm/WindowOrganizerController.java
@@ -329,15 +329,7 @@
deferred);
wctApplied.meet();
if (needsSetReady) {
- // TODO(b/294925498): Remove this once we have accurate ready
- // tracking.
- if (hasActivityLaunch(wct) && !mService.mRootWindowContainer
- .allPausedActivitiesComplete()) {
- // WCT is launching an activity, so we need to wait for its
- // lifecycle events.
- return;
- }
- nextTransition.setAllReady();
+ setAllReadyIfNeeded(nextTransition, wct);
}
});
return nextTransition.getToken();
@@ -390,7 +382,7 @@
}
}
- private static boolean hasActivityLaunch(WindowContainerTransaction wct) {
+ private static boolean hasActivityLaunch(@NonNull WindowContainerTransaction wct) {
for (int i = 0; i < wct.getHierarchyOps().size(); ++i) {
if (wct.getHierarchyOps().get(i).getType() == HIERARCHY_OP_TYPE_LAUNCH_TASK) {
return true;
@@ -399,6 +391,46 @@
return false;
}
+ private boolean isCreatedTaskFragmentReady(@NonNull WindowContainerTransaction wct) {
+ for (int i = 0; i < wct.getHierarchyOps().size(); ++i) {
+ final WindowContainerTransaction.HierarchyOp op = wct.getHierarchyOps().get(i);
+ if (op.getType() != HIERARCHY_OP_TYPE_ADD_TASK_FRAGMENT_OPERATION
+ || op.getTaskFragmentOperation().getOpType()
+ != OP_TYPE_CREATE_TASK_FRAGMENT) {
+ continue;
+ }
+ final IBinder tfToken = op.getTaskFragmentOperation()
+ .getTaskFragmentCreationParams().getFragmentToken();
+ final TaskFragment taskFragment = getTaskFragment(tfToken);
+ if (taskFragment != null && !taskFragment.isReadyToTransit()) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ private void setAllReadyIfNeeded(@NonNull Transition transition,
+ @NonNull WindowContainerTransaction wct) {
+ // TODO(b/294925498): Remove this once we have accurate ready tracking.
+ if (hasActivityLaunch(wct) && !mService.mRootWindowContainer
+ .allPausedActivitiesComplete()) {
+ // WCT is launching an activity, so we need to wait for its
+ // lifecycle events.
+ return;
+ }
+ if (!isCreatedTaskFragmentReady(wct)) {
+ // When the organizer intercepts a #startActivity, it will create an empty TaskFragment
+ // for that specific incoming starting activity. We don't want to set all ready here,
+ // because we requires that #startActivity to be included in this transition, and NOT be
+ // in its own transition.
+ // TODO(b/232042367): explicitly ensure the #startActivity and this transaction are in
+ // the same transition instead of relying on this possible racing condition.
+ return;
+ }
+
+ transition.setAllReady();
+ }
+
@Override
public int startLegacyTransition(int type, @NonNull RemoteAnimationAdapter adapter,
@NonNull IWindowContainerTransactionCallback callback,
@@ -529,7 +561,7 @@
}
mTransitionController.requestStartTransition(transition, null /* startTask */,
remoteTransition, null /* displayChange */);
- transition.setAllReady();
+ setAllReadyIfNeeded(transition, wct);
};
mTransitionController.startCollectOrQueue(transition, doApply);
} finally {
diff --git a/services/credentials/java/com/android/server/credentials/GetCandidateRequestSession.java b/services/credentials/java/com/android/server/credentials/GetCandidateRequestSession.java
index 3cb98eb..eff53de 100644
--- a/services/credentials/java/com/android/server/credentials/GetCandidateRequestSession.java
+++ b/services/credentials/java/com/android/server/credentials/GetCandidateRequestSession.java
@@ -41,6 +41,8 @@
import android.service.credentials.PermissionUtils;
import android.util.Slog;
+import com.android.server.credentials.metrics.ApiStatus;
+
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
@@ -180,7 +182,7 @@
} else {
Slog.w(TAG, "onUiCancellation called but finalResponseReceiver not found");
}
- finishSession(/*propagateCancellation=*/false);
+ finishSession(/*propagateCancellation=*/false, ApiStatus.FAILURE.getMetricCode());
}
@Override
@@ -221,9 +223,10 @@
resultData.putParcelable(
CredentialProviderService.EXTRA_GET_CREDENTIAL_RESPONSE, response);
mFinalResponseReceiver.send(Constants.SUCCESS_CREDMAN_SELECTOR, resultData);
- finishSession(/*propagateCancellation=*/ false);
+ finishSession(/*propagateCancellation=*/ false, ApiStatus.SUCCESS.getMetricCode());
} else {
Slog.w(TAG, "onFinalResponseReceived result receiver not found for pinned entry");
+ finishSession(/*propagateCancellation=*/ false, ApiStatus.FAILURE.getMetricCode());
}
}
diff --git a/services/credentials/java/com/android/server/credentials/RequestSession.java b/services/credentials/java/com/android/server/credentials/RequestSession.java
index 633c9c4..a5b9aa6 100644
--- a/services/credentials/java/com/android/server/credentials/RequestSession.java
+++ b/services/credentials/java/com/android/server/credentials/RequestSession.java
@@ -175,7 +175,7 @@
() -> {
Slog.d(TAG, "Cancellation invoked from the client - clearing session");
boolean isUiActive = maybeCancelUi();
- finishSession(!isUiActive);
+ finishSession(!isUiActive, ApiStatus.CLIENT_CANCELED.getMetricCode());
}
);
}
@@ -231,7 +231,8 @@
return;
}
if (isSessionCancelled()) {
- finishSession(/*propagateCancellation=*/true);
+ finishSession(/*propagateCancellation=*/true,
+ ApiStatus.CLIENT_CANCELED.getMetricCode());
return;
}
String providerId = selection.getProviderId();
@@ -257,11 +258,12 @@
}
}
- protected void finishSession(boolean propagateCancellation) {
+ protected void finishSession(boolean propagateCancellation, int apiStatus) {
Slog.i(TAG, "finishing session with propagateCancellation " + propagateCancellation);
if (propagateCancellation) {
mProviders.values().forEach(ProviderSession::cancelProviderRemoteSession);
}
+ mRequestSessionMetric.logApiCalledAtFinish(apiStatus);
mRequestSessionStatus = RequestSessionStatus.COMPLETE;
mProviders.clear();
clearRequestSessionLocked();
@@ -326,7 +328,8 @@
mRequestSessionMetric.logCandidatePhaseMetrics(mProviders);
if (isSessionCancelled()) {
- finishSession(/*propagateCancellation=*/true);
+ finishSession(/*propagateCancellation=*/true,
+ ApiStatus.CLIENT_CANCELED.getMetricCode());
return providerDataList;
}
@@ -353,23 +356,20 @@
return;
}
if (isSessionCancelled()) {
- mRequestSessionMetric.logApiCalledAtFinish(
- /*apiStatus=*/ ApiStatus.CLIENT_CANCELED.getMetricCode());
- finishSession(/*propagateCancellation=*/true);
+ finishSession(/*propagateCancellation=*/true,
+ ApiStatus.CLIENT_CANCELED.getMetricCode());
return;
}
try {
invokeClientCallbackSuccess(response);
- mRequestSessionMetric.logApiCalledAtFinish(
- /*apiStatus=*/ ApiStatus.SUCCESS.getMetricCode());
+ finishSession(/*propagateCancellation=*/false,
+ ApiStatus.SUCCESS.getMetricCode());
} catch (RemoteException e) {
mRequestSessionMetric.collectFinalPhaseProviderMetricStatus(
/*has_exception=*/ true, ProviderStatusForMetrics.FINAL_FAILURE);
Slog.e(TAG, "Issue while responding to client with a response : " + e);
- mRequestSessionMetric.logApiCalledAtFinish(
- /*apiStatus=*/ ApiStatus.FAILURE.getMetricCode());
+ finishSession(/*propagateCancellation=*/false, ApiStatus.FAILURE.getMetricCode());
}
- finishSession(/*propagateCancellation=*/false);
}
/**
@@ -387,9 +387,7 @@
return;
}
if (isSessionCancelled()) {
- mRequestSessionMetric.logApiCalledAtFinish(
- /*apiStatus=*/ ApiStatus.CLIENT_CANCELED.getMetricCode());
- finishSession(/*propagateCancellation=*/true);
+ finishSession(/*propagateCancellation=*/true, ApiStatus.CLIENT_CANCELED.getMetricCode());
return;
}
@@ -399,8 +397,14 @@
Slog.e(TAG, "Issue while responding to client with error : " + e);
}
boolean isUserCanceled = errorType.contains(MetricUtilities.USER_CANCELED_SUBSTRING);
- mRequestSessionMetric.logFailureOrUserCancel(isUserCanceled);
- finishSession(/*propagateCancellation=*/false);
+ if (isUserCanceled) {
+ mRequestSessionMetric.setHasExceptionFinalPhase(/* has_exception */ false);
+ finishSession(/*propagateCancellation=*/false,
+ ApiStatus.USER_CANCELED.getMetricCode());
+ } else {
+ finishSession(/*propagateCancellation=*/false,
+ ApiStatus.FAILURE.getMetricCode());
+ }
}
/**
@@ -419,7 +423,7 @@
@Override
public void binderDied() {
Slog.d(TAG, "Client binder died - clearing session");
- finishSession(isUiWaitingForData());
+ finishSession(isUiWaitingForData(), ApiStatus.CLIENT_CANCELED.getMetricCode());
}
}
}
diff --git a/services/credentials/java/com/android/server/credentials/metrics/RequestSessionMetric.java b/services/credentials/java/com/android/server/credentials/metrics/RequestSessionMetric.java
index 8adcfbc..a77bd3e 100644
--- a/services/credentials/java/com/android/server/credentials/metrics/RequestSessionMetric.java
+++ b/services/credentials/java/com/android/server/credentials/metrics/RequestSessionMetric.java
@@ -247,7 +247,7 @@
*
* @param exceptionBitFinalPhase represents if the final phase provider had an exception
*/
- private void setHasExceptionFinalPhase(boolean exceptionBitFinalPhase) {
+ public void setHasExceptionFinalPhase(boolean exceptionBitFinalPhase) {
try {
mChosenProviderFinalPhaseMetric.setHasException(exceptionBitFinalPhase);
} catch (Exception e) {
diff --git a/services/tests/InputMethodSystemServerTests/src/com/android/server/inputmethod/DefaultImeVisibilityApplierTest.java b/services/tests/InputMethodSystemServerTests/src/com/android/server/inputmethod/DefaultImeVisibilityApplierTest.java
index 1c71a62..1d225ba 100644
--- a/services/tests/InputMethodSystemServerTests/src/com/android/server/inputmethod/DefaultImeVisibilityApplierTest.java
+++ b/services/tests/InputMethodSystemServerTests/src/com/android/server/inputmethod/DefaultImeVisibilityApplierTest.java
@@ -30,7 +30,10 @@
import static com.android.server.inputmethod.ImeVisibilityStateComputer.STATE_SHOW_IME_IMPLICIT;
import static org.junit.Assert.assertThrows;
-import static org.mockito.Mockito.any;
+import static org.mockito.AdditionalMatchers.and;
+import static org.mockito.AdditionalMatchers.not;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.notNull;
import static org.mockito.Mockito.anyInt;
import static org.mockito.Mockito.eq;
import static org.mockito.Mockito.mock;
@@ -40,6 +43,7 @@
import android.os.IBinder;
import android.os.RemoteException;
import android.view.Display;
+import android.view.inputmethod.ImeTracker;
import androidx.test.ext.junit.runners.AndroidJUnit4;
@@ -56,7 +60,7 @@
* Test the behavior of {@link DefaultImeVisibilityApplier} when performing or applying the IME
* visibility state.
*
- * Build/Install/Run:
+ * <p>Build/Install/Run:
* atest FrameworksInputMethodSystemServerTests:DefaultImeVisibilityApplierTest
*/
@RunWith(AndroidJUnit4.class)
@@ -75,7 +79,8 @@
public void testPerformShowIme() throws Exception {
synchronized (ImfLock.class) {
mVisibilityApplier.performShowIme(new Binder() /* showInputToken */,
- null /* statsToken */, 0 /* showFlags */, null, SHOW_SOFT_INPUT);
+ ImeTracker.Token.empty(), 0 /* showFlags */, null /* resultReceiver */,
+ SHOW_SOFT_INPUT);
}
verifyShowSoftInput(false, true, 0 /* showFlags */);
}
@@ -84,46 +89,66 @@
public void testPerformHideIme() throws Exception {
synchronized (ImfLock.class) {
mVisibilityApplier.performHideIme(new Binder() /* hideInputToken */,
- null /* statsToken */, null, HIDE_SOFT_INPUT);
+ ImeTracker.Token.empty(), null /* resultReceiver */, HIDE_SOFT_INPUT);
}
verifyHideSoftInput(false, true);
}
@Test
public void testApplyImeVisibility_throwForInvalidState() {
- assertThrows(IllegalArgumentException.class,
- () -> mVisibilityApplier.applyImeVisibility(mWindowToken, null, STATE_INVALID));
+ assertThrows(IllegalArgumentException.class, () -> {
+ synchronized (ImfLock.class) {
+ mVisibilityApplier.applyImeVisibility(mWindowToken, ImeTracker.Token.empty(),
+ STATE_INVALID);
+ }
+ });
}
@Test
public void testApplyImeVisibility_showIme() {
- mVisibilityApplier.applyImeVisibility(mWindowToken, null, STATE_SHOW_IME);
- verify(mMockWindowManagerInternal).showImePostLayout(eq(mWindowToken), any());
+ final var statsToken = ImeTracker.Token.empty();
+ synchronized (ImfLock.class) {
+ mVisibilityApplier.applyImeVisibility(mWindowToken, statsToken, STATE_SHOW_IME);
+ }
+ verify(mMockWindowManagerInternal).showImePostLayout(eq(mWindowToken), eq(statsToken));
}
@Test
public void testApplyImeVisibility_hideIme() {
- mVisibilityApplier.applyImeVisibility(mWindowToken, null, STATE_HIDE_IME);
- verify(mMockWindowManagerInternal).hideIme(eq(mWindowToken), anyInt(), any());
+ final var statsToken = ImeTracker.Token.empty();
+ synchronized (ImfLock.class) {
+ mVisibilityApplier.applyImeVisibility(mWindowToken, statsToken, STATE_HIDE_IME);
+ }
+ verify(mMockWindowManagerInternal).hideIme(eq(mWindowToken), anyInt() /* displayId */,
+ eq(statsToken));
}
@Test
public void testApplyImeVisibility_hideImeExplicit() throws Exception {
mInputMethodManagerService.mImeWindowVis = IME_ACTIVE;
- mVisibilityApplier.applyImeVisibility(mWindowToken, null, STATE_HIDE_IME_EXPLICIT);
+ synchronized (ImfLock.class) {
+ mVisibilityApplier.applyImeVisibility(mWindowToken, ImeTracker.Token.empty(),
+ STATE_HIDE_IME_EXPLICIT);
+ }
verifyHideSoftInput(true, true);
}
@Test
public void testApplyImeVisibility_hideNotAlways() throws Exception {
mInputMethodManagerService.mImeWindowVis = IME_ACTIVE;
- mVisibilityApplier.applyImeVisibility(mWindowToken, null, STATE_HIDE_IME_NOT_ALWAYS);
+ synchronized (ImfLock.class) {
+ mVisibilityApplier.applyImeVisibility(mWindowToken, ImeTracker.Token.empty(),
+ STATE_HIDE_IME_NOT_ALWAYS);
+ }
verifyHideSoftInput(true, true);
}
@Test
public void testApplyImeVisibility_showImeImplicit() throws Exception {
- mVisibilityApplier.applyImeVisibility(mWindowToken, null, STATE_SHOW_IME_IMPLICIT);
+ synchronized (ImfLock.class) {
+ mVisibilityApplier.applyImeVisibility(mWindowToken, ImeTracker.Token.empty(),
+ STATE_SHOW_IME_IMPLICIT);
+ }
verifyShowSoftInput(true, true, 0 /* showFlags */);
}
@@ -135,21 +160,21 @@
mInputMethodManagerService.setAttachedClientForTesting(null);
startInputOrWindowGainedFocus(mWindowToken, SOFT_INPUT_STATE_ALWAYS_VISIBLE);
+ final var statsToken = ImeTracker.Token.empty();
synchronized (ImfLock.class) {
final int displayIdToShowIme = mInputMethodManagerService.getDisplayIdToShowImeLocked();
// Verify hideIme will apply the expected displayId when the default IME
// visibility applier app STATE_HIDE_IME.
- mVisibilityApplier.applyImeVisibility(mWindowToken, null, STATE_HIDE_IME);
+ mVisibilityApplier.applyImeVisibility(mWindowToken, statsToken, STATE_HIDE_IME);
verify(mInputMethodManagerService.mWindowManagerInternal).hideIme(
- eq(mWindowToken), eq(displayIdToShowIme), eq(null));
+ eq(mWindowToken), eq(displayIdToShowIme), eq(statsToken));
}
}
@Test
public void testShowImeScreenshot() {
synchronized (ImfLock.class) {
- mVisibilityApplier.showImeScreenshot(mWindowToken, Display.DEFAULT_DISPLAY,
- null /* statsToken */);
+ mVisibilityApplier.showImeScreenshot(mWindowToken, Display.DEFAULT_DISPLAY);
}
verify(mMockImeTargetVisibilityPolicy).showImeScreenshot(eq(mWindowToken),
@@ -174,17 +199,20 @@
synchronized (ImfLock.class) {
// Simulate the system hides the IME when switching IME services in different users.
// (e.g. unbinding the IME from the current user to the profile user)
+ final var statsToken = ImeTracker.Token.empty();
final int displayIdToShowIme = mInputMethodManagerService.getDisplayIdToShowImeLocked();
- mInputMethodManagerService.hideCurrentInputLocked(mWindowToken, null, 0, null,
+ mInputMethodManagerService.hideCurrentInputLocked(mWindowToken,
+ statsToken, 0 /* flags */, null /* resultReceiver */,
HIDE_SWITCH_USER);
mInputMethodManagerService.onUnbindCurrentMethodByReset();
// Expects applyImeVisibility() -> hideIme() will be called to notify WM for syncing
// the IME hidden state.
- verify(mVisibilityApplier).applyImeVisibility(eq(mWindowToken), any(),
- eq(STATE_HIDE_IME));
+ // The unbind will cancel the previous stats token, and create a new one internally.
+ verify(mVisibilityApplier).applyImeVisibility(
+ eq(mWindowToken), any(), eq(STATE_HIDE_IME));
verify(mInputMethodManagerService.mWindowManagerInternal).hideIme(
- eq(mWindowToken), eq(displayIdToShowIme), eq(null));
+ eq(mWindowToken), eq(displayIdToShowIme), and(not(eq(statsToken)), notNull()));
}
}
diff --git a/services/tests/InputMethodSystemServerTests/src/com/android/server/inputmethod/ImeVisibilityStateComputerTest.java b/services/tests/InputMethodSystemServerTests/src/com/android/server/inputmethod/ImeVisibilityStateComputerTest.java
index fae5f86..a22cacb 100644
--- a/services/tests/InputMethodSystemServerTests/src/com/android/server/inputmethod/ImeVisibilityStateComputerTest.java
+++ b/services/tests/InputMethodSystemServerTests/src/com/android/server/inputmethod/ImeVisibilityStateComputerTest.java
@@ -39,9 +39,12 @@
import static com.google.common.truth.Truth.assertThat;
+import static org.mockito.ArgumentMatchers.notNull;
+
import android.os.Binder;
import android.os.IBinder;
import android.os.RemoteException;
+import android.view.inputmethod.ImeTracker;
import android.view.inputmethod.InputMethodManager;
import androidx.test.ext.junit.runners.AndroidJUnit4;
@@ -58,7 +61,7 @@
* Test the behavior of {@link ImeVisibilityStateComputer} and {@link ImeVisibilityApplier} when
* requesting the IME visibility.
*
- * Build/Install/Run:
+ * <p> Build/Install/Run:
* atest FrameworksInputMethodSystemServerTests:ImeVisibilityStateComputerTest
*/
@RunWith(AndroidJUnit4.class)
@@ -91,7 +94,8 @@
@Test
public void testRequestImeVisibility_showImplicit() {
initImeTargetWindowState(mWindowToken);
- boolean res = mComputer.onImeShowFlags(null, InputMethodManager.SHOW_IMPLICIT);
+ boolean res = mComputer.onImeShowFlags(ImeTracker.Token.empty(),
+ InputMethodManager.SHOW_IMPLICIT);
mComputer.requestImeVisibility(mWindowToken, res);
final ImeTargetWindowState state = mComputer.getWindowStateOrNull(mWindowToken);
@@ -106,7 +110,7 @@
@Test
public void testRequestImeVisibility_showExplicit() {
initImeTargetWindowState(mWindowToken);
- boolean res = mComputer.onImeShowFlags(null, 0 /* showFlags */);
+ boolean res = mComputer.onImeShowFlags(ImeTracker.Token.empty(), 0 /* showFlags */);
mComputer.requestImeVisibility(mWindowToken, res);
final ImeTargetWindowState state = mComputer.getWindowStateOrNull(mWindowToken);
@@ -125,7 +129,7 @@
@Test
public void testRequestImeVisibility_showExplicit_thenShowImplicit() {
initImeTargetWindowState(mWindowToken);
- mComputer.onImeShowFlags(null, 0 /* showFlags */);
+ mComputer.onImeShowFlags(ImeTracker.Token.empty(), 0 /* showFlags */);
assertThat(mComputer.mRequestedShowExplicitly).isTrue();
mComputer.onImeShowFlags(null, InputMethodManager.SHOW_IMPLICIT);
@@ -139,10 +143,10 @@
@Test
public void testRequestImeVisibility_showForced_thenShowExplicit() {
initImeTargetWindowState(mWindowToken);
- mComputer.onImeShowFlags(null, InputMethodManager.SHOW_FORCED);
+ mComputer.onImeShowFlags(ImeTracker.Token.empty(), InputMethodManager.SHOW_FORCED);
assertThat(mComputer.mShowForced).isTrue();
- mComputer.onImeShowFlags(null, 0 /* showFlags */);
+ mComputer.onImeShowFlags(ImeTracker.Token.empty(), 0 /* showFlags */);
assertThat(mComputer.mShowForced).isTrue();
}
@@ -152,7 +156,8 @@
mComputer.getImePolicy().setA11yRequestNoSoftKeyboard(SHOW_MODE_HIDDEN);
initImeTargetWindowState(mWindowToken);
- boolean res = mComputer.onImeShowFlags(null, InputMethodManager.SHOW_IMPLICIT);
+ boolean res = mComputer.onImeShowFlags(ImeTracker.Token.empty(),
+ InputMethodManager.SHOW_IMPLICIT);
mComputer.requestImeVisibility(mWindowToken, res);
final ImeTargetWindowState state = mComputer.getWindowStateOrNull(mWindowToken);
@@ -170,7 +175,8 @@
mComputer.getImePolicy().setImeHiddenByDisplayPolicy(true);
initImeTargetWindowState(mWindowToken);
- boolean res = mComputer.onImeShowFlags(null, InputMethodManager.SHOW_IMPLICIT);
+ boolean res = mComputer.onImeShowFlags(ImeTracker.Token.empty(),
+ InputMethodManager.SHOW_IMPLICIT);
mComputer.requestImeVisibility(mWindowToken, res);
final ImeTargetWindowState state = mComputer.getWindowStateOrNull(mWindowToken);
@@ -188,7 +194,8 @@
mComputer.setInputShown(true);
initImeTargetWindowState(mWindowToken);
- assertThat(mComputer.canHideIme(null, InputMethodManager.HIDE_NOT_ALWAYS)).isTrue();
+ assertThat(mComputer.canHideIme(ImeTracker.Token.empty(),
+ InputMethodManager.HIDE_NOT_ALWAYS)).isTrue();
mComputer.requestImeVisibility(mWindowToken, false);
final ImeTargetWindowState state = mComputer.getWindowStateOrNull(mWindowToken);
@@ -281,7 +288,7 @@
final ArgumentCaptor<ImeVisibilityResult> resultCaptor = ArgumentCaptor.forClass(
ImeVisibilityResult.class);
verify(mInputMethodManagerService).onApplyImeVisibilityFromComputer(targetCaptor.capture(),
- resultCaptor.capture());
+ notNull() /* statsToken */, resultCaptor.capture());
final IBinder imeInputTarget = targetCaptor.getValue();
final ImeVisibilityResult result = resultCaptor.getValue();
diff --git a/services/tests/InputMethodSystemServerTests/src/com/android/server/inputmethod/InputMethodManagerServiceTestBase.java b/services/tests/InputMethodSystemServerTests/src/com/android/server/inputmethod/InputMethodManagerServiceTestBase.java
index a1be00a..f4d95af 100644
--- a/services/tests/InputMethodSystemServerTests/src/com/android/server/inputmethod/InputMethodManagerServiceTestBase.java
+++ b/services/tests/InputMethodSystemServerTests/src/com/android/server/inputmethod/InputMethodManagerServiceTestBase.java
@@ -27,6 +27,7 @@
import static org.mockito.ArgumentMatchers.anyInt;
import static org.mockito.ArgumentMatchers.anyLong;
import static org.mockito.ArgumentMatchers.anyString;
+import static org.mockito.ArgumentMatchers.notNull;
import static org.mockito.Mockito.eq;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
@@ -277,8 +278,9 @@
.setCurrentMethodVisible();
}
verify(mMockInputMethod, times(showSoftInput ? 1 : 0))
- .showSoftInput(any(), any(),
- showFlags != NO_VERIFY_SHOW_FLAGS ? eq(showFlags) : anyInt(), any());
+ .showSoftInput(any() /* showInputToken */ , notNull() /* statsToken */,
+ showFlags != NO_VERIFY_SHOW_FLAGS ? eq(showFlags) : anyInt() /* flags*/,
+ any() /* resultReceiver */);
}
protected void verifyHideSoftInput(boolean setNotVisible, boolean hideSoftInput)
@@ -288,6 +290,7 @@
.setCurrentMethodNotVisible();
}
verify(mMockInputMethod, times(hideSoftInput ? 1 : 0))
- .hideSoftInput(any(), any(), anyInt(), any());
+ .hideSoftInput(any() /* hideInputToken */, notNull() /* statsToken */,
+ anyInt() /* flags */, any() /* resultReceiver */);
}
}
diff --git a/services/tests/displayservicetests/src/com/android/server/display/DisplayPowerControllerTest.java b/services/tests/displayservicetests/src/com/android/server/display/DisplayPowerControllerTest.java
index fcee70f..e9315c8 100644
--- a/services/tests/displayservicetests/src/com/android/server/display/DisplayPowerControllerTest.java
+++ b/services/tests/displayservicetests/src/com/android/server/display/DisplayPowerControllerTest.java
@@ -1727,6 +1727,27 @@
/* ignoreAnimationLimits= */ anyBoolean());
}
+ @Test
+ public void testDefaultDozeBrightness() {
+ float brightness = 0.121f;
+ when(mPowerManagerMock.getBrightnessConstraint(
+ PowerManager.BRIGHTNESS_CONSTRAINT_TYPE_DOZE)).thenReturn(brightness);
+ mHolder = createDisplayPowerController(DISPLAY_ID, UNIQUE_ID);
+ when(mHolder.displayPowerState.getColorFadeLevel()).thenReturn(1.0f);
+ when(mHolder.automaticBrightnessController.getAutomaticScreenBrightness(
+ any(BrightnessEvent.class))).thenReturn(PowerManager.BRIGHTNESS_INVALID_FLOAT);
+ when(mHolder.hbmController.getCurrentBrightnessMax())
+ .thenReturn(PowerManager.BRIGHTNESS_MAX);
+
+ DisplayPowerRequest dpr = new DisplayPowerRequest();
+ dpr.policy = DisplayPowerRequest.POLICY_DOZE;
+ mHolder.dpc.requestPowerState(dpr, /* waitForNegativeProximity= */ false);
+ advanceTime(1); // Run updatePowerState
+
+ verify(mHolder.animator).animateTo(eq(brightness), /* linearSecondTarget= */ anyFloat(),
+ eq(BRIGHTNESS_RAMP_RATE_FAST_INCREASE), eq(false));
+ }
+
/**
* Creates a mock and registers it to {@link LocalServices}.
*/
diff --git a/services/tests/displayservicetests/src/com/android/server/display/brightness/DisplayBrightnessStrategySelectorTest.java b/services/tests/displayservicetests/src/com/android/server/display/brightness/DisplayBrightnessStrategySelectorTest.java
index 37958fa..1c681ce 100644
--- a/services/tests/displayservicetests/src/com/android/server/display/brightness/DisplayBrightnessStrategySelectorTest.java
+++ b/services/tests/displayservicetests/src/com/android/server/display/brightness/DisplayBrightnessStrategySelectorTest.java
@@ -27,6 +27,7 @@
import android.content.ContextWrapper;
import android.content.res.Resources;
import android.hardware.display.DisplayManagerInternal;
+import android.os.PowerManager;
import android.view.Display;
import androidx.test.core.app.ApplicationProvider;
@@ -155,6 +156,7 @@
DisplayManagerInternal.DisplayPowerRequest displayPowerRequest = mock(
DisplayManagerInternal.DisplayPowerRequest.class);
displayPowerRequest.policy = DisplayManagerInternal.DisplayPowerRequest.POLICY_DOZE;
+ displayPowerRequest.dozeScreenBrightness = 0.2f;
when(mResources.getBoolean(R.bool.config_allowAutoBrightnessWhileDozing)).thenReturn(
DISALLOW_AUTO_BRIGHTNESS_WHILE_DOZING);
assertEquals(mDisplayBrightnessStrategySelector.selectStrategy(displayPowerRequest,
@@ -162,6 +164,18 @@
}
@Test
+ public void selectStrategyDoesNotSelectDozeStrategyWhenInvalidBrightness() {
+ DisplayManagerInternal.DisplayPowerRequest displayPowerRequest = mock(
+ DisplayManagerInternal.DisplayPowerRequest.class);
+ displayPowerRequest.policy = DisplayManagerInternal.DisplayPowerRequest.POLICY_DOZE;
+ displayPowerRequest.dozeScreenBrightness = PowerManager.BRIGHTNESS_INVALID_FLOAT;
+ when(mResources.getBoolean(R.bool.config_allowAutoBrightnessWhileDozing)).thenReturn(
+ DISALLOW_AUTO_BRIGHTNESS_WHILE_DOZING);
+ assertNotEquals(mDisplayBrightnessStrategySelector.selectStrategy(displayPowerRequest,
+ Display.STATE_DOZE), mDozeBrightnessModeStrategy);
+ }
+
+ @Test
public void selectStrategySelectsScreenOffStrategyWhenValid() {
DisplayManagerInternal.DisplayPowerRequest displayPowerRequest = mock(
DisplayManagerInternal.DisplayPowerRequest.class);
diff --git a/services/tests/displayservicetests/src/com/android/server/display/brightness/strategy/AutomaticBrightnessStrategyTest.java b/services/tests/displayservicetests/src/com/android/server/display/brightness/strategy/AutomaticBrightnessStrategyTest.java
index 8867806..ba462e3 100644
--- a/services/tests/displayservicetests/src/com/android/server/display/brightness/strategy/AutomaticBrightnessStrategyTest.java
+++ b/services/tests/displayservicetests/src/com/android/server/display/brightness/strategy/AutomaticBrightnessStrategyTest.java
@@ -215,7 +215,7 @@
mAutomaticBrightnessStrategy.setUseAutoBrightness(true);
int targetDisplayState = Display.STATE_DOZE;
boolean allowAutoBrightnessWhileDozing = true;
- int brightnessReason = BrightnessReason.REASON_DOZE;
+ int brightnessReason = BrightnessReason.REASON_UNKNOWN;
int policy = DisplayManagerInternal.DisplayPowerRequest.POLICY_DOZE;
float lastUserSetBrightness = 0.2f;
boolean userSetBrightnessChanged = true;
diff --git a/services/tests/servicestests/src/com/android/server/net/NetworkPolicyManagerServiceTest.java b/services/tests/servicestests/src/com/android/server/net/NetworkPolicyManagerServiceTest.java
index 14fd78c..1249707 100644
--- a/services/tests/servicestests/src/com/android/server/net/NetworkPolicyManagerServiceTest.java
+++ b/services/tests/servicestests/src/com/android/server/net/NetworkPolicyManagerServiceTest.java
@@ -2404,6 +2404,45 @@
}
@Test
+ public void testObsoleteHandleUidGone() throws Exception {
+ callAndWaitOnUidStateChanged(UID_A, PROCESS_STATE_TOP, 51);
+ assertFalse(mService.isUidNetworkingBlocked(UID_A, false));
+
+ clearInvocations(mNetworkManager);
+
+ // In the service, handleUidGone is only called from mUidEventHandler. Then a call to it may
+ // be rendered obsolete by a newer uid change posted on the handler. The latest uid state
+ // change is always reflected in the current UidStateChangeCallbackInfo for the uid, so to
+ // simulate an obsolete call for test, we directly call handleUidGone and leave the state in
+ // UidStateChangeCallbackInfo set by the previous call to onUidStateChanged(TOP). This call
+ // should then do nothing.
+ mService.handleUidGone(UID_A);
+
+ verify(mNetworkManager, times(0)).setFirewallUidRule(anyInt(), anyInt(), anyInt());
+ assertFalse(mService.isUidNetworkingBlocked(UID_A, false));
+ }
+
+ @Test
+ @RequiresFlagsEnabled(Flags.FLAG_NETWORK_BLOCKED_FOR_TOP_SLEEPING_AND_ABOVE)
+ public void testObsoleteHandleUidChanged() throws Exception {
+ callAndWaitOnUidGone(UID_A);
+ assertTrue(mService.isUidNetworkingBlocked(UID_A, false));
+
+ clearInvocations(mNetworkManager);
+
+ // In the service, handleUidChanged is only called from mUidEventHandler. Then a call to it
+ // may be rendered obsolete by an immediate uid-gone posted on the handler. The latest uid
+ // state change is always reflected in the current UidStateChangeCallbackInfo for the uid,
+ // so to simulate an obsolete call for test, we directly call handleUidChanged and leave the
+ // state in UidStateChangeCallbackInfo as null as it would get removed by the previous call
+ // to onUidGone(). This call should then do nothing.
+ mService.handleUidChanged(UID_A);
+
+ verify(mNetworkManager, times(0)).setFirewallUidRule(anyInt(), anyInt(), anyInt());
+ assertTrue(mService.isUidNetworkingBlocked(UID_A, false));
+ }
+
+ @Test
public void testLowPowerStandbyAllowlist() throws Exception {
// Chain background is also enabled but these procstates are important enough to be exempt.
callAndWaitOnUidStateChanged(UID_A, PROCESS_STATE_TOP, 0);
diff --git a/services/tests/servicestests/src/com/android/server/webkit/TestSystemImpl.java b/services/tests/servicestests/src/com/android/server/webkit/TestSystemImpl.java
index 2039f93..54d1138 100644
--- a/services/tests/servicestests/src/com/android/server/webkit/TestSystemImpl.java
+++ b/services/tests/servicestests/src/com/android/server/webkit/TestSystemImpl.java
@@ -96,6 +96,9 @@
return;
}
PackageInfo packageInfo = userPackages.get(userId);
+ if (packageInfo == null) {
+ return;
+ }
packageInfo.applicationInfo.enabled = enable;
setPackageInfoForUser(userId, packageInfo);
}
@@ -106,6 +109,9 @@
return;
}
PackageInfo packageInfo = userPackages.get(userId);
+ if (packageInfo == null) {
+ return;
+ }
packageInfo.applicationInfo.flags |= ApplicationInfo.FLAG_INSTALLED;
packageInfo.applicationInfo.privateFlags &= (~ApplicationInfo.PRIVATE_FLAG_HIDDEN);
setPackageInfoForUser(userId, packageInfo);
diff --git a/services/tests/servicestests/src/com/android/server/webkit/WebViewUpdateServiceTest.java b/services/tests/servicestests/src/com/android/server/webkit/WebViewUpdateServiceTest.java
index c535ec5..e181a51 100644
--- a/services/tests/servicestests/src/com/android/server/webkit/WebViewUpdateServiceTest.java
+++ b/services/tests/servicestests/src/com/android/server/webkit/WebViewUpdateServiceTest.java
@@ -1551,7 +1551,7 @@
@Test
@RequiresFlagsEnabled("android.webkit.update_service_v2")
- public void testDefaultWebViewPackageInstalling() {
+ public void testDefaultWebViewPackageInstallingDuringStartUp() {
String testPackage = "testDefault";
WebViewProviderInfo[] packages =
new WebViewProviderInfo[] {
@@ -1574,6 +1574,68 @@
Matchers.anyObject(), Mockito.eq(testPackage));
}
+ @Test
+ @RequiresFlagsEnabled("android.webkit.update_service_v2")
+ public void testDefaultWebViewPackageInstallingAfterStartUp() {
+ String testPackage = "testDefault";
+ WebViewProviderInfo[] packages =
+ new WebViewProviderInfo[] {
+ new WebViewProviderInfo(
+ testPackage,
+ "",
+ true /* default available */,
+ false /* fallback */,
+ null)
+ };
+ checkCertainPackageUsedAfterWebViewBootPreparation(testPackage, packages);
+
+ // uninstall the default package.
+ mTestSystemImpl.setPackageInfo(
+ createPackageInfo(
+ testPackage, true /* enabled */, true /* valid */, false /* installed */));
+ mWebViewUpdateServiceImpl.packageStateChanged(testPackage,
+ WebViewUpdateService.PACKAGE_REMOVED, 0);
+
+ // Check that we try to re-install the default package.
+ Mockito.verify(mTestSystemImpl)
+ .installExistingPackageForAllUsers(
+ Matchers.anyObject(), Mockito.eq(testPackage));
+ }
+
+ /**
+ * Ensures that adding a new user for which the current WebView package is uninstalled triggers
+ * the repair logic.
+ */
+ @Test
+ @RequiresFlagsEnabled("android.webkit.update_service_v2")
+ public void testAddingNewUserWithDefaultdPackageNotInstalled() {
+ String testPackage = "testDefault";
+ WebViewProviderInfo[] packages =
+ new WebViewProviderInfo[] {
+ new WebViewProviderInfo(
+ testPackage,
+ "",
+ true /* default available */,
+ false /* fallback */,
+ null)
+ };
+ checkCertainPackageUsedAfterWebViewBootPreparation(testPackage, packages);
+
+ // Add new user with the default package not installed.
+ int newUser = 100;
+ mTestSystemImpl.addUser(newUser);
+ mTestSystemImpl.setPackageInfoForUser(newUser,
+ createPackageInfo(testPackage, true /* enabled */, true /* valid */,
+ false /* installed */));
+
+ mWebViewUpdateServiceImpl.handleNewUser(newUser);
+
+ // Check that we try to re-install the default package for all users.
+ Mockito.verify(mTestSystemImpl)
+ .installExistingPackageForAllUsers(
+ Matchers.anyObject(), Mockito.eq(testPackage));
+ }
+
private void testDefaultPackageChosen(PackageInfo packageInfo) {
WebViewProviderInfo[] packages =
new WebViewProviderInfo[] {
diff --git a/services/tests/uiservicestests/src/com/android/server/notification/DefaultDeviceEffectsApplierTest.java b/services/tests/uiservicestests/src/com/android/server/notification/DefaultDeviceEffectsApplierTest.java
index 3797dbb..bfbc81c 100644
--- a/services/tests/uiservicestests/src/com/android/server/notification/DefaultDeviceEffectsApplierTest.java
+++ b/services/tests/uiservicestests/src/com/android/server/notification/DefaultDeviceEffectsApplierTest.java
@@ -29,9 +29,11 @@
import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.ArgumentMatchers.argThat;
import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.verifyNoMoreInteractions;
import static org.mockito.Mockito.verifyZeroInteractions;
import static org.mockito.Mockito.when;
@@ -103,8 +105,10 @@
mContext.addMockSystemService(ColorDisplayManager.class, mColorDisplayManager);
mContext.addMockSystemService(UiModeManager.class, mUiModeManager);
mContext.addMockSystemService(WallpaperManager.class, mWallpaperManager);
+ when(mWallpaperManager.isWallpaperSupported()).thenReturn(true);
mApplier = new DefaultDeviceEffectsApplier(mContext);
+ verify(mWallpaperManager).isWallpaperSupported();
}
@Test
@@ -187,6 +191,26 @@
}
@Test
+ public void apply_disabledWallpaperService_dimWallpaperNotApplied() {
+ mSetFlagsRule.enableFlags(android.app.Flags.FLAG_MODES_API);
+ WallpaperManager disabledWallpaperService = mock(WallpaperManager.class);
+ when(mWallpaperManager.isWallpaperSupported()).thenReturn(false);
+ mContext.addMockSystemService(WallpaperManager.class, disabledWallpaperService);
+ mApplier = new DefaultDeviceEffectsApplier(mContext);
+ verify(mWallpaperManager).isWallpaperSupported();
+
+ ZenDeviceEffects effects = new ZenDeviceEffects.Builder()
+ .setShouldSuppressAmbientDisplay(true)
+ .setShouldDimWallpaper(true)
+ .setShouldDisplayGrayscale(true)
+ .setShouldUseNightMode(true)
+ .build();
+ mApplier.apply(effects, UPDATE_ORIGIN_USER);
+
+ verifyNoMoreInteractions(mWallpaperManager);
+ }
+
+ @Test
public void apply_someEffects_onlyThoseEffectsApplied() {
mSetFlagsRule.enableFlags(android.app.Flags.FLAG_MODES_API);
diff --git a/services/tests/wmtests/src/com/android/server/wm/ImeInsetsSourceProviderTest.java b/services/tests/wmtests/src/com/android/server/wm/ImeInsetsSourceProviderTest.java
index 20bb549..faa6d97 100644
--- a/services/tests/wmtests/src/com/android/server/wm/ImeInsetsSourceProviderTest.java
+++ b/services/tests/wmtests/src/com/android/server/wm/ImeInsetsSourceProviderTest.java
@@ -27,6 +27,7 @@
import android.graphics.PixelFormat;
import android.platform.test.annotations.Presubmit;
import android.view.InsetsSource;
+import android.view.inputmethod.ImeTracker;
import androidx.test.filters.SmallTest;
@@ -34,6 +35,12 @@
import org.junit.Test;
import org.junit.runner.RunWith;
+/**
+ * Tests for the {@link ImeInsetsSourceProvider} class.
+ *
+ * <p> Build/Install/Run:
+ * atest WmTests:ImeInsetsSourceProviderTest
+ */
@SmallTest
@Presubmit
@RunWith(WindowTestRunner.class)
@@ -56,7 +63,7 @@
mDisplayContent.setImeControlTarget(popup);
mDisplayContent.setImeLayeringTarget(appWin);
popup.mAttrs.format = PixelFormat.TRANSPARENT;
- mImeProvider.scheduleShowImePostLayout(appWin, null /* statsToken */);
+ mImeProvider.scheduleShowImePostLayout(appWin, ImeTracker.Token.empty());
assertTrue(mImeProvider.isReadyToShowIme());
}
@@ -65,7 +72,7 @@
WindowState target = createWindow(null, TYPE_APPLICATION, "app");
mDisplayContent.setImeLayeringTarget(target);
mDisplayContent.updateImeInputAndControlTarget(target);
- mImeProvider.scheduleShowImePostLayout(target, null /* statsToken */);
+ mImeProvider.scheduleShowImePostLayout(target, ImeTracker.Token.empty());
assertTrue(mImeProvider.isReadyToShowIme());
}
@@ -79,7 +86,7 @@
mDisplayContent.setImeLayeringTarget(target);
mDisplayContent.setImeControlTarget(target);
- mImeProvider.scheduleShowImePostLayout(target, null /* statsToken */);
+ mImeProvider.scheduleShowImePostLayout(target, ImeTracker.Token.empty());
assertFalse(mImeProvider.isImeShowing());
mImeProvider.checkShowImePostLayout();
assertTrue(mImeProvider.isImeShowing());
diff --git a/services/tests/wmtests/src/com/android/server/wm/WindowStateTests.java b/services/tests/wmtests/src/com/android/server/wm/WindowStateTests.java
index cd3ce91..c8ad4bd 100644
--- a/services/tests/wmtests/src/com/android/server/wm/WindowStateTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/WindowStateTests.java
@@ -104,6 +104,7 @@
import android.view.View;
import android.view.WindowInsets;
import android.view.WindowManager;
+import android.view.inputmethod.ImeTracker;
import android.window.ClientWindowFrames;
import android.window.ITaskFragmentOrganizer;
import android.window.TaskFragmentOrganizer;
@@ -126,7 +127,7 @@
/**
* Tests for the {@link WindowState} class.
*
- * Build/Install/Run:
+ * <p> Build/Install/Run:
* atest WmTests:WindowStateTests
*/
@SmallTest
@@ -1099,7 +1100,7 @@
mDisplayContent.setImeInputTarget(app);
app.setRequestedVisibleTypes(ime(), ime());
assertTrue(mDisplayContent.shouldImeAttachedToApp());
- controller.getImeSourceProvider().scheduleShowImePostLayout(app, null /* statsToken */);
+ controller.getImeSourceProvider().scheduleShowImePostLayout(app, ImeTracker.Token.empty());
controller.getImeSourceProvider().getSource().setVisible(true);
controller.updateAboveInsetsState(false);
@@ -1137,7 +1138,7 @@
mDisplayContent.setImeInputTarget(app);
app.setRequestedVisibleTypes(ime(), ime());
assertTrue(mDisplayContent.shouldImeAttachedToApp());
- controller.getImeSourceProvider().scheduleShowImePostLayout(app, null /* statsToken */);
+ controller.getImeSourceProvider().scheduleShowImePostLayout(app, ImeTracker.Token.empty());
controller.getImeSourceProvider().getSource().setVisible(true);
controller.updateAboveInsetsState(false);
diff --git a/services/usage/java/com/android/server/usage/StorageStatsService.java b/services/usage/java/com/android/server/usage/StorageStatsService.java
index 44f4068..883c702 100644
--- a/services/usage/java/com/android/server/usage/StorageStatsService.java
+++ b/services/usage/java/com/android/server/usage/StorageStatsService.java
@@ -383,7 +383,7 @@
return queryStatsForUid(volumeUuid, appInfo.uid, callingPackage);
} else {
// Multiple packages means we need to go manual
- final int appId = UserHandle.getUserId(appInfo.uid);
+ final int appId = UserHandle.getAppId(appInfo.uid);
final String[] packageNames = new String[] { packageName };
final long[] ceDataInodes = new long[1];
String[] codePaths = new String[0];