Merge "Add a way to disable auto rotation for immersive apps" into tm-qpr-dev
diff --git a/core/java/android/app/Service.java b/core/java/android/app/Service.java
index 7635138..5258542 100644
--- a/core/java/android/app/Service.java
+++ b/core/java/android/app/Service.java
@@ -720,7 +720,7 @@
* apps targeting SDK Version {@link android.os.Build.VERSION_CODES#S}
* or higher are not allowed to start foreground services from the background.
* See
- * <a href="{@docRoot}/about/versions/12/behavior-changes-12">
+ * <a href="{@docRoot}about/versions/12/behavior-changes-12">
* Behavior changes: Apps targeting Android 12
* </a>
* for more details.
@@ -769,7 +769,7 @@
* apps targeting SDK Version {@link android.os.Build.VERSION_CODES#S}
* or higher are not allowed to start foreground services from the background.
* See
- * <a href="{@docRoot}/about/versions/12/behavior-changes-12">
+ * <a href="{@docRoot}about/versions/12/behavior-changes-12">
* Behavior changes: Apps targeting Android 12
* </a>
* for more details.
diff --git a/core/java/android/window/TaskFragmentAnimationParams.aidl b/core/java/android/window/TaskFragmentAnimationParams.aidl
new file mode 100644
index 0000000..8ae84c2
--- /dev/null
+++ b/core/java/android/window/TaskFragmentAnimationParams.aidl
@@ -0,0 +1,23 @@
+/*
+ * 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 android.window;
+
+/**
+ * Data object for animation related override of TaskFragment.
+ * @hide
+ */
+parcelable TaskFragmentAnimationParams;
diff --git a/core/java/android/window/TaskFragmentAnimationParams.java b/core/java/android/window/TaskFragmentAnimationParams.java
new file mode 100644
index 0000000..12ad914
--- /dev/null
+++ b/core/java/android/window/TaskFragmentAnimationParams.java
@@ -0,0 +1,129 @@
+/*
+ * 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 android.window;
+
+import android.annotation.ColorInt;
+import android.annotation.NonNull;
+import android.annotation.Nullable;
+import android.os.Parcel;
+import android.os.Parcelable;
+
+/**
+ * Data object for animation related override of TaskFragment.
+ * @hide
+ */
+// TODO(b/206557124): Add more animation customization options.
+public final class TaskFragmentAnimationParams implements Parcelable {
+
+ /** The default {@link TaskFragmentAnimationParams} to use when there is no app override. */
+ public static final TaskFragmentAnimationParams DEFAULT =
+ new TaskFragmentAnimationParams.Builder().build();
+
+ @ColorInt
+ private final int mAnimationBackgroundColor;
+
+ private TaskFragmentAnimationParams(@ColorInt int animationBackgroundColor) {
+ mAnimationBackgroundColor = animationBackgroundColor;
+ }
+
+ /**
+ * The {@link ColorInt} to use for the background during the animation with this TaskFragment if
+ * the animation requires a background.
+ *
+ * The default value is {@code 0}, which is to use the theme window background.
+ */
+ @ColorInt
+ public int getAnimationBackgroundColor() {
+ return mAnimationBackgroundColor;
+ }
+
+ private TaskFragmentAnimationParams(Parcel in) {
+ mAnimationBackgroundColor = in.readInt();
+ }
+
+ @Override
+ public void writeToParcel(@NonNull Parcel dest, int flags) {
+ dest.writeInt(mAnimationBackgroundColor);
+ }
+
+ @NonNull
+ public static final Creator<TaskFragmentAnimationParams> CREATOR =
+ new Creator<TaskFragmentAnimationParams>() {
+ @Override
+ public TaskFragmentAnimationParams createFromParcel(Parcel in) {
+ return new TaskFragmentAnimationParams(in);
+ }
+
+ @Override
+ public TaskFragmentAnimationParams[] newArray(int size) {
+ return new TaskFragmentAnimationParams[size];
+ }
+ };
+
+ @Override
+ public String toString() {
+ return "TaskFragmentAnimationParams{"
+ + " animationBgColor=" + Integer.toHexString(mAnimationBackgroundColor)
+ + "}";
+ }
+
+ @Override
+ public int hashCode() {
+ return mAnimationBackgroundColor;
+ }
+
+ @Override
+ public boolean equals(@Nullable Object obj) {
+ if (!(obj instanceof TaskFragmentAnimationParams)) {
+ return false;
+ }
+ final TaskFragmentAnimationParams other = (TaskFragmentAnimationParams) obj;
+ return mAnimationBackgroundColor == other.mAnimationBackgroundColor;
+ }
+
+ @Override
+ public int describeContents() {
+ return 0;
+ }
+
+ /** Builder to construct the {@link TaskFragmentAnimationParams}. */
+ public static final class Builder {
+
+ @ColorInt
+ private int mAnimationBackgroundColor = 0;
+
+ /**
+ * Sets the {@link ColorInt} to use for the background during the animation with this
+ * TaskFragment if the animation requires a background. The default value is
+ * {@code 0}, which is to use the theme window background.
+ *
+ * @param color a packed color int, {@code AARRGGBB}, for the animation background color.
+ * @return this {@link Builder}.
+ */
+ @NonNull
+ public Builder setAnimationBackgroundColor(@ColorInt int color) {
+ mAnimationBackgroundColor = color;
+ return this;
+ }
+
+ /** Constructs the {@link TaskFragmentAnimationParams}. */
+ @NonNull
+ public TaskFragmentAnimationParams build() {
+ return new TaskFragmentAnimationParams(mAnimationBackgroundColor);
+ }
+ }
+}
diff --git a/core/java/android/window/TaskFragmentOperation.aidl b/core/java/android/window/TaskFragmentOperation.aidl
new file mode 100644
index 0000000..c1ed0c7
--- /dev/null
+++ b/core/java/android/window/TaskFragmentOperation.aidl
@@ -0,0 +1,23 @@
+/*
+ * 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 android.window;
+
+/**
+ * Data object of params for TaskFragment related {@link WindowContainerTransaction} operation.
+ * @hide
+ */
+parcelable TaskFragmentOperation;
diff --git a/core/java/android/window/TaskFragmentOperation.java b/core/java/android/window/TaskFragmentOperation.java
new file mode 100644
index 0000000..0f30b79
--- /dev/null
+++ b/core/java/android/window/TaskFragmentOperation.java
@@ -0,0 +1,168 @@
+/*
+ * 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 android.window;
+
+import android.annotation.IntDef;
+import android.annotation.NonNull;
+import android.annotation.Nullable;
+import android.os.IBinder;
+import android.os.Parcel;
+import android.os.Parcelable;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.util.Objects;
+
+/**
+ * Data object of params for TaskFragment related {@link WindowContainerTransaction} operation.
+ *
+ * @see WindowContainerTransaction#setTaskFragmentOperation(IBinder, TaskFragmentOperation).
+ * @hide
+ */
+// TODO(b/263436063): move other TaskFragment related operation here.
+public final class TaskFragmentOperation implements Parcelable {
+
+ /** Sets the {@link TaskFragmentAnimationParams} for the given TaskFragment. */
+ public static final int OP_TYPE_SET_ANIMATION_PARAMS = 0;
+
+ @IntDef(prefix = { "OP_TYPE_" }, value = {
+ OP_TYPE_SET_ANIMATION_PARAMS
+ })
+ @Retention(RetentionPolicy.SOURCE)
+ @interface OperationType {}
+
+ @OperationType
+ private final int mOpType;
+
+ @Nullable
+ private final TaskFragmentAnimationParams mAnimationParams;
+
+ private TaskFragmentOperation(@OperationType int opType,
+ @Nullable TaskFragmentAnimationParams animationParams) {
+ mOpType = opType;
+ mAnimationParams = animationParams;
+ }
+
+ private TaskFragmentOperation(Parcel in) {
+ mOpType = in.readInt();
+ mAnimationParams = in.readTypedObject(TaskFragmentAnimationParams.CREATOR);
+ }
+
+ @Override
+ public void writeToParcel(@NonNull Parcel dest, int flags) {
+ dest.writeInt(mOpType);
+ dest.writeTypedObject(mAnimationParams, flags);
+ }
+
+ @NonNull
+ public static final Creator<TaskFragmentOperation> CREATOR =
+ new Creator<TaskFragmentOperation>() {
+ @Override
+ public TaskFragmentOperation createFromParcel(Parcel in) {
+ return new TaskFragmentOperation(in);
+ }
+
+ @Override
+ public TaskFragmentOperation[] newArray(int size) {
+ return new TaskFragmentOperation[size];
+ }
+ };
+
+ /**
+ * Gets the {@link OperationType} of this {@link TaskFragmentOperation}.
+ */
+ @OperationType
+ public int getOpType() {
+ return mOpType;
+ }
+
+ /**
+ * Gets the animation related override of TaskFragment.
+ */
+ @Nullable
+ public TaskFragmentAnimationParams getAnimationParams() {
+ return mAnimationParams;
+ }
+
+ @Override
+ public String toString() {
+ final StringBuilder sb = new StringBuilder();
+ sb.append("TaskFragmentOperation{ opType=").append(mOpType);
+ if (mAnimationParams != null) {
+ sb.append(", animationParams=").append(mAnimationParams);
+ }
+
+ sb.append('}');
+ return sb.toString();
+ }
+
+ @Override
+ public int hashCode() {
+ int result = mOpType;
+ result = result * 31 + mAnimationParams.hashCode();
+ return result;
+ }
+
+ @Override
+ public boolean equals(@Nullable Object obj) {
+ if (!(obj instanceof TaskFragmentOperation)) {
+ return false;
+ }
+ final TaskFragmentOperation other = (TaskFragmentOperation) obj;
+ return mOpType == other.mOpType
+ && Objects.equals(mAnimationParams, other.mAnimationParams);
+ }
+
+ @Override
+ public int describeContents() {
+ return 0;
+ }
+
+ /** Builder to construct the {@link TaskFragmentOperation}. */
+ public static final class Builder {
+
+ @OperationType
+ private final int mOpType;
+
+ @Nullable
+ private TaskFragmentAnimationParams mAnimationParams;
+
+ /**
+ * @param opType the {@link OperationType} of this {@link TaskFragmentOperation}.
+ */
+ public Builder(@OperationType int opType) {
+ mOpType = opType;
+ }
+
+ /**
+ * Sets the {@link TaskFragmentAnimationParams} for the given TaskFragment.
+ */
+ @NonNull
+ public Builder setAnimationParams(@Nullable TaskFragmentAnimationParams animationParams) {
+ mAnimationParams = animationParams;
+ return this;
+ }
+
+ /**
+ * Constructs the {@link TaskFragmentOperation}.
+ */
+ @NonNull
+ public TaskFragmentOperation build() {
+ return new TaskFragmentOperation(mOpType, mAnimationParams);
+ }
+ }
+}
diff --git a/core/java/android/window/WindowContainerTransaction.java b/core/java/android/window/WindowContainerTransaction.java
index f90353a..d7b4929 100644
--- a/core/java/android/window/WindowContainerTransaction.java
+++ b/core/java/android/window/WindowContainerTransaction.java
@@ -763,6 +763,30 @@
}
/**
+ * Sets the {@link TaskFragmentOperation} to apply to the given TaskFragment.
+ *
+ * @param fragmentToken client assigned unique token to create TaskFragment with specified in
+ * {@link TaskFragmentCreationParams#getFragmentToken()}.
+ * @param taskFragmentOperation the {@link TaskFragmentOperation} to apply to the given
+ * TaskFramgent.
+ * @hide
+ */
+ @NonNull
+ public WindowContainerTransaction setTaskFragmentOperation(@NonNull IBinder fragmentToken,
+ @NonNull TaskFragmentOperation taskFragmentOperation) {
+ Objects.requireNonNull(fragmentToken);
+ Objects.requireNonNull(taskFragmentOperation);
+ final HierarchyOp hierarchyOp =
+ new HierarchyOp.Builder(
+ HierarchyOp.HIERARCHY_OP_TYPE_SET_TASK_FRAGMENT_OPERATION)
+ .setContainer(fragmentToken)
+ .setTaskFragmentOperation(taskFragmentOperation)
+ .build();
+ mHierarchyOps.add(hierarchyOp);
+ return this;
+ }
+
+ /**
* Sets/removes the always on top flag for this {@code windowContainer}. See
* {@link com.android.server.wm.ConfigurationContainer#setAlwaysOnTop(boolean)}.
* Please note that this method is only intended to be used for a
@@ -1262,6 +1286,7 @@
public static final int HIERARCHY_OP_TYPE_FINISH_ACTIVITY = 21;
public static final int HIERARCHY_OP_TYPE_SET_COMPANION_TASK_FRAGMENT = 22;
public static final int HIERARCHY_OP_TYPE_SET_REPARENT_LEAF_TASK_IF_RELAUNCH = 23;
+ public static final int HIERARCHY_OP_TYPE_SET_TASK_FRAGMENT_OPERATION = 24;
// The following key(s) are for use with mLaunchOptions:
// When launching a task (eg. from recents), this is the taskId to be launched.
@@ -1302,10 +1327,14 @@
@Nullable
private Intent mActivityIntent;
- // Used as options for WindowContainerTransaction#createTaskFragment().
+ /** Used as options for {@link #createTaskFragment}. */
@Nullable
private TaskFragmentCreationParams mTaskFragmentCreationOptions;
+ /** Used as options for {@link #setTaskFragmentOperation}. */
+ @Nullable
+ private TaskFragmentOperation mTaskFragmentOperation;
+
@Nullable
private PendingIntent mPendingIntent;
@@ -1418,6 +1447,7 @@
mLaunchOptions = copy.mLaunchOptions;
mActivityIntent = copy.mActivityIntent;
mTaskFragmentCreationOptions = copy.mTaskFragmentCreationOptions;
+ mTaskFragmentOperation = copy.mTaskFragmentOperation;
mPendingIntent = copy.mPendingIntent;
mShortcutInfo = copy.mShortcutInfo;
mAlwaysOnTop = copy.mAlwaysOnTop;
@@ -1441,6 +1471,7 @@
mLaunchOptions = in.readBundle();
mActivityIntent = in.readTypedObject(Intent.CREATOR);
mTaskFragmentCreationOptions = in.readTypedObject(TaskFragmentCreationParams.CREATOR);
+ mTaskFragmentOperation = in.readTypedObject(TaskFragmentOperation.CREATOR);
mPendingIntent = in.readTypedObject(PendingIntent.CREATOR);
mShortcutInfo = in.readTypedObject(ShortcutInfo.CREATOR);
mAlwaysOnTop = in.readBoolean();
@@ -1529,6 +1560,11 @@
}
@Nullable
+ public TaskFragmentOperation getTaskFragmentOperation() {
+ return mTaskFragmentOperation;
+ }
+
+ @Nullable
public PendingIntent getPendingIntent() {
return mPendingIntent;
}
@@ -1604,6 +1640,9 @@
case HIERARCHY_OP_TYPE_SET_REPARENT_LEAF_TASK_IF_RELAUNCH:
return "{setReparentLeafTaskIfRelaunch: container= " + mContainer
+ " reparentLeafTaskIfRelaunch= " + mReparentLeafTaskIfRelaunch + "}";
+ case HIERARCHY_OP_TYPE_SET_TASK_FRAGMENT_OPERATION:
+ return "{setTaskFragmentOperation: fragmentToken= " + mContainer
+ + " operation= " + mTaskFragmentOperation + "}";
default:
return "{mType=" + mType + " container=" + mContainer + " reparent=" + mReparent
+ " mToTop=" + mToTop
@@ -1631,6 +1670,7 @@
dest.writeBundle(mLaunchOptions);
dest.writeTypedObject(mActivityIntent, flags);
dest.writeTypedObject(mTaskFragmentCreationOptions, flags);
+ dest.writeTypedObject(mTaskFragmentOperation, flags);
dest.writeTypedObject(mPendingIntent, flags);
dest.writeTypedObject(mShortcutInfo, flags);
dest.writeBoolean(mAlwaysOnTop);
@@ -1688,6 +1728,9 @@
private TaskFragmentCreationParams mTaskFragmentCreationOptions;
@Nullable
+ private TaskFragmentOperation mTaskFragmentOperation;
+
+ @Nullable
private PendingIntent mPendingIntent;
@Nullable
@@ -1767,6 +1810,12 @@
return this;
}
+ Builder setTaskFragmentOperation(
+ @Nullable TaskFragmentOperation taskFragmentOperation) {
+ mTaskFragmentOperation = taskFragmentOperation;
+ return this;
+ }
+
Builder setReparentLeafTaskIfRelaunch(boolean reparentLeafTaskIfRelaunch) {
mReparentLeafTaskIfRelaunch = reparentLeafTaskIfRelaunch;
return this;
@@ -1796,6 +1845,7 @@
hierarchyOp.mPendingIntent = mPendingIntent;
hierarchyOp.mAlwaysOnTop = mAlwaysOnTop;
hierarchyOp.mTaskFragmentCreationOptions = mTaskFragmentCreationOptions;
+ hierarchyOp.mTaskFragmentOperation = mTaskFragmentOperation;
hierarchyOp.mShortcutInfo = mShortcutInfo;
hierarchyOp.mReparentLeafTaskIfRelaunch = mReparentLeafTaskIfRelaunch;
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index d83e40c..6a80d1c 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -258,6 +258,7 @@
android:name="com.android.bluetooth.BluetoothMapContentObserver.action.MESSAGE_DELIVERY" />
<protected-broadcast
android:name="android.bluetooth.pan.profile.action.CONNECTION_STATE_CHANGED" />
+ <protected-broadcast android:name="android.bluetooth.action.HAP_CONNECTION_STATE_CHANGED" />
<protected-broadcast android:name="android.bluetooth.action.LE_AUDIO_CONNECTION_STATE_CHANGED" />
<protected-broadcast android:name="android.bluetooth.action.LE_AUDIO_ACTIVE_DEVICE_CHANGED" />
<protected-broadcast android:name="android.bluetooth.action.LE_AUDIO_CONF_CHANGED" />
diff --git a/core/res/res/values-da/strings.xml b/core/res/res/values-da/strings.xml
index 1fe2b99..ca619b3 100644
--- a/core/res/res/values-da/strings.xml
+++ b/core/res/res/values-da/strings.xml
@@ -586,11 +586,11 @@
<string name="biometric_error_generic" msgid="6784371929985434439">"Der opstod fejl i forbindelse med godkendelse"</string>
<string name="screen_lock_app_setting_name" msgid="6054944352976789228">"Brug skærmlås"</string>
<string name="screen_lock_dialog_default_subtitle" msgid="120359538048533695">"Angiv din skærmlås for at fortsætte"</string>
- <string name="fingerprint_acquired_partial" msgid="4323789264604479684">"Hold fingeren nede på sensoren"</string>
+ <string name="fingerprint_acquired_partial" msgid="4323789264604479684">"Hold fingeren på sensoren"</string>
<string name="fingerprint_acquired_insufficient" msgid="623888149088216458">"Fingeraftrykket kan ikke genkendes. Prøv igen."</string>
<string name="fingerprint_acquired_imager_dirty" msgid="1770676120848224250">"Rengør fingeraftrykssensoren, og prøv igen"</string>
<string name="fingerprint_acquired_imager_dirty_alt" msgid="9169582140486372897">"Rengør sensoren, og prøv igen"</string>
- <string name="fingerprint_acquired_too_fast" msgid="1628459767349116104">"Hold fingeren nede på sensoren"</string>
+ <string name="fingerprint_acquired_too_fast" msgid="1628459767349116104">"Hold fingeren på sensoren"</string>
<string name="fingerprint_acquired_too_slow" msgid="6683510291554497580">"Du bevægede fingeren for langsomt. Prøv igen."</string>
<string name="fingerprint_acquired_already_enrolled" msgid="2285166003936206785">"Prøv med et andet fingeraftryk"</string>
<string name="fingerprint_acquired_too_bright" msgid="3863560181670915607">"Der er for lyst"</string>
diff --git a/core/res/res/values-ro/strings.xml b/core/res/res/values-ro/strings.xml
index 83e8ced2..83fba3f 100644
--- a/core/res/res/values-ro/strings.xml
+++ b/core/res/res/values-ro/strings.xml
@@ -318,7 +318,7 @@
<string name="permgrouplab_activityRecognition" msgid="3324466667921775766">"Activitate fizică"</string>
<string name="permgroupdesc_activityRecognition" msgid="4725624819457670704">"să acceseze activitatea fizică"</string>
<string name="permgrouplab_camera" msgid="9090413408963547706">"Camera foto"</string>
- <string name="permgroupdesc_camera" msgid="7585150538459320326">"fotografieze și să înregistreze videoclipuri"</string>
+ <string name="permgroupdesc_camera" msgid="7585150538459320326">"să fotografieze și să înregistreze videoclipuri"</string>
<string name="permgrouplab_nearby_devices" msgid="5529147543651181991">"Dispozitive din apropiere"</string>
<string name="permgroupdesc_nearby_devices" msgid="3213561597116913508">"descoperă dispozitive din apropiere și conectează-te la acestea"</string>
<string name="permgrouplab_calllog" msgid="7926834372073550288">"Jurnale de apeluri"</string>
diff --git a/libs/WindowManager/Jetpack/src/androidx/window/extensions/WindowExtensionsImpl.java b/libs/WindowManager/Jetpack/src/androidx/window/extensions/WindowExtensionsImpl.java
index fb0a9db..54edd9e 100644
--- a/libs/WindowManager/Jetpack/src/androidx/window/extensions/WindowExtensionsImpl.java
+++ b/libs/WindowManager/Jetpack/src/androidx/window/extensions/WindowExtensionsImpl.java
@@ -17,9 +17,13 @@
package androidx.window.extensions;
import android.app.ActivityThread;
+import android.app.Application;
import android.content.Context;
+import android.window.TaskFragmentOrganizer;
import androidx.annotation.NonNull;
+import androidx.window.common.DeviceStateManagerFoldingFeatureProducer;
+import androidx.window.common.RawFoldingFeatureProducer;
import androidx.window.extensions.area.WindowAreaComponent;
import androidx.window.extensions.area.WindowAreaComponentImpl;
import androidx.window.extensions.embedding.ActivityEmbeddingComponent;
@@ -27,6 +31,8 @@
import androidx.window.extensions.layout.WindowLayoutComponent;
import androidx.window.extensions.layout.WindowLayoutComponentImpl;
+import java.util.Objects;
+
/**
* The reference implementation of {@link WindowExtensions} that implements the initial API version.
@@ -34,7 +40,8 @@
public class WindowExtensionsImpl implements WindowExtensions {
private final Object mLock = new Object();
- private volatile WindowLayoutComponent mWindowLayoutComponent;
+ private volatile DeviceStateManagerFoldingFeatureProducer mFoldingFeatureProducer;
+ private volatile WindowLayoutComponentImpl mWindowLayoutComponent;
private volatile SplitController mSplitController;
private volatile WindowAreaComponent mWindowAreaComponent;
@@ -44,6 +51,49 @@
return 1;
}
+ @NonNull
+ private Application getApplication() {
+ return Objects.requireNonNull(ActivityThread.currentApplication());
+ }
+
+ @NonNull
+ private DeviceStateManagerFoldingFeatureProducer getFoldingFeatureProducer() {
+ if (mFoldingFeatureProducer == null) {
+ synchronized (mLock) {
+ if (mFoldingFeatureProducer == null) {
+ Context context = getApplication();
+ RawFoldingFeatureProducer foldingFeatureProducer =
+ new RawFoldingFeatureProducer(context);
+ mFoldingFeatureProducer =
+ new DeviceStateManagerFoldingFeatureProducer(context,
+ foldingFeatureProducer);
+ }
+ }
+ }
+ return mFoldingFeatureProducer;
+ }
+
+ @NonNull
+ private WindowLayoutComponentImpl getWindowLayoutComponentImpl() {
+ if (mWindowLayoutComponent == null) {
+ synchronized (mLock) {
+ if (mWindowLayoutComponent == null) {
+ Context context = getApplication();
+ DeviceStateManagerFoldingFeatureProducer producer =
+ getFoldingFeatureProducer();
+ // TODO(b/263263909) Use the organizer to tell if an Activity is embededed.
+ // Need to improve our Dependency Injection and centralize the logic.
+ TaskFragmentOrganizer organizer = new TaskFragmentOrganizer(command -> {
+ throw new RuntimeException("Not allowed!");
+ });
+ mWindowLayoutComponent = new WindowLayoutComponentImpl(context, organizer,
+ producer);
+ }
+ }
+ }
+ return mWindowLayoutComponent;
+ }
+
/**
* Returns a reference implementation of {@link WindowLayoutComponent} if available,
* {@code null} otherwise. The implementation must match the API level reported in
@@ -52,15 +102,7 @@
*/
@Override
public WindowLayoutComponent getWindowLayoutComponent() {
- if (mWindowLayoutComponent == null) {
- synchronized (mLock) {
- if (mWindowLayoutComponent == null) {
- Context context = ActivityThread.currentApplication();
- mWindowLayoutComponent = new WindowLayoutComponentImpl(context);
- }
- }
- }
- return mWindowLayoutComponent;
+ return getWindowLayoutComponentImpl();
}
/**
@@ -74,7 +116,10 @@
if (mSplitController == null) {
synchronized (mLock) {
if (mSplitController == null) {
- mSplitController = new SplitController();
+ mSplitController = new SplitController(
+ getWindowLayoutComponentImpl(),
+ getFoldingFeatureProducer()
+ );
}
}
}
diff --git a/libs/WindowManager/Jetpack/src/androidx/window/extensions/embedding/JetpackTaskFragmentOrganizer.java b/libs/WindowManager/Jetpack/src/androidx/window/extensions/embedding/JetpackTaskFragmentOrganizer.java
index b910287..87fa63d 100644
--- a/libs/WindowManager/Jetpack/src/androidx/window/extensions/embedding/JetpackTaskFragmentOrganizer.java
+++ b/libs/WindowManager/Jetpack/src/androidx/window/extensions/embedding/JetpackTaskFragmentOrganizer.java
@@ -17,6 +17,7 @@
package androidx.window.extensions.embedding;
import static android.app.WindowConfiguration.WINDOWING_MODE_UNDEFINED;
+import static android.window.TaskFragmentOperation.OP_TYPE_SET_ANIMATION_PARAMS;
import static androidx.window.extensions.embedding.SplitContainer.getFinishPrimaryWithSecondaryBehavior;
import static androidx.window.extensions.embedding.SplitContainer.getFinishSecondaryWithPrimaryBehavior;
@@ -31,8 +32,10 @@
import android.os.Bundle;
import android.os.IBinder;
import android.util.ArrayMap;
+import android.window.TaskFragmentAnimationParams;
import android.window.TaskFragmentCreationParams;
import android.window.TaskFragmentInfo;
+import android.window.TaskFragmentOperation;
import android.window.TaskFragmentOrganizer;
import android.window.TaskFragmentTransaction;
import android.window.WindowContainerTransaction;
@@ -114,13 +117,14 @@
* @param activityIntent Intent to start the secondary Activity with.
* @param activityOptions ActivityOptions to start the secondary Activity with.
* @param windowingMode the windowing mode to set for the TaskFragments.
+ * @param splitAttributes the {@link SplitAttributes} to represent the split.
*/
void startActivityToSide(@NonNull WindowContainerTransaction wct,
@NonNull IBinder launchingFragmentToken, @NonNull Rect launchingFragmentBounds,
@NonNull Activity launchingActivity, @NonNull IBinder secondaryFragmentToken,
@NonNull Rect secondaryFragmentBounds, @NonNull Intent activityIntent,
@Nullable Bundle activityOptions, @NonNull SplitRule rule,
- @WindowingMode int windowingMode) {
+ @WindowingMode int windowingMode, @NonNull SplitAttributes splitAttributes) {
final IBinder ownerToken = launchingActivity.getActivityToken();
// Create or resize the launching TaskFragment.
@@ -131,6 +135,7 @@
createTaskFragmentAndReparentActivity(wct, launchingFragmentToken, ownerToken,
launchingFragmentBounds, windowingMode, launchingActivity);
}
+ updateAnimationParams(wct, launchingFragmentToken, splitAttributes);
// Create a TaskFragment for the secondary activity.
final TaskFragmentCreationParams fragmentOptions = new TaskFragmentCreationParams.Builder(
@@ -144,6 +149,7 @@
.setPairedPrimaryFragmentToken(launchingFragmentToken)
.build();
createTaskFragment(wct, fragmentOptions);
+ updateAnimationParams(wct, secondaryFragmentToken, splitAttributes);
wct.startActivityInTaskFragment(secondaryFragmentToken, ownerToken, activityIntent,
activityOptions);
@@ -163,6 +169,7 @@
resizeTaskFragment(wct, fragmentToken, new Rect());
setAdjacentTaskFragments(wct, fragmentToken, null /* secondary */, null /* splitRule */);
updateWindowingMode(wct, fragmentToken, WINDOWING_MODE_UNDEFINED);
+ updateAnimationParams(wct, fragmentToken, TaskFragmentAnimationParams.DEFAULT);
}
/**
@@ -175,6 +182,7 @@
createTaskFragmentAndReparentActivity(
wct, fragmentToken, activity.getActivityToken(), new Rect(),
WINDOWING_MODE_UNDEFINED, activity);
+ updateAnimationParams(wct, fragmentToken, TaskFragmentAnimationParams.DEFAULT);
}
/**
@@ -270,6 +278,24 @@
wct.setWindowingMode(mFragmentInfos.get(fragmentToken).getToken(), windowingMode);
}
+ /**
+ * Updates the {@link TaskFragmentAnimationParams} for the given TaskFragment based on
+ * {@link SplitAttributes}.
+ */
+ void updateAnimationParams(@NonNull WindowContainerTransaction wct,
+ @NonNull IBinder fragmentToken, @NonNull SplitAttributes splitAttributes) {
+ updateAnimationParams(wct, fragmentToken, createAnimationParamsOrDefault(splitAttributes));
+ }
+
+ void updateAnimationParams(@NonNull WindowContainerTransaction wct,
+ @NonNull IBinder fragmentToken, @NonNull TaskFragmentAnimationParams animationParams) {
+ final TaskFragmentOperation operation = new TaskFragmentOperation.Builder(
+ OP_TYPE_SET_ANIMATION_PARAMS)
+ .setAnimationParams(animationParams)
+ .build();
+ wct.setTaskFragmentOperation(fragmentToken, operation);
+ }
+
void deleteTaskFragment(@NonNull WindowContainerTransaction wct,
@NonNull IBinder fragmentToken) {
if (!mFragmentInfos.containsKey(fragmentToken)) {
@@ -291,4 +317,14 @@
public void onTransactionReady(@NonNull TaskFragmentTransaction transaction) {
mCallback.onTransactionReady(transaction);
}
+
+ private static TaskFragmentAnimationParams createAnimationParamsOrDefault(
+ @Nullable SplitAttributes splitAttributes) {
+ if (splitAttributes == null) {
+ return TaskFragmentAnimationParams.DEFAULT;
+ }
+ return new TaskFragmentAnimationParams.Builder()
+ .setAnimationBackgroundColor(splitAttributes.getAnimationBackgroundColor())
+ .build();
+ }
}
diff --git a/libs/WindowManager/Jetpack/src/androidx/window/extensions/embedding/SplitController.java b/libs/WindowManager/Jetpack/src/androidx/window/extensions/embedding/SplitController.java
index 1af1313..1cd3ea5 100644
--- a/libs/WindowManager/Jetpack/src/androidx/window/extensions/embedding/SplitController.java
+++ b/libs/WindowManager/Jetpack/src/androidx/window/extensions/embedding/SplitController.java
@@ -65,6 +65,7 @@
import android.util.Size;
import android.util.SparseArray;
import android.view.WindowMetrics;
+import android.window.TaskFragmentAnimationParams;
import android.window.TaskFragmentInfo;
import android.window.TaskFragmentParentInfo;
import android.window.TaskFragmentTransaction;
@@ -74,8 +75,8 @@
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.window.common.CommonFoldingFeature;
+import androidx.window.common.DeviceStateManagerFoldingFeatureProducer;
import androidx.window.common.EmptyLifecycleCallbacksAdapter;
-import androidx.window.extensions.WindowExtensionsProvider;
import androidx.window.extensions.embedding.TransactionManager.TransactionRecord;
import androidx.window.extensions.layout.WindowLayoutComponentImpl;
@@ -144,19 +145,12 @@
private final Handler mHandler;
final Object mLock = new Object();
private final ActivityStartMonitor mActivityStartMonitor;
- @NonNull
- final WindowLayoutComponentImpl mWindowLayoutComponent;
- public SplitController() {
- this((WindowLayoutComponentImpl) Objects.requireNonNull(WindowExtensionsProvider
- .getWindowExtensions().getWindowLayoutComponent()));
- }
-
- @VisibleForTesting
- SplitController(@NonNull WindowLayoutComponentImpl windowLayoutComponent) {
+ public SplitController(@NonNull WindowLayoutComponentImpl windowLayoutComponent,
+ @NonNull DeviceStateManagerFoldingFeatureProducer foldingFeatureProducer) {
final MainThreadExecutor executor = new MainThreadExecutor();
mHandler = executor.mHandler;
- mPresenter = new SplitPresenter(executor, this);
+ mPresenter = new SplitPresenter(executor, windowLayoutComponent, this);
mTransactionManager = new TransactionManager(mPresenter);
final ActivityThread activityThread = ActivityThread.currentActivityThread();
final Application application = activityThread.getApplication();
@@ -167,8 +161,7 @@
mActivityStartMonitor = new ActivityStartMonitor();
instrumentation.addMonitor(mActivityStartMonitor);
- mWindowLayoutComponent = windowLayoutComponent;
- mWindowLayoutComponent.addFoldingStateChangedCallback(new FoldingFeatureListener());
+ foldingFeatureProducer.addDataChangedCallback(new FoldingFeatureListener());
}
private class FoldingFeatureListener implements Consumer<List<CommonFoldingFeature>> {
@@ -1149,6 +1142,8 @@
taskId);
mPresenter.createTaskFragment(wct, expandedContainer.getTaskFragmentToken(),
activityInTask.getActivityToken(), new Rect(), WINDOWING_MODE_UNDEFINED);
+ mPresenter.updateAnimationParams(wct, expandedContainer.getTaskFragmentToken(),
+ TaskFragmentAnimationParams.DEFAULT);
return expandedContainer;
}
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 9db9f87..14d244b 100644
--- a/libs/WindowManager/Jetpack/src/androidx/window/extensions/embedding/SplitPresenter.java
+++ b/libs/WindowManager/Jetpack/src/androidx/window/extensions/embedding/SplitPresenter.java
@@ -36,6 +36,7 @@
import android.view.View;
import android.view.WindowInsets;
import android.view.WindowMetrics;
+import android.window.TaskFragmentAnimationParams;
import android.window.TaskFragmentCreationParams;
import android.window.WindowContainerTransaction;
@@ -50,6 +51,7 @@
import androidx.window.extensions.embedding.TaskContainer.TaskProperties;
import androidx.window.extensions.layout.DisplayFeature;
import androidx.window.extensions.layout.FoldingFeature;
+import androidx.window.extensions.layout.WindowLayoutComponentImpl;
import androidx.window.extensions.layout.WindowLayoutInfo;
import com.android.internal.annotations.VisibleForTesting;
@@ -136,10 +138,14 @@
.setSplitType(new ExpandContainersSplitType())
.build();
+ private final WindowLayoutComponentImpl mWindowLayoutComponent;
private final SplitController mController;
- SplitPresenter(@NonNull Executor executor, @NonNull SplitController controller) {
+ SplitPresenter(@NonNull Executor executor,
+ @NonNull WindowLayoutComponentImpl windowLayoutComponent,
+ @NonNull SplitController controller) {
super(executor, controller);
+ mWindowLayoutComponent = windowLayoutComponent;
mController = controller;
registerOrganizer();
if (!SplitController.ENABLE_SHELL_TRANSITIONS) {
@@ -176,7 +182,7 @@
final Rect primaryRectBounds = getBoundsForPosition(POSITION_START, taskProperties,
splitAttributes);
final TaskFragmentContainer primaryContainer = prepareContainerForActivity(wct,
- primaryActivity, primaryRectBounds, null);
+ primaryActivity, primaryRectBounds, splitAttributes, null /* containerToAvoid */);
// Create new empty task fragment
final int taskId = primaryContainer.getTaskId();
@@ -189,6 +195,7 @@
createTaskFragment(wct, secondaryContainer.getTaskFragmentToken(),
primaryActivity.getActivityToken(), secondaryRectBounds,
windowingMode);
+ updateAnimationParams(wct, secondaryContainer.getTaskFragmentToken(), splitAttributes);
// Set adjacent to each other so that the containers below will be invisible.
setAdjacentTaskFragments(wct, primaryContainer, secondaryContainer, rule,
@@ -222,7 +229,7 @@
final Rect primaryRectBounds = getBoundsForPosition(POSITION_START, taskProperties,
splitAttributes);
final TaskFragmentContainer primaryContainer = prepareContainerForActivity(wct,
- primaryActivity, primaryRectBounds, null);
+ primaryActivity, primaryRectBounds, splitAttributes, null /* containerToAvoid */);
final Rect secondaryRectBounds = getBoundsForPosition(POSITION_END, taskProperties,
splitAttributes);
@@ -236,7 +243,7 @@
containerToAvoid = curSecondaryContainer;
}
final TaskFragmentContainer secondaryContainer = prepareContainerForActivity(wct,
- secondaryActivity, secondaryRectBounds, containerToAvoid);
+ secondaryActivity, secondaryRectBounds, splitAttributes, containerToAvoid);
// Set adjacent to each other so that the containers below will be invisible.
setAdjacentTaskFragments(wct, primaryContainer, secondaryContainer, rule,
@@ -253,7 +260,8 @@
*/
private TaskFragmentContainer prepareContainerForActivity(
@NonNull WindowContainerTransaction wct, @NonNull Activity activity,
- @NonNull Rect bounds, @Nullable TaskFragmentContainer containerToAvoid) {
+ @NonNull Rect bounds, @NonNull SplitAttributes splitAttributes,
+ @Nullable TaskFragmentContainer containerToAvoid) {
TaskFragmentContainer container = mController.getContainerWithActivity(activity);
final int taskId = container != null ? container.getTaskId() : activity.getTaskId();
if (container == null || container == containerToAvoid) {
@@ -270,6 +278,7 @@
.getWindowingModeForSplitTaskFragment(bounds);
updateTaskFragmentWindowingModeIfRegistered(wct, container, windowingMode);
}
+ updateAnimationParams(wct, container.getTaskFragmentToken(), splitAttributes);
return container;
}
@@ -314,7 +323,7 @@
rule, splitAttributes);
startActivityToSide(wct, primaryContainer.getTaskFragmentToken(), primaryRectBounds,
launchingActivity, secondaryContainer.getTaskFragmentToken(), secondaryRectBounds,
- activityIntent, activityOptions, rule, windowingMode);
+ activityIntent, activityOptions, rule, windowingMode, splitAttributes);
if (isPlaceholder) {
// When placeholder is launched in split, we should keep the focus on the primary.
wct.requestFocusOnTaskFragment(primaryContainer.getTaskFragmentToken());
@@ -365,6 +374,8 @@
primaryRectBounds);
updateTaskFragmentWindowingModeIfRegistered(wct, primaryContainer, windowingMode);
updateTaskFragmentWindowingModeIfRegistered(wct, secondaryContainer, windowingMode);
+ updateAnimationParams(wct, primaryContainer.getTaskFragmentToken(), splitAttributes);
+ updateAnimationParams(wct, secondaryContainer.getTaskFragmentToken(), splitAttributes);
}
private void setAdjacentTaskFragments(@NonNull WindowContainerTransaction wct,
@@ -459,6 +470,24 @@
super.updateWindowingMode(wct, fragmentToken, windowingMode);
}
+ @Override
+ void updateAnimationParams(@NonNull WindowContainerTransaction wct,
+ @NonNull IBinder fragmentToken, @NonNull TaskFragmentAnimationParams animationParams) {
+ final TaskFragmentContainer container = mController.getContainer(fragmentToken);
+ if (container == null) {
+ throw new IllegalStateException("Setting animation params for a task fragment that is"
+ + " not registered with controller.");
+ }
+
+ if (container.areLastRequestedAnimationParamsEqual(animationParams)) {
+ // Return early if the animation params were already requested
+ return;
+ }
+
+ container.setLastRequestAnimationParams(animationParams);
+ super.updateAnimationParams(wct, fragmentToken, animationParams);
+ }
+
/**
* Expands the split container if the current split bounds are smaller than the Activity or
* Intent that is added to the container.
@@ -532,7 +561,7 @@
return sanitizeSplitAttributes(taskProperties, defaultSplitAttributes,
minDimensionsPair);
}
- final WindowLayoutInfo windowLayoutInfo = mController.mWindowLayoutComponent
+ final WindowLayoutInfo windowLayoutInfo = mWindowLayoutComponent
.getCurrentWindowLayoutInfo(taskProperties.getDisplayId(),
taskConfiguration.windowConfiguration);
final SplitAttributesCalculatorParams params = new SplitAttributesCalculatorParams(
@@ -814,7 +843,7 @@
final int displayId = taskProperties.getDisplayId();
final WindowConfiguration windowConfiguration = taskProperties.getConfiguration()
.windowConfiguration;
- final WindowLayoutInfo info = mController.mWindowLayoutComponent
+ final WindowLayoutInfo info = mWindowLayoutComponent
.getCurrentWindowLayoutInfo(displayId, windowConfiguration);
final List<DisplayFeature> displayFeatures = info.getDisplayFeatures();
if (displayFeatures.isEmpty()) {
diff --git a/libs/WindowManager/Jetpack/src/androidx/window/extensions/embedding/TaskFragmentContainer.java b/libs/WindowManager/Jetpack/src/androidx/window/extensions/embedding/TaskFragmentContainer.java
index 6bfdfe7..076856c 100644
--- a/libs/WindowManager/Jetpack/src/androidx/window/extensions/embedding/TaskFragmentContainer.java
+++ b/libs/WindowManager/Jetpack/src/androidx/window/extensions/embedding/TaskFragmentContainer.java
@@ -26,6 +26,7 @@
import android.os.Binder;
import android.os.IBinder;
import android.util.Size;
+import android.window.TaskFragmentAnimationParams;
import android.window.TaskFragmentInfo;
import android.window.WindowContainerTransaction;
@@ -108,6 +109,13 @@
private int mLastRequestedWindowingMode = WINDOWING_MODE_UNDEFINED;
/**
+ * TaskFragmentAnimationParams that was requested last via
+ * {@link android.window.WindowContainerTransaction}.
+ */
+ @NonNull
+ private TaskFragmentAnimationParams mLastAnimationParams = TaskFragmentAnimationParams.DEFAULT;
+
+ /**
* When the TaskFragment has appeared in server, but is empty, we should remove the TaskFragment
* if it is still empty after the timeout.
*/
@@ -560,6 +568,21 @@
mLastRequestedWindowingMode = windowingModes;
}
+ /**
+ * Checks if last requested {@link TaskFragmentAnimationParams} are equal to the provided value.
+ */
+ boolean areLastRequestedAnimationParamsEqual(
+ @NonNull TaskFragmentAnimationParams animationParams) {
+ return mLastAnimationParams.equals(animationParams);
+ }
+
+ /**
+ * Updates the last requested {@link TaskFragmentAnimationParams}.
+ */
+ void setLastRequestAnimationParams(@NonNull TaskFragmentAnimationParams animationParams) {
+ mLastAnimationParams = animationParams;
+ }
+
/** Gets the parent leaf Task id. */
int getTaskId() {
return mTaskContainer.getTaskId();
diff --git a/libs/WindowManager/Jetpack/src/androidx/window/extensions/layout/WindowLayoutComponentImpl.java b/libs/WindowManager/Jetpack/src/androidx/window/extensions/layout/WindowLayoutComponentImpl.java
index 84b2bfc..c9f8700 100644
--- a/libs/WindowManager/Jetpack/src/androidx/window/extensions/layout/WindowLayoutComponentImpl.java
+++ b/libs/WindowManager/Jetpack/src/androidx/window/extensions/layout/WindowLayoutComponentImpl.java
@@ -35,6 +35,8 @@
import android.os.Bundle;
import android.os.IBinder;
import android.util.ArrayMap;
+import android.view.WindowManager;
+import android.window.TaskFragmentOrganizer;
import androidx.annotation.GuardedBy;
import androidx.annotation.NonNull;
@@ -43,13 +45,13 @@
import androidx.window.common.CommonFoldingFeature;
import androidx.window.common.DeviceStateManagerFoldingFeatureProducer;
import androidx.window.common.EmptyLifecycleCallbacksAdapter;
-import androidx.window.common.RawFoldingFeatureProducer;
import androidx.window.util.DataProducer;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Map;
+import java.util.Objects;
import java.util.Set;
import java.util.function.Consumer;
@@ -80,13 +82,16 @@
private final Map<IBinder, ConfigurationChangeListener> mConfigurationChangeListeners =
new ArrayMap<>();
- public WindowLayoutComponentImpl(@NonNull Context context) {
+ private final TaskFragmentOrganizer mTaskFragmentOrganizer;
+
+ public WindowLayoutComponentImpl(@NonNull Context context,
+ @NonNull TaskFragmentOrganizer taskFragmentOrganizer,
+ @NonNull DeviceStateManagerFoldingFeatureProducer foldingFeatureProducer) {
((Application) context.getApplicationContext())
.registerActivityLifecycleCallbacks(new NotifyOnConfigurationChanged());
- RawFoldingFeatureProducer foldingFeatureProducer = new RawFoldingFeatureProducer(context);
- mFoldingFeatureProducer = new DeviceStateManagerFoldingFeatureProducer(context,
- foldingFeatureProducer);
+ mFoldingFeatureProducer = foldingFeatureProducer;
mFoldingFeatureProducer.addDataChangedCallback(this::onDisplayFeaturesChanged);
+ mTaskFragmentOrganizer = taskFragmentOrganizer;
}
/** Registers to listen to {@link CommonFoldingFeature} changes */
@@ -182,7 +187,7 @@
@GuardedBy("mLock")
private boolean isListeningForLayoutChanges(IBinder token) {
- for (Context context: getContextsListeningForLayoutChanges()) {
+ for (Context context : getContextsListeningForLayoutChanges()) {
if (token.equals(Context.getToken(context))) {
return true;
}
@@ -230,8 +235,9 @@
/**
* Translates the {@link DisplayFeature} into a {@link WindowLayoutInfo} when a
* valid state is found.
+ *
* @param context a proxy for the {@link android.view.Window} that contains the
- * {@link DisplayFeature}.
+ * {@link DisplayFeature}.
*/
private WindowLayoutInfo getWindowLayoutInfo(@NonNull @UiContext Context context,
List<CommonFoldingFeature> storedFeatures) {
@@ -243,7 +249,7 @@
* Gets the current {@link WindowLayoutInfo} computed with passed {@link WindowConfiguration}.
*
* @return current {@link WindowLayoutInfo} on the default display. Returns
- * empty {@link WindowLayoutInfo} on secondary displays.
+ * empty {@link WindowLayoutInfo} on secondary displays.
*/
@NonNull
public WindowLayoutInfo getCurrentWindowLayoutInfo(int displayId,
@@ -254,7 +260,7 @@
}
}
- /** @see #getWindowLayoutInfo(Context, List) */
+ /** @see #getWindowLayoutInfo(Context, List) */
private WindowLayoutInfo getWindowLayoutInfo(int displayId,
@NonNull WindowConfiguration windowConfiguration,
List<CommonFoldingFeature> storedFeatures) {
@@ -278,7 +284,8 @@
*
* @param context a proxy for the {@link android.view.Window} that contains the
* {@link DisplayFeature}.
- * are within the {@link android.view.Window} of the {@link Activity}
+ * @return a {@link List} of {@link DisplayFeature}s that are within the
+ * {@link android.view.Window} of the {@link Activity}
*/
private List<DisplayFeature> getDisplayFeatures(
@NonNull @UiContext Context context, List<CommonFoldingFeature> storedFeatures) {
@@ -317,8 +324,11 @@
}
/**
- * Checks whether display features should be reported for the activity.
+ * Calculates if the display features should be reported for the UI Context. The calculation
+ * uses the task information because that is accurate for Activities in ActivityEmbedding mode.
* TODO(b/238948678): Support reporting display features in all windowing modes.
+ *
+ * @return true if the display features should be reported for the UI Context, false otherwise.
*/
private boolean shouldReportDisplayFeatures(@NonNull @UiContext Context context) {
int displayId = context.getDisplay().getDisplayId();
@@ -337,7 +347,27 @@
// bounds in this case can't be computed correctly, so we should skip.
return false;
}
- windowingMode = taskConfig.windowConfiguration.getWindowingMode();
+ final Rect taskBounds = taskConfig.windowConfiguration.getBounds();
+ final WindowManager windowManager = Objects.requireNonNull(
+ context.getSystemService(WindowManager.class));
+ final Rect currentBounds = windowManager.getCurrentWindowMetrics().getBounds();
+ final Rect maxBounds = windowManager.getMaximumWindowMetrics().getBounds();
+ boolean isTaskExpanded = maxBounds.equals(taskBounds);
+ boolean isActivityExpanded = maxBounds.equals(currentBounds);
+ /*
+ * We need to proxy being in full screen because when a user enters PiP and exits PiP
+ * the task windowingMode will report multi-window/pinned until the transition is
+ * finished in WM Shell.
+ * maxBounds == taskWindowBounds is a proxy check to verify the window is full screen
+ * For tasks that are letterboxed, we use currentBounds == maxBounds to filter these
+ * out.
+ */
+ // TODO(b/262900133) remove currentBounds check when letterboxed apps report bounds.
+ // currently we don't want to report to letterboxed apps since they do not update the
+ // window bounds when the Activity is moved. An inaccurate fold will be reported so
+ // we skip.
+ return isTaskExpanded && (isActivityExpanded
+ || mTaskFragmentOrganizer.isActivityEmbedded(activityToken));
} else {
// TODO(b/242674941): use task windowing mode for window context that associates with
// activity.
@@ -390,6 +420,7 @@
}
@Override
- public void onLowMemory() {}
+ public void onLowMemory() {
+ }
}
}
diff --git a/libs/WindowManager/Jetpack/tests/unittest/src/androidx/window/extensions/embedding/SplitControllerTest.java b/libs/WindowManager/Jetpack/tests/unittest/src/androidx/window/extensions/embedding/SplitControllerTest.java
index 3cc31f9..81c3957 100644
--- a/libs/WindowManager/Jetpack/tests/unittest/src/androidx/window/extensions/embedding/SplitControllerTest.java
+++ b/libs/WindowManager/Jetpack/tests/unittest/src/androidx/window/extensions/embedding/SplitControllerTest.java
@@ -90,6 +90,7 @@
import androidx.test.core.app.ApplicationProvider;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.filters.SmallTest;
+import androidx.window.common.DeviceStateManagerFoldingFeatureProducer;
import androidx.window.extensions.layout.WindowLayoutComponentImpl;
import androidx.window.extensions.layout.WindowLayoutInfo;
@@ -142,7 +143,9 @@
MockitoAnnotations.initMocks(this);
doReturn(new WindowLayoutInfo(new ArrayList<>())).when(mWindowLayoutComponent)
.getCurrentWindowLayoutInfo(anyInt(), any());
- mSplitController = new SplitController(mWindowLayoutComponent);
+ DeviceStateManagerFoldingFeatureProducer producer =
+ mock(DeviceStateManagerFoldingFeatureProducer.class);
+ mSplitController = new SplitController(mWindowLayoutComponent, producer);
mSplitPresenter = mSplitController.mPresenter;
mSplitInfos = new ArrayList<>();
mEmbeddingCallback = splitInfos -> {
diff --git a/libs/WindowManager/Jetpack/tests/unittest/src/androidx/window/extensions/embedding/SplitPresenterTest.java b/libs/WindowManager/Jetpack/tests/unittest/src/androidx/window/extensions/embedding/SplitPresenterTest.java
index 6dae0a1..121e813 100644
--- a/libs/WindowManager/Jetpack/tests/unittest/src/androidx/window/extensions/embedding/SplitPresenterTest.java
+++ b/libs/WindowManager/Jetpack/tests/unittest/src/androidx/window/extensions/embedding/SplitPresenterTest.java
@@ -19,6 +19,7 @@
import static android.app.WindowConfiguration.WINDOWING_MODE_FULLSCREEN;
import static android.app.WindowConfiguration.WINDOWING_MODE_MULTI_WINDOW;
import static android.view.Display.DEFAULT_DISPLAY;
+import static android.window.TaskFragmentOperation.OP_TYPE_SET_ANIMATION_PARAMS;
import static androidx.window.extensions.embedding.EmbeddingTestUtils.DEFAULT_FINISH_PRIMARY_WITH_SECONDARY;
import static androidx.window.extensions.embedding.EmbeddingTestUtils.DEFAULT_FINISH_SECONDARY_WITH_PRIMARY;
@@ -60,17 +61,21 @@
import android.content.pm.ActivityInfo;
import android.content.res.Configuration;
import android.content.res.Resources;
+import android.graphics.Color;
import android.graphics.Rect;
import android.os.IBinder;
import android.platform.test.annotations.Presubmit;
import android.util.Pair;
import android.util.Size;
+import android.window.TaskFragmentAnimationParams;
import android.window.TaskFragmentInfo;
+import android.window.TaskFragmentOperation;
import android.window.WindowContainerTransaction;
import androidx.test.core.app.ApplicationProvider;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.filters.SmallTest;
+import androidx.window.common.DeviceStateManagerFoldingFeatureProducer;
import androidx.window.extensions.layout.WindowLayoutComponentImpl;
import androidx.window.extensions.layout.WindowLayoutInfo;
@@ -113,7 +118,9 @@
MockitoAnnotations.initMocks(this);
doReturn(new WindowLayoutInfo(new ArrayList<>())).when(mWindowLayoutComponent)
.getCurrentWindowLayoutInfo(anyInt(), any());
- mController = new SplitController(mWindowLayoutComponent);
+ DeviceStateManagerFoldingFeatureProducer producer =
+ mock(DeviceStateManagerFoldingFeatureProducer.class);
+ mController = new SplitController(mWindowLayoutComponent, producer);
mPresenter = mController.mPresenter;
spyOn(mController);
spyOn(mPresenter);
@@ -163,7 +170,38 @@
WINDOWING_MODE_MULTI_WINDOW);
verify(mTransaction, never()).setWindowingMode(any(), anyInt());
+ }
+ @Test
+ public void testUpdateAnimationParams() {
+ final TaskFragmentContainer container = mController.newContainer(mActivity, TASK_ID);
+
+ // Verify the default.
+ assertTrue(container.areLastRequestedAnimationParamsEqual(
+ TaskFragmentAnimationParams.DEFAULT));
+
+ final int bgColor = Color.GREEN;
+ final TaskFragmentAnimationParams animationParams =
+ new TaskFragmentAnimationParams.Builder()
+ .setAnimationBackgroundColor(bgColor)
+ .build();
+ mPresenter.updateAnimationParams(mTransaction, container.getTaskFragmentToken(),
+ animationParams);
+
+ final TaskFragmentOperation expectedOperation = new TaskFragmentOperation.Builder(
+ OP_TYPE_SET_ANIMATION_PARAMS)
+ .setAnimationParams(animationParams)
+ .build();
+ verify(mTransaction).setTaskFragmentOperation(container.getTaskFragmentToken(),
+ expectedOperation);
+ assertTrue(container.areLastRequestedAnimationParamsEqual(animationParams));
+
+ // No request to set the same animation params.
+ clearInvocations(mTransaction);
+ mPresenter.updateAnimationParams(mTransaction, container.getTaskFragmentToken(),
+ animationParams);
+
+ verify(mTransaction, never()).setTaskFragmentOperation(any(), any());
}
@Test
diff --git a/libs/WindowManager/Jetpack/tests/unittest/src/androidx/window/extensions/embedding/TaskFragmentContainerTest.java b/libs/WindowManager/Jetpack/tests/unittest/src/androidx/window/extensions/embedding/TaskFragmentContainerTest.java
index 9877236..7d9d8b0 100644
--- a/libs/WindowManager/Jetpack/tests/unittest/src/androidx/window/extensions/embedding/TaskFragmentContainerTest.java
+++ b/libs/WindowManager/Jetpack/tests/unittest/src/androidx/window/extensions/embedding/TaskFragmentContainerTest.java
@@ -45,6 +45,8 @@
import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.filters.SmallTest;
+import androidx.window.common.DeviceStateManagerFoldingFeatureProducer;
+import androidx.window.extensions.layout.WindowLayoutComponentImpl;
import com.google.android.collect.Lists;
@@ -82,7 +84,10 @@
@Before
public void setup() {
MockitoAnnotations.initMocks(this);
- mController = new SplitController();
+ DeviceStateManagerFoldingFeatureProducer producer =
+ mock(DeviceStateManagerFoldingFeatureProducer.class);
+ WindowLayoutComponentImpl component = mock(WindowLayoutComponentImpl.class);
+ mController = new SplitController(component, producer);
spyOn(mController);
mActivity = createMockActivity();
mIntent = new Intent();
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/TaskView.java b/libs/WindowManager/Shell/src/com/android/wm/shell/TaskView.java
index 477bc95..95a89b1 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/TaskView.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/TaskView.java
@@ -224,16 +224,6 @@
mObscuredTouchRegion = obscuredRegion;
}
- private void onLocationChanged(WindowContainerTransaction wct) {
- // Update based on the screen bounds
- getBoundsOnScreen(mTmpRect);
- getRootView().getBoundsOnScreen(mTmpRootRect);
- if (!mTmpRootRect.contains(mTmpRect)) {
- mTmpRect.offsetTo(0, 0);
- }
- wct.setBounds(mTaskToken, mTmpRect);
- }
-
/**
* Call when view position or size has changed. Do not call when animating.
*/
@@ -246,10 +236,15 @@
if (isUsingShellTransitions() && mTaskViewTransitions.hasPending()) return;
WindowContainerTransaction wct = new WindowContainerTransaction();
- onLocationChanged(wct);
+ updateWindowBounds(wct);
mSyncQueue.queue(wct);
}
+ private void updateWindowBounds(WindowContainerTransaction wct) {
+ getBoundsOnScreen(mTmpRect);
+ wct.setBounds(mTaskToken, mTmpRect);
+ }
+
/**
* Release this container if it is initialized.
*/
@@ -573,7 +568,7 @@
.apply();
// TODO: determine if this is really necessary or not
- onLocationChanged(wct);
+ updateWindowBounds(wct);
} else {
// The surface has already been destroyed before the task has appeared,
// so go ahead and hide the task entirely
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 266cf29..7f7af93 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
@@ -274,29 +274,30 @@
}
if (hasImeSourceControl) {
- final Point lastSurfacePosition = mImeSourceControl != null
- ? mImeSourceControl.getSurfacePosition() : null;
- final boolean positionChanged =
- !imeSourceControl.getSurfacePosition().equals(lastSurfacePosition);
- final boolean leashChanged =
- !haveSameLeash(mImeSourceControl, imeSourceControl);
if (mAnimation != null) {
+ final Point lastSurfacePosition = hadImeSourceControl
+ ? mImeSourceControl.getSurfacePosition() : null;
+ final boolean positionChanged =
+ !imeSourceControl.getSurfacePosition().equals(lastSurfacePosition);
if (positionChanged) {
startAnimation(mImeShowing, true /* forceRestart */);
}
} else {
- if (leashChanged) {
+ if (!haveSameLeash(mImeSourceControl, imeSourceControl)) {
applyVisibilityToLeash(imeSourceControl);
}
if (!mImeShowing) {
removeImeSurface();
}
- if (mImeSourceControl != null) {
- mImeSourceControl.release(SurfaceControl::release);
- }
}
- mImeSourceControl = imeSourceControl;
+ } else if (mAnimation != null) {
+ mAnimation.cancel();
}
+
+ if (hadImeSourceControl && mImeSourceControl != imeSourceControl) {
+ mImeSourceControl.release(SurfaceControl::release);
+ }
+ mImeSourceControl = imeSourceControl;
}
private void applyVisibilityToLeash(InsetsSourceControl imeSourceControl) {
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/freeform/FreeformTaskListener.java b/libs/WindowManager/Shell/src/com/android/wm/shell/freeform/FreeformTaskListener.java
index 793bad8..48487bc 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/freeform/FreeformTaskListener.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/freeform/FreeformTaskListener.java
@@ -129,11 +129,11 @@
@Override
public void onTaskInfoChanged(RunningTaskInfo taskInfo) {
final State state = mTasks.get(taskInfo.taskId);
- state.mTaskInfo = taskInfo;
+
ProtoLog.v(ShellProtoLogGroup.WM_SHELL_TASK_ORG, "Freeform Task Info Changed: #%d",
taskInfo.taskId);
- mWindowDecorationViewModel.onTaskInfoChanged(state.mTaskInfo);
-
+ mWindowDecorationViewModel.onTaskInfoChanged(taskInfo);
+ state.mTaskInfo = taskInfo;
if (DesktopModeStatus.isAnyEnabled()) {
mDesktopModeTaskRepository.ifPresent(repository -> {
if (taskInfo.isVisible) {
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/fullscreen/FullscreenTaskListener.java b/libs/WindowManager/Shell/src/com/android/wm/shell/fullscreen/FullscreenTaskListener.java
index 6623f5c..b9caf62 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/fullscreen/FullscreenTaskListener.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/fullscreen/FullscreenTaskListener.java
@@ -123,10 +123,11 @@
public void onTaskInfoChanged(RunningTaskInfo taskInfo) {
final State state = mTasks.get(taskInfo.taskId);
final Point oldPositionInParent = state.mTaskInfo.positionInParent;
- state.mTaskInfo = taskInfo;
+
if (mWindowDecorViewModelOptional.isPresent()) {
- mWindowDecorViewModelOptional.get().onTaskInfoChanged(state.mTaskInfo);
+ mWindowDecorViewModelOptional.get().onTaskInfoChanged(taskInfo);
}
+ state.mTaskInfo = taskInfo;
if (Transitions.ENABLE_SHELL_TRANSITIONS) return;
updateRecentsForVisibleFullscreenTask(taskInfo);
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 b430157..00aab67 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
@@ -153,12 +153,11 @@
@Override
public void onTaskInfoChanged(RunningTaskInfo taskInfo) {
final DesktopModeWindowDecoration decoration = mWindowDecorByTaskId.get(taskInfo.taskId);
-
if (decoration == null) return;
+ final RunningTaskInfo oldTaskInfo = decoration.mTaskInfo;
- int oldDisplayId = decoration.mDisplay.getDisplayId();
- if (taskInfo.displayId != oldDisplayId) {
- removeTaskFromEventReceiver(oldDisplayId);
+ if (taskInfo.displayId != oldTaskInfo.displayId) {
+ removeTaskFromEventReceiver(oldTaskInfo.displayId);
incrementEventReceiverTasks(taskInfo.displayId);
}
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 9967e5f..262ee72 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
@@ -22,6 +22,8 @@
import static android.view.WindowInsets.Type.ime;
import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.mock;
@@ -131,6 +133,15 @@
verify(mT).show(any());
}
+ @Test
+ public void insetsControlChanged_updateImeSourceControl() {
+ mPerDisplay.insetsControlChanged(insetsStateWithIme(false), insetsSourceControl());
+ assertNotNull(mPerDisplay.mImeSourceControl);
+
+ mPerDisplay.insetsControlChanged(new InsetsState(), new InsetsSourceControl[]{});
+ assertNull(mPerDisplay.mImeSourceControl);
+ }
+
private InsetsSourceControl[] insetsSourceControl() {
return new InsetsSourceControl[]{
new InsetsSourceControl(
diff --git a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/unfold/UnfoldAnimationControllerTest.java b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/unfold/UnfoldAnimationControllerTest.java
index 81eefe2..8196c5a 100644
--- a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/unfold/UnfoldAnimationControllerTest.java
+++ b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/unfold/UnfoldAnimationControllerTest.java
@@ -224,16 +224,18 @@
mUnfoldAnimationController.onTaskAppeared(taskInfo, mLeash);
assertThat(mTaskAnimator1.mResetTasks).doesNotContain(taskInfo.taskId);
+ mUnfoldAnimationController.onStateChangeStarted();
mUnfoldAnimationController.onTaskVanished(taskInfo);
+ mUnfoldAnimationController.onStateChangeFinished();
assertThat(mTaskAnimator1.mResetTasks).contains(taskInfo.taskId);
}
@Test
- public void testApplicablePinnedTaskDisappeared_doesNotResetSurface() {
- mTaskAnimator1.setTaskMatcher((info) -> info.getWindowingMode() == 2);
+ public void testApplicableTaskDisappeared_noStateChange_doesNotResetSurface() {
+ mTaskAnimator1.setTaskMatcher((info) -> info.getWindowingMode() == 0);
RunningTaskInfo taskInfo = new TestRunningTaskInfoBuilder()
- .setWindowingMode(2).build();
+ .setWindowingMode(0).build();
mUnfoldAnimationController.onTaskAppeared(taskInfo, mLeash);
assertThat(mTaskAnimator1.mResetTasks).doesNotContain(taskInfo.taskId);
@@ -249,7 +251,9 @@
.setWindowingMode(0).build();
mUnfoldAnimationController.onTaskAppeared(taskInfo, mLeash);
+ mUnfoldAnimationController.onStateChangeStarted();
mUnfoldAnimationController.onTaskVanished(taskInfo);
+ mUnfoldAnimationController.onStateChangeFinished();
assertThat(mTaskAnimator1.mResetTasks).doesNotContain(taskInfo.taskId);
}
diff --git a/media/java/android/media/ImageWriter.java b/media/java/android/media/ImageWriter.java
index 308bb3e..766e2a9 100644
--- a/media/java/android/media/ImageWriter.java
+++ b/media/java/android/media/ImageWriter.java
@@ -452,17 +452,15 @@
* @see Image#close
*/
public Image dequeueInputImage() {
- synchronized (mCloseLock) {
- if (mDequeuedImages.size() >= mMaxImages) {
- throw new IllegalStateException(
- "Already dequeued max number of Images " + mMaxImages);
- }
- WriterSurfaceImage newImage = new WriterSurfaceImage(this);
- nativeDequeueInputImage(mNativeContext, newImage);
- mDequeuedImages.add(newImage);
- newImage.mIsImageValid = true;
- return newImage;
+ if (mDequeuedImages.size() >= mMaxImages) {
+ throw new IllegalStateException(
+ "Already dequeued max number of Images " + mMaxImages);
}
+ WriterSurfaceImage newImage = new WriterSurfaceImage(this);
+ nativeDequeueInputImage(mNativeContext, newImage);
+ mDequeuedImages.add(newImage);
+ newImage.mIsImageValid = true;
+ return newImage;
}
/**
@@ -521,52 +519,50 @@
throw new IllegalArgumentException("image shouldn't be null");
}
- synchronized (mCloseLock) {
- boolean ownedByMe = isImageOwnedByMe(image);
- if (ownedByMe && !(((WriterSurfaceImage) image).mIsImageValid)) {
- throw new IllegalStateException("Image from ImageWriter is invalid");
+ boolean ownedByMe = isImageOwnedByMe(image);
+ if (ownedByMe && !(((WriterSurfaceImage) image).mIsImageValid)) {
+ throw new IllegalStateException("Image from ImageWriter is invalid");
+ }
+
+ // For images from other components that have non-null owner, need to detach first,
+ // then attach. Images without owners must already be attachable.
+ if (!ownedByMe) {
+ if ((image.getOwner() instanceof ImageReader)) {
+ ImageReader prevOwner = (ImageReader) image.getOwner();
+
+ prevOwner.detachImage(image);
+ } else if (image.getOwner() != null) {
+ throw new IllegalArgumentException(
+ "Only images from ImageReader can be queued to"
+ + " ImageWriter, other image source is not supported yet!");
}
- // For images from other components that have non-null owner, need to detach first,
- // then attach. Images without owners must already be attachable.
- if (!ownedByMe) {
- if ((image.getOwner() instanceof ImageReader)) {
- ImageReader prevOwner = (ImageReader) image.getOwner();
+ attachAndQueueInputImage(image);
+ // This clears the native reference held by the original owner.
+ // When this Image is detached later by this ImageWriter, the
+ // native memory won't be leaked.
+ image.close();
+ return;
+ }
- prevOwner.detachImage(image);
- } else if (image.getOwner() != null) {
- throw new IllegalArgumentException(
- "Only images from ImageReader can be queued to"
- + " ImageWriter, other image source is not supported yet!");
- }
+ Rect crop = image.getCropRect();
+ nativeQueueInputImage(mNativeContext, image, image.getTimestamp(), image.getDataSpace(),
+ crop.left, crop.top, crop.right, crop.bottom, image.getTransform(),
+ image.getScalingMode());
- attachAndQueueInputImage(image);
- // This clears the native reference held by the original owner.
- // When this Image is detached later by this ImageWriter, the
- // native memory won't be leaked.
- image.close();
- return;
- }
-
- Rect crop = image.getCropRect();
- nativeQueueInputImage(mNativeContext, image, image.getTimestamp(), image.getDataSpace(),
- crop.left, crop.top, crop.right, crop.bottom, image.getTransform(),
- image.getScalingMode());
-
- /**
- * Only remove and cleanup the Images that are owned by this
- * ImageWriter. Images detached from other owners are only temporarily
- * owned by this ImageWriter and will be detached immediately after they
- * are released by downstream consumers, so there is no need to keep
- * track of them in mDequeuedImages.
- */
- if (ownedByMe) {
- mDequeuedImages.remove(image);
- // Do not call close here, as close is essentially cancel image.
- WriterSurfaceImage wi = (WriterSurfaceImage) image;
- wi.clearSurfacePlanes();
- wi.mIsImageValid = false;
- }
+ /**
+ * Only remove and cleanup the Images that are owned by this
+ * ImageWriter. Images detached from other owners are only temporarily
+ * owned by this ImageWriter and will be detached immediately after they
+ * are released by downstream consumers, so there is no need to keep
+ * track of them in mDequeuedImages.
+ */
+ if (ownedByMe) {
+ mDequeuedImages.remove(image);
+ // Do not call close here, as close is essentially cancel image.
+ WriterSurfaceImage wi = (WriterSurfaceImage) image;
+ wi.clearSurfacePlanes();
+ wi.mIsImageValid = false;
}
}
@@ -702,11 +698,11 @@
*/
@Override
public void close() {
+ setOnImageReleasedListener(null, null);
synchronized (mCloseLock) {
if (!mIsWriterValid) {
return;
}
- setOnImageReleasedListener(null, null);
for (Image image : mDequeuedImages) {
image.close();
}
@@ -836,14 +832,12 @@
}
final Handler handler;
- final boolean isWriterValid;
synchronized (iw.mListenerLock) {
handler = iw.mListenerHandler;
}
- synchronized (iw.mCloseLock) {
- isWriterValid = iw.mIsWriterValid;
- }
- if (handler != null && isWriterValid) {
+
+ if (handler != null) {
+ // The ListenerHandler will take care of ensuring that the parent ImageWriter is valid
handler.sendEmptyMessage(0);
}
}
diff --git a/packages/BackupEncryption/test/robolectric/src/com/android/server/backup/encryption/tasks/EncryptedBackupTaskTest.java b/packages/BackupEncryption/test/robolectric/src/com/android/server/backup/encryption/tasks/EncryptedBackupTaskTest.java
index 23d6e34..f6914ef 100644
--- a/packages/BackupEncryption/test/robolectric/src/com/android/server/backup/encryption/tasks/EncryptedBackupTaskTest.java
+++ b/packages/BackupEncryption/test/robolectric/src/com/android/server/backup/encryption/tasks/EncryptedBackupTaskTest.java
@@ -22,8 +22,8 @@
import static com.google.common.truth.Truth.assertThat;
-import static org.mockito.Mockito.any;
-import static org.mockito.Mockito.eq;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.Matchers.eq;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
diff --git a/packages/BackupEncryption/test/robolectric/src/com/android/server/backup/encryption/tasks/EncryptedFullBackupTaskTest.java b/packages/BackupEncryption/test/robolectric/src/com/android/server/backup/encryption/tasks/EncryptedFullBackupTaskTest.java
index bfc5d0d..096b2da 100644
--- a/packages/BackupEncryption/test/robolectric/src/com/android/server/backup/encryption/tasks/EncryptedFullBackupTaskTest.java
+++ b/packages/BackupEncryption/test/robolectric/src/com/android/server/backup/encryption/tasks/EncryptedFullBackupTaskTest.java
@@ -18,9 +18,9 @@
import static com.google.common.truth.Truth.assertThat;
-import static org.mockito.Mockito.any;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.Matchers.eq;
import static org.mockito.Mockito.doAnswer;
-import static org.mockito.Mockito.eq;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import static org.testng.Assert.assertThrows;
diff --git a/packages/BackupEncryption/test/robolectric/src/com/android/server/backup/encryption/tasks/EncryptedKvBackupTaskTest.java b/packages/BackupEncryption/test/robolectric/src/com/android/server/backup/encryption/tasks/EncryptedKvBackupTaskTest.java
index 222b882..fa4fef5 100644
--- a/packages/BackupEncryption/test/robolectric/src/com/android/server/backup/encryption/tasks/EncryptedKvBackupTaskTest.java
+++ b/packages/BackupEncryption/test/robolectric/src/com/android/server/backup/encryption/tasks/EncryptedKvBackupTaskTest.java
@@ -19,8 +19,8 @@
import static com.google.common.truth.Truth.assertThat;
import static com.google.common.truth.Truth.assertWithMessage;
-import static org.mockito.Mockito.any;
-import static org.mockito.Mockito.eq;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.Matchers.eq;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import static org.testng.Assert.assertFalse;
@@ -41,6 +41,13 @@
import com.android.server.backup.encryption.protos.nano.WrappedKeyProto;
import com.android.server.backup.testing.CryptoTestUtils;
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.Map;
+import java.util.Map.Entry;
+
+import javax.crypto.SecretKey;
+
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
@@ -52,14 +59,6 @@
import org.mockito.MockitoAnnotations;
import org.robolectric.RobolectricTestRunner;
-import java.io.IOException;
-import java.util.Arrays;
-import java.util.Map;
-import java.util.Map.Entry;
-
-import javax.crypto.SecretKey;
-
-
@RunWith(RobolectricTestRunner.class)
public class EncryptedKvBackupTaskTest {
private static final boolean INCREMENTAL = true;
diff --git a/packages/SettingsLib/res/values-eu/arrays.xml b/packages/SettingsLib/res/values-eu/arrays.xml
index 9c12e95..d15712a 100644
--- a/packages/SettingsLib/res/values-eu/arrays.xml
+++ b/packages/SettingsLib/res/values-eu/arrays.xml
@@ -267,7 +267,7 @@
<item msgid="3358668781763928157">"Kargatzen"</item>
<item msgid="7804797564616858506">"MTP (multimedia-edukia transferitzeko protokoloa)"</item>
<item msgid="910925519184248772">"PTP (irudiak transferitzeko protokoloa)"</item>
- <item msgid="3825132913289380004">"RNDIS (USB bidezko Ethernet konexioa)"</item>
+ <item msgid="3825132913289380004">"RNDIS (USB bidezko Ethernet-konexioa)"</item>
<item msgid="8828567335701536560">"Audio-iturburua"</item>
<item msgid="8688681727755534982">"MIDI"</item>
</string-array>
diff --git a/packages/SettingsLib/res/values-zh-rTW/strings.xml b/packages/SettingsLib/res/values-zh-rTW/strings.xml
index 47629c7..f557517 100644
--- a/packages/SettingsLib/res/values-zh-rTW/strings.xml
+++ b/packages/SettingsLib/res/values-zh-rTW/strings.xml
@@ -259,7 +259,7 @@
<string name="adb_wireless_verifying_qrcode_text" msgid="6123192424916029207">"正在配對裝置…"</string>
<string name="adb_qrcode_pairing_device_failed_msg" msgid="6936292092592914132">"無法配對裝置。可能是QR 圖碼錯誤,或是裝置未連上相同的網路。"</string>
<string name="adb_wireless_ip_addr_preference_title" msgid="8335132107715311730">"IP 位址和通訊埠"</string>
- <string name="adb_wireless_qrcode_pairing_title" msgid="1906409667944674707">"掃描 QR 圖碼"</string>
+ <string name="adb_wireless_qrcode_pairing_title" msgid="1906409667944674707">"掃描 QR code"</string>
<string name="adb_wireless_qrcode_pairing_description" msgid="6014121407143607851">"掃描 QR 圖碼即可透過 Wi-Fi 配對裝置"</string>
<string name="adb_wireless_no_network_msg" msgid="2365795244718494658">"請連上 Wi-Fi 網路"</string>
<string name="keywords_adb_wireless" msgid="6507505581882171240">"ADB, 偵錯, 開發"</string>
diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDeviceManager.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDeviceManager.java
index 6bc1160..2f821d5 100644
--- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDeviceManager.java
+++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDeviceManager.java
@@ -383,7 +383,10 @@
Log.d(TAG, "Bond " + device.getAnonymizedAddress() + " by CSIP");
mOngoingSetMemberPair = device;
syncConfigFromMainDevice(device, groupId);
- device.createBond(BluetoothDevice.TRANSPORT_LE);
+ if (!device.createBond(BluetoothDevice.TRANSPORT_LE)) {
+ Log.d(TAG, "Bonding could not be started");
+ mOngoingSetMemberPair = null;
+ }
}
private void syncConfigFromMainDevice(BluetoothDevice device, int groupId) {
diff --git a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/applications/ApplicationsStateRoboTest.java b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/applications/ApplicationsStateRoboTest.java
index fc2bf0a..1f2297b 100644
--- a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/applications/ApplicationsStateRoboTest.java
+++ b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/applications/ApplicationsStateRoboTest.java
@@ -21,10 +21,10 @@
import static com.google.common.truth.Truth.assertThat;
import static org.mockito.ArgumentMatchers.eq;
-import static org.mockito.Mockito.any;
-import static org.mockito.Mockito.anyInt;
-import static org.mockito.Mockito.anyLong;
-import static org.mockito.Mockito.anyString;
+import static org.mockito.Matchers.any;
+import static org.mockito.Matchers.anyInt;
+import static org.mockito.Matchers.anyLong;
+import static org.mockito.Matchers.anyString;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.spy;
diff --git a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/net/DataUsageUtilsTest.java b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/net/DataUsageUtilsTest.java
index 508dffc..95f7ef4 100644
--- a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/net/DataUsageUtilsTest.java
+++ b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/net/DataUsageUtilsTest.java
@@ -18,7 +18,7 @@
import static com.google.common.truth.Truth.assertThat;
-import static org.mockito.Mockito.anyInt;
+import static org.mockito.Matchers.anyInt;
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.when;
diff --git a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/users/EditUserInfoControllerTest.java b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/users/EditUserInfoControllerTest.java
index cf07c6b..f28572f 100644
--- a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/users/EditUserInfoControllerTest.java
+++ b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/users/EditUserInfoControllerTest.java
@@ -22,7 +22,7 @@
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.verifyNoInteractions;
+import static org.mockito.Mockito.verifyZeroInteractions;
import static org.mockito.Mockito.when;
import android.app.Activity;
@@ -143,7 +143,7 @@
dialog.show();
dialog.cancel();
- verifyNoInteractions(successCallback);
+ verifyZeroInteractions(successCallback);
verify(cancelCallback, times(1))
.run();
}
@@ -159,7 +159,7 @@
dialog.show();
dialog.getButton(Dialog.BUTTON_NEGATIVE).performClick();
- verifyNoInteractions(successCallback);
+ verifyZeroInteractions(successCallback);
verify(cancelCallback, times(1))
.run();
}
@@ -180,7 +180,7 @@
verify(successCallback, times(1))
.accept("test", oldUserIcon);
- verifyNoInteractions(cancelCallback);
+ verifyZeroInteractions(cancelCallback);
}
@Test
@@ -198,7 +198,7 @@
verify(successCallback, times(1))
.accept("test", null);
- verifyNoInteractions(cancelCallback);
+ verifyZeroInteractions(cancelCallback);
}
@Test
@@ -219,7 +219,7 @@
verify(successCallback, times(1))
.accept(expectedNewName, mCurrentIcon);
- verifyNoInteractions(cancelCallback);
+ verifyZeroInteractions(cancelCallback);
}
@Test
@@ -238,7 +238,7 @@
verify(successCallback, times(1))
.accept("test", newPhoto);
- verifyNoInteractions(cancelCallback);
+ verifyZeroInteractions(cancelCallback);
}
@Test
@@ -257,7 +257,7 @@
verify(successCallback, times(1))
.accept("test", newPhoto);
- verifyNoInteractions(cancelCallback);
+ verifyZeroInteractions(cancelCallback);
}
@Test
diff --git a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/widget/UpdatableListPreferenceDialogFragmentTest.java b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/widget/UpdatableListPreferenceDialogFragmentTest.java
index ca0aa0d..0b3495d 100644
--- a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/widget/UpdatableListPreferenceDialogFragmentTest.java
+++ b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/widget/UpdatableListPreferenceDialogFragmentTest.java
@@ -56,7 +56,7 @@
mUpdatableListPrefDlgFragment = spy(UpdatableListPreferenceDialogFragment
.newInstance(KEY, MetricsProto.MetricsEvent.DIALOG_SWITCH_A2DP_DEVICES));
- mEntries = new ArrayList<>();
+ mEntries = spy(new ArrayList<>());
mUpdatableListPrefDlgFragment.setEntries(mEntries);
mUpdatableListPrefDlgFragment
.setMetricsCategory(mUpdatableListPrefDlgFragment.getArguments());
diff --git a/packages/SystemUI/animation/src/com/android/systemui/surfaceeffects/turbulencenoise/TurbulenceNoiseAnimationConfig.kt b/packages/SystemUI/animation/src/com/android/systemui/surfaceeffects/turbulencenoise/TurbulenceNoiseAnimationConfig.kt
index 5ac3aad7..6715951 100644
--- a/packages/SystemUI/animation/src/com/android/systemui/surfaceeffects/turbulencenoise/TurbulenceNoiseAnimationConfig.kt
+++ b/packages/SystemUI/animation/src/com/android/systemui/surfaceeffects/turbulencenoise/TurbulenceNoiseAnimationConfig.kt
@@ -49,13 +49,16 @@
val opacity: Int = DEFAULT_OPACITY,
val width: Float = 0f,
val height: Float = 0f,
- val duration: Float = DEFAULT_NOISE_DURATION_IN_MILLIS,
+ val maxDuration: Float = DEFAULT_MAX_DURATION_IN_MILLIS,
+ val easeInDuration: Float = DEFAULT_EASING_DURATION_IN_MILLIS,
+ val easeOutDuration: Float = DEFAULT_EASING_DURATION_IN_MILLIS,
val pixelDensity: Float = 1f,
val blendMode: BlendMode = DEFAULT_BLEND_MODE,
val onAnimationEnd: Runnable? = null
) {
companion object {
- const val DEFAULT_NOISE_DURATION_IN_MILLIS = 7500F
+ const val DEFAULT_MAX_DURATION_IN_MILLIS = 7500f
+ const val DEFAULT_EASING_DURATION_IN_MILLIS = 750f
const val DEFAULT_LUMINOSITY_MULTIPLIER = 1f
const val DEFAULT_NOISE_GRID_COUNT = 1.2f
const val DEFAULT_NOISE_SPEED_Z = 0.3f
diff --git a/packages/SystemUI/animation/src/com/android/systemui/surfaceeffects/turbulencenoise/TurbulenceNoiseController.kt b/packages/SystemUI/animation/src/com/android/systemui/surfaceeffects/turbulencenoise/TurbulenceNoiseController.kt
index 4c7e5f4..b8f4b27 100644
--- a/packages/SystemUI/animation/src/com/android/systemui/surfaceeffects/turbulencenoise/TurbulenceNoiseController.kt
+++ b/packages/SystemUI/animation/src/com/android/systemui/surfaceeffects/turbulencenoise/TurbulenceNoiseController.kt
@@ -15,16 +15,106 @@
*/
package com.android.systemui.surfaceeffects.turbulencenoise
-/** A controller that plays [TurbulenceNoiseView]. */
+import android.view.View
+import androidx.annotation.VisibleForTesting
+import java.util.Random
+
+/** Plays [TurbulenceNoiseView] in ease-in, main (no easing), and ease-out order. */
class TurbulenceNoiseController(private val turbulenceNoiseView: TurbulenceNoiseView) {
+
+ companion object {
+ /**
+ * States of the turbulence noise animation.
+ *
+ * <p>The state is designed to be follow the order below: [AnimationState.EASE_IN],
+ * [AnimationState.MAIN], [AnimationState.EASE_OUT].
+ */
+ enum class AnimationState {
+ EASE_IN,
+ MAIN,
+ EASE_OUT,
+ NOT_PLAYING
+ }
+ }
+
+ private val random = Random()
+
+ /** Current state of the animation. */
+ @VisibleForTesting
+ var state: AnimationState = AnimationState.NOT_PLAYING
+ set(value) {
+ field = value
+ if (state == AnimationState.NOT_PLAYING) {
+ turbulenceNoiseView.visibility = View.INVISIBLE
+ turbulenceNoiseView.clearConfig()
+ } else {
+ turbulenceNoiseView.visibility = View.VISIBLE
+ }
+ }
+
+ init {
+ turbulenceNoiseView.visibility = View.INVISIBLE
+ }
+
/** Updates the color of the noise. */
fun updateNoiseColor(color: Int) {
+ if (state == AnimationState.NOT_PLAYING) {
+ return
+ }
turbulenceNoiseView.updateColor(color)
}
- // TODO: add cancel and/ or pause once design requirements become clear.
- /** Plays [TurbulenceNoiseView] with the given config. */
- fun play(turbulenceNoiseAnimationConfig: TurbulenceNoiseAnimationConfig) {
- turbulenceNoiseView.play(turbulenceNoiseAnimationConfig)
+ /**
+ * Plays [TurbulenceNoiseView] with the given config.
+ *
+ * <p>It plays ease-in, main, and ease-out animations in sequence.
+ */
+ fun play(config: TurbulenceNoiseAnimationConfig) {
+ if (state != AnimationState.NOT_PLAYING) {
+ return // Ignore if any of the animation is playing.
+ }
+
+ turbulenceNoiseView.applyConfig(config)
+ playEaseInAnimation()
+ }
+
+ // TODO(b/237282226): Support force finish.
+ /** Finishes the main animation, which triggers the ease-out animation. */
+ fun finish() {
+ if (state == AnimationState.MAIN) {
+ turbulenceNoiseView.finish(nextAnimation = this::playEaseOutAnimation)
+ }
+ }
+
+ private fun playEaseInAnimation() {
+ if (state != AnimationState.NOT_PLAYING) {
+ return
+ }
+ state = AnimationState.EASE_IN
+
+ // Add offset to avoid repetitive noise.
+ turbulenceNoiseView.playEaseIn(
+ offsetX = random.nextFloat(),
+ offsetY = random.nextFloat(),
+ this::playMainAnimation
+ )
+ }
+
+ private fun playMainAnimation() {
+ if (state != AnimationState.EASE_IN) {
+ return
+ }
+ state = AnimationState.MAIN
+
+ turbulenceNoiseView.play(this::playEaseOutAnimation)
+ }
+
+ private fun playEaseOutAnimation() {
+ if (state != AnimationState.MAIN) {
+ return
+ }
+ state = AnimationState.EASE_OUT
+
+ turbulenceNoiseView.playEaseOut(onAnimationEnd = { state = AnimationState.NOT_PLAYING })
}
}
diff --git a/packages/SystemUI/animation/src/com/android/systemui/surfaceeffects/turbulencenoise/TurbulenceNoiseShader.kt b/packages/SystemUI/animation/src/com/android/systemui/surfaceeffects/turbulencenoise/TurbulenceNoiseShader.kt
index 19c114d..7456c43 100644
--- a/packages/SystemUI/animation/src/com/android/systemui/surfaceeffects/turbulencenoise/TurbulenceNoiseShader.kt
+++ b/packages/SystemUI/animation/src/com/android/systemui/surfaceeffects/turbulencenoise/TurbulenceNoiseShader.kt
@@ -114,8 +114,19 @@
setFloatUniform("in_aspectRatio", width / max(height, 0.001f))
}
- /** Sets noise move speed in x, y, and z direction. */
+ /** Current noise movements in x, y, and z axes. */
+ var noiseOffsetX: Float = 0f
+ private set
+ var noiseOffsetY: Float = 0f
+ private set
+ var noiseOffsetZ: Float = 0f
+ private set
+
+ /** Sets noise move offset in x, y, and z direction. */
fun setNoiseMove(x: Float, y: Float, z: Float) {
- setFloatUniform("in_noiseMove", x, y, z)
+ noiseOffsetX = x
+ noiseOffsetY = y
+ noiseOffsetZ = z
+ setFloatUniform("in_noiseMove", noiseOffsetX, noiseOffsetY, noiseOffsetZ)
}
}
diff --git a/packages/SystemUI/animation/src/com/android/systemui/surfaceeffects/turbulencenoise/TurbulenceNoiseView.kt b/packages/SystemUI/animation/src/com/android/systemui/surfaceeffects/turbulencenoise/TurbulenceNoiseView.kt
index 68712c6..e1e515d 100644
--- a/packages/SystemUI/animation/src/com/android/systemui/surfaceeffects/turbulencenoise/TurbulenceNoiseView.kt
+++ b/packages/SystemUI/animation/src/com/android/systemui/surfaceeffects/turbulencenoise/TurbulenceNoiseView.kt
@@ -25,38 +25,29 @@
import android.view.View
import androidx.annotation.VisibleForTesting
import androidx.core.graphics.ColorUtils
-import java.util.Random
-import kotlin.math.sin
-/** View that renders turbulence noise effect. */
+/**
+ * View that renders turbulence noise effect.
+ *
+ * <p>Use [TurbulenceNoiseController] to control the turbulence animation. If you want to make some
+ * other turbulence noise effects, either add functionality to [TurbulenceNoiseController] or create
+ * another controller instead of extend or modify the [TurbulenceNoiseView].
+ *
+ * <p>Please keep the [TurbulenceNoiseView] (or View in general) not aware of the state.
+ *
+ * <p>Please avoid inheriting the View if possible. Instead, reconsider adding a controller for a
+ * new case.
+ */
class TurbulenceNoiseView(context: Context?, attrs: AttributeSet?) : View(context, attrs) {
companion object {
private const val MS_TO_SEC = 0.001f
- private const val TWO_PI = Math.PI.toFloat() * 2f
}
- @VisibleForTesting val turbulenceNoiseShader = TurbulenceNoiseShader()
+ private val turbulenceNoiseShader = TurbulenceNoiseShader()
private val paint = Paint().apply { this.shader = turbulenceNoiseShader }
- private val random = Random()
- private val animator: ValueAnimator = ValueAnimator.ofFloat(0f, 1f)
- private var config: TurbulenceNoiseAnimationConfig? = null
-
- val isPlaying: Boolean
- get() = animator.isRunning
-
- init {
- // Only visible during the animation.
- visibility = INVISIBLE
- }
-
- /** Updates the color during the animation. No-op if there's no animation playing. */
- fun updateColor(color: Int) {
- config?.let {
- it.color = color
- applyConfig(it)
- }
- }
+ @VisibleForTesting var noiseConfig: TurbulenceNoiseAnimationConfig? = null
+ @VisibleForTesting var currentAnimator: ValueAnimator? = null
override fun onDraw(canvas: Canvas?) {
if (canvas == null || !canvas.isHardwareAccelerated) {
@@ -68,32 +59,38 @@
canvas.drawPaint(paint)
}
- fun play(config: TurbulenceNoiseAnimationConfig) {
- if (isPlaying) {
- return // Ignore if the animation is playing.
+ /** Updates the color during the animation. No-op if there's no animation playing. */
+ internal fun updateColor(color: Int) {
+ noiseConfig?.let {
+ turbulenceNoiseShader.setColor(ColorUtils.setAlphaComponent(color, it.opacity))
}
- visibility = VISIBLE
- applyConfig(config)
+ }
- // Add random offset to avoid same patterned noise.
- val offsetX = random.nextFloat()
- val offsetY = random.nextFloat()
+ /** Plays the turbulence noise with no easing. */
+ @VisibleForTesting(otherwise = VisibleForTesting.PACKAGE_PRIVATE)
+ fun play(onAnimationEnd: Runnable? = null) {
+ if (noiseConfig == null) {
+ return
+ }
+ val config = noiseConfig!!
- animator.duration = config.duration.toLong()
+ val animator = ValueAnimator.ofFloat(0f, 1f)
+ animator.duration = config.maxDuration.toLong()
+
+ // Animation should start from the initial position to avoid abrupt transition.
+ val initialX = turbulenceNoiseShader.noiseOffsetX
+ val initialY = turbulenceNoiseShader.noiseOffsetY
+ val initialZ = turbulenceNoiseShader.noiseOffsetZ
+
animator.addUpdateListener { updateListener ->
val timeInSec = updateListener.currentPlayTime * MS_TO_SEC
- // Remap [0,1] to [0, 2*PI]
- val progress = TWO_PI * updateListener.animatedValue as Float
-
turbulenceNoiseShader.setNoiseMove(
- offsetX + timeInSec * config.noiseMoveSpeedX,
- offsetY + timeInSec * config.noiseMoveSpeedY,
- timeInSec * config.noiseMoveSpeedZ
+ initialX + timeInSec * config.noiseMoveSpeedX,
+ initialY + timeInSec * config.noiseMoveSpeedY,
+ initialZ + timeInSec * config.noiseMoveSpeedZ
)
- // Fade in and out the noise as the animation progress.
- // TODO: replace it with a better curve
- turbulenceNoiseShader.setOpacity(sin(TWO_PI - progress) * config.luminosityMultiplier)
+ turbulenceNoiseShader.setOpacity(config.luminosityMultiplier)
invalidate()
}
@@ -101,16 +98,121 @@
animator.addListener(
object : AnimatorListenerAdapter() {
override fun onAnimationEnd(animation: Animator) {
- visibility = INVISIBLE
- config.onAnimationEnd?.run()
+ currentAnimator = null
+ onAnimationEnd?.run()
}
}
)
+
animator.start()
+ currentAnimator = animator
}
- private fun applyConfig(config: TurbulenceNoiseAnimationConfig) {
- this.config = config
+ /** Plays the turbulence noise with linear ease-in. */
+ @VisibleForTesting(otherwise = VisibleForTesting.PACKAGE_PRIVATE)
+ fun playEaseIn(offsetX: Float = 0f, offsetY: Float = 0f, onAnimationEnd: Runnable? = null) {
+ if (noiseConfig == null) {
+ return
+ }
+ val config = noiseConfig!!
+
+ val animator = ValueAnimator.ofFloat(0f, 1f)
+ animator.duration = config.easeInDuration.toLong()
+
+ // Animation should start from the initial position to avoid abrupt transition.
+ val initialX = turbulenceNoiseShader.noiseOffsetX
+ val initialY = turbulenceNoiseShader.noiseOffsetY
+ val initialZ = turbulenceNoiseShader.noiseOffsetZ
+
+ animator.addUpdateListener { updateListener ->
+ val timeInSec = updateListener.currentPlayTime * MS_TO_SEC
+ val progress = updateListener.animatedValue as Float
+
+ turbulenceNoiseShader.setNoiseMove(
+ offsetX + initialX + timeInSec * config.noiseMoveSpeedX,
+ offsetY + initialY + timeInSec * config.noiseMoveSpeedY,
+ initialZ + timeInSec * config.noiseMoveSpeedZ
+ )
+
+ // TODO: Replace it with a better curve.
+ turbulenceNoiseShader.setOpacity(progress * config.luminosityMultiplier)
+
+ invalidate()
+ }
+
+ animator.addListener(
+ object : AnimatorListenerAdapter() {
+ override fun onAnimationEnd(animation: Animator) {
+ currentAnimator = null
+ onAnimationEnd?.run()
+ }
+ }
+ )
+
+ animator.start()
+ currentAnimator = animator
+ }
+
+ /** Plays the turbulence noise with linear ease-out. */
+ @VisibleForTesting(otherwise = VisibleForTesting.PACKAGE_PRIVATE)
+ fun playEaseOut(onAnimationEnd: Runnable? = null) {
+ if (noiseConfig == null) {
+ return
+ }
+ val config = noiseConfig!!
+
+ val animator = ValueAnimator.ofFloat(0f, 1f)
+ animator.duration = config.easeOutDuration.toLong()
+
+ // Animation should start from the initial position to avoid abrupt transition.
+ val initialX = turbulenceNoiseShader.noiseOffsetX
+ val initialY = turbulenceNoiseShader.noiseOffsetY
+ val initialZ = turbulenceNoiseShader.noiseOffsetZ
+
+ animator.addUpdateListener { updateListener ->
+ val timeInSec = updateListener.currentPlayTime * MS_TO_SEC
+ val progress = updateListener.animatedValue as Float
+
+ turbulenceNoiseShader.setNoiseMove(
+ initialX + timeInSec * config.noiseMoveSpeedX,
+ initialY + timeInSec * config.noiseMoveSpeedY,
+ initialZ + timeInSec * config.noiseMoveSpeedZ
+ )
+
+ // TODO: Replace it with a better curve.
+ turbulenceNoiseShader.setOpacity((1f - progress) * config.luminosityMultiplier)
+
+ invalidate()
+ }
+
+ animator.addListener(
+ object : AnimatorListenerAdapter() {
+ override fun onAnimationEnd(animation: Animator) {
+ currentAnimator = null
+ onAnimationEnd?.run()
+ }
+ }
+ )
+
+ animator.start()
+ currentAnimator = animator
+ }
+
+ /** Finishes the current animation if playing and plays the next animation if given. */
+ @VisibleForTesting(otherwise = VisibleForTesting.PACKAGE_PRIVATE)
+ fun finish(nextAnimation: Runnable? = null) {
+ // Calling Animator#end sets the animation state back to the initial state. Using pause to
+ // avoid visual artifacts.
+ currentAnimator?.pause()
+ currentAnimator = null
+
+ nextAnimation?.run()
+ }
+
+ /** Applies shader uniforms. Must be called before playing animation. */
+ @VisibleForTesting(otherwise = VisibleForTesting.PACKAGE_PRIVATE)
+ fun applyConfig(config: TurbulenceNoiseAnimationConfig) {
+ noiseConfig = config
with(turbulenceNoiseShader) {
setGridCount(config.gridCount)
setColor(ColorUtils.setAlphaComponent(config.color, config.opacity))
@@ -120,4 +222,8 @@
}
paint.blendMode = config.blendMode
}
+
+ internal fun clearConfig() {
+ noiseConfig = null
+ }
}
diff --git a/packages/SystemUI/docs/demo_mode.md b/packages/SystemUI/docs/demo_mode.md
index 6cf7060..b2424f4 100644
--- a/packages/SystemUI/docs/demo_mode.md
+++ b/packages/SystemUI/docs/demo_mode.md
@@ -22,42 +22,42 @@
<br/>
Commands are sent as string extras with key ```command``` (required). Possible values are:
-Command | Subcommand | Argument | Description
---- | --- | --- | ---
-```enter``` | | | Enters demo mode, bar state allowed to be modified (for convenience, any of the other non-exit commands will automatically flip demo mode on, no need to call this explicitly in practice)
-```exit``` | | | Exits demo mode, bars back to their system-driven state
-```battery``` | | | Control the battery display
- | ```level``` | | Sets the battery level (0 - 100)
- | ```plugged``` | | Sets charging state (```true```, ```false```)
- | ```powersave``` | | Sets power save mode (```true```, ```anything else```)
-```network``` | | | Control the RSSI display
- | ```airplane``` | | ```show``` to show icon, any other value to hide
- | ```fully``` | | Sets MCS state to fully connected (```true```, ```false```)
- | ```wifi``` | | ```show``` to show icon, any other value to hide
- | | ```level``` | Sets wifi level (null or 0-4)
- | ```mobile``` | | ```show``` to show icon, any other value to hide
- | | ```datatype``` | Values: ```1x```, ```3g```, ```4g```, ```e```, ```g```, ```h```, ```lte```, ```roam```, any other value to hide
- | | ```level``` | Sets mobile signal strength level (null or 0-4)
- | ```carriernetworkchange``` | | Sets mobile signal icon to carrier network change UX when disconnected (```show``` to show icon, any other value to hide)
- | ```sims``` | | Sets the number of sims (1-8)
- | ```nosim``` | | ```show``` to show icon, any other value to hide
-```bars``` | | | Control the visual style of the bars (opaque, translucent, etc)
- | ```mode``` | | Sets the bars visual style (opaque, translucent, semi-transparent)
-```status``` | | | Control the system status icons
- | ```volume``` | | Sets the icon in the volume slot (```silent```, ```vibrate```, any other value to hide)
- | ```bluetooth``` | | Sets the icon in the bluetooth slot (```connected```, ```disconnected```, any other value to hide)
- | ```location``` | | Sets the icon in the location slot (```show```, any other value to hide)
- | ```alarm``` | | Sets the icon in the alarm_clock slot (```show```, any other value to hide)
- | ```sync``` | | Sets the icon in the sync_active slot (```show```, any other value to hide)
- | ```tty``` | | Sets the icon in the tty slot (```show```, any other value to hide)
- | ```eri``` | | Sets the icon in the cdma_eri slot (```show```, any other value to hide)
- | ```mute``` | | Sets the icon in the mute slot (```show```, any other value to hide)
- | ```speakerphone``` | | Sets the icon in the speakerphone slot (```show```, any other value to hide)
-```notifications``` | | | Control the notification icons
- | ```visible``` | | ```false``` to hide the notification icons, any other value to show
-```clock``` | | | Control the clock display
- | ```millis``` | | Sets the time in millis
- | ```hhmm``` | | Sets the time in hh:mm
+| Command | Subcommand | Argument | Description
+| --- | --- | --- | ---
+| ```enter``` | | | Enters demo mode, bar state allowed to be modified (for convenience, any of the other non-exit commands will automatically flip demo mode on, no need to call this explicitly in practice)
+| ```exit``` | | | Exits demo mode, bars back to their system-driven state
+| ```battery``` | | | Control the battery display
+| | ```level``` | | Sets the battery level (0 - 100)
+| | ```plugged``` | | Sets charging state (```true```, ```false```)
+| | ```powersave``` | | Sets power save mode (```true```, ```anything else```)
+| ```network``` | | | Control the RSSI display
+| | ```airplane``` | | ```show``` to show icon, any other value to hide
+| | ```fully``` | | Sets MCS state to fully connected (```true```, ```false```)
+| | ```wifi``` | | ```show``` to show icon, any other value to hide
+| | | ```level``` | Sets wifi level (null or 0-4)
+| | ```mobile``` | | ```show``` to show icon, any other value to hide
+| | | ```datatype``` | Values: ```1x```, ```3g```, ```4g```, ```e```, ```g```, ```h```, ```lte```, ```roam```, any other value to hide
+| | | ```level``` | Sets mobile signal strength level (null or 0-4)
+| | ```carriernetworkchange``` | | Sets mobile signal icon to carrier network change UX when disconnected (```show``` to show icon, any other value to hide)
+| | ```sims``` | | Sets the number of sims (1-8)
+| | ```nosim``` | | ```show``` to show icon, any other value to hide
+| ```bars``` | | | Control the visual style of the bars (opaque, translucent, etc)
+| | ```mode``` | | Sets the bars visual style (opaque, translucent, semi-transparent)
+| ```status``` | | | Control the system status icons
+| | ```volume``` | | Sets the icon in the volume slot (```silent```, ```vibrate```, any other value to hide)
+| | ```bluetooth``` | | Sets the icon in the bluetooth slot (```connected```, ```disconnected```, any other value to hide)
+| | ```location``` | | Sets the icon in the location slot (```show```, any other value to hide)
+| | ```alarm``` | | Sets the icon in the alarm_clock slot (```show```, any other value to hide)
+| | ```sync``` | | Sets the icon in the sync_active slot (```show```, any other value to hide)
+| | ```tty``` | | Sets the icon in the tty slot (```show```, any other value to hide)
+| | ```eri``` | | Sets the icon in the cdma_eri slot (```show```, any other value to hide)
+| | ```mute``` | | Sets the icon in the mute slot (```show```, any other value to hide)
+| | ```speakerphone``` | | Sets the icon in the speakerphone slot (```show```, any other value to hide)
+| ```notifications``` | | | Control the notification icons
+| | ```visible``` | | ```false``` to hide the notification icons, any other value to show
+| ```clock``` | | | Control the clock display
+| | ```millis``` | | Sets the time in millis
+| | ```hhmm``` | | Sets the time in hh:mm
## Examples
Enter demo mode
diff --git a/packages/SystemUI/ktfmt_includes.txt b/packages/SystemUI/ktfmt_includes.txt
index 434f227..f53e3f6 100644
--- a/packages/SystemUI/ktfmt_includes.txt
+++ b/packages/SystemUI/ktfmt_includes.txt
@@ -460,7 +460,6 @@
-packages/SystemUI/src/com/android/systemui/statusbar/pipeline/shared/ConnectivityPipelineLogger.kt
-packages/SystemUI/src/com/android/systemui/statusbar/pipeline/wifi/data/model/WifiActivityModel.kt
-packages/SystemUI/src/com/android/systemui/statusbar/pipeline/wifi/data/model/WifiNetworkModel.kt
--packages/SystemUI/src/com/android/systemui/statusbar/pipeline/wifi/data/repository/prod/WifiRepositoryImpl.kt
-packages/SystemUI/src/com/android/systemui/statusbar/pipeline/wifi/domain/interactor/WifiInteractor.kt
-packages/SystemUI/src/com/android/systemui/statusbar/pipeline/wifi/shared/WifiConstants.kt
-packages/SystemUI/src/com/android/systemui/statusbar/pipeline/wifi/ui/view/ModernStatusBarWifiView.kt
@@ -486,7 +485,6 @@
-packages/SystemUI/src/com/android/systemui/statusbar/window/StatusBarWindowStateController.kt
-packages/SystemUI/src/com/android/systemui/temporarydisplay/TemporaryViewInfo.kt
-packages/SystemUI/src/com/android/systemui/temporarydisplay/TemporaryViewDisplayController.kt
--packages/SystemUI/src/com/android/systemui/temporarydisplay/chipbar/ChipbarCoordinator.kt
-packages/SystemUI/src/com/android/systemui/temporarydisplay/chipbar/ChipbarRootView.kt
-packages/SystemUI/src/com/android/systemui/toast/ToastDefaultAnimation.kt
-packages/SystemUI/src/com/android/systemui/toast/ToastLogger.kt
diff --git a/packages/SystemUI/plugin/bcsmartspace/src/com/android/systemui/plugins/BcSmartspaceDataPlugin.java b/packages/SystemUI/plugin/bcsmartspace/src/com/android/systemui/plugins/BcSmartspaceDataPlugin.java
index eac765a..51f5baa 100644
--- a/packages/SystemUI/plugin/bcsmartspace/src/com/android/systemui/plugins/BcSmartspaceDataPlugin.java
+++ b/packages/SystemUI/plugin/bcsmartspace/src/com/android/systemui/plugins/BcSmartspaceDataPlugin.java
@@ -40,6 +40,11 @@
*/
@ProvidesInterface(action = BcSmartspaceDataPlugin.ACTION, version = BcSmartspaceDataPlugin.VERSION)
public interface BcSmartspaceDataPlugin extends Plugin {
+ String UI_SURFACE_LOCK_SCREEN_AOD = "lockscreen";
+ String UI_SURFACE_HOME_SCREEN = "home";
+ String UI_SURFACE_MEDIA = "media_data_manager";
+ String UI_SURFACE_DREAM = "dream";
+
String ACTION = "com.android.systemui.action.PLUGIN_BC_SMARTSPACE_DATA";
int VERSION = 1;
String TAG = "BcSmartspaceDataPlugin";
@@ -100,6 +105,11 @@
void setIsDreaming(boolean isDreaming);
/**
+ * Set the UI surface for the cards. Should be called immediately after the view is created.
+ */
+ void setUiSurface(String uiSurface);
+
+ /**
* Range [0.0 - 1.0] when transitioning from Lockscreen to/from AOD
*/
void setDozeAmount(float amount);
diff --git a/packages/SystemUI/plugin/src/com/android/systemui/plugins/log/ConstantStringsLogger.kt b/packages/SystemUI/plugin/src/com/android/systemui/plugins/log/ConstantStringsLogger.kt
new file mode 100644
index 0000000..f95b187
--- /dev/null
+++ b/packages/SystemUI/plugin/src/com/android/systemui/plugins/log/ConstantStringsLogger.kt
@@ -0,0 +1,33 @@
+/*
+ * 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.plugins.log
+
+import com.google.errorprone.annotations.CompileTimeConstant
+
+/**
+ * Handy for adding basic logging with CompileTimeConstant strings - so logging with no variables.
+ * Most likely you want to delegate it to [ConstantStringsLoggerImpl].
+ */
+interface ConstantStringsLogger {
+ fun v(@CompileTimeConstant msg: String)
+
+ fun d(@CompileTimeConstant msg: String)
+
+ fun w(@CompileTimeConstant msg: String)
+
+ fun e(@CompileTimeConstant msg: String)
+}
diff --git a/packages/SystemUI/plugin/src/com/android/systemui/plugins/log/ConstantStringsLoggerImpl.kt b/packages/SystemUI/plugin/src/com/android/systemui/plugins/log/ConstantStringsLoggerImpl.kt
new file mode 100644
index 0000000..91b39e6
--- /dev/null
+++ b/packages/SystemUI/plugin/src/com/android/systemui/plugins/log/ConstantStringsLoggerImpl.kt
@@ -0,0 +1,29 @@
+/*
+ * 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.plugins.log
+
+import com.google.errorprone.annotations.CompileTimeConstant
+
+class ConstantStringsLoggerImpl(val buffer: LogBuffer, val tag: String) : ConstantStringsLogger {
+ override fun v(@CompileTimeConstant msg: String) = buffer.log(tag, LogLevel.VERBOSE, msg)
+
+ override fun d(@CompileTimeConstant msg: String) = buffer.log(tag, LogLevel.DEBUG, msg)
+
+ override fun w(@CompileTimeConstant msg: String) = buffer.log(tag, LogLevel.WARNING, msg)
+
+ override fun e(@CompileTimeConstant msg: String) = buffer.log(tag, LogLevel.ERROR, msg)
+}
diff --git a/packages/SystemUI/res/drawable/ic_brightness_full.xml b/packages/SystemUI/res/drawable/ic_brightness_full.xml
index f443332..1dc7cef 100644
--- a/packages/SystemUI/res/drawable/ic_brightness_full.xml
+++ b/packages/SystemUI/res/drawable/ic_brightness_full.xml
@@ -1,29 +1,45 @@
-<!--
-Copyright (C) 2020 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:viewportWidth="24.0"
- android:viewportHeight="24.0">
-
- <path
- android:pathData="M18,14.48V18h-3.52L12,20.48L9.52,18H6v-3.52L3.52,12L6,9.52V6h3.52L12,3.52L14.48,6H18v3.52L20.48,12L18,14.48z"
- />
-
- <path
- android:pathData=" M20,8.69 V4h-4.69L12,0.69L8.69,4H4v4.69L0.69,12L4,15.31V20h4.69L12,23.31L15.31,20H20v-4.69L23.31,12L20,8.69z M18,14.48V18h-3.52L12,20.48L9.52,18H6v-3.52L3.52,12L6,9.52V6h3.52L12,3.52L14.48,6H18v3.52L20.48,12L18,14.48z M12,7c-2.76,0 -5,2.24 -5,5s2.24,5 5,5s5,-2.24 5,-5S14.76,7 12,7z"
- android:fillColor="#FFFFFF" />
-</vector>
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportHeight="24"
+ android:viewportWidth="24">
+ <group android:name="_R_G">
+ <group
+ android:name="_R_G_L_1_G_N_1_T_0"
+ android:scaleX="0.1"
+ android:scaleY="0.1"
+ android:translateX="12"
+ android:translateY="12">
+ <group android:name="_R_G_L_1_G">
+ <path
+ android:name="_R_G_L_1_G_D_0_P_0"
+ android:fillAlpha="1"
+ android:fillColor="#ffffff"
+ android:fillType="nonZero"
+ android:pathData=" M66.67 -27.59 C66.67,-27.59 66.67,-66.67 66.67,-66.67 C66.67,-66.67 27.59,-66.67 27.59,-66.67 C27.59,-66.67 0,-94.25 0,-94.25 C0,-94.25 -27.58,-66.67 -27.58,-66.67 C-27.58,-66.67 -66.66,-66.67 -66.66,-66.67 C-66.66,-66.67 -66.66,-27.59 -66.66,-27.59 C-66.66,-27.59 -94.25,0 -94.25,0 C-94.25,0 -66.66,27.58 -66.66,27.58 C-66.66,27.58 -66.66,66.66 -66.66,66.66 C-66.66,66.66 -27.58,66.66 -27.58,66.66 C-27.58,66.66 0,94.25 0,94.25 C0,94.25 27.59,66.66 27.59,66.66 C27.59,66.66 66.67,66.66 66.67,66.66 C66.67,66.66 66.67,27.58 66.67,27.58 C66.67,27.58 94.25,0 94.25,0 C94.25,0 66.67,-27.59 66.67,-27.59c M50 20.66 C50,20.66 50,50 50,50 C50,50 20.67,50 20.67,50 C20.67,50 0,70.66 0,70.66 C0,70.66 -20.66,50 -20.66,50 C-20.66,50 -50,50 -50,50 C-50,50 -50,20.66 -50,20.66 C-50,20.66 -70.66,0 -70.66,0 C-70.66,0 -50,-20.67 -50,-20.67 C-50,-20.67 -50,-50 -50,-50 C-50,-50 -20.66,-50 -20.66,-50 C-20.66,-50 0,-70.67 0,-70.67 C0,-70.67 20.67,-50 20.67,-50 C20.67,-50 50,-50 50,-50 C50,-50 50,-20.67 50,-20.67 C50,-20.67 70.67,0 70.67,0 C70.67,0 50,20.66 50,20.66c " />
+ </group>
+ </group>
+ <group
+ android:name="_R_G_L_0_G"
+ android:scaleX="0.1"
+ android:scaleY="0.1"
+ android:translateX="12"
+ android:translateY="12">
+ <path
+ android:name="_R_G_L_0_G_D_0_P_0"
+ android:fillAlpha="1"
+ android:fillColor="#ffffff"
+ android:fillType="nonZero"
+ android:pathData=" M0 -32.5 C17.95,-32.5 32.5,-17.95 32.5,0 C32.5,17.95 17.95,32.5 0,32.5 C-17.95,32.5 -32.5,17.95 -32.5,0 C-32.5,-17.95 -17.95,-32.5 0,-32.5c " />
+ <path
+ android:name="_R_G_L_0_G_D_1_P_0"
+ android:pathData=" M0 -32.5 C17.95,-32.5 32.5,-17.95 32.5,0 C32.5,17.95 17.95,32.5 0,32.5 C-17.95,32.5 -32.5,17.95 -32.5,0 C-32.5,-17.95 -17.95,-32.5 0,-32.5c "
+ android:strokeAlpha="1"
+ android:strokeColor="#ffffff"
+ android:strokeLineCap="round"
+ android:strokeLineJoin="round"
+ android:strokeWidth="17" />
+ </group>
+ </group>
+ <group android:name="time_group" />
+</vector>
\ No newline at end of file
diff --git a/packages/SystemUI/res/drawable/ic_brightness_low.xml b/packages/SystemUI/res/drawable/ic_brightness_low.xml
index b463556..ded7567 100644
--- a/packages/SystemUI/res/drawable/ic_brightness_low.xml
+++ b/packages/SystemUI/res/drawable/ic_brightness_low.xml
@@ -1,10 +1,52 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
- android:viewportWidth="24"
android:viewportHeight="24"
- android:tint="?attr/colorControlNormal">
- <path
- android:fillColor="@android:color/white"
- android:pathData="M20,8.69L20,4h-4.69L12,0.69 8.69,4L4,4v4.69L0.69,12 4,15.31L4,20h4.69L12,23.31 15.31,20L20,20v-4.69L23.31,12 20,8.69zM18,14.48L18,18h-3.52L12,20.48 9.52,18L6,18v-3.52L3.52,12 6,9.52L6,6h3.52L12,3.52 14.48,6L18,6v3.52L20.48,12 18,14.48zM12,9c1.65,0 3,1.35 3,3s-1.35,3 -3,3 -3,-1.35 -3,-3 1.35,-3 3,-3m0,-2c-2.76,0 -5,2.24 -5,5s2.24,5 5,5 5,-2.24 5,-5 -2.24,-5 -5,-5z"/>
-</vector>
+ android:viewportWidth="24">
+ <group android:name="_R_G">
+ <group
+ android:name="_R_G_L_1_G_N_1_T_0"
+ android:scaleX="0.1"
+ android:scaleY="0.1"
+ android:translateX="12"
+ android:translateY="12">
+ <group android:name="_R_G_L_1_G">
+ <path
+ android:name="_R_G_L_1_G_D_0_P_0"
+ android:fillAlpha="1"
+ android:fillColor="#ffffff"
+ android:fillType="nonZero"
+ android:pathData=" M66.67 -27.59 C66.67,-27.59 66.67,-66.67 66.67,-66.67 C66.67,-66.67 27.59,-66.67 27.59,-66.67 C27.59,-66.67 0,-94.25 0,-94.25 C0,-94.25 -27.58,-66.67 -27.58,-66.67 C-27.58,-66.67 -66.66,-66.67 -66.66,-66.67 C-66.66,-66.67 -66.66,-27.59 -66.66,-27.59 C-66.66,-27.59 -94.25,0 -94.25,0 C-94.25,0 -66.66,27.58 -66.66,27.58 C-66.66,27.58 -66.66,66.66 -66.66,66.66 C-66.66,66.66 -27.58,66.66 -27.58,66.66 C-27.58,66.66 0,94.25 0,94.25 C0,94.25 27.59,66.66 27.59,66.66 C27.59,66.66 66.67,66.66 66.67,66.66 C66.67,66.66 66.67,27.58 66.67,27.58 C66.67,27.58 94.25,0 94.25,0 C94.25,0 66.67,-27.59 66.67,-27.59c M50 20.66 C50,20.66 50,50 50,50 C50,50 20.67,50 20.67,50 C20.67,50 0,70.66 0,70.66 C0,70.66 -20.66,50 -20.66,50 C-20.66,50 -50,50 -50,50 C-50,50 -50,20.66 -50,20.66 C-50,20.66 -70.66,0 -70.66,0 C-70.66,0 -50,-20.67 -50,-20.67 C-50,-20.67 -50,-50 -50,-50 C-50,-50 -20.66,-50 -20.66,-50 C-20.66,-50 0,-70.67 0,-70.67 C0,-70.67 20.67,-50 20.67,-50 C20.67,-50 50,-50 50,-50 C50,-50 50,-20.67 50,-20.67 C50,-20.67 70.67,0 70.67,0 C70.67,0 50,20.66 50,20.66c " />
+ </group>
+ </group>
+ <group
+ android:name="_R_G_L_0_G"
+ android:scaleX="0.1"
+ android:scaleY="0.1"
+ android:translateX="12"
+ android:translateY="12">
+ <group android:name="_R_G_L_0_C_0_G">
+ <clip-path
+ android:name="_R_G_L_0_C_0"
+ android:pathData=" M-63 -50.5 C-63,-50.5 -63,48 -63,48 C-63,48 42.5,48 42.5,48 C42.5,48 42.5,-50.5 42.5,-50.5 C42.5,-50.5 -63,-50.5 -63,-50.5c " />
+ <group android:name="_R_G_L_0_C_0_G_G">
+ <path
+ android:name="_R_G_L_0_G_G_0_D_0_P_0"
+ android:pathData=" M0 -32.5 C17.95,-32.5 32.5,-17.95 32.5,0 C32.5,17.95 17.95,32.5 0,32.5 C-17.95,32.5 -32.5,17.95 -32.5,0 C-32.5,-17.95 -17.95,-32.5 0,-32.5c "
+ android:strokeAlpha="1"
+ android:strokeColor="#ffffff"
+ android:strokeLineCap="round"
+ android:strokeLineJoin="round"
+ android:strokeWidth="17" />
+ <path
+ android:name="_R_G_L_0_G_G_0_D_1_P_0"
+ android:fillAlpha="0"
+ android:fillColor="#ffffff"
+ android:fillType="nonZero"
+ android:pathData=" M0 -32.5 C17.95,-32.5 32.5,-17.95 32.5,0 C32.5,17.95 17.95,32.5 0,32.5 C-17.95,32.5 -32.5,17.95 -32.5,0 C-32.5,-17.95 -17.95,-32.5 0,-32.5c " />
+ </group>
+ </group>
+ </group>
+ </group>
+ <group android:name="time_group" />
+</vector>
\ No newline at end of file
diff --git a/packages/SystemUI/res/drawable/ic_brightness_medium.xml b/packages/SystemUI/res/drawable/ic_brightness_medium.xml
index 80acc4d..606c6da 100644
--- a/packages/SystemUI/res/drawable/ic_brightness_medium.xml
+++ b/packages/SystemUI/res/drawable/ic_brightness_medium.xml
@@ -1,10 +1,52 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
- android:viewportWidth="24"
android:viewportHeight="24"
- android:tint="?attr/colorControlNormal">
- <path
- android:fillColor="@android:color/white"
- android:pathData="M20,8.69L20,4h-4.69L12,0.69 8.69,4L4,4v4.69L0.69,12 4,15.31L4,20h4.69L12,23.31 15.31,20L20,20v-4.69L23.31,12 20,8.69zM18,14.48L18,18h-3.52L12,20.48 9.52,18L6,18v-3.52L3.52,12 6,9.52L6,6h3.52L12,3.52 14.48,6L18,6v3.52L20.48,12 18,14.48zM12,17c2.76,0 5,-2.24 5,-5s-2.24,-5 -5,-5v10z"/>
-</vector>
+ android:viewportWidth="24">
+ <group android:name="_R_G">
+ <group
+ android:name="_R_G_L_1_G_N_1_T_0"
+ android:scaleX="0.1"
+ android:scaleY="0.1"
+ android:translateX="12"
+ android:translateY="12">
+ <group android:name="_R_G_L_1_G">
+ <path
+ android:name="_R_G_L_1_G_D_0_P_0"
+ android:fillAlpha="1"
+ android:fillColor="#ffffff"
+ android:fillType="nonZero"
+ android:pathData="M66.67 -27.59 C66.67,-27.59 66.67,-66.67 66.67,-66.67 C66.67,-66.67 27.59,-66.67 27.59,-66.67 C27.59,-66.67 0,-94.25 0,-94.25 C0,-94.25 -27.58,-66.67 -27.58,-66.67 C-27.58,-66.67 -66.66,-66.67 -66.66,-66.67 C-66.66,-66.67 -66.66,-27.59 -66.66,-27.59 C-66.66,-27.59 -94.25,0 -94.25,0 C-94.25,0 -66.66,27.58 -66.66,27.58 C-66.66,27.58 -66.66,66.66 -66.66,66.66 C-66.66,66.66 -27.58,66.66 -27.58,66.66 C-27.58,66.66 0,94.25 0,94.25 C0,94.25 27.59,66.66 27.59,66.66 C27.59,66.66 66.67,66.66 66.67,66.66 C66.67,66.66 66.67,27.58 66.67,27.58 C66.67,27.58 94.25,0 94.25,0 C94.25,0 66.67,-27.59 66.67,-27.59c M50 20.66 C50,20.66 50,50 50,50 C50,50 20.67,50 20.67,50 C20.67,50 0,70.66 0,70.66 C0,70.66 -20.66,50 -20.66,50 C-20.66,50 -50,50 -50,50 C-50,50 -50,20.66 -50,20.66 C-50,20.66 -70.66,0 -70.66,0 C-70.66,0 -50,-20.67 -50,-20.67 C-50,-20.67 -50,-50 -50,-50 C-50,-50 -20.66,-50 -20.66,-50 C-20.66,-50 0,-70.67 0,-70.67 C0,-70.67 20.67,-50 20.67,-50 C20.67,-50 50,-50 50,-50 C50,-50 50,-20.67 50,-20.67 C50,-20.67 70.67,0 70.67,0 C70.67,0 50,20.66 50,20.66c " />
+ </group>
+ </group>
+ <group
+ android:name="_R_G_L_0_G"
+ android:scaleX="0.1"
+ android:scaleY="0.1"
+ android:translateX="12"
+ android:translateY="12">
+ <group android:name="_R_G_L_0_C_0_G">
+ <clip-path
+ android:name="_R_G_L_0_C_0"
+ android:pathData="M-105.5 -50.5 C-105.5,-50.5 -105.5,48 -105.5,48 C-105.5,48 0,48 0,48 C0,48 0,-50.5 0,-50.5 C0,-50.5 -105.5,-50.5 -105.5,-50.5c " />
+ <group android:name="_R_G_L_0_C_0_G_G">
+ <path
+ android:name="_R_G_L_0_G_G_0_D_0_P_0"
+ android:fillAlpha="1"
+ android:fillColor="#ffffff"
+ android:fillType="nonZero"
+ android:pathData="M0 -32.5 C17.95,-32.5 32.5,-17.95 32.5,0 C32.5,17.95 17.95,32.5 0,32.5 C-17.95,32.5 -32.5,17.95 -32.5,0 C-32.5,-17.95 -17.95,-32.5 0,-32.5c " />
+ <path
+ android:name="_R_G_L_0_G_G_0_D_1_P_0"
+ android:pathData="M0 -32.5 C17.95,-32.5 32.5,-17.95 32.5,0 C32.5,17.95 17.95,32.5 0,32.5 C-17.95,32.5 -32.5,17.95 -32.5,0 C-32.5,-17.95 -17.95,-32.5 0,-32.5c "
+ android:strokeAlpha="1"
+ android:strokeColor="#ffffff"
+ android:strokeLineCap="round"
+ android:strokeLineJoin="round"
+ android:strokeWidth="17" />
+ </group>
+ </group>
+ </group>
+ </group>
+ <group android:name="time_group" />
+</vector>
\ No newline at end of file
diff --git a/packages/SystemUI/res/values-af/strings.xml b/packages/SystemUI/res/values-af/strings.xml
index 8db93ba..35d0981 100644
--- a/packages/SystemUI/res/values-af/strings.xml
+++ b/packages/SystemUI/res/values-af/strings.xml
@@ -1004,8 +1004,7 @@
<string name="keyguard_affordance_enablement_dialog_qr_scanner_instruction" msgid="5355839079232119791">"• Installeer ’n kamera-app"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_1" msgid="8438311171750568633">"• Die app opgestel is"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_2" msgid="8308525385889021652">"• Minstens een toestel beskikbaar is"</string>
- <!-- no translation found for keyguard_affordance_press_too_short (8145437175134998864) -->
- <skip />
+ <string name="keyguard_affordance_press_too_short" msgid="8145437175134998864">"Raak en hou kortpad"</string>
<string name="rear_display_bottom_sheet_cancel" msgid="3461468855493357248">"Kanselleer"</string>
<string name="rear_display_bottom_sheet_confirm" msgid="4383356544661421206">"Draai nou om"</string>
<string name="rear_display_fold_bottom_sheet_title" msgid="6081542277622721548">"Vou foon oop vir ’n beter selfie"</string>
diff --git a/packages/SystemUI/res/values-am/strings.xml b/packages/SystemUI/res/values-am/strings.xml
index 9e8f023..cfb8ad0 100644
--- a/packages/SystemUI/res/values-am/strings.xml
+++ b/packages/SystemUI/res/values-am/strings.xml
@@ -1004,8 +1004,7 @@
<string name="keyguard_affordance_enablement_dialog_qr_scanner_instruction" msgid="5355839079232119791">"• የካሜራ መተግበሪያ ይጫኑ"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_1" msgid="8438311171750568633">"• መተግበሪያው ተዋቅሯል"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_2" msgid="8308525385889021652">"• ቢያንስ አንድ መሣሪያ ይገኛል"</string>
- <!-- no translation found for keyguard_affordance_press_too_short (8145437175134998864) -->
- <skip />
+ <string name="keyguard_affordance_press_too_short" msgid="8145437175134998864">"የይንኩ እና ይያዙ አቋራጭ"</string>
<string name="rear_display_bottom_sheet_cancel" msgid="3461468855493357248">"ይቅር"</string>
<string name="rear_display_bottom_sheet_confirm" msgid="4383356544661421206">"አሁን ገልበጥ"</string>
<string name="rear_display_fold_bottom_sheet_title" msgid="6081542277622721548">"ለተሻለ የራስ ፎቶ ስልክን ይዘርጉ"</string>
diff --git a/packages/SystemUI/res/values-as/strings.xml b/packages/SystemUI/res/values-as/strings.xml
index d45b920..def2607 100644
--- a/packages/SystemUI/res/values-as/strings.xml
+++ b/packages/SystemUI/res/values-as/strings.xml
@@ -1004,8 +1004,7 @@
<string name="keyguard_affordance_enablement_dialog_qr_scanner_instruction" msgid="5355839079232119791">"• এটা কেমেৰা এপ্ ইনষ্টল কৰক"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_1" msgid="8438311171750568633">"• এপ্টো ছেট আপ কৰা হৈছে"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_2" msgid="8308525385889021652">"• অতি কমেও এটা ডিভাইচ উপলব্ধ"</string>
- <!-- no translation found for keyguard_affordance_press_too_short (8145437175134998864) -->
- <skip />
+ <string name="keyguard_affordance_press_too_short" msgid="8145437175134998864">"শ্বৰ্টকাটটোত স্পৰ্শ কৰি ধৰি ৰাখক"</string>
<string name="rear_display_bottom_sheet_cancel" msgid="3461468855493357248">"বাতিল কৰক"</string>
<string name="rear_display_bottom_sheet_confirm" msgid="4383356544661421206">"এতিয়াই লুটিয়াই দিয়ক"</string>
<string name="rear_display_fold_bottom_sheet_title" msgid="6081542277622721548">"উন্নত ছেল্ফিৰ বাবে ফ’নটো আনফ’ল্ড কৰক"</string>
diff --git a/packages/SystemUI/res/values-az/strings.xml b/packages/SystemUI/res/values-az/strings.xml
index d10d95b..c3378dd 100644
--- a/packages/SystemUI/res/values-az/strings.xml
+++ b/packages/SystemUI/res/values-az/strings.xml
@@ -1004,8 +1004,7 @@
<string name="keyguard_affordance_enablement_dialog_qr_scanner_instruction" msgid="5355839079232119791">"• Kamera tətbiqini quraşdırın"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_1" msgid="8438311171750568633">"• Tətbiq ayarlanmalıdır"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_2" msgid="8308525385889021652">"• Ən azı bir cihaz əlçatandır"</string>
- <!-- no translation found for keyguard_affordance_press_too_short (8145437175134998864) -->
- <skip />
+ <string name="keyguard_affordance_press_too_short" msgid="8145437175134998864">"Qısayola toxunub saxlayın"</string>
<string name="rear_display_bottom_sheet_cancel" msgid="3461468855493357248">"Ləğv edin"</string>
<string name="rear_display_bottom_sheet_confirm" msgid="4383356544661421206">"İndi fırladın"</string>
<string name="rear_display_fold_bottom_sheet_title" msgid="6081542277622721548">"Daha yaxşı selfi üçün telefonu açın"</string>
diff --git a/packages/SystemUI/res/values-b+sr+Latn/strings.xml b/packages/SystemUI/res/values-b+sr+Latn/strings.xml
index ff751a6..2b50c36 100644
--- a/packages/SystemUI/res/values-b+sr+Latn/strings.xml
+++ b/packages/SystemUI/res/values-b+sr+Latn/strings.xml
@@ -1004,8 +1004,7 @@
<string name="keyguard_affordance_enablement_dialog_qr_scanner_instruction" msgid="5355839079232119791">"• da ste instalirali aplikaciju za kameru"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_1" msgid="8438311171750568633">"• da je aplikacija podešena"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_2" msgid="8308525385889021652">"• da je dostupan barem jedan uređaj"</string>
- <!-- no translation found for keyguard_affordance_press_too_short (8145437175134998864) -->
- <skip />
+ <string name="keyguard_affordance_press_too_short" msgid="8145437175134998864">"Dodirnite i zadržite prečicu"</string>
<string name="rear_display_bottom_sheet_cancel" msgid="3461468855493357248">"Otkaži"</string>
<string name="rear_display_bottom_sheet_confirm" msgid="4383356544661421206">"Obrnite"</string>
<string name="rear_display_fold_bottom_sheet_title" msgid="6081542277622721548">"Otvorite telefon za bolji selfi"</string>
diff --git a/packages/SystemUI/res/values-bg/strings.xml b/packages/SystemUI/res/values-bg/strings.xml
index 90804e6..44e4e95 100644
--- a/packages/SystemUI/res/values-bg/strings.xml
+++ b/packages/SystemUI/res/values-bg/strings.xml
@@ -1004,8 +1004,7 @@
<string name="keyguard_affordance_enablement_dialog_qr_scanner_instruction" msgid="5355839079232119791">"• Инсталирано е приложение за камера."</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_1" msgid="8438311171750568633">"• Приложението е настроено."</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_2" msgid="8308525385889021652">"• Налице е поне едно устройство."</string>
- <!-- no translation found for keyguard_affordance_press_too_short (8145437175134998864) -->
- <skip />
+ <string name="keyguard_affordance_press_too_short" msgid="8145437175134998864">"Докоснете и задръжте прекия път"</string>
<string name="rear_display_bottom_sheet_cancel" msgid="3461468855493357248">"Отказ"</string>
<string name="rear_display_bottom_sheet_confirm" msgid="4383356544661421206">"Обръщане сега"</string>
<string name="rear_display_fold_bottom_sheet_title" msgid="6081542277622721548">"Отворете телефона за по-добро селфи"</string>
diff --git a/packages/SystemUI/res/values-bn/strings.xml b/packages/SystemUI/res/values-bn/strings.xml
index 8adba16..384b183 100644
--- a/packages/SystemUI/res/values-bn/strings.xml
+++ b/packages/SystemUI/res/values-bn/strings.xml
@@ -1004,8 +1004,7 @@
<string name="keyguard_affordance_enablement_dialog_qr_scanner_instruction" msgid="5355839079232119791">"• ক্যামেরা অ্যাপ ইনস্টল করুন"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_1" msgid="8438311171750568633">"• অ্যাপ সেট-আপ করা হয়ে গেছে"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_2" msgid="8308525385889021652">"• অন্তত একটি ডিভাইস উপলভ্য"</string>
- <!-- no translation found for keyguard_affordance_press_too_short (8145437175134998864) -->
- <skip />
+ <string name="keyguard_affordance_press_too_short" msgid="8145437175134998864">"শর্টকাট টাচ করে ধরে রাখুন"</string>
<string name="rear_display_bottom_sheet_cancel" msgid="3461468855493357248">"বাতিল করুন"</string>
<string name="rear_display_bottom_sheet_confirm" msgid="4383356544661421206">"এখনই উল্টান"</string>
<string name="rear_display_fold_bottom_sheet_title" msgid="6081542277622721548">"আরও ভাল সেলফির জন্য ফোন আনফোল্ড করা"</string>
diff --git a/packages/SystemUI/res/values-bs/strings.xml b/packages/SystemUI/res/values-bs/strings.xml
index 971c0d6..d621772 100644
--- a/packages/SystemUI/res/values-bs/strings.xml
+++ b/packages/SystemUI/res/values-bs/strings.xml
@@ -1004,8 +1004,7 @@
<string name="keyguard_affordance_enablement_dialog_qr_scanner_instruction" msgid="5355839079232119791">"• Instalirajte aplikaciju kamere"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_1" msgid="8438311171750568633">"• Aplikacija je postavljena"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_2" msgid="8308525385889021652">"• Dostupan je najmanje jedan uređaj"</string>
- <!-- no translation found for keyguard_affordance_press_too_short (8145437175134998864) -->
- <skip />
+ <string name="keyguard_affordance_press_too_short" msgid="8145437175134998864">"Dodirnite i zadržite prečicu"</string>
<string name="rear_display_bottom_sheet_cancel" msgid="3461468855493357248">"Otkaži"</string>
<string name="rear_display_bottom_sheet_confirm" msgid="4383356544661421206">"Obrni sada"</string>
<string name="rear_display_fold_bottom_sheet_title" msgid="6081542277622721548">"Raširite telefon za bolji selfi"</string>
diff --git a/packages/SystemUI/res/values-ca/strings.xml b/packages/SystemUI/res/values-ca/strings.xml
index 60266e4..4b77f08 100644
--- a/packages/SystemUI/res/values-ca/strings.xml
+++ b/packages/SystemUI/res/values-ca/strings.xml
@@ -1004,8 +1004,7 @@
<string name="keyguard_affordance_enablement_dialog_qr_scanner_instruction" msgid="5355839079232119791">"• Tens una aplicació de càmera."</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_1" msgid="8438311171750568633">"• L\'aplicació està configurada."</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_2" msgid="8308525385889021652">"• Almenys un dispositiu està disponible."</string>
- <!-- no translation found for keyguard_affordance_press_too_short (8145437175134998864) -->
- <skip />
+ <string name="keyguard_affordance_press_too_short" msgid="8145437175134998864">"Mantén premuda la drecera"</string>
<string name="rear_display_bottom_sheet_cancel" msgid="3461468855493357248">"Cancel·la"</string>
<string name="rear_display_bottom_sheet_confirm" msgid="4383356544661421206">"Gira ara"</string>
<string name="rear_display_fold_bottom_sheet_title" msgid="6081542277622721548">"Desplega el telèfon per fer una millor selfie"</string>
diff --git a/packages/SystemUI/res/values-cs/strings.xml b/packages/SystemUI/res/values-cs/strings.xml
index 7ade3bf..48f6dfe5 100644
--- a/packages/SystemUI/res/values-cs/strings.xml
+++ b/packages/SystemUI/res/values-cs/strings.xml
@@ -1004,8 +1004,7 @@
<string name="keyguard_affordance_enablement_dialog_qr_scanner_instruction" msgid="5355839079232119791">"• Je nainstalována aplikace pro fotoaparát"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_1" msgid="8438311171750568633">"• Aplikace je nastavena"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_2" msgid="8308525385889021652">"• Je k dispozici alespoň jedno zařízení"</string>
- <!-- no translation found for keyguard_affordance_press_too_short (8145437175134998864) -->
- <skip />
+ <string name="keyguard_affordance_press_too_short" msgid="8145437175134998864">"Podržte zkratku"</string>
<string name="rear_display_bottom_sheet_cancel" msgid="3461468855493357248">"Zrušit"</string>
<string name="rear_display_bottom_sheet_confirm" msgid="4383356544661421206">"Otočit"</string>
<string name="rear_display_fold_bottom_sheet_title" msgid="6081542277622721548">"Rozložte telefon, selfie bude lepší"</string>
diff --git a/packages/SystemUI/res/values-da/strings.xml b/packages/SystemUI/res/values-da/strings.xml
index 775ae3a..aa0f20c 100644
--- a/packages/SystemUI/res/values-da/strings.xml
+++ b/packages/SystemUI/res/values-da/strings.xml
@@ -1004,8 +1004,7 @@
<string name="keyguard_affordance_enablement_dialog_qr_scanner_instruction" msgid="5355839079232119791">"• Installer en kameraapp"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_1" msgid="8438311171750568633">"• Appen er konfigureret"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_2" msgid="8308525385889021652">"• Mindst én enhed er tilgængelig"</string>
- <!-- no translation found for keyguard_affordance_press_too_short (8145437175134998864) -->
- <skip />
+ <string name="keyguard_affordance_press_too_short" msgid="8145437175134998864">"Hold fingeren på genvejen"</string>
<string name="rear_display_bottom_sheet_cancel" msgid="3461468855493357248">"Annuller"</string>
<string name="rear_display_bottom_sheet_confirm" msgid="4383356544661421206">"Vend nu"</string>
<string name="rear_display_fold_bottom_sheet_title" msgid="6081542277622721548">"Fold telefonen ud for at tage en bedre selfie"</string>
diff --git a/packages/SystemUI/res/values-de/strings.xml b/packages/SystemUI/res/values-de/strings.xml
index 4aa82e2..f94c192 100644
--- a/packages/SystemUI/res/values-de/strings.xml
+++ b/packages/SystemUI/res/values-de/strings.xml
@@ -1004,8 +1004,7 @@
<string name="keyguard_affordance_enablement_dialog_qr_scanner_instruction" msgid="5355839079232119791">"• Kamera-App ist installiert"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_1" msgid="8438311171750568633">"• Die App ist eingerichtet"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_2" msgid="8308525385889021652">"• Mindestens ein Gerät ist verfügbar"</string>
- <!-- no translation found for keyguard_affordance_press_too_short (8145437175134998864) -->
- <skip />
+ <string name="keyguard_affordance_press_too_short" msgid="8145437175134998864">"Verknüpfung berühren & halten"</string>
<string name="rear_display_bottom_sheet_cancel" msgid="3461468855493357248">"Abbrechen"</string>
<string name="rear_display_bottom_sheet_confirm" msgid="4383356544661421206">"Jetzt umdrehen"</string>
<string name="rear_display_fold_bottom_sheet_title" msgid="6081542277622721548">"Für ein besseres Selfie Smartphone öffnen"</string>
diff --git a/packages/SystemUI/res/values-el/strings.xml b/packages/SystemUI/res/values-el/strings.xml
index d11b91a..ea2f0c9 100644
--- a/packages/SystemUI/res/values-el/strings.xml
+++ b/packages/SystemUI/res/values-el/strings.xml
@@ -1004,8 +1004,7 @@
<string name="keyguard_affordance_enablement_dialog_qr_scanner_instruction" msgid="5355839079232119791">"• Εγκαταστήσατε μια εφαρμογή κάμερας"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_1" msgid="8438311171750568633">"• Η εφαρμογή έχει ρυθμιστεί"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_2" msgid="8308525385889021652">"• Είναι διαθέσιμη τουλάχιστον μία συσκευή"</string>
- <!-- no translation found for keyguard_affordance_press_too_short (8145437175134998864) -->
- <skip />
+ <string name="keyguard_affordance_press_too_short" msgid="8145437175134998864">"Παρατεταμένο άγγιγμα συντόμευσης"</string>
<string name="rear_display_bottom_sheet_cancel" msgid="3461468855493357248">"Ακύρωση"</string>
<string name="rear_display_bottom_sheet_confirm" msgid="4383356544661421206">"Αναστροφή τώρα"</string>
<string name="rear_display_fold_bottom_sheet_title" msgid="6081542277622721548">"Ξεδιπλώστε το τηλέφωνο για καλύτερη selfie"</string>
diff --git a/packages/SystemUI/res/values-en-rAU/strings.xml b/packages/SystemUI/res/values-en-rAU/strings.xml
index d9f17a4..faaefe0 100644
--- a/packages/SystemUI/res/values-en-rAU/strings.xml
+++ b/packages/SystemUI/res/values-en-rAU/strings.xml
@@ -1004,8 +1004,7 @@
<string name="keyguard_affordance_enablement_dialog_qr_scanner_instruction" msgid="5355839079232119791">"• Install a camera app"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_1" msgid="8438311171750568633">"• The app is set up"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_2" msgid="8308525385889021652">"• At least one device is available"</string>
- <!-- no translation found for keyguard_affordance_press_too_short (8145437175134998864) -->
- <skip />
+ <string name="keyguard_affordance_press_too_short" msgid="8145437175134998864">"Touch & hold shortcut"</string>
<string name="rear_display_bottom_sheet_cancel" msgid="3461468855493357248">"Cancel"</string>
<string name="rear_display_bottom_sheet_confirm" msgid="4383356544661421206">"Flip now"</string>
<string name="rear_display_fold_bottom_sheet_title" msgid="6081542277622721548">"Unfold phone for a better selfie"</string>
diff --git a/packages/SystemUI/res/values-en-rCA/strings.xml b/packages/SystemUI/res/values-en-rCA/strings.xml
index 98316e3..7f703df 100644
--- a/packages/SystemUI/res/values-en-rCA/strings.xml
+++ b/packages/SystemUI/res/values-en-rCA/strings.xml
@@ -1004,8 +1004,7 @@
<string name="keyguard_affordance_enablement_dialog_qr_scanner_instruction" msgid="5355839079232119791">"• Install a camera app"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_1" msgid="8438311171750568633">"• The app is set up"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_2" msgid="8308525385889021652">"• At least one device is available"</string>
- <!-- no translation found for keyguard_affordance_press_too_short (8145437175134998864) -->
- <skip />
+ <string name="keyguard_affordance_press_too_short" msgid="8145437175134998864">"Touch & hold shortcut"</string>
<string name="rear_display_bottom_sheet_cancel" msgid="3461468855493357248">"Cancel"</string>
<string name="rear_display_bottom_sheet_confirm" msgid="4383356544661421206">"Flip now"</string>
<string name="rear_display_fold_bottom_sheet_title" msgid="6081542277622721548">"Unfold phone for a better selfie"</string>
diff --git a/packages/SystemUI/res/values-en-rGB/strings.xml b/packages/SystemUI/res/values-en-rGB/strings.xml
index d9f17a4..faaefe0 100644
--- a/packages/SystemUI/res/values-en-rGB/strings.xml
+++ b/packages/SystemUI/res/values-en-rGB/strings.xml
@@ -1004,8 +1004,7 @@
<string name="keyguard_affordance_enablement_dialog_qr_scanner_instruction" msgid="5355839079232119791">"• Install a camera app"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_1" msgid="8438311171750568633">"• The app is set up"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_2" msgid="8308525385889021652">"• At least one device is available"</string>
- <!-- no translation found for keyguard_affordance_press_too_short (8145437175134998864) -->
- <skip />
+ <string name="keyguard_affordance_press_too_short" msgid="8145437175134998864">"Touch & hold shortcut"</string>
<string name="rear_display_bottom_sheet_cancel" msgid="3461468855493357248">"Cancel"</string>
<string name="rear_display_bottom_sheet_confirm" msgid="4383356544661421206">"Flip now"</string>
<string name="rear_display_fold_bottom_sheet_title" msgid="6081542277622721548">"Unfold phone for a better selfie"</string>
diff --git a/packages/SystemUI/res/values-en-rIN/strings.xml b/packages/SystemUI/res/values-en-rIN/strings.xml
index d9f17a4..faaefe0 100644
--- a/packages/SystemUI/res/values-en-rIN/strings.xml
+++ b/packages/SystemUI/res/values-en-rIN/strings.xml
@@ -1004,8 +1004,7 @@
<string name="keyguard_affordance_enablement_dialog_qr_scanner_instruction" msgid="5355839079232119791">"• Install a camera app"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_1" msgid="8438311171750568633">"• The app is set up"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_2" msgid="8308525385889021652">"• At least one device is available"</string>
- <!-- no translation found for keyguard_affordance_press_too_short (8145437175134998864) -->
- <skip />
+ <string name="keyguard_affordance_press_too_short" msgid="8145437175134998864">"Touch & hold shortcut"</string>
<string name="rear_display_bottom_sheet_cancel" msgid="3461468855493357248">"Cancel"</string>
<string name="rear_display_bottom_sheet_confirm" msgid="4383356544661421206">"Flip now"</string>
<string name="rear_display_fold_bottom_sheet_title" msgid="6081542277622721548">"Unfold phone for a better selfie"</string>
diff --git a/packages/SystemUI/res/values-en-rXC/strings.xml b/packages/SystemUI/res/values-en-rXC/strings.xml
index 7352d01..e21550f 100644
--- a/packages/SystemUI/res/values-en-rXC/strings.xml
+++ b/packages/SystemUI/res/values-en-rXC/strings.xml
@@ -1004,8 +1004,7 @@
<string name="keyguard_affordance_enablement_dialog_qr_scanner_instruction" msgid="5355839079232119791">"• Install a camera app"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_1" msgid="8438311171750568633">"• The app is set up"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_2" msgid="8308525385889021652">"• At least one device is available"</string>
- <!-- no translation found for keyguard_affordance_press_too_short (8145437175134998864) -->
- <skip />
+ <string name="keyguard_affordance_press_too_short" msgid="8145437175134998864">"Touch & hold shortcut"</string>
<string name="rear_display_bottom_sheet_cancel" msgid="3461468855493357248">"Cancel"</string>
<string name="rear_display_bottom_sheet_confirm" msgid="4383356544661421206">"Flip now"</string>
<string name="rear_display_fold_bottom_sheet_title" msgid="6081542277622721548">"Unfold phone for a better selfie"</string>
diff --git a/packages/SystemUI/res/values-es-rUS/strings.xml b/packages/SystemUI/res/values-es-rUS/strings.xml
index 0f766f0..def72e8 100644
--- a/packages/SystemUI/res/values-es-rUS/strings.xml
+++ b/packages/SystemUI/res/values-es-rUS/strings.xml
@@ -1004,8 +1004,7 @@
<string name="keyguard_affordance_enablement_dialog_qr_scanner_instruction" msgid="5355839079232119791">"• Se instaló la app de Cámara."</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_1" msgid="8438311171750568633">"• Se configuró la app."</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_2" msgid="8308525385889021652">"• Hay al menos un dispositivo disponible."</string>
- <!-- no translation found for keyguard_affordance_press_too_short (8145437175134998864) -->
- <skip />
+ <string name="keyguard_affordance_press_too_short" msgid="8145437175134998864">"Mantener presionado atajo"</string>
<string name="rear_display_bottom_sheet_cancel" msgid="3461468855493357248">"Cancelar"</string>
<string name="rear_display_bottom_sheet_confirm" msgid="4383356544661421206">"Girar ahora"</string>
<string name="rear_display_fold_bottom_sheet_title" msgid="6081542277622721548">"Despliega el teléfono para tomar una selfie mejor"</string>
diff --git a/packages/SystemUI/res/values-es/strings.xml b/packages/SystemUI/res/values-es/strings.xml
index 6ea8f0e..5146e74 100644
--- a/packages/SystemUI/res/values-es/strings.xml
+++ b/packages/SystemUI/res/values-es/strings.xml
@@ -1004,8 +1004,7 @@
<string name="keyguard_affordance_enablement_dialog_qr_scanner_instruction" msgid="5355839079232119791">"• Debes instalar una aplicación de cámara"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_1" msgid="8438311171750568633">"• La aplicación debe estar configurada"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_2" msgid="8308525385889021652">"• Al menos un dispositivo debe estar disponible"</string>
- <!-- no translation found for keyguard_affordance_press_too_short (8145437175134998864) -->
- <skip />
+ <string name="keyguard_affordance_press_too_short" msgid="8145437175134998864">"Mantén pulsado el acceso directo"</string>
<string name="rear_display_bottom_sheet_cancel" msgid="3461468855493357248">"Cancelar"</string>
<string name="rear_display_bottom_sheet_confirm" msgid="4383356544661421206">"Girar ahora"</string>
<string name="rear_display_fold_bottom_sheet_title" msgid="6081542277622721548">"Despliega el teléfono para hacer un selfie mejor"</string>
diff --git a/packages/SystemUI/res/values-et/strings.xml b/packages/SystemUI/res/values-et/strings.xml
index e615a0b..7b2bd3e 100644
--- a/packages/SystemUI/res/values-et/strings.xml
+++ b/packages/SystemUI/res/values-et/strings.xml
@@ -1004,8 +1004,7 @@
<string name="keyguard_affordance_enablement_dialog_qr_scanner_instruction" msgid="5355839079232119791">"• Installige kaamerarakendus"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_1" msgid="8438311171750568633">"• Rakendus on seadistatud"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_2" msgid="8308525385889021652">"• Vähemalt üks seade on saadaval"</string>
- <!-- no translation found for keyguard_affordance_press_too_short (8145437175134998864) -->
- <skip />
+ <string name="keyguard_affordance_press_too_short" msgid="8145437175134998864">"Pikalt puudutamise otsetee"</string>
<string name="rear_display_bottom_sheet_cancel" msgid="3461468855493357248">"Tühista"</string>
<string name="rear_display_bottom_sheet_confirm" msgid="4383356544661421206">"Pööra kohe ümber"</string>
<string name="rear_display_fold_bottom_sheet_title" msgid="6081542277622721548">"Voltige telefon parema selfi jaoks lahti"</string>
diff --git a/packages/SystemUI/res/values-eu/strings.xml b/packages/SystemUI/res/values-eu/strings.xml
index c574573..3fb9726 100644
--- a/packages/SystemUI/res/values-eu/strings.xml
+++ b/packages/SystemUI/res/values-eu/strings.xml
@@ -424,9 +424,9 @@
<string name="monitoring_description_named_management" msgid="505833016545056036">"Gailu hau <xliff:g id="ORGANIZATION_NAME">%1$s</xliff:g> erakundearena da.\n\nIKT saileko administratzaileak gainbegiratu eta kudeatu egin ditzake ezarpenak, enpresa-sarbidea, aplikazioak, gailuarekin erlazionatutako datuak eta gailuaren kokapen-informazioa.\n\nInformazio gehiago lortzeko, jarri IKT saileko administratzailearekin harremanetan."</string>
<string name="monitoring_financed_description_named_management" msgid="6108439201399938668">"Baliteke <xliff:g id="ORGANIZATION_NAME_0">%1$s</xliff:g> erakundeak gailu honekin erlazionatutako datuak atzitu, aplikazioak kudeatu eta gailuaren ezarpenak aldatu ahal izatea.\n\nGalderarik baduzu, jarri harremanetan <xliff:g id="ORGANIZATION_NAME_1">%2$s</xliff:g> erakundearekin."</string>
<string name="monitoring_description_management" msgid="4308879039175729014">"Gailu hau zure erakundearena da.\n\nIKT saileko administratzaileak gainbegiratu eta kudeatu egin ditzake ezarpenak, enpresa-sarbidea, aplikazioak, gailuarekin erlazionatutako datuak eta gailuaren kokapen-informazioa.\n\nInformazio gehiago lortzeko, jarri IKT saileko administratzailearekin harremanetan."</string>
- <string name="monitoring_description_management_ca_certificate" msgid="7785013130658110130">"Erakundeak ziurtagiri-emaile bat instalatu du gailuan. Baliteke sareko trafiko segurua gainbegiratzea edo aldatzea."</string>
- <string name="monitoring_description_managed_profile_ca_certificate" msgid="7904323416598435647">"Erakundeak ziurtagiri-emaile bat instalatu dizu laneko profilean. Baliteke sareko trafiko segurua gainbegiratzea edo aldatzea."</string>
- <string name="monitoring_description_ca_certificate" msgid="448923057059097497">"Ziurtagiri-emaile bat dago instalatuta gailuan. Baliteke sareko trafiko segurua gainbegiratzea edo aldatzea."</string>
+ <string name="monitoring_description_management_ca_certificate" msgid="7785013130658110130">"Erakundeak autoritate ziurtagiri-emaile bat instalatu du gailuan. Baliteke sareko trafiko segurua gainbegiratzea edo aldatzea."</string>
+ <string name="monitoring_description_managed_profile_ca_certificate" msgid="7904323416598435647">"Erakundeak autoritate ziurtagiri-emaile bat instalatu dizu laneko profilean. Baliteke sareko trafiko segurua gainbegiratzea edo aldatzea."</string>
+ <string name="monitoring_description_ca_certificate" msgid="448923057059097497">"Autoritate ziurtagiri-emaile bat dago instalatuta gailuan. Baliteke sareko trafiko segurua gainbegiratzea edo aldatzea."</string>
<string name="monitoring_description_management_network_logging" msgid="216983105036994771">"Administratzaileak sarearen erregistroak aktibatu ditu; horrela, zure gailuko trafikoa gainbegira dezake."</string>
<string name="monitoring_description_managed_profile_network_logging" msgid="6932303843097006037">"Administratzaileak sarearen erregistroak aktibatu ditu; horrela, zure laneko profileko trafikoa gainbegira dezake, baina ez zure profil pertsonalekoa."</string>
<string name="monitoring_description_named_vpn" msgid="7502657784155456414">"Gailua <xliff:g id="VPN_APP">%1$s</xliff:g> bidez dago konektatuta Internetera. IKT saileko administratzaileak laneko aplikazioen bidez egiten dituzun sareko jarduerak (mezu elektronikoak eta arakatze-datuak barne) ikusi ahalko ditu."</string>
@@ -1004,8 +1004,7 @@
<string name="keyguard_affordance_enablement_dialog_qr_scanner_instruction" msgid="5355839079232119791">"• Kamera-aplikazio bat instalatu da."</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_1" msgid="8438311171750568633">"• Aplikazioa konfiguratuta dago."</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_2" msgid="8308525385889021652">"• Gutxienez gailu bat erabilgarri dago."</string>
- <!-- no translation found for keyguard_affordance_press_too_short (8145437175134998864) -->
- <skip />
+ <string name="keyguard_affordance_press_too_short" msgid="8145437175134998864">"Eduki sakatuta lasterbidea"</string>
<string name="rear_display_bottom_sheet_cancel" msgid="3461468855493357248">"Utzi"</string>
<string name="rear_display_bottom_sheet_confirm" msgid="4383356544661421206">"Irauli"</string>
<string name="rear_display_fold_bottom_sheet_title" msgid="6081542277622721548">"Ireki telefonoa autoargazki hobeak ateratzeko"</string>
diff --git a/packages/SystemUI/res/values-fa/strings.xml b/packages/SystemUI/res/values-fa/strings.xml
index a767f4a..161117a 100644
--- a/packages/SystemUI/res/values-fa/strings.xml
+++ b/packages/SystemUI/res/values-fa/strings.xml
@@ -1004,8 +1004,7 @@
<string name="keyguard_affordance_enablement_dialog_qr_scanner_instruction" msgid="5355839079232119791">"• برنامه دوربین نصب شده باشد"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_1" msgid="8438311171750568633">"• برنامه راهاندازی شده باشد"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_2" msgid="8308525385889021652">"• حداقل یک دستگاه دردسترس باشد"</string>
- <!-- no translation found for keyguard_affordance_press_too_short (8145437175134998864) -->
- <skip />
+ <string name="keyguard_affordance_press_too_short" msgid="8145437175134998864">"میانبر را لمس کنید و نگه دارید"</string>
<string name="rear_display_bottom_sheet_cancel" msgid="3461468855493357248">"لغو کردن"</string>
<string name="rear_display_bottom_sheet_confirm" msgid="4383356544661421206">"اکنون چرخانده شود"</string>
<string name="rear_display_fold_bottom_sheet_title" msgid="6081542277622721548">"برای خویشگرفت بهتر، تلفن را باز کنید"</string>
diff --git a/packages/SystemUI/res/values-fi/strings.xml b/packages/SystemUI/res/values-fi/strings.xml
index 5dcae39..33108eb 100644
--- a/packages/SystemUI/res/values-fi/strings.xml
+++ b/packages/SystemUI/res/values-fi/strings.xml
@@ -1004,8 +1004,7 @@
<string name="keyguard_affordance_enablement_dialog_qr_scanner_instruction" msgid="5355839079232119791">"• Asenna kamerasovellus"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_1" msgid="8438311171750568633">"• Sovellus on otettu käyttöön"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_2" msgid="8308525385889021652">"• Ainakin yksi laite on käytettävissä"</string>
- <!-- no translation found for keyguard_affordance_press_too_short (8145437175134998864) -->
- <skip />
+ <string name="keyguard_affordance_press_too_short" msgid="8145437175134998864">"Kosketa pikakuvaketta pitkään"</string>
<string name="rear_display_bottom_sheet_cancel" msgid="3461468855493357248">"Peru"</string>
<string name="rear_display_bottom_sheet_confirm" msgid="4383356544661421206">"Käännä nyt"</string>
<string name="rear_display_fold_bottom_sheet_title" msgid="6081542277622721548">"Saat paremman selfien, kun levität puhelimen"</string>
diff --git a/packages/SystemUI/res/values-fr-rCA/strings.xml b/packages/SystemUI/res/values-fr-rCA/strings.xml
index 5de6b07..184b907 100644
--- a/packages/SystemUI/res/values-fr-rCA/strings.xml
+++ b/packages/SystemUI/res/values-fr-rCA/strings.xml
@@ -1004,8 +1004,7 @@
<string name="keyguard_affordance_enablement_dialog_qr_scanner_instruction" msgid="5355839079232119791">"• qu\'une application de caméra est installée;"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_1" msgid="8438311171750568633">"• que cette application est configurée;"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_2" msgid="8308525385889021652">"• qu\'au moins un appareil est utilisable;"</string>
- <!-- no translation found for keyguard_affordance_press_too_short (8145437175134998864) -->
- <skip />
+ <string name="keyguard_affordance_press_too_short" msgid="8145437175134998864">"Maintenir le doigt sur raccourci"</string>
<string name="rear_display_bottom_sheet_cancel" msgid="3461468855493357248">"Annuler"</string>
<string name="rear_display_bottom_sheet_confirm" msgid="4383356544661421206">"Retourner maintenant"</string>
<string name="rear_display_fold_bottom_sheet_title" msgid="6081542277622721548">"Déplier le téléphone pour un meilleur égoportrait"</string>
diff --git a/packages/SystemUI/res/values-fr/strings.xml b/packages/SystemUI/res/values-fr/strings.xml
index 3334972..9823ad0 100644
--- a/packages/SystemUI/res/values-fr/strings.xml
+++ b/packages/SystemUI/res/values-fr/strings.xml
@@ -85,8 +85,7 @@
<string name="screenshot_share_description" msgid="2861628935812656612">"Partager la capture d\'écran"</string>
<string name="screenshot_scroll_label" msgid="2930198809899329367">"Capturer plus"</string>
<string name="screenshot_dismiss_description" msgid="4702341245899508786">"Fermer la capture d\'écran"</string>
- <!-- no translation found for screenshot_dismiss_work_profile (3101530842987697045) -->
- <skip />
+ <string name="screenshot_dismiss_work_profile" msgid="3101530842987697045">"Ignorer le message du profil professionnel"</string>
<string name="screenshot_preview_description" msgid="7606510140714080474">"Aperçu de la capture d\'écran"</string>
<string name="screenshot_top_boundary_pct" msgid="2520148599096479332">"Limite supérieure : <xliff:g id="PERCENT">%1$d</xliff:g> pour cent"</string>
<string name="screenshot_bottom_boundary_pct" msgid="3880821519814946478">"Limite inférieure : <xliff:g id="PERCENT">%1$d</xliff:g> pour cent"</string>
@@ -876,8 +875,7 @@
<string name="media_output_dialog_accessibility_title" msgid="4681741064190167888">"Appareils disponibles pour la sortie audio."</string>
<string name="media_output_dialog_accessibility_seekbar" msgid="5332843993805568978">"Volume"</string>
<string name="media_output_dialog_volume_percentage" msgid="1613984910585111798">"<xliff:g id="PERCENTAGE">%1$d</xliff:g> %%"</string>
- <!-- no translation found for media_output_group_title_speakers_and_displays (7169712332365659820) -->
- <skip />
+ <string name="media_output_group_title_speakers_and_displays" msgid="7169712332365659820">"Enceintes et écrans"</string>
<string name="media_output_first_broadcast_title" msgid="6292237789860753022">"Fonctionnement des annonces"</string>
<string name="media_output_broadcast" msgid="3555580945878071543">"Annonce"</string>
<string name="media_output_first_notify_broadcast_message" msgid="6353857724136398494">"Les personnes à proximité équipées d\'appareils Bluetooth compatibles peuvent écouter le contenu multimédia que vous diffusez"</string>
@@ -1006,8 +1004,7 @@
<string name="keyguard_affordance_enablement_dialog_qr_scanner_instruction" msgid="5355839079232119791">"• Installer une appli d\'appareil photo"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_1" msgid="8438311171750568633">"• L\'appli est configurée"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_2" msgid="8308525385889021652">"• Au moins un appareil est disponible"</string>
- <!-- no translation found for keyguard_affordance_press_too_short (8145437175134998864) -->
- <skip />
+ <string name="keyguard_affordance_press_too_short" msgid="8145437175134998864">"Appuyez de manière prolongée sur raccourci"</string>
<string name="rear_display_bottom_sheet_cancel" msgid="3461468855493357248">"Annuler"</string>
<string name="rear_display_bottom_sheet_confirm" msgid="4383356544661421206">"Retourner maintenant"</string>
<string name="rear_display_fold_bottom_sheet_title" msgid="6081542277622721548">"Déplier le téléphone pour un meilleur selfie"</string>
diff --git a/packages/SystemUI/res/values-gl/strings.xml b/packages/SystemUI/res/values-gl/strings.xml
index 02441a3..b27bd12 100644
--- a/packages/SystemUI/res/values-gl/strings.xml
+++ b/packages/SystemUI/res/values-gl/strings.xml
@@ -1004,8 +1004,7 @@
<string name="keyguard_affordance_enablement_dialog_qr_scanner_instruction" msgid="5355839079232119791">"• Debes instalar a aplicación de cámara"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_1" msgid="8438311171750568633">"• A aplicación debe estar configurada"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_2" msgid="8308525385889021652">"• Ten que haber polo menos un dispositivo dispoñible"</string>
- <!-- no translation found for keyguard_affordance_press_too_short (8145437175134998864) -->
- <skip />
+ <string name="keyguard_affordance_press_too_short" msgid="8145437175134998864">"Mantén premido o atallo"</string>
<string name="rear_display_bottom_sheet_cancel" msgid="3461468855493357248">"Cancelar"</string>
<string name="rear_display_bottom_sheet_confirm" msgid="4383356544661421206">"Voltear agora"</string>
<string name="rear_display_fold_bottom_sheet_title" msgid="6081542277622721548">"Desprega o teléfono para unha autofoto mellor"</string>
diff --git a/packages/SystemUI/res/values-gu/strings.xml b/packages/SystemUI/res/values-gu/strings.xml
index 93e2893..e00f8d8 100644
--- a/packages/SystemUI/res/values-gu/strings.xml
+++ b/packages/SystemUI/res/values-gu/strings.xml
@@ -1004,8 +1004,7 @@
<string name="keyguard_affordance_enablement_dialog_qr_scanner_instruction" msgid="5355839079232119791">"• કૅમેરા ઍપ ઇન્સ્ટૉલ કરી છે"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_1" msgid="8438311171750568633">"• ઍપનું સેટઅપ કરેલું છે"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_2" msgid="8308525385889021652">"• ઓછામાં ઓછું એક ડિવાઇસ ઉપલબ્ધ છે"</string>
- <!-- no translation found for keyguard_affordance_press_too_short (8145437175134998864) -->
- <skip />
+ <string name="keyguard_affordance_press_too_short" msgid="8145437175134998864">"શૉર્ટકટને ટચ વડે પળભર દબાવી રાખો"</string>
<string name="rear_display_bottom_sheet_cancel" msgid="3461468855493357248">"રદ કરો"</string>
<string name="rear_display_bottom_sheet_confirm" msgid="4383356544661421206">"હમણાં જ ફ્લિપ કરો"</string>
<string name="rear_display_fold_bottom_sheet_title" msgid="6081542277622721548">"બહેતર સેલ્ફી લેવા માટે ફોન ખોલો"</string>
diff --git a/packages/SystemUI/res/values-hi/strings.xml b/packages/SystemUI/res/values-hi/strings.xml
index 0886dc5..49fb626 100644
--- a/packages/SystemUI/res/values-hi/strings.xml
+++ b/packages/SystemUI/res/values-hi/strings.xml
@@ -1004,8 +1004,7 @@
<string name="keyguard_affordance_enablement_dialog_qr_scanner_instruction" msgid="5355839079232119791">"• कैमरा ऐप्लिकेशन इंस्टॉल किया गया है"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_1" msgid="8438311171750568633">"• ऐप्लिकेशन को सेट अप किया गया है"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_2" msgid="8308525385889021652">"• कम से कम एक डिवाइस उपलब्ध है"</string>
- <!-- no translation found for keyguard_affordance_press_too_short (8145437175134998864) -->
- <skip />
+ <string name="keyguard_affordance_press_too_short" msgid="8145437175134998864">"शॉर्टकट को दबाकर रखें"</string>
<string name="rear_display_bottom_sheet_cancel" msgid="3461468855493357248">"रद्द करें"</string>
<string name="rear_display_bottom_sheet_confirm" msgid="4383356544661421206">"कैमरा अभी स्विच करें"</string>
<string name="rear_display_fold_bottom_sheet_title" msgid="6081542277622721548">"बेहतर सेल्फ़ी के लिए फ़ोन को अनफ़ोल्ड करें"</string>
diff --git a/packages/SystemUI/res/values-hr/strings.xml b/packages/SystemUI/res/values-hr/strings.xml
index e993e1c..e5253bc 100644
--- a/packages/SystemUI/res/values-hr/strings.xml
+++ b/packages/SystemUI/res/values-hr/strings.xml
@@ -1004,8 +1004,7 @@
<string name="keyguard_affordance_enablement_dialog_qr_scanner_instruction" msgid="5355839079232119791">"• Instalirajte aplikaciju fotoaparata"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_1" msgid="8438311171750568633">"• Aplikacija je postavljena"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_2" msgid="8308525385889021652">"• Dostupan je najmanje jedan uređaj"</string>
- <!-- no translation found for keyguard_affordance_press_too_short (8145437175134998864) -->
- <skip />
+ <string name="keyguard_affordance_press_too_short" msgid="8145437175134998864">"Prečac za dodirnuti i zadržati"</string>
<string name="rear_display_bottom_sheet_cancel" msgid="3461468855493357248">"Odustani"</string>
<string name="rear_display_bottom_sheet_confirm" msgid="4383356544661421206">"Okreni odmah"</string>
<string name="rear_display_fold_bottom_sheet_title" msgid="6081542277622721548">"Otvorite telefon da biste snimili bolji selfie"</string>
diff --git a/packages/SystemUI/res/values-hu/strings.xml b/packages/SystemUI/res/values-hu/strings.xml
index 5857e41..6263126 100644
--- a/packages/SystemUI/res/values-hu/strings.xml
+++ b/packages/SystemUI/res/values-hu/strings.xml
@@ -1004,8 +1004,7 @@
<string name="keyguard_affordance_enablement_dialog_qr_scanner_instruction" msgid="5355839079232119791">"• Kameraalkalmazás telepítése"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_1" msgid="8438311171750568633">"• Az alkalmazás be van állítva"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_2" msgid="8308525385889021652">"• Legalább egy eszköz rendelkezésre áll"</string>
- <!-- no translation found for keyguard_affordance_press_too_short (8145437175134998864) -->
- <skip />
+ <string name="keyguard_affordance_press_too_short" msgid="8145437175134998864">"Tartsa nyomva a parancsikont"</string>
<string name="rear_display_bottom_sheet_cancel" msgid="3461468855493357248">"Mégse"</string>
<string name="rear_display_bottom_sheet_confirm" msgid="4383356544661421206">"Átfordítás most"</string>
<string name="rear_display_fold_bottom_sheet_title" msgid="6081542277622721548">"Hajtsa ki a telefont jobb szelfi készítéséhez"</string>
diff --git a/packages/SystemUI/res/values-hy/strings.xml b/packages/SystemUI/res/values-hy/strings.xml
index 3e72737..f84530f 100644
--- a/packages/SystemUI/res/values-hy/strings.xml
+++ b/packages/SystemUI/res/values-hy/strings.xml
@@ -1004,8 +1004,7 @@
<string name="keyguard_affordance_enablement_dialog_qr_scanner_instruction" msgid="5355839079232119791">"• «Տեսախցիկ» հավելվածը տեղադրված է"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_1" msgid="8438311171750568633">"• Հավելվածը կարգավորված է"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_2" msgid="8308525385889021652">"• Հասանելի է առնվազն մեկ սարք"</string>
- <!-- no translation found for keyguard_affordance_press_too_short (8145437175134998864) -->
- <skip />
+ <string name="keyguard_affordance_press_too_short" msgid="8145437175134998864">"Հպեք դյուրանցմանը և պահեք"</string>
<string name="rear_display_bottom_sheet_cancel" msgid="3461468855493357248">"Չեղարկել"</string>
<string name="rear_display_bottom_sheet_confirm" msgid="4383356544661421206">"Շրջել հիմա"</string>
<string name="rear_display_fold_bottom_sheet_title" msgid="6081542277622721548">"Բացեք հեռախոսի փեղկը՝ ավելի լավ սելֆի անելու համար"</string>
diff --git a/packages/SystemUI/res/values-in/strings.xml b/packages/SystemUI/res/values-in/strings.xml
index 068649f..2702f92 100644
--- a/packages/SystemUI/res/values-in/strings.xml
+++ b/packages/SystemUI/res/values-in/strings.xml
@@ -1004,8 +1004,7 @@
<string name="keyguard_affordance_enablement_dialog_qr_scanner_instruction" msgid="5355839079232119791">"• Menginstal aplikasi kamera"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_1" msgid="8438311171750568633">"• Aplikasi disiapkan"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_2" msgid="8308525385889021652">"• Tersedia minimal satu perangkat"</string>
- <!-- no translation found for keyguard_affordance_press_too_short (8145437175134998864) -->
- <skip />
+ <string name="keyguard_affordance_press_too_short" msgid="8145437175134998864">"Sentuh lama pintasan"</string>
<string name="rear_display_bottom_sheet_cancel" msgid="3461468855493357248">"Batal"</string>
<string name="rear_display_bottom_sheet_confirm" msgid="4383356544661421206">"Balik sekarang"</string>
<string name="rear_display_fold_bottom_sheet_title" msgid="6081542277622721548">"Bentangkan ponsel untuk selfie yang lebih baik"</string>
diff --git a/packages/SystemUI/res/values-is/strings.xml b/packages/SystemUI/res/values-is/strings.xml
index ded5ab6..64c7677 100644
--- a/packages/SystemUI/res/values-is/strings.xml
+++ b/packages/SystemUI/res/values-is/strings.xml
@@ -1004,8 +1004,7 @@
<string name="keyguard_affordance_enablement_dialog_qr_scanner_instruction" msgid="5355839079232119791">"• Setja upp myndavélarforrit"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_1" msgid="8438311171750568633">"• Forritið er uppsett"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_2" msgid="8308525385889021652">"• Að minnsta kosti eitt tæki er tiltækt"</string>
- <!-- no translation found for keyguard_affordance_press_too_short (8145437175134998864) -->
- <skip />
+ <string name="keyguard_affordance_press_too_short" msgid="8145437175134998864">"Haltu flýtilyklinum inni"</string>
<string name="rear_display_bottom_sheet_cancel" msgid="3461468855493357248">"Hætta við"</string>
<string name="rear_display_bottom_sheet_confirm" msgid="4383356544661421206">"Snúa núna"</string>
<string name="rear_display_fold_bottom_sheet_title" msgid="6081542277622721548">"Opnaðu símann til að taka betri sjálfsmynd"</string>
diff --git a/packages/SystemUI/res/values-it/strings.xml b/packages/SystemUI/res/values-it/strings.xml
index f9e28c0..89817d1 100644
--- a/packages/SystemUI/res/values-it/strings.xml
+++ b/packages/SystemUI/res/values-it/strings.xml
@@ -1004,8 +1004,7 @@
<string name="keyguard_affordance_enablement_dialog_qr_scanner_instruction" msgid="5355839079232119791">"• Sia installata un\'app fotocamera"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_1" msgid="8438311171750568633">"• L\'app sia configurata"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_2" msgid="8308525385889021652">"• Ci sia almeno un dispositivo disponibile"</string>
- <!-- no translation found for keyguard_affordance_press_too_short (8145437175134998864) -->
- <skip />
+ <string name="keyguard_affordance_press_too_short" msgid="8145437175134998864">"Tocca scorciatoia/tieni premuto"</string>
<string name="rear_display_bottom_sheet_cancel" msgid="3461468855493357248">"Annulla"</string>
<string name="rear_display_bottom_sheet_confirm" msgid="4383356544661421206">"Gira ora"</string>
<string name="rear_display_fold_bottom_sheet_title" msgid="6081542277622721548">"Apri il telefono per un selfie migliore"</string>
diff --git a/packages/SystemUI/res/values-iw/strings.xml b/packages/SystemUI/res/values-iw/strings.xml
index 76a305b..ad9ccf1 100644
--- a/packages/SystemUI/res/values-iw/strings.xml
+++ b/packages/SystemUI/res/values-iw/strings.xml
@@ -1004,8 +1004,7 @@
<string name="keyguard_affordance_enablement_dialog_qr_scanner_instruction" msgid="5355839079232119791">"• התקנה של אפליקציית מצלמה"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_1" msgid="8438311171750568633">"• האפליקציה מוגדרת"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_2" msgid="8308525385889021652">"• יש לפחות מכשיר אחד זמין"</string>
- <!-- no translation found for keyguard_affordance_press_too_short (8145437175134998864) -->
- <skip />
+ <string name="keyguard_affordance_press_too_short" msgid="8145437175134998864">"מקש קיצור ללחיצה ארוכה"</string>
<string name="rear_display_bottom_sheet_cancel" msgid="3461468855493357248">"ביטול"</string>
<string name="rear_display_bottom_sheet_confirm" msgid="4383356544661421206">"הפכת את המכשיר"</string>
<string name="rear_display_fold_bottom_sheet_title" msgid="6081542277622721548">"כדי לצלם תמונת סלפי טובה יותר, פותחים את הטלפון"</string>
diff --git a/packages/SystemUI/res/values-ja/strings.xml b/packages/SystemUI/res/values-ja/strings.xml
index 03bcfe3..112db05 100644
--- a/packages/SystemUI/res/values-ja/strings.xml
+++ b/packages/SystemUI/res/values-ja/strings.xml
@@ -1004,8 +1004,7 @@
<string name="keyguard_affordance_enablement_dialog_qr_scanner_instruction" msgid="5355839079232119791">"• カメラアプリをインストールする"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_1" msgid="8438311171750568633">"• アプリが設定されている"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_2" msgid="8308525385889021652">"• 利用できるデバイスが 1 台以上ある"</string>
- <!-- no translation found for keyguard_affordance_press_too_short (8145437175134998864) -->
- <skip />
+ <string name="keyguard_affordance_press_too_short" msgid="8145437175134998864">"ショートカットの長押しが必要です"</string>
<string name="rear_display_bottom_sheet_cancel" msgid="3461468855493357248">"キャンセル"</string>
<string name="rear_display_bottom_sheet_confirm" msgid="4383356544661421206">"切り替えましょう"</string>
<string name="rear_display_fold_bottom_sheet_title" msgid="6081542277622721548">"高画質で撮るにはスマートフォンを開いてください"</string>
diff --git a/packages/SystemUI/res/values-ka/strings.xml b/packages/SystemUI/res/values-ka/strings.xml
index bb6e631..22e8a48 100644
--- a/packages/SystemUI/res/values-ka/strings.xml
+++ b/packages/SystemUI/res/values-ka/strings.xml
@@ -1004,8 +1004,7 @@
<string name="keyguard_affordance_enablement_dialog_qr_scanner_instruction" msgid="5355839079232119791">"• დააინსტალირეთ კამერის აპი"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_1" msgid="8438311171750568633">"• აპი დაყენებულია"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_2" msgid="8308525385889021652">"• ხელმისაწვდომია მინიმუმ ერთი მოწყობილობა"</string>
- <!-- no translation found for keyguard_affordance_press_too_short (8145437175134998864) -->
- <skip />
+ <string name="keyguard_affordance_press_too_short" msgid="8145437175134998864">"შეხების დაamp; მოცდის მალსახმობი"</string>
<string name="rear_display_bottom_sheet_cancel" msgid="3461468855493357248">"გაუქმება"</string>
<string name="rear_display_bottom_sheet_confirm" msgid="4383356544661421206">"გადაატრიალეთ ახლა"</string>
<string name="rear_display_fold_bottom_sheet_title" msgid="6081542277622721548">"გაშალეთ ტელეფონი უკეთესი სელფისთვის"</string>
diff --git a/packages/SystemUI/res/values-kk/strings.xml b/packages/SystemUI/res/values-kk/strings.xml
index 3bef384..d9ce216 100644
--- a/packages/SystemUI/res/values-kk/strings.xml
+++ b/packages/SystemUI/res/values-kk/strings.xml
@@ -1004,8 +1004,7 @@
<string name="keyguard_affordance_enablement_dialog_qr_scanner_instruction" msgid="5355839079232119791">"• Камера қолданбасын орнатыңыз"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_1" msgid="8438311171750568633">"• Қолданба реттелген"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_2" msgid="8308525385889021652">"• Кемінде бір құрылғы қолжетімді"</string>
- <!-- no translation found for keyguard_affordance_press_too_short (8145437175134998864) -->
- <skip />
+ <string name="keyguard_affordance_press_too_short" msgid="8145437175134998864">"Таңбашаны басып тұрыңыз."</string>
<string name="rear_display_bottom_sheet_cancel" msgid="3461468855493357248">"Бас тарту"</string>
<string name="rear_display_bottom_sheet_confirm" msgid="4383356544661421206">"Айналдыру"</string>
<string name="rear_display_fold_bottom_sheet_title" msgid="6081542277622721548">"Жақсырақ селфи түсіру үшін телефонды жазыңыз"</string>
diff --git a/packages/SystemUI/res/values-km/strings.xml b/packages/SystemUI/res/values-km/strings.xml
index db08c34..830f2f2 100644
--- a/packages/SystemUI/res/values-km/strings.xml
+++ b/packages/SystemUI/res/values-km/strings.xml
@@ -1004,8 +1004,7 @@
<string name="keyguard_affordance_enablement_dialog_qr_scanner_instruction" msgid="5355839079232119791">"• ដំឡើងកម្មវិធីកាមេរ៉ា"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_1" msgid="8438311171750568633">"• កម្មវិធីត្រូវបានរៀបចំ"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_2" msgid="8308525385889021652">"• ឧបករណ៍យ៉ាងតិចមួយអាចប្រើបាន"</string>
- <!-- no translation found for keyguard_affordance_press_too_short (8145437175134998864) -->
- <skip />
+ <string name="keyguard_affordance_press_too_short" msgid="8145437175134998864">"ចុចឱ្យជាប់លើផ្លូវកាត់"</string>
<string name="rear_display_bottom_sheet_cancel" msgid="3461468855493357248">"បោះបង់"</string>
<string name="rear_display_bottom_sheet_confirm" msgid="4383356544661421206">"ត្រឡប់ឥឡូវនេះ"</string>
<string name="rear_display_fold_bottom_sheet_title" msgid="6081542277622721548">"លាតទូរសព្ទ ដើម្បីសែលហ្វីកាន់តែប្រសើរ"</string>
diff --git a/packages/SystemUI/res/values-kn/strings.xml b/packages/SystemUI/res/values-kn/strings.xml
index 55f4814..b142a10 100644
--- a/packages/SystemUI/res/values-kn/strings.xml
+++ b/packages/SystemUI/res/values-kn/strings.xml
@@ -1004,8 +1004,7 @@
<string name="keyguard_affordance_enablement_dialog_qr_scanner_instruction" msgid="5355839079232119791">"• ಕ್ಯಾಮರಾ ಆ್ಯಪ್ ಒಂದನ್ನು ಇನ್ಸ್ಟಾಲ್ ಮಾಡಿ"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_1" msgid="8438311171750568633">"• ಆ್ಯಪ್ ಅನ್ನು ಸೆಟಪ್ ಮಾಡಲಾಗಿದೆ"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_2" msgid="8308525385889021652">"• ಕನಿಷ್ಠ ಒಂದು ಸಾಧನ ಲಭ್ಯವಿದೆ"</string>
- <!-- no translation found for keyguard_affordance_press_too_short (8145437175134998864) -->
- <skip />
+ <string name="keyguard_affordance_press_too_short" msgid="8145437175134998864">"ಸ್ಪರ್ಶಿಸಿ ಹೋಲ್ಡ್ ಮಾಡಿ ಶಾರ್ಟ್ಕಟ್"</string>
<string name="rear_display_bottom_sheet_cancel" msgid="3461468855493357248">"ರದ್ದುಗೊಳಿಸಿ"</string>
<string name="rear_display_bottom_sheet_confirm" msgid="4383356544661421206">"ಈಗ ಫ್ಲಿಪ್ ಮಾಡಿ"</string>
<string name="rear_display_fold_bottom_sheet_title" msgid="6081542277622721548">"ಉತ್ತಮ ಸೆಲ್ಫೀಗಾಗಿ ಫೋನ್ ಅನ್ನು ಅನ್ಫೋಲ್ಡ್ ಮಾಡಿ"</string>
diff --git a/packages/SystemUI/res/values-ko/strings.xml b/packages/SystemUI/res/values-ko/strings.xml
index 252e581..f9049f9 100644
--- a/packages/SystemUI/res/values-ko/strings.xml
+++ b/packages/SystemUI/res/values-ko/strings.xml
@@ -1004,8 +1004,7 @@
<string name="keyguard_affordance_enablement_dialog_qr_scanner_instruction" msgid="5355839079232119791">"• 카메라 앱이 설치되어 있습니다."</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_1" msgid="8438311171750568633">"• 앱이 설정되어 있습니다."</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_2" msgid="8308525385889021652">"• 1대 이상의 기기를 사용할 수 있습니다."</string>
- <!-- no translation found for keyguard_affordance_press_too_short (8145437175134998864) -->
- <skip />
+ <string name="keyguard_affordance_press_too_short" msgid="8145437175134998864">"바로가기를 길게 터치하세요."</string>
<string name="rear_display_bottom_sheet_cancel" msgid="3461468855493357248">"취소"</string>
<string name="rear_display_bottom_sheet_confirm" msgid="4383356544661421206">"지금 뒤집기"</string>
<string name="rear_display_fold_bottom_sheet_title" msgid="6081542277622721548">"휴대전화를 열어서 더 나은 셀카를 찍어보세요"</string>
diff --git a/packages/SystemUI/res/values-ky/strings.xml b/packages/SystemUI/res/values-ky/strings.xml
index 4698664..d579fc2 100644
--- a/packages/SystemUI/res/values-ky/strings.xml
+++ b/packages/SystemUI/res/values-ky/strings.xml
@@ -1004,8 +1004,7 @@
<string name="keyguard_affordance_enablement_dialog_qr_scanner_instruction" msgid="5355839079232119791">"• Камера колдонмосун орнотуу"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_1" msgid="8438311171750568633">"• Колдонмо туураланды"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_2" msgid="8308525385889021652">"• Кеминде бир түзмөк жеткиликтүү"</string>
- <!-- no translation found for keyguard_affordance_press_too_short (8145437175134998864) -->
- <skip />
+ <string name="keyguard_affordance_press_too_short" msgid="8145437175134998864">"Ыкчам баскычты басып туруңуз"</string>
<string name="rear_display_bottom_sheet_cancel" msgid="3461468855493357248">"Токтотуу"</string>
<string name="rear_display_bottom_sheet_confirm" msgid="4383356544661421206">"Азыр которуу"</string>
<string name="rear_display_fold_bottom_sheet_title" msgid="6081542277622721548">"Жакшы селфи тартуу үчүн негизги камерага которуңуз"</string>
diff --git a/packages/SystemUI/res/values-lo/strings.xml b/packages/SystemUI/res/values-lo/strings.xml
index 57442df..628d75e 100644
--- a/packages/SystemUI/res/values-lo/strings.xml
+++ b/packages/SystemUI/res/values-lo/strings.xml
@@ -1004,8 +1004,7 @@
<string name="keyguard_affordance_enablement_dialog_qr_scanner_instruction" msgid="5355839079232119791">"• ຕິດຕັ້ງແອັບກ້ອງຖ່າຍຮູບ"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_1" msgid="8438311171750568633">"• ແອັບໄດ້ຮັບການຕັ້ງຄ່າແລ້ວ"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_2" msgid="8308525385889021652">"• ມີຢ່າງໜ້ອຍ 1 ອຸປະກອນພ້ອມໃຫ້ນຳໃຊ້"</string>
- <!-- no translation found for keyguard_affordance_press_too_short (8145437175134998864) -->
- <skip />
+ <string name="keyguard_affordance_press_too_short" msgid="8145437175134998864">"ແຕະທາງລັດຄ້າງໄວ້"</string>
<string name="rear_display_bottom_sheet_cancel" msgid="3461468855493357248">"ຍົກເລີກ"</string>
<string name="rear_display_bottom_sheet_confirm" msgid="4383356544661421206">"ປີ້ນດຽວນີ້"</string>
<string name="rear_display_fold_bottom_sheet_title" msgid="6081542277622721548">"ກາງໂທລະສັບອອກເພື່ອການຖ່າຍເຊວຟີທີ່ດີຂຶ້ນ"</string>
diff --git a/packages/SystemUI/res/values-lt/strings.xml b/packages/SystemUI/res/values-lt/strings.xml
index d8bc361..73a645e 100644
--- a/packages/SystemUI/res/values-lt/strings.xml
+++ b/packages/SystemUI/res/values-lt/strings.xml
@@ -1004,8 +1004,7 @@
<string name="keyguard_affordance_enablement_dialog_qr_scanner_instruction" msgid="5355839079232119791">"• Įdiekite Fotoaparato programą"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_1" msgid="8438311171750568633">"• Programa nustatyta"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_2" msgid="8308525385889021652">"• Pasiekiamas bent vienas įrenginys"</string>
- <!-- no translation found for keyguard_affordance_press_too_short (8145437175134998864) -->
- <skip />
+ <string name="keyguard_affordance_press_too_short" msgid="8145437175134998864">"Paliesk. ir palaik. spart. klav."</string>
<string name="rear_display_bottom_sheet_cancel" msgid="3461468855493357248">"Atšaukti"</string>
<string name="rear_display_bottom_sheet_confirm" msgid="4383356544661421206">"Apversti dabar"</string>
<string name="rear_display_fold_bottom_sheet_title" msgid="6081542277622721548">"Užfiksuokite geresnę asmenukę atlenkę telefoną"</string>
diff --git a/packages/SystemUI/res/values-mk/strings.xml b/packages/SystemUI/res/values-mk/strings.xml
index 3f708f3..02bfd4f 100644
--- a/packages/SystemUI/res/values-mk/strings.xml
+++ b/packages/SystemUI/res/values-mk/strings.xml
@@ -1004,8 +1004,7 @@
<string name="keyguard_affordance_enablement_dialog_qr_scanner_instruction" msgid="5355839079232119791">"• инсталирана е апликација за камера"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_1" msgid="8438311171750568633">"• апликацијата е поставена"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_2" msgid="8308525385889021652">"• достапен е најмалку еден уред"</string>
- <!-- no translation found for keyguard_affordance_press_too_short (8145437175134998864) -->
- <skip />
+ <string name="keyguard_affordance_press_too_short" msgid="8145437175134998864">"Допрете и задржете ја кратенката"</string>
<string name="rear_display_bottom_sheet_cancel" msgid="3461468855493357248">"Откажи"</string>
<string name="rear_display_bottom_sheet_confirm" msgid="4383356544661421206">"Префрли сега"</string>
<string name="rear_display_fold_bottom_sheet_title" msgid="6081542277622721548">"Отворете го телефонот за подобро селфи"</string>
diff --git a/packages/SystemUI/res/values-ml/strings.xml b/packages/SystemUI/res/values-ml/strings.xml
index 2dd4bbd..064927a 100644
--- a/packages/SystemUI/res/values-ml/strings.xml
+++ b/packages/SystemUI/res/values-ml/strings.xml
@@ -1004,8 +1004,7 @@
<string name="keyguard_affordance_enablement_dialog_qr_scanner_instruction" msgid="5355839079232119791">"• ഒരു ക്യാമറാ ആപ്പ് ഇൻസ്റ്റാൾ ചെയ്തിട്ടുണ്ട്"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_1" msgid="8438311171750568633">"• ആപ്പ് സജ്ജീകരിച്ചിട്ടുണ്ട്"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_2" msgid="8308525385889021652">"• ഒരു ഉപകരണമെങ്കിലും ലഭ്യമാണ്"</string>
- <!-- no translation found for keyguard_affordance_press_too_short (8145437175134998864) -->
- <skip />
+ <string name="keyguard_affordance_press_too_short" msgid="8145437175134998864">"സ്പർശിച്ച് പിടിക്കുക കുറുക്കുവഴി"</string>
<string name="rear_display_bottom_sheet_cancel" msgid="3461468855493357248">"റദ്ദാക്കുക"</string>
<string name="rear_display_bottom_sheet_confirm" msgid="4383356544661421206">"ഇപ്പോൾ ഫ്ലിപ്പ് ചെയ്യൂ"</string>
<string name="rear_display_fold_bottom_sheet_title" msgid="6081542277622721548">"കൂടുതൽ മികച്ച സെൽഫി ലഭിക്കാൻ ഫോൺ അൺഫോൾഡ് ചെയ്യൂ"</string>
diff --git a/packages/SystemUI/res/values-mn/strings.xml b/packages/SystemUI/res/values-mn/strings.xml
index ed7d797..0c36e1d 100644
--- a/packages/SystemUI/res/values-mn/strings.xml
+++ b/packages/SystemUI/res/values-mn/strings.xml
@@ -1004,8 +1004,7 @@
<string name="keyguard_affordance_enablement_dialog_qr_scanner_instruction" msgid="5355839079232119791">"• Камер аппыг суулгах"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_1" msgid="8438311171750568633">"• Аппыг тохируулсан"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_2" msgid="8308525385889021652">"• Дор хаяж нэг төхөөрөмж боломжтой"</string>
- <!-- no translation found for keyguard_affordance_press_too_short (8145437175134998864) -->
- <skip />
+ <string name="keyguard_affordance_press_too_short" msgid="8145437175134998864">"Товчлолд хүрээд удаан дарна уу"</string>
<string name="rear_display_bottom_sheet_cancel" msgid="3461468855493357248">"Цуцлах"</string>
<string name="rear_display_bottom_sheet_confirm" msgid="4383356544661421206">"Одоо хөнтрөх"</string>
<string name="rear_display_fold_bottom_sheet_title" msgid="6081542277622721548">"Илүү сайн селфи хийхийн тулд утсаа дэлгэнэ үү"</string>
diff --git a/packages/SystemUI/res/values-ms/strings.xml b/packages/SystemUI/res/values-ms/strings.xml
index 0ce7d50..46aa1cb 100644
--- a/packages/SystemUI/res/values-ms/strings.xml
+++ b/packages/SystemUI/res/values-ms/strings.xml
@@ -1004,8 +1004,7 @@
<string name="keyguard_affordance_enablement_dialog_qr_scanner_instruction" msgid="5355839079232119791">"• Pasang apl kamera"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_1" msgid="8438311171750568633">"• Apl disediakan"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_2" msgid="8308525385889021652">"• Sekurang-kurangnya satu peranti tersedia"</string>
- <!-- no translation found for keyguard_affordance_press_too_short (8145437175134998864) -->
- <skip />
+ <string name="keyguard_affordance_press_too_short" msgid="8145437175134998864">"Pintasan sentuh & tahan"</string>
<string name="rear_display_bottom_sheet_cancel" msgid="3461468855493357248">"Batal"</string>
<string name="rear_display_bottom_sheet_confirm" msgid="4383356544661421206">"Balikkan sekarang"</string>
<string name="rear_display_fold_bottom_sheet_title" msgid="6081542277622721548">"Buka telefon untuk swafoto yang lebih baik"</string>
diff --git a/packages/SystemUI/res/values-my/strings.xml b/packages/SystemUI/res/values-my/strings.xml
index fc003ef..edfe2e9 100644
--- a/packages/SystemUI/res/values-my/strings.xml
+++ b/packages/SystemUI/res/values-my/strings.xml
@@ -1004,8 +1004,7 @@
<string name="keyguard_affordance_enablement_dialog_qr_scanner_instruction" msgid="5355839079232119791">"• ကင်မရာအက်ပ် ထည့်သွင်းထားရမည်"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_1" msgid="8438311171750568633">"• အက်ပ်ကို စနစ်ထည့်သွင်းထားရမည်"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_2" msgid="8308525385889021652">"• အနည်းဆုံး စက်တစ်ခုသုံးနိုင်ရမည်"</string>
- <!-- no translation found for keyguard_affordance_press_too_short (8145437175134998864) -->
- <skip />
+ <string name="keyguard_affordance_press_too_short" msgid="8145437175134998864">"ဖြတ်လမ်းလင့်ခ်ကို ထိပြီးဖိထားပါ"</string>
<string name="rear_display_bottom_sheet_cancel" msgid="3461468855493357248">"မလုပ်တော့"</string>
<string name="rear_display_bottom_sheet_confirm" msgid="4383356544661421206">"ယခုလှည့်လိုက်ပါ"</string>
<string name="rear_display_fold_bottom_sheet_title" msgid="6081542277622721548">"ပိုကောင်းသော ဆယ်လ်ဖီအတွက် ဖုန်းကိုဖြန့်လိုက်ပါ"</string>
diff --git a/packages/SystemUI/res/values-nb/strings.xml b/packages/SystemUI/res/values-nb/strings.xml
index ce1603e..eb448aa 100644
--- a/packages/SystemUI/res/values-nb/strings.xml
+++ b/packages/SystemUI/res/values-nb/strings.xml
@@ -1004,8 +1004,7 @@
<string name="keyguard_affordance_enablement_dialog_qr_scanner_instruction" msgid="5355839079232119791">"• en kameraapp er installert"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_1" msgid="8438311171750568633">"• appen er konfigurert"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_2" msgid="8308525385889021652">"• minst én enhet er tilgjengelig"</string>
- <!-- no translation found for keyguard_affordance_press_too_short (8145437175134998864) -->
- <skip />
+ <string name="keyguard_affordance_press_too_short" msgid="8145437175134998864">"Trykk på og hold inne snarveien"</string>
<string name="rear_display_bottom_sheet_cancel" msgid="3461468855493357248">"Avbryt"</string>
<string name="rear_display_bottom_sheet_confirm" msgid="4383356544661421206">"Vend nå"</string>
<string name="rear_display_fold_bottom_sheet_title" msgid="6081542277622721548">"Brett ut telefonen for å ta bedre selfier"</string>
diff --git a/packages/SystemUI/res/values-ne/strings.xml b/packages/SystemUI/res/values-ne/strings.xml
index a80abb3..f3db004 100644
--- a/packages/SystemUI/res/values-ne/strings.xml
+++ b/packages/SystemUI/res/values-ne/strings.xml
@@ -1004,8 +1004,7 @@
<string name="keyguard_affordance_enablement_dialog_qr_scanner_instruction" msgid="5355839079232119791">"• क्यामेरा एप इन्स्टल गरिएको छ"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_1" msgid="8438311171750568633">"• एप सेटअप गरिएको छ"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_2" msgid="8308525385889021652">"• कम्तीमा एउटा डिभाइस उपलब्ध छ"</string>
- <!-- no translation found for keyguard_affordance_press_too_short (8145437175134998864) -->
- <skip />
+ <string name="keyguard_affordance_press_too_short" msgid="8145437175134998864">"सर्टकट थिचिराख्नुहोस्"</string>
<string name="rear_display_bottom_sheet_cancel" msgid="3461468855493357248">"रद्द गर्नुहोस्"</string>
<string name="rear_display_bottom_sheet_confirm" msgid="4383356544661421206">"अहिले नै फ्लिप गर्नुहोस्"</string>
<string name="rear_display_fold_bottom_sheet_title" msgid="6081542277622721548">"अझ राम्रो सेल्फी खिच्न फोन अनफोल्ड गर्नुहोस्"</string>
diff --git a/packages/SystemUI/res/values-nl/strings.xml b/packages/SystemUI/res/values-nl/strings.xml
index 9fcbe3c..da60323 100644
--- a/packages/SystemUI/res/values-nl/strings.xml
+++ b/packages/SystemUI/res/values-nl/strings.xml
@@ -1004,8 +1004,7 @@
<string name="keyguard_affordance_enablement_dialog_qr_scanner_instruction" msgid="5355839079232119791">"• Er moet een camera-app zijn geïnstalleerd"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_1" msgid="8438311171750568633">"• De app is ingesteld"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_2" msgid="8308525385889021652">"• Er is ten minste één apparaat beschikbaar"</string>
- <!-- no translation found for keyguard_affordance_press_too_short (8145437175134998864) -->
- <skip />
+ <string name="keyguard_affordance_press_too_short" msgid="8145437175134998864">"Houd de sneltoets ingedrukt"</string>
<string name="rear_display_bottom_sheet_cancel" msgid="3461468855493357248">"Annuleren"</string>
<string name="rear_display_bottom_sheet_confirm" msgid="4383356544661421206">"Nu omkeren"</string>
<string name="rear_display_fold_bottom_sheet_title" msgid="6081542277622721548">"Klap de telefoon open voor een betere selfie"</string>
diff --git a/packages/SystemUI/res/values-pa/strings.xml b/packages/SystemUI/res/values-pa/strings.xml
index 5ed99e7..2a35dfc 100644
--- a/packages/SystemUI/res/values-pa/strings.xml
+++ b/packages/SystemUI/res/values-pa/strings.xml
@@ -1004,8 +1004,7 @@
<string name="keyguard_affordance_enablement_dialog_qr_scanner_instruction" msgid="5355839079232119791">"• ਕੈਮਰਾ ਐਪ ਸਥਾਪਤ ਕਰੋ"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_1" msgid="8438311171750568633">"• ਐਪ ਦਾ ਸੈੱਟਅੱਪ ਹੋ ਗਿਆ ਹੈ"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_2" msgid="8308525385889021652">"• ਘੱਟੋ-ਘੱਟ ਇੱਕ ਡੀਵਾਈਸ ਉਪਲਬਧ ਹੈ"</string>
- <!-- no translation found for keyguard_affordance_press_too_short (8145437175134998864) -->
- <skip />
+ <string name="keyguard_affordance_press_too_short" msgid="8145437175134998864">"ਸ਼ਾਰਟਕੱਟ ਨੂੰ ਸਪਰਸ਼ ਕਰ ਕੇ ਰੱਖੋ"</string>
<string name="rear_display_bottom_sheet_cancel" msgid="3461468855493357248">"ਰੱਦ ਕਰੋ"</string>
<string name="rear_display_bottom_sheet_confirm" msgid="4383356544661421206">"ਹੁਣੇ ਫਲਿੱਪ ਕਰੋ"</string>
<string name="rear_display_fold_bottom_sheet_title" msgid="6081542277622721548">"ਬਿਹਤਰ ਸੈਲਫ਼ੀ ਲਈ ਫ਼ੋਨ ਨੂੰ ਖੋਲ੍ਹੋ"</string>
diff --git a/packages/SystemUI/res/values-pl/strings.xml b/packages/SystemUI/res/values-pl/strings.xml
index be37a1b..0bc0356 100644
--- a/packages/SystemUI/res/values-pl/strings.xml
+++ b/packages/SystemUI/res/values-pl/strings.xml
@@ -1004,8 +1004,7 @@
<string name="keyguard_affordance_enablement_dialog_qr_scanner_instruction" msgid="5355839079232119791">"• Zainstalowano aplikację aparatu."</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_1" msgid="8438311171750568633">"• Aplikacja została skonfigurowana."</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_2" msgid="8308525385889021652">"• Dostępne jest co najmniej 1 urządzenie."</string>
- <!-- no translation found for keyguard_affordance_press_too_short (8145437175134998864) -->
- <skip />
+ <string name="keyguard_affordance_press_too_short" msgid="8145437175134998864">"Skrót – naciśnij i przytrzymaj"</string>
<string name="rear_display_bottom_sheet_cancel" msgid="3461468855493357248">"Anuluj"</string>
<string name="rear_display_bottom_sheet_confirm" msgid="4383356544661421206">"Przełącz teraz"</string>
<string name="rear_display_fold_bottom_sheet_title" msgid="6081542277622721548">"Rozłóż telefon, aby uzyskać lepszej jakości selfie"</string>
diff --git a/packages/SystemUI/res/values-pt-rBR/strings.xml b/packages/SystemUI/res/values-pt-rBR/strings.xml
index 88b86ac..a51eccc 100644
--- a/packages/SystemUI/res/values-pt-rBR/strings.xml
+++ b/packages/SystemUI/res/values-pt-rBR/strings.xml
@@ -1004,8 +1004,7 @@
<string name="keyguard_affordance_enablement_dialog_qr_scanner_instruction" msgid="5355839079232119791">"• Um app de câmera está instalado"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_1" msgid="8438311171750568633">"• O app está disponível"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_2" msgid="8308525385889021652">"• Pelo menos um dispositivo está disponível"</string>
- <!-- no translation found for keyguard_affordance_press_too_short (8145437175134998864) -->
- <skip />
+ <string name="keyguard_affordance_press_too_short" msgid="8145437175134998864">"Mantenha o atalho pressionado"</string>
<string name="rear_display_bottom_sheet_cancel" msgid="3461468855493357248">"Cancelar"</string>
<string name="rear_display_bottom_sheet_confirm" msgid="4383356544661421206">"Virar agora"</string>
<string name="rear_display_fold_bottom_sheet_title" msgid="6081542277622721548">"Abra o smartphone para tirar uma selfie melhor"</string>
diff --git a/packages/SystemUI/res/values-pt-rPT/strings.xml b/packages/SystemUI/res/values-pt-rPT/strings.xml
index e8cd383..27786bc 100644
--- a/packages/SystemUI/res/values-pt-rPT/strings.xml
+++ b/packages/SystemUI/res/values-pt-rPT/strings.xml
@@ -1004,8 +1004,7 @@
<string name="keyguard_affordance_enablement_dialog_qr_scanner_instruction" msgid="5355839079232119791">"• Instale uma app de câmara"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_1" msgid="8438311171750568633">"• A app está configurada"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_2" msgid="8308525385889021652">"• Está disponível, pelo menos, um dispositivo"</string>
- <!-- no translation found for keyguard_affordance_press_too_short (8145437175134998864) -->
- <skip />
+ <string name="keyguard_affordance_press_too_short" msgid="8145437175134998864">"Toque sem soltar no atalho"</string>
<string name="rear_display_bottom_sheet_cancel" msgid="3461468855493357248">"Cancelar"</string>
<string name="rear_display_bottom_sheet_confirm" msgid="4383356544661421206">"Inverter agora"</string>
<string name="rear_display_fold_bottom_sheet_title" msgid="6081542277622721548">"Desdobre o telemóvel para uma selfie melhor"</string>
diff --git a/packages/SystemUI/res/values-pt/strings.xml b/packages/SystemUI/res/values-pt/strings.xml
index 88b86ac..a51eccc 100644
--- a/packages/SystemUI/res/values-pt/strings.xml
+++ b/packages/SystemUI/res/values-pt/strings.xml
@@ -1004,8 +1004,7 @@
<string name="keyguard_affordance_enablement_dialog_qr_scanner_instruction" msgid="5355839079232119791">"• Um app de câmera está instalado"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_1" msgid="8438311171750568633">"• O app está disponível"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_2" msgid="8308525385889021652">"• Pelo menos um dispositivo está disponível"</string>
- <!-- no translation found for keyguard_affordance_press_too_short (8145437175134998864) -->
- <skip />
+ <string name="keyguard_affordance_press_too_short" msgid="8145437175134998864">"Mantenha o atalho pressionado"</string>
<string name="rear_display_bottom_sheet_cancel" msgid="3461468855493357248">"Cancelar"</string>
<string name="rear_display_bottom_sheet_confirm" msgid="4383356544661421206">"Virar agora"</string>
<string name="rear_display_fold_bottom_sheet_title" msgid="6081542277622721548">"Abra o smartphone para tirar uma selfie melhor"</string>
diff --git a/packages/SystemUI/res/values-ro/strings.xml b/packages/SystemUI/res/values-ro/strings.xml
index bd32404..318b6cf 100644
--- a/packages/SystemUI/res/values-ro/strings.xml
+++ b/packages/SystemUI/res/values-ro/strings.xml
@@ -1004,8 +1004,7 @@
<string name="keyguard_affordance_enablement_dialog_qr_scanner_instruction" msgid="5355839079232119791">"• Instalează o aplicație pentru camera foto"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_1" msgid="8438311171750568633">"• Aplicația este configurată"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_2" msgid="8308525385889021652">"• Este disponibil cel puțin un dispozitiv"</string>
- <!-- no translation found for keyguard_affordance_press_too_short (8145437175134998864) -->
- <skip />
+ <string name="keyguard_affordance_press_too_short" msgid="8145437175134998864">"Atinge lung comanda rapidă"</string>
<string name="rear_display_bottom_sheet_cancel" msgid="3461468855493357248">"Anulează"</string>
<string name="rear_display_bottom_sheet_confirm" msgid="4383356544661421206">"Întoarce-l acum"</string>
<string name="rear_display_fold_bottom_sheet_title" msgid="6081542277622721548">"Desfă telefonul pentru un selfie mai bun"</string>
diff --git a/packages/SystemUI/res/values-ru/strings.xml b/packages/SystemUI/res/values-ru/strings.xml
index 8b89ca6..9da9c6d 100644
--- a/packages/SystemUI/res/values-ru/strings.xml
+++ b/packages/SystemUI/res/values-ru/strings.xml
@@ -1004,8 +1004,7 @@
<string name="keyguard_affordance_enablement_dialog_qr_scanner_instruction" msgid="5355839079232119791">"• Установлено приложение камеры."</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_1" msgid="8438311171750568633">"• Приложение установлено."</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_2" msgid="8308525385889021652">"• Доступно хотя бы одно устройство."</string>
- <!-- no translation found for keyguard_affordance_press_too_short (8145437175134998864) -->
- <skip />
+ <string name="keyguard_affordance_press_too_short" msgid="8145437175134998864">"Нажмите и удерживайте ярлык"</string>
<string name="rear_display_bottom_sheet_cancel" msgid="3461468855493357248">"Отмена"</string>
<string name="rear_display_bottom_sheet_confirm" msgid="4383356544661421206">"Перевернуть сейчас"</string>
<string name="rear_display_fold_bottom_sheet_title" msgid="6081542277622721548">"Разложите телефон, чтобы селфи получилось лучше"</string>
diff --git a/packages/SystemUI/res/values-sl/strings.xml b/packages/SystemUI/res/values-sl/strings.xml
index e372afe..2aee459 100644
--- a/packages/SystemUI/res/values-sl/strings.xml
+++ b/packages/SystemUI/res/values-sl/strings.xml
@@ -1004,8 +1004,7 @@
<string name="keyguard_affordance_enablement_dialog_qr_scanner_instruction" msgid="5355839079232119791">"• Namestite fotografsko aplikacijo."</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_1" msgid="8438311171750568633">"• Aplikacija mora biti nastavljena."</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_2" msgid="8308525385889021652">"• Na voljo mora biti vsaj ena naprava."</string>
- <!-- no translation found for keyguard_affordance_press_too_short (8145437175134998864) -->
- <skip />
+ <string name="keyguard_affordance_press_too_short" msgid="8145437175134998864">"Pridržite bližnjico"</string>
<string name="rear_display_bottom_sheet_cancel" msgid="3461468855493357248">"Prekliči"</string>
<string name="rear_display_bottom_sheet_confirm" msgid="4383356544661421206">"Obrnite"</string>
<string name="rear_display_fold_bottom_sheet_title" msgid="6081542277622721548">"Razprite telefon za boljši selfi"</string>
diff --git a/packages/SystemUI/res/values-sr/strings.xml b/packages/SystemUI/res/values-sr/strings.xml
index bf7dcbaf..bc660e1 100644
--- a/packages/SystemUI/res/values-sr/strings.xml
+++ b/packages/SystemUI/res/values-sr/strings.xml
@@ -1004,8 +1004,7 @@
<string name="keyguard_affordance_enablement_dialog_qr_scanner_instruction" msgid="5355839079232119791">"• да сте инсталирали апликацију за камеру"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_1" msgid="8438311171750568633">"• да је апликација подешена"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_2" msgid="8308525385889021652">"• да је доступан барем један уређај"</string>
- <!-- no translation found for keyguard_affordance_press_too_short (8145437175134998864) -->
- <skip />
+ <string name="keyguard_affordance_press_too_short" msgid="8145437175134998864">"Додирните и задржите пречицу"</string>
<string name="rear_display_bottom_sheet_cancel" msgid="3461468855493357248">"Откажи"</string>
<string name="rear_display_bottom_sheet_confirm" msgid="4383356544661421206">"Обрните"</string>
<string name="rear_display_fold_bottom_sheet_title" msgid="6081542277622721548">"Отворите телефон за бољи селфи"</string>
diff --git a/packages/SystemUI/res/values-sw/strings.xml b/packages/SystemUI/res/values-sw/strings.xml
index ef87de9..530bfcc 100644
--- a/packages/SystemUI/res/values-sw/strings.xml
+++ b/packages/SystemUI/res/values-sw/strings.xml
@@ -85,8 +85,7 @@
<string name="screenshot_share_description" msgid="2861628935812656612">"Shiriki picha ya skrini"</string>
<string name="screenshot_scroll_label" msgid="2930198809899329367">"Nasa zaidi"</string>
<string name="screenshot_dismiss_description" msgid="4702341245899508786">"Ondoa picha ya skrini"</string>
- <!-- no translation found for screenshot_dismiss_work_profile (3101530842987697045) -->
- <skip />
+ <string name="screenshot_dismiss_work_profile" msgid="3101530842987697045">"Ondoa ujumbe wa wasifu wa kazini"</string>
<string name="screenshot_preview_description" msgid="7606510140714080474">"Onyesho la kukagua picha ya skrini"</string>
<string name="screenshot_top_boundary_pct" msgid="2520148599096479332">"Mpaka wa sehemu ya juu wa asilimia <xliff:g id="PERCENT">%1$d</xliff:g>"</string>
<string name="screenshot_bottom_boundary_pct" msgid="3880821519814946478">"Mpaka wa sehemu ya chini wa asilimia <xliff:g id="PERCENT">%1$d</xliff:g>"</string>
@@ -876,8 +875,7 @@
<string name="media_output_dialog_accessibility_title" msgid="4681741064190167888">"Vifaa vya kutoa sauti vilivyopo"</string>
<string name="media_output_dialog_accessibility_seekbar" msgid="5332843993805568978">"Sauti"</string>
<string name="media_output_dialog_volume_percentage" msgid="1613984910585111798">"<xliff:g id="PERCENTAGE">%1$d</xliff:g>%%"</string>
- <!-- no translation found for media_output_group_title_speakers_and_displays (7169712332365659820) -->
- <skip />
+ <string name="media_output_group_title_speakers_and_displays" msgid="7169712332365659820">"Spika na Skrini"</string>
<string name="media_output_first_broadcast_title" msgid="6292237789860753022">"Jinsi utangazaji unavyofanya kazi"</string>
<string name="media_output_broadcast" msgid="3555580945878071543">"Tangaza"</string>
<string name="media_output_first_notify_broadcast_message" msgid="6353857724136398494">"Watu walio karibu nawe wenye vifaa oanifu vya Bluetooth wanaweza kusikiliza maudhui unayoyatangaza"</string>
diff --git a/packages/SystemUI/res/values-ta/strings.xml b/packages/SystemUI/res/values-ta/strings.xml
index ffa04b0..87d20d6 100644
--- a/packages/SystemUI/res/values-ta/strings.xml
+++ b/packages/SystemUI/res/values-ta/strings.xml
@@ -1004,8 +1004,7 @@
<string name="keyguard_affordance_enablement_dialog_qr_scanner_instruction" msgid="5355839079232119791">"• கேமரா ஆப்ஸ் நிறுவப்பட்டிருக்க வேண்டும்"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_1" msgid="8438311171750568633">"• இந்த ஆப்ஸ் அமைக்கப்பட்டிருக்க வேண்டும்"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_2" msgid="8308525385889021652">"• குறைந்தபட்சம் ஒரு சாதனமாவது கிடைக்க வேண்டும்"</string>
- <!-- no translation found for keyguard_affordance_press_too_short (8145437175134998864) -->
- <skip />
+ <string name="keyguard_affordance_press_too_short" msgid="8145437175134998864">"ஷார்ட்கட்டை தொட்டுப் பிடிக்கவும்"</string>
<string name="rear_display_bottom_sheet_cancel" msgid="3461468855493357248">"ரத்துசெய்"</string>
<string name="rear_display_bottom_sheet_confirm" msgid="4383356544661421206">"இப்போது மாற்றவும்"</string>
<string name="rear_display_fold_bottom_sheet_title" msgid="6081542277622721548">"சிறந்த செல்ஃபிக்கு மொபைலை மடக்காதீர்கள்"</string>
diff --git a/packages/SystemUI/res/values-te/strings.xml b/packages/SystemUI/res/values-te/strings.xml
index 29b9679..2afff20 100644
--- a/packages/SystemUI/res/values-te/strings.xml
+++ b/packages/SystemUI/res/values-te/strings.xml
@@ -1004,8 +1004,7 @@
<string name="keyguard_affordance_enablement_dialog_qr_scanner_instruction" msgid="5355839079232119791">"• కెమెరా యాప్ ఇన్స్టాల్ చేసి ఉందని"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_1" msgid="8438311171750568633">"• యాప్ సెటప్ చేయబడి ఉందని"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_2" msgid="8308525385889021652">"• కనీసం ఒక పరికరమైనా అందుబాటులో ఉందని"</string>
- <!-- no translation found for keyguard_affordance_press_too_short (8145437175134998864) -->
- <skip />
+ <string name="keyguard_affordance_press_too_short" msgid="8145437175134998864">"షార్ట్కట్ను తాకి, నొక్కి ఉంచు"</string>
<string name="rear_display_bottom_sheet_cancel" msgid="3461468855493357248">"రద్దు చేయండి"</string>
<string name="rear_display_bottom_sheet_confirm" msgid="4383356544661421206">"ఇప్పుడే తిప్పండి"</string>
<string name="rear_display_fold_bottom_sheet_title" msgid="6081542277622721548">"మెరుగైన సెల్ఫీ కోసం ఫోన్ను అన్ఫోల్డ్ చేయండి"</string>
diff --git a/packages/SystemUI/res/values-th/strings.xml b/packages/SystemUI/res/values-th/strings.xml
index 82ab9cd..31a74d1 100644
--- a/packages/SystemUI/res/values-th/strings.xml
+++ b/packages/SystemUI/res/values-th/strings.xml
@@ -1004,8 +1004,7 @@
<string name="keyguard_affordance_enablement_dialog_qr_scanner_instruction" msgid="5355839079232119791">"• ติดตั้งแอปกล้อง"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_1" msgid="8438311171750568633">"• แอปได้รับการตั้งค่าแล้ว"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_2" msgid="8308525385889021652">"• มีอุปกรณ์พร้อมใช้งานอย่างน้อย 1 รายการ"</string>
- <!-- no translation found for keyguard_affordance_press_too_short (8145437175134998864) -->
- <skip />
+ <string name="keyguard_affordance_press_too_short" msgid="8145437175134998864">"แตะแป้นพิมพ์ลัดค้างไว้"</string>
<string name="rear_display_bottom_sheet_cancel" msgid="3461468855493357248">"ยกเลิก"</string>
<string name="rear_display_bottom_sheet_confirm" msgid="4383356544661421206">"พลิกเลย"</string>
<string name="rear_display_fold_bottom_sheet_title" msgid="6081542277622721548">"กางโทรศัพท์เพื่อเซลฟีที่ดียิ่งขึ้น"</string>
diff --git a/packages/SystemUI/res/values-tl/strings.xml b/packages/SystemUI/res/values-tl/strings.xml
index f0cfef6..cc81e71 100644
--- a/packages/SystemUI/res/values-tl/strings.xml
+++ b/packages/SystemUI/res/values-tl/strings.xml
@@ -1004,8 +1004,7 @@
<string name="keyguard_affordance_enablement_dialog_qr_scanner_instruction" msgid="5355839079232119791">"• Mag-install ng camera app"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_1" msgid="8438311171750568633">"• Na-set up ang app"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_2" msgid="8308525385889021652">"• May kahit isang device na available"</string>
- <!-- no translation found for keyguard_affordance_press_too_short (8145437175134998864) -->
- <skip />
+ <string name="keyguard_affordance_press_too_short" msgid="8145437175134998864">"Pindutin nang matagal: shortcut"</string>
<string name="rear_display_bottom_sheet_cancel" msgid="3461468855493357248">"Kanselahin"</string>
<string name="rear_display_bottom_sheet_confirm" msgid="4383356544661421206">"I-flip na ngayon"</string>
<string name="rear_display_fold_bottom_sheet_title" msgid="6081542277622721548">"I-unfold ang telepono para sa mas magandang selfie"</string>
diff --git a/packages/SystemUI/res/values-ur/strings.xml b/packages/SystemUI/res/values-ur/strings.xml
index ab09669..d432ff5 100644
--- a/packages/SystemUI/res/values-ur/strings.xml
+++ b/packages/SystemUI/res/values-ur/strings.xml
@@ -1004,8 +1004,7 @@
<string name="keyguard_affordance_enablement_dialog_qr_scanner_instruction" msgid="5355839079232119791">"• کیمرا ایپ انسٹال کریں"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_1" msgid="8438311171750568633">"• ایپ سیٹ اپ ہو گئی ہے"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_2" msgid="8308525385889021652">"• کم از کم ایک آلہ دستیاب ہے"</string>
- <!-- no translation found for keyguard_affordance_press_too_short (8145437175134998864) -->
- <skip />
+ <string name="keyguard_affordance_press_too_short" msgid="8145437175134998864">"شارٹ کٹ ٹچ کریں اور دبائے رکھیں"</string>
<string name="rear_display_bottom_sheet_cancel" msgid="3461468855493357248">"منسوخ کریں"</string>
<string name="rear_display_bottom_sheet_confirm" msgid="4383356544661421206">"اب پلٹائیں"</string>
<string name="rear_display_fold_bottom_sheet_title" msgid="6081542277622721548">"بہتر سیلفی کے لیے فون کھولیں"</string>
diff --git a/packages/SystemUI/res/values-uz/strings.xml b/packages/SystemUI/res/values-uz/strings.xml
index a309c9e..8c92678 100644
--- a/packages/SystemUI/res/values-uz/strings.xml
+++ b/packages/SystemUI/res/values-uz/strings.xml
@@ -1004,8 +1004,7 @@
<string name="keyguard_affordance_enablement_dialog_qr_scanner_instruction" msgid="5355839079232119791">"• Kamera ilovasini oʻrnating"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_1" msgid="8438311171750568633">"• Ilova sozlangan"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_2" msgid="8308525385889021652">"• Kamida bitta qurilma mavjud"</string>
- <!-- no translation found for keyguard_affordance_press_too_short (8145437175134998864) -->
- <skip />
+ <string name="keyguard_affordance_press_too_short" msgid="8145437175134998864">"Bosib turish yorligʻi"</string>
<string name="rear_display_bottom_sheet_cancel" msgid="3461468855493357248">"Bekor qilish"</string>
<string name="rear_display_bottom_sheet_confirm" msgid="4383356544661421206">"Hozir aylantirish"</string>
<string name="rear_display_fold_bottom_sheet_title" msgid="6081542277622721548">"Yaxshiroq selfi olish uchun telefonni yoying"</string>
diff --git a/packages/SystemUI/res/values-vi/strings.xml b/packages/SystemUI/res/values-vi/strings.xml
index a192813..4e70744 100644
--- a/packages/SystemUI/res/values-vi/strings.xml
+++ b/packages/SystemUI/res/values-vi/strings.xml
@@ -1004,8 +1004,7 @@
<string name="keyguard_affordance_enablement_dialog_qr_scanner_instruction" msgid="5355839079232119791">"• Cài đặt một ứng dụng máy ảnh"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_1" msgid="8438311171750568633">"• Ứng dụng được thiết lập"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_2" msgid="8308525385889021652">"• Có ít nhất một thiết bị đang hoạt động"</string>
- <!-- no translation found for keyguard_affordance_press_too_short (8145437175134998864) -->
- <skip />
+ <string name="keyguard_affordance_press_too_short" msgid="8145437175134998864">"Chạm và giữ phím tắt"</string>
<string name="rear_display_bottom_sheet_cancel" msgid="3461468855493357248">"Huỷ"</string>
<string name="rear_display_bottom_sheet_confirm" msgid="4383356544661421206">"Lật ngay"</string>
<string name="rear_display_fold_bottom_sheet_title" msgid="6081542277622721548">"Mở điện thoại ra để tự chụp ảnh chân dung đẹp hơn"</string>
diff --git a/packages/SystemUI/res/values-zh-rCN/strings.xml b/packages/SystemUI/res/values-zh-rCN/strings.xml
index 5ff90fb..f747730 100644
--- a/packages/SystemUI/res/values-zh-rCN/strings.xml
+++ b/packages/SystemUI/res/values-zh-rCN/strings.xml
@@ -1004,8 +1004,7 @@
<string name="keyguard_affordance_enablement_dialog_qr_scanner_instruction" msgid="5355839079232119791">"• 安装相机应用"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_1" msgid="8438311171750568633">"• 应用已设置完毕"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_2" msgid="8308525385889021652">"• 至少有一台设备可用"</string>
- <!-- no translation found for keyguard_affordance_press_too_short (8145437175134998864) -->
- <skip />
+ <string name="keyguard_affordance_press_too_short" msgid="8145437175134998864">"轻触并按住快捷方式"</string>
<string name="rear_display_bottom_sheet_cancel" msgid="3461468855493357248">"取消"</string>
<string name="rear_display_bottom_sheet_confirm" msgid="4383356544661421206">"立即翻转"</string>
<string name="rear_display_fold_bottom_sheet_title" msgid="6081542277622721548">"展开手机可拍出更好的自拍照"</string>
diff --git a/packages/SystemUI/res/values-zh-rHK/strings.xml b/packages/SystemUI/res/values-zh-rHK/strings.xml
index 4c38a93..01cf0dc 100644
--- a/packages/SystemUI/res/values-zh-rHK/strings.xml
+++ b/packages/SystemUI/res/values-zh-rHK/strings.xml
@@ -1004,8 +1004,7 @@
<string name="keyguard_affordance_enablement_dialog_qr_scanner_instruction" msgid="5355839079232119791">"• 安裝相機應用程式"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_1" msgid="8438311171750568633">"• 應用程式已完成設定"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_2" msgid="8308525385889021652">"• 至少一部裝置可用"</string>
- <!-- no translation found for keyguard_affordance_press_too_short (8145437175134998864) -->
- <skip />
+ <string name="keyguard_affordance_press_too_short" msgid="8145437175134998864">"輕觸並按住快速鍵"</string>
<string name="rear_display_bottom_sheet_cancel" msgid="3461468855493357248">"取消"</string>
<string name="rear_display_bottom_sheet_confirm" msgid="4383356544661421206">"立即翻轉"</string>
<string name="rear_display_fold_bottom_sheet_title" msgid="6081542277622721548">"打開手機,即可拍攝更出色的自拍"</string>
diff --git a/packages/SystemUI/res/values-zh-rTW/strings.xml b/packages/SystemUI/res/values-zh-rTW/strings.xml
index c122dd1..0c9bf99 100644
--- a/packages/SystemUI/res/values-zh-rTW/strings.xml
+++ b/packages/SystemUI/res/values-zh-rTW/strings.xml
@@ -1004,8 +1004,7 @@
<string name="keyguard_affordance_enablement_dialog_qr_scanner_instruction" msgid="5355839079232119791">"• 安裝相機應用程式"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_1" msgid="8438311171750568633">"• 完成應用程式設定"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_2" msgid="8308525385889021652">"• 至少要有一部可用裝置"</string>
- <!-- no translation found for keyguard_affordance_press_too_short (8145437175134998864) -->
- <skip />
+ <string name="keyguard_affordance_press_too_short" msgid="8145437175134998864">"按住快速鍵"</string>
<string name="rear_display_bottom_sheet_cancel" msgid="3461468855493357248">"取消"</string>
<string name="rear_display_bottom_sheet_confirm" msgid="4383356544661421206">"立即翻轉"</string>
<string name="rear_display_fold_bottom_sheet_title" msgid="6081542277622721548">"打開手機自拍效果較佳"</string>
diff --git a/packages/SystemUI/res/values-zu/strings.xml b/packages/SystemUI/res/values-zu/strings.xml
index 5fd83c6..029cbb0 100644
--- a/packages/SystemUI/res/values-zu/strings.xml
+++ b/packages/SystemUI/res/values-zu/strings.xml
@@ -1004,8 +1004,7 @@
<string name="keyguard_affordance_enablement_dialog_qr_scanner_instruction" msgid="5355839079232119791">"• Faka i-app yekhamera"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_1" msgid="8438311171750568633">"• I-app isethiwe"</string>
<string name="keyguard_affordance_enablement_dialog_home_instruction_2" msgid="8308525385889021652">"• Okungenani idivayisi eyodwa iyatholakala"</string>
- <!-- no translation found for keyguard_affordance_press_too_short (8145437175134998864) -->
- <skip />
+ <string name="keyguard_affordance_press_too_short" msgid="8145437175134998864">"Thinta futhi ubambe isinqamuleli"</string>
<string name="rear_display_bottom_sheet_cancel" msgid="3461468855493357248">"Khansela"</string>
<string name="rear_display_bottom_sheet_confirm" msgid="4383356544661421206">"Phendula manje"</string>
<string name="rear_display_fold_bottom_sheet_title" msgid="6081542277622721548">"Vula ifoni ukuze ube nesithombe ozishuthe sona esingcono"</string>
diff --git a/packages/SystemUI/res/values/strings.xml b/packages/SystemUI/res/values/strings.xml
index 200c478..977adde 100644
--- a/packages/SystemUI/res/values/strings.xml
+++ b/packages/SystemUI/res/values/strings.xml
@@ -2362,6 +2362,8 @@
<string name="media_transfer_playing_different_device">Playing on <xliff:g id="deviceName" example="My Tablet">%1$s</xliff:g></string>
<!-- Text informing the user that the media transfer has failed because something went wrong. [CHAR LIsMIT=50] -->
<string name="media_transfer_failed">Something went wrong. Try again.</string>
+ <!-- Text to indicate that a media transfer is currently in-progress, aka loading. [CHAR LIMIT=NONE] -->
+ <string name="media_transfer_loading">Loading</string>
<!-- Error message indicating that a control timed out while waiting for an update [CHAR_LIMIT=30] -->
<string name="controls_error_timeout">Inactive, check app</string>
diff --git a/packages/SystemUI/shared/src/com/android/systemui/shared/recents/IOverviewProxy.aidl b/packages/SystemUI/shared/src/com/android/systemui/shared/recents/IOverviewProxy.aidl
index abefeba..a71fb56 100644
--- a/packages/SystemUI/shared/src/com/android/systemui/shared/recents/IOverviewProxy.aidl
+++ b/packages/SystemUI/shared/src/com/android/systemui/shared/recents/IOverviewProxy.aidl
@@ -46,8 +46,9 @@
/**
* Sent when device assistant changes its default assistant whether it is available or not.
+ * @param longPressHomeEnabled if 3-button nav assistant can be invoked or not
*/
- void onAssistantAvailable(boolean available) = 13;
+ void onAssistantAvailable(boolean available, boolean longPressHomeEnabled) = 13;
/**
* Sent when the assistant changes how visible it is to the user.
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardPINView.java b/packages/SystemUI/src/com/android/keyguard/KeyguardPINView.java
index 061ca4f..67e3400 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardPINView.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardPINView.java
@@ -177,6 +177,8 @@
@Override
public void startAppearAnimation() {
+ setAlpha(1f);
+ setTranslationY(0);
if (mAppearAnimator.isRunning()) {
mAppearAnimator.cancel();
}
@@ -213,7 +215,6 @@
/** Animate subviews according to expansion or time. */
private void animate(float progress) {
- setAlpha(progress);
Interpolator standardDecelerate = Interpolators.STANDARD_DECELERATE;
Interpolator legacyDecelerate = Interpolators.LEGACY_DECELERATE;
diff --git a/packages/SystemUI/src/com/android/keyguard/logging/KeyguardLogger.kt b/packages/SystemUI/src/com/android/keyguard/logging/KeyguardLogger.kt
index 886d110..b84fb08 100644
--- a/packages/SystemUI/src/com/android/keyguard/logging/KeyguardLogger.kt
+++ b/packages/SystemUI/src/com/android/keyguard/logging/KeyguardLogger.kt
@@ -17,12 +17,13 @@
package com.android.keyguard.logging
import com.android.systemui.log.dagger.KeyguardLog
+import com.android.systemui.plugins.log.ConstantStringsLogger
+import com.android.systemui.plugins.log.ConstantStringsLoggerImpl
import com.android.systemui.plugins.log.LogBuffer
import com.android.systemui.plugins.log.LogLevel.DEBUG
import com.android.systemui.plugins.log.LogLevel.ERROR
import com.android.systemui.plugins.log.LogLevel.INFO
import com.android.systemui.plugins.log.LogLevel.VERBOSE
-import com.android.systemui.plugins.log.LogLevel.WARNING
import com.google.errorprone.annotations.CompileTimeConstant
import javax.inject.Inject
@@ -33,14 +34,8 @@
* temporary logs or logs for smaller classes when creating whole new [LogBuffer] wrapper might be
* an overkill.
*/
-class KeyguardLogger @Inject constructor(@KeyguardLog private val buffer: LogBuffer) {
- fun d(@CompileTimeConstant msg: String) = buffer.log(TAG, DEBUG, msg)
-
- fun e(@CompileTimeConstant msg: String) = buffer.log(TAG, ERROR, msg)
-
- fun v(@CompileTimeConstant msg: String) = buffer.log(TAG, VERBOSE, msg)
-
- fun w(@CompileTimeConstant msg: String) = buffer.log(TAG, WARNING, msg)
+class KeyguardLogger @Inject constructor(@KeyguardLog private val buffer: LogBuffer) :
+ ConstantStringsLogger by ConstantStringsLoggerImpl(buffer, TAG) {
fun logException(ex: Exception, @CompileTimeConstant logMsg: String) {
buffer.log(TAG, ERROR, {}, { logMsg }, exception = ex)
diff --git a/packages/SystemUI/src/com/android/keyguard/mediator/ScreenOnCoordinator.kt b/packages/SystemUI/src/com/android/keyguard/mediator/ScreenOnCoordinator.kt
index 98ac2c0..0f00a04 100644
--- a/packages/SystemUI/src/com/android/keyguard/mediator/ScreenOnCoordinator.kt
+++ b/packages/SystemUI/src/com/android/keyguard/mediator/ScreenOnCoordinator.kt
@@ -17,8 +17,10 @@
package com.android.keyguard.mediator
import android.annotation.BinderThread
+import android.os.Handler
import android.os.Trace
import com.android.systemui.dagger.SysUISingleton
+import com.android.systemui.dagger.qualifiers.Main
import com.android.systemui.unfold.SysUIUnfoldComponent
import com.android.systemui.util.concurrency.PendingTasksContainer
import com.android.systemui.util.kotlin.getOrNull
@@ -33,7 +35,8 @@
*/
@SysUISingleton
class ScreenOnCoordinator @Inject constructor(
- unfoldComponent: Optional<SysUIUnfoldComponent>
+ unfoldComponent: Optional<SysUIUnfoldComponent>,
+ @Main private val mainHandler: Handler
) {
private val unfoldLightRevealAnimation = unfoldComponent.map(
@@ -55,7 +58,11 @@
unfoldLightRevealAnimation?.onScreenTurningOn(pendingTasks.registerTask("unfold-reveal"))
foldAodAnimationController?.onScreenTurningOn(pendingTasks.registerTask("fold-to-aod"))
- pendingTasks.onTasksComplete { onDrawn.run() }
+ pendingTasks.onTasksComplete {
+ mainHandler.post {
+ onDrawn.run()
+ }
+ }
Trace.endSection()
}
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/SideFpsController.kt b/packages/SystemUI/src/com/android/systemui/biometrics/SideFpsController.kt
index 17ebdad..1afa9b2 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/SideFpsController.kt
+++ b/packages/SystemUI/src/com/android/systemui/biometrics/SideFpsController.kt
@@ -110,6 +110,9 @@
private val animationDuration =
context.resources.getInteger(android.R.integer.config_mediumAnimTime).toLong()
+ private val isReverseDefaultRotation =
+ context.getResources().getBoolean(com.android.internal.R.bool.config_reverseDefaultRotation)
+
private var overlayHideAnimator: ViewPropertyAnimator? = null
private var overlayView: View? = null
@@ -217,8 +220,17 @@
overlayOffsets = offsets
val lottie = view.findViewById(R.id.sidefps_animation) as LottieAnimationView
- view.rotation = display.asSideFpsAnimationRotation(offsets.isYAligned())
- lottie.setAnimation(display.asSideFpsAnimation(offsets.isYAligned()))
+ view.rotation =
+ display.asSideFpsAnimationRotation(
+ offsets.isYAligned(),
+ getRotationFromDefault(display.rotation)
+ )
+ lottie.setAnimation(
+ display.asSideFpsAnimation(
+ offsets.isYAligned(),
+ getRotationFromDefault(display.rotation)
+ )
+ )
lottie.addLottieOnCompositionLoadedListener {
// Check that view is not stale, and that overlayView has not been hidden/removed
if (overlayView != null && overlayView == view) {
@@ -253,11 +265,13 @@
@VisibleForTesting
internal fun updateOverlayParams(display: Display, bounds: Rect) {
val isNaturalOrientation = display.isNaturalOrientation()
+ val isDefaultOrientation =
+ if (isReverseDefaultRotation) !isNaturalOrientation else isNaturalOrientation
val size = windowManager.maximumWindowMetrics.bounds
- val displayWidth = if (isNaturalOrientation) size.width() else size.height()
- val displayHeight = if (isNaturalOrientation) size.height() else size.width()
- val boundsWidth = if (isNaturalOrientation) bounds.width() else bounds.height()
- val boundsHeight = if (isNaturalOrientation) bounds.height() else bounds.width()
+ val displayWidth = if (isDefaultOrientation) size.width() else size.height()
+ val displayHeight = if (isDefaultOrientation) size.height() else size.width()
+ val boundsWidth = if (isDefaultOrientation) bounds.width() else bounds.height()
+ val boundsHeight = if (isDefaultOrientation) bounds.height() else bounds.width()
val sensorBounds =
if (overlayOffsets.isYAligned()) {
Rect(
@@ -278,7 +292,7 @@
RotationUtils.rotateBounds(
sensorBounds,
Rect(0, 0, displayWidth, displayHeight),
- display.rotation
+ getRotationFromDefault(display.rotation)
)
overlayViewParams.x = sensorBounds.left
@@ -319,6 +333,9 @@
view.visibility = View.VISIBLE
}
}
+
+ private fun getRotationFromDefault(rotation: Int): Int =
+ if (isReverseDefaultRotation) (rotation + 1) % 4 else rotation
}
private val FingerprintManager?.sideFpsSensorProperties: FingerprintSensorPropertiesInternal?
@@ -344,15 +361,15 @@
getTasks(1).firstOrNull()?.topActivity?.className ?: ""
@RawRes
-private fun Display.asSideFpsAnimation(yAligned: Boolean): Int =
- when (rotation) {
+private fun Display.asSideFpsAnimation(yAligned: Boolean, rotationFromDefault: Int): Int =
+ when (rotationFromDefault) {
Surface.ROTATION_0 -> if (yAligned) R.raw.sfps_pulse else R.raw.sfps_pulse_landscape
Surface.ROTATION_180 -> if (yAligned) R.raw.sfps_pulse else R.raw.sfps_pulse_landscape
else -> if (yAligned) R.raw.sfps_pulse_landscape else R.raw.sfps_pulse
}
-private fun Display.asSideFpsAnimationRotation(yAligned: Boolean): Float =
- when (rotation) {
+private fun Display.asSideFpsAnimationRotation(yAligned: Boolean, rotationFromDefault: Int): Float =
+ when (rotationFromDefault) {
Surface.ROTATION_90 -> if (yAligned) 0f else 180f
Surface.ROTATION_180 -> 180f
Surface.ROTATION_270 -> if (yAligned) 180f else 0f
diff --git a/packages/SystemUI/src/com/android/systemui/classifier/TypeClassifier.java b/packages/SystemUI/src/com/android/systemui/classifier/TypeClassifier.java
index f576a5a..d8d2c98 100644
--- a/packages/SystemUI/src/com/android/systemui/classifier/TypeClassifier.java
+++ b/packages/SystemUI/src/com/android/systemui/classifier/TypeClassifier.java
@@ -69,6 +69,8 @@
// A more sophisticated thing to do here would be to look at the size of the
// vertical change relative to the screen size. _Some_ amount of vertical
// change should be expected.
+ wrongDirection = vertical;
+ break;
case NOTIFICATION_DISMISS:
wrongDirection = vertical;
break;
diff --git a/packages/SystemUI/src/com/android/systemui/flags/Flags.kt b/packages/SystemUI/src/com/android/systemui/flags/Flags.kt
index 7c4fa6c..e40c988 100644
--- a/packages/SystemUI/src/com/android/systemui/flags/Flags.kt
+++ b/packages/SystemUI/src/com/android/systemui/flags/Flags.kt
@@ -85,8 +85,7 @@
// TODO(b/259559750): Tracking Bug
val SEMI_STABLE_SORT = releasedFlag(115, "semi_stable_sort")
- @JvmField
- val USE_ROUNDNESS_SOURCETYPES = unreleasedFlag(116, "use_roundness_sourcetype", teamfood = true)
+ @JvmField val USE_ROUNDNESS_SOURCETYPES = releasedFlag(116, "use_roundness_sourcetype")
// TODO(b/259217907)
@JvmField
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardUnlockAnimationController.kt b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardUnlockAnimationController.kt
index 53070a0..228320b 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardUnlockAnimationController.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardUnlockAnimationController.kt
@@ -23,6 +23,7 @@
import android.graphics.Matrix
import android.graphics.Rect
import android.os.Handler
+import android.os.PowerManager
import android.os.RemoteException
import android.util.Log
import android.view.RemoteAnimationTarget
@@ -145,7 +146,8 @@
private val featureFlags: FeatureFlags,
private val biometricUnlockControllerLazy: Lazy<BiometricUnlockController>,
private val statusBarStateController: SysuiStatusBarStateController,
- private val notificationShadeWindowController: NotificationShadeWindowController
+ private val notificationShadeWindowController: NotificationShadeWindowController,
+ private val powerManager: PowerManager
) : KeyguardStateController.Callback, ISysuiUnlockAnimationController.Stub() {
interface KeyguardUnlockAnimationListener {
@@ -344,7 +346,7 @@
override fun onAnimationEnd(animation: Animator) {
Log.d(TAG, "surfaceBehindEntryAnimator#onAnimationEnd")
playingCannedUnlockAnimation = false
- keyguardViewMediator.get().onKeyguardExitRemoteAnimationFinished(
+ keyguardViewMediator.get().exitKeyguardAndFinishSurfaceBehindRemoteAnimation(
false /* cancelled */
)
}
@@ -579,7 +581,7 @@
biometricUnlockControllerLazy.get().isWakeAndUnlock -> {
Log.d(TAG, "playCannedUnlockAnimation, isWakeAndUnlock")
setSurfaceBehindAppearAmount(1f)
- keyguardViewMediator.get().onKeyguardExitRemoteAnimationFinished(
+ keyguardViewMediator.get().exitKeyguardAndFinishSurfaceBehindRemoteAnimation(
false /* cancelled */)
}
@@ -627,7 +629,7 @@
return@postDelayed
}
- keyguardViewMediator.get().onKeyguardExitRemoteAnimationFinished(
+ keyguardViewMediator.get().exitKeyguardAndFinishSurfaceBehindRemoteAnimation(
false /* cancelled */)
}, CANNED_UNLOCK_START_DELAY)
}
@@ -745,7 +747,8 @@
!keyguardStateController.isFlingingToDismissKeyguardDuringSwipeGesture &&
dismissAmount >= DISMISS_AMOUNT_EXIT_KEYGUARD_THRESHOLD)) {
setSurfaceBehindAppearAmount(1f)
- keyguardViewMediator.get().onKeyguardExitRemoteAnimationFinished(false /* cancelled */)
+ keyguardViewMediator.get().exitKeyguardAndFinishSurfaceBehindRemoteAnimation(
+ false /* cancelled */)
}
}
@@ -783,10 +786,15 @@
surfaceHeight * SURFACE_BEHIND_SCALE_PIVOT_Y
)
- // If we're snapping the keyguard back, immediately begin fading it out.
- val animationAlpha =
- if (keyguardStateController.isSnappingKeyguardBackAfterSwipe) amount
- else surfaceBehindAlpha
+
+ val animationAlpha = when {
+ // If we're snapping the keyguard back, immediately begin fading it out.
+ keyguardStateController.isSnappingKeyguardBackAfterSwipe -> amount
+ // If the screen has turned back off, the unlock animation is going to be cancelled,
+ // so set the surface alpha to 0f so it's no longer visible.
+ !powerManager.isInteractive -> 0f
+ else -> surfaceBehindAlpha
+ }
// SyncRtSurfaceTransactionApplier cannot apply transaction when the target view is
// unable to draw
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
index 8aada1f..bb2141d 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
@@ -144,12 +144,12 @@
import com.android.systemui.statusbar.policy.UserSwitcherController;
import com.android.systemui.util.DeviceConfigProxy;
-import dagger.Lazy;
-
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.concurrent.Executor;
+import dagger.Lazy;
+
/**
* Mediates requests related to the keyguard. This includes queries about the
* state of the keyguard, power management events that effect whether the keyguard
@@ -2725,27 +2725,42 @@
}
/**
- * Called if the keyguard exit animation has been cancelled, and we should dismiss to the
- * keyguard.
+ * Called if the keyguard exit animation has been cancelled.
*
* This can happen due to the system cancelling the RemoteAnimation (due to a timeout, a new
- * app transition before finishing the current RemoteAnimation).
+ * app transition before finishing the current RemoteAnimation, or the keyguard being re-shown).
*/
private void handleCancelKeyguardExitAnimation() {
- showSurfaceBehindKeyguard();
- onKeyguardExitRemoteAnimationFinished(true /* cancelled */);
+ if (mPendingLock) {
+ Log.d(TAG, "#handleCancelKeyguardExitAnimation: keyguard exit animation cancelled. "
+ + "There's a pending lock, so we were cancelled because the device was locked "
+ + "again during the unlock sequence. We should end up locked.");
+
+ // A lock is pending, meaning the keyguard exit animation was cancelled because we're
+ // re-locking. We should just end the surface-behind animation without exiting the
+ // keyguard. The pending lock will be handled by onFinishedGoingToSleep().
+ finishSurfaceBehindRemoteAnimation(true);
+ } else {
+ Log.d(TAG, "#handleCancelKeyguardExitAnimation: keyguard exit animation cancelled. "
+ + "No pending lock, we should end up unlocked with the app/launcher visible.");
+
+ // No lock is pending, so the animation was cancelled during the unlock sequence, but
+ // we should end up unlocked. Show the surface and exit the keyguard.
+ showSurfaceBehindKeyguard();
+ exitKeyguardAndFinishSurfaceBehindRemoteAnimation(true /* cancelled */);
+ }
}
/**
- * Called when we're done running the keyguard exit animation.
+ * Called when we're done running the keyguard exit animation, we should now end up unlocked.
*
- * This will call {@link #mSurfaceBehindRemoteAnimationFinishedCallback} to let WM know that
- * we're done with the RemoteAnimation, actually hide the keyguard, and clean up state related
- * to the keyguard exit animation.
+ * This will call {@link #handleCancelKeyguardExitAnimation()} to let WM know that we're done
+ * with the RemoteAnimation, actually hide the keyguard, and clean up state related to the
+ * keyguard exit animation.
*
* @param cancelled {@code true} if the animation was cancelled before it finishes.
*/
- public void onKeyguardExitRemoteAnimationFinished(boolean cancelled) {
+ public void exitKeyguardAndFinishSurfaceBehindRemoteAnimation(boolean cancelled) {
Log.d(TAG, "onKeyguardExitRemoteAnimationFinished");
if (!mSurfaceBehindRemoteAnimationRunning && !mSurfaceBehindRemoteAnimationRequested) {
Log.d(TAG, "skip onKeyguardExitRemoteAnimationFinished cancelled=" + cancelled
@@ -2774,10 +2789,6 @@
}
finishSurfaceBehindRemoteAnimation(cancelled);
- mSurfaceBehindRemoteAnimationRequested = false;
-
- // The remote animation is over, so we're not going away anymore.
- mKeyguardStateController.notifyKeyguardGoingAway(false);
// Dispatch the callback on animation finishes.
mUpdateMonitor.dispatchKeyguardDismissAnimationFinished();
@@ -2836,13 +2847,17 @@
return mSurfaceBehindRemoteAnimationRunning;
}
- /** If it's running, finishes the RemoteAnimation on the surface behind the keyguard. */
+ /**
+ * If it's running, finishes the RemoteAnimation on the surface behind the keyguard and resets
+ * related state.
+ *
+ * This does not set keyguard state to either locked or unlocked, it simply ends the remote
+ * animation on the surface behind the keyguard. This can be called by
+ */
void finishSurfaceBehindRemoteAnimation(boolean cancelled) {
- if (!mSurfaceBehindRemoteAnimationRunning) {
- return;
- }
-
+ mSurfaceBehindRemoteAnimationRequested = false;
mSurfaceBehindRemoteAnimationRunning = false;
+ mKeyguardStateController.notifyKeyguardGoingAway(false);
if (mSurfaceBehindRemoteAnimationFinishedCallback != null) {
try {
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/PrimaryBouncerInteractor.kt b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/PrimaryBouncerInteractor.kt
index 2a3a33e..2cf5fb9 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/PrimaryBouncerInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/PrimaryBouncerInteractor.kt
@@ -77,6 +77,7 @@
/** Runnable to show the primary bouncer. */
val showRunnable = Runnable {
+ repository.setPrimaryVisible(true)
repository.setPrimaryShow(
KeyguardBouncerModel(
promptReason = repository.bouncerPromptReason ?: 0,
@@ -85,7 +86,6 @@
)
)
repository.setPrimaryShowingSoon(false)
- repository.setPrimaryVisible(true)
primaryBouncerCallbackInteractor.dispatchVisibilityChanged(View.VISIBLE)
}
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 e3730af..bc29858 100644
--- a/packages/SystemUI/src/com/android/systemui/log/dagger/LogModule.java
+++ b/packages/SystemUI/src/com/android/systemui/log/dagger/LogModule.java
@@ -94,6 +94,14 @@
return factory.create("LSShadeTransitionLog", 50);
}
+ /** Provides a logging buffer for shade window messages. */
+ @Provides
+ @SysUISingleton
+ @ShadeWindowLog
+ public static LogBuffer provideShadeWindowLogBuffer(LogBufferFactory factory) {
+ return factory.create("ShadeWindowLog", 600, false);
+ }
+
/** Provides a logging buffer for Shade messages. */
@Provides
@SysUISingleton
diff --git a/packages/SystemUI/src/com/android/systemui/log/dagger/ShadeWindowLog.java b/packages/SystemUI/src/com/android/systemui/log/dagger/ShadeWindowLog.java
new file mode 100644
index 0000000..1d2b68c
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/log/dagger/ShadeWindowLog.java
@@ -0,0 +1,33 @@
+/*
+ * 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.log.dagger;
+
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import com.android.systemui.plugins.log.LogBuffer;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+
+import javax.inject.Qualifier;
+
+/** A {@link LogBuffer} for shade window modification messages. */
+@Qualifier
+@Documented
+@Retention(RUNTIME)
+public @interface ShadeWindowLog {
+}
diff --git a/packages/SystemUI/src/com/android/systemui/media/controls/ui/MediaControlPanel.java b/packages/SystemUI/src/com/android/systemui/media/controls/ui/MediaControlPanel.java
index db7a145..15c3443 100644
--- a/packages/SystemUI/src/com/android/systemui/media/controls/ui/MediaControlPanel.java
+++ b/packages/SystemUI/src/com/android/systemui/media/controls/ui/MediaControlPanel.java
@@ -1070,7 +1070,9 @@
TurbulenceNoiseAnimationConfig.DEFAULT_OPACITY,
/* width= */ mMediaViewHolder.getMultiRippleView().getWidth(),
/* height= */ mMediaViewHolder.getMultiRippleView().getHeight(),
- TurbulenceNoiseAnimationConfig.DEFAULT_NOISE_DURATION_IN_MILLIS,
+ TurbulenceNoiseAnimationConfig.DEFAULT_MAX_DURATION_IN_MILLIS,
+ TurbulenceNoiseAnimationConfig.DEFAULT_EASING_DURATION_IN_MILLIS,
+ TurbulenceNoiseAnimationConfig.DEFAULT_EASING_DURATION_IN_MILLIS,
this.getContext().getResources().getDisplayMetrics().density,
BlendMode.PLUS,
/* onAnimationEnd= */ null
diff --git a/packages/SystemUI/src/com/android/systemui/media/controls/ui/MediaViewController.kt b/packages/SystemUI/src/com/android/systemui/media/controls/ui/MediaViewController.kt
index 4feb984..3224213 100644
--- a/packages/SystemUI/src/com/android/systemui/media/controls/ui/MediaViewController.kt
+++ b/packages/SystemUI/src/com/android/systemui/media/controls/ui/MediaViewController.kt
@@ -82,6 +82,13 @@
R.id.header_artist,
R.id.actionPlayPause,
)
+
+ val backgroundIds =
+ setOf(
+ R.id.album_art,
+ R.id.turbulence_noise_view,
+ R.id.touch_ripple_view,
+ )
}
/** A listener when the current dimensions of the player change */
@@ -295,7 +302,8 @@
squishFraction: Float
): TransitionViewState {
val squishedViewState = viewState.copy()
- squishedViewState.height = (squishedViewState.height * squishFraction).toInt()
+ val squishedHeight = (squishedViewState.measureHeight * squishFraction).toInt()
+ squishedViewState.height = squishedHeight
controlIds.forEach { id ->
squishedViewState.widgetStates.get(id)?.let { state ->
state.alpha = calculateAlpha(squishFraction, CONTROLS_DELAY, DURATION)
@@ -308,6 +316,14 @@
}
}
+ // We are not overriding the squishedViewStates height but only the children to avoid
+ // them remeasuring the whole view. Instead it just remains as the original size
+ backgroundIds.forEach { id ->
+ squishedViewState.widgetStates.get(id)?.let { state ->
+ state.height = squishedHeight
+ }
+ }
+
RecommendationViewHolder.mediaContainersIds.forEach { id ->
squishedViewState.widgetStates.get(id)?.let { state ->
state.alpha = calculateAlpha(squishFraction, MEDIACONTAINERS_DELAY, DURATION)
@@ -421,10 +437,9 @@
fun getMeasurementsForState(hostState: MediaHostState): MeasurementOutput? =
traceSection("MediaViewController#getMeasurementsForState") {
// measurements should never factor in the squish fraction
- val viewState =
- obtainViewState(hostState.copy().also { it.squishFraction = 1.0f }) ?: return null
- measurement.measuredWidth = viewState.width
- measurement.measuredHeight = viewState.height
+ val viewState = obtainViewState(hostState) ?: return null
+ measurement.measuredWidth = viewState.measureWidth
+ measurement.measuredHeight = viewState.measureHeight
return measurement
}
@@ -453,7 +468,7 @@
// The view might not be bound yet or has never been measured and in that case will be
// reset once the state is fully available
var endViewState = obtainViewState(endHostState) ?: return
- endViewState = updateViewStateToCarouselSize(endViewState, endLocation, tmpState2)!!
+ endViewState = updateViewStateSize(endViewState, endLocation, tmpState2)!!
layoutController.setMeasureState(endViewState)
// If the view isn't bound, we can drop the animation, otherwise we'll execute it
@@ -464,7 +479,7 @@
val result: TransitionViewState
var startViewState = obtainViewState(startHostState)
- startViewState = updateViewStateToCarouselSize(startViewState, startLocation, tmpState3)
+ startViewState = updateViewStateSize(startViewState, startLocation, tmpState3)
if (!endHostState.visible) {
// Let's handle the case where the end is gone first. In this case we take the
@@ -517,18 +532,38 @@
)
}
- private fun updateViewStateToCarouselSize(
+ private fun updateViewStateSize(
viewState: TransitionViewState?,
location: Int,
outState: TransitionViewState
): TransitionViewState? {
- val result = viewState?.copy(outState) ?: return null
+ var result = viewState?.copy(outState) ?: return null
+ val state = mediaHostStatesManager.mediaHostStates[location]
val overrideSize = mediaHostStatesManager.carouselSizes[location]
+ var overridden = false
overrideSize?.let {
// To be safe we're using a maximum here. The override size should always be set
// properly though.
- result.height = Math.max(it.measuredHeight, result.height)
- result.width = Math.max(it.measuredWidth, result.width)
+ if (result.measureHeight != it.measuredHeight
+ || result.measureWidth != it.measuredWidth) {
+ result.measureHeight = Math.max(it.measuredHeight, result.measureHeight)
+ result.measureWidth = Math.max(it.measuredWidth, result.measureWidth)
+ // The measureHeight and the shown height should both be set to the overridden height
+ result.height = result.measureHeight
+ result.width = result.measureWidth
+ // Make sure all background views are also resized such that their size is correct
+ backgroundIds.forEach { id ->
+ result.widgetStates.get(id)?.let { state ->
+ state.height = result.height
+ state.width = result.width
+ }
+ }
+ overridden = true
+ }
+ }
+ if (overridden && state != null && state.squishFraction <= 1f) {
+ // Let's squish the media player if our size was overridden
+ result = squishViewState(result, state.squishFraction)
}
logger.logMediaSize("update to carousel", result.width, result.height)
return result
@@ -562,7 +597,13 @@
*/
private fun obtainViewStateForLocation(@MediaLocation location: Int): TransitionViewState? {
val mediaHostState = mediaHostStatesManager.mediaHostStates[location] ?: return null
- return obtainViewState(mediaHostState)
+ val viewState = obtainViewState(mediaHostState)
+ if (viewState != null) {
+ // update the size of the viewstate for the location with the override
+ updateViewStateSize(viewState, location, tmpState)
+ return tmpState
+ }
+ return viewState
}
/**
diff --git a/packages/SystemUI/src/com/android/systemui/navigationbar/NavBarHelper.java b/packages/SystemUI/src/com/android/systemui/navigationbar/NavBarHelper.java
index 2c0745b..a92203c 100644
--- a/packages/SystemUI/src/com/android/systemui/navigationbar/NavBarHelper.java
+++ b/packages/SystemUI/src/com/android/systemui/navigationbar/NavBarHelper.java
@@ -185,7 +185,7 @@
public void registerNavTaskStateUpdater(NavbarTaskbarStateUpdater listener) {
mA11yEventListeners.add(listener);
listener.updateAccessibilityServicesState();
- listener.updateAssistantAvailable(mAssistantAvailable);
+ listener.updateAssistantAvailable(mAssistantAvailable, mLongPressHomeEnabled);
}
public void removeNavTaskStateUpdater(NavbarTaskbarStateUpdater listener) {
@@ -198,9 +198,10 @@
}
}
- private void dispatchAssistantEventUpdate(boolean assistantAvailable) {
+ private void dispatchAssistantEventUpdate(boolean assistantAvailable,
+ boolean longPressHomeEnabled) {
for (NavbarTaskbarStateUpdater listener : mA11yEventListeners) {
- listener.updateAssistantAvailable(assistantAvailable);
+ listener.updateAssistantAvailable(assistantAvailable, longPressHomeEnabled);
}
}
@@ -311,7 +312,7 @@
mAssistantAvailable = assistantAvailableForUser
&& mAssistantTouchGestureEnabled
&& QuickStepContract.isGesturalMode(mNavBarMode);
- dispatchAssistantEventUpdate(mAssistantAvailable);
+ dispatchAssistantEventUpdate(mAssistantAvailable, mLongPressHomeEnabled);
}
public boolean getLongPressHomeEnabled() {
@@ -366,7 +367,7 @@
*/
public interface NavbarTaskbarStateUpdater {
void updateAccessibilityServicesState();
- void updateAssistantAvailable(boolean available);
+ void updateAssistantAvailable(boolean available, boolean longPressHomeEnabled);
}
/** Data class to help Taskbar/Navbar initiate state correctly when switching between the two.*/
diff --git a/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBar.java b/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBar.java
index bdb67ad..5b306c9 100644
--- a/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBar.java
+++ b/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBar.java
@@ -335,15 +335,16 @@
}
@Override
- public void updateAssistantAvailable(boolean available) {
+ public void updateAssistantAvailable(boolean available,
+ boolean longPressHomeEnabled) {
// TODO(b/198002034): Content observers currently can still be called back after
// being unregistered, and in this case we can ignore the change if the nav bar
// has been destroyed already
if (mView == null) {
return;
}
- mLongPressHomeEnabled = mNavBarHelper.getLongPressHomeEnabled();
- updateAssistantEntrypoints(available);
+ mLongPressHomeEnabled = longPressHomeEnabled;
+ updateAssistantEntrypoints(available, longPressHomeEnabled);
}
};
@@ -1485,10 +1486,12 @@
.commitUpdate(mDisplayId);
}
- private void updateAssistantEntrypoints(boolean assistantAvailable) {
+ private void updateAssistantEntrypoints(boolean assistantAvailable,
+ boolean longPressHomeEnabled) {
if (mOverviewProxyService.getProxy() != null) {
try {
- mOverviewProxyService.getProxy().onAssistantAvailable(assistantAvailable);
+ mOverviewProxyService.getProxy().onAssistantAvailable(assistantAvailable,
+ longPressHomeEnabled);
} catch (RemoteException e) {
Log.w(TAG, "Unable to send assistant availability data to launcher");
}
diff --git a/packages/SystemUI/src/com/android/systemui/navigationbar/TaskbarDelegate.java b/packages/SystemUI/src/com/android/systemui/navigationbar/TaskbarDelegate.java
index 3dec513..5e26e60 100644
--- a/packages/SystemUI/src/com/android/systemui/navigationbar/TaskbarDelegate.java
+++ b/packages/SystemUI/src/com/android/systemui/navigationbar/TaskbarDelegate.java
@@ -112,8 +112,9 @@
}
@Override
- public void updateAssistantAvailable(boolean available) {
- updateAssistantAvailability(available);
+ public void updateAssistantAvailable(boolean available,
+ boolean longPressHomeEnabled) {
+ updateAssistantAvailability(available, longPressHomeEnabled);
}
};
private int mDisabledFlags;
@@ -309,13 +310,15 @@
return (mSysUiState.getFlags() & View.STATUS_BAR_DISABLE_RECENT) == 0;
}
- private void updateAssistantAvailability(boolean assistantAvailable) {
+ private void updateAssistantAvailability(boolean assistantAvailable,
+ boolean longPressHomeEnabled) {
if (mOverviewProxyService.getProxy() == null) {
return;
}
try {
- mOverviewProxyService.getProxy().onAssistantAvailable(assistantAvailable);
+ mOverviewProxyService.getProxy().onAssistantAvailable(assistantAvailable,
+ longPressHomeEnabled);
} catch (RemoteException e) {
Log.e(TAG, "onAssistantAvailable() failed, available: " + assistantAvailable, e);
}
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSFragment.java b/packages/SystemUI/src/com/android/systemui/qs/QSFragment.java
index f8fb4e8..f49ffb4 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QSFragment.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QSFragment.java
@@ -19,6 +19,8 @@
import static com.android.systemui.media.dagger.MediaModule.QS_PANEL;
import static com.android.systemui.media.dagger.MediaModule.QUICK_QS_PANEL;
import static com.android.systemui.statusbar.DisableFlagsLogger.DisableState;
+import static com.android.systemui.statusbar.StatusBarState.KEYGUARD;
+import static com.android.systemui.statusbar.StatusBarState.SHADE_LOCKED;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
@@ -124,7 +126,7 @@
* we're on keyguard but use {@link #isKeyguardState()} instead since that is more accurate
* during state transitions which often call into us.
*/
- private int mState;
+ private int mStatusBarState = -1;
private QSContainerImplController mQSContainerImplController;
private int[] mTmpLocation = new int[2];
private int mLastViewHeight;
@@ -457,7 +459,7 @@
private boolean isKeyguardState() {
// We want the freshest state here since otherwise we'll have some weirdness if earlier
// listeners trigger updates
- return mStatusBarStateController.getState() == StatusBarState.KEYGUARD;
+ return mStatusBarStateController.getCurrentOrUpcomingState() == KEYGUARD;
}
private void updateShowCollapsedOnKeyguard() {
@@ -672,8 +674,8 @@
mQSAnimator.setPosition(expansion);
}
if (!mInSplitShade
- || mStatusBarStateController.getState() == StatusBarState.KEYGUARD
- || mStatusBarStateController.getState() == StatusBarState.SHADE_LOCKED) {
+ || mStatusBarStateController.getState() == KEYGUARD
+ || mStatusBarStateController.getState() == SHADE_LOCKED) {
// At beginning, state is 0 and will apply wrong squishiness to MediaHost in lockscreen
// and media player expect no change by squishiness in lock screen shade. Don't bother
// squishing mQsMediaHost when not in split shade to prevent problems with stale state.
@@ -703,8 +705,8 @@
// Large screens in landscape.
// Need to check upcoming state as for unlocked -> AOD transition current state is
// not updated yet, but we're transitioning and UI should already follow KEYGUARD state
- if (mTransitioningToFullShade || mStatusBarStateController.getCurrentOrUpcomingState()
- == StatusBarState.KEYGUARD) {
+ if (mTransitioningToFullShade
+ || mStatusBarStateController.getCurrentOrUpcomingState() == KEYGUARD) {
// Always use "mFullShadeProgress" on keyguard, because
// "panelExpansionFractions" is always 1 on keyguard split shade.
return mLockscreenToShadeProgress;
@@ -757,8 +759,7 @@
}
private boolean headerWillBeAnimating() {
- return mState == StatusBarState.KEYGUARD && mShowCollapsedOnKeyguard
- && !isKeyguardState();
+ return mStatusBarState == KEYGUARD && mShowCollapsedOnKeyguard && !isKeyguardState();
}
@Override
@@ -891,9 +892,23 @@
};
@Override
+ public void onUpcomingStateChanged(int upcomingState) {
+ if (upcomingState == KEYGUARD) {
+ // refresh state of QS as soon as possible - while it's still upcoming - so in case of
+ // transition to KEYGUARD (e.g. from unlocked to AOD) all objects are aware they should
+ // already behave like on keyguard. Otherwise we might be doing extra work,
+ // e.g. QSAnimator making QS visible and then quickly invisible
+ onStateChanged(upcomingState);
+ }
+ }
+
+ @Override
public void onStateChanged(int newState) {
- mState = newState;
- setKeyguardShowing(newState == StatusBarState.KEYGUARD);
+ if (newState == mStatusBarState) {
+ return;
+ }
+ mStatusBarState = newState;
+ setKeyguardShowing(newState == KEYGUARD);
updateShowCollapsedOnKeyguard();
}
@@ -921,7 +936,7 @@
indentingPw.println("mTemp: " + Arrays.toString(mLocationTemp));
indentingPw.println("mShowCollapsedOnKeyguard: " + mShowCollapsedOnKeyguard);
indentingPw.println("mLastKeyguardAndExpanded: " + mLastKeyguardAndExpanded);
- indentingPw.println("mState: " + StatusBarState.toString(mState));
+ indentingPw.println("mStatusBarState: " + StatusBarState.toString(mStatusBarState));
indentingPw.println("mTmpLocation: " + Arrays.toString(mTmpLocation));
indentingPw.println("mLastViewHeight: " + mLastViewHeight);
indentingPw.println("mLastHeaderTranslation: " + mLastHeaderTranslation);
diff --git a/packages/SystemUI/src/com/android/systemui/qs/logging/QSLogger.kt b/packages/SystemUI/src/com/android/systemui/qs/logging/QSLogger.kt
index d682853f5..9f376ae 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/logging/QSLogger.kt
+++ b/packages/SystemUI/src/com/android/systemui/qs/logging/QSLogger.kt
@@ -18,12 +18,13 @@
import android.service.quicksettings.Tile
import com.android.systemui.log.dagger.QSLog
+import com.android.systemui.plugins.log.ConstantStringsLogger
+import com.android.systemui.plugins.log.ConstantStringsLoggerImpl
import com.android.systemui.plugins.log.LogBuffer
import com.android.systemui.plugins.log.LogLevel
import com.android.systemui.plugins.log.LogLevel.DEBUG
import com.android.systemui.plugins.log.LogLevel.ERROR
import com.android.systemui.plugins.log.LogLevel.VERBOSE
-import com.android.systemui.plugins.log.LogLevel.WARNING
import com.android.systemui.plugins.log.LogMessage
import com.android.systemui.plugins.qs.QSTile
import com.android.systemui.statusbar.StatusBarState
@@ -32,17 +33,8 @@
private const val TAG = "QSLog"
-class QSLogger @Inject constructor(
- @QSLog private val buffer: LogBuffer
-) {
-
- fun d(@CompileTimeConstant msg: String) = buffer.log(TAG, DEBUG, msg)
-
- fun e(@CompileTimeConstant msg: String) = buffer.log(TAG, ERROR, msg)
-
- fun v(@CompileTimeConstant msg: String) = buffer.log(TAG, VERBOSE, msg)
-
- fun w(@CompileTimeConstant msg: String) = buffer.log(TAG, WARNING, msg)
+class QSLogger @Inject constructor(@QSLog private val buffer: LogBuffer) :
+ ConstantStringsLogger by ConstantStringsLoggerImpl(buffer, TAG) {
fun logException(@CompileTimeConstant logMsg: String, ex: Exception) {
buffer.log(TAG, ERROR, {}, { logMsg }, exception = ex)
diff --git a/packages/SystemUI/src/com/android/systemui/shade/NotificationShadeWindowControllerImpl.java b/packages/SystemUI/src/com/android/systemui/shade/NotificationShadeWindowControllerImpl.java
index 8698c04..8314ec7 100644
--- a/packages/SystemUI/src/com/android/systemui/shade/NotificationShadeWindowControllerImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/shade/NotificationShadeWindowControllerImpl.java
@@ -71,7 +71,6 @@
import java.io.PrintWriter;
import java.lang.ref.Reference;
import java.lang.ref.WeakReference;
-import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
@@ -96,6 +95,7 @@
private final IActivityManager mActivityManager;
private final DozeParameters mDozeParameters;
private final KeyguardStateController mKeyguardStateController;
+ private final ShadeWindowLogger mLogger;
private final LayoutParams mLpChanged;
private final long mLockScreenDisplayTimeout;
private final float mKeyguardPreferredRefreshRate; // takes precedence over max
@@ -137,12 +137,14 @@
KeyguardStateController keyguardStateController,
ScreenOffAnimationController screenOffAnimationController,
AuthController authController,
- ShadeExpansionStateManager shadeExpansionStateManager) {
+ ShadeExpansionStateManager shadeExpansionStateManager,
+ ShadeWindowLogger logger) {
mContext = context;
mWindowManager = windowManager;
mActivityManager = activityManager;
mDozeParameters = dozeParameters;
mKeyguardStateController = keyguardStateController;
+ mLogger = logger;
mScreenBrightnessDoze = mDozeParameters.getScreenBrightnessDoze();
mLpChanged = new LayoutParams();
mKeyguardViewMediator = keyguardViewMediator;
@@ -396,11 +398,13 @@
private void applyVisibility(State state) {
boolean visible = isExpanded(state);
+ mLogger.logApplyVisibility(visible);
if (state.mForcePluginOpen) {
if (mListener != null) {
mListener.setWouldOtherwiseCollapse(visible);
}
visible = true;
+ mLogger.d("Visibility forced to be true");
}
if (mNotificationShadeView != null) {
if (visible) {
@@ -463,6 +467,7 @@
private void applyWindowLayoutParams() {
if (mDeferWindowLayoutParams == 0 && mLp != null && mLp.copyFrom(mLpChanged) != 0) {
+ mLogger.logApplyingWindowLayoutParams(mLp);
Trace.beginSection("updateViewLayout");
mWindowManager.updateViewLayout(mNotificationShadeView, mLp);
Trace.endSection();
@@ -478,6 +483,7 @@
}
private void apply(State state) {
+ mLogger.logNewState(state);
applyKeyguardFlags(state);
applyFocusableFlag(state);
applyForceShowNavigationFlag(state);
@@ -587,6 +593,7 @@
&& mCurrentState.mNotificationShadeFocusable == visible) {
return;
}
+ mLogger.logShadeVisibleAndFocusable(visible);
mCurrentState.mPanelVisible = visible;
mCurrentState.mNotificationShadeFocusable = visible;
apply(mCurrentState);
@@ -594,6 +601,7 @@
@Override
public void setNotificationShadeFocusable(boolean focusable) {
+ mLogger.logShadeFocusable(focusable);
mCurrentState.mNotificationShadeFocusable = focusable;
apply(mCurrentState);
}
@@ -730,16 +738,15 @@
apply(mCurrentState);
}
- private final Set<Object> mForceOpenTokens = new HashSet<>();
@Override
public void setForcePluginOpen(boolean forceOpen, Object token) {
if (forceOpen) {
- mForceOpenTokens.add(token);
+ mCurrentState.mForceOpenTokens.add(token);
} else {
- mForceOpenTokens.remove(token);
+ mCurrentState.mForceOpenTokens.remove(token);
}
final boolean previousForceOpenState = mCurrentState.mForcePluginOpen;
- mCurrentState.mForcePluginOpen = !mForceOpenTokens.isEmpty();
+ mCurrentState.mForcePluginOpen = !mCurrentState.mForceOpenTokens.isEmpty();
if (previousForceOpenState != mCurrentState.mForcePluginOpen) {
apply(mCurrentState);
if (mForcePluginOpenListener != null) {
@@ -864,6 +871,7 @@
boolean mWallpaperSupportsAmbientMode;
boolean mNotTouchable;
Set<String> mComponentsForcingTopUi = new HashSet<>();
+ Set<Object> mForceOpenTokens = new HashSet<>();
/**
* The status bar state from {@link CentralSurfaces}.
@@ -882,28 +890,37 @@
@Override
public String toString() {
- StringBuilder result = new StringBuilder();
- String newLine = "\n";
- result.append("Window State {");
- result.append(newLine);
-
- Field[] fields = this.getClass().getDeclaredFields();
-
- // Print field names paired with their values
- for (Field field : fields) {
- result.append(" ");
- try {
- result.append(field.getName());
- result.append(": ");
- //requires access to private field:
- result.append(field.get(this));
- } catch (IllegalAccessException ex) {
- }
- result.append(newLine);
- }
- result.append("}");
-
- return result.toString();
+ return new StringBuilder()
+ .append("State{")
+ .append(" mKeyguardShowing=").append(mKeyguardShowing)
+ .append(", mKeyguardOccluded=").append(mKeyguardOccluded)
+ .append(", mKeyguardNeedsInput=").append(mKeyguardNeedsInput)
+ .append(", mPanelVisible=").append(mPanelVisible)
+ .append(", mPanelExpanded=").append(mPanelExpanded)
+ .append(", mNotificationShadeFocusable=").append(mNotificationShadeFocusable)
+ .append(", mBouncerShowing=").append(mBouncerShowing)
+ .append(", mKeyguardFadingAway=").append(mKeyguardFadingAway)
+ .append(", mKeyguardGoingAway=").append(mKeyguardGoingAway)
+ .append(", mQsExpanded=").append(mQsExpanded)
+ .append(", mHeadsUpShowing=").append(mHeadsUpShowing)
+ .append(", mLightRevealScrimOpaque=").append(mLightRevealScrimOpaque)
+ .append(", mForceCollapsed=").append(mForceCollapsed)
+ .append(", mForceDozeBrightness=").append(mForceDozeBrightness)
+ .append(", mForceUserActivity=").append(mForceUserActivity)
+ .append(", mLaunchingActivity=").append(mLaunchingActivity)
+ .append(", mBackdropShowing=").append(mBackdropShowing)
+ .append(", mWallpaperSupportsAmbientMode=")
+ .append(mWallpaperSupportsAmbientMode)
+ .append(", mNotTouchable=").append(mNotTouchable)
+ .append(", mComponentsForcingTopUi=").append(mComponentsForcingTopUi)
+ .append(", mForceOpenTokens=").append(mForceOpenTokens)
+ .append(", mStatusBarState=").append(mStatusBarState)
+ .append(", mRemoteInputActive=").append(mRemoteInputActive)
+ .append(", mForcePluginOpen=").append(mForcePluginOpen)
+ .append(", mDozing=").append(mDozing)
+ .append(", mScrimsVisibility=").append(mScrimsVisibility)
+ .append(", mBackgroundBlurRadius=").append(mBackgroundBlurRadius)
+ .append('}').toString();
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/shade/ShadeWindowLogger.kt b/packages/SystemUI/src/com/android/systemui/shade/ShadeWindowLogger.kt
new file mode 100644
index 0000000..c6a6e87
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/shade/ShadeWindowLogger.kt
@@ -0,0 +1,65 @@
+/*
+ * 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.shade
+
+import android.view.WindowManager
+import com.android.systemui.log.dagger.ShadeWindowLog
+import com.android.systemui.plugins.log.ConstantStringsLogger
+import com.android.systemui.plugins.log.ConstantStringsLoggerImpl
+import com.android.systemui.plugins.log.LogBuffer
+import com.android.systemui.plugins.log.LogLevel
+import com.android.systemui.plugins.log.LogLevel.DEBUG
+import com.android.systemui.plugins.log.LogMessage
+import javax.inject.Inject
+
+private const val TAG = "systemui.shadewindow"
+
+class ShadeWindowLogger @Inject constructor(@ShadeWindowLog private val buffer: LogBuffer) :
+ ConstantStringsLogger by ConstantStringsLoggerImpl(buffer, TAG) {
+
+ fun logApplyingWindowLayoutParams(lp: WindowManager.LayoutParams) {
+ log(DEBUG, { str1 = lp.toString() }, { "Applying new window layout params: $str1" })
+ }
+
+ fun logNewState(state: Any) {
+ log(DEBUG, { str1 = state.toString() }, { "Applying new state: $str1" })
+ }
+
+ private inline fun log(
+ logLevel: LogLevel,
+ initializer: LogMessage.() -> Unit,
+ noinline printer: LogMessage.() -> String
+ ) {
+ buffer.log(TAG, logLevel, initializer, printer)
+ }
+
+ fun logApplyVisibility(visible: Boolean) {
+ log(DEBUG, { bool1 = visible }, { "Updating visibility, should be visible : $bool1" })
+ }
+
+ fun logShadeVisibleAndFocusable(visible: Boolean) {
+ log(
+ DEBUG,
+ { bool1 = visible },
+ { "Updating shade, should be visible and focusable: $bool1" }
+ )
+ }
+
+ fun logShadeFocusable(focusable: Boolean) {
+ log(DEBUG, { bool1 = focusable }, { "Updating shade, should be focusable : $bool1" })
+ }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java b/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java
index b7001e4..6a658b6 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java
@@ -930,7 +930,8 @@
if (mStatusBarKeyguardViewManager.isBouncerShowing()) {
if (mStatusBarKeyguardViewManager.isShowingAlternateBouncer()) {
return; // udfps affordance is highlighted, no need to show action to unlock
- } else if (mKeyguardUpdateMonitor.isFaceEnrolled()) {
+ } else if (mKeyguardUpdateMonitor.isFaceEnrolled()
+ && !mKeyguardUpdateMonitor.getIsFaceAuthenticated()) {
String message = mContext.getString(R.string.keyguard_retry);
mStatusBarKeyguardViewManager.setKeyguardMessage(message, mInitialTextColorState);
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/lockscreen/LockscreenSmartspaceController.kt b/packages/SystemUI/src/com/android/systemui/statusbar/lockscreen/LockscreenSmartspaceController.kt
index 154518d..d6ad7d0 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/lockscreen/LockscreenSmartspaceController.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/lockscreen/LockscreenSmartspaceController.kt
@@ -238,6 +238,7 @@
}
val ssView = plugin.getView(parent)
+ ssView.setUiSurface(BcSmartspaceDataPlugin.UI_SURFACE_LOCK_SCREEN_AOD)
ssView.registerDataProvider(plugin)
ssView.setIntentStarter(object : BcSmartspaceDataPlugin.IntentStarter {
@@ -281,8 +282,10 @@
}
val newSession = smartspaceManager.createSmartspaceSession(
- SmartspaceConfig.Builder(context, "lockscreen").build())
- Log.d(TAG, "Starting smartspace session for lockscreen")
+ SmartspaceConfig.Builder(
+ context, BcSmartspaceDataPlugin.UI_SURFACE_LOCK_SCREEN_AOD).build())
+ Log.d(TAG, "Starting smartspace session for " +
+ BcSmartspaceDataPlugin.UI_SURFACE_LOCK_SCREEN_AOD)
newSession.addOnTargetsAvailableListener(uiExecutor, sessionListener)
this.session = newSession
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/Roundable.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/Roundable.kt
index dc9b416..a35617c 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/Roundable.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/Roundable.kt
@@ -252,6 +252,21 @@
}
/**
+ * Request the roundness 0f for a [SourceType].
+ *
+ * The top/bottom roundness of a [Roundable] can be defined by different [sourceType]. In case
+ * more origins require different roundness, for the same property, the maximum value will
+ * always be chosen.
+ *
+ * @param sourceType the source from which the request for roundness comes.
+ * @param animate true if it should animate to that value.
+ */
+ @JvmDefault
+ fun requestRoundnessReset(sourceType: SourceType, animate: Boolean) {
+ requestRoundness(top = 0f, bottom = 0f, sourceType = sourceType, animate = animate)
+ }
+
+ /**
* Request the roundness 0f for a [SourceType]. Animate the roundness if the view is shown.
*
* The top/bottom roundness of a [Roundable] can be defined by different [sourceType]. In case
@@ -262,7 +277,7 @@
*/
@JvmDefault
fun requestRoundnessReset(sourceType: SourceType) {
- requestRoundness(top = 0f, bottom = 0f, sourceType = sourceType)
+ requestRoundnessReset(sourceType = sourceType, animate = roundableState.targetView.isShown)
}
/** Apply the roundness changes, usually means invalidate the [RoundableState.targetView]. */
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 c1173e4..9f50aef 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
@@ -3487,7 +3487,8 @@
mChildrenContainer.requestRoundness(
/* top = */ getTopRoundness(),
/* bottom = */ getBottomRoundness(),
- FROM_PARENT);
+ /* sourceType = */ FROM_PARENT,
+ /* animate = */ false);
} else {
mChildrenContainer.requestBottomRoundness(
getBottomRoundness(),
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationChildrenContainer.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationChildrenContainer.java
index 4d1451e..8d48d73 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationChildrenContainer.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationChildrenContainer.java
@@ -367,7 +367,7 @@
}
if (mUseRoundnessSourceTypes) {
- row.requestRoundnessReset(FROM_PARENT);
+ row.requestRoundnessReset(FROM_PARENT, /* animate = */ false);
applyRoundnessAndInvalidate();
}
}
@@ -1440,7 +1440,8 @@
child.requestRoundness(
/* top = */ 0f,
/* bottom = */ last ? getBottomRoundness() : 0f,
- FROM_PARENT);
+ /* sourceType = */ FROM_PARENT,
+ /* animate = */ false);
} else {
child.requestRoundness(
/* top = */ 0f,
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutController.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutController.java
index c2c38a7..5891948 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutController.java
@@ -1902,8 +1902,10 @@
}
if (ev.getActionMasked() == MotionEvent.ACTION_UP) {
// Ensure the falsing manager records the touch. we don't do anything with it
- // at the moment.
- mFalsingManager.isFalseTouch(Classifier.SHADE_DRAG);
+ // at the moment, but it may trigger a global falsing event.
+ if (!horizontalSwipeWantsIt) {
+ mFalsingManager.isFalseTouch(Classifier.SHADE_DRAG);
+ }
mView.setCheckForLeaveBehind(true);
}
traceJankOnTouchEvent(ev.getActionMasked(), scrollerWantsIt);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/dagger/StatusBarPipelineModule.kt b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/dagger/StatusBarPipelineModule.kt
index 0d01715..0993ab370 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/dagger/StatusBarPipelineModule.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/dagger/StatusBarPipelineModule.kt
@@ -16,6 +16,7 @@
package com.android.systemui.statusbar.pipeline.dagger
+import android.net.wifi.WifiManager
import com.android.systemui.CoreStartable
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.log.table.TableLogBuffer
@@ -35,8 +36,11 @@
import com.android.systemui.statusbar.pipeline.mobile.util.MobileMappingsProxyImpl
import com.android.systemui.statusbar.pipeline.shared.data.repository.ConnectivityRepository
import com.android.systemui.statusbar.pipeline.shared.data.repository.ConnectivityRepositoryImpl
+import com.android.systemui.statusbar.pipeline.wifi.data.repository.RealWifiRepository
import com.android.systemui.statusbar.pipeline.wifi.data.repository.WifiRepository
import com.android.systemui.statusbar.pipeline.wifi.data.repository.WifiRepositorySwitcher
+import com.android.systemui.statusbar.pipeline.wifi.data.repository.prod.DisabledWifiRepository
+import com.android.systemui.statusbar.pipeline.wifi.data.repository.prod.WifiRepositoryImpl
import com.android.systemui.statusbar.pipeline.wifi.domain.interactor.WifiInteractor
import com.android.systemui.statusbar.pipeline.wifi.domain.interactor.WifiInteractorImpl
import dagger.Binds
@@ -78,9 +82,23 @@
@ClassKey(MobileUiAdapter::class)
abstract fun bindFeature(impl: MobileUiAdapter): CoreStartable
- @Module
companion object {
- @JvmStatic
+ @Provides
+ @SysUISingleton
+ fun provideRealWifiRepository(
+ wifiManager: WifiManager?,
+ disabledWifiRepository: DisabledWifiRepository,
+ wifiRepositoryImplFactory: WifiRepositoryImpl.Factory,
+ ): RealWifiRepository {
+ // If we have a null [WifiManager], then the wifi repository should be permanently
+ // disabled.
+ return if (wifiManager == null) {
+ disabledWifiRepository
+ } else {
+ wifiRepositoryImplFactory.create(wifiManager)
+ }
+ }
+
@Provides
@SysUISingleton
@WifiTableLog
@@ -88,7 +106,6 @@
return factory.create("WifiTableLog", 100)
}
- @JvmStatic
@Provides
@SysUISingleton
@AirplaneTableLog
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/model/ResolvedNetworkType.kt b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/model/ResolvedNetworkType.kt
index dd93541..5960387 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/model/ResolvedNetworkType.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/model/ResolvedNetworkType.kt
@@ -17,7 +17,6 @@
package com.android.systemui.statusbar.pipeline.mobile.data.model
import android.telephony.Annotation.NetworkType
-import android.telephony.TelephonyManager.NETWORK_TYPE_UNKNOWN
import com.android.systemui.statusbar.pipeline.mobile.util.MobileMappingsProxy
/**
@@ -26,21 +25,17 @@
* methods on [MobileMappingsProxy] to generate an icon lookup key.
*/
sealed interface ResolvedNetworkType {
- @NetworkType val type: Int
val lookupKey: String
object UnknownNetworkType : ResolvedNetworkType {
- override val type: Int = NETWORK_TYPE_UNKNOWN
override val lookupKey: String = "unknown"
}
data class DefaultNetworkType(
- @NetworkType override val type: Int,
override val lookupKey: String,
) : ResolvedNetworkType
data class OverrideNetworkType(
- @NetworkType override val type: Int,
override val lookupKey: String,
) : ResolvedNetworkType
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/MobileConnectionRepository.kt b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/MobileConnectionRepository.kt
index 40e9ba1..d04996b 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/MobileConnectionRepository.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/MobileConnectionRepository.kt
@@ -17,7 +17,6 @@
package com.android.systemui.statusbar.pipeline.mobile.data.repository
import android.telephony.SubscriptionInfo
-import android.telephony.SubscriptionManager
import android.telephony.TelephonyCallback
import android.telephony.TelephonyManager
import com.android.systemui.log.table.TableLogBuffer
@@ -52,13 +51,12 @@
* listener + model.
*/
val connectionInfo: Flow<MobileConnectionModel>
+
+ /** The total number of levels. Used with [SignalDrawable]. */
+ val numberOfLevels: StateFlow<Int>
+
/** Observable tracking [TelephonyManager.isDataConnectionAllowed] */
val dataEnabled: StateFlow<Boolean>
- /**
- * True if this connection represents the default subscription per
- * [SubscriptionManager.getDefaultDataSubscriptionId]
- */
- val isDefaultDataSubscription: StateFlow<Boolean>
/**
* See [TelephonyManager.getCdmaEnhancedRoamingIndicatorDisplayNumber]. This bit only matters if
@@ -70,4 +68,9 @@
/** The service provider name for this network connection, or the default name */
val networkName: StateFlow<NetworkNameModel>
+
+ companion object {
+ /** The default number of levels to use for [numberOfLevels]. */
+ const val DEFAULT_NUM_LEVELS = 4
+ }
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/MobileConnectionsRepository.kt b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/MobileConnectionsRepository.kt
index 498c0b9..97b4c2c 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/MobileConnectionsRepository.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/MobileConnectionsRepository.kt
@@ -18,7 +18,6 @@
import android.provider.Settings
import android.telephony.CarrierConfigManager
-import android.telephony.SubscriptionManager
import com.android.settingslib.SignalIcon.MobileIconGroup
import com.android.settingslib.mobile.MobileMappings
import com.android.settingslib.mobile.MobileMappings.Config
@@ -38,9 +37,6 @@
/** Observable for the subscriptionId of the current mobile data connection */
val activeMobileDataSubscriptionId: StateFlow<Int>
- /** Tracks [SubscriptionManager.getDefaultDataSubscriptionId] */
- val defaultDataSubId: StateFlow<Int>
-
/** The current connectivity status for the default mobile network connection */
val defaultMobileNetworkConnectivity: StateFlow<MobileConnectivityModel>
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/MobileRepositorySwitcher.kt b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/MobileRepositorySwitcher.kt
index db9d24f..0c8593d6 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/MobileRepositorySwitcher.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/MobileRepositorySwitcher.kt
@@ -139,11 +139,6 @@
override val defaultMobileIconGroup: Flow<SignalIcon.MobileIconGroup> =
activeRepo.flatMapLatest { it.defaultMobileIconGroup }
- override val defaultDataSubId: StateFlow<Int> =
- activeRepo
- .flatMapLatest { it.defaultDataSubId }
- .stateIn(scope, SharingStarted.WhileSubscribed(), realRepository.defaultDataSubId.value)
-
override val defaultMobileNetworkConnectivity: StateFlow<MobileConnectivityModel> =
activeRepo
.flatMapLatest { it.defaultMobileNetworkConnectivity }
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/demo/DemoMobileConnectionsRepository.kt b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/demo/DemoMobileConnectionsRepository.kt
index 0b5f9d5..0e164e7 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/demo/DemoMobileConnectionsRepository.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/demo/DemoMobileConnectionsRepository.kt
@@ -34,6 +34,7 @@
import com.android.systemui.statusbar.pipeline.mobile.data.model.ResolvedNetworkType.DefaultNetworkType
import com.android.systemui.statusbar.pipeline.mobile.data.model.SubscriptionModel
import com.android.systemui.statusbar.pipeline.mobile.data.repository.MobileConnectionRepository
+import com.android.systemui.statusbar.pipeline.mobile.data.repository.MobileConnectionRepository.Companion.DEFAULT_NUM_LEVELS
import com.android.systemui.statusbar.pipeline.mobile.data.repository.MobileConnectionsRepository
import com.android.systemui.statusbar.pipeline.mobile.data.repository.demo.model.FakeNetworkEventModel
import com.android.systemui.statusbar.pipeline.mobile.data.repository.demo.model.FakeNetworkEventModel.Mobile
@@ -139,14 +140,6 @@
private fun <K, V> Map<K, V>.reverse() = entries.associateBy({ it.value }) { it.key }
- // TODO(b/261029387): add a command for this value
- override val defaultDataSubId =
- activeMobileDataSubscriptionId.stateIn(
- scope,
- SharingStarted.WhileSubscribed(),
- INVALID_SUBSCRIPTION_ID
- )
-
// TODO(b/261029387): not yet supported
override val defaultMobileNetworkConnectivity = MutableStateFlow(MobileConnectivityModel())
@@ -199,7 +192,6 @@
val connection = getRepoForSubId(subId)
// This is always true here, because we split out disabled states at the data-source level
connection.dataEnabled.value = true
- connection.isDefaultDataSubscription.value = state.dataType != null
connection.networkName.value = NetworkNameModel.Derived(state.name)
connection.cdmaRoaming.value = state.roaming
@@ -261,15 +253,13 @@
private fun SignalIcon.MobileIconGroup?.toResolvedNetworkType(): ResolvedNetworkType {
val key = mobileMappingsReverseLookup.value[this] ?: "dis"
- return DefaultNetworkType(DEMO_NET_TYPE, key)
+ return DefaultNetworkType(key)
}
companion object {
private const val TAG = "DemoMobileConnectionsRepo"
private const val DEFAULT_SUB_ID = 1
-
- private const val DEMO_NET_TYPE = 1234
}
}
@@ -279,9 +269,9 @@
) : MobileConnectionRepository {
override val connectionInfo = MutableStateFlow(MobileConnectionModel())
- override val dataEnabled = MutableStateFlow(true)
+ override val numberOfLevels = MutableStateFlow(DEFAULT_NUM_LEVELS)
- override val isDefaultDataSubscription = MutableStateFlow(true)
+ override val dataEnabled = MutableStateFlow(true)
override val cdmaRoaming = MutableStateFlow(false)
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/MobileConnectionRepositoryImpl.kt b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/MobileConnectionRepositoryImpl.kt
index 5cfff82..0fa0fea 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/MobileConnectionRepositoryImpl.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/MobileConnectionRepositoryImpl.kt
@@ -48,6 +48,7 @@
import com.android.systemui.statusbar.pipeline.mobile.data.model.toDataConnectionType
import com.android.systemui.statusbar.pipeline.mobile.data.model.toNetworkNameModel
import com.android.systemui.statusbar.pipeline.mobile.data.repository.MobileConnectionRepository
+import com.android.systemui.statusbar.pipeline.mobile.data.repository.MobileConnectionRepository.Companion.DEFAULT_NUM_LEVELS
import com.android.systemui.statusbar.pipeline.mobile.util.MobileMappingsProxy
import com.android.systemui.statusbar.pipeline.shared.ConnectivityPipelineLogger
import com.android.systemui.statusbar.pipeline.shared.data.model.toMobileDataActivityModel
@@ -63,6 +64,7 @@
import kotlinx.coroutines.flow.SharingStarted
import kotlinx.coroutines.flow.StateFlow
import kotlinx.coroutines.flow.distinctUntilChanged
+import kotlinx.coroutines.flow.flowOf
import kotlinx.coroutines.flow.mapLatest
import kotlinx.coroutines.flow.merge
import kotlinx.coroutines.flow.onEach
@@ -78,7 +80,6 @@
private val telephonyManager: TelephonyManager,
private val globalSettings: GlobalSettings,
broadcastDispatcher: BroadcastDispatcher,
- defaultDataSubId: StateFlow<Int>,
globalMobileDataSettingChangedEvent: Flow<Unit>,
mobileMappingsProxy: MobileMappingsProxy,
bgDispatcher: CoroutineDispatcher,
@@ -185,14 +186,12 @@
OVERRIDE_NETWORK_TYPE_NONE
) {
DefaultNetworkType(
- telephonyDisplayInfo.networkType,
mobileMappingsProxy.toIconKey(
telephonyDisplayInfo.networkType
)
)
} else {
OverrideNetworkType(
- telephonyDisplayInfo.overrideNetworkType,
mobileMappingsProxy.toIconKeyOverride(
telephonyDisplayInfo.overrideNetworkType
)
@@ -214,6 +213,12 @@
.stateIn(scope, SharingStarted.WhileSubscribed(), state)
}
+ // This will become variable based on [CarrierConfigManager.KEY_INFLATE_SIGNAL_STRENGTH_BOOL]
+ // once it's wired up inside of [CarrierConfigTracker].
+ override val numberOfLevels: StateFlow<Int> =
+ flowOf(DEFAULT_NUM_LEVELS)
+ .stateIn(scope, SharingStarted.WhileSubscribed(), DEFAULT_NUM_LEVELS)
+
/** Produces whenever the mobile data setting changes for this subId */
private val localMobileDataSettingChangedEvent: Flow<Unit> = conflatedCallbackFlow {
val observer =
@@ -284,20 +289,6 @@
private fun dataConnectionAllowed(): Boolean = telephonyManager.isDataConnectionAllowed
- override val isDefaultDataSubscription: StateFlow<Boolean> = run {
- val initialValue = defaultDataSubId.value == subId
- defaultDataSubId
- .mapLatest { it == subId }
- .distinctUntilChanged()
- .logDiffsForTable(
- mobileLogger,
- columnPrefix = "",
- columnName = "isDefaultDataSub",
- initialValue = initialValue,
- )
- .stateIn(scope, SharingStarted.WhileSubscribed(), initialValue)
- }
-
class Factory
@Inject
constructor(
@@ -315,7 +306,6 @@
subId: Int,
defaultNetworkName: NetworkNameModel,
networkNameSeparator: String,
- defaultDataSubId: StateFlow<Int>,
globalMobileDataSettingChangedEvent: Flow<Unit>,
): MobileConnectionRepository {
val mobileLogger = logFactory.create(tableBufferLogName(subId), 100)
@@ -328,7 +318,6 @@
telephonyManager.createForSubscriptionId(subId),
globalSettings,
broadcastDispatcher,
- defaultDataSubId,
globalMobileDataSettingChangedEvent,
mobileMappingsProxy,
bgDispatcher,
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/MobileConnectionsRepositoryImpl.kt b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/MobileConnectionsRepositoryImpl.kt
index d407abe..c88c700 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/MobileConnectionsRepositoryImpl.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/MobileConnectionsRepositoryImpl.kt
@@ -35,7 +35,6 @@
import android.telephony.TelephonyCallback.ActiveDataSubscriptionIdListener
import android.telephony.TelephonyManager
import androidx.annotation.VisibleForTesting
-import com.android.internal.telephony.PhoneConstants
import com.android.settingslib.SignalIcon.MobileIconGroup
import com.android.settingslib.mobile.MobileMappings.Config
import com.android.systemui.R
@@ -60,7 +59,6 @@
import kotlinx.coroutines.asExecutor
import kotlinx.coroutines.channels.awaitClose
import kotlinx.coroutines.flow.Flow
-import kotlinx.coroutines.flow.MutableSharedFlow
import kotlinx.coroutines.flow.SharingStarted
import kotlinx.coroutines.flow.StateFlow
import kotlinx.coroutines.flow.distinctUntilChanged
@@ -142,24 +140,10 @@
.logInputChange(logger, "onActiveDataSubscriptionIdChanged")
.stateIn(scope, started = SharingStarted.WhileSubscribed(), INVALID_SUBSCRIPTION_ID)
- private val defaultDataSubIdChangeEvent: MutableSharedFlow<Unit> =
- MutableSharedFlow(extraBufferCapacity = 1)
-
- override val defaultDataSubId: StateFlow<Int> =
+ private val defaultDataSubIdChangedEvent =
broadcastDispatcher
- .broadcastFlow(
- IntentFilter(TelephonyManager.ACTION_DEFAULT_DATA_SUBSCRIPTION_CHANGED)
- ) { intent, _ ->
- intent.getIntExtra(PhoneConstants.SUBSCRIPTION_KEY, INVALID_SUBSCRIPTION_ID)
- }
- .distinctUntilChanged()
+ .broadcastFlow(IntentFilter(TelephonyManager.ACTION_DEFAULT_DATA_SUBSCRIPTION_CHANGED))
.logInputChange(logger, "ACTION_DEFAULT_DATA_SUBSCRIPTION_CHANGED")
- .onEach { defaultDataSubIdChangeEvent.tryEmit(Unit) }
- .stateIn(
- scope,
- SharingStarted.WhileSubscribed(),
- SubscriptionManager.getDefaultDataSubscriptionId()
- )
private val carrierConfigChangedEvent =
broadcastDispatcher
@@ -167,7 +151,7 @@
.logInputChange(logger, "ACTION_CARRIER_CONFIG_CHANGED")
override val defaultDataSubRatConfig: StateFlow<Config> =
- merge(defaultDataSubIdChangeEvent, carrierConfigChangedEvent)
+ merge(defaultDataSubIdChangedEvent, carrierConfigChangedEvent)
.mapLatest { Config.readConfig(context) }
.distinctUntilChanged()
.logInputChange(logger, "defaultDataSubRatConfig")
@@ -272,7 +256,6 @@
subId,
defaultNetworkName,
networkNameSeparator,
- defaultDataSubId,
globalMobileDataSettingChangedEvent,
)
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/domain/interactor/MobileIconInteractor.kt b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/domain/interactor/MobileIconInteractor.kt
index 31ac7a1..9427c6b 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/domain/interactor/MobileIconInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/domain/interactor/MobileIconInteractor.kt
@@ -23,12 +23,11 @@
import com.android.systemui.statusbar.pipeline.mobile.data.model.DataConnectionState.Connected
import com.android.systemui.statusbar.pipeline.mobile.data.model.NetworkNameModel
import com.android.systemui.statusbar.pipeline.mobile.data.repository.MobileConnectionRepository
+import com.android.systemui.statusbar.pipeline.mobile.data.repository.MobileConnectionRepository.Companion.DEFAULT_NUM_LEVELS
import com.android.systemui.statusbar.pipeline.shared.data.model.DataActivityModel
-import com.android.systemui.util.CarrierConfigTracker
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.flow.Flow
-import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.SharingStarted
import kotlinx.coroutines.flow.StateFlow
import kotlinx.coroutines.flow.combine
@@ -171,11 +170,12 @@
}
.stateIn(scope, SharingStarted.WhileSubscribed(), 0)
- /**
- * This will become variable based on [CarrierConfigManager.KEY_INFLATE_SIGNAL_STRENGTH_BOOL]
- * once it's wired up inside of [CarrierConfigTracker]
- */
- override val numberOfLevels: StateFlow<Int> = MutableStateFlow(4)
+ override val numberOfLevels: StateFlow<Int> =
+ connectionRepository.numberOfLevels.stateIn(
+ scope,
+ SharingStarted.WhileSubscribed(),
+ connectionRepository.numberOfLevels.value,
+ )
override val isDataConnected: StateFlow<Boolean> =
connectionInfo
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/wifi/data/model/WifiNetworkModel.kt b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/wifi/data/model/WifiNetworkModel.kt
index a682a57..4251d18 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/wifi/data/model/WifiNetworkModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/wifi/data/model/WifiNetworkModel.kt
@@ -23,6 +23,33 @@
/** Provides information about the current wifi network. */
sealed class WifiNetworkModel : Diffable<WifiNetworkModel> {
+ /**
+ * A model representing that we couldn't fetch any wifi information.
+ *
+ * This is only used with [DisabledWifiRepository], where [WifiManager] is null.
+ */
+ object Unavailable : WifiNetworkModel() {
+ override fun toString() = "WifiNetwork.Unavailable"
+ override fun logDiffs(prevVal: WifiNetworkModel, row: TableRowLogger) {
+ if (prevVal is Unavailable) {
+ return
+ }
+
+ logFull(row)
+ }
+
+ override fun logFull(row: TableRowLogger) {
+ row.logChange(COL_NETWORK_TYPE, TYPE_UNAVAILABLE)
+ row.logChange(COL_NETWORK_ID, NETWORK_ID_DEFAULT)
+ row.logChange(COL_VALIDATED, false)
+ row.logChange(COL_LEVEL, LEVEL_DEFAULT)
+ row.logChange(COL_SSID, null)
+ row.logChange(COL_PASSPOINT_ACCESS_POINT, false)
+ row.logChange(COL_ONLINE_SIGN_UP, false)
+ row.logChange(COL_PASSPOINT_NAME, null)
+ }
+ }
+
/** A model representing that we have no active wifi network. */
object Inactive : WifiNetworkModel() {
override fun toString() = "WifiNetwork.Inactive"
@@ -87,13 +114,8 @@
/**
* The wifi signal level, guaranteed to be 0 <= level <= 4.
- *
- * Null if we couldn't fetch the level for some reason.
- *
- * TODO(b/238425913): The level will only be null if we have a null WifiManager. Is there a
- * way we can guarantee a non-null WifiManager?
*/
- val level: Int? = null,
+ val level: Int,
/** See [android.net.wifi.WifiInfo.ssid]. */
val ssid: String? = null,
@@ -108,7 +130,7 @@
val passpointProviderFriendlyName: String? = null,
) : WifiNetworkModel() {
init {
- require(level == null || level in MIN_VALID_LEVEL..MAX_VALID_LEVEL) {
+ require(level in MIN_VALID_LEVEL..MAX_VALID_LEVEL) {
"0 <= wifi level <= 4 required; level was $level"
}
}
@@ -125,11 +147,7 @@
row.logChange(COL_VALIDATED, isValidated)
}
if (prevVal !is Active || prevVal.level != level) {
- if (level != null) {
- row.logChange(COL_LEVEL, level)
- } else {
- row.logChange(COL_LEVEL, LEVEL_DEFAULT)
- }
+ row.logChange(COL_LEVEL, level)
}
if (prevVal !is Active || prevVal.ssid != ssid) {
row.logChange(COL_SSID, ssid)
@@ -190,6 +208,7 @@
}
const val TYPE_CARRIER_MERGED = "CarrierMerged"
+const val TYPE_UNAVAILABLE = "Unavailable"
const val TYPE_INACTIVE = "Inactive"
const val TYPE_ACTIVE = "Active"
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/wifi/data/repository/WifiRepository.kt b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/wifi/data/repository/WifiRepository.kt
index 53525f2..ac4d55c 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/wifi/data/repository/WifiRepository.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/wifi/data/repository/WifiRepository.kt
@@ -34,3 +34,13 @@
/** Observable for the current wifi network activity. */
val wifiActivity: StateFlow<DataActivityModel>
}
+
+/**
+ * A no-op interface used for Dagger bindings.
+ *
+ * [WifiRepositorySwitcher] needs to inject the "real" wifi repository, which could either be the
+ * full [WifiRepositoryImpl] or just [DisabledWifiRepository]. Having this interface lets us bind
+ * [RealWifiRepository], and then [WifiRepositorySwitcher] will automatically get the correct real
+ * repository.
+ */
+interface RealWifiRepository : WifiRepository
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/wifi/data/repository/WifiRepositorySwitcher.kt b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/wifi/data/repository/WifiRepositorySwitcher.kt
index be86620..2cb81c8 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/wifi/data/repository/WifiRepositorySwitcher.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/wifi/data/repository/WifiRepositorySwitcher.kt
@@ -58,7 +58,7 @@
class WifiRepositorySwitcher
@Inject
constructor(
- private val realImpl: WifiRepositoryImpl,
+ private val realImpl: RealWifiRepository,
private val demoImpl: DemoWifiRepository,
private val demoModeController: DemoModeController,
@Application scope: CoroutineScope,
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/wifi/data/repository/demo/DemoWifiRepository.kt b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/wifi/data/repository/demo/DemoWifiRepository.kt
index 7890074..be3d7d4 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/wifi/data/repository/demo/DemoWifiRepository.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/wifi/data/repository/demo/DemoWifiRepository.kt
@@ -89,7 +89,7 @@
WifiNetworkModel.Active(
networkId = DEMO_NET_ID,
isValidated = validated ?: true,
- level = level,
+ level = level ?: 0,
ssid = ssid,
// These fields below aren't supported in demo mode, since they aren't needed to satisfy
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/wifi/data/repository/prod/DisabledWifiRepository.kt b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/wifi/data/repository/prod/DisabledWifiRepository.kt
new file mode 100644
index 0000000..5d4a666
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/wifi/data/repository/prod/DisabledWifiRepository.kt
@@ -0,0 +1,49 @@
+/*
+ * 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.statusbar.pipeline.wifi.data.repository.prod
+
+import com.android.systemui.dagger.SysUISingleton
+import com.android.systemui.statusbar.pipeline.shared.data.model.DataActivityModel
+import com.android.systemui.statusbar.pipeline.wifi.data.model.WifiNetworkModel
+import com.android.systemui.statusbar.pipeline.wifi.data.repository.RealWifiRepository
+import javax.inject.Inject
+import kotlinx.coroutines.flow.MutableStateFlow
+import kotlinx.coroutines.flow.StateFlow
+import kotlinx.coroutines.flow.asStateFlow
+
+/**
+ * Implementation of wifi repository used when wifi is permanently disabled on the device.
+ *
+ * This repo should only exist when [WifiManager] is null, which means that we can never fetch any
+ * wifi information.
+ */
+@SysUISingleton
+class DisabledWifiRepository @Inject constructor() : RealWifiRepository {
+ override val isWifiEnabled: StateFlow<Boolean> = MutableStateFlow(false).asStateFlow()
+
+ override val isWifiDefault: StateFlow<Boolean> = MutableStateFlow(false).asStateFlow()
+
+ override val wifiNetwork: StateFlow<WifiNetworkModel> = MutableStateFlow(NETWORK).asStateFlow()
+
+ override val wifiActivity: StateFlow<DataActivityModel> =
+ MutableStateFlow(ACTIVITY).asStateFlow()
+
+ companion object {
+ private val NETWORK = WifiNetworkModel.Unavailable
+ private val ACTIVITY = DataActivityModel(hasActivityIn = false, hasActivityOut = false)
+ }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/wifi/data/repository/prod/WifiRepositoryImpl.kt b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/wifi/data/repository/prod/WifiRepositoryImpl.kt
index c8c94e1..c47c20d 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/wifi/data/repository/prod/WifiRepositoryImpl.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/wifi/data/repository/prod/WifiRepositoryImpl.kt
@@ -29,7 +29,6 @@
import android.net.wifi.WifiInfo
import android.net.wifi.WifiManager
import android.net.wifi.WifiManager.TrafficStateCallback
-import android.util.Log
import com.android.settingslib.Utils
import com.android.systemui.broadcast.BroadcastDispatcher
import com.android.systemui.common.coroutine.ConflatedCallbackFlow.conflatedCallbackFlow
@@ -40,11 +39,11 @@
import com.android.systemui.log.table.logDiffsForTable
import com.android.systemui.statusbar.pipeline.dagger.WifiTableLog
import com.android.systemui.statusbar.pipeline.shared.ConnectivityPipelineLogger
-import com.android.systemui.statusbar.pipeline.shared.ConnectivityPipelineLogger.Companion.SB_LOGGING_TAG
import com.android.systemui.statusbar.pipeline.shared.ConnectivityPipelineLogger.Companion.logInputChange
import com.android.systemui.statusbar.pipeline.shared.data.model.DataActivityModel
import com.android.systemui.statusbar.pipeline.shared.data.model.toWifiDataActivityModel
import com.android.systemui.statusbar.pipeline.wifi.data.model.WifiNetworkModel
+import com.android.systemui.statusbar.pipeline.wifi.data.repository.RealWifiRepository
import com.android.systemui.statusbar.pipeline.wifi.data.repository.WifiRepository
import java.util.concurrent.Executor
import javax.inject.Inject
@@ -53,12 +52,9 @@
import kotlinx.coroutines.channels.awaitClose
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.MutableSharedFlow
-import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.SharingStarted
import kotlinx.coroutines.flow.StateFlow
-import kotlinx.coroutines.flow.asStateFlow
import kotlinx.coroutines.flow.distinctUntilChanged
-import kotlinx.coroutines.flow.flowOf
import kotlinx.coroutines.flow.mapLatest
import kotlinx.coroutines.flow.merge
import kotlinx.coroutines.flow.stateIn
@@ -68,178 +64,177 @@
@OptIn(ExperimentalCoroutinesApi::class)
@SysUISingleton
@SuppressLint("MissingPermission")
-class WifiRepositoryImpl @Inject constructor(
+class WifiRepositoryImpl
+@Inject
+constructor(
broadcastDispatcher: BroadcastDispatcher,
connectivityManager: ConnectivityManager,
logger: ConnectivityPipelineLogger,
@WifiTableLog wifiTableLogBuffer: TableLogBuffer,
@Main mainExecutor: Executor,
@Application scope: CoroutineScope,
- wifiManager: WifiManager?,
-) : WifiRepository {
+ wifiManager: WifiManager,
+) : RealWifiRepository {
- private val wifiStateChangeEvents: Flow<Unit> = broadcastDispatcher.broadcastFlow(
- IntentFilter(WifiManager.WIFI_STATE_CHANGED_ACTION)
- )
- .logInputChange(logger, "WIFI_STATE_CHANGED_ACTION intent")
+ private val wifiStateChangeEvents: Flow<Unit> =
+ broadcastDispatcher
+ .broadcastFlow(IntentFilter(WifiManager.WIFI_STATE_CHANGED_ACTION))
+ .logInputChange(logger, "WIFI_STATE_CHANGED_ACTION intent")
private val wifiNetworkChangeEvents: MutableSharedFlow<Unit> =
MutableSharedFlow(extraBufferCapacity = 1)
+ // Because [WifiManager] doesn't expose a wifi enabled change listener, we do it
+ // internally by fetching [WifiManager.isWifiEnabled] whenever we think the state may
+ // have changed.
override val isWifiEnabled: StateFlow<Boolean> =
- if (wifiManager == null) {
- MutableStateFlow(false).asStateFlow()
- } else {
- // Because [WifiManager] doesn't expose a wifi enabled change listener, we do it
- // internally by fetching [WifiManager.isWifiEnabled] whenever we think the state may
- // have changed.
- merge(wifiNetworkChangeEvents, wifiStateChangeEvents)
- .mapLatest { wifiManager.isWifiEnabled }
- .distinctUntilChanged()
- .logDiffsForTable(
- wifiTableLogBuffer,
- columnPrefix = "",
- columnName = "isWifiEnabled",
- initialValue = wifiManager.isWifiEnabled,
- )
- .stateIn(
- scope = scope,
- started = SharingStarted.WhileSubscribed(),
- initialValue = wifiManager.isWifiEnabled
- )
- }
+ merge(wifiNetworkChangeEvents, wifiStateChangeEvents)
+ .mapLatest { wifiManager.isWifiEnabled }
+ .distinctUntilChanged()
+ .logDiffsForTable(
+ wifiTableLogBuffer,
+ columnPrefix = "",
+ columnName = "isWifiEnabled",
+ initialValue = wifiManager.isWifiEnabled,
+ )
+ .stateIn(
+ scope = scope,
+ started = SharingStarted.WhileSubscribed(),
+ initialValue = wifiManager.isWifiEnabled,
+ )
- override val isWifiDefault: StateFlow<Boolean> = conflatedCallbackFlow {
- // Note: This callback doesn't do any logging because we already log every network change
- // in the [wifiNetwork] callback.
- val callback = object : ConnectivityManager.NetworkCallback(FLAG_INCLUDE_LOCATION_INFO) {
- override fun onCapabilitiesChanged(
- network: Network,
- networkCapabilities: NetworkCapabilities
- ) {
- // This method will always be called immediately after the network becomes the
- // default, in addition to any time the capabilities change while the network is
- // the default.
- // If this network contains valid wifi info, then wifi is the default network.
- val wifiInfo = networkCapabilitiesToWifiInfo(networkCapabilities)
- trySend(wifiInfo != null)
+ override val isWifiDefault: StateFlow<Boolean> =
+ conflatedCallbackFlow {
+ // Note: This callback doesn't do any logging because we already log every network
+ // change in the [wifiNetwork] callback.
+ val callback =
+ object : ConnectivityManager.NetworkCallback(FLAG_INCLUDE_LOCATION_INFO) {
+ override fun onCapabilitiesChanged(
+ network: Network,
+ networkCapabilities: NetworkCapabilities
+ ) {
+ // This method will always be called immediately after the network
+ // becomes the default, in addition to any time the capabilities change
+ // while the network is the default.
+ // If this network contains valid wifi info, then wifi is the default
+ // network.
+ val wifiInfo = networkCapabilitiesToWifiInfo(networkCapabilities)
+ trySend(wifiInfo != null)
+ }
+
+ override fun onLost(network: Network) {
+ // The system no longer has a default network, so wifi is definitely not
+ // default.
+ trySend(false)
+ }
+ }
+
+ connectivityManager.registerDefaultNetworkCallback(callback)
+ awaitClose { connectivityManager.unregisterNetworkCallback(callback) }
}
+ .distinctUntilChanged()
+ .logDiffsForTable(
+ wifiTableLogBuffer,
+ columnPrefix = "",
+ columnName = "isWifiDefault",
+ initialValue = false,
+ )
+ .stateIn(scope, started = SharingStarted.WhileSubscribed(), initialValue = false)
- override fun onLost(network: Network) {
- // The system no longer has a default network, so wifi is definitely not default.
- trySend(false)
+ override val wifiNetwork: StateFlow<WifiNetworkModel> =
+ conflatedCallbackFlow {
+ var currentWifi: WifiNetworkModel = WIFI_NETWORK_DEFAULT
+
+ val callback =
+ object : ConnectivityManager.NetworkCallback(FLAG_INCLUDE_LOCATION_INFO) {
+ override fun onCapabilitiesChanged(
+ network: Network,
+ networkCapabilities: NetworkCapabilities
+ ) {
+ logger.logOnCapabilitiesChanged(network, networkCapabilities)
+
+ wifiNetworkChangeEvents.tryEmit(Unit)
+
+ val wifiInfo = networkCapabilitiesToWifiInfo(networkCapabilities)
+ if (wifiInfo?.isPrimary == true) {
+ val wifiNetworkModel =
+ createWifiNetworkModel(
+ wifiInfo,
+ network,
+ networkCapabilities,
+ wifiManager,
+ )
+ logger.logTransformation(
+ WIFI_NETWORK_CALLBACK_NAME,
+ oldValue = currentWifi,
+ newValue = wifiNetworkModel,
+ )
+ currentWifi = wifiNetworkModel
+ trySend(wifiNetworkModel)
+ }
+ }
+
+ override fun onLost(network: Network) {
+ logger.logOnLost(network)
+
+ wifiNetworkChangeEvents.tryEmit(Unit)
+
+ val wifi = currentWifi
+ if (
+ wifi is WifiNetworkModel.Active &&
+ wifi.networkId == network.getNetId()
+ ) {
+ val newNetworkModel = WifiNetworkModel.Inactive
+ logger.logTransformation(
+ WIFI_NETWORK_CALLBACK_NAME,
+ oldValue = wifi,
+ newValue = newNetworkModel,
+ )
+ currentWifi = newNetworkModel
+ trySend(newNetworkModel)
+ }
+ }
+ }
+
+ connectivityManager.registerNetworkCallback(WIFI_NETWORK_CALLBACK_REQUEST, callback)
+
+ awaitClose { connectivityManager.unregisterNetworkCallback(callback) }
}
- }
-
- connectivityManager.registerDefaultNetworkCallback(callback)
- awaitClose { connectivityManager.unregisterNetworkCallback(callback) }
- }
- .distinctUntilChanged()
- .logDiffsForTable(
- wifiTableLogBuffer,
- columnPrefix = "",
- columnName = "isWifiDefault",
- initialValue = false,
- )
- .stateIn(
- scope,
- started = SharingStarted.WhileSubscribed(),
- initialValue = false
- )
-
- override val wifiNetwork: StateFlow<WifiNetworkModel> = conflatedCallbackFlow {
- var currentWifi: WifiNetworkModel = WIFI_NETWORK_DEFAULT
-
- val callback = object : ConnectivityManager.NetworkCallback(FLAG_INCLUDE_LOCATION_INFO) {
- override fun onCapabilitiesChanged(
- network: Network,
- networkCapabilities: NetworkCapabilities
- ) {
- logger.logOnCapabilitiesChanged(network, networkCapabilities)
-
- wifiNetworkChangeEvents.tryEmit(Unit)
-
- val wifiInfo = networkCapabilitiesToWifiInfo(networkCapabilities)
- if (wifiInfo?.isPrimary == true) {
- val wifiNetworkModel = createWifiNetworkModel(
- wifiInfo,
- network,
- networkCapabilities,
- wifiManager,
- )
- logger.logTransformation(
- WIFI_NETWORK_CALLBACK_NAME,
- oldValue = currentWifi,
- newValue = wifiNetworkModel
- )
- currentWifi = wifiNetworkModel
- trySend(wifiNetworkModel)
- }
- }
-
- override fun onLost(network: Network) {
- logger.logOnLost(network)
-
- wifiNetworkChangeEvents.tryEmit(Unit)
-
- val wifi = currentWifi
- if (wifi is WifiNetworkModel.Active && wifi.networkId == network.getNetId()) {
- val newNetworkModel = WifiNetworkModel.Inactive
- logger.logTransformation(
- WIFI_NETWORK_CALLBACK_NAME,
- oldValue = wifi,
- newValue = newNetworkModel
- )
- currentWifi = newNetworkModel
- trySend(newNetworkModel)
- }
- }
- }
-
- connectivityManager.registerNetworkCallback(WIFI_NETWORK_CALLBACK_REQUEST, callback)
-
- awaitClose { connectivityManager.unregisterNetworkCallback(callback) }
- }
- .distinctUntilChanged()
- .logDiffsForTable(
- wifiTableLogBuffer,
- columnPrefix = "wifiNetwork",
- initialValue = WIFI_NETWORK_DEFAULT,
- )
- // There will be multiple wifi icons in different places that will frequently
- // subscribe/unsubscribe to flows as the views attach/detach. Using [stateIn] ensures that
- // new subscribes will get the latest value immediately upon subscription. Otherwise, the
- // views could show stale data. See b/244173280.
- .stateIn(
- scope,
- started = SharingStarted.WhileSubscribed(),
- initialValue = WIFI_NETWORK_DEFAULT
- )
+ .distinctUntilChanged()
+ .logDiffsForTable(
+ wifiTableLogBuffer,
+ columnPrefix = "wifiNetwork",
+ initialValue = WIFI_NETWORK_DEFAULT,
+ )
+ // There will be multiple wifi icons in different places that will frequently
+ // subscribe/unsubscribe to flows as the views attach/detach. Using [stateIn] ensures
+ // that new subscribes will get the latest value immediately upon subscription.
+ // Otherwise, the views could show stale data. See b/244173280.
+ .stateIn(
+ scope,
+ started = SharingStarted.WhileSubscribed(),
+ initialValue = WIFI_NETWORK_DEFAULT,
+ )
override val wifiActivity: StateFlow<DataActivityModel> =
- if (wifiManager == null) {
- Log.w(SB_LOGGING_TAG, "Null WifiManager; skipping activity callback")
- flowOf(ACTIVITY_DEFAULT)
- } else {
- conflatedCallbackFlow {
- val callback = TrafficStateCallback { state ->
- logger.logInputChange("onTrafficStateChange", prettyPrintActivity(state))
- trySend(state.toWifiDataActivityModel())
- }
- wifiManager.registerTrafficStateCallback(mainExecutor, callback)
- awaitClose { wifiManager.unregisterTrafficStateCallback(callback) }
+ conflatedCallbackFlow {
+ val callback = TrafficStateCallback { state ->
+ logger.logInputChange("onTrafficStateChange", prettyPrintActivity(state))
+ trySend(state.toWifiDataActivityModel())
}
+ wifiManager.registerTrafficStateCallback(mainExecutor, callback)
+ awaitClose { wifiManager.unregisterTrafficStateCallback(callback) }
}
- .logDiffsForTable(
- wifiTableLogBuffer,
- columnPrefix = ACTIVITY_PREFIX,
- initialValue = ACTIVITY_DEFAULT,
- )
- .stateIn(
- scope,
- started = SharingStarted.WhileSubscribed(),
- initialValue = ACTIVITY_DEFAULT
- )
+ .logDiffsForTable(
+ wifiTableLogBuffer,
+ columnPrefix = ACTIVITY_PREFIX,
+ initialValue = ACTIVITY_DEFAULT,
+ )
+ .stateIn(
+ scope,
+ started = SharingStarted.WhileSubscribed(),
+ initialValue = ACTIVITY_DEFAULT,
+ )
companion object {
private const val ACTIVITY_PREFIX = "wifiActivity"
@@ -271,19 +266,19 @@
wifiInfo: WifiInfo,
network: Network,
networkCapabilities: NetworkCapabilities,
- wifiManager: WifiManager?,
+ wifiManager: WifiManager,
): WifiNetworkModel {
return if (wifiInfo.isCarrierMerged) {
WifiNetworkModel.CarrierMerged
} else {
WifiNetworkModel.Active(
- network.getNetId(),
- isValidated = networkCapabilities.hasCapability(NET_CAPABILITY_VALIDATED),
- level = wifiManager?.calculateSignalLevel(wifiInfo.rssi),
- wifiInfo.ssid,
- wifiInfo.isPasspointAp,
- wifiInfo.isOsuAp,
- wifiInfo.passpointProviderFriendlyName
+ network.getNetId(),
+ isValidated = networkCapabilities.hasCapability(NET_CAPABILITY_VALIDATED),
+ level = wifiManager.calculateSignalLevel(wifiInfo.rssi),
+ wifiInfo.ssid,
+ wifiInfo.isPasspointAp,
+ wifiInfo.isOsuAp,
+ wifiInfo.passpointProviderFriendlyName
)
}
}
@@ -308,4 +303,28 @@
private const val WIFI_NETWORK_CALLBACK_NAME = "wifiNetworkModel"
}
+
+ @SysUISingleton
+ class Factory
+ @Inject
+ constructor(
+ private val broadcastDispatcher: BroadcastDispatcher,
+ private val connectivityManager: ConnectivityManager,
+ private val logger: ConnectivityPipelineLogger,
+ @WifiTableLog private val wifiTableLogBuffer: TableLogBuffer,
+ @Main private val mainExecutor: Executor,
+ @Application private val scope: CoroutineScope,
+ ) {
+ fun create(wifiManager: WifiManager): WifiRepositoryImpl {
+ return WifiRepositoryImpl(
+ broadcastDispatcher,
+ connectivityManager,
+ logger,
+ wifiTableLogBuffer,
+ mainExecutor,
+ scope,
+ wifiManager,
+ )
+ }
+ }
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/wifi/domain/interactor/WifiInteractor.kt b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/wifi/domain/interactor/WifiInteractor.kt
index 93041ce..980560a 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/wifi/domain/interactor/WifiInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/wifi/domain/interactor/WifiInteractor.kt
@@ -65,6 +65,7 @@
override val ssid: Flow<String?> = wifiRepository.wifiNetwork.map { info ->
when (info) {
+ is WifiNetworkModel.Unavailable -> null
is WifiNetworkModel.Inactive -> null
is WifiNetworkModel.CarrierMerged -> null
is WifiNetworkModel.Active -> when {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/wifi/ui/viewmodel/WifiViewModel.kt b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/wifi/ui/viewmodel/WifiViewModel.kt
index ab464cc..824b597 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/wifi/ui/viewmodel/WifiViewModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/wifi/ui/viewmodel/WifiViewModel.kt
@@ -82,6 +82,7 @@
/** Returns the icon to use based on the given network. */
private fun WifiNetworkModel.icon(): WifiIcon {
return when (this) {
+ is WifiNetworkModel.Unavailable -> WifiIcon.Hidden
is WifiNetworkModel.CarrierMerged -> WifiIcon.Hidden
is WifiNetworkModel.Inactive -> WifiIcon.Visible(
res = WIFI_NO_NETWORK,
@@ -89,27 +90,23 @@
"${context.getString(WIFI_NO_CONNECTION)},${context.getString(NO_INTERNET)}"
)
)
- is WifiNetworkModel.Active ->
- when (this.level) {
- null -> WifiIcon.Hidden
- else -> {
- val levelDesc = context.getString(WIFI_CONNECTION_STRENGTH[this.level])
- when {
- this.isValidated ->
- WifiIcon.Visible(
- WIFI_FULL_ICONS[this.level],
- ContentDescription.Loaded(levelDesc)
- )
- else ->
- WifiIcon.Visible(
- WIFI_NO_INTERNET_ICONS[this.level],
- ContentDescription.Loaded(
- "$levelDesc,${context.getString(NO_INTERNET)}"
- )
- )
- }
- }
+ is WifiNetworkModel.Active -> {
+ val levelDesc = context.getString(WIFI_CONNECTION_STRENGTH[this.level])
+ when {
+ this.isValidated ->
+ WifiIcon.Visible(
+ WIFI_FULL_ICONS[this.level],
+ ContentDescription.Loaded(levelDesc),
+ )
+ else ->
+ WifiIcon.Visible(
+ WIFI_NO_INTERNET_ICONS[this.level],
+ ContentDescription.Loaded(
+ "$levelDesc,${context.getString(NO_INTERNET)}"
+ ),
+ )
}
+ }
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/temporarydisplay/chipbar/ChipbarCoordinator.kt b/packages/SystemUI/src/com/android/systemui/temporarydisplay/chipbar/ChipbarCoordinator.kt
index 52980c3..04b1a50 100644
--- a/packages/SystemUI/src/com/android/systemui/temporarydisplay/chipbar/ChipbarCoordinator.kt
+++ b/packages/SystemUI/src/com/android/systemui/temporarydisplay/chipbar/ChipbarCoordinator.kt
@@ -65,26 +65,27 @@
* in the list of notifications until the user dismisses them.
*
* Only one chipbar may be shown at a time.
- * TODO(b/245610654): Should we just display whichever chipbar was most recently requested, or do we
- * need to maintain a priority ordering?
*/
@SysUISingleton
-open class ChipbarCoordinator @Inject constructor(
- context: Context,
- logger: ChipbarLogger,
- windowManager: WindowManager,
- @Main mainExecutor: DelayableExecutor,
- accessibilityManager: AccessibilityManager,
- configurationController: ConfigurationController,
- dumpManager: DumpManager,
- powerManager: PowerManager,
- private val falsingManager: FalsingManager,
- private val falsingCollector: FalsingCollector,
- private val viewUtil: ViewUtil,
- private val vibratorHelper: VibratorHelper,
- wakeLockBuilder: WakeLock.Builder,
- systemClock: SystemClock,
-) : TemporaryViewDisplayController<ChipbarInfo, ChipbarLogger>(
+open class ChipbarCoordinator
+@Inject
+constructor(
+ context: Context,
+ logger: ChipbarLogger,
+ windowManager: WindowManager,
+ @Main mainExecutor: DelayableExecutor,
+ accessibilityManager: AccessibilityManager,
+ configurationController: ConfigurationController,
+ dumpManager: DumpManager,
+ powerManager: PowerManager,
+ private val falsingManager: FalsingManager,
+ private val falsingCollector: FalsingCollector,
+ private val viewUtil: ViewUtil,
+ private val vibratorHelper: VibratorHelper,
+ wakeLockBuilder: WakeLock.Builder,
+ systemClock: SystemClock,
+) :
+ TemporaryViewDisplayController<ChipbarInfo, ChipbarLogger>(
context,
logger,
windowManager,
@@ -96,18 +97,14 @@
R.layout.chipbar,
wakeLockBuilder,
systemClock,
-) {
+ ) {
private lateinit var parent: ChipbarRootView
- override val windowLayoutParams = commonWindowLayoutParams.apply {
- gravity = Gravity.TOP.or(Gravity.CENTER_HORIZONTAL)
- }
+ override val windowLayoutParams =
+ commonWindowLayoutParams.apply { gravity = Gravity.TOP.or(Gravity.CENTER_HORIZONTAL) }
- override fun updateView(
- newInfo: ChipbarInfo,
- currentView: ViewGroup
- ) {
+ override fun updateView(newInfo: ChipbarInfo, currentView: ViewGroup) {
logger.logViewUpdate(
newInfo.windowTitle,
newInfo.text.loadText(context),
@@ -123,12 +120,13 @@
// Detect falsing touches on the chip.
parent = currentView.requireViewById(R.id.chipbar_root_view)
- parent.touchHandler = object : Gefingerpoken {
- override fun onTouchEvent(ev: MotionEvent?): Boolean {
- falsingCollector.onTouchEvent(ev)
- return false
+ parent.touchHandler =
+ object : Gefingerpoken {
+ override fun onTouchEvent(ev: MotionEvent?): Boolean {
+ falsingCollector.onTouchEvent(ev)
+ return false
+ }
}
- }
// ---- Start icon ----
val iconView = currentView.requireViewById<CachingIconView>(R.id.start_icon)
@@ -155,10 +153,12 @@
if (newInfo.endItem is ChipbarEndItem.Button) {
TextViewBinder.bind(buttonView, newInfo.endItem.text)
- val onClickListener = View.OnClickListener { clickedView ->
- if (falsingManager.isFalseTap(FalsingManager.LOW_PENALTY)) return@OnClickListener
- newInfo.endItem.onClickListener.onClick(clickedView)
- }
+ val onClickListener =
+ View.OnClickListener { clickedView ->
+ if (falsingManager.isFalseTap(FalsingManager.LOW_PENALTY))
+ return@OnClickListener
+ newInfo.endItem.onClickListener.onClick(clickedView)
+ }
buttonView.setOnClickListener(onClickListener)
buttonView.visibility = View.VISIBLE
@@ -168,21 +168,27 @@
// ---- Overall accessibility ----
val iconDesc = newInfo.startIcon.icon.contentDescription
- val loadedIconDesc = if (iconDesc != null) {
- "${iconDesc.loadContentDescription(context)} "
- } else {
- ""
- }
+ val loadedIconDesc =
+ if (iconDesc != null) {
+ "${iconDesc.loadContentDescription(context)} "
+ } else {
+ ""
+ }
+ val endItemDesc =
+ if (newInfo.endItem is ChipbarEndItem.Loading) {
+ ". ${context.resources.getString(R.string.media_transfer_loading)}."
+ } else {
+ ""
+ }
val chipInnerView = currentView.getInnerView()
- chipInnerView.contentDescription = "$loadedIconDesc${newInfo.text.loadText(context)}"
+ chipInnerView.contentDescription =
+ "$loadedIconDesc${newInfo.text.loadText(context)}$endItemDesc"
chipInnerView.accessibilityLiveRegion = ACCESSIBILITY_LIVE_REGION_ASSERTIVE
maybeGetAccessibilityFocus(newInfo, currentView)
// ---- Haptics ----
- newInfo.vibrationEffect?.let {
- vibratorHelper.vibrate(it)
- }
+ newInfo.vibrationEffect?.let { vibratorHelper.vibrate(it) }
}
private fun maybeGetAccessibilityFocus(info: ChipbarInfo?, view: ViewGroup) {
diff --git a/packages/SystemUI/src/com/android/systemui/util/animation/TransitionLayout.kt b/packages/SystemUI/src/com/android/systemui/util/animation/TransitionLayout.kt
index 46611e0..08ee0af 100644
--- a/packages/SystemUI/src/com/android/systemui/util/animation/TransitionLayout.kt
+++ b/packages/SystemUI/src/com/android/systemui/util/animation/TransitionLayout.kt
@@ -59,8 +59,8 @@
*/
var measureState: TransitionViewState = TransitionViewState()
set(value) {
- val newWidth = value.width
- val newHeight = value.height
+ val newWidth = value.measureWidth
+ val newHeight = value.measureHeight
if (newWidth != desiredMeasureWidth || newHeight != desiredMeasureHeight) {
desiredMeasureWidth = newWidth
desiredMeasureHeight = newHeight
@@ -318,8 +318,28 @@
class TransitionViewState {
var widgetStates: MutableMap<Int, WidgetState> = mutableMapOf()
+
+ /**
+ * The visible width of this ViewState. This may differ from the measuredWidth when e.g.
+ * squishing the view
+ */
var width: Int = 0
+
+ /**
+ * The visible height of this ViewState. This may differ from the measuredHeight when e.g.
+ * squishing the view
+ */
var height: Int = 0
+
+ /**
+ * The height that determines the measured dimensions of the view
+ */
+ var measureHeight: Int = 0
+
+ /**
+ * The width that determines the measured dimensions of the view
+ */
+ var measureWidth: Int = 0
var alpha: Float = 1.0f
val translation = PointF()
val contentTranslation = PointF()
@@ -328,6 +348,8 @@
val copy = reusedState ?: TransitionViewState()
copy.width = width
copy.height = height
+ copy.measureHeight = measureHeight
+ copy.measureWidth = measureWidth
copy.alpha = alpha
copy.translation.set(translation.x, translation.y)
copy.contentTranslation.set(contentTranslation.x, contentTranslation.y)
@@ -348,6 +370,8 @@
}
width = transitionLayout.measuredWidth
height = transitionLayout.measuredHeight
+ measureWidth = width
+ measureHeight = height
translation.set(0.0f, 0.0f)
contentTranslation.set(0.0f, 0.0f)
alpha = 1.0f
diff --git a/packages/SystemUI/src/com/android/systemui/util/animation/TransitionLayoutController.kt b/packages/SystemUI/src/com/android/systemui/util/animation/TransitionLayoutController.kt
index 0c9b48e..5d80292 100644
--- a/packages/SystemUI/src/com/android/systemui/util/animation/TransitionLayoutController.kt
+++ b/packages/SystemUI/src/com/android/systemui/util/animation/TransitionLayoutController.kt
@@ -234,6 +234,15 @@
progress).toInt()
height = MathUtils.lerp(startState.height.toFloat(), endState.height.toFloat(),
progress).toInt()
+ // If we're at the start, let's measure with the starting dimensions, otherwise always
+ // with the end state
+ if (progress == 0.0f) {
+ measureWidth = startState.measureWidth
+ measureHeight = startState.measureHeight
+ } else {
+ measureWidth = endState.measureWidth
+ measureHeight = endState.measureHeight
+ }
translation.x = MathUtils.lerp(startState.translation.x, endState.translation.x,
progress)
translation.y = MathUtils.lerp(startState.translation.y, endState.translation.y,
diff --git a/packages/SystemUI/tests/src/com/android/keyguard/mediator/ScreenOnCoordinatorTest.kt b/packages/SystemUI/tests/src/com/android/keyguard/mediator/ScreenOnCoordinatorTest.kt
index 34e78eb..e9a2789 100644
--- a/packages/SystemUI/tests/src/com/android/keyguard/mediator/ScreenOnCoordinatorTest.kt
+++ b/packages/SystemUI/tests/src/com/android/keyguard/mediator/ScreenOnCoordinatorTest.kt
@@ -16,29 +16,25 @@
package com.android.keyguard.mediator
+import android.os.Handler
+import android.os.Looper
import android.testing.AndroidTestingRunner
import androidx.test.filters.SmallTest
-
import com.android.systemui.SysuiTestCase
-import com.android.systemui.keyguard.ScreenLifecycle
import com.android.systemui.unfold.FoldAodAnimationController
import com.android.systemui.unfold.SysUIUnfoldComponent
import com.android.systemui.unfold.UnfoldLightRevealOverlayAnimation
-import com.android.systemui.util.concurrency.FakeExecution
import com.android.systemui.util.mockito.capture
-
-import java.util.Optional
-
import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith
-
import org.mockito.ArgumentCaptor
import org.mockito.Captor
import org.mockito.Mock
import org.mockito.Mockito.`when`
import org.mockito.Mockito.verify
import org.mockito.MockitoAnnotations
+import java.util.Optional
@SmallTest
@RunWith(AndroidTestingRunner::class)
@@ -55,6 +51,8 @@
@Captor
private lateinit var readyCaptor: ArgumentCaptor<Runnable>
+ private val testHandler = Handler(Looper.getMainLooper())
+
private lateinit var screenOnCoordinator: ScreenOnCoordinator
@Before
@@ -68,6 +66,7 @@
screenOnCoordinator = ScreenOnCoordinator(
Optional.of(unfoldComponent),
+ testHandler
)
}
@@ -77,6 +76,7 @@
onUnfoldOverlayReady()
onFoldAodReady()
+ waitHandlerIdle(testHandler)
// Should be called when both unfold overlay and keyguard drawn ready
verify(runnable).run()
@@ -87,8 +87,10 @@
// Recreate with empty unfoldComponent
screenOnCoordinator = ScreenOnCoordinator(
Optional.empty(),
+ testHandler
)
screenOnCoordinator.onScreenTurningOn(runnable)
+ waitHandlerIdle(testHandler)
// Should be called when only keyguard drawn
verify(runnable).run()
@@ -103,4 +105,8 @@
verify(foldAodAnimationController).onScreenTurningOn(capture(readyCaptor))
readyCaptor.value.run()
}
+
+ private fun waitHandlerIdle(handler: Handler) {
+ handler.runWithScissors({}, /* timeout= */ 0)
+ }
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/KeyguardUnlockAnimationControllerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/keyguard/KeyguardUnlockAnimationControllerTest.kt
index a78c902..2c81e82 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/keyguard/KeyguardUnlockAnimationControllerTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/KeyguardUnlockAnimationControllerTest.kt
@@ -4,6 +4,7 @@
import android.app.WindowConfiguration
import android.graphics.Point
import android.graphics.Rect
+import android.os.PowerManager
import android.testing.AndroidTestingRunner
import android.testing.TestableLooper.RunWithLooper
import android.view.RemoteAnimationTarget
@@ -19,15 +20,16 @@
import com.android.systemui.statusbar.SysuiStatusBarStateController
import com.android.systemui.statusbar.phone.BiometricUnlockController
import com.android.systemui.statusbar.policy.KeyguardStateController
+import com.android.systemui.util.mockito.whenever
import junit.framework.Assert.assertEquals
import junit.framework.Assert.assertFalse
import junit.framework.Assert.assertTrue
+import org.junit.After
import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith
import org.mockito.ArgumentCaptor.forClass
import org.mockito.Mock
-import org.mockito.Mockito.`when`
import org.mockito.Mockito.mock
import org.mockito.Mockito.times
import org.mockito.Mockito.verify
@@ -56,6 +58,8 @@
private lateinit var statusBarStateController: SysuiStatusBarStateController
@Mock
private lateinit var notificationShadeWindowController: NotificationShadeWindowController
+ @Mock
+ private lateinit var powerManager: PowerManager
@Mock
private lateinit var launcherUnlockAnimationController: ILauncherUnlockAnimationController.Stub
@@ -79,12 +83,13 @@
keyguardUnlockAnimationController = KeyguardUnlockAnimationController(
context, keyguardStateController, { keyguardViewMediator }, keyguardViewController,
featureFlags, { biometricUnlockController }, statusBarStateController,
- notificationShadeWindowController
+ notificationShadeWindowController, powerManager
)
keyguardUnlockAnimationController.setLauncherUnlockController(
launcherUnlockAnimationController)
- `when`(keyguardViewController.viewRootImpl).thenReturn(mock(ViewRootImpl::class.java))
+ whenever(keyguardViewController.viewRootImpl).thenReturn(mock(ViewRootImpl::class.java))
+ whenever(powerManager.isInteractive).thenReturn(true)
// All of these fields are final, so we can't mock them, but are needed so that the surface
// appear amount setter doesn't short circuit.
@@ -96,6 +101,12 @@
keyguardUnlockAnimationController.surfaceTransactionApplier = surfaceTransactionApplier
}
+ @After
+ fun tearDown() {
+ keyguardUnlockAnimationController.surfaceBehindEntryAnimator.cancel()
+ keyguardUnlockAnimationController.surfaceBehindAlphaAnimator.cancel()
+ }
+
/**
* If we're wake and unlocking, we are animating from the black/AOD screen to the app/launcher
* underneath. The LightRevealScrim will animate circularly from the fingerprint reader,
@@ -104,7 +115,7 @@
*/
@Test
fun noSurfaceAnimation_ifWakeAndUnlocking() {
- `when`(biometricUnlockController.isWakeAndUnlock).thenReturn(true)
+ whenever(biometricUnlockController.isWakeAndUnlock).thenReturn(true)
keyguardUnlockAnimationController.notifyStartSurfaceBehindRemoteAnimation(
remoteAnimationTargets,
@@ -124,7 +135,7 @@
// Also expect we've immediately asked the keyguard view mediator to finish the remote
// animation.
- verify(keyguardViewMediator, times(1)).onKeyguardExitRemoteAnimationFinished(
+ verify(keyguardViewMediator, times(1)).exitKeyguardAndFinishSurfaceBehindRemoteAnimation(
false /* cancelled */)
verifyNoMoreInteractions(surfaceTransactionApplier)
@@ -135,7 +146,7 @@
*/
@Test
fun surfaceAnimation_ifNotWakeAndUnlocking() {
- `when`(biometricUnlockController.isWakeAndUnlock).thenReturn(false)
+ whenever(biometricUnlockController.isWakeAndUnlock).thenReturn(false)
keyguardUnlockAnimationController.notifyStartSurfaceBehindRemoteAnimation(
remoteAnimationTargets,
@@ -144,7 +155,7 @@
)
// Since the animation is running, we should not have finished the remote animation.
- verify(keyguardViewMediator, times(0)).onKeyguardExitRemoteAnimationFinished(
+ verify(keyguardViewMediator, times(0)).exitKeyguardAndFinishSurfaceBehindRemoteAnimation(
false /* cancelled */)
}
@@ -159,7 +170,7 @@
*/
@Test
fun fadeInSurfaceBehind_ifRequestedShowSurface_butNotFlinging() {
- `when`(keyguardStateController.isFlingingToDismissKeyguard).thenReturn(false)
+ whenever(keyguardStateController.isFlingingToDismissKeyguard).thenReturn(false)
keyguardUnlockAnimationController.notifyStartSurfaceBehindRemoteAnimation(
remoteAnimationTargets,
@@ -181,7 +192,7 @@
*/
@Test
fun playCannedUnlockAnimation_ifRequestedShowSurface_andFlinging() {
- `when`(keyguardStateController.isFlingingToDismissKeyguard).thenReturn(true)
+ whenever(keyguardStateController.isFlingingToDismissKeyguard).thenReturn(true)
keyguardUnlockAnimationController.notifyStartSurfaceBehindRemoteAnimation(
remoteAnimationTargets,
@@ -215,7 +226,7 @@
@Test
fun doNotPlayCannedUnlockAnimation_ifLaunchingApp() {
- `when`(notificationShadeWindowController.isLaunchingActivity).thenReturn(true)
+ whenever(notificationShadeWindowController.isLaunchingActivity).thenReturn(true)
keyguardUnlockAnimationController.notifyStartSurfaceBehindRemoteAnimation(
remoteAnimationTargets,
@@ -272,7 +283,53 @@
assertTrue(remainingTargets.isEmpty())
// Since the animation is running, we should not have finished the remote animation.
- verify(keyguardViewMediator, times(0)).onKeyguardExitRemoteAnimationFinished(
+ verify(keyguardViewMediator, times(0)).exitKeyguardAndFinishSurfaceBehindRemoteAnimation(
false /* cancelled */)
}
+
+ @Test
+ fun surfaceBehindAlphaOverriddenTo0_ifNotInteractive() {
+ whenever(powerManager.isInteractive).thenReturn(false)
+
+ keyguardUnlockAnimationController.notifyStartSurfaceBehindRemoteAnimation(
+ remoteAnimationTargets,
+ 0 /* startTime */,
+ false /* requestedShowSurfaceBehindKeyguard */
+ )
+
+ keyguardUnlockAnimationController.setSurfaceBehindAppearAmount(1f)
+
+ val captor = forClass(SyncRtSurfaceTransactionApplier.SurfaceParams::class.java)
+ verify(surfaceTransactionApplier, times(1)).scheduleApply(captor.capture())
+
+ val params = captor.value
+
+ // We expect that we've set the surface behind to alpha = 0f since we're not interactive.
+ assertEquals(params.alpha, 0f)
+ assertTrue(params.matrix.isIdentity)
+
+ verifyNoMoreInteractions(surfaceTransactionApplier)
+ }
+
+ @Test
+ fun surfaceBehindAlphaNotOverriddenTo0_ifInteractive() {
+ whenever(powerManager.isInteractive).thenReturn(true)
+
+ keyguardUnlockAnimationController.notifyStartSurfaceBehindRemoteAnimation(
+ remoteAnimationTargets,
+ 0 /* startTime */,
+ false /* requestedShowSurfaceBehindKeyguard */
+ )
+
+ keyguardUnlockAnimationController.setSurfaceBehindAppearAmount(1f)
+
+ val captor = forClass(SyncRtSurfaceTransactionApplier.SurfaceParams::class.java)
+ verify(surfaceTransactionApplier, times(1)).scheduleApply(captor.capture())
+
+ val params = captor.value
+ assertEquals(params.alpha, 1f)
+ assertTrue(params.matrix.isIdentity)
+
+ verifyNoMoreInteractions(surfaceTransactionApplier)
+ }
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/KeyguardViewMediatorTest.java b/packages/SystemUI/tests/src/com/android/systemui/keyguard/KeyguardViewMediatorTest.java
index 804960d..5196f49 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/keyguard/KeyguardViewMediatorTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/KeyguardViewMediatorTest.java
@@ -57,6 +57,7 @@
import com.android.keyguard.KeyguardSecurityView;
import com.android.keyguard.KeyguardUpdateMonitor;
import com.android.keyguard.mediator.ScreenOnCoordinator;
+import com.android.systemui.DejankUtils;
import com.android.systemui.SysuiTestCase;
import com.android.systemui.animation.ActivityLaunchAnimator;
import com.android.systemui.biometrics.AuthController;
@@ -70,6 +71,7 @@
import com.android.systemui.shade.NotificationShadeWindowControllerImpl;
import com.android.systemui.shade.ShadeController;
import com.android.systemui.shade.ShadeExpansionStateManager;
+import com.android.systemui.shade.ShadeWindowLogger;
import com.android.systemui.statusbar.NotificationShadeDepthController;
import com.android.systemui.statusbar.NotificationShadeWindowController;
import com.android.systemui.statusbar.SysuiStatusBarStateController;
@@ -132,6 +134,7 @@
private @Mock SysuiColorExtractor mColorExtractor;
private @Mock AuthController mAuthController;
private @Mock ShadeExpansionStateManager mShadeExpansionStateManager;
+ private @Mock ShadeWindowLogger mShadeWindowLogger;
private DeviceConfigProxy mDeviceConfig = new DeviceConfigProxyFake();
private FakeExecutor mUiBgExecutor = new FakeExecutor(new FakeSystemClock());
@@ -155,7 +158,10 @@
mWindowManager, mActivityManager, mDozeParameters, mStatusBarStateController,
mConfigurationController, mViewMediator, mKeyguardBypassController,
mColorExtractor, mDumpManager, mKeyguardStateController,
- mScreenOffAnimationController, mAuthController, mShadeExpansionStateManager);
+ mScreenOffAnimationController, mAuthController, mShadeExpansionStateManager,
+ mShadeWindowLogger);
+
+ DejankUtils.setImmediate(true);
createAndStartViewMediator();
}
@@ -354,7 +360,67 @@
@Test
@TestableLooper.RunWithLooper(setAsMainLooper = true)
+ public void testCancelKeyguardExitAnimation_noPendingLock_keyguardWillNotBeShowing() {
+ startMockKeyguardExitAnimation();
+ cancelMockKeyguardExitAnimation();
+
+ // There should not be a pending lock, but try to handle it anyway to ensure one isn't set.
+ mViewMediator.maybeHandlePendingLock();
+ TestableLooper.get(this).processAllMessages();
+
+ assertFalse(mViewMediator.isShowingAndNotOccluded());
+ }
+
+ @Test
+ @TestableLooper.RunWithLooper(setAsMainLooper = true)
+ public void testCancelKeyguardExitAnimationDueToSleep_withPendingLock_keyguardWillBeShowing() {
+ startMockKeyguardExitAnimation();
+
+ mViewMediator.onStartedGoingToSleep(PowerManager.GO_TO_SLEEP_REASON_POWER_BUTTON);
+ mViewMediator.onFinishedGoingToSleep(PowerManager.GO_TO_SLEEP_REASON_POWER_BUTTON, false);
+
+ cancelMockKeyguardExitAnimation();
+
+ mViewMediator.maybeHandlePendingLock();
+ TestableLooper.get(this).processAllMessages();
+
+ assertTrue(mViewMediator.isShowingAndNotOccluded());
+ }
+
+ @Test
+ @TestableLooper.RunWithLooper(setAsMainLooper = true)
+ public void testCancelKeyguardExitAnimationThenSleep_withPendingLock_keyguardWillBeShowing() {
+ startMockKeyguardExitAnimation();
+ cancelMockKeyguardExitAnimation();
+
+ mViewMediator.maybeHandlePendingLock();
+ TestableLooper.get(this).processAllMessages();
+
+ mViewMediator.onStartedGoingToSleep(PowerManager.GO_TO_SLEEP_REASON_POWER_BUTTON);
+ mViewMediator.onFinishedGoingToSleep(PowerManager.GO_TO_SLEEP_REASON_POWER_BUTTON, false);
+
+ mViewMediator.maybeHandlePendingLock();
+ TestableLooper.get(this).processAllMessages();
+
+ assertTrue(mViewMediator.isShowingAndNotOccluded());
+ }
+
+ @Test
+ @TestableLooper.RunWithLooper(setAsMainLooper = true)
public void testStartKeyguardExitAnimation_expectSurfaceBehindRemoteAnimation() {
+ startMockKeyguardExitAnimation();
+ assertTrue(mViewMediator.isAnimatingBetweenKeyguardAndSurfaceBehind());
+ }
+
+ /**
+ * Configures mocks appropriately, then starts the keyguard exit animation.
+ */
+ private void startMockKeyguardExitAnimation() {
+ mViewMediator.onSystemReady();
+ TestableLooper.get(this).processAllMessages();
+
+ mViewMediator.setShowingLocked(true);
+
RemoteAnimationTarget[] apps = new RemoteAnimationTarget[]{
mock(RemoteAnimationTarget.class)
};
@@ -363,10 +429,19 @@
};
IRemoteAnimationFinishedCallback callback = mock(IRemoteAnimationFinishedCallback.class);
+ when(mKeyguardStateController.isKeyguardGoingAway()).thenReturn(true);
mViewMediator.startKeyguardExitAnimation(TRANSIT_OLD_KEYGUARD_GOING_AWAY, apps, wallpapers,
null, callback);
TestableLooper.get(this).processAllMessages();
- assertTrue(mViewMediator.isAnimatingBetweenKeyguardAndSurfaceBehind());
+ }
+
+ /**
+ * Configures mocks appropriately, then cancels the keyguard exit animation.
+ */
+ private void cancelMockKeyguardExitAnimation() {
+ when(mKeyguardStateController.isKeyguardGoingAway()).thenReturn(false);
+ mViewMediator.cancelKeyguardExitAnimation();
+ TestableLooper.get(this).processAllMessages();
}
private void createAndStartViewMediator() {
diff --git a/packages/SystemUI/tests/src/com/android/systemui/media/controls/ui/MediaViewControllerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/media/controls/ui/MediaViewControllerTest.kt
index 6b76155..35b0eb6 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/media/controls/ui/MediaViewControllerTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/media/controls/ui/MediaViewControllerTest.kt
@@ -58,6 +58,7 @@
@Mock private lateinit var mockCopiedState: TransitionViewState
@Mock private lateinit var detailWidgetState: WidgetState
@Mock private lateinit var controlWidgetState: WidgetState
+ @Mock private lateinit var bgWidgetState: WidgetState
@Mock private lateinit var mediaTitleWidgetState: WidgetState
@Mock private lateinit var mediaContainerWidgetState: WidgetState
@@ -75,7 +76,10 @@
@Test
fun testObtainViewState_applySquishFraction_toPlayerTransitionViewState_height() {
mediaViewController.attach(player, MediaViewController.TYPE.PLAYER)
- player.measureState = TransitionViewState().apply { this.height = 100 }
+ player.measureState = TransitionViewState().apply {
+ this.height = 100
+ this.measureHeight = 100
+ }
mediaHostStateHolder.expansion = 1f
val widthMeasureSpec = View.MeasureSpec.makeMeasureSpec(100, View.MeasureSpec.EXACTLY)
val heightMeasureSpec = View.MeasureSpec.makeMeasureSpec(100, View.MeasureSpec.EXACTLY)
@@ -85,10 +89,12 @@
// Test no squish
mediaHostStateHolder.squishFraction = 1f
assertTrue(mediaViewController.obtainViewState(mediaHostStateHolder)!!.height == 100)
+ assertTrue(mediaViewController.obtainViewState(mediaHostStateHolder)!!.measureHeight == 100)
// Test half squish
mediaHostStateHolder.squishFraction = 0.5f
assertTrue(mediaViewController.obtainViewState(mediaHostStateHolder)!!.height == 50)
+ assertTrue(mediaViewController.obtainViewState(mediaHostStateHolder)!!.measureHeight == 100)
}
@Test
@@ -104,10 +110,12 @@
// Test no squish
mediaHostStateHolder.squishFraction = 1f
assertTrue(mediaViewController.obtainViewState(mediaHostStateHolder)!!.height == 100)
+ assertTrue(mediaViewController.obtainViewState(mediaHostStateHolder)!!.measureHeight == 100)
// Test half squish
mediaHostStateHolder.squishFraction = 0.5f
assertTrue(mediaViewController.obtainViewState(mediaHostStateHolder)!!.height == 50)
+ assertTrue(mediaViewController.obtainViewState(mediaHostStateHolder)!!.measureHeight == 100)
}
@Test
diff --git a/packages/SystemUI/tests/src/com/android/systemui/navigationbar/NavBarHelperTest.java b/packages/SystemUI/tests/src/com/android/systemui/navigationbar/NavBarHelperTest.java
index 1865ef6..ce6a98c 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/navigationbar/NavBarHelperTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/navigationbar/NavBarHelperTest.java
@@ -146,7 +146,7 @@
verify(mNavbarTaskbarStateUpdater, times(1))
.updateAccessibilityServicesState();
verify(mNavbarTaskbarStateUpdater, times(1))
- .updateAssistantAvailable(anyBoolean());
+ .updateAssistantAvailable(anyBoolean(), anyBoolean());
}
@Test
@@ -160,14 +160,14 @@
verify(mNavbarTaskbarStateUpdater, times(1))
.updateAccessibilityServicesState();
verify(mNavbarTaskbarStateUpdater, times(1))
- .updateAssistantAvailable(anyBoolean());
+ .updateAssistantAvailable(anyBoolean(), anyBoolean());
mNavBarHelper.onConnectionChanged(true);
// assert no more callbacks fired
verify(mNavbarTaskbarStateUpdater, times(1))
.updateAccessibilityServicesState();
verify(mNavbarTaskbarStateUpdater, times(2))
- .updateAssistantAvailable(anyBoolean());
+ .updateAssistantAvailable(anyBoolean(), anyBoolean());
}
@Test
@@ -180,7 +180,7 @@
verify(mNavbarTaskbarStateUpdater, times(2))
.updateAccessibilityServicesState();
verify(mNavbarTaskbarStateUpdater, times(1))
- .updateAssistantAvailable(anyBoolean());
+ .updateAssistantAvailable(anyBoolean(), anyBoolean());
}
@Test
@@ -193,7 +193,7 @@
verify(mNavbarTaskbarStateUpdater, times(1))
.updateAccessibilityServicesState();
verify(mNavbarTaskbarStateUpdater, times(2))
- .updateAssistantAvailable(anyBoolean());
+ .updateAssistantAvailable(anyBoolean(), anyBoolean());
}
@Test
@@ -212,7 +212,7 @@
verify(mNavbarTaskbarStateUpdater, times(1))
.updateAccessibilityServicesState();
verify(mNavbarTaskbarStateUpdater, times(1))
- .updateAssistantAvailable(anyBoolean());
+ .updateAssistantAvailable(anyBoolean(), anyBoolean());
}
@Test
diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/QSFragmentTest.java b/packages/SystemUI/tests/src/com/android/systemui/qs/QSFragmentTest.java
index ffe918d..42ef9c2 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/qs/QSFragmentTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/qs/QSFragmentTest.java
@@ -151,7 +151,7 @@
@Test
public void transitionToFullShade_setsAlphaUsingShadeInterpolator() {
QSFragment fragment = resumeAndGetFragment();
- setStatusBarState(StatusBarState.SHADE);
+ setStatusBarCurrentAndUpcomingState(StatusBarState.SHADE);
boolean isTransitioningToFullShade = true;
float transitionProgress = 0.5f;
float squishinessFraction = 0.5f;
@@ -167,7 +167,7 @@
public void
transitionToFullShade_onKeyguard_noBouncer_setsAlphaUsingLinearInterpolator() {
QSFragment fragment = resumeAndGetFragment();
- setStatusBarState(KEYGUARD);
+ setStatusBarCurrentAndUpcomingState(KEYGUARD);
when(mQSPanelController.isBouncerInTransit()).thenReturn(false);
boolean isTransitioningToFullShade = true;
float transitionProgress = 0.5f;
@@ -183,7 +183,7 @@
public void
transitionToFullShade_onKeyguard_bouncerActive_setsAlphaUsingBouncerInterpolator() {
QSFragment fragment = resumeAndGetFragment();
- setStatusBarState(KEYGUARD);
+ setStatusBarCurrentAndUpcomingState(KEYGUARD);
when(mQSPanelController.isBouncerInTransit()).thenReturn(true);
boolean isTransitioningToFullShade = true;
float transitionProgress = 0.5f;
@@ -482,6 +482,15 @@
assertEquals(175, mediaHostClip.bottom);
}
+ @Test
+ public void testQsUpdatesQsAnimatorWithUpcomingState() {
+ QSFragment fragment = resumeAndGetFragment();
+ setStatusBarCurrentAndUpcomingState(SHADE);
+ fragment.onUpcomingStateChanged(KEYGUARD);
+
+ verify(mQSAnimator).setOnKeyguard(true);
+ }
+
@Override
protected Fragment instantiate(Context context, String className, Bundle arguments) {
MockitoAnnotations.initMocks(this);
@@ -591,8 +600,9 @@
return getFragment();
}
- private void setStatusBarState(int statusBarState) {
+ private void setStatusBarCurrentAndUpcomingState(int statusBarState) {
when(mStatusBarStateController.getState()).thenReturn(statusBarState);
+ when(mStatusBarStateController.getCurrentOrUpcomingState()).thenReturn(statusBarState);
getFragment().onStateChanged(statusBarState);
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationShadeWindowControllerImplTest.java b/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationShadeWindowControllerImplTest.java
index d7d17b5..08a9c96 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationShadeWindowControllerImplTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationShadeWindowControllerImplTest.java
@@ -89,6 +89,7 @@
@Mock private ScreenOffAnimationController mScreenOffAnimationController;
@Mock private AuthController mAuthController;
@Mock private ShadeExpansionStateManager mShadeExpansionStateManager;
+ @Mock private ShadeWindowLogger mShadeWindowLogger;
@Captor private ArgumentCaptor<WindowManager.LayoutParams> mLayoutParameters;
private NotificationShadeWindowControllerImpl mNotificationShadeWindowController;
@@ -104,7 +105,8 @@
mWindowManager, mActivityManager, mDozeParameters, mStatusBarStateController,
mConfigurationController, mKeyguardViewMediator, mKeyguardBypassController,
mColorExtractor, mDumpManager, mKeyguardStateController,
- mScreenOffAnimationController, mAuthController, mShadeExpansionStateManager) {
+ mScreenOffAnimationController, mAuthController, mShadeExpansionStateManager,
+ mShadeWindowLogger) {
@Override
protected boolean isDebuggable() {
return false;
diff --git a/packages/SystemUI/tests/src/com/android/systemui/smartspace/DreamSmartspaceControllerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/smartspace/DreamSmartspaceControllerTest.kt
index 37f96c8..001e1f4 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/smartspace/DreamSmartspaceControllerTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/smartspace/DreamSmartspaceControllerTest.kt
@@ -98,6 +98,8 @@
override fun setIsDreaming(isDreaming: Boolean) {}
+ override fun setUiSurface(uiSurface: String) {}
+
override fun setDozeAmount(amount: Float) {}
override fun setIntentStarter(intentStarter: BcSmartspaceDataPlugin.IntentStarter?) {}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/KeyguardIndicationControllerTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/KeyguardIndicationControllerTest.java
index 8d96932..d2dd433 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/KeyguardIndicationControllerTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/KeyguardIndicationControllerTest.java
@@ -661,6 +661,7 @@
String message = mContext.getString(R.string.keyguard_retry);
when(mStatusBarKeyguardViewManager.isBouncerShowing()).thenReturn(true);
when(mKeyguardUpdateMonitor.isFaceEnrolled()).thenReturn(true);
+ when(mKeyguardUpdateMonitor.getIsFaceAuthenticated()).thenReturn(false);
mController.setVisible(true);
mController.getKeyguardCallback().onBiometricError(FACE_ERROR_TIMEOUT,
@@ -670,6 +671,21 @@
}
@Test
+ public void transientIndication_swipeUpToRetry_faceAuthenticated() {
+ createController();
+ String message = mContext.getString(R.string.keyguard_retry);
+ when(mStatusBarKeyguardViewManager.isBouncerShowing()).thenReturn(true);
+ when(mKeyguardUpdateMonitor.getIsFaceAuthenticated()).thenReturn(true);
+ when(mKeyguardUpdateMonitor.isFaceEnrolled()).thenReturn(true);
+
+ mController.setVisible(true);
+ mController.getKeyguardCallback().onBiometricError(FACE_ERROR_TIMEOUT,
+ "A message", BiometricSourceType.FACE);
+
+ verify(mStatusBarKeyguardViewManager, never()).setKeyguardMessage(eq(message), any());
+ }
+
+ @Test
public void faceErrorTimeout_whenFingerprintEnrolled_doesNotShowMessage() {
createController();
when(mKeyguardUpdateMonitor.getCachedIsUnlockWithFingerprintPossible(
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/lockscreen/LockscreenSmartspaceControllerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/lockscreen/LockscreenSmartspaceControllerTest.kt
index 790865b..ddcf59e 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/lockscreen/LockscreenSmartspaceControllerTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/lockscreen/LockscreenSmartspaceControllerTest.kt
@@ -55,21 +55,21 @@
import com.android.systemui.util.mockito.eq
import com.android.systemui.util.settings.SecureSettings
import com.android.systemui.util.time.FakeSystemClock
-import java.util.Optional
-import java.util.concurrent.Executor
import org.junit.Before
import org.junit.Test
import org.mockito.ArgumentCaptor
import org.mockito.Captor
import org.mockito.Mock
+import org.mockito.Mockito.`when`
import org.mockito.Mockito.anyInt
import org.mockito.Mockito.clearInvocations
import org.mockito.Mockito.mock
import org.mockito.Mockito.never
import org.mockito.Mockito.spy
import org.mockito.Mockito.verify
-import org.mockito.Mockito.`when`
import org.mockito.MockitoAnnotations
+import java.util.Optional
+import java.util.concurrent.Executor
@SmallTest
class LockscreenSmartspaceControllerTest : SysuiTestCase() {
@@ -518,6 +518,7 @@
// THEN the existing session is reused and views are registered
verify(smartspaceManager, never()).createSmartspaceSession(any())
+ verify(smartspaceView2).setUiSurface(BcSmartspaceDataPlugin.UI_SURFACE_LOCK_SCREEN_AOD)
verify(smartspaceView2).registerDataProvider(plugin)
}
@@ -554,6 +555,7 @@
controller.stateChangeListener.onViewAttachedToWindow(view)
+ verify(smartspaceView).setUiSurface(BcSmartspaceDataPlugin.UI_SURFACE_LOCK_SCREEN_AOD)
verify(smartspaceView).registerDataProvider(plugin)
verify(smartspaceSession)
.addOnTargetsAvailableListener(any(), capture(sessionListenerCaptor))
@@ -642,6 +644,9 @@
override fun setIsDreaming(isDreaming: Boolean) {
}
+ override fun setUiSurface(uiSurface: String) {
+ }
+
override fun setDozeAmount(amount: Float) {
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRowTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRowTest.java
index ee8db18..9d531a1 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRowTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRowTest.java
@@ -58,6 +58,7 @@
import com.android.systemui.plugins.statusbar.StatusBarStateController;
import com.android.systemui.statusbar.notification.AboveShelfChangedListener;
import com.android.systemui.statusbar.notification.FeedbackIcon;
+import com.android.systemui.statusbar.notification.SourceType;
import com.android.systemui.statusbar.notification.collection.NotificationEntry;
import com.android.systemui.statusbar.notification.row.ExpandableView.OnHeightChangedListener;
import com.android.systemui.statusbar.notification.stack.NotificationChildrenContainer;
@@ -534,4 +535,28 @@
/*oldParent=*/ any()
);
}
+
+ @Test
+ public void applyRoundnessAndInv_should_be_immediately_applied_on_childrenContainer_legacy() {
+ mGroupRow.useRoundnessSourceTypes(false);
+ Assert.assertEquals(0f, mGroupRow.getBottomRoundness(), 0.001f);
+ Assert.assertEquals(0f, mGroupRow.getChildrenContainer().getBottomRoundness(), 0.001f);
+
+ mGroupRow.requestBottomRoundness(1f, SourceType.from(""), false);
+
+ Assert.assertEquals(1f, mGroupRow.getBottomRoundness(), 0.001f);
+ Assert.assertEquals(1f, mGroupRow.getChildrenContainer().getBottomRoundness(), 0.001f);
+ }
+
+ @Test
+ public void applyRoundnessAndInvalidate_should_be_immediately_applied_on_childrenContainer() {
+ mGroupRow.useRoundnessSourceTypes(true);
+ Assert.assertEquals(0f, mGroupRow.getBottomRoundness(), 0.001f);
+ Assert.assertEquals(0f, mGroupRow.getChildrenContainer().getBottomRoundness(), 0.001f);
+
+ mGroupRow.requestBottomRoundness(1f, SourceType.from(""), false);
+
+ Assert.assertEquals(1f, mGroupRow.getBottomRoundness(), 0.001f);
+ Assert.assertEquals(1f, mGroupRow.getChildrenContainer().getBottomRoundness(), 0.001f);
+ }
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationChildrenContainerTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationChildrenContainerTest.java
index fd1944e..ca99e24 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationChildrenContainerTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationChildrenContainerTest.java
@@ -26,6 +26,7 @@
import com.android.systemui.SysuiTestCase;
import com.android.systemui.statusbar.notification.LegacySourceType;
+import com.android.systemui.statusbar.notification.SourceType;
import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow;
import com.android.systemui.statusbar.notification.row.NotificationTestHelper;
@@ -34,6 +35,8 @@
import org.junit.Test;
import org.junit.runner.RunWith;
+import java.util.List;
+
@SmallTest
@RunWith(AndroidTestingRunner.class)
@RunWithLooper
@@ -185,4 +188,32 @@
Assert.assertEquals(1f, row2.getTopRoundness(), /* delta = */ 0f);
Assert.assertEquals(1f, row2.getBottomRoundness(), /* delta = */ 0f);
}
+
+ @Test
+ public void applyRoundnessAndInvalidate_should_be_immediately_applied_on_last_child_legacy() {
+ mChildrenContainer.useRoundnessSourceTypes(false);
+ List<ExpandableNotificationRow> children = mChildrenContainer.getAttachedChildren();
+ ExpandableNotificationRow notificationRow = children.get(children.size() - 1);
+ Assert.assertEquals(0f, mChildrenContainer.getBottomRoundness(), 0.001f);
+ Assert.assertEquals(0f, notificationRow.getBottomRoundness(), 0.001f);
+
+ mChildrenContainer.requestBottomRoundness(1f, SourceType.from(""), false);
+
+ Assert.assertEquals(1f, mChildrenContainer.getBottomRoundness(), 0.001f);
+ Assert.assertEquals(1f, notificationRow.getBottomRoundness(), 0.001f);
+ }
+
+ @Test
+ public void applyRoundnessAndInvalidate_should_be_immediately_applied_on_last_child() {
+ mChildrenContainer.useRoundnessSourceTypes(true);
+ List<ExpandableNotificationRow> children = mChildrenContainer.getAttachedChildren();
+ ExpandableNotificationRow notificationRow = children.get(children.size() - 1);
+ Assert.assertEquals(0f, mChildrenContainer.getBottomRoundness(), 0.001f);
+ Assert.assertEquals(0f, notificationRow.getBottomRoundness(), 0.001f);
+
+ mChildrenContainer.requestBottomRoundness(1f, SourceType.from(""), false);
+
+ Assert.assertEquals(1f, mChildrenContainer.getBottomRoundness(), 0.001f);
+ Assert.assertEquals(1f, notificationRow.getBottomRoundness(), 0.001f);
+ }
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/FakeMobileConnectionRepository.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/FakeMobileConnectionRepository.kt
index d6a9ee3..53cd71f1 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/FakeMobileConnectionRepository.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/FakeMobileConnectionRepository.kt
@@ -19,6 +19,7 @@
import com.android.systemui.log.table.TableLogBuffer
import com.android.systemui.statusbar.pipeline.mobile.data.model.MobileConnectionModel
import com.android.systemui.statusbar.pipeline.mobile.data.model.NetworkNameModel
+import com.android.systemui.statusbar.pipeline.mobile.data.repository.MobileConnectionRepository.Companion.DEFAULT_NUM_LEVELS
import kotlinx.coroutines.flow.MutableStateFlow
// TODO(b/261632894): remove this in favor of the real impl or DemoMobileConnectionRepository
@@ -29,12 +30,11 @@
private val _connectionInfo = MutableStateFlow(MobileConnectionModel())
override val connectionInfo = _connectionInfo
+ override val numberOfLevels = MutableStateFlow(DEFAULT_NUM_LEVELS)
+
private val _dataEnabled = MutableStateFlow(true)
override val dataEnabled = _dataEnabled
- private val _isDefaultDataSubscription = MutableStateFlow(true)
- override val isDefaultDataSubscription = _isDefaultDataSubscription
-
override val cdmaRoaming = MutableStateFlow(false)
override val networkName =
@@ -47,8 +47,4 @@
fun setDataEnabled(enabled: Boolean) {
_dataEnabled.value = enabled
}
-
- fun setIsDefaultDataSubscription(isDefault: Boolean) {
- _isDefaultDataSubscription.value = isDefault
- }
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/FakeMobileConnectionsRepository.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/FakeMobileConnectionsRepository.kt
index 7f93328..49d4bdc 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/FakeMobileConnectionsRepository.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/FakeMobileConnectionsRepository.kt
@@ -57,9 +57,6 @@
private val _activeMobileDataSubscriptionId = MutableStateFlow(INVALID_SUBSCRIPTION_ID)
override val activeMobileDataSubscriptionId = _activeMobileDataSubscriptionId
- private val _defaultDataSubId = MutableStateFlow(INVALID_SUBSCRIPTION_ID)
- override val defaultDataSubId = _defaultDataSubId
-
private val _mobileConnectivity = MutableStateFlow(MobileConnectivityModel())
override val defaultMobileNetworkConnectivity = _mobileConnectivity
@@ -84,10 +81,6 @@
_subscriptions.value = subs
}
- fun setDefaultDataSubId(id: Int) {
- _defaultDataSubId.value = id
- }
-
fun setMobileConnectivity(model: MobileConnectivityModel) {
_mobileConnectivity.value = model
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/MobileConnectionRepositoryTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/MobileConnectionRepositoryTest.kt
index c63dd2a..d6b8c0d 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/MobileConnectionRepositoryTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/MobileConnectionRepositoryTest.kt
@@ -61,6 +61,7 @@
import com.android.systemui.statusbar.pipeline.mobile.data.model.ResolvedNetworkType.UnknownNetworkType
import com.android.systemui.statusbar.pipeline.mobile.data.model.toNetworkNameModel
import com.android.systemui.statusbar.pipeline.mobile.data.repository.FakeMobileConnectionsRepository
+import com.android.systemui.statusbar.pipeline.mobile.data.repository.MobileConnectionRepository.Companion.DEFAULT_NUM_LEVELS
import com.android.systemui.statusbar.pipeline.mobile.util.FakeMobileMappingsProxy
import com.android.systemui.statusbar.pipeline.shared.ConnectivityPipelineLogger
import com.android.systemui.statusbar.pipeline.shared.data.model.DataActivityModel
@@ -117,7 +118,6 @@
telephonyManager,
globalSettings,
fakeBroadcastDispatcher,
- connectionsRepo.defaultDataSubId,
connectionsRepo.globalMobileDataSettingChangedEvent,
mobileMappings,
IMMEDIATE,
@@ -319,7 +319,7 @@
val callback = getTelephonyCallbackForType<TelephonyCallback.DisplayInfoListener>()
val type = NETWORK_TYPE_LTE
- val expected = DefaultNetworkType(type, mobileMappings.toIconKey(type))
+ val expected = DefaultNetworkType(mobileMappings.toIconKey(type))
val ti = mock<TelephonyDisplayInfo>().also { whenever(it.networkType).thenReturn(type) }
callback.onDisplayInfoChanged(ti)
@@ -336,7 +336,7 @@
val callback = getTelephonyCallbackForType<TelephonyCallback.DisplayInfoListener>()
val type = OVERRIDE_NETWORK_TYPE_LTE_CA
- val expected = OverrideNetworkType(type, mobileMappings.toIconKeyOverride(type))
+ val expected = OverrideNetworkType(mobileMappings.toIconKeyOverride(type))
val ti =
mock<TelephonyDisplayInfo>().also {
whenever(it.networkType).thenReturn(type)
@@ -380,33 +380,6 @@
}
@Test
- fun isDefaultDataSubscription_isDefault() =
- runBlocking(IMMEDIATE) {
- connectionsRepo.setDefaultDataSubId(SUB_1_ID)
-
- var latest: Boolean? = null
- val job = underTest.isDefaultDataSubscription.onEach { latest = it }.launchIn(this)
-
- assertThat(latest).isTrue()
-
- job.cancel()
- }
-
- @Test
- fun isDefaultDataSubscription_isNotDefault() =
- runBlocking(IMMEDIATE) {
- // Our subId is SUB_1_ID
- connectionsRepo.setDefaultDataSubId(123)
-
- var latest: Boolean? = null
- val job = underTest.isDefaultDataSubscription.onEach { latest = it }.launchIn(this)
-
- assertThat(latest).isFalse()
-
- job.cancel()
- }
-
- @Test
fun isDataConnectionAllowed_subIdSettingUpdate_valueUpdated() =
runBlocking(IMMEDIATE) {
val subIdSettingName = "${Settings.Global.MOBILE_DATA}$SUB_1_ID"
@@ -431,6 +404,17 @@
}
@Test
+ fun numberOfLevels_isDefault() =
+ runBlocking(IMMEDIATE) {
+ var latest: Int? = null
+ val job = underTest.numberOfLevels.onEach { latest = it }.launchIn(this)
+
+ assertThat(latest).isEqualTo(DEFAULT_NUM_LEVELS)
+
+ job.cancel()
+ }
+
+ @Test
fun `roaming - cdma - queries telephony manager`() =
runBlocking(IMMEDIATE) {
var latest: Boolean? = null
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/MobileConnectionsRepositoryTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/MobileConnectionsRepositoryTest.kt
index b8cd7a4..0da15e2 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/MobileConnectionsRepositoryTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/MobileConnectionsRepositoryTest.kt
@@ -307,35 +307,6 @@
}
@Test
- fun testDefaultDataSubId_updatesOnBroadcast() =
- runBlocking(IMMEDIATE) {
- var latest: Int? = null
- val job = underTest.defaultDataSubId.onEach { latest = it }.launchIn(this)
-
- fakeBroadcastDispatcher.registeredReceivers.forEach { receiver ->
- receiver.onReceive(
- context,
- Intent(TelephonyManager.ACTION_DEFAULT_DATA_SUBSCRIPTION_CHANGED)
- .putExtra(PhoneConstants.SUBSCRIPTION_KEY, SUB_2_ID)
- )
- }
-
- assertThat(latest).isEqualTo(SUB_2_ID)
-
- fakeBroadcastDispatcher.registeredReceivers.forEach { receiver ->
- receiver.onReceive(
- context,
- Intent(TelephonyManager.ACTION_DEFAULT_DATA_SUBSCRIPTION_CHANGED)
- .putExtra(PhoneConstants.SUBSCRIPTION_KEY, SUB_1_ID)
- )
- }
-
- assertThat(latest).isEqualTo(SUB_1_ID)
-
- job.cancel()
- }
-
- @Test
fun mobileConnectivity_default() {
assertThat(underTest.defaultMobileNetworkConnectivity.value)
.isEqualTo(MobileConnectivityModel(isConnected = false, isValidated = false))
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/domain/interactor/FakeMobileIconInteractor.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/domain/interactor/FakeMobileIconInteractor.kt
index ff72715..a29146b 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/domain/interactor/FakeMobileIconInteractor.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/domain/interactor/FakeMobileIconInteractor.kt
@@ -21,6 +21,7 @@
import com.android.settingslib.mobile.TelephonyIcons
import com.android.systemui.log.table.TableLogBuffer
import com.android.systemui.statusbar.pipeline.mobile.data.model.NetworkNameModel
+import com.android.systemui.statusbar.pipeline.mobile.data.repository.MobileConnectionRepository.Companion.DEFAULT_NUM_LEVELS
import com.android.systemui.statusbar.pipeline.shared.data.model.DataActivityModel
import kotlinx.coroutines.flow.MutableStateFlow
@@ -65,7 +66,7 @@
private val _level = MutableStateFlow(CellSignalStrength.SIGNAL_STRENGTH_NONE_OR_UNKNOWN)
override val level = _level
- private val _numberOfLevels = MutableStateFlow(4)
+ private val _numberOfLevels = MutableStateFlow(DEFAULT_NUM_LEVELS)
override val numberOfLevels = _numberOfLevels
fun setIconGroup(group: SignalIcon.MobileIconGroup) {
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/domain/interactor/MobileIconInteractorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/domain/interactor/MobileIconInteractorTest.kt
index 5abe335..61e13b8 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/domain/interactor/MobileIconInteractorTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/domain/interactor/MobileIconInteractorTest.kt
@@ -17,7 +17,6 @@
package com.android.systemui.statusbar.pipeline.mobile.domain.interactor
import android.telephony.CellSignalStrength
-import android.telephony.SubscriptionInfo
import android.telephony.TelephonyManager.NETWORK_TYPE_UNKNOWN
import androidx.test.filters.SmallTest
import com.android.settingslib.SignalIcon.MobileIconGroup
@@ -34,7 +33,6 @@
import com.android.systemui.statusbar.pipeline.mobile.domain.interactor.FakeMobileIconsInteractor.Companion.THREE_G
import com.android.systemui.statusbar.pipeline.mobile.util.FakeMobileMappingsProxy
import com.android.systemui.util.mockito.mock
-import com.android.systemui.util.mockito.whenever
import com.google.common.truth.Truth.assertThat
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
@@ -178,12 +176,26 @@
}
@Test
+ fun numberOfLevels_comesFromRepo() =
+ runBlocking(IMMEDIATE) {
+ var latest: Int? = null
+ val job = underTest.numberOfLevels.onEach { latest = it }.launchIn(this)
+
+ connectionRepository.numberOfLevels.value = 5
+ assertThat(latest).isEqualTo(5)
+
+ connectionRepository.numberOfLevels.value = 4
+ assertThat(latest).isEqualTo(4)
+
+ job.cancel()
+ }
+
+ @Test
fun iconGroup_three_g() =
runBlocking(IMMEDIATE) {
connectionRepository.setConnectionInfo(
MobileConnectionModel(
- resolvedNetworkType =
- DefaultNetworkType(THREE_G, mobileMappingsProxy.toIconKey(THREE_G))
+ resolvedNetworkType = DefaultNetworkType(mobileMappingsProxy.toIconKey(THREE_G))
),
)
@@ -200,8 +212,7 @@
runBlocking(IMMEDIATE) {
connectionRepository.setConnectionInfo(
MobileConnectionModel(
- resolvedNetworkType =
- DefaultNetworkType(THREE_G, mobileMappingsProxy.toIconKey(THREE_G))
+ resolvedNetworkType = DefaultNetworkType(mobileMappingsProxy.toIconKey(THREE_G))
),
)
@@ -212,7 +223,6 @@
MobileConnectionModel(
resolvedNetworkType =
DefaultNetworkType(
- FOUR_G,
mobileMappingsProxy.toIconKey(FOUR_G),
),
),
@@ -230,10 +240,7 @@
connectionRepository.setConnectionInfo(
MobileConnectionModel(
resolvedNetworkType =
- OverrideNetworkType(
- FIVE_G_OVERRIDE,
- mobileMappingsProxy.toIconKeyOverride(FIVE_G_OVERRIDE)
- )
+ OverrideNetworkType(mobileMappingsProxy.toIconKeyOverride(FIVE_G_OVERRIDE))
),
)
@@ -251,10 +258,7 @@
connectionRepository.setConnectionInfo(
MobileConnectionModel(
resolvedNetworkType =
- DefaultNetworkType(
- NETWORK_TYPE_UNKNOWN,
- mobileMappingsProxy.toIconKey(NETWORK_TYPE_UNKNOWN)
- ),
+ DefaultNetworkType(mobileMappingsProxy.toIconKey(NETWORK_TYPE_UNKNOWN)),
),
)
@@ -509,8 +513,6 @@
private const val CDMA_LEVEL = 2
private const val SUB_1_ID = 1
- private val SUB_1 =
- mock<SubscriptionInfo>().also { whenever(it.subscriptionId).thenReturn(SUB_1_ID) }
private val DEFAULT_NAME = NetworkNameModel.Default("test default name")
private val DERIVED_NAME = NetworkNameModel.Derived("test derived name")
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/wifi/data/model/WifiNetworkModelTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/wifi/data/model/WifiNetworkModelTest.kt
index 30fd308..30ac8d4 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/wifi/data/model/WifiNetworkModelTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/wifi/data/model/WifiNetworkModelTest.kt
@@ -34,12 +34,6 @@
}
}
- @Test
- fun active_levelNull_noException() {
- WifiNetworkModel.Active(NETWORK_ID, level = null)
- // No assert, just need no crash
- }
-
@Test(expected = IllegalArgumentException::class)
fun active_levelNegative_exceptionThrown() {
WifiNetworkModel.Active(NETWORK_ID, level = MIN_VALID_LEVEL - 1)
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/wifi/data/repository/prod/DisabledWifiRepositoryTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/wifi/data/repository/prod/DisabledWifiRepositoryTest.kt
new file mode 100644
index 0000000..3c4e85b
--- /dev/null
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/wifi/data/repository/prod/DisabledWifiRepositoryTest.kt
@@ -0,0 +1,57 @@
+/*
+ * 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.statusbar.pipeline.wifi.data.repository.prod
+
+import androidx.test.filters.SmallTest
+import com.android.systemui.SysuiTestCase
+import com.android.systemui.statusbar.pipeline.shared.data.model.DataActivityModel
+import com.android.systemui.statusbar.pipeline.wifi.data.model.WifiNetworkModel
+import com.google.common.truth.Truth.assertThat
+import org.junit.Before
+import org.junit.Test
+
+@SmallTest
+class DisabledWifiRepositoryTest : SysuiTestCase() {
+
+ private lateinit var underTest: DisabledWifiRepository
+
+ @Before
+ fun setUp() {
+ underTest = DisabledWifiRepository()
+ }
+
+ @Test
+ fun enabled_alwaysFalse() {
+ assertThat(underTest.isWifiEnabled.value).isEqualTo(false)
+ }
+
+ @Test
+ fun default_alwaysFalse() {
+ assertThat(underTest.isWifiDefault.value).isEqualTo(false)
+ }
+
+ @Test
+ fun network_alwaysUnavailable() {
+ assertThat(underTest.wifiNetwork.value).isEqualTo(WifiNetworkModel.Unavailable)
+ }
+
+ @Test
+ fun activity_alwaysFalse() {
+ assertThat(underTest.wifiActivity.value)
+ .isEqualTo(DataActivityModel(hasActivityIn = false, hasActivityOut = false))
+ }
+}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/wifi/data/repository/prod/WifiRepositoryImplTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/wifi/data/repository/prod/WifiRepositoryImplTest.kt
index befb290..8f07615 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/wifi/data/repository/prod/WifiRepositoryImplTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/wifi/data/repository/prod/WifiRepositoryImplTest.kt
@@ -33,7 +33,6 @@
import com.android.systemui.statusbar.pipeline.shared.ConnectivityPipelineLogger
import com.android.systemui.statusbar.pipeline.shared.data.model.DataActivityModel
import com.android.systemui.statusbar.pipeline.wifi.data.model.WifiNetworkModel
-import com.android.systemui.statusbar.pipeline.wifi.data.repository.prod.WifiRepositoryImpl.Companion.ACTIVITY_DEFAULT
import com.android.systemui.statusbar.pipeline.wifi.data.repository.prod.WifiRepositoryImpl.Companion.WIFI_NETWORK_DEFAULT
import com.android.systemui.util.concurrency.FakeExecutor
import com.android.systemui.util.mockito.any
@@ -98,13 +97,6 @@
}
@Test
- fun isWifiEnabled_nullWifiManager_getsFalse() = runBlocking(IMMEDIATE) {
- underTest = createRepo(wifiManagerToUse = null)
-
- assertThat(underTest.isWifiEnabled.value).isFalse()
- }
-
- @Test
fun isWifiEnabled_initiallyGetsWifiManagerValue() = runBlocking(IMMEDIATE) {
whenever(wifiManager.isWifiEnabled).thenReturn(true)
@@ -721,21 +713,6 @@
}
@Test
- fun wifiActivity_nullWifiManager_receivesDefault() = runBlocking(IMMEDIATE) {
- underTest = createRepo(wifiManagerToUse = null)
-
- var latest: DataActivityModel? = null
- val job = underTest
- .wifiActivity
- .onEach { latest = it }
- .launchIn(this)
-
- assertThat(latest).isEqualTo(ACTIVITY_DEFAULT)
-
- job.cancel()
- }
-
- @Test
fun wifiActivity_callbackGivesNone_activityFlowHasNone() = runBlocking(IMMEDIATE) {
var latest: DataActivityModel? = null
val job = underTest
@@ -801,7 +778,7 @@
job.cancel()
}
- private fun createRepo(wifiManagerToUse: WifiManager? = wifiManager): WifiRepositoryImpl {
+ private fun createRepo(): WifiRepositoryImpl {
return WifiRepositoryImpl(
broadcastDispatcher,
connectivityManager,
@@ -809,7 +786,7 @@
tableLogger,
executor,
scope,
- wifiManagerToUse,
+ wifiManager,
)
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/wifi/domain/interactor/WifiInteractorImplTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/wifi/domain/interactor/WifiInteractorImplTest.kt
index 2ecb17b..01d59f9 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/wifi/domain/interactor/WifiInteractorImplTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/wifi/domain/interactor/WifiInteractorImplTest.kt
@@ -52,6 +52,22 @@
}
@Test
+ fun ssid_unavailableNetwork_outputsNull() =
+ runBlocking(IMMEDIATE) {
+ wifiRepository.setWifiNetwork(WifiNetworkModel.Unavailable)
+
+ var latest: String? = "default"
+ val job = underTest
+ .ssid
+ .onEach { latest = it }
+ .launchIn(this)
+
+ assertThat(latest).isNull()
+
+ job.cancel()
+ }
+
+ @Test
fun ssid_inactiveNetwork_outputsNull() = runBlocking(IMMEDIATE) {
wifiRepository.setWifiNetwork(WifiNetworkModel.Inactive)
@@ -85,6 +101,7 @@
fun ssid_isPasspointAccessPoint_outputsPasspointName() = runBlocking(IMMEDIATE) {
wifiRepository.setWifiNetwork(WifiNetworkModel.Active(
networkId = 1,
+ level = 1,
isPasspointAccessPoint = true,
passpointProviderFriendlyName = "friendly",
))
@@ -104,6 +121,7 @@
fun ssid_isOnlineSignUpForPasspoint_outputsPasspointName() = runBlocking(IMMEDIATE) {
wifiRepository.setWifiNetwork(WifiNetworkModel.Active(
networkId = 1,
+ level = 1,
isOnlineSignUpForPasspointAccessPoint = true,
passpointProviderFriendlyName = "friendly",
))
@@ -123,6 +141,7 @@
fun ssid_unknownSsid_outputsNull() = runBlocking(IMMEDIATE) {
wifiRepository.setWifiNetwork(WifiNetworkModel.Active(
networkId = 1,
+ level = 1,
ssid = WifiManager.UNKNOWN_SSID,
))
@@ -141,6 +160,7 @@
fun ssid_validSsid_outputsSsid() = runBlocking(IMMEDIATE) {
wifiRepository.setWifiNetwork(WifiNetworkModel.Active(
networkId = 1,
+ level = 1,
ssid = "MyAwesomeWifiNetwork",
))
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/wifi/ui/viewmodel/WifiViewModelIconParameterizedTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/wifi/ui/viewmodel/WifiViewModelIconParameterizedTest.kt
index 12b93819..726e813 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/wifi/ui/viewmodel/WifiViewModelIconParameterizedTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/wifi/ui/viewmodel/WifiViewModelIconParameterizedTest.kt
@@ -379,6 +379,12 @@
expected = null,
),
+ // network = Unavailable => not shown
+ TestCase(
+ network = WifiNetworkModel.Unavailable,
+ expected = null,
+ ),
+
// network = Active & validated = false => not shown
TestCase(
network = WifiNetworkModel.Active(NETWORK_ID, isValidated = false, level = 3),
@@ -397,12 +403,6 @@
description = "Full internet level 4 icon",
),
),
-
- // network has null level => not shown
- TestCase(
- network = WifiNetworkModel.Active(NETWORK_ID, isValidated = true, level = null),
- expected = null,
- ),
)
}
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/wifi/ui/viewmodel/WifiViewModelTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/wifi/ui/viewmodel/WifiViewModelTest.kt
index 4158434..e5cfec9 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/wifi/ui/viewmodel/WifiViewModelTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/wifi/ui/viewmodel/WifiViewModelTest.kt
@@ -228,7 +228,7 @@
whenever(connectivityConstants.shouldShowActivityConfig).thenReturn(true)
createAndSetViewModel()
- wifiRepository.setWifiNetwork(WifiNetworkModel.Active(NETWORK_ID, ssid = null))
+ wifiRepository.setWifiNetwork(WifiNetworkModel.Active(NETWORK_ID, ssid = null, level = 1))
var activityIn: Boolean? = null
val activityInJob = underTest
@@ -553,7 +553,8 @@
companion object {
private const val NETWORK_ID = 2
- private val ACTIVE_VALID_WIFI_NETWORK = WifiNetworkModel.Active(NETWORK_ID, ssid = "AB")
+ private val ACTIVE_VALID_WIFI_NETWORK =
+ WifiNetworkModel.Active(NETWORK_ID, ssid = "AB", level = 1)
}
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/stylus/StylusManagerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/stylus/StylusManagerTest.kt
index 58b5560..984de5b 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/stylus/StylusManagerTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/stylus/StylusManagerTest.kt
@@ -202,7 +202,7 @@
stylusManager.onInputDeviceAdded(STYLUS_DEVICE_ID)
stylusManager.registerCallback(otherStylusCallback)
- stylusManager.onInputDeviceAdded(STYLUS_DEVICE_ID)
+ stylusManager.onInputDeviceRemoved(STYLUS_DEVICE_ID)
verify(stylusCallback, times(1)).onStylusRemoved(STYLUS_DEVICE_ID)
verify(otherStylusCallback, times(1)).onStylusRemoved(STYLUS_DEVICE_ID)
diff --git a/packages/SystemUI/tests/src/com/android/systemui/surfaceeffects/turbulencenoise/TurbulenceNoiseControllerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/surfaceeffects/turbulencenoise/TurbulenceNoiseControllerTest.kt
index d25c8c1..614261d 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/surfaceeffects/turbulencenoise/TurbulenceNoiseControllerTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/surfaceeffects/turbulencenoise/TurbulenceNoiseControllerTest.kt
@@ -17,8 +17,14 @@
import android.graphics.Color
import android.testing.AndroidTestingRunner
+import android.view.View.INVISIBLE
+import android.view.View.VISIBLE
import androidx.test.filters.SmallTest
import com.android.systemui.SysuiTestCase
+import com.android.systemui.surfaceeffects.turbulencenoise.TurbulenceNoiseController.Companion.AnimationState.EASE_IN
+import com.android.systemui.surfaceeffects.turbulencenoise.TurbulenceNoiseController.Companion.AnimationState.EASE_OUT
+import com.android.systemui.surfaceeffects.turbulencenoise.TurbulenceNoiseController.Companion.AnimationState.MAIN
+import com.android.systemui.surfaceeffects.turbulencenoise.TurbulenceNoiseController.Companion.AnimationState.NOT_PLAYING
import com.android.systemui.util.concurrency.FakeExecutor
import com.android.systemui.util.time.FakeSystemClock
import com.google.common.truth.Truth.assertThat
@@ -33,26 +39,117 @@
private val fakeExecutor = FakeExecutor(fakeSystemClock)
@Test
- fun play_playsTurbulenceNoise() {
- val config = TurbulenceNoiseAnimationConfig(duration = 1000f)
+ fun play_playsTurbulenceNoiseInOrder() {
+ val config = TurbulenceNoiseAnimationConfig(maxDuration = 1000f)
val turbulenceNoiseView = TurbulenceNoiseView(context, null)
-
val turbulenceNoiseController = TurbulenceNoiseController(turbulenceNoiseView)
+ assertThat(turbulenceNoiseController.state).isEqualTo(NOT_PLAYING)
+
fakeExecutor.execute {
turbulenceNoiseController.play(config)
- assertThat(turbulenceNoiseView.isPlaying).isTrue()
+ assertThat(turbulenceNoiseController.state).isEqualTo(EASE_IN)
- fakeSystemClock.advanceTime(config.duration.toLong())
+ fakeSystemClock.advanceTime(config.easeInDuration.toLong())
- assertThat(turbulenceNoiseView.isPlaying).isFalse()
+ assertThat(turbulenceNoiseController.state).isEqualTo(MAIN)
+
+ fakeSystemClock.advanceTime(config.maxDuration.toLong())
+
+ assertThat(turbulenceNoiseController.state).isEqualTo(EASE_OUT)
+
+ fakeSystemClock.advanceTime(config.easeOutDuration.toLong())
+
+ assertThat(turbulenceNoiseController.state).isEqualTo(NOT_PLAYING)
+ }
+ }
+
+ @Test
+ fun play_alreadyPlaying_ignoresNewAnimationRequest() {
+ val config = TurbulenceNoiseAnimationConfig(maxDuration = 1000f)
+ val turbulenceNoiseView = TurbulenceNoiseView(context, null)
+ // Currently playing the main animation.
+ val turbulenceNoiseController =
+ TurbulenceNoiseController(turbulenceNoiseView).also { it.state = MAIN }
+
+ fakeExecutor.execute {
+ // Request another animation
+ turbulenceNoiseController.play(config)
+
+ assertThat(turbulenceNoiseController.state).isEqualTo(MAIN)
+ }
+ }
+
+ @Test
+ fun finish_mainAnimationPlaying_playsEaseOutAnimation() {
+ val config = TurbulenceNoiseAnimationConfig(maxDuration = 1000f)
+ val turbulenceNoiseView = TurbulenceNoiseView(context, null)
+ val turbulenceNoiseController =
+ TurbulenceNoiseController(turbulenceNoiseView).also { it.state = MAIN }
+
+ fakeExecutor.execute {
+ turbulenceNoiseController.play(config)
+
+ fakeSystemClock.advanceTime(config.maxDuration.toLong() / 2)
+
+ turbulenceNoiseController.finish()
+
+ assertThat(turbulenceNoiseController.state).isEqualTo(EASE_OUT)
+ }
+ }
+
+ @Test
+ fun finish_nonMainAnimationPlaying_doesNotFinishAnimation() {
+ val config = TurbulenceNoiseAnimationConfig(maxDuration = 1000f)
+ val turbulenceNoiseView = TurbulenceNoiseView(context, null)
+ val turbulenceNoiseController =
+ TurbulenceNoiseController(turbulenceNoiseView).also { it.state = EASE_IN }
+
+ fakeExecutor.execute {
+ turbulenceNoiseController.play(config)
+
+ fakeSystemClock.advanceTime(config.maxDuration.toLong() / 2)
+
+ turbulenceNoiseController.finish()
+
+ assertThat(turbulenceNoiseController.state).isEqualTo(EASE_IN)
+ }
+ }
+
+ @Test
+ fun onAnimationFinished_resetsStateCorrectly() {
+ val config = TurbulenceNoiseAnimationConfig(maxDuration = 1000f)
+ val turbulenceNoiseView = TurbulenceNoiseView(context, null)
+ val turbulenceNoiseController = TurbulenceNoiseController(turbulenceNoiseView)
+
+ assertThat(turbulenceNoiseController.state).isEqualTo(NOT_PLAYING)
+ assertThat(turbulenceNoiseView.visibility).isEqualTo(INVISIBLE)
+ assertThat(turbulenceNoiseView.noiseConfig).isNull()
+
+ fakeExecutor.execute {
+ turbulenceNoiseController.play(config)
+
+ assertThat(turbulenceNoiseController.state).isEqualTo(EASE_IN)
+ assertThat(turbulenceNoiseView.visibility).isEqualTo(VISIBLE)
+ assertThat(turbulenceNoiseView.noiseConfig).isEqualTo(config)
+
+ // Play all the animations.
+ fakeSystemClock.advanceTime(
+ config.easeInDuration.toLong() +
+ config.maxDuration.toLong() +
+ config.easeOutDuration.toLong()
+ )
+
+ assertThat(turbulenceNoiseController.state).isEqualTo(NOT_PLAYING)
+ assertThat(turbulenceNoiseView.visibility).isEqualTo(INVISIBLE)
+ assertThat(turbulenceNoiseView.noiseConfig).isNull()
}
}
@Test
fun updateColor_updatesCorrectColor() {
- val config = TurbulenceNoiseAnimationConfig(duration = 1000f, color = Color.WHITE)
+ val config = TurbulenceNoiseAnimationConfig(maxDuration = 1000f, color = Color.WHITE)
val turbulenceNoiseView = TurbulenceNoiseView(context, null)
val expectedColor = Color.RED
@@ -61,9 +158,9 @@
fakeExecutor.execute {
turbulenceNoiseController.play(config)
- turbulenceNoiseView.updateColor(expectedColor)
+ turbulenceNoiseController.updateNoiseColor(expectedColor)
- fakeSystemClock.advanceTime(config.duration.toLong())
+ fakeSystemClock.advanceTime(config.maxDuration.toLong())
assertThat(config.color).isEqualTo(expectedColor)
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/surfaceeffects/turbulencenoise/TurbulenceNoiseViewTest.kt b/packages/SystemUI/tests/src/com/android/systemui/surfaceeffects/turbulencenoise/TurbulenceNoiseViewTest.kt
index 633aac0..ce7f2f4 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/surfaceeffects/turbulencenoise/TurbulenceNoiseViewTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/surfaceeffects/turbulencenoise/TurbulenceNoiseViewTest.kt
@@ -16,7 +16,6 @@
package com.android.systemui.surfaceeffects.turbulencenoise
import android.testing.AndroidTestingRunner
-import android.view.View
import androidx.test.filters.SmallTest
import com.android.systemui.SysuiTestCase
import com.android.systemui.util.concurrency.FakeExecutor
@@ -34,53 +33,65 @@
private val fakeExecutor = FakeExecutor(fakeSystemClock)
@Test
- fun play_viewHasCorrectVisibility() {
- val config = TurbulenceNoiseAnimationConfig(duration = 1000f)
- val turbulenceNoiseView = TurbulenceNoiseView(context, null)
-
- assertThat(turbulenceNoiseView.visibility).isEqualTo(View.INVISIBLE)
-
- fakeExecutor.execute {
- turbulenceNoiseView.play(config)
-
- assertThat(turbulenceNoiseView.visibility).isEqualTo(View.VISIBLE)
-
- fakeSystemClock.advanceTime(config.duration.toLong())
-
- assertThat(turbulenceNoiseView.visibility).isEqualTo(View.INVISIBLE)
- }
- }
-
- @Test
fun play_playsAnimation() {
- val config = TurbulenceNoiseAnimationConfig(duration = 1000f)
- val turbulenceNoiseView = TurbulenceNoiseView(context, null)
+ val config = TurbulenceNoiseAnimationConfig()
+ val turbulenceNoiseView = TurbulenceNoiseView(context, null).also { it.applyConfig(config) }
+ var onAnimationEndCalled = false
fakeExecutor.execute {
- turbulenceNoiseView.play(config)
+ turbulenceNoiseView.play(onAnimationEnd = { onAnimationEndCalled = true })
- assertThat(turbulenceNoiseView.isPlaying).isTrue()
+ fakeSystemClock.advanceTime(config.maxDuration.toLong())
+
+ assertThat(onAnimationEndCalled).isTrue()
}
}
@Test
- fun play_onEnd_triggersOnAnimationEnd() {
- var animationEnd = false
- val config =
- TurbulenceNoiseAnimationConfig(
- duration = 1000f,
- onAnimationEnd = { animationEnd = true }
- )
- val turbulenceNoiseView = TurbulenceNoiseView(context, null)
+ fun playEaseIn_playsEaseInAnimation() {
+ val config = TurbulenceNoiseAnimationConfig()
+ val turbulenceNoiseView = TurbulenceNoiseView(context, null).also { it.applyConfig(config) }
+ var onAnimationEndCalled = false
fakeExecutor.execute {
- turbulenceNoiseView.play(config)
+ turbulenceNoiseView.playEaseIn(onAnimationEnd = { onAnimationEndCalled = true })
- assertThat(turbulenceNoiseView.isPlaying).isTrue()
+ fakeSystemClock.advanceTime(config.easeInDuration.toLong())
- fakeSystemClock.advanceTime(config.duration.toLong())
+ assertThat(onAnimationEndCalled).isTrue()
+ }
+ }
- assertThat(animationEnd).isTrue()
+ @Test
+ fun playEaseOut_playsEaseOutAnimation() {
+ val config = TurbulenceNoiseAnimationConfig()
+ val turbulenceNoiseView = TurbulenceNoiseView(context, null).also { it.applyConfig(config) }
+ var onAnimationEndCalled = false
+
+ fakeExecutor.execute {
+ turbulenceNoiseView.playEaseOut(onAnimationEnd = { onAnimationEndCalled = true })
+
+ fakeSystemClock.advanceTime(config.easeOutDuration.toLong())
+
+ assertThat(onAnimationEndCalled).isTrue()
+ }
+ }
+
+ @Test
+ fun finish_animationPlaying_finishesAnimation() {
+ val config = TurbulenceNoiseAnimationConfig()
+ val turbulenceNoiseView = TurbulenceNoiseView(context, null).also { it.applyConfig(config) }
+ var onAnimationEndCalled = false
+
+ fakeExecutor.execute {
+ turbulenceNoiseView.play(onAnimationEnd = { onAnimationEndCalled = true })
+
+ assertThat(turbulenceNoiseView.currentAnimator).isNotNull()
+
+ turbulenceNoiseView.finish()
+
+ assertThat(onAnimationEndCalled).isTrue()
+ assertThat(turbulenceNoiseView.currentAnimator).isNull()
}
}
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/temporarydisplay/chipbar/ChipbarCoordinatorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/temporarydisplay/chipbar/ChipbarCoordinatorTest.kt
index d3411c2..90178c6 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/temporarydisplay/chipbar/ChipbarCoordinatorTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/temporarydisplay/chipbar/ChipbarCoordinatorTest.kt
@@ -124,7 +124,7 @@
)
)
- val contentDescView = getChipbarView().requireViewById<ViewGroup>(R.id.chipbar_inner)
+ val contentDescView = getChipbarView().getInnerView()
assertThat(contentDescView.contentDescription.toString()).contains("loadedCD")
assertThat(contentDescView.contentDescription.toString()).contains("text")
}
@@ -139,11 +139,43 @@
)
)
- val contentDescView = getChipbarView().requireViewById<ViewGroup>(R.id.chipbar_inner)
+ val contentDescView = getChipbarView().getInnerView()
assertThat(contentDescView.contentDescription.toString()).isEqualTo("text")
}
@Test
+ fun displayView_contentDescription_endIsLoading() {
+ underTest.displayView(
+ createChipbarInfo(
+ Icon.Resource(R.drawable.ic_cake, ContentDescription.Loaded("loadedCD")),
+ Text.Loaded("text"),
+ endItem = ChipbarEndItem.Loading,
+ )
+ )
+
+ val contentDescView = getChipbarView().getInnerView()
+ val loadingDesc = context.resources.getString(R.string.media_transfer_loading)
+ assertThat(contentDescView.contentDescription.toString()).contains("text")
+ assertThat(contentDescView.contentDescription.toString()).contains(loadingDesc)
+ }
+
+ @Test
+ fun displayView_contentDescription_endNotLoading() {
+ underTest.displayView(
+ createChipbarInfo(
+ Icon.Resource(R.drawable.ic_cake, ContentDescription.Loaded("loadedCD")),
+ Text.Loaded("text"),
+ endItem = ChipbarEndItem.Error,
+ )
+ )
+
+ val contentDescView = getChipbarView().getInnerView()
+ val loadingDesc = context.resources.getString(R.string.media_transfer_loading)
+ assertThat(contentDescView.contentDescription.toString()).contains("text")
+ assertThat(contentDescView.contentDescription.toString()).doesNotContain(loadingDesc)
+ }
+
+ @Test
fun displayView_loadedIcon_correctlyRendered() {
val drawable = context.getDrawable(R.drawable.ic_celebration)!!
@@ -417,6 +449,8 @@
)
}
+ private fun ViewGroup.getInnerView() = this.requireViewById<ViewGroup>(R.id.chipbar_inner)
+
private fun ViewGroup.getStartIconView() = this.requireViewById<ImageView>(R.id.start_icon)
private fun ViewGroup.getChipText(): String =
diff --git a/packages/SystemUI/tests/src/com/android/systemui/wmshell/BubblesTest.java b/packages/SystemUI/tests/src/com/android/systemui/wmshell/BubblesTest.java
index 2e06cc5..388c51f 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/wmshell/BubblesTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/wmshell/BubblesTest.java
@@ -94,6 +94,7 @@
import com.android.systemui.shade.NotificationShadeWindowView;
import com.android.systemui.shade.ShadeController;
import com.android.systemui.shade.ShadeExpansionStateManager;
+import com.android.systemui.shade.ShadeWindowLogger;
import com.android.systemui.shared.system.QuickStepContract;
import com.android.systemui.statusbar.NotificationLockscreenUserManager;
import com.android.systemui.statusbar.RankingBuilder;
@@ -273,6 +274,8 @@
private Optional<OneHandedController> mOneHandedOptional;
@Mock
private UserManager mUserManager;
+ @Mock
+ private ShadeWindowLogger mShadeWindowLogger;
private TestableBubblePositioner mPositioner;
@@ -297,7 +300,8 @@
mWindowManager, mActivityManager, mDozeParameters, mStatusBarStateController,
mConfigurationController, mKeyguardViewMediator, mKeyguardBypassController,
mColorExtractor, mDumpManager, mKeyguardStateController,
- mScreenOffAnimationController, mAuthController, mShadeExpansionStateManager);
+ mScreenOffAnimationController, mAuthController, mShadeExpansionStateManager,
+ mShadeWindowLogger);
mNotificationShadeWindowController.setNotificationShadeView(mNotificationShadeWindowView);
mNotificationShadeWindowController.attach();
diff --git a/services/core/java/com/android/server/display/DisplayPowerController.java b/services/core/java/com/android/server/display/DisplayPowerController.java
index 132d5ec..b43d830 100644
--- a/services/core/java/com/android/server/display/DisplayPowerController.java
+++ b/services/core/java/com/android/server/display/DisplayPowerController.java
@@ -2753,6 +2753,10 @@
dumpBrightnessEvents(pw);
}
+ if (mScreenOffBrightnessSensorController != null) {
+ mScreenOffBrightnessSensorController.dump(pw);
+ }
+
if (mHbmController != null) {
mHbmController.dump(pw);
}
diff --git a/services/core/java/com/android/server/display/ScreenOffBrightnessSensorController.java b/services/core/java/com/android/server/display/ScreenOffBrightnessSensorController.java
index 4d394c2..42defac 100644
--- a/services/core/java/com/android/server/display/ScreenOffBrightnessSensorController.java
+++ b/services/core/java/com/android/server/display/ScreenOffBrightnessSensorController.java
@@ -113,7 +113,7 @@
/** Dump current state */
public void dump(PrintWriter pw) {
- pw.println("ScreenOffBrightnessSensorController:");
+ pw.println("Screen Off Brightness Sensor Controller:");
IndentingPrintWriter idpw = new IndentingPrintWriter(pw);
idpw.increaseIndent();
idpw.println("registered=" + mRegistered);
diff --git a/services/core/java/com/android/server/notification/SnoozeHelper.java b/services/core/java/com/android/server/notification/SnoozeHelper.java
index babe4ea..12c16fc 100644
--- a/services/core/java/com/android/server/notification/SnoozeHelper.java
+++ b/services/core/java/com/android/server/notification/SnoozeHelper.java
@@ -129,7 +129,7 @@
protected Long getSnoozeTimeForUnpostedNotification(int userId, String pkg, String key) {
Long time = null;
synchronized (mLock) {
- time = mPersistedSnoozedNotifications.get(key);
+ time = mPersistedSnoozedNotifications.get(getTrimmedString(key));
}
if (time == null) {
time = 0L;
@@ -139,7 +139,7 @@
protected String getSnoozeContextForUnpostedNotification(int userId, String pkg, String key) {
synchronized (mLock) {
- return mPersistedSnoozedNotificationsWithContext.get(key);
+ return mPersistedSnoozedNotificationsWithContext.get(getTrimmedString(key));
}
}
@@ -364,8 +364,9 @@
final NotificationRecord record = mSnoozedNotifications.valueAt(i);
if (record.getUserId() == userId && record.getSbn().getPackageName().equals(pkg)) {
mSnoozedNotifications.removeAt(i);
- mPersistedSnoozedNotificationsWithContext.remove(record.getKey());
- mPersistedSnoozedNotifications.remove(record.getKey());
+ String trimmedKey = getTrimmedString(record.getKey());
+ mPersistedSnoozedNotificationsWithContext.remove(trimmedKey);
+ mPersistedSnoozedNotifications.remove(trimmedKey);
Runnable runnable = () -> {
final PendingIntent pi = createPendingIntent(record.getKey());
mAm.cancel(pi);
@@ -386,8 +387,9 @@
final NotificationRecord record = mSnoozedNotifications.valueAt(i);
if (record.getUserId() == userId) {
mSnoozedNotifications.removeAt(i);
- mPersistedSnoozedNotificationsWithContext.remove(record.getKey());
- mPersistedSnoozedNotifications.remove(record.getKey());
+ String trimmedKey = getTrimmedString(record.getKey());
+ mPersistedSnoozedNotificationsWithContext.remove(trimmedKey);
+ mPersistedSnoozedNotifications.remove(trimmedKey);
Runnable runnable = () -> {
final PendingIntent pi = createPendingIntent(record.getKey());
diff --git a/services/core/java/com/android/server/wm/ActivityStarter.java b/services/core/java/com/android/server/wm/ActivityStarter.java
index c6e0cd2..aad89b4 100644
--- a/services/core/java/com/android/server/wm/ActivityStarter.java
+++ b/services/core/java/com/android/server/wm/ActivityStarter.java
@@ -2867,9 +2867,9 @@
if (differentTopTask && !mAvoidMoveToFront) {
mStartActivity.intent.addFlags(Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT);
- if (mSourceRecord == null || (mSourceRootTask.getTopNonFinishingActivity() != null
- && mSourceRootTask.getTopNonFinishingActivity().getTask()
- == mSourceRecord.getTask())) {
+ // TODO(b/264487981): Consider using BackgroundActivityStartController to determine
+ // whether to bring the launching activity to the front.
+ if (mSourceRecord == null || inTopNonFinishingTask(mSourceRecord)) {
// We really do want to push this one into the user's face, right now.
if (mLaunchTaskBehind && mSourceRecord != null) {
intentActivity.setTaskToAffiliateWith(mSourceRecord.getTask());
@@ -2928,6 +2928,20 @@
mRootWindowContainer.getDefaultTaskDisplayArea(), mTargetRootTask);
}
+ private boolean inTopNonFinishingTask(ActivityRecord r) {
+ if (r == null || r.getTask() == null) {
+ return false;
+ }
+
+ final Task rTask = r.getTask();
+ final Task parent = rTask.getCreatedByOrganizerTask() != null
+ ? rTask.getCreatedByOrganizerTask() : r.getRootTask();
+ final ActivityRecord topNonFinishingActivity = parent != null
+ ? parent.getTopNonFinishingActivity() : null;
+
+ return topNonFinishingActivity != null && topNonFinishingActivity.getTask() == rTask;
+ }
+
private void resumeTargetRootTaskIfNeeded() {
if (mDoResume) {
final ActivityRecord next = mTargetRootTask.topRunningActivity(
diff --git a/services/core/java/com/android/server/wm/LetterboxConfiguration.java b/services/core/java/com/android/server/wm/LetterboxConfiguration.java
index 68a1f88..f916ee4 100644
--- a/services/core/java/com/android/server/wm/LetterboxConfiguration.java
+++ b/services/core/java/com/android/server/wm/LetterboxConfiguration.java
@@ -1080,7 +1080,7 @@
// DeviceConfig.OnPropertiesChangedListener
private static boolean isCameraCompatTreatmentAllowed() {
return DeviceConfig.getBoolean(DeviceConfig.NAMESPACE_WINDOW_MANAGER,
- "enable_camera_compat_treatment", false);
+ "enable_compat_camera_treatment", true);
}
/** Whether camera compatibility refresh is enabled. */
diff --git a/services/core/java/com/android/server/wm/TaskFragment.java b/services/core/java/com/android/server/wm/TaskFragment.java
index be541ae..689cae5 100644
--- a/services/core/java/com/android/server/wm/TaskFragment.java
+++ b/services/core/java/com/android/server/wm/TaskFragment.java
@@ -94,6 +94,7 @@
import android.view.RemoteAnimationTarget;
import android.view.SurfaceControl;
import android.window.ITaskFragmentOrganizer;
+import android.window.TaskFragmentAnimationParams;
import android.window.TaskFragmentInfo;
import android.window.TaskFragmentOrganizerToken;
@@ -304,6 +305,10 @@
@Nullable
private final IBinder mFragmentToken;
+ /** The animation override params for animation running on this TaskFragment. */
+ @NonNull
+ private TaskFragmentAnimationParams mAnimationParams = TaskFragmentAnimationParams.DEFAULT;
+
/**
* The bounds of the embedded TaskFragment relative to the parent Task.
* {@code null} if it is not {@link #mIsEmbedded}
@@ -454,6 +459,15 @@
&& organizer.asBinder().equals(mTaskFragmentOrganizer.asBinder());
}
+ void setAnimationParams(@NonNull TaskFragmentAnimationParams animationParams) {
+ mAnimationParams = animationParams;
+ }
+
+ @NonNull
+ TaskFragmentAnimationParams getAnimationParams() {
+ return mAnimationParams;
+ }
+
TaskFragment getAdjacentTaskFragment() {
return mAdjacentTaskFragment;
}
diff --git a/services/core/java/com/android/server/wm/Transition.java b/services/core/java/com/android/server/wm/Transition.java
index c911b83..00e3188 100644
--- a/services/core/java/com/android/server/wm/Transition.java
+++ b/services/core/java/com/android/server/wm/Transition.java
@@ -1731,13 +1731,26 @@
}
if (activityRecord != null || (taskFragment != null && taskFragment.isEmbedded())) {
- // Set background color to Task theme color for activity and embedded TaskFragment
- // in case we want to show background during the animation.
- final Task parentTask = activityRecord != null
- ? activityRecord.getTask()
- : taskFragment.getTask();
- final int backgroundColor = ColorUtils.setAlphaComponent(
- parentTask.getTaskDescription().getBackgroundColor(), 255);
+ final int backgroundColor;
+ final TaskFragment organizedTf = activityRecord != null
+ ? activityRecord.getOrganizedTaskFragment()
+ : taskFragment.getOrganizedTaskFragment();
+ if (organizedTf != null && organizedTf.getAnimationParams()
+ .getAnimationBackgroundColor() != 0) {
+ // This window is embedded and has an animation background color set on the
+ // TaskFragment. Pass this color with this window, so the handler can use it as
+ // the animation background color if needed,
+ backgroundColor = organizedTf.getAnimationParams()
+ .getAnimationBackgroundColor();
+ } else {
+ // Set background color to Task theme color for activity and embedded
+ // TaskFragment in case we want to show background during the animation.
+ final Task parentTask = activityRecord != null
+ ? activityRecord.getTask()
+ : taskFragment.getTask();
+ backgroundColor = ColorUtils.setAlphaComponent(
+ parentTask.getTaskDescription().getBackgroundColor(), 255);
+ }
change.setBackgroundColor(backgroundColor);
}
diff --git a/services/core/java/com/android/server/wm/WindowContainer.java b/services/core/java/com/android/server/wm/WindowContainer.java
index cb5a433..700016b 100644
--- a/services/core/java/com/android/server/wm/WindowContainer.java
+++ b/services/core/java/com/android/server/wm/WindowContainer.java
@@ -3145,14 +3145,26 @@
// which if set originates from a call to overridePendingAppTransition.
backgroundColorForTransition = adapter.getBackgroundColor();
} else {
- // Otherwise default to the window's background color if provided through
- // the theme as the background color for the animation - the top most window
- // with a valid background color and showBackground set takes precedence.
- final Task parentTask = activityRecord != null
- ? activityRecord.getTask()
- : taskFragment.getTask();
- backgroundColorForTransition = ColorUtils.setAlphaComponent(
- parentTask.getTaskDescription().getBackgroundColor(), 255);
+ final TaskFragment organizedTf = activityRecord != null
+ ? activityRecord.getOrganizedTaskFragment()
+ : taskFragment.getOrganizedTaskFragment();
+ if (organizedTf != null && organizedTf.getAnimationParams()
+ .getAnimationBackgroundColor() != 0) {
+ // This window is embedded and has an animation background color set on the
+ // TaskFragment. Pass this color with this window, so the handler can use it
+ // as the animation background color if needed,
+ backgroundColorForTransition = organizedTf.getAnimationParams()
+ .getAnimationBackgroundColor();
+ } else {
+ // Otherwise default to the window's background color if provided through
+ // the theme as the background color for the animation - the top most window
+ // with a valid background color and showBackground set takes precedence.
+ final Task parentTask = activityRecord != null
+ ? activityRecord.getTask()
+ : taskFragment.getTask();
+ backgroundColorForTransition = ColorUtils.setAlphaComponent(
+ parentTask.getTaskDescription().getBackgroundColor(), 255);
+ }
}
animationRunnerBuilder.setTaskBackgroundColor(backgroundColorForTransition);
}
diff --git a/services/core/java/com/android/server/wm/WindowOrganizerController.java b/services/core/java/com/android/server/wm/WindowOrganizerController.java
index eba3ea4..3187337 100644
--- a/services/core/java/com/android/server/wm/WindowOrganizerController.java
+++ b/services/core/java/com/android/server/wm/WindowOrganizerController.java
@@ -21,6 +21,7 @@
import static android.app.WindowConfiguration.WINDOWING_MODE_UNDEFINED;
import static android.app.WindowConfiguration.WINDOW_CONFIG_BOUNDS;
import static android.view.Display.DEFAULT_DISPLAY;
+import static android.window.TaskFragmentOperation.OP_TYPE_SET_ANIMATION_PARAMS;
import static android.window.WindowContainerTransaction.HierarchyOp.HIERARCHY_OP_TYPE_ADD_RECT_INSETS_PROVIDER;
import static android.window.WindowContainerTransaction.HierarchyOp.HIERARCHY_OP_TYPE_CHILDREN_TASKS_REPARENT;
import static android.window.WindowContainerTransaction.HierarchyOp.HIERARCHY_OP_TYPE_CREATE_TASK_FRAGMENT;
@@ -43,6 +44,7 @@
import static android.window.WindowContainerTransaction.HierarchyOp.HIERARCHY_OP_TYPE_SET_LAUNCH_ADJACENT_FLAG_ROOT;
import static android.window.WindowContainerTransaction.HierarchyOp.HIERARCHY_OP_TYPE_SET_LAUNCH_ROOT;
import static android.window.WindowContainerTransaction.HierarchyOp.HIERARCHY_OP_TYPE_SET_REPARENT_LEAF_TASK_IF_RELAUNCH;
+import static android.window.WindowContainerTransaction.HierarchyOp.HIERARCHY_OP_TYPE_SET_TASK_FRAGMENT_OPERATION;
import static android.window.WindowContainerTransaction.HierarchyOp.HIERARCHY_OP_TYPE_START_ACTIVITY_IN_TASK_FRAGMENT;
import static android.window.WindowContainerTransaction.HierarchyOp.HIERARCHY_OP_TYPE_START_SHORTCUT;
@@ -88,7 +90,9 @@
import android.window.ITransitionPlayer;
import android.window.IWindowContainerTransactionCallback;
import android.window.IWindowOrganizerController;
+import android.window.TaskFragmentAnimationParams;
import android.window.TaskFragmentCreationParams;
+import android.window.TaskFragmentOperation;
import android.window.WindowContainerTransaction;
import com.android.internal.annotations.VisibleForTesting;
@@ -1142,6 +1146,10 @@
fragment.setCompanionTaskFragment(companion);
break;
}
+ case HIERARCHY_OP_TYPE_SET_TASK_FRAGMENT_OPERATION: {
+ effects |= applyTaskFragmentOperation(hop, errorCallbackToken, organizer);
+ break;
+ }
default: {
// The other operations may change task order so they are skipped while in lock
// task mode. The above operations are still allowed because they don't move
@@ -1274,6 +1282,47 @@
return effects;
}
+ /** Applies change set through {@link WindowContainerTransaction#setTaskFragmentOperation}. */
+ private int applyTaskFragmentOperation(@NonNull WindowContainerTransaction.HierarchyOp hop,
+ @Nullable IBinder errorCallbackToken, @Nullable ITaskFragmentOrganizer organizer) {
+ final IBinder fragmentToken = hop.getContainer();
+ final TaskFragment taskFragment = mLaunchTaskFragments.get(fragmentToken);
+ final TaskFragmentOperation operation = hop.getTaskFragmentOperation();
+ if (operation == null) {
+ final Throwable exception = new IllegalArgumentException(
+ "TaskFragmentOperation must be non-null");
+ sendTaskFragmentOperationFailure(organizer, errorCallbackToken, taskFragment,
+ HIERARCHY_OP_TYPE_SET_TASK_FRAGMENT_OPERATION, exception);
+ return 0;
+ }
+ final int opType = operation.getOpType();
+ if (taskFragment == null || !taskFragment.isAttached()) {
+ final Throwable exception = new IllegalArgumentException(
+ "Not allowed to apply operation on invalid fragment tokens opType=" + opType);
+ sendTaskFragmentOperationFailure(organizer, errorCallbackToken, taskFragment,
+ HIERARCHY_OP_TYPE_SET_TASK_FRAGMENT_OPERATION, exception);
+ return 0;
+ }
+
+ int effect = 0;
+ switch (opType) {
+ case OP_TYPE_SET_ANIMATION_PARAMS: {
+ final TaskFragmentAnimationParams animationParams = operation.getAnimationParams();
+ if (animationParams == null) {
+ final Throwable exception = new IllegalArgumentException(
+ "TaskFragmentAnimationParams must be non-null");
+ sendTaskFragmentOperationFailure(organizer, errorCallbackToken, taskFragment,
+ HIERARCHY_OP_TYPE_SET_TASK_FRAGMENT_OPERATION, exception);
+ break;
+ }
+ taskFragment.setAnimationParams(animationParams);
+ break;
+ }
+ // TODO(b/263436063): move other TaskFragment related operation here.
+ }
+ return effect;
+ }
+
/** A helper method to send minimum dimension violation error to the client. */
private void sendMinimumDimensionViolation(TaskFragment taskFragment, Point minDimensions,
IBinder errorCallbackToken, String reason) {
@@ -1681,6 +1730,7 @@
break;
case HIERARCHY_OP_TYPE_START_ACTIVITY_IN_TASK_FRAGMENT:
case HIERARCHY_OP_TYPE_REQUEST_FOCUS_ON_TASK_FRAGMENT:
+ case HIERARCHY_OP_TYPE_SET_TASK_FRAGMENT_OPERATION:
enforceTaskFragmentOrganized(func, hop.getContainer(), organizer);
break;
case HIERARCHY_OP_TYPE_REPARENT_ACTIVITY_TO_TASK_FRAGMENT:
diff --git a/services/robotests/backup/src/com/android/server/backup/keyvalue/KeyValueBackupTaskTest.java b/services/robotests/backup/src/com/android/server/backup/keyvalue/KeyValueBackupTaskTest.java
index 962a07a..ca9ff6f 100644
--- a/services/robotests/backup/src/com/android/server/backup/keyvalue/KeyValueBackupTaskTest.java
+++ b/services/robotests/backup/src/com/android/server/backup/keyvalue/KeyValueBackupTaskTest.java
@@ -43,23 +43,23 @@
import static com.google.common.truth.Truth.assertThat;
import static com.google.common.truth.Truth.assertWithMessage;
-import static org.mockito.Mockito.any;
-import static org.mockito.Mockito.anyInt;
-import static org.mockito.Mockito.anyLong;
-import static org.mockito.Mockito.argThat;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.anyInt;
+import static org.mockito.ArgumentMatchers.anyLong;
+import static org.mockito.ArgumentMatchers.argThat;
+import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.ArgumentMatchers.intThat;
import static org.mockito.Mockito.doAnswer;
import static org.mockito.Mockito.doNothing;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.doThrow;
-import static org.mockito.Mockito.eq;
import static org.mockito.Mockito.inOrder;
-import static org.mockito.Mockito.intThat;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.reset;
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.verifyNoInteractions;
+import static org.mockito.Mockito.verifyZeroInteractions;
import static org.mockito.Mockito.when;
import static org.robolectric.Shadows.shadowOf;
import static org.robolectric.shadow.api.Shadow.extract;
@@ -2185,7 +2185,7 @@
task.waitCancel();
reset(transportMock.transport);
taskFinished.block();
- verifyNoInteractions(transportMock.transport);
+ verifyZeroInteractions(transportMock.transport);
}
@Test
diff --git a/services/tests/uiservicestests/src/com/android/server/notification/SnoozeHelperTest.java b/services/tests/uiservicestests/src/com/android/server/notification/SnoozeHelperTest.java
index 1f117b3..9c3d5a7 100644
--- a/services/tests/uiservicestests/src/com/android/server/notification/SnoozeHelperTest.java
+++ b/services/tests/uiservicestests/src/com/android/server/notification/SnoozeHelperTest.java
@@ -234,7 +234,7 @@
}
@Test
- public void testScheduleRepostsForLongTagPersistedNotification() throws Exception {
+ public void testLongTagPersistedNotification() throws Exception {
String longTag = "A".repeat(66000);
NotificationRecord r = getNotificationRecord("pkg", 1, longTag, UserHandle.SYSTEM);
mSnoozeHelper.snooze(r, 0);
@@ -612,7 +612,8 @@
public void testClearData_userPackage() {
// snooze 2 from same package
NotificationRecord r = getNotificationRecord("pkg", 1, "one", UserHandle.SYSTEM);
- NotificationRecord r2 = getNotificationRecord("pkg", 2, "two", UserHandle.SYSTEM);
+ NotificationRecord r2 = getNotificationRecord("pkg", 2, "two" + "2".repeat(66000),
+ UserHandle.SYSTEM); // include notif with very long tag
mSnoozeHelper.snooze(r, 1000);
mSnoozeHelper.snooze(r2, 1000);
assertTrue(mSnoozeHelper.isSnoozed(
@@ -634,11 +635,14 @@
@Test
public void testClearData_user() {
- // snooze 2 from same package
+ // snooze 2 from same package, including notifs with long tag
NotificationRecord r = getNotificationRecord("pkg", 1, "one", UserHandle.SYSTEM);
- NotificationRecord r2 = getNotificationRecord("pkg2", 2, "two", UserHandle.SYSTEM);
- NotificationRecord r3 = getNotificationRecord("pkg2", 3, "three", UserHandle.SYSTEM);
- NotificationRecord r4 = getNotificationRecord("pkg", 2, "two", UserHandle.ALL);
+ NotificationRecord r2 = getNotificationRecord("pkg2", 2, "two" + "2".repeat(66000),
+ UserHandle.SYSTEM);
+ NotificationRecord r3 = getNotificationRecord("pkg2", 3, "three",
+ UserHandle.SYSTEM);
+ NotificationRecord r4 = getNotificationRecord("pkg", 2, "two" + "2".repeat(66000),
+ UserHandle.ALL);
mSnoozeHelper.snooze(r, 1000);
mSnoozeHelper.snooze(r2, 1000);
mSnoozeHelper.snooze(r3, "until");
@@ -653,6 +657,19 @@
assertTrue(mSnoozeHelper.isSnoozed(
UserHandle.USER_ALL, r4.getSbn().getPackageName(), r4.getKey()));
+ assertFalse(0L == mSnoozeHelper.getSnoozeTimeForUnpostedNotification(
+ r.getUser().getIdentifier(), r.getSbn().getPackageName(),
+ r.getSbn().getKey()));
+ assertFalse(0L == mSnoozeHelper.getSnoozeTimeForUnpostedNotification(
+ r2.getUser().getIdentifier(), r2.getSbn().getPackageName(),
+ r2.getSbn().getKey()));
+ assertNotNull(mSnoozeHelper.getSnoozeContextForUnpostedNotification(
+ r3.getUser().getIdentifier(), r3.getSbn().getPackageName(),
+ r3.getSbn().getKey()));
+ assertNotNull(mSnoozeHelper.getSnoozeContextForUnpostedNotification(
+ r4.getUser().getIdentifier(), r4.getSbn().getPackageName(),
+ r4.getSbn().getKey()));
+
// clear data
mSnoozeHelper.clearData(UserHandle.USER_SYSTEM);
@@ -666,18 +683,18 @@
assertTrue(mSnoozeHelper.isSnoozed(
UserHandle.USER_SYSTEM, r4.getSbn().getPackageName(), r4.getKey()));
- assertNull(mSnoozeHelper.getSnoozeContextForUnpostedNotification(
- r3.getUser().getIdentifier(), r3.getSbn().getPackageName(),
- r3.getSbn().getKey()));
- assertNotNull(mSnoozeHelper.getSnoozeContextForUnpostedNotification(
- r4.getUser().getIdentifier(), r4.getSbn().getPackageName(),
- r4.getSbn().getKey()));
assertEquals(0L, mSnoozeHelper.getSnoozeTimeForUnpostedNotification(
r.getUser().getIdentifier(), r.getSbn().getPackageName(),
r.getSbn().getKey()).longValue());
assertEquals(0L, mSnoozeHelper.getSnoozeTimeForUnpostedNotification(
r2.getUser().getIdentifier(), r2.getSbn().getPackageName(),
r2.getSbn().getKey()).longValue());
+ assertNull(mSnoozeHelper.getSnoozeContextForUnpostedNotification(
+ r3.getUser().getIdentifier(), r3.getSbn().getPackageName(),
+ r3.getSbn().getKey()));
+ assertNotNull(mSnoozeHelper.getSnoozeContextForUnpostedNotification(
+ r4.getUser().getIdentifier(), r4.getSbn().getPackageName(),
+ r4.getSbn().getKey()));
// 2 for initial timed-snoozes, once each for canceling the USER_SYSTEM snoozes
verify(mAm, times(5)).cancel(any(PendingIntent.class));
diff --git a/services/tests/wmtests/src/com/android/server/wm/TaskFragmentOrganizerControllerTest.java b/services/tests/wmtests/src/com/android/server/wm/TaskFragmentOrganizerControllerTest.java
index 140051d..2420efc 100644
--- a/services/tests/wmtests/src/com/android/server/wm/TaskFragmentOrganizerControllerTest.java
+++ b/services/tests/wmtests/src/com/android/server/wm/TaskFragmentOrganizerControllerTest.java
@@ -19,6 +19,7 @@
import static android.app.WindowConfiguration.ACTIVITY_TYPE_STANDARD;
import static android.app.WindowConfiguration.WINDOWING_MODE_PINNED;
import static android.view.Display.DEFAULT_DISPLAY;
+import static android.window.TaskFragmentOperation.OP_TYPE_SET_ANIMATION_PARAMS;
import static android.window.TaskFragmentOrganizer.KEY_ERROR_CALLBACK_OP_TYPE;
import static android.window.TaskFragmentOrganizer.KEY_ERROR_CALLBACK_THROWABLE;
import static android.window.TaskFragmentOrganizer.getTransitionType;
@@ -66,6 +67,7 @@
import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.content.res.Configuration;
+import android.graphics.Color;
import android.graphics.Rect;
import android.net.Uri;
import android.os.Binder;
@@ -76,8 +78,10 @@
import android.view.RemoteAnimationDefinition;
import android.view.SurfaceControl;
import android.window.ITaskFragmentOrganizer;
+import android.window.TaskFragmentAnimationParams;
import android.window.TaskFragmentCreationParams;
import android.window.TaskFragmentInfo;
+import android.window.TaskFragmentOperation;
import android.window.TaskFragmentOrganizer;
import android.window.TaskFragmentOrganizerToken;
import android.window.TaskFragmentParentInfo;
@@ -676,6 +680,57 @@
}
@Test
+ public void testApplyTransaction_enforceTaskFragmentOrganized_setTaskFragmentOperation() {
+ final Task task = createTask(mDisplayContent);
+ mTaskFragment = new TaskFragmentBuilder(mAtm)
+ .setParentTask(task)
+ .setFragmentToken(mFragmentToken)
+ .build();
+ mWindowOrganizerController.mLaunchTaskFragments.put(mFragmentToken, mTaskFragment);
+ final TaskFragmentOperation operation = new TaskFragmentOperation.Builder(
+ OP_TYPE_SET_ANIMATION_PARAMS)
+ .setAnimationParams(TaskFragmentAnimationParams.DEFAULT)
+ .build();
+ mTransaction.setTaskFragmentOperation(mFragmentToken, operation);
+ mOrganizer.applyTransaction(mTransaction);
+
+ // Not allowed because TaskFragment is not organized by the caller organizer.
+ assertApplyTransactionDisallowed(mTransaction);
+
+ mTaskFragment.setTaskFragmentOrganizer(mOrganizerToken, 10 /* uid */,
+ "Test:TaskFragmentOrganizer" /* processName */);
+
+ assertApplyTransactionAllowed(mTransaction);
+ }
+
+ @Test
+ public void testSetTaskFragmentOperation() {
+ final Task task = createTask(mDisplayContent);
+ mTaskFragment = new TaskFragmentBuilder(mAtm)
+ .setParentTask(task)
+ .setOrganizer(mOrganizer)
+ .setFragmentToken(mFragmentToken)
+ .build();
+ assertEquals(TaskFragmentAnimationParams.DEFAULT, mTaskFragment.getAnimationParams());
+
+ mWindowOrganizerController.mLaunchTaskFragments.put(mFragmentToken, mTaskFragment);
+ final TaskFragmentAnimationParams animationParams =
+ new TaskFragmentAnimationParams.Builder()
+ .setAnimationBackgroundColor(Color.GREEN)
+ .build();
+ final TaskFragmentOperation operation = new TaskFragmentOperation.Builder(
+ OP_TYPE_SET_ANIMATION_PARAMS)
+ .setAnimationParams(animationParams)
+ .build();
+ mTransaction.setTaskFragmentOperation(mFragmentToken, operation);
+ mOrganizer.applyTransaction(mTransaction);
+ assertApplyTransactionAllowed(mTransaction);
+
+ assertEquals(animationParams, mTaskFragment.getAnimationParams());
+ assertEquals(Color.GREEN, mTaskFragment.getAnimationParams().getAnimationBackgroundColor());
+ }
+
+ @Test
public void testApplyTransaction_createTaskFragment_failForDifferentUid() {
final ActivityRecord activity = createActivityRecord(mDisplayContent);
final int uid = Binder.getCallingUid();