diff options
877 files changed, 15991 insertions, 4701 deletions
diff --git a/AconfigFlags.bp b/AconfigFlags.bp index 52200bfcfdf6..b5f398b28b9e 100644 --- a/AconfigFlags.bp +++ b/AconfigFlags.bp @@ -58,11 +58,11 @@ aconfig_srcjars = [ ":android.service.autofill.flags-aconfig-java{.generated_srcjars}", ":com.android.net.flags-aconfig-java{.generated_srcjars}", ":device_policy_aconfig_flags_lib{.generated_srcjars}", - ":service-jobscheduler-deviceidle.flags-aconfig-java{.generated_srcjars}", ":surfaceflinger_flags_java_lib{.generated_srcjars}", ":android.view.contentcapture.flags-aconfig-java{.generated_srcjars}", ":android.hardware.usb.flags-aconfig-java{.generated_srcjars}", ":android.tracing.flags-aconfig-java{.generated_srcjars}", + ":android.appwidget.flags-aconfig-java{.generated_srcjars}", ] filegroup { @@ -108,6 +108,11 @@ java_aconfig_library { defaults: ["framework-minus-apex-aconfig-java-defaults"], } +cc_aconfig_library { + name: "telephony_flags_c_lib", + aconfig_declarations: "telephony_flags", +} + // Window aconfig_declarations { name: "com.android.window.flags.window-aconfig", @@ -220,6 +225,7 @@ java_aconfig_library { name: "android.security.flags-aconfig-java-host", aconfig_declarations: "android.security.flags-aconfig", host_supported: true, + mode: "test", defaults: ["framework-minus-apex-aconfig-java-defaults"], } @@ -249,6 +255,13 @@ java_aconfig_library { defaults: ["framework-minus-apex-aconfig-java-defaults"], } +java_aconfig_library { + name: "android.os.flags-aconfig-java-host", + aconfig_declarations: "android.os.flags-aconfig", + host_supported: true, + defaults: ["framework-minus-apex-aconfig-java-defaults"], +} + // VirtualDeviceManager java_aconfig_library { name: "android.companion.virtual.flags-aconfig-java", @@ -722,3 +735,16 @@ java_aconfig_library { aconfig_declarations: "android.tracing.flags-aconfig", defaults: ["framework-minus-apex-aconfig-java-defaults"], } + +// App Widgets +aconfig_declarations { + name: "android.appwidget.flags-aconfig", + package: "android.appwidget.flags", + srcs: ["core/java/android/appwidget/flags.aconfig"], +} + +java_aconfig_library { + name: "android.appwidget.flags-aconfig-java", + aconfig_declarations: "android.appwidget.flags-aconfig", + defaults: ["framework-minus-apex-aconfig-java-defaults"], +} diff --git a/INPUT_OWNERS b/INPUT_OWNERS index e02ba770cdf8..44b2f3805495 100644 --- a/INPUT_OWNERS +++ b/INPUT_OWNERS @@ -5,3 +5,5 @@ michaelwr@google.com prabirmsp@google.com svv@google.com vdevmurari@google.com + +per-file Virtual*=file:/services/companion/java/com/android/server/companion/virtual/OWNERS diff --git a/Ravenwood.bp b/Ravenwood.bp index 2f6709090093..b497871aee85 100644 --- a/Ravenwood.bp +++ b/Ravenwood.bp @@ -82,6 +82,7 @@ android_ravenwood_libgroup { "junit", "truth", "ravenwood-junit", + "android.test.mock", ], } diff --git a/apct-tests/perftests/core/res/drawable-nodpi/fountain_night.jpg b/apct-tests/perftests/core/res/drawable-nodpi/fountain_night.jpg Binary files differnew file mode 100644 index 000000000000..d8b2d759e4c0 --- /dev/null +++ b/apct-tests/perftests/core/res/drawable-nodpi/fountain_night.jpg diff --git a/apct-tests/perftests/core/src/android/graphics/perftests/CanvasPerfTest.java b/apct-tests/perftests/core/src/android/graphics/perftests/CanvasPerfTest.java index f84a0d037ca5..e5a06c9bd146 100644 --- a/apct-tests/perftests/core/src/android/graphics/perftests/CanvasPerfTest.java +++ b/apct-tests/perftests/core/src/android/graphics/perftests/CanvasPerfTest.java @@ -16,20 +16,29 @@ package android.graphics.perftests; +import static org.junit.Assert.assertTrue; + +import android.content.Context; import android.graphics.Bitmap; import android.graphics.Bitmap.Config; import android.graphics.Color; +import android.graphics.ImageDecoder; import android.graphics.Paint; import android.graphics.RecordingCanvas; import android.graphics.RenderNode; import android.perftests.utils.BenchmarkState; import android.perftests.utils.PerfStatusReporter; +import androidx.test.InstrumentationRegistry; import androidx.test.filters.LargeTest; +import com.android.perftests.core.R; + import org.junit.Rule; import org.junit.Test; +import java.io.IOException; + @LargeTest public class CanvasPerfTest { @Rule @@ -93,4 +102,38 @@ public class CanvasPerfTest { node.end(canvas); } } + + @Test + public void testCreateScaledBitmap() throws IOException { + BenchmarkState state = mPerfStatusReporter.getBenchmarkState(); + final Context context = InstrumentationRegistry.getContext(); + Bitmap source = ImageDecoder.decodeBitmap( + ImageDecoder.createSource(context.getResources(), R.drawable.fountain_night), + (decoder, info, source1) -> { + decoder.setAllocator(ImageDecoder.ALLOCATOR_SOFTWARE); + }); + source.setGainmap(null); + + while (state.keepRunning()) { + Bitmap.createScaledBitmap(source, source.getWidth() / 2, source.getHeight() / 2, true) + .recycle(); + } + } + + @Test + public void testCreateScaledBitmapWithGainmap() throws IOException { + BenchmarkState state = mPerfStatusReporter.getBenchmarkState(); + final Context context = InstrumentationRegistry.getContext(); + Bitmap source = ImageDecoder.decodeBitmap( + ImageDecoder.createSource(context.getResources(), R.drawable.fountain_night), + (decoder, info, source1) -> { + decoder.setAllocator(ImageDecoder.ALLOCATOR_SOFTWARE); + }); + assertTrue(source.hasGainmap()); + + while (state.keepRunning()) { + Bitmap.createScaledBitmap(source, source.getWidth() / 2, source.getHeight() / 2, true) + .recycle(); + } + } } diff --git a/apct-tests/perftests/windowmanager/src/android/wm/WindowAddRemovePerfTest.java b/apct-tests/perftests/windowmanager/src/android/wm/WindowAddRemovePerfTest.java index b87e42e31da3..72816e4ce900 100644 --- a/apct-tests/perftests/windowmanager/src/android/wm/WindowAddRemovePerfTest.java +++ b/apct-tests/perftests/windowmanager/src/android/wm/WindowAddRemovePerfTest.java @@ -112,7 +112,7 @@ public class WindowAddRemovePerfTest extends WindowManagerPerfTestBase state.addExtraResult("add", elapsedTimeNsOfAdd); startTime = SystemClock.elapsedRealtimeNanos(); - session.remove(this); + session.remove(asBinder()); final long elapsedTimeNsOfRemove = SystemClock.elapsedRealtimeNanos() - startTime; state.addExtraResult("remove", elapsedTimeNsOfRemove); diff --git a/apex/jobscheduler/service/Android.bp b/apex/jobscheduler/service/Android.bp index 6c83add3b8e3..8b55e071e715 100644 --- a/apex/jobscheduler/service/Android.bp +++ b/apex/jobscheduler/service/Android.bp @@ -13,10 +13,6 @@ java_library { name: "service-jobscheduler", installable: true, - defaults: [ - "service-jobscheduler-aconfig-libraries", - ], - srcs: [ "java/**/*.java", ":framework-jobscheduler-shared-srcs", @@ -32,6 +28,7 @@ java_library { static_libs: [ "modules-utils-fastxmlserializer", + "service-jobscheduler-job.flags-aconfig-java", ], // Rename classes shared with the framework diff --git a/apex/jobscheduler/service/aconfig/Android.bp b/apex/jobscheduler/service/aconfig/Android.bp index 7d8a363ba819..3ba7aa201d27 100644 --- a/apex/jobscheduler/service/aconfig/Android.bp +++ b/apex/jobscheduler/service/aconfig/Android.bp @@ -10,7 +10,6 @@ aconfig_declarations { java_aconfig_library { name: "service-jobscheduler-deviceidle.flags-aconfig-java", aconfig_declarations: "service-deviceidle.flags-aconfig", - defaults: ["framework-minus-apex-aconfig-java-defaults"], visibility: ["//frameworks/base:__subpackages__"], } @@ -26,21 +25,5 @@ aconfig_declarations { java_aconfig_library { name: "service-jobscheduler-job.flags-aconfig-java", aconfig_declarations: "service-job.flags-aconfig", - defaults: ["framework-minus-apex-aconfig-java-defaults"], - visibility: ["//frameworks/base:__subpackages__"], -} - -service_jobscheduler_aconfig_srcjars = [ - ":service-jobscheduler-deviceidle.flags-aconfig-java{.generated_srcjars}", - ":service-jobscheduler-job.flags-aconfig-java{.generated_srcjars}", -] - -// Aconfig declarations and libraries for the core framework -java_defaults { - name: "service-jobscheduler-aconfig-libraries", - // Add java_aconfig_libraries to here to add them to the core framework - srcs: service_jobscheduler_aconfig_srcjars, - // Add aconfig-annotations-lib as a dependency for the optimization - libs: ["aconfig-annotations-lib"], visibility: ["//frameworks/base:__subpackages__"], } diff --git a/cmds/screencap/screencap.cpp b/cmds/screencap/screencap.cpp index 2d235331a672..917529ec1dcf 100644 --- a/cmds/screencap/screencap.cpp +++ b/cmds/screencap/screencap.cpp @@ -20,6 +20,7 @@ #include <fcntl.h> #include <stdlib.h> #include <string.h> +#include <getopt.h> #include <linux/fb.h> #include <sys/ioctl.h> @@ -32,6 +33,7 @@ #include <ftl/concat.h> #include <ftl/optional.h> +#include <gui/DisplayCaptureArgs.h> #include <gui/ISurfaceComposer.h> #include <gui/SurfaceComposerClient.h> #include <gui/SyncScreenCaptureListener.h> @@ -48,14 +50,17 @@ using namespace android; #define COLORSPACE_DISPLAY_P3 2 void usage(const char* pname, ftl::Optional<DisplayId> displayIdOpt) { - fprintf(stderr, - "usage: %s [-hp] [-d display-id] [FILENAME]\n" - " -h: this message\n" - " -p: save the file as a png.\n" - " -d: specify the display ID to capture%s\n" - " see \"dumpsys SurfaceFlinger --display-id\" for valid display IDs.\n" - "If FILENAME ends with .png it will be saved as a png.\n" - "If FILENAME is not given, the results will be printed to stdout.\n", + fprintf(stderr, R"( +usage: %s [-hp] [-d display-id] [FILENAME] + -h: this message + -p: save the file as a png. + -d: specify the display ID to capture%s + see "dumpsys SurfaceFlinger --display-id" for valid display IDs. + --hint-for-seamless If set will use the hintForSeamless path in SF + +If FILENAME ends with .png it will be saved as a png. +If FILENAME is not given, the results will be printed to stdout. +)", pname, displayIdOpt .transform([](DisplayId id) { @@ -65,6 +70,21 @@ void usage(const char* pname, ftl::Optional<DisplayId> displayIdOpt) { .c_str()); } +// For options that only exist in long-form. Anything in the +// 0-255 range is reserved for short options (which just use their ASCII value) +namespace LongOpts { +enum { + Reserved = 255, + HintForSeamless, +}; +} + +static const struct option LONG_OPTIONS[] = { + {"png", no_argument, nullptr, 'p'}, + {"help", no_argument, nullptr, 'h'}, + {"hint-for-seamless", no_argument, nullptr, LongOpts::HintForSeamless}, + {0, 0, 0, 0}}; + static int32_t flinger2bitmapFormat(PixelFormat f) { switch (f) { @@ -134,10 +154,11 @@ int main(int argc, char** argv) return 1; } std::optional<DisplayId> displayIdOpt; + gui::CaptureArgs captureArgs; const char* pname = argv[0]; bool png = false; int c; - while ((c = getopt(argc, argv, "phd:")) != -1) { + while ((c = getopt_long(argc, argv, "phd:", LONG_OPTIONS, nullptr)) != -1) { switch (c) { case 'p': png = true; @@ -165,6 +186,9 @@ int main(int argc, char** argv) } usage(pname, displayIdOpt); return 1; + case LongOpts::HintForSeamless: + captureArgs.hintForSeamlessTransition = true; + break; } } @@ -215,7 +239,7 @@ int main(int argc, char** argv) ProcessState::self()->startThreadPool(); sp<SyncScreenCaptureListener> captureListener = new SyncScreenCaptureListener(); - ScreenshotClient::captureDisplay(*displayIdOpt, captureListener); + ScreenshotClient::captureDisplay(*displayIdOpt, captureArgs, captureListener); ScreenCaptureResults captureResults = captureListener->waitForResults(); if (!captureResults.fenceResult.ok()) { diff --git a/core/api/current.txt b/core/api/current.txt index 91e3a3a4c9d8..bae7ca4bff9d 100644 --- a/core/api/current.txt +++ b/core/api/current.txt @@ -10405,7 +10405,7 @@ package android.content { method public abstract java.io.File getDatabasePath(String); method public int getDeviceId(); method public abstract java.io.File getDir(String, int); - method @Nullable public android.view.Display getDisplay(); + method @NonNull public android.view.Display getDisplay(); method @Nullable public final android.graphics.drawable.Drawable getDrawable(@DrawableRes int); method @Nullable public abstract java.io.File getExternalCacheDir(); method public abstract java.io.File[] getExternalCacheDirs(); @@ -12848,6 +12848,7 @@ package android.content.pm { field public static final String FEATURE_CAMERA_LEVEL_FULL = "android.hardware.camera.level.full"; field public static final String FEATURE_CANT_SAVE_STATE = "android.software.cant_save_state"; field public static final String FEATURE_COMPANION_DEVICE_SETUP = "android.software.companion_device_setup"; + field @FlaggedApi("android.view.inputmethod.concurrent_input_methods") public static final String FEATURE_CONCURRENT_INPUT_METHODS = "android.software.concurrent_input_methods"; field @Deprecated public static final String FEATURE_CONNECTION_SERVICE = "android.software.connectionservice"; field public static final String FEATURE_CONSUMER_IR = "android.hardware.consumerir"; field public static final String FEATURE_CONTROLS = "android.software.controls"; @@ -33179,6 +33180,7 @@ package android.os { method public int getCurrentThermalStatus(); method public int getLocationPowerSaveMode(); method public float getThermalHeadroom(@IntRange(from=0, to=60) int); + method @FlaggedApi("android.os.allow_thermal_headroom_thresholds") @NonNull public java.util.Map<java.lang.Integer,java.lang.Float> getThermalHeadroomThresholds(); method public boolean isAllowedInLowPowerStandby(int); method public boolean isAllowedInLowPowerStandby(@NonNull String); method public boolean isBatteryDischargePredictionPersonalized(); @@ -39257,7 +39259,7 @@ package android.security.keystore { method @NonNull public android.security.keystore.KeyGenParameterSpec.Builder setKeyValidityForOriginationEnd(java.util.Date); method @NonNull public android.security.keystore.KeyGenParameterSpec.Builder setKeyValidityStart(java.util.Date); method @NonNull public android.security.keystore.KeyGenParameterSpec.Builder setMaxUsageCount(int); - method @FlaggedApi("MGF1_DIGEST_SETTER") @NonNull public android.security.keystore.KeyGenParameterSpec.Builder setMgf1Digests(@Nullable java.lang.String...); + method @FlaggedApi("MGF1_DIGEST_SETTER") @NonNull public android.security.keystore.KeyGenParameterSpec.Builder setMgf1Digests(@NonNull java.lang.String...); method @NonNull public android.security.keystore.KeyGenParameterSpec.Builder setRandomizedEncryptionRequired(boolean); method @NonNull public android.security.keystore.KeyGenParameterSpec.Builder setSignaturePaddings(java.lang.String...); method @NonNull public android.security.keystore.KeyGenParameterSpec.Builder setUnlockedDeviceRequired(boolean); @@ -40543,19 +40545,26 @@ package android.service.notification { public final class Condition implements android.os.Parcelable { ctor public Condition(android.net.Uri, String, int); + ctor @FlaggedApi("android.app.modes_api") public Condition(@Nullable android.net.Uri, @Nullable String, int, int); ctor public Condition(android.net.Uri, String, String, String, int, int, int); + ctor @FlaggedApi("android.app.modes_api") public Condition(@Nullable android.net.Uri, @Nullable String, @Nullable String, @Nullable String, int, int, int, int); ctor public Condition(android.os.Parcel); method public android.service.notification.Condition copy(); method public int describeContents(); method public static boolean isValidId(android.net.Uri, String); method public static android.net.Uri.Builder newId(android.content.Context); method public static String relevanceToString(int); + method @FlaggedApi("android.app.modes_api") @NonNull public static String sourceToString(int); method public static String stateToString(int); method public void writeToParcel(android.os.Parcel, int); field @NonNull public static final android.os.Parcelable.Creator<android.service.notification.Condition> CREATOR; field public static final int FLAG_RELEVANT_ALWAYS = 2; // 0x2 field public static final int FLAG_RELEVANT_NOW = 1; // 0x1 field public static final String SCHEME = "condition"; + field @FlaggedApi("android.app.modes_api") public static final int SOURCE_CONTEXT = 3; // 0x3 + field @FlaggedApi("android.app.modes_api") public static final int SOURCE_SCHEDULE = 2; // 0x2 + field @FlaggedApi("android.app.modes_api") public static final int SOURCE_UNKNOWN = 0; // 0x0 + field @FlaggedApi("android.app.modes_api") public static final int SOURCE_USER_ACTION = 1; // 0x1 field public static final int STATE_ERROR = 3; // 0x3 field public static final int STATE_FALSE = 0; // 0x0 field public static final int STATE_TRUE = 1; // 0x1 @@ -40565,6 +40574,7 @@ package android.service.notification { field public final android.net.Uri id; field public final String line1; field public final String line2; + field @FlaggedApi("android.app.modes_api") public final int source; field public final int state; field public final String summary; } @@ -44755,10 +44765,16 @@ package android.telephony { method public int getLastCauseCode(); method @Nullable public android.net.LinkProperties getLinkProperties(); method public int getNetworkType(); + method @FlaggedApi("com.android.internal.telephony.flags.network_validation") public int getNetworkValidationStatus(); method public int getState(); method public int getTransportType(); method public void writeToParcel(@NonNull android.os.Parcel, int); field @NonNull public static final android.os.Parcelable.Creator<android.telephony.PreciseDataConnectionState> CREATOR; + field @FlaggedApi("com.android.internal.telephony.flags.network_validation") public static final int NETWORK_VALIDATION_FAILURE = 4; // 0x4 + field @FlaggedApi("com.android.internal.telephony.flags.network_validation") public static final int NETWORK_VALIDATION_IN_PROGRESS = 2; // 0x2 + field @FlaggedApi("com.android.internal.telephony.flags.network_validation") public static final int NETWORK_VALIDATION_NOT_REQUESTED = 1; // 0x1 + field @FlaggedApi("com.android.internal.telephony.flags.network_validation") public static final int NETWORK_VALIDATION_SUCCESS = 3; // 0x3 + field @FlaggedApi("com.android.internal.telephony.flags.network_validation") public static final int NETWORK_VALIDATION_UNSUPPORTED = 0; // 0x0 } public final class RadioAccessSpecifier implements android.os.Parcelable { diff --git a/core/api/module-lib-current.txt b/core/api/module-lib-current.txt index df466ab9b5bb..e7803fbf011d 100644 --- a/core/api/module-lib-current.txt +++ b/core/api/module-lib-current.txt @@ -639,3 +639,12 @@ package android.util { } +package android.view.accessibility { + + public final class AccessibilityManager { + method @FlaggedApi("android.view.accessibility.flash_notification_system_api") public boolean startFlashNotificationSequence(@NonNull android.content.Context, int); + method @FlaggedApi("android.view.accessibility.flash_notification_system_api") public boolean stopFlashNotificationSequence(@NonNull android.content.Context); + } + +} + diff --git a/core/api/system-current.txt b/core/api/system-current.txt index fbd2142ba625..5958f87e5635 100644 --- a/core/api/system-current.txt +++ b/core/api/system-current.txt @@ -3991,7 +3991,7 @@ package android.content.pm { method @RequiresPermission(android.Manifest.permission.SET_HARMFUL_APP_WARNINGS) public void setHarmfulAppWarning(@NonNull String, @Nullable CharSequence); method @Deprecated @Nullable @RequiresPermission(android.Manifest.permission.SUSPEND_APPS) public String[] setPackagesSuspended(@Nullable String[], boolean, @Nullable android.os.PersistableBundle, @Nullable android.os.PersistableBundle, @Nullable String); method @Nullable @RequiresPermission(value=android.Manifest.permission.SUSPEND_APPS, conditional=true) public String[] setPackagesSuspended(@Nullable String[], boolean, @Nullable android.os.PersistableBundle, @Nullable android.os.PersistableBundle, @Nullable android.content.pm.SuspendDialogInfo); - method @FlaggedApi("android.content.pm.quarantined_enabled") @Nullable @RequiresPermission(value=android.Manifest.permission.SUSPEND_APPS, conditional=true) public String[] setPackagesSuspended(@Nullable String[], boolean, @Nullable android.os.PersistableBundle, @Nullable android.os.PersistableBundle, @Nullable android.content.pm.SuspendDialogInfo, int); + method @FlaggedApi("android.content.pm.quarantined_enabled") @Nullable @RequiresPermission(anyOf={android.Manifest.permission.SUSPEND_APPS, android.Manifest.permission.QUARANTINE_APPS}, conditional=true) public String[] setPackagesSuspended(@Nullable String[], boolean, @Nullable android.os.PersistableBundle, @Nullable android.os.PersistableBundle, @Nullable android.content.pm.SuspendDialogInfo, int); method @RequiresPermission(value=android.Manifest.permission.CHANGE_COMPONENT_ENABLED_STATE, conditional=true) public void setSyntheticAppDetailsActivityEnabled(@NonNull String, boolean); method public void setSystemAppState(@NonNull String, int); method @RequiresPermission(android.Manifest.permission.INSTALL_PACKAGES) public abstract void setUpdateAvailable(@NonNull String, boolean); @@ -4598,6 +4598,14 @@ package android.hardware.display { field public static final int VIRTUAL_DISPLAY_FLAG_TRUSTED = 1024; // 0x400 } + public final class VirtualDisplayConfig implements android.os.Parcelable { + method @FlaggedApi("android.companion.virtual.flags.vdm_custom_home") public boolean isHomeSupported(); + } + + public static final class VirtualDisplayConfig.Builder { + method @FlaggedApi("android.companion.virtual.flags.vdm_custom_home") @NonNull public android.hardware.display.VirtualDisplayConfig.Builder setHomeSupported(boolean); + } + } package android.hardware.hdmi { @@ -14837,6 +14845,7 @@ package android.telephony.data { method @Deprecated public int getMtu(); method public int getMtuV4(); method public int getMtuV6(); + method @FlaggedApi("com.android.internal.telephony.flags.network_validation") public int getNetworkValidationStatus(); method @NonNull public java.util.List<java.net.InetAddress> getPcscfAddresses(); method public int getPduSessionId(); method public int getProtocolType(); @@ -14873,6 +14882,7 @@ package android.telephony.data { method @Deprecated @NonNull public android.telephony.data.DataCallResponse.Builder setMtu(int); method @NonNull public android.telephony.data.DataCallResponse.Builder setMtuV4(int); method @NonNull public android.telephony.data.DataCallResponse.Builder setMtuV6(int); + method @FlaggedApi("com.android.internal.telephony.flags.network_validation") @NonNull public android.telephony.data.DataCallResponse.Builder setNetworkValidationStatus(int); method @NonNull public android.telephony.data.DataCallResponse.Builder setPcscfAddresses(@NonNull java.util.List<java.net.InetAddress>); method @NonNull public android.telephony.data.DataCallResponse.Builder setPduSessionId(@IntRange(from=android.telephony.data.DataCallResponse.PDU_SESSION_ID_NOT_SET, to=15) int); method @NonNull public android.telephony.data.DataCallResponse.Builder setProtocolType(int); @@ -14952,6 +14962,7 @@ package android.telephony.data { method public final void notifyDataCallListChanged(java.util.List<android.telephony.data.DataCallResponse>); method public final void notifyDataProfileUnthrottled(@NonNull android.telephony.data.DataProfile); method public void requestDataCallList(@NonNull android.telephony.data.DataServiceCallback); + method @FlaggedApi("com.android.internal.telephony.flags.network_validation") public void requestValidation(int, @NonNull java.util.concurrent.Executor, @NonNull java.util.function.Consumer<java.lang.Integer>); method public void setDataProfile(@NonNull java.util.List<android.telephony.data.DataProfile>, boolean, @NonNull android.telephony.data.DataServiceCallback); method public void setInitialAttachApn(@NonNull android.telephony.data.DataProfile, boolean, @NonNull android.telephony.data.DataServiceCallback); method public void setupDataCall(int, @NonNull android.telephony.data.DataProfile, boolean, boolean, int, @Nullable android.net.LinkProperties, @NonNull android.telephony.data.DataServiceCallback); @@ -15013,6 +15024,7 @@ package android.telephony.data { method public final int getSlotIndex(); method public void reportEmergencyDataNetworkPreferredTransportChanged(int); method public void reportThrottleStatusChanged(@NonNull java.util.List<android.telephony.data.ThrottleStatus>); + method @FlaggedApi("com.android.internal.telephony.flags.network_validation") public void requestNetworkValidation(int, @NonNull java.util.concurrent.Executor, @NonNull java.util.function.Consumer<java.lang.Integer>); method public final void updateQualifiedNetworkTypes(int, @NonNull java.util.List<java.lang.Integer>); } diff --git a/core/api/test-current.txt b/core/api/test-current.txt index 75797edfb218..93932e4944ad 100644 --- a/core/api/test-current.txt +++ b/core/api/test-current.txt @@ -3603,6 +3603,8 @@ package android.view.accessibility { public final class AccessibilityManager { method @NonNull @RequiresPermission(android.Manifest.permission.MANAGE_ACCESSIBILITY) public java.util.List<java.lang.String> getAccessibilityShortcutTargets(int); method public boolean hasAnyDirectConnection(); + method @FlaggedApi("android.view.accessibility.flash_notification_system_api") public boolean startFlashNotificationSequence(@NonNull android.content.Context, int); + method @FlaggedApi("android.view.accessibility.flash_notification_system_api") public boolean stopFlashNotificationSequence(@NonNull android.content.Context); } public class AccessibilityNodeInfo implements android.os.Parcelable { diff --git a/core/java/android/app/Activity.java b/core/java/android/app/Activity.java index ed18d81d7914..bb335fae887b 100644 --- a/core/java/android/app/Activity.java +++ b/core/java/android/app/Activity.java @@ -6352,6 +6352,10 @@ public class Activity extends ContextThemeWrapper */ public boolean startActivityIfNeeded(@RequiresPermission @NonNull Intent intent, int requestCode, @Nullable Bundle options) { + if (Instrumentation.DEBUG_START_ACTIVITY) { + Log.d("Instrumentation", "startActivity: intent=" + intent + + " requestCode=" + requestCode + " options=" + options, new Throwable()); + } if (mParent == null) { int result = ActivityManager.START_RETURN_INTENT_TO_CALLER; try { diff --git a/core/java/android/app/ActivityOptions.java b/core/java/android/app/ActivityOptions.java index 26f1c4b146a5..9c279c3b8254 100644 --- a/core/java/android/app/ActivityOptions.java +++ b/core/java/android/app/ActivityOptions.java @@ -2563,11 +2563,14 @@ public class ActivityOptions extends ComponentOptions { public static final int TYPE_LOCKSCREEN = 3; /** Launched from recents gesture handler. */ public static final int TYPE_RECENTS_ANIMATION = 4; + /** Launched from desktop's transition handler. */ + public static final int TYPE_DESKTOP_ANIMATION = 5; @IntDef(prefix = { "TYPE_" }, value = { TYPE_LAUNCHER, TYPE_NOTIFICATION, TYPE_LOCKSCREEN, + TYPE_DESKTOP_ANIMATION }) @Retention(RetentionPolicy.SOURCE) public @interface SourceType {} diff --git a/core/java/android/app/Instrumentation.java b/core/java/android/app/Instrumentation.java index 357ee0a89697..2162e3a77f15 100644 --- a/core/java/android/app/Instrumentation.java +++ b/core/java/android/app/Instrumentation.java @@ -43,6 +43,7 @@ import android.os.Process; import android.os.RemoteException; import android.os.ServiceManager; import android.os.SystemClock; +import android.os.SystemProperties; import android.os.TestLooperManager; import android.os.UserHandle; import android.os.UserManager; @@ -67,6 +68,7 @@ import java.lang.annotation.RetentionPolicy; import java.util.ArrayList; import java.util.List; import java.util.Objects; +import java.util.StringJoiner; import java.util.concurrent.TimeoutException; /** @@ -100,6 +102,10 @@ public class Instrumentation { private static final boolean VERBOSE = Log.isLoggable(TAG, Log.VERBOSE); + // If set, will print the stack trace for activity starts within the process + static final boolean DEBUG_START_ACTIVITY = Build.IS_DEBUGGABLE && + SystemProperties.getBoolean("persist.wm.debug.start_activity", false); + /** * @hide */ @@ -577,6 +583,9 @@ public class Instrumentation { */ @NonNull public Activity startActivitySync(@NonNull Intent intent, @Nullable Bundle options) { + if (DEBUG_START_ACTIVITY) { + Log.d(TAG, "startActivity: intent=" + intent + " options=" + options, new Throwable()); + } validateNotAppThread(); final Activity activity; @@ -1891,6 +1900,10 @@ public class Instrumentation { public ActivityResult execStartActivity( Context who, IBinder contextThread, IBinder token, Activity target, Intent intent, int requestCode, Bundle options) { + if (DEBUG_START_ACTIVITY) { + Log.d(TAG, "startActivity: who=" + who + " source=" + target + " intent=" + intent + + " requestCode=" + requestCode + " options=" + options, new Throwable()); + } Objects.requireNonNull(intent); IApplicationThread whoThread = (IApplicationThread) contextThread; Uri referrer = target != null ? target.onProvideReferrer() : null; @@ -1971,6 +1984,14 @@ public class Instrumentation { public int execStartActivitiesAsUser(Context who, IBinder contextThread, IBinder token, Activity target, Intent[] intents, Bundle options, int userId) { + if (DEBUG_START_ACTIVITY) { + StringJoiner joiner = new StringJoiner(", "); + for (Intent i : intents) { + joiner.add(i.toString()); + } + Log.d(TAG, "startActivities: who=" + who + " source=" + target + " userId=" + userId + + " intents=[" + joiner + "] options=" + options, new Throwable()); + } Objects.requireNonNull(intents); for (int i = intents.length - 1; i >= 0; i--) { Objects.requireNonNull(intents[i]); @@ -2055,6 +2076,11 @@ public class Instrumentation { public ActivityResult execStartActivity( Context who, IBinder contextThread, IBinder token, String target, Intent intent, int requestCode, Bundle options) { + if (DEBUG_START_ACTIVITY) { + Log.d(TAG, "startActivity: who=" + who + " target=" + target + + " intent=" + intent + " requestCode=" + requestCode + + " options=" + options, new Throwable()); + } Objects.requireNonNull(intent); IApplicationThread whoThread = (IApplicationThread) contextThread; if (isSdkSandboxAllowedToStartActivities()) { @@ -2130,6 +2156,11 @@ public class Instrumentation { public ActivityResult execStartActivity( Context who, IBinder contextThread, IBinder token, String resultWho, Intent intent, int requestCode, Bundle options, UserHandle user) { + if (DEBUG_START_ACTIVITY) { + Log.d(TAG, "startActivity: who=" + who + " user=" + user + " intent=" + intent + + " requestCode=" + requestCode + " resultWho=" + resultWho + + " options=" + options, new Throwable()); + } Objects.requireNonNull(intent); IApplicationThread whoThread = (IApplicationThread) contextThread; if (isSdkSandboxAllowedToStartActivities()) { @@ -2184,6 +2215,12 @@ public class Instrumentation { Context who, IBinder contextThread, IBinder token, Activity target, Intent intent, int requestCode, Bundle options, boolean ignoreTargetSecurity, int userId) { + if (DEBUG_START_ACTIVITY) { + Log.d(TAG, "startActivity: who=" + who + " source=" + target + " userId=" + userId + + " intent=" + intent + " requestCode=" + requestCode + + " ignoreTargetSecurity=" + ignoreTargetSecurity + " options=" + options, + new Throwable()); + } Objects.requireNonNull(intent); IApplicationThread whoThread = (IApplicationThread) contextThread; if (isSdkSandboxAllowedToStartActivities()) { @@ -2239,6 +2276,10 @@ public class Instrumentation { public void execStartActivityFromAppTask( Context who, IBinder contextThread, IAppTask appTask, Intent intent, Bundle options) { + if (DEBUG_START_ACTIVITY) { + Log.d(TAG, "startActivity: who=" + who + " intent=" + intent + + " options=" + options, new Throwable()); + } Objects.requireNonNull(intent); IApplicationThread whoThread = (IApplicationThread) contextThread; if (isSdkSandboxAllowedToStartActivities()) { diff --git a/core/java/android/app/admin/DevicePolicyManager.java b/core/java/android/app/admin/DevicePolicyManager.java index 3ee9d69229eb..fc3a906ced1d 100644 --- a/core/java/android/app/admin/DevicePolicyManager.java +++ b/core/java/android/app/admin/DevicePolicyManager.java @@ -17164,6 +17164,7 @@ public class DevicePolicyManager { * * @hide */ + @UnsupportedAppUsage public boolean isOnboardingBugreportV2FlagEnabled() { return onboardingBugreportV2Enabled(); } diff --git a/core/java/android/app/backup/BackupAgent.java b/core/java/android/app/backup/BackupAgent.java index 0b8d1dfccc07..6b558d07c059 100644 --- a/core/java/android/app/backup/BackupAgent.java +++ b/core/java/android/app/backup/BackupAgent.java @@ -184,6 +184,14 @@ public abstract class BackupAgent extends ContextWrapper { public static final int FLAG_DEVICE_TO_DEVICE_TRANSFER = 2; /** + * Flag for {@link RestoreSet#backupTransportFlags} to indicate if restore should be skipped + * for apps that have already been launched. + * + * @hide + */ + public static final int FLAG_SKIP_RESTORE_FOR_LAUNCHED_APPS = 1 << 2; + + /** * Flag for {@link BackupDataOutput#getTransportFlags()} and * {@link FullBackupDataOutput#getTransportFlags()} only. * diff --git a/core/java/android/appwidget/flags.aconfig b/core/java/android/appwidget/flags.aconfig new file mode 100644 index 000000000000..6a735a418b58 --- /dev/null +++ b/core/java/android/appwidget/flags.aconfig @@ -0,0 +1,8 @@ +package: "android.appwidget.flags" + +flag { + name: "generated_previews" + namespace: "app_widgets" + description: "Enable support for generated previews in AppWidgetManager" + bug: "306546610" +} diff --git a/core/java/android/companion/virtual/VirtualDeviceInternal.java b/core/java/android/companion/virtual/VirtualDeviceInternal.java index f6a7d2a465fb..da8277c24f6c 100644 --- a/core/java/android/companion/virtual/VirtualDeviceInternal.java +++ b/core/java/android/companion/virtual/VirtualDeviceInternal.java @@ -271,7 +271,7 @@ public class VirtualDeviceInternal { final IBinder token = new Binder( "android.hardware.input.VirtualDpad:" + config.getInputDeviceName()); mVirtualDevice.createVirtualDpad(config, token); - return new VirtualDpad(mVirtualDevice, token); + return new VirtualDpad(config, mVirtualDevice, token); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } @@ -283,7 +283,7 @@ public class VirtualDeviceInternal { final IBinder token = new Binder( "android.hardware.input.VirtualKeyboard:" + config.getInputDeviceName()); mVirtualDevice.createVirtualKeyboard(config, token); - return new VirtualKeyboard(mVirtualDevice, token); + return new VirtualKeyboard(config, mVirtualDevice, token); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } @@ -295,7 +295,7 @@ public class VirtualDeviceInternal { final IBinder token = new Binder( "android.hardware.input.VirtualMouse:" + config.getInputDeviceName()); mVirtualDevice.createVirtualMouse(config, token); - return new VirtualMouse(mVirtualDevice, token); + return new VirtualMouse(config, mVirtualDevice, token); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } @@ -308,7 +308,7 @@ public class VirtualDeviceInternal { final IBinder token = new Binder( "android.hardware.input.VirtualTouchscreen:" + config.getInputDeviceName()); mVirtualDevice.createVirtualTouchscreen(config, token); - return new VirtualTouchscreen(mVirtualDevice, token); + return new VirtualTouchscreen(config, mVirtualDevice, token); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } @@ -322,7 +322,7 @@ public class VirtualDeviceInternal { "android.hardware.input.VirtualNavigationTouchpad:" + config.getInputDeviceName()); mVirtualDevice.createVirtualNavigationTouchpad(config, token); - return new VirtualNavigationTouchpad(mVirtualDevice, token); + return new VirtualNavigationTouchpad(config, mVirtualDevice, token); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } diff --git a/core/java/android/companion/virtual/VirtualDeviceParams.java b/core/java/android/companion/virtual/VirtualDeviceParams.java index 97a7aa4a3bea..0d73e44f5197 100644 --- a/core/java/android/companion/virtual/VirtualDeviceParams.java +++ b/core/java/android/companion/virtual/VirtualDeviceParams.java @@ -37,6 +37,7 @@ import android.companion.virtual.sensor.VirtualSensorConfig; import android.companion.virtual.sensor.VirtualSensorDirectChannelCallback; import android.content.ComponentName; import android.content.Context; +import android.hardware.display.VirtualDisplayConfig; import android.os.Parcel; import android.os.Parcelable; import android.os.SharedMemory; @@ -326,8 +327,8 @@ public final class VirtualDeviceParams implements Parcelable { * support home activities. * * @see Builder#setHomeComponent + * @see VirtualDisplayConfig#isHomeSupported() */ - // TODO(b/297168328): Link to the relevant API for creating displays with home support. @FlaggedApi(Flags.FLAG_VDM_CUSTOM_HOME) @Nullable public ComponentName getHomeComponent() { @@ -737,8 +738,9 @@ public final class VirtualDeviceParams implements Parcelable { * * @param homeComponent The component name to be used as home. If unset, then the system- * default secondary home activity will be used. + * + * @see VirtualDisplayConfig#isHomeSupported() */ - // TODO(b/297168328): Link to the relevant API for creating displays with home support. @FlaggedApi(Flags.FLAG_VDM_CUSTOM_HOME) @NonNull public Builder setHomeComponent(@Nullable ComponentName homeComponent) { diff --git a/core/java/android/content/ClipData.java b/core/java/android/content/ClipData.java index 0bc459a19e7d..67759f4aa76d 100644 --- a/core/java/android/content/ClipData.java +++ b/core/java/android/content/ClipData.java @@ -163,6 +163,7 @@ import java.util.List; * into an editor), then {@link Item#coerceToText(Context)} will ask the content * provider for the clip URI as text and successfully paste the entire note. */ +@android.ravenwood.annotation.RavenwoodKeepWholeClass public class ClipData implements Parcelable { static final String[] MIMETYPES_TEXT_PLAIN = new String[] { ClipDescription.MIMETYPE_TEXT_PLAIN }; @@ -387,6 +388,7 @@ public class ClipData implements Parcelable { * @return Returns the item's textual representation. */ //BEGIN_INCLUDE(coerceToText) + @android.ravenwood.annotation.RavenwoodThrow public CharSequence coerceToText(Context context) { // If this Item has an explicit textual value, simply return that. CharSequence text = getText(); @@ -470,6 +472,7 @@ public class ClipData implements Parcelable { * and other things can be retrieved. * @return Returns the item's textual representation. */ + @android.ravenwood.annotation.RavenwoodThrow public CharSequence coerceToStyledText(Context context) { CharSequence text = getText(); if (text instanceof Spanned) { @@ -520,6 +523,7 @@ public class ClipData implements Parcelable { * and other things can be retrieved. * @return Returns the item's representation as HTML text. */ + @android.ravenwood.annotation.RavenwoodThrow public String coerceToHtmlText(Context context) { // If the item has an explicit HTML value, simply return that. String htmlText = getHtmlText(); @@ -540,6 +544,7 @@ public class ClipData implements Parcelable { return text != null ? text.toString() : null; } + @android.ravenwood.annotation.RavenwoodThrow private CharSequence coerceToHtmlOrStyledText(Context context, boolean styled) { // If this Item has a URI value, try using that. if (mUri != null) { @@ -1030,6 +1035,7 @@ public class ClipData implements Parcelable { * * @hide */ + @android.ravenwood.annotation.RavenwoodThrow public void prepareToLeaveProcess(boolean leavingPackage) { // Assume that callers are going to be granting permissions prepareToLeaveProcess(leavingPackage, Intent.FLAG_GRANT_READ_URI_PERMISSION); @@ -1040,6 +1046,7 @@ public class ClipData implements Parcelable { * * @hide */ + @android.ravenwood.annotation.RavenwoodThrow public void prepareToLeaveProcess(boolean leavingPackage, int intentFlags) { final int size = mItems.size(); for (int i = 0; i < size; i++) { @@ -1060,6 +1067,7 @@ public class ClipData implements Parcelable { } /** {@hide} */ + @android.ravenwood.annotation.RavenwoodThrow public void prepareToEnterProcess(AttributionSource source) { final int size = mItems.size(); for (int i = 0; i < size; i++) { @@ -1073,6 +1081,7 @@ public class ClipData implements Parcelable { } /** @hide */ + @android.ravenwood.annotation.RavenwoodThrow public void fixUris(int contentUserHint) { final int size = mItems.size(); for (int i = 0; i < size; i++) { @@ -1090,6 +1099,7 @@ public class ClipData implements Parcelable { * Only fixing the data field of the intents * @hide */ + @android.ravenwood.annotation.RavenwoodThrow public void fixUrisLight(int contentUserHint) { final int size = mItems.size(); for (int i = 0; i < size; i++) { diff --git a/core/java/android/content/ClipDescription.java b/core/java/android/content/ClipDescription.java index de2ba44ca393..5953890ad85f 100644 --- a/core/java/android/content/ClipDescription.java +++ b/core/java/android/content/ClipDescription.java @@ -48,6 +48,7 @@ import java.util.Map; * developer guide.</p> * </div> */ +@android.ravenwood.annotation.RavenwoodKeepWholeClass public class ClipDescription implements Parcelable { /** * The MIME type for a clip holding plain text. diff --git a/core/java/android/content/ComponentName.java b/core/java/android/content/ComponentName.java index f12e971afb1f..a6a6bccbb4b5 100644 --- a/core/java/android/content/ComponentName.java +++ b/core/java/android/content/ComponentName.java @@ -37,6 +37,7 @@ import java.io.PrintWriter; * name inside of that package. * */ +@android.ravenwood.annotation.RavenwoodKeepWholeClass public final class ComponentName implements Parcelable, Cloneable, Comparable<ComponentName> { private final String mPackage; private final String mClass; diff --git a/core/java/android/content/ContentUris.java b/core/java/android/content/ContentUris.java index 767d3f668313..093faff654ec 100644 --- a/core/java/android/content/ContentUris.java +++ b/core/java/android/content/ContentUris.java @@ -70,6 +70,7 @@ import java.util.List; *</dl> * */ +@android.ravenwood.annotation.RavenwoodKeepWholeClass public class ContentUris { /** diff --git a/core/java/android/content/ContentValues.java b/core/java/android/content/ContentValues.java index 02a5ba13f2aa..bde2f3e9a707 100644 --- a/core/java/android/content/ContentValues.java +++ b/core/java/android/content/ContentValues.java @@ -35,6 +35,7 @@ import java.util.Set; * This class is used to store a set of values that the {@link ContentResolver} * can process. */ +@android.ravenwood.annotation.RavenwoodKeepWholeClass public final class ContentValues implements Parcelable { public static final String TAG = "ContentValues"; diff --git a/core/java/android/content/Context.java b/core/java/android/content/Context.java index 1c917ee335af..1c6c7b5baa58 100644 --- a/core/java/android/content/Context.java +++ b/core/java/android/content/Context.java @@ -7560,7 +7560,7 @@ public abstract class Context { * @throws UnsupportedOperationException if the method is called on an instance that is not * associated with any display. */ - @Nullable + @NonNull public Display getDisplay() { throw new RuntimeException("Not implemented. Must override in a subclass."); } diff --git a/core/java/android/content/Intent.java b/core/java/android/content/Intent.java index ea54c912d4b9..665ba1119550 100644 --- a/core/java/android/content/Intent.java +++ b/core/java/android/content/Intent.java @@ -660,6 +660,7 @@ import java.util.TimeZone; * {@link #setFlags} and {@link #addFlags}. See {@link #setFlags} for a list * of all possible flags. */ +@android.ravenwood.annotation.RavenwoodKeepWholeClass public class Intent implements Parcelable, Cloneable { private static final String TAG = "Intent"; @@ -2800,6 +2801,12 @@ public class Intent implements Parcelable, Cloneable { /** * Broadcast Action: An application package that was previously in the stopped state has been * started and is no longer considered stopped. + * <p>When a package is force-stopped, the {@link #ACTION_PACKAGE_RESTARTED} broadcast is sent + * and the package in the stopped state cannot self-start for any reason unless there's an + * explicit request to start a component in the package. The {@link #ACTION_PACKAGE_UNSTOPPED} + * broadcast is sent when such an explicit process start occurs and the package is taken + * out of the stopped state. + * </p> * <ul> * <li> {@link #EXTRA_UID} containing the integer uid assigned to the package. * <li> {@link #EXTRA_TIME} containing the {@link SystemClock#elapsedRealtime() @@ -2807,6 +2814,9 @@ public class Intent implements Parcelable, Cloneable { * </ul> * * <p class="note">This is a protected intent that can only be sent by the system. + * + * @see ApplicationInfo#FLAG_STOPPED + * @see #ACTION_PACKAGE_RESTARTED */ @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION) @FlaggedApi(android.content.pm.Flags.FLAG_STAY_STOPPED) @@ -12171,6 +12181,7 @@ public class Intent implements Parcelable, Cloneable { * * @hide */ + @android.ravenwood.annotation.RavenwoodThrow @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) public void prepareToLeaveProcess(Context context) { final boolean leavingPackage; @@ -12192,6 +12203,7 @@ public class Intent implements Parcelable, Cloneable { * * @hide */ + @android.ravenwood.annotation.RavenwoodThrow public void prepareToLeaveProcess(boolean leavingPackage) { setAllowFds(false); @@ -12287,6 +12299,7 @@ public class Intent implements Parcelable, Cloneable { /** * @hide */ + @android.ravenwood.annotation.RavenwoodThrow public void prepareToEnterProcess(boolean fromProtectedComponent, AttributionSource source) { if (fromProtectedComponent) { prepareToEnterProcess(LOCAL_FLAG_FROM_PROTECTED_COMPONENT, source); @@ -12298,6 +12311,7 @@ public class Intent implements Parcelable, Cloneable { /** * @hide */ + @android.ravenwood.annotation.RavenwoodThrow public void prepareToEnterProcess(int localFlags, AttributionSource source) { // We just entered destination process, so we should be able to read all // parcelables inside. @@ -12369,6 +12383,7 @@ public class Intent implements Parcelable, Cloneable { /** * @hide */ + @android.ravenwood.annotation.RavenwoodThrow public void fixUris(int contentUserHint) { Uri data = getData(); if (data != null) { @@ -12408,6 +12423,7 @@ public class Intent implements Parcelable, Cloneable { * @return Whether any contents were migrated. * @hide */ + @android.ravenwood.annotation.RavenwoodThrow public boolean migrateExtraStreamToClipData() { return migrateExtraStreamToClipData(AppGlobals.getInitialApplication()); } @@ -12421,6 +12437,7 @@ public class Intent implements Parcelable, Cloneable { * @return Whether any contents were migrated. * @hide */ + @android.ravenwood.annotation.RavenwoodThrow public boolean migrateExtraStreamToClipData(Context context) { // Refuse to touch if extras already parcelled if (mExtras != null && mExtras.isParcelled()) return false; @@ -12536,6 +12553,7 @@ public class Intent implements Parcelable, Cloneable { return false; } + @android.ravenwood.annotation.RavenwoodThrow private Uri maybeConvertFileToContentUri(Context context, Uri uri) { if (ContentResolver.SCHEME_FILE.equals(uri.getScheme()) && context.getApplicationInfo().targetSdkVersion < Build.VERSION_CODES.R) { @@ -12589,6 +12607,7 @@ public class Intent implements Parcelable, Cloneable { // TODO(b/299109198): Refactor into the {@link SdkSandboxManagerLocal} /** @hide */ + @android.ravenwood.annotation.RavenwoodThrow public boolean isSandboxActivity(@NonNull Context context) { if (mAction != null && mAction.equals(ACTION_START_SANDBOXED_ACTIVITY)) { return true; diff --git a/core/java/android/content/IntentFilter.java b/core/java/android/content/IntentFilter.java index f946754bd9a1..ad3acd713c6b 100644 --- a/core/java/android/content/IntentFilter.java +++ b/core/java/android/content/IntentFilter.java @@ -152,6 +152,7 @@ import java.util.function.Predicate; * that unlike the action, an IntentFilter with no categories * will only match an Intent that does not have any categories. */ +@android.ravenwood.annotation.RavenwoodKeepWholeClass public class IntentFilter implements Parcelable { private static final String TAG = "IntentFilter"; diff --git a/core/java/android/content/TEST_MAPPING b/core/java/android/content/TEST_MAPPING index addede4cc60c..a2cfbf5aa5bd 100644 --- a/core/java/android/content/TEST_MAPPING +++ b/core/java/android/content/TEST_MAPPING @@ -57,5 +57,11 @@ ], "file_patterns": ["(/|^)Context.java", "(/|^)ContextWrapper.java"] } + ], + "ravenwood-presubmit": [ + { + "name": "CtsContentTestCasesRavenwood", + "host": true + } ] -}
\ No newline at end of file +} diff --git a/core/java/android/content/UriMatcher.java b/core/java/android/content/UriMatcher.java index 7fa48f0e9a78..4422ade7ec0a 100644 --- a/core/java/android/content/UriMatcher.java +++ b/core/java/android/content/UriMatcher.java @@ -119,6 +119,7 @@ instead of: } </pre> */ +@android.ravenwood.annotation.RavenwoodKeepWholeClass public class UriMatcher { public static final int NO_MATCH = -1; diff --git a/core/java/android/content/pm/Checksum.java b/core/java/android/content/pm/Checksum.java index 20967274d0e4..072ffd797f7d 100644 --- a/core/java/android/content/pm/Checksum.java +++ b/core/java/android/content/pm/Checksum.java @@ -139,6 +139,13 @@ public final class Checksum implements Parcelable { public @interface TypeMask {} /** + * Max size of checksum in bytes. + * sizeof(SHA512) == 64 bytes + * @hide + */ + public static final int MAX_CHECKSUM_SIZE_BYTES = 64; + + /** * Serialize checksum to the stream in binary format. * @hide */ @@ -276,10 +283,10 @@ public final class Checksum implements Parcelable { }; @DataClass.Generated( - time = 1619810358402L, + time = 1700002689652L, codegenVersion = "1.0.23", sourceFile = "frameworks/base/core/java/android/content/pm/Checksum.java", - inputSignatures = "public static final int TYPE_WHOLE_MERKLE_ROOT_4K_SHA256\npublic static final @java.lang.Deprecated int TYPE_WHOLE_MD5\npublic static final @java.lang.Deprecated int TYPE_WHOLE_SHA1\npublic static final @java.lang.Deprecated int TYPE_WHOLE_SHA256\npublic static final @java.lang.Deprecated int TYPE_WHOLE_SHA512\npublic static final int TYPE_PARTIAL_MERKLE_ROOT_1M_SHA256\npublic static final int TYPE_PARTIAL_MERKLE_ROOT_1M_SHA512\nprivate final @android.content.pm.Checksum.Type int mType\nprivate final @android.annotation.NonNull byte[] mValue\npublic static void writeToStream(java.io.DataOutputStream,android.content.pm.Checksum)\npublic static @android.annotation.NonNull android.content.pm.Checksum readFromStream(java.io.DataInputStream)\nclass Checksum extends java.lang.Object implements [android.os.Parcelable]\n@com.android.internal.util.DataClass(genConstDefs=false)") + inputSignatures = "public static final int TYPE_WHOLE_MERKLE_ROOT_4K_SHA256\npublic static final @java.lang.Deprecated int TYPE_WHOLE_MD5\npublic static final @java.lang.Deprecated int TYPE_WHOLE_SHA1\npublic static final @java.lang.Deprecated int TYPE_WHOLE_SHA256\npublic static final @java.lang.Deprecated int TYPE_WHOLE_SHA512\npublic static final int TYPE_PARTIAL_MERKLE_ROOT_1M_SHA256\npublic static final int TYPE_PARTIAL_MERKLE_ROOT_1M_SHA512\npublic static final int MAX_CHECKSUM_SIZE_BYTES\nprivate final @android.content.pm.Checksum.Type int mType\nprivate final @android.annotation.NonNull byte[] mValue\npublic static void writeToStream(java.io.DataOutputStream,android.content.pm.Checksum)\npublic static @android.annotation.NonNull android.content.pm.Checksum readFromStream(java.io.DataInputStream)\nclass Checksum extends java.lang.Object implements [android.os.Parcelable]\n@com.android.internal.util.DataClass(genConstDefs=false)") @Deprecated private void __metadata() {} diff --git a/core/java/android/content/pm/LauncherActivityInfo.java b/core/java/android/content/pm/LauncherActivityInfo.java index a4d532712cfe..cb3455b266cd 100644 --- a/core/java/android/content/pm/LauncherActivityInfo.java +++ b/core/java/android/content/pm/LauncherActivityInfo.java @@ -22,11 +22,18 @@ import android.content.ComponentName; import android.content.Context; import android.content.pm.PackageManager.NameNotFoundException; import android.content.res.Resources; +import android.graphics.Paint; import android.graphics.drawable.Drawable; +import android.icu.text.UnicodeSet; import android.os.UserHandle; import android.os.UserManager; +import android.text.TextUtils; import android.util.DisplayMetrics; +import com.android.internal.annotations.VisibleForTesting; + +import java.util.Objects; + /** * A representation of an activity that can belong to this user or a managed * profile associated with this user. It can be used to query the label, icon @@ -36,6 +43,10 @@ public class LauncherActivityInfo { private final PackageManager mPm; private final LauncherActivityInfoInternal mInternal; + private static final UnicodeSet TRIMMABLE_CHARACTERS = + new UnicodeSet("[[:White_Space:][:Default_Ignorable_Code_Point:][:gc=Cc:]]", + /* ignoreWhitespace= */ false).freeze(); + /** * Create a launchable activity object for a given ResolveInfo and user. * @@ -77,8 +88,22 @@ public class LauncherActivityInfo { * @return The label for the activity. */ public CharSequence getLabel() { + if (!Flags.lightweightInvisibleLabelDetection()) { + // TODO: Go through LauncherAppsService + return getActivityInfo().loadLabel(mPm); + } + + CharSequence label = trim(getActivityInfo().loadLabel(mPm)); + // If the trimmed label is empty, use application's label instead + if (TextUtils.isEmpty(label)) { + label = trim(getApplicationInfo().loadLabel(mPm)); + // If the trimmed label is still empty, use package name instead + if (TextUtils.isEmpty(label)) { + label = getComponentName().getPackageName(); + } + } // TODO: Go through LauncherAppsService - return getActivityInfo().loadLabel(mPm); + return label; } /** @@ -180,4 +205,149 @@ public class LauncherActivityInfo { return mPm.getUserBadgedIcon(originalIcon, mInternal.getUser()); } + + /** + * If the {@code ch} is trimmable, return {@code true}. Otherwise, return + * {@code false}. If the count of the code points of {@code ch} doesn't + * equal 1, return {@code false}. + * <p> + * There are two types of the trimmable characters. + * 1. The character is one of the Default_Ignorable_Code_Point in + * <a href=" + * https://www.unicode.org/Public/UCD/latest/ucd/DerivedCoreProperties.txt"> + * DerivedCoreProperties.txt</a>, the White_Space in <a href= + * "https://www.unicode.org/Public/UCD/latest/ucd/PropList.txt">PropList.txt + * </a> or category Cc. + * <p> + * 2. The character is not supported in the current system font. + * {@link android.graphics.Paint#hasGlyph(String)} + * <p> + * + */ + private static boolean isTrimmable(@NonNull Paint paint, @NonNull CharSequence ch) { + Objects.requireNonNull(paint); + Objects.requireNonNull(ch); + + // if ch is empty or it is not a character (i,e, the count of code + // point doesn't equal one), return false + if (TextUtils.isEmpty(ch) + || Character.codePointCount(ch, /* beginIndex= */ 0, ch.length()) != 1) { + return false; + } + + // Return true for the cases as below: + // 1. The character is in the TRIMMABLE_CHARACTERS set + // 2. The character is not supported in the system font + return TRIMMABLE_CHARACTERS.contains(ch) || !paint.hasGlyph(ch.toString()); + } + + /** + * If the {@code sequence} has some leading trimmable characters, creates a new copy + * and removes the trimmable characters from the copy. Otherwise the given + * {@code sequence} is returned as it is. Use {@link #isTrimmable(Paint, CharSequence)} + * to determine whether the character is trimmable or not. + * + * @return the trimmed string or the original string that has no + * leading trimmable characters. + * @see #isTrimmable(Paint, CharSequence) + * @see #trim(CharSequence) + * @see #trimEnd(CharSequence) + * + * @hide + */ + @VisibleForTesting + @NonNull + public static CharSequence trimStart(@NonNull CharSequence sequence) { + Objects.requireNonNull(sequence); + + if (TextUtils.isEmpty(sequence)) { + return sequence; + } + + final Paint paint = new Paint(); + int trimCount = 0; + final int[] codePoints = sequence.codePoints().toArray(); + for (int i = 0, length = codePoints.length; i < length; i++) { + String ch = new String(new int[]{codePoints[i]}, /* offset= */ 0, /* count= */ 1); + if (!isTrimmable(paint, ch)) { + break; + } + trimCount += ch.length(); + } + if (trimCount == 0) { + return sequence; + } + return sequence.subSequence(trimCount, sequence.length()); + } + + /** + * If the {@code sequence} has some trailing trimmable characters, creates a new copy + * and removes the trimmable characters from the copy. Otherwise the given + * {@code sequence} is returned as it is. Use {@link #isTrimmable(Paint, CharSequence)} + * to determine whether the character is trimmable or not. + * + * @return the trimmed sequence or the original sequence that has no + * trailing trimmable characters. + * @see #isTrimmable(Paint, CharSequence) + * @see #trimStart(CharSequence) + * @see #trim(CharSequence) + * + * @hide + */ + @VisibleForTesting + @NonNull + public static CharSequence trimEnd(@NonNull CharSequence sequence) { + Objects.requireNonNull(sequence); + + if (TextUtils.isEmpty(sequence)) { + return sequence; + } + + final Paint paint = new Paint(); + int trimCount = 0; + final int[] codePoints = sequence.codePoints().toArray(); + for (int i = codePoints.length - 1; i >= 0; i--) { + String ch = new String(new int[]{codePoints[i]}, /* offset= */ 0, /* count= */ 1); + if (!isTrimmable(paint, ch)) { + break; + } + trimCount += ch.length(); + } + + if (trimCount == 0) { + return sequence; + } + return sequence.subSequence(0, sequence.length() - trimCount); + } + + /** + * If the {@code sequence} has some leading or trailing trimmable characters, creates + * a new copy and removes the trimmable characters from the copy. Otherwise the given + * {@code sequence} is returned as it is. Use {@link #isTrimmable(Paint, CharSequence)} + * to determine whether the character is trimmable or not. + * + * @return the trimmed sequence or the original sequence that has no leading or + * trailing trimmable characters. + * @see #isTrimmable(Paint, CharSequence) + * @see #trimStart(CharSequence) + * @see #trimEnd(CharSequence) + * + * @hide + */ + @VisibleForTesting + @NonNull + public static CharSequence trim(@NonNull CharSequence sequence) { + Objects.requireNonNull(sequence); + + if (TextUtils.isEmpty(sequence)) { + return sequence; + } + + CharSequence result = trimStart(sequence); + if (TextUtils.isEmpty(result)) { + return result; + } + + return trimEnd(result); + } } diff --git a/core/java/android/content/pm/PackageManager.java b/core/java/android/content/pm/PackageManager.java index 72e106639544..fe66759dc03f 100644 --- a/core/java/android/content/pm/PackageManager.java +++ b/core/java/android/content/pm/PackageManager.java @@ -4019,6 +4019,15 @@ public abstract class PackageManager { /** * Feature for {@link #getSystemAvailableFeatures} and + * {@link #hasSystemFeature}: The device supports multiple concurrent IME sessions. + */ + @FlaggedApi("android.view.inputmethod.concurrent_input_methods") + @SdkConstant(SdkConstantType.FEATURE) + public static final String FEATURE_CONCURRENT_INPUT_METHODS = + "android.software.concurrent_input_methods"; + + /** + * Feature for {@link #getSystemAvailableFeatures} and * {@link #hasSystemFeature}: The device supports device policy enforcement via device admins. */ @SdkConstant(SdkConstantType.FEATURE) @@ -9781,7 +9790,8 @@ public abstract class PackageManager { * launcher to support customization that they might need to handle the suspended state. * * <p>The caller must hold {@link Manifest.permission#SUSPEND_APPS} to use this API except for - * device owner and profile owner. + * device owner and profile owner or the {@link Manifest.permission#QUARANTINE_APPS} if the + * caller is using {@link #FLAG_SUSPEND_QUARANTINED}. * * @param packageNames The names of the packages to set the suspended status. * @param suspended If set to {@code true}, the packages will be suspended, if set to @@ -9809,7 +9819,10 @@ public abstract class PackageManager { */ @SystemApi @FlaggedApi(android.content.pm.Flags.FLAG_QUARANTINED_ENABLED) - @RequiresPermission(value=Manifest.permission.SUSPEND_APPS, conditional=true) + @RequiresPermission(anyOf = { + Manifest.permission.SUSPEND_APPS, + Manifest.permission.QUARANTINE_APPS + }, conditional = true) @SuppressLint("NullableCollection") @Nullable public String[] setPackagesSuspended(@Nullable String[] packageNames, boolean suspended, diff --git a/core/java/android/content/pm/UserProperties.java b/core/java/android/content/pm/UserProperties.java index 884d463e929d..f532c4cffcc4 100644 --- a/core/java/android/content/pm/UserProperties.java +++ b/core/java/android/content/pm/UserProperties.java @@ -62,6 +62,8 @@ public final class UserProperties implements Parcelable { "mediaSharedWithParent"; private static final String ATTR_CREDENTIAL_SHAREABLE_WITH_PARENT = "credentialShareableWithParent"; + private static final String ATTR_AUTH_ALWAYS_REQUIRED_TO_DISABLE_QUIET_MODE = + "authAlwaysRequiredToDisableQuietMode"; private static final String ATTR_DELETE_APP_WITH_PARENT = "deleteAppWithParent"; private static final String ATTR_ALWAYS_VISIBLE = "alwaysVisible"; @@ -80,6 +82,7 @@ public final class UserProperties implements Parcelable { INDEX_DELETE_APP_WITH_PARENT, INDEX_ALWAYS_VISIBLE, INDEX_HIDE_IN_SETTINGS_IN_QUIET_MODE, + INDEX_AUTH_ALWAYS_REQUIRED_TO_DISABLE_QUIET_MODE, }) @Retention(RetentionPolicy.SOURCE) private @interface PropertyIndex { @@ -97,6 +100,7 @@ public final class UserProperties implements Parcelable { private static final int INDEX_DELETE_APP_WITH_PARENT = 10; private static final int INDEX_ALWAYS_VISIBLE = 11; private static final int INDEX_HIDE_IN_SETTINGS_IN_QUIET_MODE = 12; + private static final int INDEX_AUTH_ALWAYS_REQUIRED_TO_DISABLE_QUIET_MODE = 13; /** A bit set, mapping each PropertyIndex to whether it is present (1) or absent (0). */ private long mPropertiesPresent = 0; @@ -329,6 +333,8 @@ public final class UserProperties implements Parcelable { setShowInSettings(orig.getShowInSettings()); setHideInSettingsInQuietMode(orig.getHideInSettingsInQuietMode()); setUseParentsContacts(orig.getUseParentsContacts()); + setAuthAlwaysRequiredToDisableQuietMode( + orig.isAuthAlwaysRequiredToDisableQuietMode()); } if (hasQueryOrManagePermission) { // Add items that require QUERY_USERS or stronger. @@ -611,6 +617,31 @@ public final class UserProperties implements Parcelable { } private boolean mCredentialShareableWithParent; + /** + * Returns whether the profile always requires user authentication to disable from quiet mode. + * + * <p> Settings this field to true will ensure that the credential confirmation activity is + * always shown whenever the user requests to disable quiet mode. The behavior of credential + * checks is not guaranteed when the property is false and may vary depending on user types. + * @hide + */ + public boolean isAuthAlwaysRequiredToDisableQuietMode() { + if (isPresent(INDEX_AUTH_ALWAYS_REQUIRED_TO_DISABLE_QUIET_MODE)) { + return mAuthAlwaysRequiredToDisableQuietMode; + } + if (mDefaultProperties != null) { + return mDefaultProperties.mAuthAlwaysRequiredToDisableQuietMode; + } + throw new SecurityException( + "You don't have permission to query authAlwaysRequiredToDisableQuietMode"); + } + /** @hide */ + public void setAuthAlwaysRequiredToDisableQuietMode(boolean val) { + this.mAuthAlwaysRequiredToDisableQuietMode = val; + setPresent(INDEX_AUTH_ALWAYS_REQUIRED_TO_DISABLE_QUIET_MODE); + } + private boolean mAuthAlwaysRequiredToDisableQuietMode; + /* Indicate if {@link com.android.server.pm.CrossProfileIntentFilter}s need to be updated during OTA update between user-parent @@ -693,6 +724,8 @@ public final class UserProperties implements Parcelable { + getCrossProfileIntentResolutionStrategy() + ", mMediaSharedWithParent=" + isMediaSharedWithParent() + ", mCredentialShareableWithParent=" + isCredentialShareableWithParent() + + ", mAuthAlwaysRequiredToDisableQuietMode=" + + isAuthAlwaysRequiredToDisableQuietMode() + ", mDeleteAppWithParent=" + getDeleteAppWithParent() + ", mAlwaysVisible=" + getAlwaysVisible() + "}"; @@ -720,6 +753,8 @@ public final class UserProperties implements Parcelable { pw.println(prefix + " mMediaSharedWithParent=" + isMediaSharedWithParent()); pw.println(prefix + " mCredentialShareableWithParent=" + isCredentialShareableWithParent()); + pw.println(prefix + " mAuthAlwaysRequiredToDisableQuietMode=" + + isAuthAlwaysRequiredToDisableQuietMode()); pw.println(prefix + " mDeleteAppWithParent=" + getDeleteAppWithParent()); pw.println(prefix + " mAlwaysVisible=" + getAlwaysVisible()); } @@ -788,6 +823,9 @@ public final class UserProperties implements Parcelable { case ATTR_CREDENTIAL_SHAREABLE_WITH_PARENT: setCredentialShareableWithParent(parser.getAttributeBoolean(i)); break; + case ATTR_AUTH_ALWAYS_REQUIRED_TO_DISABLE_QUIET_MODE: + setAuthAlwaysRequiredToDisableQuietMode(parser.getAttributeBoolean(i)); + break; case ATTR_DELETE_APP_WITH_PARENT: setDeleteAppWithParent(parser.getAttributeBoolean(i)); break; @@ -853,6 +891,10 @@ public final class UserProperties implements Parcelable { serializer.attributeBoolean(null, ATTR_CREDENTIAL_SHAREABLE_WITH_PARENT, mCredentialShareableWithParent); } + if (isPresent(INDEX_AUTH_ALWAYS_REQUIRED_TO_DISABLE_QUIET_MODE)) { + serializer.attributeBoolean(null, ATTR_AUTH_ALWAYS_REQUIRED_TO_DISABLE_QUIET_MODE, + mAuthAlwaysRequiredToDisableQuietMode); + } if (isPresent(INDEX_DELETE_APP_WITH_PARENT)) { serializer.attributeBoolean(null, ATTR_DELETE_APP_WITH_PARENT, mDeleteAppWithParent); @@ -878,6 +920,7 @@ public final class UserProperties implements Parcelable { dest.writeInt(mCrossProfileIntentResolutionStrategy); dest.writeBoolean(mMediaSharedWithParent); dest.writeBoolean(mCredentialShareableWithParent); + dest.writeBoolean(mAuthAlwaysRequiredToDisableQuietMode); dest.writeBoolean(mDeleteAppWithParent); dest.writeBoolean(mAlwaysVisible); } @@ -901,6 +944,7 @@ public final class UserProperties implements Parcelable { mCrossProfileIntentResolutionStrategy = source.readInt(); mMediaSharedWithParent = source.readBoolean(); mCredentialShareableWithParent = source.readBoolean(); + mAuthAlwaysRequiredToDisableQuietMode = source.readBoolean(); mDeleteAppWithParent = source.readBoolean(); mAlwaysVisible = source.readBoolean(); } @@ -941,6 +985,7 @@ public final class UserProperties implements Parcelable { CROSS_PROFILE_INTENT_RESOLUTION_STRATEGY_DEFAULT; private boolean mMediaSharedWithParent = false; private boolean mCredentialShareableWithParent = false; + private boolean mAuthAlwaysRequiredToDisableQuietMode = false; private boolean mDeleteAppWithParent = false; private boolean mAlwaysVisible = false; @@ -1010,6 +1055,14 @@ public final class UserProperties implements Parcelable { return this; } + /** Sets the value for {@link #mAuthAlwaysRequiredToDisableQuietMode} */ + public Builder setAuthAlwaysRequiredToDisableQuietMode( + boolean authAlwaysRequiredToDisableQuietMode) { + mAuthAlwaysRequiredToDisableQuietMode = + authAlwaysRequiredToDisableQuietMode; + return this; + } + /** Sets the value for {@link #mDeleteAppWithParent}*/ public Builder setDeleteAppWithParent(boolean deleteAppWithParent) { mDeleteAppWithParent = deleteAppWithParent; @@ -1036,6 +1089,7 @@ public final class UserProperties implements Parcelable { mCrossProfileIntentResolutionStrategy, mMediaSharedWithParent, mCredentialShareableWithParent, + mAuthAlwaysRequiredToDisableQuietMode, mDeleteAppWithParent, mAlwaysVisible); } @@ -1053,6 +1107,7 @@ public final class UserProperties implements Parcelable { @CrossProfileIntentResolutionStrategy int crossProfileIntentResolutionStrategy, boolean mediaSharedWithParent, boolean credentialShareableWithParent, + boolean authAlwaysRequiredToDisableQuietMode, boolean deleteAppWithParent, boolean alwaysVisible) { mDefaultProperties = null; @@ -1067,6 +1122,8 @@ public final class UserProperties implements Parcelable { setCrossProfileIntentResolutionStrategy(crossProfileIntentResolutionStrategy); setMediaSharedWithParent(mediaSharedWithParent); setCredentialShareableWithParent(credentialShareableWithParent); + setAuthAlwaysRequiredToDisableQuietMode( + authAlwaysRequiredToDisableQuietMode); setDeleteAppWithParent(deleteAppWithParent); setAlwaysVisible(alwaysVisible); } diff --git a/core/java/android/content/pm/flags.aconfig b/core/java/android/content/pm/flags.aconfig index 814eae6726a9..bb5fdb714761 100644 --- a/core/java/android/content/pm/flags.aconfig +++ b/core/java/android/content/pm/flags.aconfig @@ -80,3 +80,10 @@ flag { description: "Feature flag to retrieve resolved path of the base APK during an app install." bug: "269728874" } + +flag { + name: "lightweight_invisible_label_detection" + namespace: "package_manager_service" + description: "Feature flag to detect the invisible labels in Launcher Apps" + bug: "299586370" +} diff --git a/core/java/android/content/res/Element.java b/core/java/android/content/res/Element.java index 1667896930c2..38dbec5a5529 100644 --- a/core/java/android/content/res/Element.java +++ b/core/java/android/content/res/Element.java @@ -38,9 +38,11 @@ public class Element { private static final int MAX_ATTR_LEN_PERMISSION_GROUP = 256; private static final int MAX_ATTR_LEN_PACKAGE = 256; private static final int MAX_ATTR_LEN_MIMETYPE = 512; - public static final int MAX_ATTR_LEN_NAME = 1024; - public static final int MAX_ATTR_LEN_PATH = 4000; - public static final int MAX_ATTR_LEN_VALUE = 32_768; + private static final int MAX_ATTR_LEN_NAME = 1024; + private static final int MAX_ATTR_LEN_PATH = 4000; + private static final int MAX_ATTR_LEN_VALUE = 32_768; + + private static final int MAX_TOTAL_META_DATA_SIZE = 262_144; private static final String BAD_COMPONENT_NAME_CHARS = ";,[](){}:?%^*|/\\"; @@ -157,6 +159,7 @@ public class Element { } private long mChildTagMask = 0; + private int mTotalComponentMetadataSize = 0; private static int getCounterIdx(String tag) { switch(tag) { @@ -283,6 +286,7 @@ public class Element { private void init(String tag) { this.mTag = tag; mChildTagMask = 0; + mTotalComponentMetadataSize = 0; switch (tag) { case TAG_ACTIVITY: initializeCounter(TAG_LAYOUT, 1000); @@ -820,6 +824,12 @@ public class Element { } } + void validateComponentMetadata(String value) { + mTotalComponentMetadataSize += value.length(); + if (mTotalComponentMetadataSize > MAX_TOTAL_META_DATA_SIZE) { + throw new SecurityException("Max total meta data size limit exceeded for " + mTag); + } + } void seen(@NonNull Element element) { TagCounter counter = mTagCounters[getCounterIdx(element.mTag)]; diff --git a/core/java/android/content/res/Validator.java b/core/java/android/content/res/Validator.java index cae353b3bd5a..3b68452b1a5c 100644 --- a/core/java/android/content/res/Validator.java +++ b/core/java/android/content/res/Validator.java @@ -19,6 +19,8 @@ package android.content.res; import android.annotation.NonNull; import android.annotation.StyleableRes; +import com.android.internal.R; + import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlPullParserException; @@ -84,6 +86,9 @@ public class Validator { return; } mElements.peek().validateResStrAttr(index, stringValue); + if (index == R.styleable.AndroidManifestMetaData_value) { + validateComponentMetadata(stringValue.toString()); + } } /** @@ -94,5 +99,20 @@ public class Validator { return; } mElements.peek().validateStrAttr(attrName, attrValue); + if (attrName.equals(Element.TAG_ATTR_VALUE)) { + validateComponentMetadata(attrValue); + } + } + + private void validateComponentMetadata(String attrValue) { + Element element = mElements.peek(); + // Meta-data values are evaluated on the parent element which is the next element in the + // mElements stack after the meta-data element. The top of the stack is always the current + // element being validated so check that the top element is meta-data. + if (element.mTag.equals(Element.TAG_META_DATA) && mElements.size() > 1) { + element = mElements.pop(); + mElements.peek().validateComponentMetadata(attrValue); + mElements.push(element); + } } } diff --git a/core/java/android/credentials/flags.aconfig b/core/java/android/credentials/flags.aconfig index ec96215525d3..bab84aadc73b 100644 --- a/core/java/android/credentials/flags.aconfig +++ b/core/java/android/credentials/flags.aconfig @@ -20,3 +20,10 @@ flag { description: "Enables clearing of Credential Manager sessions when client process dies" bug: "308470501" } + +flag { + namespace: "credential_manager" + name: "new_settings_intents" + description: "Enables settings intents to redirect to new settings page" + bug: "307587989" +}
\ No newline at end of file diff --git a/core/java/android/database/AbstractCursor.java b/core/java/android/database/AbstractCursor.java index 69d573f84975..80f085f5b9fe 100644 --- a/core/java/android/database/AbstractCursor.java +++ b/core/java/android/database/AbstractCursor.java @@ -33,11 +33,11 @@ import java.util.List; import java.util.Map; import java.util.Objects; - /** * This is an abstract cursor class that handles a lot of the common code * that all cursors need to deal with and is provided for convenience reasons. */ +@android.ravenwood.annotation.RavenwoodKeepWholeClass public abstract class AbstractCursor implements CrossProcessCursor { private static final String TAG = "Cursor"; @@ -89,7 +89,7 @@ public abstract class AbstractCursor implements CrossProcessCursor { private Bundle mExtras = Bundle.EMPTY; /** CloseGuard to detect leaked cursor **/ - private final CloseGuard mCloseGuard = CloseGuard.get(); + private final CloseGuard mCloseGuard; /* -------------------------------------------------------- */ /* These need to be implemented by subclasses */ @@ -184,7 +184,9 @@ public abstract class AbstractCursor implements CrossProcessCursor { mClosed = true; mContentObservable.unregisterAll(); onDeactivateOrClose(); - mCloseGuard.close(); + if (mCloseGuard != null) { + mCloseGuard.close(); + } } /** @@ -224,7 +226,19 @@ public abstract class AbstractCursor implements CrossProcessCursor { /* Implementation */ public AbstractCursor() { mPos = -1; - mCloseGuard.open("AbstractCursor.close"); + mCloseGuard = initCloseGuard(); + if (mCloseGuard != null) { + mCloseGuard.open("AbstractCursor.close"); + } + } + + @android.ravenwood.annotation.RavenwoodReplace + private CloseGuard initCloseGuard() { + return CloseGuard.get(); + } + + private CloseGuard initCloseGuard$ravenwood() { + return null; } @Override diff --git a/core/java/android/database/CharArrayBuffer.java b/core/java/android/database/CharArrayBuffer.java index 73781b763c3d..4927654c38b9 100644 --- a/core/java/android/database/CharArrayBuffer.java +++ b/core/java/android/database/CharArrayBuffer.java @@ -19,6 +19,7 @@ package android.database; /** * This is used for {@link Cursor#copyStringToBuffer} */ +@android.ravenwood.annotation.RavenwoodKeepWholeClass public final class CharArrayBuffer { public CharArrayBuffer(int size) { data = new char[size]; diff --git a/core/java/android/database/ContentObservable.java b/core/java/android/database/ContentObservable.java index 7692bb39da71..dc35b5af2a98 100644 --- a/core/java/android/database/ContentObservable.java +++ b/core/java/android/database/ContentObservable.java @@ -23,6 +23,7 @@ import android.net.Uri; * that provides methods for sending notifications to a list of * {@link ContentObserver} objects. */ +@android.ravenwood.annotation.RavenwoodKeepWholeClass public class ContentObservable extends Observable<ContentObserver> { // Even though the generic method defined in Observable would be perfectly // fine on its own, we can't delete this overridden method because it would diff --git a/core/java/android/database/ContentObserver.java b/core/java/android/database/ContentObserver.java index c27ee51b9315..39c9400e7064 100644 --- a/core/java/android/database/ContentObserver.java +++ b/core/java/android/database/ContentObserver.java @@ -36,6 +36,7 @@ import java.util.Collection; * Receives call backs for changes to content. * Must be implemented by objects which are added to a {@link ContentObservable}. */ +@android.ravenwood.annotation.RavenwoodKeepWholeClass public abstract class ContentObserver { /** * Starting in {@link android.os.Build.VERSION_CODES#R}, there is a new @@ -49,7 +50,6 @@ public abstract class ContentObserver { @ChangeId @EnabledAfter(targetSdkVersion=android.os.Build.VERSION_CODES.Q) private static final long ADD_CONTENT_OBSERVER_FLAGS = 150939131L; - private final Object mLock = new Object(); private Transport mTransport; // guarded by mLock @@ -216,7 +216,7 @@ public abstract class ContentObserver { // There are dozens of people relying on the hidden API inside the // system UID, so hard-code the old behavior for all of them; for // everyone else we gate based on a specific change - if (!CompatChanges.isChangeEnabled(ADD_CONTENT_OBSERVER_FLAGS) + if (!isChangeEnabledAddContentObserverFlags() || android.os.Process.myUid() == android.os.Process.SYSTEM_UID) { // Deliver userId through argument to preserve hidden API behavior onChange(selfChange, uris, flags, UserHandle.of(userId)); @@ -225,6 +225,15 @@ public abstract class ContentObserver { } } + @android.ravenwood.annotation.RavenwoodReplace + private static boolean isChangeEnabledAddContentObserverFlags() { + return CompatChanges.isChangeEnabled(ADD_CONTENT_OBSERVER_FLAGS); + } + + private static boolean isChangeEnabledAddContentObserverFlags$ravenwood() { + return true; + } + /** * Dispatches a change notification to the observer. * <p> diff --git a/core/java/android/database/Cursor.java b/core/java/android/database/Cursor.java index afa1c209c811..cb1d3f5252b2 100644 --- a/core/java/android/database/Cursor.java +++ b/core/java/android/database/Cursor.java @@ -40,6 +40,7 @@ import java.util.List; * Implementations should subclass {@link AbstractCursor}. * </p> */ +@android.ravenwood.annotation.RavenwoodKeepWholeClass public interface Cursor extends Closeable { /* * Values returned by {@link #getType(int)}. diff --git a/core/java/android/database/CursorIndexOutOfBoundsException.java b/core/java/android/database/CursorIndexOutOfBoundsException.java index 1f77d0047191..89d44182a886 100644 --- a/core/java/android/database/CursorIndexOutOfBoundsException.java +++ b/core/java/android/database/CursorIndexOutOfBoundsException.java @@ -19,6 +19,7 @@ package android.database; /** * An exception indicating that a cursor is out of bounds. */ +@android.ravenwood.annotation.RavenwoodKeepWholeClass public class CursorIndexOutOfBoundsException extends IndexOutOfBoundsException { public CursorIndexOutOfBoundsException(int index, int size) { diff --git a/core/java/android/database/CursorJoiner.java b/core/java/android/database/CursorJoiner.java index a95263b67b43..2eb81a1eed5e 100644 --- a/core/java/android/database/CursorJoiner.java +++ b/core/java/android/database/CursorJoiner.java @@ -42,6 +42,7 @@ import java.util.Iterator; * } * </pre> */ +@android.ravenwood.annotation.RavenwoodKeepWholeClass public final class CursorJoiner implements Iterator<CursorJoiner.Result>, Iterable<CursorJoiner.Result> { private Cursor mCursorLeft; diff --git a/core/java/android/database/CursorWrapper.java b/core/java/android/database/CursorWrapper.java index 4496f805cc2e..6572f99cdd07 100644 --- a/core/java/android/database/CursorWrapper.java +++ b/core/java/android/database/CursorWrapper.java @@ -27,6 +27,7 @@ import java.util.List; * Wrapper class for Cursor that delegates all calls to the actual cursor object. The primary * use for this class is to extend a cursor while overriding only a subset of its methods. */ +@android.ravenwood.annotation.RavenwoodKeepWholeClass public class CursorWrapper implements Cursor { /** @hide */ @UnsupportedAppUsage diff --git a/core/java/android/database/DataSetObservable.java b/core/java/android/database/DataSetObservable.java index ca77a13c2352..ff47f9a53a9a 100644 --- a/core/java/android/database/DataSetObservable.java +++ b/core/java/android/database/DataSetObservable.java @@ -21,6 +21,7 @@ package android.database; * that provides methods for sending notifications to a list of * {@link DataSetObserver} objects. */ +@android.ravenwood.annotation.RavenwoodKeepWholeClass public class DataSetObservable extends Observable<DataSetObserver> { /** * Invokes {@link DataSetObserver#onChanged} on each observer. diff --git a/core/java/android/database/DataSetObserver.java b/core/java/android/database/DataSetObserver.java index 28616c80bd5a..13469cbf2645 100644 --- a/core/java/android/database/DataSetObserver.java +++ b/core/java/android/database/DataSetObserver.java @@ -21,6 +21,7 @@ package android.database; * that are observed are {@link Cursor}s or {@link android.widget.Adapter}s. * DataSetObserver must be implemented by objects which are added to a DataSetObservable. */ +@android.ravenwood.annotation.RavenwoodKeepWholeClass public abstract class DataSetObserver { /** * This method is called when the entire data set has changed, diff --git a/core/java/android/database/MatrixCursor.java b/core/java/android/database/MatrixCursor.java index 050a49ac959e..ad35b2f96eab 100644 --- a/core/java/android/database/MatrixCursor.java +++ b/core/java/android/database/MatrixCursor.java @@ -26,6 +26,7 @@ import java.util.ArrayList; * {@link #newRow()} to add rows. Automatically expands internal capacity * as needed. */ +@android.ravenwood.annotation.RavenwoodKeepWholeClass public class MatrixCursor extends AbstractCursor { private final String[] columnNames; diff --git a/core/java/android/database/MergeCursor.java b/core/java/android/database/MergeCursor.java index 272cfa24181c..5a5675694040 100644 --- a/core/java/android/database/MergeCursor.java +++ b/core/java/android/database/MergeCursor.java @@ -22,6 +22,7 @@ package android.database; * may be different if that is desired. Calls to getColumns, getColumnIndex, etc will return the * value for the row that the MergeCursor is currently pointing at. */ +@android.ravenwood.annotation.RavenwoodKeepWholeClass public class MergeCursor extends AbstractCursor { private DataSetObserver mObserver = new DataSetObserver() { diff --git a/core/java/android/database/Observable.java b/core/java/android/database/Observable.java index aff32db1bf9f..a3057aca7936 100644 --- a/core/java/android/database/Observable.java +++ b/core/java/android/database/Observable.java @@ -26,6 +26,7 @@ import java.util.ArrayList; * * @param T The observer type. */ +@android.ravenwood.annotation.RavenwoodKeepWholeClass public abstract class Observable<T> { /** * The list of observers. An observer can be in the list at most diff --git a/core/java/android/database/sqlite/SQLiteStatement.java b/core/java/android/database/sqlite/SQLiteStatement.java index acdc0fac0e98..d33eadcfd11b 100644 --- a/core/java/android/database/sqlite/SQLiteStatement.java +++ b/core/java/android/database/sqlite/SQLiteStatement.java @@ -27,7 +27,6 @@ import android.os.ParcelFileDescriptor; * <p> * This class is not thread-safe. * </p> - * Note that this class is unrelated to {@link SQLiteRawStatement}. */ public final class SQLiteStatement extends SQLiteProgram { @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) diff --git a/core/java/android/hardware/camera2/CameraExtensionCharacteristics.java b/core/java/android/hardware/camera2/CameraExtensionCharacteristics.java index ea951a55bfca..0a61c32a9cf5 100644 --- a/core/java/android/hardware/camera2/CameraExtensionCharacteristics.java +++ b/core/java/android/hardware/camera2/CameraExtensionCharacteristics.java @@ -736,6 +736,9 @@ public final class CameraExtensionCharacteristics { return generateJpegSupportedSizes( extenders.second.getSupportedPostviewResolutions(sz), streamMap); + } else if (format == ImageFormat.JPEG_R) { + // Jpeg_R/UltraHDR is currently not supported in the basic extension case + return new ArrayList<>(); } else { throw new IllegalArgumentException("Unsupported format: " + format); } @@ -858,6 +861,7 @@ public final class CameraExtensionCharacteristics { switch(format) { case ImageFormat.YUV_420_888: case ImageFormat.JPEG: + case ImageFormat.JPEG_R: break; default: throw new IllegalArgumentException("Unsupported format: " + format); @@ -890,6 +894,9 @@ public final class CameraExtensionCharacteristics { } else { return generateSupportedSizes(null, format, streamMap); } + } else if (format == ImageFormat.JPEG_R) { + // Jpeg_R/UltraHDR is currently not supported in the basic extension case + return new ArrayList<>(); } else { throw new IllegalArgumentException("Unsupported format: " + format); } diff --git a/core/java/android/hardware/camera2/impl/CameraExtensionUtils.java b/core/java/android/hardware/camera2/impl/CameraExtensionUtils.java index f4fc472accbe..a8066aa74f95 100644 --- a/core/java/android/hardware/camera2/impl/CameraExtensionUtils.java +++ b/core/java/android/hardware/camera2/impl/CameraExtensionUtils.java @@ -47,7 +47,8 @@ public final class CameraExtensionUtils { public static final int[] SUPPORTED_CAPTURE_OUTPUT_FORMATS = { CameraExtensionCharacteristics.PROCESSING_INPUT_FORMAT, - ImageFormat.JPEG + ImageFormat.JPEG, + ImageFormat.JPEG_R }; public static class SurfaceInfo { @@ -92,6 +93,10 @@ public final class CameraExtensionUtils { (dataspace == StreamConfigurationMap.HAL_DATASPACE_V0_JFIF)) { surfaceInfo.mFormat = ImageFormat.JPEG; return surfaceInfo; + } else if ((nativeFormat == StreamConfigurationMap.HAL_PIXEL_FORMAT_BLOB) + && (dataspace == StreamConfigurationMap.HAL_DATASPACE_JPEG_R)) { + surfaceInfo.mFormat = ImageFormat.JPEG_R; + return surfaceInfo; } return surfaceInfo; diff --git a/core/java/android/hardware/display/VirtualDisplayConfig.java b/core/java/android/hardware/display/VirtualDisplayConfig.java index 22e3938d3818..7388b5bb1495 100644 --- a/core/java/android/hardware/display/VirtualDisplayConfig.java +++ b/core/java/android/hardware/display/VirtualDisplayConfig.java @@ -18,10 +18,12 @@ package android.hardware.display; import static android.view.Display.DEFAULT_DISPLAY; +import android.annotation.FlaggedApi; import android.annotation.FloatRange; import android.annotation.IntRange; import android.annotation.NonNull; import android.annotation.Nullable; +import android.annotation.SystemApi; import android.hardware.display.DisplayManager.VirtualDisplayFlag; import android.media.projection.MediaProjection; import android.os.Handler; @@ -55,6 +57,7 @@ public final class VirtualDisplayConfig implements Parcelable { private final boolean mWindowManagerMirroringEnabled; private ArraySet<String> mDisplayCategories = null; private final float mRequestedRefreshRate; + private final boolean mIsHomeSupported; private VirtualDisplayConfig( @NonNull String name, @@ -67,7 +70,8 @@ public final class VirtualDisplayConfig implements Parcelable { int displayIdToMirror, boolean windowManagerMirroringEnabled, @NonNull ArraySet<String> displayCategories, - float requestedRefreshRate) { + float requestedRefreshRate, + boolean isHomeSupported) { mName = name; mWidth = width; mHeight = height; @@ -79,6 +83,7 @@ public final class VirtualDisplayConfig implements Parcelable { mWindowManagerMirroringEnabled = windowManagerMirroringEnabled; mDisplayCategories = displayCategories; mRequestedRefreshRate = requestedRefreshRate; + mIsHomeSupported = isHomeSupported; } /** @@ -157,6 +162,18 @@ public final class VirtualDisplayConfig implements Parcelable { } /** + * Whether this virtual display supports showing home activity and wallpaper. + * + * @see Builder#setHomeSupported + * @hide + */ + @FlaggedApi(android.companion.virtual.flags.Flags.FLAG_VDM_CUSTOM_HOME) + @SystemApi + public boolean isHomeSupported() { + return android.companion.virtual.flags.Flags.vdmCustomHome() && mIsHomeSupported; + } + + /** * Returns the display categories. * * @see Builder#setDisplayCategories @@ -189,6 +206,7 @@ public final class VirtualDisplayConfig implements Parcelable { dest.writeBoolean(mWindowManagerMirroringEnabled); dest.writeArraySet(mDisplayCategories); dest.writeFloat(mRequestedRefreshRate); + dest.writeBoolean(mIsHomeSupported); } @Override @@ -213,7 +231,8 @@ public final class VirtualDisplayConfig implements Parcelable { && mDisplayIdToMirror == that.mDisplayIdToMirror && mWindowManagerMirroringEnabled == that.mWindowManagerMirroringEnabled && Objects.equals(mDisplayCategories, that.mDisplayCategories) - && mRequestedRefreshRate == that.mRequestedRefreshRate; + && mRequestedRefreshRate == that.mRequestedRefreshRate + && mIsHomeSupported == that.mIsHomeSupported; } @Override @@ -221,7 +240,7 @@ public final class VirtualDisplayConfig implements Parcelable { int hashCode = Objects.hash( mName, mWidth, mHeight, mDensityDpi, mFlags, mSurface, mUniqueId, mDisplayIdToMirror, mWindowManagerMirroringEnabled, mDisplayCategories, - mRequestedRefreshRate); + mRequestedRefreshRate, mIsHomeSupported); return hashCode; } @@ -240,6 +259,7 @@ public final class VirtualDisplayConfig implements Parcelable { + " mWindowManagerMirroringEnabled=" + mWindowManagerMirroringEnabled + " mDisplayCategories=" + mDisplayCategories + " mRequestedRefreshRate=" + mRequestedRefreshRate + + " mIsHomeSupported=" + mIsHomeSupported + ")"; } @@ -255,6 +275,7 @@ public final class VirtualDisplayConfig implements Parcelable { mWindowManagerMirroringEnabled = in.readBoolean(); mDisplayCategories = (ArraySet<String>) in.readArraySet(null); mRequestedRefreshRate = in.readFloat(); + mIsHomeSupported = in.readBoolean(); } @NonNull @@ -286,6 +307,7 @@ public final class VirtualDisplayConfig implements Parcelable { private boolean mWindowManagerMirroringEnabled = false; private ArraySet<String> mDisplayCategories = new ArraySet<>(); private float mRequestedRefreshRate = 0.0f; + private boolean mIsHomeSupported = false; /** * Creates a new Builder. @@ -422,6 +444,27 @@ public final class VirtualDisplayConfig implements Parcelable { } /** + * Sets whether this display supports showing home activities and wallpaper. + * + * <p>If set to {@code true}, then the home activity relevant to this display will be + * automatically launched upon the display creation.</p> + * + * <p>Note: setting to {@code true} requires the display to be trusted. If the display is + * not trusted, this property is ignored.</p> + * + * @param isHomeSupported whether home activities are supported on the display + * @see DisplayManager#VIRTUAL_DISPLAY_FLAG_TRUSTED + * @hide + */ + @FlaggedApi(android.companion.virtual.flags.Flags.FLAG_VDM_CUSTOM_HOME) + @SystemApi + @NonNull + public Builder setHomeSupported(boolean isHomeSupported) { + mIsHomeSupported = isHomeSupported; + return this; + } + + /** * Builds the {@link VirtualDisplayConfig} instance. */ @NonNull @@ -437,7 +480,8 @@ public final class VirtualDisplayConfig implements Parcelable { mDisplayIdToMirror, mWindowManagerMirroringEnabled, mDisplayCategories, - mRequestedRefreshRate); + mRequestedRefreshRate, + mIsHomeSupported); } } } diff --git a/core/java/android/hardware/input/VirtualDpad.java b/core/java/android/hardware/input/VirtualDpad.java index 8133472961a0..7f2d8a026a2f 100644 --- a/core/java/android/hardware/input/VirtualDpad.java +++ b/core/java/android/hardware/input/VirtualDpad.java @@ -52,8 +52,8 @@ public class VirtualDpad extends VirtualInputDevice { KeyEvent.KEYCODE_DPAD_CENTER))); /** @hide */ - public VirtualDpad(IVirtualDevice virtualDevice, IBinder token) { - super(virtualDevice, token); + public VirtualDpad(VirtualDpadConfig config, IVirtualDevice virtualDevice, IBinder token) { + super(config, virtualDevice, token); } /** diff --git a/core/java/android/hardware/input/VirtualInputDevice.java b/core/java/android/hardware/input/VirtualInputDevice.java index 772ba8e36c5e..931e1ff10505 100644 --- a/core/java/android/hardware/input/VirtualInputDevice.java +++ b/core/java/android/hardware/input/VirtualInputDevice.java @@ -42,9 +42,12 @@ abstract class VirtualInputDevice implements Closeable { */ protected final IBinder mToken; + protected final VirtualInputDeviceConfig mConfig; + /** @hide */ - VirtualInputDevice( + VirtualInputDevice(VirtualInputDeviceConfig config, IVirtualDevice virtualDevice, IBinder token) { + mConfig = config; mVirtualDevice = virtualDevice; mToken = token; } @@ -70,4 +73,9 @@ abstract class VirtualInputDevice implements Closeable { throw e.rethrowFromSystemServer(); } } + + @Override + public String toString() { + return mConfig.toString(); + } } diff --git a/core/java/android/hardware/input/VirtualInputDeviceConfig.java b/core/java/android/hardware/input/VirtualInputDeviceConfig.java index d3dacc90d1b4..a8caa58ada01 100644 --- a/core/java/android/hardware/input/VirtualInputDeviceConfig.java +++ b/core/java/android/hardware/input/VirtualInputDeviceConfig.java @@ -91,6 +91,22 @@ public abstract class VirtualInputDeviceConfig { dest.writeString8(mInputDeviceName); } + @Override + public String toString() { + return getClass().getName() + "( " + + " name=" + mInputDeviceName + + " vendorId=" + mVendorId + + " productId=" + mProductId + + " associatedDisplayId=" + mAssociatedDisplayId + + additionalFieldsToString() + ")"; + } + + /** @hide */ + @NonNull + String additionalFieldsToString() { + return ""; + } + /** * A builder for {@link VirtualInputDeviceConfig} * diff --git a/core/java/android/hardware/input/VirtualKeyEvent.java b/core/java/android/hardware/input/VirtualKeyEvent.java index dc47f0820582..c0102bfa4072 100644 --- a/core/java/android/hardware/input/VirtualKeyEvent.java +++ b/core/java/android/hardware/input/VirtualKeyEvent.java @@ -172,6 +172,7 @@ public final class VirtualKeyEvent implements Parcelable { KeyEvent.KEYCODE_BREAK, KeyEvent.KEYCODE_BACK, KeyEvent.KEYCODE_FORWARD, + KeyEvent.KEYCODE_LANGUAGE_SWITCH, }) @Retention(RetentionPolicy.SOURCE) public @interface SupportedKeycode { @@ -205,6 +206,14 @@ public final class VirtualKeyEvent implements Parcelable { return 0; } + @Override + public String toString() { + return "VirtualKeyEvent(" + + " action=" + KeyEvent.actionToString(mAction) + + " keyCode=" + KeyEvent.keyCodeToString(mKeyCode) + + " eventTime(ns)=" + mEventTimeNanos; + } + /** * Returns the key code associated with this event. */ diff --git a/core/java/android/hardware/input/VirtualKeyboard.java b/core/java/android/hardware/input/VirtualKeyboard.java index e569dbf6b6b6..c90f8932a89d 100644 --- a/core/java/android/hardware/input/VirtualKeyboard.java +++ b/core/java/android/hardware/input/VirtualKeyboard.java @@ -39,8 +39,9 @@ public class VirtualKeyboard extends VirtualInputDevice { private final int mUnsupportedKeyCode = KeyEvent.KEYCODE_DPAD_CENTER; /** @hide */ - public VirtualKeyboard(IVirtualDevice virtualDevice, IBinder token) { - super(virtualDevice, token); + public VirtualKeyboard(VirtualKeyboardConfig config, + IVirtualDevice virtualDevice, IBinder token) { + super(config, virtualDevice, token); } /** diff --git a/core/java/android/hardware/input/VirtualKeyboardConfig.java b/core/java/android/hardware/input/VirtualKeyboardConfig.java index 6d03065214ca..96a1a36ff361 100644 --- a/core/java/android/hardware/input/VirtualKeyboardConfig.java +++ b/core/java/android/hardware/input/VirtualKeyboardConfig.java @@ -99,6 +99,12 @@ public final class VirtualKeyboardConfig extends VirtualInputDeviceConfig implem dest.writeString8(mLayoutType); } + @Override + @NonNull + String additionalFieldsToString() { + return " languageTag=" + mLanguageTag + " layoutType=" + mLayoutType; + } + /** * Builder for creating a {@link VirtualKeyboardConfig}. */ diff --git a/core/java/android/hardware/input/VirtualMouse.java b/core/java/android/hardware/input/VirtualMouse.java index 7eba2b8bfdf0..51f3f69eb78e 100644 --- a/core/java/android/hardware/input/VirtualMouse.java +++ b/core/java/android/hardware/input/VirtualMouse.java @@ -38,8 +38,8 @@ import android.view.MotionEvent; public class VirtualMouse extends VirtualInputDevice { /** @hide */ - public VirtualMouse(IVirtualDevice virtualDevice, IBinder token) { - super(virtualDevice, token); + public VirtualMouse(VirtualMouseConfig config, IVirtualDevice virtualDevice, IBinder token) { + super(config, virtualDevice, token); } /** diff --git a/core/java/android/hardware/input/VirtualMouseButtonEvent.java b/core/java/android/hardware/input/VirtualMouseButtonEvent.java index dfdd3b45923b..fc42b1581091 100644 --- a/core/java/android/hardware/input/VirtualMouseButtonEvent.java +++ b/core/java/android/hardware/input/VirtualMouseButtonEvent.java @@ -110,6 +110,14 @@ public final class VirtualMouseButtonEvent implements Parcelable { return 0; } + @Override + public String toString() { + return "VirtualMouseButtonEvent(" + + " action=" + MotionEvent.actionToString(mAction) + + " button=" + MotionEvent.buttonStateToString(mButtonCode) + + " eventTime(ns)=" + mEventTimeNanos; + } + /** * Returns the button code associated with this event. */ diff --git a/core/java/android/hardware/input/VirtualMouseRelativeEvent.java b/core/java/android/hardware/input/VirtualMouseRelativeEvent.java index e6ad118a2ee0..2a42cfc57c77 100644 --- a/core/java/android/hardware/input/VirtualMouseRelativeEvent.java +++ b/core/java/android/hardware/input/VirtualMouseRelativeEvent.java @@ -61,6 +61,14 @@ public final class VirtualMouseRelativeEvent implements Parcelable { return 0; } + @Override + public String toString() { + return "VirtualMouseRelativeEvent(" + + " x=" + mRelativeX + + " y=" + mRelativeY + + " eventTime(ns)=" + mEventTimeNanos; + } + /** * Returns the relative x-axis movement, in pixels. */ diff --git a/core/java/android/hardware/input/VirtualMouseScrollEvent.java b/core/java/android/hardware/input/VirtualMouseScrollEvent.java index 4d0a1576b6ee..c89c188a443d 100644 --- a/core/java/android/hardware/input/VirtualMouseScrollEvent.java +++ b/core/java/android/hardware/input/VirtualMouseScrollEvent.java @@ -65,6 +65,14 @@ public final class VirtualMouseScrollEvent implements Parcelable { return 0; } + @Override + public String toString() { + return "VirtualMouseScrollEvent(" + + " x=" + mXAxisMovement + + " y=" + mYAxisMovement + + " eventTime(ns)=" + mEventTimeNanos; + } + /** * Returns the x-axis scroll movement, normalized from -1.0 to 1.0, inclusive. Positive values * indicate scrolling upward; negative values, downward. diff --git a/core/java/android/hardware/input/VirtualNavigationTouchpad.java b/core/java/android/hardware/input/VirtualNavigationTouchpad.java index 2854034cd127..61d72e2fd554 100644 --- a/core/java/android/hardware/input/VirtualNavigationTouchpad.java +++ b/core/java/android/hardware/input/VirtualNavigationTouchpad.java @@ -40,8 +40,9 @@ import android.os.RemoteException; public class VirtualNavigationTouchpad extends VirtualInputDevice { /** @hide */ - public VirtualNavigationTouchpad(IVirtualDevice virtualDevice, IBinder token) { - super(virtualDevice, token); + public VirtualNavigationTouchpad(VirtualNavigationTouchpadConfig config, + IVirtualDevice virtualDevice, IBinder token) { + super(config, virtualDevice, token); } /** diff --git a/core/java/android/hardware/input/VirtualNavigationTouchpadConfig.java b/core/java/android/hardware/input/VirtualNavigationTouchpadConfig.java index 8935efa96720..75f7b3e3035e 100644 --- a/core/java/android/hardware/input/VirtualNavigationTouchpadConfig.java +++ b/core/java/android/hardware/input/VirtualNavigationTouchpadConfig.java @@ -70,6 +70,12 @@ public final class VirtualNavigationTouchpadConfig extends VirtualInputDeviceCon dest.writeInt(mWidth); } + @Override + @NonNull + String additionalFieldsToString() { + return " width=" + mWidth + " height=" + mHeight; + } + @NonNull public static final Creator<VirtualNavigationTouchpadConfig> CREATOR = new Creator<VirtualNavigationTouchpadConfig>() { diff --git a/core/java/android/hardware/input/VirtualTouchEvent.java b/core/java/android/hardware/input/VirtualTouchEvent.java index 2695a799d610..7936dfef7748 100644 --- a/core/java/android/hardware/input/VirtualTouchEvent.java +++ b/core/java/android/hardware/input/VirtualTouchEvent.java @@ -138,6 +138,19 @@ public final class VirtualTouchEvent implements Parcelable { return 0; } + @Override + public String toString() { + return "VirtualTouchEvent(" + + " pointerId=" + mPointerId + + " toolType=" + MotionEvent.toolTypeToString(mToolType) + + " action=" + MotionEvent.actionToString(mAction) + + " x=" + mX + + " y=" + mY + + " pressure=" + mPressure + + " majorAxisSize=" + mMajorAxisSize + + " eventTime(ns)=" + mEventTimeNanos; + } + /** * Returns the pointer id associated with this event. */ diff --git a/core/java/android/hardware/input/VirtualTouchscreen.java b/core/java/android/hardware/input/VirtualTouchscreen.java index 0d07753b9b60..4ac439e0eff1 100644 --- a/core/java/android/hardware/input/VirtualTouchscreen.java +++ b/core/java/android/hardware/input/VirtualTouchscreen.java @@ -34,8 +34,9 @@ import android.os.RemoteException; @SystemApi public class VirtualTouchscreen extends VirtualInputDevice { /** @hide */ - public VirtualTouchscreen(IVirtualDevice virtualDevice, IBinder token) { - super(virtualDevice, token); + public VirtualTouchscreen(VirtualTouchscreenConfig config, + IVirtualDevice virtualDevice, IBinder token) { + super(config, virtualDevice, token); } /** diff --git a/core/java/android/hardware/input/VirtualTouchscreenConfig.java b/core/java/android/hardware/input/VirtualTouchscreenConfig.java index aac341ccb5ed..63084592a2e8 100644 --- a/core/java/android/hardware/input/VirtualTouchscreenConfig.java +++ b/core/java/android/hardware/input/VirtualTouchscreenConfig.java @@ -69,6 +69,12 @@ public final class VirtualTouchscreenConfig extends VirtualInputDeviceConfig imp dest.writeInt(mHeight); } + @Override + @NonNull + String additionalFieldsToString() { + return " width=" + mWidth + " height=" + mHeight; + } + @NonNull public static final Creator<VirtualTouchscreenConfig> CREATOR = new Creator<VirtualTouchscreenConfig>() { diff --git a/core/java/android/hardware/usb/UsbPortStatus.java b/core/java/android/hardware/usb/UsbPortStatus.java index d95924002f1f..4a5c4c8acd25 100644 --- a/core/java/android/hardware/usb/UsbPortStatus.java +++ b/core/java/android/hardware/usb/UsbPortStatus.java @@ -646,12 +646,7 @@ public final class UsbPortStatus implements Parcelable { * @return array including {@link #COMPLIANCE_WARNING_OTHER}, * {@link #COMPLIANCE_WARNING_DEBUG_ACCESSORY}, * {@link #COMPLIANCE_WARNING_BC_1_2}, - * {@link #COMPLIANCE_WARNING_MISSING_RP}, - * {@link #COMPLIANCE_WARNING_INPUT_POWER_LIMITED}, - * {@link #COMPLIANCE_WARNING_MISSING_DATA_LINES}, - * {@link #COMPLIANCE_WARNING_ENUMERATION_FAIL}, - * {@link #COMPLIANCE_WARNING_FLAKY_CONNECTION}, - * {@link #COMPLIANCE_WARNING_UNRELIABLE_IO}. + * {@link #COMPLIANCE_WARNING_MISSING_RP}. */ @CheckResult @NonNull diff --git a/core/java/android/hardware/usb/flags/system_sw_usb_flags.aconfig b/core/java/android/hardware/usb/flags/system_sw_usb_flags.aconfig index 5c5083a691be..63ae28f6ff9d 100644 --- a/core/java/android/hardware/usb/flags/system_sw_usb_flags.aconfig +++ b/core/java/android/hardware/usb/flags/system_sw_usb_flags.aconfig @@ -13,3 +13,10 @@ flag { description: "Flag incompatible charging on COMPLIANCE_WARNING_INPUT_POWER_LIMITED instead of COMPLIANCE_WARNING_OTHER when enabled" bug: "308700954" } + +flag { + name: "enable_report_usb_data_compliance_warning" + namespace: "system_sw_usb" + description: "Enable reporting USB data compliance warnings from HAL when set" + bug: "296119135" +} diff --git a/core/java/android/net/INetworkManagementEventObserver.aidl b/core/java/android/net/INetworkManagementEventObserver.aidl index 0a6be20226b8..eda80c861698 100644 --- a/core/java/android/net/INetworkManagementEventObserver.aidl +++ b/core/java/android/net/INetworkManagementEventObserver.aidl @@ -85,14 +85,14 @@ oneway interface INetworkManagementEventObserver { /** * Interface data activity status is changed. * - * @param transportType The transport type of the data activity change. + * @param label label of the data activity change. * @param active True if the interface is actively transmitting data, false if it is idle. * @param tsNanos Elapsed realtime in nanos when the state of the network interface changed. * @param uid Uid of this event. It represents the uid that was responsible for waking the * radio. For those events that are reported by system itself, not from specific uid, * use -1 for the events which means no uid. */ - void interfaceClassDataActivityChanged(int transportType, boolean active, long tsNanos, int uid); + void interfaceClassDataActivityChanged(int label, boolean active, long tsNanos, int uid); /** * Information about available DNS servers has been received. diff --git a/core/java/android/os/DeadObjectException.java b/core/java/android/os/DeadObjectException.java index e06b0f9f4bc2..61aa222ef482 100644 --- a/core/java/android/os/DeadObjectException.java +++ b/core/java/android/os/DeadObjectException.java @@ -19,7 +19,29 @@ import android.os.RemoteException; /** * The object you are calling has died, because its hosting process - * no longer exists. + * no longer exists, or there has been a low-level binder error. + * + * If you get this exception from a system service, the error is + * usually nonrecoverable as the framework will restart. If you + * receive this error from an app, at a minimum, you should + * recover by resetting the connection. For instance, you should + * drop the binder, clean up associated state, and reset your + * connection to the service which through this error. In order + * to simplify your error recovery paths, you may also want to + * "simply" restart your process. However, this may not be an + * option if the service you are talking to is unreliable or + * crashes frequently. + * + * If this isn't from a service death and is instead from a + * low-level binder error, it will be from: + * - a oneway call queue filling up (too many oneway calls) + * - from the binder buffer being filled up, so that the transaction + * is rejected. + * + * In these cases, more information about the error will be + * logged. However, there isn't a good way to differentiate + * this information at runtime. So, you should handle the + * error, as if the service died. */ public class DeadObjectException extends RemoteException { public DeadObjectException() { diff --git a/core/java/android/os/DeadSystemRuntimeException.java b/core/java/android/os/DeadSystemRuntimeException.java index 1e869249eb9d..3b107984cebf 100644 --- a/core/java/android/os/DeadSystemRuntimeException.java +++ b/core/java/android/os/DeadSystemRuntimeException.java @@ -18,9 +18,12 @@ package android.os; /** * Exception thrown when a call into system_server resulted in a - * DeadObjectException, meaning that the system_server has died. There's - * nothing apps can do at this point - the system will automatically restart - - * so there's no point in catching this. + * DeadObjectException, meaning that the system_server has died or + * experienced a low-level binder error. There's nothing apps can + * do at this point - the system will automatically restart - so + * there's no point in catching this. + * + * See {@link android.os.DeadObjectException}. * * @hide */ diff --git a/core/java/android/os/IThermalService.aidl b/core/java/android/os/IThermalService.aidl index c6c8adc4d8a9..bcffa45fbbd2 100644 --- a/core/java/android/os/IThermalService.aidl +++ b/core/java/android/os/IThermalService.aidl @@ -111,4 +111,9 @@ interface IThermalService { * occur; returns NaN if the headroom or forecast is unavailable */ float getThermalHeadroom(int forecastSeconds); + + /** + * @return thermal headroom for each thermal status + */ + float[] getThermalHeadroomThresholds(); } diff --git a/core/java/android/os/PowerManager.java b/core/java/android/os/PowerManager.java index d2c17556bb2f..11bddfb5b0f0 100644 --- a/core/java/android/os/PowerManager.java +++ b/core/java/android/os/PowerManager.java @@ -20,6 +20,7 @@ import android.annotation.FlaggedApi; import android.Manifest.permission; import android.annotation.CallbackExecutor; import android.annotation.CurrentTimeMillisLong; +import android.annotation.FlaggedApi; import android.annotation.IntDef; import android.annotation.IntRange; import android.annotation.NonNull; @@ -42,14 +43,17 @@ import android.view.Display; import com.android.internal.util.Preconditions; +import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; import java.net.InetAddress; import java.net.UnknownHostException; import java.time.Duration; 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.concurrent.Executor; @@ -1180,6 +1184,8 @@ public final class PowerManager { private final ArrayMap<OnThermalStatusChangedListener, IThermalStatusListener> mListenerMap = new ArrayMap<>(); + private final Object mThermalHeadroomThresholdsLock = new Object(); + private float[] mThermalHeadroomThresholds = null; /** * {@hide} @@ -2636,6 +2642,7 @@ public final class PowerManager { public static final int THERMAL_STATUS_SHUTDOWN = Temperature.THROTTLING_SHUTDOWN; /** @hide */ + @Target(ElementType.TYPE_USE) @IntDef(prefix = { "THERMAL_STATUS_" }, value = { THERMAL_STATUS_NONE, THERMAL_STATUS_LIGHT, @@ -2800,6 +2807,63 @@ public final class PowerManager { } /** + * Gets the thermal headroom thresholds for all available thermal throttling status above + * {@link #THERMAL_STATUS_NONE}. + * <p> + * A thermal status key in the returned map is only set if the device manufacturer has the + * corresponding threshold defined for at least one of its sensors. If it's set, one should + * expect to see that from {@link #getCurrentThermalStatus()} or + * {@link OnThermalStatusChangedListener#onThermalStatusChanged(int)}. + * <p> + * The headroom threshold is used to interpret the possible thermal throttling status based on + * the headroom prediction. For example, if the headroom threshold for + * {@link #THERMAL_STATUS_LIGHT} is 0.7, and a headroom prediction in 10s returns 0.75 + * (or {@code getThermalHeadroom(10)=0.75}), one can expect that in 10 seconds the system could + * be in lightly throttled state if the workload remains the same. The app can consider + * taking actions according to the nearest throttling status the difference between the headroom + * and the threshold. + * <p> + * For new devices it's guaranteed to have a single sensor, but for older devices with multiple + * sensors reporting different threshold values, the minimum threshold is taken to be + * conservative on predictions. Thus, when reading real-time headroom, it's not guaranteed that + * a real-time value of 0.75 (or {@code getThermalHeadroom(0)}=0.75) exceeding the threshold of + * 0.7 above will always come with lightly throttled state + * (or {@code getCurrentThermalStatus()=THERMAL_STATUS_LIGHT}) but it can be lower + * (or {@code getCurrentThermalStatus()=THERMAL_STATUS_NONE}). While it's always guaranteed that + * the device won't be throttled heavier than the unmet threshold's state, so a real-time + * headroom of 0.75 will never come with {@link #THERMAL_STATUS_MODERATE} but lower, and 0.65 + * will never come with {@link #THERMAL_STATUS_LIGHT} but {@link #THERMAL_STATUS_NONE}. + * <p> + * The returned map of thresholds will not change between calls to this function, so it's + * best to call this once on initialization. Modifying the result will not change the thresholds + * cached by the system, and a new call to the API will get a new copy. + * + * @return map from each thermal status to its thermal headroom + * @throws IllegalStateException if the thermal service is not ready + * @throws UnsupportedOperationException if the feature is not enabled + */ + @FlaggedApi(Flags.FLAG_ALLOW_THERMAL_HEADROOM_THRESHOLDS) + public @NonNull Map<@ThermalStatus Integer, Float> getThermalHeadroomThresholds() { + try { + synchronized (mThermalHeadroomThresholdsLock) { + if (mThermalHeadroomThresholds == null) { + mThermalHeadroomThresholds = mThermalService.getThermalHeadroomThresholds(); + } + final ArrayMap<Integer, Float> ret = new ArrayMap<>(THERMAL_STATUS_SHUTDOWN); + for (int status = THERMAL_STATUS_LIGHT; status <= THERMAL_STATUS_SHUTDOWN; + status++) { + if (!Float.isNaN(mThermalHeadroomThresholds[status])) { + ret.put(status, mThermalHeadroomThresholds[status]); + } + } + return ret; + } + } catch (RemoteException e) { + throw e.rethrowFromSystemServer(); + } + } + + /** * If true, the doze component is not started until after the screen has been * turned off and the screen off animation has been performed. * @hide diff --git a/core/java/android/os/Process.java b/core/java/android/os/Process.java index daec1721977b..13572fb1bbbb 100644 --- a/core/java/android/os/Process.java +++ b/core/java/android/os/Process.java @@ -832,10 +832,16 @@ public class Process { /** * Returns true if the current process is a 64-bit runtime. */ + @android.ravenwood.annotation.RavenwoodReplace public static final boolean is64Bit() { return VMRuntime.getRuntime().is64Bit(); } + /** @hide */ + public static final boolean is64Bit$ravenwood() { + return "amd64".equals(System.getProperty("os.arch")); + } + private static SomeArgs sIdentity$ravenwood; /** @hide */ @@ -906,6 +912,7 @@ public class Process { * {@link #myUid()} in that a particular user will have multiple * distinct apps running under it each with their own uid. */ + @android.ravenwood.annotation.RavenwoodKeep public static UserHandle myUserHandle() { return UserHandle.of(UserHandle.getUserId(myUid())); } @@ -914,6 +921,7 @@ public class Process { * Returns whether the given uid belongs to a system core component or not. * @hide */ + @android.ravenwood.annotation.RavenwoodKeep public static boolean isCoreUid(int uid) { return UserHandle.isCore(uid); } @@ -924,6 +932,7 @@ public class Process { * @return Whether the uid corresponds to an application sandbox running in * a specific user. */ + @android.ravenwood.annotation.RavenwoodKeep public static boolean isApplicationUid(int uid) { return UserHandle.isApp(uid); } @@ -931,6 +940,7 @@ public class Process { /** * Returns whether the current process is in an isolated sandbox. */ + @android.ravenwood.annotation.RavenwoodKeep public static final boolean isIsolated() { return isIsolated(myUid()); } @@ -942,6 +952,7 @@ public class Process { @Deprecated @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.TIRAMISU, publicAlternatives = "Use {@link #isIsolatedUid(int)} instead.") + @android.ravenwood.annotation.RavenwoodKeep public static final boolean isIsolated(int uid) { return isIsolatedUid(uid); } @@ -949,6 +960,7 @@ public class Process { /** * Returns whether the process with the given {@code uid} is an isolated sandbox. */ + @android.ravenwood.annotation.RavenwoodKeep public static final boolean isIsolatedUid(int uid) { uid = UserHandle.getAppId(uid); return (uid >= FIRST_ISOLATED_UID && uid <= LAST_ISOLATED_UID) @@ -962,6 +974,7 @@ public class Process { */ @SystemApi(client = MODULE_LIBRARIES) @TestApi + @android.ravenwood.annotation.RavenwoodKeep public static final boolean isSdkSandboxUid(int uid) { uid = UserHandle.getAppId(uid); return (uid >= FIRST_SDK_SANDBOX_UID && uid <= LAST_SDK_SANDBOX_UID); @@ -975,6 +988,7 @@ public class Process { */ @SystemApi(client = MODULE_LIBRARIES) @TestApi + @android.ravenwood.annotation.RavenwoodKeep public static final int getAppUidForSdkSandboxUid(int uid) { return uid - (FIRST_SDK_SANDBOX_UID - FIRST_APPLICATION_UID); } @@ -987,6 +1001,7 @@ public class Process { */ @SystemApi(client = MODULE_LIBRARIES) @TestApi + @android.ravenwood.annotation.RavenwoodKeep public static final int toSdkSandboxUid(int uid) { return uid + (FIRST_SDK_SANDBOX_UID - FIRST_APPLICATION_UID); } @@ -994,6 +1009,7 @@ public class Process { /** * Returns whether the current process is a sdk sandbox process. */ + @android.ravenwood.annotation.RavenwoodKeep public static final boolean isSdkSandbox() { return isSdkSandboxUid(myUid()); } diff --git a/core/java/android/os/TEST_MAPPING b/core/java/android/os/TEST_MAPPING index 2d6e09a1b268..b5029a6aaff3 100644 --- a/core/java/android/os/TEST_MAPPING +++ b/core/java/android/os/TEST_MAPPING @@ -153,5 +153,11 @@ "file_patterns": ["Bugreport[^/]*\\.java"], "name": "ShellTests" } + ], + "ravenwood-presubmit": [ + { + "name": "CtsOsTestCasesRavenwood", + "host": true + } ] } diff --git a/core/java/android/os/UserHandle.java b/core/java/android/os/UserHandle.java index cac7f3b74185..0644ef1c788f 100644 --- a/core/java/android/os/UserHandle.java +++ b/core/java/android/os/UserHandle.java @@ -36,6 +36,7 @@ import java.util.Random; /** * Representation of a user on the device. */ +@android.ravenwood.annotation.RavenwoodKeepWholeClass public final class UserHandle implements Parcelable { // NOTE: keep logic in sync with system/core/libcutils/multiuser.c diff --git a/core/java/android/os/UserManager.java b/core/java/android/os/UserManager.java index d9c6beeb5813..2419a4c391f2 100644 --- a/core/java/android/os/UserManager.java +++ b/core/java/android/os/UserManager.java @@ -204,6 +204,8 @@ public class UserManager { * the user in locked state so that a direct boot aware DPC could reset the password. * Should not be used together with * {@link #QUIET_MODE_DISABLE_ONLY_IF_CREDENTIAL_NOT_REQUIRED} or an exception will be thrown. + * This flag is currently only allowed for {@link #isManagedProfile() managed profiles}; + * usage on other profiles may result in an Exception. * @hide */ public static final int QUIET_MODE_DISABLE_DONT_ASK_CREDENTIAL = 0x2; diff --git a/core/java/android/os/flags.aconfig b/core/java/android/os/flags.aconfig index 0809b3bada20..d405d1d0cec6 100644 --- a/core/java/android/os/flags.aconfig +++ b/core/java/android/os/flags.aconfig @@ -29,6 +29,13 @@ flag { } flag { + name: "allow_thermal_headroom_thresholds" + namespace: "game" + description: "Enable thermal headroom thresholds API" + bug: "288119641" +} + +flag { name: "allow_private_profile" namespace: "profile_experiences" description: "Guards a new Private Profile type in UserManager - everything from its setup to config to deletion." diff --git a/core/java/android/permission/flags.aconfig b/core/java/android/permission/flags.aconfig index fb2ac7112b0a..dc86e3f57c40 100644 --- a/core/java/android/permission/flags.aconfig +++ b/core/java/android/permission/flags.aconfig @@ -17,6 +17,7 @@ flag { flag { name: "role_controller_in_system_server" + is_fixed_read_only: true namespace: "permissions" description: "enable role controller in system server" bug: "302562590" diff --git a/core/java/android/service/notification/Condition.java b/core/java/android/service/notification/Condition.java index 4d33bfd1e94a..d76fa5be4940 100644 --- a/core/java/android/service/notification/Condition.java +++ b/core/java/android/service/notification/Condition.java @@ -16,8 +16,11 @@ package android.service.notification; +import android.annotation.FlaggedApi; import android.annotation.IntDef; +import android.annotation.NonNull; import android.annotation.Nullable; +import android.app.Flags; import android.content.Context; import android.net.Uri; import android.os.Parcel; @@ -57,7 +60,6 @@ public final class Condition implements Parcelable { * Indicates that Do Not Disturb should be turned on. */ public static final int STATE_TRUE = 1; - public static final int STATE_UNKNOWN = 2; public static final int STATE_ERROR = 3; @@ -90,6 +92,33 @@ public final class Condition implements Parcelable { public final int flags; public final int icon; + /** @hide */ + @IntDef(prefix = { "SOURCE_" }, value = { + SOURCE_UNKNOWN, + SOURCE_USER_ACTION, + SOURCE_SCHEDULE, + SOURCE_CONTEXT + }) + @Retention(RetentionPolicy.SOURCE) + public @interface Source {} + + /** The state is changing due to an unknown reason. */ + @FlaggedApi(Flags.FLAG_MODES_API) + public static final int SOURCE_UNKNOWN = 0; + /** The state is changing due to an explicit user action. */ + @FlaggedApi(Flags.FLAG_MODES_API) + public static final int SOURCE_USER_ACTION = 1; + /** The state is changing due to an automatic schedule (alarm, set time, etc). */ + @FlaggedApi(Flags.FLAG_MODES_API) + public static final int SOURCE_SCHEDULE = 2; + /** The state is changing due to a change in context (such as detected driving or sleeping). */ + @FlaggedApi(Flags.FLAG_MODES_API) + public static final int SOURCE_CONTEXT = 3; + + /** The source of, or reason for, the state change represented by this Condition. **/ + @FlaggedApi(Flags.FLAG_MODES_API) + public final @Source int source; + /** * The maximum string length for any string contained in this condition. * @hide @@ -99,14 +128,48 @@ public final class Condition implements Parcelable { /** * An object representing the current state of a {@link android.app.AutomaticZenRule}. * @param id the {@link android.app.AutomaticZenRule#getConditionId()} of the zen rule - * @param summary a user visible description of the rule state. + * @param summary a user visible description of the rule state + * @param state whether the mode should be activated or deactivated */ + // TODO: b/310208502 - Deprecate this in favor of constructor which specifies source. public Condition(Uri id, String summary, int state) { - this(id, summary, "", "", -1, state, FLAG_RELEVANT_ALWAYS); + this(id, summary, "", "", -1, state, SOURCE_UNKNOWN, FLAG_RELEVANT_ALWAYS); + } + + /** + * An object representing the current state of a {@link android.app.AutomaticZenRule}. + * @param id the {@link android.app.AutomaticZenRule#getConditionId()} of the zen rule + * @param summary a user visible description of the rule state + * @param state whether the mode should be activated or deactivated + * @param source the source of, or reason for, the state change represented by this Condition + */ + @FlaggedApi(Flags.FLAG_MODES_API) + public Condition(@Nullable Uri id, @Nullable String summary, @State int state, + @Source int source) { + this(id, summary, "", "", -1, state, source, FLAG_RELEVANT_ALWAYS); } + // TODO: b/310208502 - Deprecate this in favor of constructor which specifies source. public Condition(Uri id, String summary, String line1, String line2, int icon, int state, int flags) { + this(id, summary, line1, line2, icon, state, SOURCE_UNKNOWN, flags); + } + + /** + * An object representing the current state of a {@link android.app.AutomaticZenRule}. + * @param id the {@link android.app.AutomaticZenRule#getConditionId()} of the zen rule + * @param summary a user visible description of the rule state + * @param line1 a user-visible description of when the rule will end + * @param line2 a continuation of the user-visible description of when the rule will end + * @param icon an icon representing this condition + * @param state whether the mode should be activated or deactivated + * @param source the source of, or reason for, the state change represented by this Condition + * @param flags flags on this condition + */ + @FlaggedApi(Flags.FLAG_MODES_API) + public Condition(@Nullable Uri id, @Nullable String summary, @Nullable String line1, + @Nullable String line2, int icon, @State int state, @Source int source, + int flags) { if (id == null) throw new IllegalArgumentException("id is required"); if (summary == null) throw new IllegalArgumentException("summary is required"); if (!isValidState(state)) throw new IllegalArgumentException("state is invalid: " + state); @@ -116,6 +179,7 @@ public final class Condition implements Parcelable { this.line2 = getTrimmedString(line2); this.icon = icon; this.state = state; + this.source = source; this.flags = flags; } @@ -129,6 +193,7 @@ public final class Condition implements Parcelable { source.readString(), source.readInt(), source.readInt(), + Flags.modesApi() ? source.readInt() : SOURCE_UNKNOWN, source.readInt()); } @@ -144,20 +209,27 @@ public final class Condition implements Parcelable { dest.writeString(line2); dest.writeInt(icon); dest.writeInt(state); + if (Flags.modesApi()) { + dest.writeInt(this.source); + } dest.writeInt(this.flags); } @Override public String toString() { - return new StringBuilder(Condition.class.getSimpleName()).append('[') + StringBuilder sb = new StringBuilder(Condition.class.getSimpleName()).append('[') .append("state=").append(stateToString(state)) .append(",id=").append(id) .append(",summary=").append(summary) .append(",line1=").append(line1) .append(",line2=").append(line2) - .append(",icon=").append(icon) - .append(",flags=").append(flags) + .append(",icon=").append(icon); + if (Flags.modesApi()) { + sb.append(",source=").append(sourceToString(source)); + } + return sb.append(",flags=").append(flags) .append(']').toString(); + } /** @hide */ @@ -171,6 +243,7 @@ public final class Condition implements Parcelable { proto.write(ConditionProto.LINE_2, line2); proto.write(ConditionProto.ICON, icon); proto.write(ConditionProto.STATE, state); + // TODO: b/310644464 - Add source to dump. proto.write(ConditionProto.FLAGS, flags); proto.end(token); @@ -184,6 +257,16 @@ public final class Condition implements Parcelable { throw new IllegalArgumentException("state is invalid: " + state); } + /** Provides a human-readable string version of the Source enum. */ + @FlaggedApi(Flags.FLAG_MODES_API) + public static @NonNull String sourceToString(@Source int source) { + if (source == SOURCE_UNKNOWN) return "SOURCE_UNKNOWN"; + if (source == SOURCE_USER_ACTION) return "SOURCE_USER_ACTION"; + if (source == SOURCE_SCHEDULE) return "SOURCE_SCHEDULE"; + if (source == SOURCE_CONTEXT) return "SOURCE_CONTEXT"; + throw new IllegalArgumentException("source is invalid: " + source); + } + public static String relevanceToString(int flags) { final boolean now = (flags & FLAG_RELEVANT_NOW) != 0; final boolean always = (flags & FLAG_RELEVANT_ALWAYS) != 0; @@ -197,17 +280,24 @@ public final class Condition implements Parcelable { if (!(o instanceof Condition)) return false; if (o == this) return true; final Condition other = (Condition) o; - return Objects.equals(other.id, id) + boolean finalEquals = Objects.equals(other.id, id) && Objects.equals(other.summary, summary) && Objects.equals(other.line1, line1) && Objects.equals(other.line2, line2) && other.icon == icon && other.state == state && other.flags == flags; + if (Flags.modesApi()) { + return finalEquals && other.source == source; + } + return finalEquals; } @Override public int hashCode() { + if (Flags.modesApi()) { + return Objects.hash(id, summary, line1, line2, icon, state, source, flags); + } return Objects.hash(id, summary, line1, line2, icon, state, flags); } diff --git a/core/java/android/service/notification/ZenModeConfig.java b/core/java/android/service/notification/ZenModeConfig.java index 305b751f0cef..fedad895961d 100644 --- a/core/java/android/service/notification/ZenModeConfig.java +++ b/core/java/android/service/notification/ZenModeConfig.java @@ -160,6 +160,7 @@ public class ZenModeConfig implements Parcelable { private static final String CONDITION_ATT_LINE2 = "line2"; private static final String CONDITION_ATT_ICON = "icon"; private static final String CONDITION_ATT_STATE = "state"; + private static final String CONDITION_ATT_SOURCE = "source"; private static final String CONDITION_ATT_FLAGS = "flags"; private static final String ZEN_POLICY_TAG = "zen_policy"; @@ -687,7 +688,12 @@ public class ZenModeConfig implements Parcelable { final int state = safeInt(parser, CONDITION_ATT_STATE, -1); final int flags = safeInt(parser, CONDITION_ATT_FLAGS, -1); try { - return new Condition(id, summary, line1, line2, icon, state, flags); + if (Flags.modesApi()) { + final int source = safeInt(parser, CONDITION_ATT_SOURCE, Condition.SOURCE_UNKNOWN); + return new Condition(id, summary, line1, line2, icon, state, source, flags); + } else { + return new Condition(id, summary, line1, line2, icon, state, flags); + } } catch (IllegalArgumentException e) { Slog.w(TAG, "Unable to read condition xml", e); return null; @@ -701,6 +707,9 @@ public class ZenModeConfig implements Parcelable { out.attribute(null, CONDITION_ATT_LINE2, c.line2); out.attributeInt(null, CONDITION_ATT_ICON, c.icon); out.attributeInt(null, CONDITION_ATT_STATE, c.state); + if (Flags.modesApi()) { + out.attributeInt(null, CONDITION_ATT_SOURCE, c.source); + } out.attributeInt(null, CONDITION_ATT_FLAGS, c.flags); } diff --git a/core/java/android/service/wallpaper/WallpaperService.java b/core/java/android/service/wallpaper/WallpaperService.java index bf09ec181c1f..54116a2749e0 100644 --- a/core/java/android/service/wallpaper/WallpaperService.java +++ b/core/java/android/service/wallpaper/WallpaperService.java @@ -2289,7 +2289,7 @@ public abstract class WallpaperService extends Service { mInputEventReceiver = null; } - mSession.remove(mWindow); + mSession.remove(mWindow.asBinder()); } catch (RemoteException e) { } mSurfaceHolder.mSurface.release(); diff --git a/core/java/android/text/flags/flags.aconfig b/core/java/android/text/flags/flags.aconfig index 43c38f319713..a1885ae616e1 100644 --- a/core/java/android/text/flags/flags.aconfig +++ b/core/java/android/text/flags/flags.aconfig @@ -75,3 +75,10 @@ flag { description: "A feature flag that implements line break word style auto." bug: "280005585" } + +flag { + name: "inter_character_justification" + namespace: "text" + description: "A feature flag that implement inter character justification." + bug: "283193133" +} diff --git a/core/java/android/util/TEST_MAPPING b/core/java/android/util/TEST_MAPPING index 0ae1c1593366..c681f86ce439 100644 --- a/core/java/android/util/TEST_MAPPING +++ b/core/java/android/util/TEST_MAPPING @@ -24,5 +24,11 @@ ], "file_patterns": ["Xml"] } + ], + "ravenwood-presubmit": [ + { + "name": "CtsUtilTestCasesRavenwood", + "host": true + } ] } diff --git a/core/java/android/util/Xml.java b/core/java/android/util/Xml.java index 33058d84b2e5..2a33caaf7e28 100644 --- a/core/java/android/util/Xml.java +++ b/core/java/android/util/Xml.java @@ -26,6 +26,7 @@ import com.android.internal.util.ArtBinaryXmlPullParser; import com.android.internal.util.ArtBinaryXmlSerializer; import com.android.internal.util.FastXmlSerializer; import com.android.internal.util.XmlUtils; +import com.android.modules.utils.BinaryXmlPullParser; import com.android.modules.utils.BinaryXmlSerializer; import com.android.modules.utils.TypedXmlPullParser; import com.android.modules.utils.TypedXmlSerializer; @@ -38,6 +39,7 @@ import org.xml.sax.SAXException; import org.xml.sax.XMLReader; import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlPullParserException; +import org.xmlpull.v1.XmlPullParserFactory; import org.xmlpull.v1.XmlSerializer; import java.io.BufferedInputStream; @@ -115,6 +117,7 @@ public class Xml { /** * Returns a new pull parser with namespace support. */ + @android.ravenwood.annotation.RavenwoodReplace public static XmlPullParser newPullParser() { try { XmlPullParser parser = XmlObjectFactory.newXmlPullParser(); @@ -126,6 +129,12 @@ public class Xml { } } + /** @hide */ + public static XmlPullParser newPullParser$ravenwood() { + // TODO: remove once we're linking against libcore + return new BinaryXmlPullParser(); + } + /** * Creates a new {@link TypedXmlPullParser} which is optimized for use * inside the system, typically by supporting only a basic set of features. @@ -136,10 +145,17 @@ public class Xml { * @hide */ @SuppressWarnings("AndroidFrameworkEfficientXml") + @android.ravenwood.annotation.RavenwoodReplace public static @NonNull TypedXmlPullParser newFastPullParser() { return XmlUtils.makeTyped(newPullParser()); } + /** @hide */ + public static TypedXmlPullParser newFastPullParser$ravenwood() { + // TODO: remove once we're linking against libcore + return new BinaryXmlPullParser(); + } + /** * Creates a new {@link XmlPullParser} that reads XML documents using a * custom binary wire protocol which benchmarking has shown to be 8.5x @@ -148,10 +164,17 @@ public class Xml { * * @hide */ + @android.ravenwood.annotation.RavenwoodReplace public static @NonNull TypedXmlPullParser newBinaryPullParser() { return new ArtBinaryXmlPullParser(); } + /** @hide */ + public static TypedXmlPullParser newBinaryPullParser$ravenwood() { + // TODO: remove once we're linking against libcore + return new BinaryXmlPullParser(); + } + /** * Creates a new {@link XmlPullParser} which is optimized for use inside the * system, typically by supporting only a basic set of features. @@ -166,6 +189,7 @@ public class Xml { * * @hide */ + @android.ravenwood.annotation.RavenwoodReplace public static @NonNull TypedXmlPullParser resolvePullParser(@NonNull InputStream in) throws IOException { final byte[] magic = new byte[4]; @@ -198,13 +222,33 @@ public class Xml { return xml; } + /** @hide */ + public static @NonNull TypedXmlPullParser resolvePullParser$ravenwood(@NonNull InputStream in) + throws IOException { + // TODO: remove once we're linking against libcore + final TypedXmlPullParser xml = new BinaryXmlPullParser(); + try { + xml.setInput(in, StandardCharsets.UTF_8.name()); + } catch (XmlPullParserException e) { + throw new IOException(e); + } + return xml; + } + /** * Creates a new xml serializer. */ + @android.ravenwood.annotation.RavenwoodReplace public static XmlSerializer newSerializer() { return XmlObjectFactory.newXmlSerializer(); } + /** @hide */ + public static XmlSerializer newSerializer$ravenwood() { + // TODO: remove once we're linking against libcore + return new BinaryXmlSerializer(); + } + /** * Creates a new {@link XmlSerializer} which is optimized for use inside the * system, typically by supporting only a basic set of features. @@ -215,10 +259,17 @@ public class Xml { * @hide */ @SuppressWarnings("AndroidFrameworkEfficientXml") + @android.ravenwood.annotation.RavenwoodReplace public static @NonNull TypedXmlSerializer newFastSerializer() { return XmlUtils.makeTyped(new FastXmlSerializer()); } + /** @hide */ + public static @NonNull TypedXmlSerializer newFastSerializer$ravenwood() { + // TODO: remove once we're linking against libcore + return new BinaryXmlSerializer(); + } + /** * Creates a new {@link XmlSerializer} that writes XML documents using a * custom binary wire protocol which benchmarking has shown to be 4.4x @@ -227,10 +278,17 @@ public class Xml { * * @hide */ + @android.ravenwood.annotation.RavenwoodReplace public static @NonNull TypedXmlSerializer newBinarySerializer() { return new ArtBinaryXmlSerializer(); } + /** @hide */ + public static @NonNull TypedXmlSerializer newBinarySerializer$ravenwood() { + // TODO: remove once we're linking against libcore + return new BinaryXmlSerializer(); + } + /** * Creates a new {@link XmlSerializer} which is optimized for use inside the * system, typically by supporting only a basic set of features. @@ -245,6 +303,7 @@ public class Xml { * * @hide */ + @android.ravenwood.annotation.RavenwoodReplace public static @NonNull TypedXmlSerializer resolveSerializer(@NonNull OutputStream out) throws IOException { final TypedXmlSerializer xml; @@ -257,6 +316,15 @@ public class Xml { return xml; } + /** @hide */ + public static @NonNull TypedXmlSerializer resolveSerializer$ravenwood(@NonNull OutputStream out) + throws IOException { + // TODO: remove once we're linking against libcore + final TypedXmlSerializer xml = new BinaryXmlSerializer(); + xml.setOutput(out, StandardCharsets.UTF_8.name()); + return xml; + } + /** * Copy the first XML document into the second document. * <p> diff --git a/core/java/android/util/proto/TEST_MAPPING b/core/java/android/util/proto/TEST_MAPPING index 5b9874153de3..126174374896 100644 --- a/core/java/android/util/proto/TEST_MAPPING +++ b/core/java/android/util/proto/TEST_MAPPING @@ -6,5 +6,11 @@ { "name": "CtsProtoTestCases" } + ], + "ravenwood-presubmit": [ + { + "name": "CtsProtoTestCasesRavenwood", + "host": true + } ] } diff --git a/core/java/android/view/IWindowSession.aidl b/core/java/android/view/IWindowSession.aidl index 02e97dae70e2..dbacca5def51 100644 --- a/core/java/android/view/IWindowSession.aidl +++ b/core/java/android/view/IWindowSession.aidl @@ -59,8 +59,15 @@ interface IWindowSession { int addToDisplayWithoutInputChannel(IWindow window, in WindowManager.LayoutParams attrs, in int viewVisibility, in int layerStackId, out InsetsState insetsState, out Rect attachedFrame, out float[] sizeCompatScale); - @UnsupportedAppUsage - void remove(IWindow window); + + /** + * Removes a clientToken from WMS, which includes unlinking the input channel. + * + * @param clientToken The token that should be removed. This will normally be the IWindow token + * for a standard window. It can also be the generic clientToken that was used when calling + * grantInputChannel + */ + void remove(IBinder clientToken); /** * Change the parameters of a window. You supply the @@ -296,9 +303,11 @@ interface IWindowSession { /** * Request the server to call setInputWindowInfo on a given Surface, and return - * an input channel where the client can receive input. + * an input channel where the client can receive input. For windows, the clientToken should be + * the IWindow binder object. For other requests, the token can be any unique IBinder token to + * be used as unique identifier. */ - void grantInputChannel(int displayId, in SurfaceControl surface, in IWindow window, + void grantInputChannel(int displayId, in SurfaceControl surface, in IBinder clientToken, in IBinder hostInputToken, int flags, int privateFlags, int inputFeatures, int type, in IBinder windowToken, in IBinder focusGrantToken, String inputHandleName, out InputChannel outInputChannel); diff --git a/core/java/android/view/InputWindowHandle.java b/core/java/android/view/InputWindowHandle.java index 6a588eb8171b..59ec60545d6d 100644 --- a/core/java/android/view/InputWindowHandle.java +++ b/core/java/android/view/InputWindowHandle.java @@ -83,15 +83,11 @@ public final class InputWindowHandle { public IBinder token; /** - * The {@link IWindow} handle if InputWindowHandle is associated with a window, null otherwise. + * The {@link IBinder} handle if InputWindowHandle is associated with a client token, + * normally the IWindow token, null otherwise. */ @Nullable private IBinder windowToken; - /** - * Used to cache IWindow from the windowToken so we don't need to convert every time getWindow - * is called. - */ - private IWindow window; // The window name. public String name; @@ -161,6 +157,11 @@ public final class InputWindowHandle { public Matrix transform; /** + * The alpha value returned from SurfaceFlinger. This will be ignored if passed as input data. + */ + public float alpha; + + /** * The input token for the window to which focus should be transferred when this input window * can be successfully focused. If null, this input window will not transfer its focus to * any other window. @@ -181,7 +182,6 @@ public final class InputWindowHandle { inputApplicationHandle = new InputApplicationHandle(other.inputApplicationHandle); token = other.token; windowToken = other.windowToken; - window = other.window; name = other.name; layoutParamsFlags = other.layoutParamsFlags; layoutParamsType = other.layoutParamsType; @@ -204,6 +204,7 @@ public final class InputWindowHandle { } focusTransferTarget = other.focusTransferTarget; contentSize = new Size(other.contentSize.getWidth(), other.contentSize.getHeight()); + alpha = other.alpha; } @Override @@ -217,6 +218,7 @@ public final class InputWindowHandle { .append(", displayId=").append(displayId) .append(", isClone=").append((inputConfig & InputConfig.CLONE) != 0) .append(", contentSize=").append(contentSize) + .append(", alpha=").append(alpha) .toString(); } @@ -249,23 +251,14 @@ public final class InputWindowHandle { touchableRegionSurfaceControl = new WeakReference<>(bounds); } - public void setWindowToken(IWindow iwindow) { - windowToken = iwindow.asBinder(); - window = iwindow; + public void setWindowToken(IBinder iwindow) { + windowToken = iwindow; } public @Nullable IBinder getWindowToken() { return windowToken; } - public IWindow getWindow() { - if (window != null) { - return window; - } - window = IWindow.Stub.asInterface(windowToken); - return window; - } - /** * Set the provided inputConfig flag values. * @param inputConfig the flag values to change diff --git a/core/java/android/view/SurfaceControl.java b/core/java/android/view/SurfaceControl.java index 451a71b71e3f..8befe8a2be85 100644 --- a/core/java/android/view/SurfaceControl.java +++ b/core/java/android/view/SurfaceControl.java @@ -436,13 +436,16 @@ public final class SurfaceControl implements Parcelable { // Jank due to unknown reasons. public static final int UNKNOWN = 0x80; - public JankData(long frameVsyncId, @JankType int jankType) { + public JankData(long frameVsyncId, @JankType int jankType, long frameIntervalNs) { this.frameVsyncId = frameVsyncId; this.jankType = jankType; + this.frameIntervalNs = frameIntervalNs; + } public final long frameVsyncId; public final @JankType int jankType; + public final long frameIntervalNs; } /** @@ -3280,7 +3283,8 @@ public final class SurfaceControl implements Parcelable { "setCrop", this, sc, "crop=" + crop); } if (crop != null) { - Preconditions.checkArgument(crop.isValid(), "Crop isn't valid."); + Preconditions.checkArgument(crop.isValid(), "Crop " + crop + + " isn't valid"); nativeSetWindowCrop(mNativeObject, sc.mNativeObject, crop.left, crop.top, crop.right, crop.bottom); } else { diff --git a/core/java/android/view/SurfaceView.java b/core/java/android/view/SurfaceView.java index 0ae14a2fdb30..a44a95a1677f 100644 --- a/core/java/android/view/SurfaceView.java +++ b/core/java/android/view/SurfaceView.java @@ -1523,15 +1523,24 @@ public class SurfaceView extends View implements ViewRootImpl.SurfaceChangedCall if (mSurfaceControl == null) return; mRTLastReportedPosition.set(left, top, right, bottom); + final float postScaleX = mRTLastReportedPosition.width() + / (float) mRtSurfaceWidth; + final float postScaleY = mRTLastReportedPosition.height() + / (float) mRtSurfaceHeight; onSetSurfacePositionAndScale(mPositionChangedTransaction, mSurfaceControl, mRTLastReportedPosition.left /*positionLeft*/, mRTLastReportedPosition.top /*positionTop*/, - mRTLastReportedPosition.width() - / (float) mRtSurfaceWidth /*postScaleX*/, - mRTLastReportedPosition.height() - / (float) mRtSurfaceHeight /*postScaleY*/); - - mRTLastSetCrop.set(clipLeft, clipTop, clipRight, clipBottom); + postScaleX, postScaleY); + + mRTLastSetCrop.set((int) (clipLeft / postScaleX), (int) (clipTop / postScaleY), + (int) Math.ceil(clipRight / postScaleX), + (int) Math.ceil(clipBottom / postScaleY)); + if (DEBUG_POSITION) { + Log.d(TAG, String.format("Setting layer crop = [%d, %d, %d, %d] " + + "from scale %f, %f", mRTLastSetCrop.left, + mRTLastSetCrop.top, mRTLastSetCrop.right, mRTLastSetCrop.bottom, + postScaleX, postScaleY)); + } mPositionChangedTransaction.setCrop(mSurfaceControl, mRTLastSetCrop); if (mRTLastSetCrop.isEmpty()) { mPositionChangedTransaction.hide(mSurfaceControl); diff --git a/core/java/android/view/ViewConfiguration.java b/core/java/android/view/ViewConfiguration.java index ec961674db60..fb2b8b9c280c 100644 --- a/core/java/android/view/ViewConfiguration.java +++ b/core/java/android/view/ViewConfiguration.java @@ -88,6 +88,13 @@ public class ViewConfiguration { private static final int DEFAULT_MULTI_PRESS_TIMEOUT = 300; /** + * Defines the default duration in milliseconds between a key being pressed and its first key + * repeat event being generated. Historically, Android used the long press timeout as the + * key repeat timeout, so its default value is set to long press timeout's default. + */ + private static final int DEFAULT_KEY_REPEAT_TIMEOUT_MS = DEFAULT_LONG_PRESS_TIMEOUT; + + /** * Defines the default duration between successive key repeats in milliseconds. */ private static final int DEFAULT_KEY_REPEAT_DELAY_MS = 50; @@ -719,11 +726,8 @@ public class ViewConfiguration { * @return the time before the first key repeat in milliseconds. */ public static int getKeyRepeatTimeout() { - // Before the key repeat timeout was introduced, some users relied on changing - // LONG_PRESS_TIMEOUT settings to also change the key repeat timeout. To support - // this backward compatibility, we'll use the long press timeout as default value. return AppGlobals.getIntCoreSetting(Settings.Secure.KEY_REPEAT_TIMEOUT_MS, - getLongPressTimeout()); + DEFAULT_KEY_REPEAT_TIMEOUT_MS); } /** diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java index 145af2e7ab67..d5b4e4187fe4 100644 --- a/core/java/android/view/ViewRootImpl.java +++ b/core/java/android/view/ViewRootImpl.java @@ -81,6 +81,8 @@ import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_STARTING; import static android.view.WindowManager.LayoutParams.TYPE_BASE_APPLICATION; import static android.view.WindowManager.LayoutParams.TYPE_DRAWN_APPLICATION; import static android.view.WindowManager.LayoutParams.TYPE_INPUT_METHOD; +import static android.view.WindowManager.LayoutParams.TYPE_NOTIFICATION_SHADE; +import static android.view.WindowManager.LayoutParams.TYPE_STATUS_BAR; import static android.view.WindowManager.LayoutParams.TYPE_STATUS_BAR_ADDITIONAL; import static android.view.WindowManager.LayoutParams.TYPE_SYSTEM_ALERT; import static android.view.WindowManager.LayoutParams.TYPE_TOAST; @@ -5879,7 +5881,7 @@ public final class ViewRootImpl implements ViewParent, mInputQueue = null; } try { - mWindowSession.remove(mWindow); + mWindowSession.remove(mWindow.asBinder()); } catch (RemoteException e) { } // Dispose receiver would dispose client InputChannel, too. That could send out a socket @@ -12029,7 +12031,8 @@ public final class ViewRootImpl implements ViewParent, || motionEventAction == MotionEvent.ACTION_MOVE || motionEventAction == MotionEvent.ACTION_UP; boolean desiredType = windowType == TYPE_BASE_APPLICATION || windowType == TYPE_APPLICATION - || windowType == TYPE_APPLICATION_STARTING || windowType == TYPE_DRAWN_APPLICATION; + || windowType == TYPE_APPLICATION_STARTING || windowType == TYPE_DRAWN_APPLICATION + || windowType == TYPE_NOTIFICATION_SHADE || windowType == TYPE_STATUS_BAR; // use toolkitSetFrameRate flag to gate the change return desiredAction && desiredType && sToolkitSetFrameRateReadOnlyFlagValue; } diff --git a/core/java/android/view/WindowlessWindowManager.java b/core/java/android/view/WindowlessWindowManager.java index 2746340dce13..d817e6f51f55 100644 --- a/core/java/android/view/WindowlessWindowManager.java +++ b/core/java/android/view/WindowlessWindowManager.java @@ -228,14 +228,14 @@ public class WindowlessWindowManager implements IWindowSession { if (mRealWm instanceof IWindowSession.Stub) { mRealWm.grantInputChannel(displayId, new SurfaceControl(sc, "WindowlessWindowManager.addToDisplay"), - window, mHostInputToken, attrs.flags, attrs.privateFlags, + window.asBinder(), mHostInputToken, attrs.flags, attrs.privateFlags, attrs.inputFeatures, attrs.type, attrs.token, state.mInputTransferToken, attrs.getTitle().toString(), outInputChannel); } else { - mRealWm.grantInputChannel(displayId, sc, window, mHostInputToken, attrs.flags, - attrs.privateFlags, attrs.inputFeatures, attrs.type, attrs.token, - state.mInputTransferToken, attrs.getTitle().toString(), + mRealWm.grantInputChannel(displayId, sc, window.asBinder(), mHostInputToken, + attrs.flags, attrs.privateFlags, attrs.inputFeatures, attrs.type, + attrs.token, state.mInputTransferToken, attrs.getTitle().toString(), outInputChannel); } state.mInputChannelToken = @@ -276,11 +276,11 @@ public class WindowlessWindowManager implements IWindowSession { } @Override - public void remove(android.view.IWindow window) throws RemoteException { - mRealWm.remove(window); + public void remove(IBinder clientToken) throws RemoteException { + mRealWm.remove(clientToken); State state; synchronized (this) { - state = mStateForWindow.remove(window.asBinder()); + state = mStateForWindow.remove(clientToken); } if (state == null) { throw new IllegalArgumentException( @@ -592,7 +592,7 @@ public class WindowlessWindowManager implements IWindowSession { List<Rect> unrestrictedRects) {} @Override - public void grantInputChannel(int displayId, SurfaceControl surface, IWindow window, + public void grantInputChannel(int displayId, SurfaceControl surface, IBinder clientToken, IBinder hostInputToken, int flags, int privateFlags, int inputFeatures, int type, IBinder windowToken, IBinder focusGrantToken, String inputHandleName, InputChannel outInputChannel) { diff --git a/core/java/android/view/accessibility/AccessibilityManager.java b/core/java/android/view/accessibility/AccessibilityManager.java index b220c4d0c763..07ae1345a688 100644 --- a/core/java/android/view/accessibility/AccessibilityManager.java +++ b/core/java/android/view/accessibility/AccessibilityManager.java @@ -17,6 +17,7 @@ package android.view.accessibility; import static android.accessibilityservice.AccessibilityServiceInfo.FLAG_ENABLE_ACCESSIBILITY_VOLUME; +import static android.annotation.SystemApi.Client.MODULE_LIBRARIES; import android.Manifest; import android.accessibilityservice.AccessibilityService; @@ -25,6 +26,7 @@ import android.accessibilityservice.AccessibilityServiceInfo.FeedbackType; import android.accessibilityservice.AccessibilityShortcutInfo; import android.annotation.CallbackExecutor; import android.annotation.ColorInt; +import android.annotation.FlaggedApi; import android.annotation.IntDef; import android.annotation.NonNull; import android.annotation.Nullable; @@ -2042,6 +2044,9 @@ public final class AccessibilityManager { * @return {@code true} if flash notification works properly. * @hide */ + @FlaggedApi(Flags.FLAG_FLASH_NOTIFICATION_SYSTEM_API) + @TestApi + @SystemApi(client = MODULE_LIBRARIES) public boolean startFlashNotificationSequence(@NonNull Context context, @FlashNotificationReason int reason) { final IAccessibilityManager service; @@ -2071,6 +2076,9 @@ public final class AccessibilityManager { * @return {@code true} if flash notification stops properly. * @hide */ + @FlaggedApi(Flags.FLAG_FLASH_NOTIFICATION_SYSTEM_API) + @TestApi + @SystemApi(client = MODULE_LIBRARIES) public boolean stopFlashNotificationSequence(@NonNull Context context) { final IAccessibilityManager service; synchronized (mLock) { diff --git a/core/java/android/view/accessibility/flags/accessibility_flags.aconfig b/core/java/android/view/accessibility/flags/accessibility_flags.aconfig index 5296b9992542..950fa4b1d711 100644 --- a/core/java/android/view/accessibility/flags/accessibility_flags.aconfig +++ b/core/java/android/view/accessibility/flags/accessibility_flags.aconfig @@ -25,6 +25,13 @@ flag { flag { namespace: "accessibility" + name: "flash_notification_system_api" + description: "Makes flash notification APIs as system APIs for calling from mainline module" + bug: "282821643" +} + +flag { + namespace: "accessibility" name: "force_invert_color" description: "Enable force force-dark for smart inversion and dark theme everywhere" bug: "282821643" diff --git a/core/java/android/view/inputmethod/flags.aconfig b/core/java/android/view/inputmethod/flags.aconfig index 1e8718ce42c0..7486362195d0 100644 --- a/core/java/android/view/inputmethod/flags.aconfig +++ b/core/java/android/view/inputmethod/flags.aconfig @@ -22,4 +22,12 @@ flag { description: "Feature flag for replacing UserIdInt with UserHandle in some helper IMM functions" bug: "301713309" is_fixed_read_only: true -}
\ No newline at end of file +} + +flag { + name: "concurrent_input_methods" + namespace: "input_method" + description: "Feature flag for concurrent multi-session IME" + bug: "284527000" + is_fixed_read_only: true +} diff --git a/core/java/com/android/internal/jank/DisplayRefreshRate.java b/core/java/com/android/internal/jank/DisplayRefreshRate.java new file mode 100644 index 000000000000..354c4132dcd1 --- /dev/null +++ b/core/java/com/android/internal/jank/DisplayRefreshRate.java @@ -0,0 +1,86 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.internal.jank; + +import static com.android.internal.util.FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__DISPLAY_REFRESH_RATE__UNKNOWN_REFRESH_RATE; +import static com.android.internal.util.FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__DISPLAY_REFRESH_RATE__VARIABLE_REFRESH_RATE; +import static com.android.internal.util.FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__DISPLAY_REFRESH_RATE__RR_30_HZ; +import static com.android.internal.util.FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__DISPLAY_REFRESH_RATE__RR_60_HZ; +import static com.android.internal.util.FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__DISPLAY_REFRESH_RATE__RR_90_HZ; +import static com.android.internal.util.FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__DISPLAY_REFRESH_RATE__RR_120_HZ; +import static com.android.internal.util.FrameworkStatsLog.UIINTERACTION_FRAME_INFO_REPORTED__DISPLAY_REFRESH_RATE__RR_240_HZ; + +import android.annotation.IntDef; + +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; + +/** + * Display refresh rate related functionality. + * @hide + */ +public class DisplayRefreshRate { + public static final int UNKNOWN_REFRESH_RATE = + UIINTERACTION_FRAME_INFO_REPORTED__DISPLAY_REFRESH_RATE__UNKNOWN_REFRESH_RATE; + public static final int VARIABLE_REFRESH_RATE = + UIINTERACTION_FRAME_INFO_REPORTED__DISPLAY_REFRESH_RATE__VARIABLE_REFRESH_RATE; + public static final int REFRESH_RATE_30_HZ = + UIINTERACTION_FRAME_INFO_REPORTED__DISPLAY_REFRESH_RATE__RR_30_HZ; + public static final int REFRESH_RATE_60_HZ = + UIINTERACTION_FRAME_INFO_REPORTED__DISPLAY_REFRESH_RATE__RR_60_HZ; + public static final int REFRESH_RATE_90_HZ = + UIINTERACTION_FRAME_INFO_REPORTED__DISPLAY_REFRESH_RATE__RR_90_HZ; + public static final int REFRESH_RATE_120_HZ = + UIINTERACTION_FRAME_INFO_REPORTED__DISPLAY_REFRESH_RATE__RR_120_HZ; + public static final int REFRESH_RATE_240_HZ = + UIINTERACTION_FRAME_INFO_REPORTED__DISPLAY_REFRESH_RATE__RR_240_HZ; + + /** @hide */ + @IntDef({ + UNKNOWN_REFRESH_RATE, + VARIABLE_REFRESH_RATE, + REFRESH_RATE_30_HZ, + REFRESH_RATE_60_HZ, + REFRESH_RATE_90_HZ, + REFRESH_RATE_120_HZ, + REFRESH_RATE_240_HZ, + }) + @Retention(RetentionPolicy.SOURCE) + public @interface RefreshRate { + } + + private DisplayRefreshRate() { + } + + /** + * Computes the display refresh rate based off the frame interval. + */ + @RefreshRate + public static int getRefreshRate(long frameIntervalNs) { + long rate = Math.round(1e9 / frameIntervalNs); + if (rate < 50) { + return REFRESH_RATE_30_HZ; + } else if (rate < 80) { + return REFRESH_RATE_60_HZ; + } else if (rate < 110) { + return REFRESH_RATE_90_HZ; + } else if (rate < 180) { + return REFRESH_RATE_120_HZ; + } else { + return REFRESH_RATE_240_HZ; + } + } +} diff --git a/core/java/com/android/internal/jank/FrameTracker.java b/core/java/com/android/internal/jank/FrameTracker.java index 506f19f7719a..c83452d88290 100644 --- a/core/java/com/android/internal/jank/FrameTracker.java +++ b/core/java/com/android/internal/jank/FrameTracker.java @@ -24,6 +24,8 @@ import static android.view.SurfaceControl.JankData.JANK_SURFACEFLINGER_GPU_DEADL import static android.view.SurfaceControl.JankData.PREDICTION_ERROR; import static android.view.SurfaceControl.JankData.SURFACE_FLINGER_SCHEDULING; +import static com.android.internal.jank.DisplayRefreshRate.UNKNOWN_REFRESH_RATE; +import static com.android.internal.jank.DisplayRefreshRate.VARIABLE_REFRESH_RATE; import static com.android.internal.jank.InteractionJankMonitor.ACTION_SESSION_CANCEL; import static com.android.internal.jank.InteractionJankMonitor.ACTION_SESSION_END; import static com.android.internal.jank.InteractionJankMonitor.EXECUTOR_TASK_TIMEOUT; @@ -49,6 +51,7 @@ import android.view.ViewRootImpl; import android.view.WindowCallbacks; import com.android.internal.annotations.VisibleForTesting; +import com.android.internal.jank.DisplayRefreshRate.RefreshRate; import com.android.internal.jank.InteractionJankMonitor.Configuration; import com.android.internal.jank.InteractionJankMonitor.Session; import com.android.internal.util.FrameworkStatsLog; @@ -132,26 +135,30 @@ public class FrameTracker extends SurfaceControl.OnJankDataListener boolean hwuiCallbackFired; boolean surfaceControlCallbackFired; @JankType int jankType; + @RefreshRate int refreshRate; static JankInfo createFromHwuiCallback(long frameVsyncId, long totalDurationNanos, boolean isFirstFrame) { - return new JankInfo(frameVsyncId, true, false, JANK_NONE, totalDurationNanos, - isFirstFrame); + return new JankInfo(frameVsyncId, true, false, JANK_NONE, UNKNOWN_REFRESH_RATE, + totalDurationNanos, isFirstFrame); } static JankInfo createFromSurfaceControlCallback(long frameVsyncId, - @JankType int jankType) { - return new JankInfo(frameVsyncId, false, true, jankType, 0, false /* isFirstFrame */); + @JankType int jankType, @RefreshRate int refreshRate) { + return new JankInfo( + frameVsyncId, false, true, jankType, refreshRate, 0, false /* isFirstFrame */); } private JankInfo(long frameVsyncId, boolean hwuiCallbackFired, boolean surfaceControlCallbackFired, @JankType int jankType, + @RefreshRate int refreshRate, long totalDurationNanos, boolean isFirstFrame) { this.frameVsyncId = frameVsyncId; this.hwuiCallbackFired = hwuiCallbackFired; this.surfaceControlCallbackFired = surfaceControlCallbackFired; - this.totalDurationNanos = totalDurationNanos; this.jankType = jankType; + this.refreshRate = refreshRate; + this.totalDurationNanos = totalDurationNanos; this.isFirstFrame = isFirstFrame; } @@ -468,14 +475,16 @@ public class FrameTracker extends SurfaceControl.OnJankDataListener if (!isInRange(jankStat.frameVsyncId)) { continue; } + int refreshRate = DisplayRefreshRate.getRefreshRate(jankStat.frameIntervalNs); JankInfo info = findJankInfo(jankStat.frameVsyncId); if (info != null) { info.surfaceControlCallbackFired = true; info.jankType = jankStat.jankType; + info.refreshRate = refreshRate; } else { mJankInfos.put((int) jankStat.frameVsyncId, JankInfo.createFromSurfaceControlCallback( - jankStat.frameVsyncId, jankStat.jankType)); + jankStat.frameVsyncId, jankStat.jankType, refreshRate)); } } processJankInfos(); @@ -592,6 +601,7 @@ public class FrameTracker extends SurfaceControl.OnJankDataListener int missedSfFramesCount = 0; int maxSuccessiveMissedFramesCount = 0; int successiveMissedFramesCount = 0; + @RefreshRate int refreshRate = UNKNOWN_REFRESH_RATE; for (int i = 0; i < mJankInfos.size(); i++) { JankInfo info = mJankInfos.valueAt(i); @@ -627,6 +637,10 @@ public class FrameTracker extends SurfaceControl.OnJankDataListener maxSuccessiveMissedFramesCount, successiveMissedFramesCount); successiveMissedFramesCount = 0; } + if (info.refreshRate != UNKNOWN_REFRESH_RATE && info.refreshRate != refreshRate) { + refreshRate = (refreshRate == UNKNOWN_REFRESH_RATE) + ? info.refreshRate : VARIABLE_REFRESH_RATE; + } // TODO (b/174755489): Early latch currently gets fired way too often, so we have // to ignore it for now. if (!mSurfaceOnly && !info.hwuiCallbackFired) { @@ -669,6 +683,7 @@ public class FrameTracker extends SurfaceControl.OnJankDataListener mStatsLog.write( FrameworkStatsLog.UI_INTERACTION_FRAME_INFO_REPORTED, mDisplayId, + refreshRate, mSession.getStatsdInteractionType(), totalFramesCount, missedFramesCount, @@ -866,10 +881,10 @@ public class FrameTracker extends SurfaceControl.OnJankDataListener } /** {@see FrameworkStatsLog#write) */ - public void write(int code, int displayId, + public void write(int code, int displayId, @RefreshRate int refreshRate, int arg1, long arg2, long arg3, long arg4, long arg5, long arg6, long arg7) { FrameworkStatsLog.write(code, arg1, arg2, arg3, arg4, arg5, arg6, arg7, - mDisplayResolutionTracker.getResolution(displayId)); + mDisplayResolutionTracker.getResolution(displayId), refreshRate); } } diff --git a/core/java/com/android/internal/net/VpnProfile.java b/core/java/com/android/internal/net/VpnProfile.java index 0947ec178c77..f62094d231ef 100644 --- a/core/java/com/android/internal/net/VpnProfile.java +++ b/core/java/com/android/internal/net/VpnProfile.java @@ -618,4 +618,14 @@ public final class VpnProfile implements Cloneable, Parcelable { public int describeContents() { return 0; } + + @Override + public VpnProfile clone() { + try { + return (VpnProfile) super.clone(); + } catch (CloneNotSupportedException e) { + Log.wtf(TAG, e); + return null; + } + } } diff --git a/core/java/com/android/internal/util/ArtFastDataInput.java b/core/java/com/android/internal/util/ArtFastDataInput.java index 3e8916caead9..768ea82e0c71 100644 --- a/core/java/com/android/internal/util/ArtFastDataInput.java +++ b/core/java/com/android/internal/util/ArtFastDataInput.java @@ -21,6 +21,8 @@ import android.util.CharsetUtils; import com.android.modules.utils.FastDataInput; +import dalvik.system.VMRuntime; + import java.io.DataInput; import java.io.IOException; import java.io.InputStream; @@ -35,13 +37,14 @@ import java.util.concurrent.atomic.AtomicReference; */ public class ArtFastDataInput extends FastDataInput { private static AtomicReference<ArtFastDataInput> sInCache = new AtomicReference<>(); + private static VMRuntime sRuntime = VMRuntime.getRuntime(); private final long mBufferPtr; public ArtFastDataInput(@NonNull InputStream in, int bufferSize) { super(in, bufferSize); - mBufferPtr = mRuntime.addressOf(mBuffer); + mBufferPtr = sRuntime.addressOf(mBuffer); } /** @@ -66,6 +69,7 @@ public class ArtFastDataInput extends FastDataInput { * Release a {@link ArtFastDataInput} to potentially be recycled. You must not * interact with the object after releasing it. */ + @Override public void release() { super.release(); @@ -76,6 +80,11 @@ public class ArtFastDataInput extends FastDataInput { } @Override + public byte[] newByteArray(int bufferSize) { + return (byte[]) sRuntime.newNonMovableArray(byte.class, bufferSize); + } + + @Override public String readUTF() throws IOException { // Attempt to read directly from buffer space if there's enough room, // otherwise fall back to chunking into place @@ -86,9 +95,9 @@ public class ArtFastDataInput extends FastDataInput { mBufferPos += len; return res; } else { - final byte[] tmp = (byte[]) mRuntime.newNonMovableArray(byte.class, len + 1); + final byte[] tmp = (byte[]) sRuntime.newNonMovableArray(byte.class, len + 1); readFully(tmp, 0, len); - return CharsetUtils.fromModifiedUtf8Bytes(mRuntime.addressOf(tmp), 0, len); + return CharsetUtils.fromModifiedUtf8Bytes(sRuntime.addressOf(tmp), 0, len); } } } diff --git a/core/java/com/android/internal/util/ArtFastDataOutput.java b/core/java/com/android/internal/util/ArtFastDataOutput.java index ac595b6fd151..360ddb814aa2 100644 --- a/core/java/com/android/internal/util/ArtFastDataOutput.java +++ b/core/java/com/android/internal/util/ArtFastDataOutput.java @@ -21,6 +21,8 @@ import android.util.CharsetUtils; import com.android.modules.utils.FastDataOutput; +import dalvik.system.VMRuntime; + import java.io.DataOutput; import java.io.IOException; import java.io.OutputStream; @@ -35,13 +37,14 @@ import java.util.concurrent.atomic.AtomicReference; */ public class ArtFastDataOutput extends FastDataOutput { private static AtomicReference<ArtFastDataOutput> sOutCache = new AtomicReference<>(); + private static VMRuntime sRuntime = VMRuntime.getRuntime(); private final long mBufferPtr; public ArtFastDataOutput(@NonNull OutputStream out, int bufferSize) { super(out, bufferSize); - mBufferPtr = mRuntime.addressOf(mBuffer); + mBufferPtr = sRuntime.addressOf(mBuffer); } /** @@ -73,6 +76,11 @@ public class ArtFastDataOutput extends FastDataOutput { } @Override + public byte[] newByteArray(int bufferSize) { + return (byte[]) sRuntime.newNonMovableArray(byte.class, bufferSize); + } + + @Override public void writeUTF(String s) throws IOException { // Attempt to write directly to buffer space if there's enough room, // otherwise fall back to chunking into place @@ -94,8 +102,8 @@ public class ArtFastDataOutput extends FastDataOutput { // Negative value indicates buffer was too small and we need to // allocate a temporary buffer for encoding len = -len; - final byte[] tmp = (byte[]) mRuntime.newNonMovableArray(byte.class, len + 1); - CharsetUtils.toModifiedUtf8Bytes(s, mRuntime.addressOf(tmp), 0, tmp.length); + final byte[] tmp = (byte[]) sRuntime.newNonMovableArray(byte.class, len + 1); + CharsetUtils.toModifiedUtf8Bytes(s, sRuntime.addressOf(tmp), 0, tmp.length); writeShort(len); write(tmp, 0, len); } diff --git a/core/java/com/android/internal/widget/LockPatternUtils.java b/core/java/com/android/internal/widget/LockPatternUtils.java index a3e0016f9174..28fd2b488426 100644 --- a/core/java/com/android/internal/widget/LockPatternUtils.java +++ b/core/java/com/android/internal/widget/LockPatternUtils.java @@ -1936,7 +1936,8 @@ public class LockPatternUtils { * If the user is not secured, ie doesn't have an LSKF, then decrypt the user's synthetic * password and use it to unlock various cryptographic keys associated with the user. This * primarily includes unlocking the user's credential-encrypted (CE) storage. It also includes - * deriving or decrypting the vendor auth secret and sending it to the AuthSecret HAL. + * unlocking the user's Keystore super keys, and deriving or decrypting the vendor auth secret + * and sending it to the AuthSecret HAL in order to unlock Secure Element firmware updates. * <p> * These tasks would normally be done when the LSKF is verified. This method is where these * tasks are done when the user doesn't have an LSKF. It's called when the user is started. diff --git a/core/java/com/android/server/net/BaseNetworkObserver.java b/core/java/com/android/server/net/BaseNetworkObserver.java index 139b88b108c5..61e017d3443f 100644 --- a/core/java/com/android/server/net/BaseNetworkObserver.java +++ b/core/java/com/android/server/net/BaseNetworkObserver.java @@ -64,7 +64,7 @@ public class BaseNetworkObserver extends INetworkManagementEventObserver.Stub { } @Override - public void interfaceClassDataActivityChanged(int transportType, boolean active, long tsNanos, + public void interfaceClassDataActivityChanged(int label, boolean active, long tsNanos, int uid) { // default no-op } diff --git a/core/jni/android_hardware_input_InputWindowHandle.cpp b/core/jni/android_hardware_input_InputWindowHandle.cpp index c3d21a4024f8..ae23942f2500 100644 --- a/core/jni/android_hardware_input_InputWindowHandle.cpp +++ b/core/jni/android_hardware_input_InputWindowHandle.cpp @@ -74,6 +74,7 @@ static struct { jfieldID transform; jfieldID windowToken; jfieldID focusTransferTarget; + jfieldID alpha; } gInputWindowHandleClassInfo; static struct { @@ -325,6 +326,8 @@ jobject android_view_InputWindowHandle_fromWindowInfo(JNIEnv* env, gui::WindowIn env->SetObjectField(inputWindowHandle, gInputWindowHandleClassInfo.windowToken, javaObjectForIBinder(env, windowInfo.windowToken)); + env->SetFloatField(inputWindowHandle, gInputWindowHandleClassInfo.alpha, windowInfo.alpha); + return inputWindowHandle; } @@ -446,6 +449,8 @@ int register_android_view_InputWindowHandle(JNIEnv* env) { GET_FIELD_ID(gInputWindowHandleClassInfo.touchableRegionSurfaceControl.ctrl, clazz, "touchableRegionSurfaceControl", "Ljava/lang/ref/WeakReference;"); + GET_FIELD_ID(gInputWindowHandleClassInfo.alpha, clazz, "alpha", "F"); + jclass surfaceControlClazz; FIND_CLASS(surfaceControlClazz, "android/view/SurfaceControl"); GET_FIELD_ID(gInputWindowHandleClassInfo.touchableRegionSurfaceControl.mNativeObject, diff --git a/core/jni/android_media_AudioRecord.cpp b/core/jni/android_media_AudioRecord.cpp index b1dab85d2e27..f9d00edce3fa 100644 --- a/core/jni/android_media_AudioRecord.cpp +++ b/core/jni/android_media_AudioRecord.cpp @@ -212,14 +212,11 @@ static jint android_media_AudioRecord_setup(JNIEnv *env, jobject thiz, jobject w return (jint) AUDIORECORD_ERROR_SETUP_INVALIDFORMAT; } - size_t bytesPerSample = audio_bytes_per_sample(format); - if (buffSizeInBytes == 0) { ALOGE("Error creating AudioRecord: frameCount is 0."); return (jint) AUDIORECORD_ERROR_SETUP_ZEROFRAMECOUNT; } - size_t frameSize = channelCount * bytesPerSample; - size_t frameCount = buffSizeInBytes / frameSize; + size_t frameCount = buffSizeInBytes / audio_bytes_per_frame(channelCount, format); // create an uninitialized AudioRecord object Parcel* parcel = parcelForJavaObject(env, jAttributionSource); @@ -574,7 +571,7 @@ static jint android_media_AudioRecord_get_min_buff_size(JNIEnv *env, jobject th if (result != NO_ERROR) { return -1; } - return frameCount * channelCount * audio_bytes_per_sample(format); + return frameCount * audio_bytes_per_frame(channelCount, format); } static jboolean android_media_AudioRecord_setInputDevice( diff --git a/core/jni/android_view_SurfaceControl.cpp b/core/jni/android_view_SurfaceControl.cpp index a800e6ea60e4..db42246ca76c 100644 --- a/core/jni/android_view_SurfaceControl.cpp +++ b/core/jni/android_view_SurfaceControl.cpp @@ -1951,8 +1951,9 @@ public: jobjectArray jJankDataArray = env->NewObjectArray(jankData.size(), gJankDataClassInfo.clazz, nullptr); for (size_t i = 0; i < jankData.size(); i++) { - jobject jJankData = env->NewObject(gJankDataClassInfo.clazz, - gJankDataClassInfo.ctor, jankData[i].frameVsyncId, jankData[i].jankType); + jobject jJankData = env->NewObject(gJankDataClassInfo.clazz, gJankDataClassInfo.ctor, + jankData[i].frameVsyncId, jankData[i].jankType, + jankData[i].frameIntervalNs); env->SetObjectArrayElement(jJankDataArray, i, jJankData); env->DeleteLocalRef(jJankData); } @@ -2523,8 +2524,7 @@ int register_android_view_SurfaceControl(JNIEnv* env) jclass jankDataClazz = FindClassOrDie(env, "android/view/SurfaceControl$JankData"); gJankDataClassInfo.clazz = MakeGlobalRefOrDie(env, jankDataClazz); - gJankDataClassInfo.ctor = - GetMethodIDOrDie(env, gJankDataClassInfo.clazz, "<init>", "(JI)V"); + gJankDataClassInfo.ctor = GetMethodIDOrDie(env, gJankDataClassInfo.clazz, "<init>", "(JIJ)V"); jclass onJankDataListenerClazz = FindClassOrDie(env, "android/view/SurfaceControl$OnJankDataListener"); gJankDataListenerClassInfo.clazz = MakeGlobalRefOrDie(env, onJankDataListenerClazz); diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml index 76ae3e0b516b..926e0fa2f844 100644 --- a/core/res/AndroidManifest.xml +++ b/core/res/AndroidManifest.xml @@ -2372,7 +2372,7 @@ them from running without explicit user action. --> <permission android:name="android.permission.QUARANTINE_APPS" - android:protectionLevel="internal|verifier" /> + android:protectionLevel="signature|verifier" /> <!-- Allows applications to discover and pair bluetooth devices. <p>Protection level: normal diff --git a/core/res/res/values-af/strings.xml b/core/res/res/values-af/strings.xml index 50372395a1dc..f9ab7dd283c9 100644 --- a/core/res/res/values-af/strings.xml +++ b/core/res/res/values-af/strings.xml @@ -1710,6 +1710,10 @@ <string name="accessibility_service_action_perform_description" msgid="2718852014003170558">"Dit kan jou interaksies met \'n app of \'n hardewaresensor naspoor en namens jou met apps interaksie hê."</string> <string name="accessibility_dialog_button_allow" msgid="2092558122987144530">"Laat toe"</string> <string name="accessibility_dialog_button_deny" msgid="4129575637812472671">"Weier"</string> + <!-- no translation found for accessibility_dialog_button_uninstall (2952465517671708108) --> + <skip /> + <!-- no translation found for accessibility_dialog_touch_filtered_warning (3741940116597822451) --> + <skip /> <string name="accessibility_select_shortcut_menu_title" msgid="6002726538854613272">"Tik op \'n kenmerk om dit te begin gebruik:"</string> <string name="accessibility_edit_shortcut_menu_button_title" msgid="239446795930436325">"Kies kenmerke om saam met die toeganklikheidknoppie te gebruik"</string> <string name="accessibility_edit_shortcut_menu_volume_title" msgid="1077294237378645981">"Kies kenmerke om saam met die volumesleutelkortpad te gebruik"</string> @@ -1904,6 +1908,10 @@ <string name="zen_mode_default_weekends_name" msgid="4707200272709377930">"Naweek"</string> <string name="zen_mode_default_events_name" msgid="2280682960128512257">"Geleentheid"</string> <string name="zen_mode_default_every_night_name" msgid="1467765312174275823">"Slaap"</string> + <!-- no translation found for zen_mode_implicit_activated (2634285680776672994) --> + <skip /> + <!-- no translation found for zen_mode_implicit_deactivated (8688441768371501750) --> + <skip /> <string name="muted_by" msgid="91464083490094950">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> demp sekere klanke"</string> <string name="system_error_wipe_data" msgid="5910572292172208493">"Daar is \'n interne probleem met jou toestel en dit sal dalk onstabiel wees totdat jy \'n fabriekterugstelling doen."</string> <string name="system_error_manufacturer" msgid="703545241070116315">"Daar is \'n interne probleem met jou toestel. Kontak jou vervaardiger vir besonderhede."</string> @@ -2336,6 +2344,7 @@ <string name="mic_access_off_toast" msgid="8111040892954242437">"Mikrofoon is geblokkeer"</string> <string name="connected_display_unavailable_notification_title" msgid="5265409360902073556">"Kan nie na skerm weerspieël nie"</string> <string name="connected_display_unavailable_notification_content" msgid="3845903313751217516">"Gebruik ’n ander kabel en probeer weer"</string> + <string name="connected_display_thermally_unavailable_notification_content" msgid="9205758199439955949">"Jou toestel is te warm en kan nie na die skerm weerspieël totdat dit afgekoel het nie"</string> <string name="connected_display_cable_dont_support_displays_notification_title" msgid="8477183783847392465">"Kabel steun dalk nie skerms nie"</string> <string name="connected_display_cable_dont_support_displays_notification_content" msgid="8080498819171483973">"Jou USB-C-kabel koppel dalk nie behoorlik aan skerms nie"</string> <string name="concurrent_display_notification_name" msgid="1526911253558311131">"Dual Screen"</string> diff --git a/core/res/res/values-am/strings.xml b/core/res/res/values-am/strings.xml index 9a8bb6233172..5ac3225274d4 100644 --- a/core/res/res/values-am/strings.xml +++ b/core/res/res/values-am/strings.xml @@ -1710,6 +1710,10 @@ <string name="accessibility_service_action_perform_description" msgid="2718852014003170558">"ከመተግበሪያ ጋር ወይም የሃርድዌር ዳሳሽ ጋር እርስዎ ያልዎትን መስተጋብሮች ዱካ መከታተል እና በእርስዎ ምትክ ከመተግበሪያዎች ጋር መስተጋብር መፈጸም ይችላል።"</string> <string name="accessibility_dialog_button_allow" msgid="2092558122987144530">"ፍቀድ"</string> <string name="accessibility_dialog_button_deny" msgid="4129575637812472671">"ከልክል"</string> + <!-- no translation found for accessibility_dialog_button_uninstall (2952465517671708108) --> + <skip /> + <!-- no translation found for accessibility_dialog_touch_filtered_warning (3741940116597822451) --> + <skip /> <string name="accessibility_select_shortcut_menu_title" msgid="6002726538854613272">"አንድ ባህሪን መጠቀም ለመጀመር መታ ያድርጉት፦"</string> <string name="accessibility_edit_shortcut_menu_button_title" msgid="239446795930436325">"በተደራሽነት አዝራር የሚጠቀሙባቸው ባሕሪያት ይምረጡ"</string> <string name="accessibility_edit_shortcut_menu_volume_title" msgid="1077294237378645981">"በድምጽ ቁልፍ አቋራጭ የሚጠቀሙባቸው ባሕሪያት ይምረጡ"</string> @@ -1904,6 +1908,10 @@ <string name="zen_mode_default_weekends_name" msgid="4707200272709377930">"የሳምንት እረፍት ቀናት"</string> <string name="zen_mode_default_events_name" msgid="2280682960128512257">"ክስተት"</string> <string name="zen_mode_default_every_night_name" msgid="1467765312174275823">"መተኛት"</string> + <!-- no translation found for zen_mode_implicit_activated (2634285680776672994) --> + <skip /> + <!-- no translation found for zen_mode_implicit_deactivated (8688441768371501750) --> + <skip /> <string name="muted_by" msgid="91464083490094950">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> አንዳንድ ድምጾችን እየዘጋ ነው"</string> <string name="system_error_wipe_data" msgid="5910572292172208493">"መሣሪያዎ ላይ የውስጣዊ ችግር አለ፣ የፋብሪካ ውሂብ ዳግም እስኪያስጀምሩት ድረስ ላይረጋጋ ይችላል።"</string> <string name="system_error_manufacturer" msgid="703545241070116315">"መሣሪያዎ ላይ የውስጣዊ ችግር አለ። ዝርዝሮችን ለማግኘት አምራችዎን ያነጋግሩ።"</string> @@ -2336,6 +2344,8 @@ <string name="mic_access_off_toast" msgid="8111040892954242437">"ማይክሮፎን ታግዷል"</string> <string name="connected_display_unavailable_notification_title" msgid="5265409360902073556">"ወደ ማሳያ ማንጸባረቅ አልተቻለም"</string> <string name="connected_display_unavailable_notification_content" msgid="3845903313751217516">"የተለየ ገመድ ይጠቀሙ እና እንደገና ይሞክሩ"</string> + <!-- no translation found for connected_display_thermally_unavailable_notification_content (9205758199439955949) --> + <skip /> <string name="connected_display_cable_dont_support_displays_notification_title" msgid="8477183783847392465">"ገመድ ማሳያዎችን ላይደግፍ ይችላል"</string> <string name="connected_display_cable_dont_support_displays_notification_content" msgid="8080498819171483973">"የእርስዎ USB-C ገመድ ከማሳያዎች ጋር በትክክል ላይገናኝ ይችላል"</string> <string name="concurrent_display_notification_name" msgid="1526911253558311131">"Dual screen"</string> diff --git a/core/res/res/values-ar/strings.xml b/core/res/res/values-ar/strings.xml index f6d7c647c84f..537beece8cfa 100644 --- a/core/res/res/values-ar/strings.xml +++ b/core/res/res/values-ar/strings.xml @@ -1694,7 +1694,7 @@ <string name="kg_reordering_delete_drop_target_text" msgid="2034358143731750914">"إزالة"</string> <string name="safe_media_volume_warning" product="default" msgid="3751676824423049994">"هل تريد رفع مستوى الصوت فوق المستوى الموصى به؟\n\nقد يضر سماع صوت عالٍ لفترات طويلة بسمعك."</string> <string name="csd_dose_reached_warning" product="default" msgid="491875107583931974">"هل تريد مواصلة الاستماع بصوت عالٍ؟\n\nكان مستوى صوت سمّاعة الرأس مرتفعًا لمدة أطول مما يُنصَح به، وقد يضر هذا بسمعك."</string> - <string name="csd_momentary_exposure_warning" product="default" msgid="7730840903435405501">"تم رصد صوت مرتفع.\n\nكان مستوى صوت سمّاعة الرأس مرتفعًا لمدة أطول مما يُنصَح به، وقد يضر هذا بسمعك."</string> + <string name="csd_momentary_exposure_warning" product="default" msgid="7730840903435405501">"تم رصد صوت مرتفع\n\nكان مستوى صوت سمّاعة الرأس مرتفعًا لمدة أطول مما يُنصَح به، وقد يضر هذا بسمعك."</string> <string name="accessibility_shortcut_warning_dialog_title" msgid="4017995837692622933">"هل تريد استخدام اختصار \"سهولة الاستخدام\"؟"</string> <string name="accessibility_shortcut_toogle_warning" msgid="4161716521310929544">"عند تفعيل الاختصار، يؤدي الضغط على زرّي التحكّم في مستوى الصوت معًا لمدة 3 ثوانٍ إلى تفعيل إحدى ميزات إمكانية الوصول."</string> <string name="accessibility_shortcut_multiple_service_warning_title" msgid="3135860819356676426">"هل تريد تفعيل الاختصار لميزات إمكانية الوصول؟"</string> @@ -1714,6 +1714,10 @@ <string name="accessibility_service_action_perform_description" msgid="2718852014003170558">"قد يؤدي ذلك إلى السماح للميزة بتتبّع تفاعلاتك مع تطبيق أو جهاز استشعار والتفاعل مع التطبيقات نيابةً عنك."</string> <string name="accessibility_dialog_button_allow" msgid="2092558122987144530">"سماح"</string> <string name="accessibility_dialog_button_deny" msgid="4129575637812472671">"رفض"</string> + <!-- no translation found for accessibility_dialog_button_uninstall (2952465517671708108) --> + <skip /> + <!-- no translation found for accessibility_dialog_touch_filtered_warning (3741940116597822451) --> + <skip /> <string name="accessibility_select_shortcut_menu_title" msgid="6002726538854613272">"انقر على ميزة لبدء استخدامها:"</string> <string name="accessibility_edit_shortcut_menu_button_title" msgid="239446795930436325">"اختيار الميزات التي تريد استخدامها مع زر أدوات تمكين الوصول"</string> <string name="accessibility_edit_shortcut_menu_volume_title" msgid="1077294237378645981">"اختيار الميزات التي تريد استخدامها مع اختصار مفتاح التحكّم في مستوى الصوت"</string> @@ -1908,6 +1912,10 @@ <string name="zen_mode_default_weekends_name" msgid="4707200272709377930">"نهاية الأسبوع"</string> <string name="zen_mode_default_events_name" msgid="2280682960128512257">"حدث"</string> <string name="zen_mode_default_every_night_name" msgid="1467765312174275823">"النوم"</string> + <!-- no translation found for zen_mode_implicit_activated (2634285680776672994) --> + <skip /> + <!-- no translation found for zen_mode_implicit_deactivated (8688441768371501750) --> + <skip /> <string name="muted_by" msgid="91464083490094950">"يعمل <xliff:g id="THIRD_PARTY">%1$s</xliff:g> على كتم بعض الأصوات."</string> <string name="system_error_wipe_data" msgid="5910572292172208493">"حدثت مشكلة داخلية في جهازك، وقد لا يستقر وضعه حتى إجراء إعادة الضبط على الإعدادات الأصلية."</string> <string name="system_error_manufacturer" msgid="703545241070116315">"حدثت مشكلة داخلية في جهازك. يمكنك الاتصال بالمصنِّع للحصول على تفاصيل."</string> @@ -2340,6 +2348,8 @@ <string name="mic_access_off_toast" msgid="8111040892954242437">"تم حظر الميكروفون."</string> <string name="connected_display_unavailable_notification_title" msgid="5265409360902073556">"يتعذّر إجراء نسخ مطابق لمحتوى جهازك إلى الشاشة"</string> <string name="connected_display_unavailable_notification_content" msgid="3845903313751217516">"يُرجى استخدام كابل آخر وإعادة المحاولة."</string> + <!-- no translation found for connected_display_thermally_unavailable_notification_content (9205758199439955949) --> + <skip /> <string name="connected_display_cable_dont_support_displays_notification_title" msgid="8477183783847392465">"قد لا يتوافق الكابل مع الشاشات"</string> <string name="connected_display_cable_dont_support_displays_notification_content" msgid="8080498819171483973">"قد لا يتم توصيل الكابل المزوَّد بمنفذ USB-C بالشاشات بشكل صحيح."</string> <string name="concurrent_display_notification_name" msgid="1526911253558311131">"Dual Screen"</string> diff --git a/core/res/res/values-as/strings.xml b/core/res/res/values-as/strings.xml index 517ae9aabbf8..a5d2ee415a3f 100644 --- a/core/res/res/values-as/strings.xml +++ b/core/res/res/values-as/strings.xml @@ -1710,6 +1710,10 @@ <string name="accessibility_service_action_perform_description" msgid="2718852014003170558">"ই আপুনি কোনো এপ্ বা হার্ডৱেৰ ছেন্সৰৰ সৈতে কৰা ভাব-বিনিময় আৰু আপোনাৰ হৈ অন্য কোনো লোকে এপৰ সৈতে কৰা ভাব-বিনিময় ট্ৰেক কৰিব পাৰে।"</string> <string name="accessibility_dialog_button_allow" msgid="2092558122987144530">"অনুমতি দিয়ক"</string> <string name="accessibility_dialog_button_deny" msgid="4129575637812472671">"অস্বীকাৰ কৰক"</string> + <!-- no translation found for accessibility_dialog_button_uninstall (2952465517671708108) --> + <skip /> + <!-- no translation found for accessibility_dialog_touch_filtered_warning (3741940116597822451) --> + <skip /> <string name="accessibility_select_shortcut_menu_title" msgid="6002726538854613272">"কোনো এটা সুবিধা ব্যৱহাৰ কৰিবলৈ সেইটোত টিপক:"</string> <string name="accessibility_edit_shortcut_menu_button_title" msgid="239446795930436325">"সাধ্য-সুবিধা বুটামটোৰ জৰিয়তে ব্যৱহাৰ কৰিবলৈ সুবিধাসমূহ বাছনি কৰক"</string> <string name="accessibility_edit_shortcut_menu_volume_title" msgid="1077294237378645981">"ভলিউম কীৰ শ্বৰ্টকাটটোৰ জৰিয়তে ব্যৱহাৰ কৰিবলৈ সুবিধাসমূহ বাছনি কৰক"</string> @@ -1904,6 +1908,10 @@ <string name="zen_mode_default_weekends_name" msgid="4707200272709377930">"সপ্তাহ অন্ত"</string> <string name="zen_mode_default_events_name" msgid="2280682960128512257">"কার্যক্ৰম"</string> <string name="zen_mode_default_every_night_name" msgid="1467765312174275823">"নিদ্ৰাৰত"</string> + <!-- no translation found for zen_mode_implicit_activated (2634285680776672994) --> + <skip /> + <!-- no translation found for zen_mode_implicit_deactivated (8688441768371501750) --> + <skip /> <string name="muted_by" msgid="91464083490094950">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g>এ কিছুমান ধ্বনি মিউট কৰি আছে"</string> <string name="system_error_wipe_data" msgid="5910572292172208493">"আপোনাৰ ডিভাইচত এটা আভ্যন্তৰীণ সমস্যা আছে আৰু আপুনি ফেক্টৰী ডেটা ৰিছেট নকৰালৈকে ই সুস্থিৰভাৱে কাম নকৰিব পাৰে।"</string> <string name="system_error_manufacturer" msgid="703545241070116315">"আপোনাৰ ডিভাইচত এটা আভ্যন্তৰীণ সমস্যা আছে। সবিশেষ জানিবৰ বাবে আপোনাৰ ডিভাইচ নির্মাতাৰ সৈতে যোগাযোগ কৰক।"</string> @@ -2336,6 +2344,8 @@ <string name="mic_access_off_toast" msgid="8111040892954242437">"মাইক্ৰ’ফ’নটো অৱৰোধ কৰি থোৱা আছে"</string> <string name="connected_display_unavailable_notification_title" msgid="5265409360902073556">"সংযুক্ত ডিছপ্লে’ উপলব্ধ নহয়"</string> <string name="connected_display_unavailable_notification_content" msgid="3845903313751217516">"অন্য এডাল কে’বল ব্যৱহাৰ কৰি পুনৰ চেষ্টা কৰক"</string> + <!-- no translation found for connected_display_thermally_unavailable_notification_content (9205758199439955949) --> + <skip /> <string name="connected_display_cable_dont_support_displays_notification_title" msgid="8477183783847392465">"কে’বলে ডিছপ্লে’ সমৰ্থন নকৰিবও পাৰে"</string> <string name="connected_display_cable_dont_support_displays_notification_content" msgid="8080498819171483973">"আপোনাৰ USB-C কে’বল ডিছপ্লে’ৰ সৈতে সঠিকভাৱে সংযোগ নহ’বও পাৰে"</string> <string name="concurrent_display_notification_name" msgid="1526911253558311131">"Dual Screen"</string> diff --git a/core/res/res/values-az/strings.xml b/core/res/res/values-az/strings.xml index c0115550c35a..87e1c9f28fff 100644 --- a/core/res/res/values-az/strings.xml +++ b/core/res/res/values-az/strings.xml @@ -1710,6 +1710,10 @@ <string name="accessibility_service_action_perform_description" msgid="2718852014003170558">"Tətbiq və sensorlarla əlaqələrinizi izləyib tətbiqlərə adınızdan əmrlər verə bilər."</string> <string name="accessibility_dialog_button_allow" msgid="2092558122987144530">"İcazə verin"</string> <string name="accessibility_dialog_button_deny" msgid="4129575637812472671">"İmtina edin"</string> + <!-- no translation found for accessibility_dialog_button_uninstall (2952465517671708108) --> + <skip /> + <!-- no translation found for accessibility_dialog_touch_filtered_warning (3741940116597822451) --> + <skip /> <string name="accessibility_select_shortcut_menu_title" msgid="6002726538854613272">"Funksiyanı istifadə etmək üçün onun üzərinə toxunun:"</string> <string name="accessibility_edit_shortcut_menu_button_title" msgid="239446795930436325">"Xüsusi imkanlar düyməsinin köməyilə işə salınacaq funksiyaları seçin"</string> <string name="accessibility_edit_shortcut_menu_volume_title" msgid="1077294237378645981">"Səs səviyyəsi düyməsinin qısayolu ilə istifadə edəcəyiniz funksiyaları seçin"</string> @@ -1904,6 +1908,10 @@ <string name="zen_mode_default_weekends_name" msgid="4707200272709377930">"Həftə sonu"</string> <string name="zen_mode_default_events_name" msgid="2280682960128512257">"Tədbir"</string> <string name="zen_mode_default_every_night_name" msgid="1467765312174275823">"Yuxu vaxtı"</string> + <!-- no translation found for zen_mode_implicit_activated (2634285680776672994) --> + <skip /> + <!-- no translation found for zen_mode_implicit_deactivated (8688441768371501750) --> + <skip /> <string name="muted_by" msgid="91464083490094950">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> bəzi səsləri səssiz rejimə salır"</string> <string name="system_error_wipe_data" msgid="5910572292172208493">"Cihazınızın daxili problemi var və istehsalçı sıfırlanması olmayana qədər qeyri-stabil ola bilər."</string> <string name="system_error_manufacturer" msgid="703545241070116315">"Cihazınızın daxili problemi var. Əlavə məlumat üçün istehsalçı ilə əlaqə saxlayın."</string> @@ -2336,6 +2344,8 @@ <string name="mic_access_off_toast" msgid="8111040892954242437">"Mikrofon blok edilib"</string> <string name="connected_display_unavailable_notification_title" msgid="5265409360902073556">"Displeydə əks etdirmək olmur"</string> <string name="connected_display_unavailable_notification_content" msgid="3845903313751217516">"Başqa kabel istifadə edin və yenidən cəhd edin"</string> + <!-- no translation found for connected_display_thermally_unavailable_notification_content (9205758199439955949) --> + <skip /> <string name="connected_display_cable_dont_support_displays_notification_title" msgid="8477183783847392465">"Kabel displeyləri dəstəkləməyə bilər"</string> <string name="connected_display_cable_dont_support_displays_notification_content" msgid="8080498819171483973">"USB-C kabeli displeylərə düzgün qoşulmaya bilər"</string> <string name="concurrent_display_notification_name" msgid="1526911253558311131">"İkili ekran"</string> diff --git a/core/res/res/values-b+sr+Latn/strings.xml b/core/res/res/values-b+sr+Latn/strings.xml index 48b5c02c6286..06d73eedbaa9 100644 --- a/core/res/res/values-b+sr+Latn/strings.xml +++ b/core/res/res/values-b+sr+Latn/strings.xml @@ -1711,6 +1711,10 @@ <string name="accessibility_service_action_perform_description" msgid="2718852014003170558">"Može da prati interakcije sa aplikacijom ili senzorom hardvera i koristi aplikacije umesto vas."</string> <string name="accessibility_dialog_button_allow" msgid="2092558122987144530">"Dozvoli"</string> <string name="accessibility_dialog_button_deny" msgid="4129575637812472671">"Odbij"</string> + <!-- no translation found for accessibility_dialog_button_uninstall (2952465517671708108) --> + <skip /> + <!-- no translation found for accessibility_dialog_touch_filtered_warning (3741940116597822451) --> + <skip /> <string name="accessibility_select_shortcut_menu_title" msgid="6002726538854613272">"Dodirnite neku funkciju da biste počeli da je koristite:"</string> <string name="accessibility_edit_shortcut_menu_button_title" msgid="239446795930436325">"Odaberite funkcije koje ćete koristiti sa dugmetom Pristupačnost"</string> <string name="accessibility_edit_shortcut_menu_volume_title" msgid="1077294237378645981">"Odaberite funkcije za prečicu tasterom jačine zvuka"</string> @@ -1905,6 +1909,10 @@ <string name="zen_mode_default_weekends_name" msgid="4707200272709377930">"Vikend"</string> <string name="zen_mode_default_events_name" msgid="2280682960128512257">"Događaj"</string> <string name="zen_mode_default_every_night_name" msgid="1467765312174275823">"Spavanje"</string> + <!-- no translation found for zen_mode_implicit_activated (2634285680776672994) --> + <skip /> + <!-- no translation found for zen_mode_implicit_deactivated (8688441768371501750) --> + <skip /> <string name="muted_by" msgid="91464083490094950">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> isključuje neke zvuke"</string> <string name="system_error_wipe_data" msgid="5910572292172208493">"Došlo je do internog problema u vezi sa uređajem i možda će biti nestabilan dok ne obavite resetovanje na fabrička podešavanja."</string> <string name="system_error_manufacturer" msgid="703545241070116315">"Došlo je do internog problema u vezi sa uređajem. Potražite detalje od proizvođača."</string> @@ -2337,6 +2345,8 @@ <string name="mic_access_off_toast" msgid="8111040892954242437">"Mikrofon je blokiran"</string> <string name="connected_display_unavailable_notification_title" msgid="5265409360902073556">"Preslikavanje na ekran nije moguće"</string> <string name="connected_display_unavailable_notification_content" msgid="3845903313751217516">"Upotrebite drugi kabl i probajte ponovo"</string> + <!-- no translation found for connected_display_thermally_unavailable_notification_content (9205758199439955949) --> + <skip /> <string name="connected_display_cable_dont_support_displays_notification_title" msgid="8477183783847392465">"Kabl ne podržava ekrane"</string> <string name="connected_display_cable_dont_support_displays_notification_content" msgid="8080498819171483973">"USB-C kabl se ne povezuje pravilno sa ekranima"</string> <string name="concurrent_display_notification_name" msgid="1526911253558311131">"Dual Screen"</string> diff --git a/core/res/res/values-be/strings.xml b/core/res/res/values-be/strings.xml index 12effa0c6485..7ff6838951fb 100644 --- a/core/res/res/values-be/strings.xml +++ b/core/res/res/values-be/strings.xml @@ -1712,6 +1712,10 @@ <string name="accessibility_service_action_perform_description" msgid="2718852014003170558">"Гэта функцыя можа адсочваць вашы ўзаемадзеянні з праграмай ці датчыкам апаратнага забеспячэння і ўзаемадзейнічаць з праграмамі ад вашага імя."</string> <string name="accessibility_dialog_button_allow" msgid="2092558122987144530">"Дазволіць"</string> <string name="accessibility_dialog_button_deny" msgid="4129575637812472671">"Адмовіць"</string> + <!-- no translation found for accessibility_dialog_button_uninstall (2952465517671708108) --> + <skip /> + <!-- no translation found for accessibility_dialog_touch_filtered_warning (3741940116597822451) --> + <skip /> <string name="accessibility_select_shortcut_menu_title" msgid="6002726538854613272">"Каб пачаць выкарыстоўваць функцыю, націсніце на яе:"</string> <string name="accessibility_edit_shortcut_menu_button_title" msgid="239446795930436325">"Выберыце функцыі, якія будзеце выкарыстоўваць з кнопкай спецыяльных магчымасцей"</string> <string name="accessibility_edit_shortcut_menu_volume_title" msgid="1077294237378645981">"Выберыце функцыі для выкарыстання з клавішай гучнасці"</string> @@ -1906,6 +1910,10 @@ <string name="zen_mode_default_weekends_name" msgid="4707200272709377930">"Выхадныя"</string> <string name="zen_mode_default_events_name" msgid="2280682960128512257">"Падзея"</string> <string name="zen_mode_default_every_night_name" msgid="1467765312174275823">"Рэжым сну"</string> + <!-- no translation found for zen_mode_implicit_activated (2634285680776672994) --> + <skip /> + <!-- no translation found for zen_mode_implicit_deactivated (8688441768371501750) --> + <skip /> <string name="muted_by" msgid="91464083490094950">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> выключае некаторыя гукі"</string> <string name="system_error_wipe_data" msgid="5910572292172208493">"На вашай прыладзе ўзнікла ўнутраная праблема, і яна можа працаваць нестабільна, пакуль вы не зробіце скід да заводскіх налад."</string> <string name="system_error_manufacturer" msgid="703545241070116315">"На вашай прыладзе ўзнікла ўнутраная праблема. Для атрымання дадатковай інфармацыі звярніцеся да вытворцы."</string> @@ -2338,6 +2346,8 @@ <string name="mic_access_off_toast" msgid="8111040892954242437">"Мікрафон заблакіраваны"</string> <string name="connected_display_unavailable_notification_title" msgid="5265409360902073556">"Не ўдалося прадубліраваць змесціва на дысплэі"</string> <string name="connected_display_unavailable_notification_content" msgid="3845903313751217516">"Паспрабуйце скарыстаць іншы кабель"</string> + <!-- no translation found for connected_display_thermally_unavailable_notification_content (9205758199439955949) --> + <skip /> <string name="connected_display_cable_dont_support_displays_notification_title" msgid="8477183783847392465">"Магчыма, кабель несумяшчальны з дысплэямі"</string> <string name="connected_display_cable_dont_support_displays_notification_content" msgid="8080498819171483973">"Магчыма, кабель USB-C не падыходзіць да дысплэяў"</string> <string name="concurrent_display_notification_name" msgid="1526911253558311131">"Dual Screen"</string> diff --git a/core/res/res/values-bg/strings.xml b/core/res/res/values-bg/strings.xml index d18e4bc5f00e..304c2a0d8fae 100644 --- a/core/res/res/values-bg/strings.xml +++ b/core/res/res/values-bg/strings.xml @@ -1710,6 +1710,10 @@ <string name="accessibility_service_action_perform_description" msgid="2718852014003170558">"Услугата може да проследява взаимодействията ви с дадено приложение или хардуерен сензор, както и да взаимодейства с приложенията от ваше име."</string> <string name="accessibility_dialog_button_allow" msgid="2092558122987144530">"Разреш."</string> <string name="accessibility_dialog_button_deny" msgid="4129575637812472671">"Отказ"</string> + <!-- no translation found for accessibility_dialog_button_uninstall (2952465517671708108) --> + <skip /> + <!-- no translation found for accessibility_dialog_touch_filtered_warning (3741940116597822451) --> + <skip /> <string name="accessibility_select_shortcut_menu_title" msgid="6002726538854613272">"Докоснете дадена функция, за да започнете да я използвате:"</string> <string name="accessibility_edit_shortcut_menu_button_title" msgid="239446795930436325">"Избиране на функции, които да използвате с бутона за достъпност"</string> <string name="accessibility_edit_shortcut_menu_volume_title" msgid="1077294237378645981">"Избиране на функции, които да използвате с прекия път чрез бутона за силата на звука"</string> @@ -1904,6 +1908,10 @@ <string name="zen_mode_default_weekends_name" msgid="4707200272709377930">"Събота и неделя"</string> <string name="zen_mode_default_events_name" msgid="2280682960128512257">"Събитие"</string> <string name="zen_mode_default_every_night_name" msgid="1467765312174275823">"Време за сън"</string> + <!-- no translation found for zen_mode_implicit_activated (2634285680776672994) --> + <skip /> + <!-- no translation found for zen_mode_implicit_deactivated (8688441768371501750) --> + <skip /> <string name="muted_by" msgid="91464083490094950">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> заглушава някои звуци"</string> <string name="system_error_wipe_data" msgid="5910572292172208493">"Възникна вътрешен проблем с устройството ви. То може да е нестабилно, докато не възстановите фабричните настройки."</string> <string name="system_error_manufacturer" msgid="703545241070116315">"Възникна вътрешен проблем с устройството ви. За подробности се свържете с производителя."</string> @@ -2336,6 +2344,8 @@ <string name="mic_access_off_toast" msgid="8111040892954242437">"Микрофонът е блокиран"</string> <string name="connected_display_unavailable_notification_title" msgid="5265409360902073556">"Не може да се копира огледално на дисплея"</string> <string name="connected_display_unavailable_notification_content" msgid="3845903313751217516">"Използвайте друг кабел и опитайте отново"</string> + <!-- no translation found for connected_display_thermally_unavailable_notification_content (9205758199439955949) --> + <skip /> <string name="connected_display_cable_dont_support_displays_notification_title" msgid="8477183783847392465">"Кабелът не поддържа дисплеи"</string> <string name="connected_display_cable_dont_support_displays_notification_content" msgid="8080498819171483973">"USB-C кабелът ви може да не се свързва правилно с дисплеи"</string> <string name="concurrent_display_notification_name" msgid="1526911253558311131">"Dual screen"</string> diff --git a/core/res/res/values-bn/strings.xml b/core/res/res/values-bn/strings.xml index 859f37d026aa..1c6fa8da2bb4 100644 --- a/core/res/res/values-bn/strings.xml +++ b/core/res/res/values-bn/strings.xml @@ -1710,6 +1710,10 @@ <string name="accessibility_service_action_perform_description" msgid="2718852014003170558">"এটি কোনও একটি অ্যাপের সাথে অথবা হার্ডওয়্যার সেন্সরের সাথে আপনার ইন্টার্যাকশন ট্র্যাক করতে এবং আপনার হয়ে বিভিন্ন অ্যাপের সাথে ইন্টার্যাক্ট করতে পারে।"</string> <string name="accessibility_dialog_button_allow" msgid="2092558122987144530">"অনুমতি দিন"</string> <string name="accessibility_dialog_button_deny" msgid="4129575637812472671">"খারিজ করুন"</string> + <!-- no translation found for accessibility_dialog_button_uninstall (2952465517671708108) --> + <skip /> + <!-- no translation found for accessibility_dialog_touch_filtered_warning (3741940116597822451) --> + <skip /> <string name="accessibility_select_shortcut_menu_title" msgid="6002726538854613272">"কোনও ফিচার ব্যবহার করা শুরু করতে, সেটিতে ট্যাপ করুন:"</string> <string name="accessibility_edit_shortcut_menu_button_title" msgid="239446795930436325">"অ্যাক্সেসিবিলিটি বোতামের সাহায্যে আপনি যেসব ফিচার ব্যবহার করতে চান সেগুলি বেছে নিন"</string> <string name="accessibility_edit_shortcut_menu_volume_title" msgid="1077294237378645981">"ভলিউম কী শর্টকাটের সাহায্যে আপনি যেসব ফিচার ব্যবহার করতে চান সেগুলি বেছে নিন"</string> @@ -1904,6 +1908,10 @@ <string name="zen_mode_default_weekends_name" msgid="4707200272709377930">"সপ্তাহান্ত"</string> <string name="zen_mode_default_events_name" msgid="2280682960128512257">"ইভেন্ট"</string> <string name="zen_mode_default_every_night_name" msgid="1467765312174275823">"ঘুমানোর সময়"</string> + <!-- no translation found for zen_mode_implicit_activated (2634285680776672994) --> + <skip /> + <!-- no translation found for zen_mode_implicit_deactivated (8688441768371501750) --> + <skip /> <string name="muted_by" msgid="91464083490094950">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> কিছু সাউন্ডকে মিউট করে দিচ্ছে"</string> <string name="system_error_wipe_data" msgid="5910572292172208493">"আপনার ডিভাইসে একটি অভ্যন্তরীন সমস্যা হয়েছে, এবং আপনি যতক্ষণ না পর্যন্ত এটিকে ফ্যাক্টরি ডেটা রিসেট করছেন ততক্ষণ এটি ঠিকভাবে কাজ নাও করতে পারে৷"</string> <string name="system_error_manufacturer" msgid="703545241070116315">"আপনার ডিভাইসে একটি অভ্যন্তরীন সমস্যা হয়েছে৷ বিস্তারিত জানার জন্য প্রস্তুতকারকের সাথে যোগাযোগ করুন৷"</string> @@ -2336,6 +2344,8 @@ <string name="mic_access_off_toast" msgid="8111040892954242437">"মাইক্রোফোন ব্লক করা হয়েছে"</string> <string name="connected_display_unavailable_notification_title" msgid="5265409360902073556">"ডিসপ্লে মিরর করা যাচ্ছে না"</string> <string name="connected_display_unavailable_notification_content" msgid="3845903313751217516">"অন্য কোনও কেবল ব্যবহার করে আবার চেষ্টা করুন"</string> + <!-- no translation found for connected_display_thermally_unavailable_notification_content (9205758199439955949) --> + <skip /> <string name="connected_display_cable_dont_support_displays_notification_title" msgid="8477183783847392465">"কেবল, ডিসপ্লের সাথে কাজ নাও করতে পারে"</string> <string name="connected_display_cable_dont_support_displays_notification_content" msgid="8080498819171483973">"আপনার USB-C কেবল, ডিসপ্লেতে সঠিকভাবে কানেক্ট নাও হতে পারে"</string> <string name="concurrent_display_notification_name" msgid="1526911253558311131">"Dual Screen"</string> diff --git a/core/res/res/values-bs/strings.xml b/core/res/res/values-bs/strings.xml index 20f1d68a2fa0..c3f431a32ea5 100644 --- a/core/res/res/values-bs/strings.xml +++ b/core/res/res/values-bs/strings.xml @@ -1711,6 +1711,10 @@ <string name="accessibility_service_action_perform_description" msgid="2718852014003170558">"Može pratiti vaše interakcije s aplikacijom ili hardverskim senzorom te ostvariti interakciju s aplikacijama umjesto vas."</string> <string name="accessibility_dialog_button_allow" msgid="2092558122987144530">"Dozvoli"</string> <string name="accessibility_dialog_button_deny" msgid="4129575637812472671">"Odbij"</string> + <!-- no translation found for accessibility_dialog_button_uninstall (2952465517671708108) --> + <skip /> + <!-- no translation found for accessibility_dialog_touch_filtered_warning (3741940116597822451) --> + <skip /> <string name="accessibility_select_shortcut_menu_title" msgid="6002726538854613272">"Dodirnite funkciju da je počnete koristiti:"</string> <string name="accessibility_edit_shortcut_menu_button_title" msgid="239446795930436325">"Odaberite funkcije koje ćete koristiti s dugmetom Pristupačnost"</string> <string name="accessibility_edit_shortcut_menu_volume_title" msgid="1077294237378645981">"Odaberite funkcije koje ćete koristiti pomoću prečice tipke za jačinu zvuka"</string> @@ -1905,6 +1909,10 @@ <string name="zen_mode_default_weekends_name" msgid="4707200272709377930">"Vikend"</string> <string name="zen_mode_default_events_name" msgid="2280682960128512257">"Događaj"</string> <string name="zen_mode_default_every_night_name" msgid="1467765312174275823">"Spavanje"</string> + <!-- no translation found for zen_mode_implicit_activated (2634285680776672994) --> + <skip /> + <!-- no translation found for zen_mode_implicit_deactivated (8688441768371501750) --> + <skip /> <string name="muted_by" msgid="91464083490094950">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> isključuje neke zvukove"</string> <string name="system_error_wipe_data" msgid="5910572292172208493">"Postoji problem u vašem uređaju i može biti nestabilan dok ga ne vratite na fabričke postavke."</string> <string name="system_error_manufacturer" msgid="703545241070116315">"Postoji problem u vašem uređaju. Za više informacija obratite se proizvođaču."</string> @@ -2337,6 +2345,8 @@ <string name="mic_access_off_toast" msgid="8111040892954242437">"Mikrofon je blokiran"</string> <string name="connected_display_unavailable_notification_title" msgid="5265409360902073556">"Nije moguće preslikati na ekran"</string> <string name="connected_display_unavailable_notification_content" msgid="3845903313751217516">"Upotrijebite drugi kabl i pokušajte ponovo"</string> + <!-- no translation found for connected_display_thermally_unavailable_notification_content (9205758199439955949) --> + <skip /> <string name="connected_display_cable_dont_support_displays_notification_title" msgid="8477183783847392465">"Kabl možda neće podržavati ekrane"</string> <string name="connected_display_cable_dont_support_displays_notification_content" msgid="8080498819171483973">"USB-C kabl se možda neće pravilno povezati s ekranima"</string> <string name="concurrent_display_notification_name" msgid="1526911253558311131">"Dual Screen"</string> diff --git a/core/res/res/values-ca/strings.xml b/core/res/res/values-ca/strings.xml index 18e5abeb5eb1..fbbd2daf5dec 100644 --- a/core/res/res/values-ca/strings.xml +++ b/core/res/res/values-ca/strings.xml @@ -1711,6 +1711,10 @@ <string name="accessibility_service_action_perform_description" msgid="2718852014003170558">"Pot fer un seguiment de les teves interaccions amb una aplicació o un sensor de maquinari, i interaccionar amb aplicacions en nom teu."</string> <string name="accessibility_dialog_button_allow" msgid="2092558122987144530">"Permet"</string> <string name="accessibility_dialog_button_deny" msgid="4129575637812472671">"Denega"</string> + <!-- no translation found for accessibility_dialog_button_uninstall (2952465517671708108) --> + <skip /> + <!-- no translation found for accessibility_dialog_touch_filtered_warning (3741940116597822451) --> + <skip /> <string name="accessibility_select_shortcut_menu_title" msgid="6002726538854613272">"Toca una funció per començar a utilitzar-la:"</string> <string name="accessibility_edit_shortcut_menu_button_title" msgid="239446795930436325">"Tria les funcions que vols utilitzar amb el botó d\'accessibilitat"</string> <string name="accessibility_edit_shortcut_menu_volume_title" msgid="1077294237378645981">"Tria les funcions que vols utilitzar amb la drecera per a tecles de volum"</string> @@ -1905,6 +1909,10 @@ <string name="zen_mode_default_weekends_name" msgid="4707200272709377930">"Cap de setmana"</string> <string name="zen_mode_default_events_name" msgid="2280682960128512257">"Esdeveniment"</string> <string name="zen_mode_default_every_night_name" msgid="1467765312174275823">"Mentre dormo"</string> + <!-- no translation found for zen_mode_implicit_activated (2634285680776672994) --> + <skip /> + <!-- no translation found for zen_mode_implicit_deactivated (8688441768371501750) --> + <skip /> <string name="muted_by" msgid="91464083490094950">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> està silenciant alguns sons"</string> <string name="system_error_wipe_data" msgid="5910572292172208493">"S\'ha produït un error intern al dispositiu i és possible que funcioni de manera inestable fins que restableixis les dades de fàbrica."</string> <string name="system_error_manufacturer" msgid="703545241070116315">"S\'ha produït un error intern al dispositiu. Contacta amb el fabricant del dispositiu per obtenir més informació."</string> @@ -2337,6 +2345,8 @@ <string name="mic_access_off_toast" msgid="8111040892954242437">"El micròfon està bloquejat"</string> <string name="connected_display_unavailable_notification_title" msgid="5265409360902073556">"No es pot projectar a la pantalla"</string> <string name="connected_display_unavailable_notification_content" msgid="3845903313751217516">"Utilitza un altre cable i torna-ho a provar"</string> + <!-- no translation found for connected_display_thermally_unavailable_notification_content (9205758199439955949) --> + <skip /> <string name="connected_display_cable_dont_support_displays_notification_title" msgid="8477183783847392465">"És possible que el cable no sigui compatible amb pantalles"</string> <string name="connected_display_cable_dont_support_displays_notification_content" msgid="8080498819171483973">"És possible que el teu cable USB-C no es connecti correctament a les pantalles"</string> <string name="concurrent_display_notification_name" msgid="1526911253558311131">"Pantalla dual"</string> diff --git a/core/res/res/values-cs/strings.xml b/core/res/res/values-cs/strings.xml index 29e00fa4d212..959b7bc0ceb7 100644 --- a/core/res/res/values-cs/strings.xml +++ b/core/res/res/values-cs/strings.xml @@ -1712,6 +1712,10 @@ <string name="accessibility_service_action_perform_description" msgid="2718852014003170558">"Služba může sledovat vaše interakce s aplikací nebo hardwarovým senzorem a komunikovat s aplikacemi namísto vás."</string> <string name="accessibility_dialog_button_allow" msgid="2092558122987144530">"Povolit"</string> <string name="accessibility_dialog_button_deny" msgid="4129575637812472671">"Zakázat"</string> + <!-- no translation found for accessibility_dialog_button_uninstall (2952465517671708108) --> + <skip /> + <!-- no translation found for accessibility_dialog_touch_filtered_warning (3741940116597822451) --> + <skip /> <string name="accessibility_select_shortcut_menu_title" msgid="6002726538854613272">"Chcete-li některou funkci začít používat, klepněte na ni:"</string> <string name="accessibility_edit_shortcut_menu_button_title" msgid="239446795930436325">"Vyberte funkce, které budete používat s tlačítkem přístupnosti"</string> <string name="accessibility_edit_shortcut_menu_volume_title" msgid="1077294237378645981">"Vyberte funkce, které budete používat se zkratkou tlačítka hlasitosti"</string> @@ -1906,6 +1910,10 @@ <string name="zen_mode_default_weekends_name" msgid="4707200272709377930">"Víkend"</string> <string name="zen_mode_default_events_name" msgid="2280682960128512257">"Událost"</string> <string name="zen_mode_default_every_night_name" msgid="1467765312174275823">"Spánek"</string> + <!-- no translation found for zen_mode_implicit_activated (2634285680776672994) --> + <skip /> + <!-- no translation found for zen_mode_implicit_deactivated (8688441768371501750) --> + <skip /> <string name="muted_by" msgid="91464083490094950">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> vypíná určité zvuky"</string> <string name="system_error_wipe_data" msgid="5910572292172208493">"V zařízení došlo k internímu problému. Dokud neprovedete obnovení továrních dat, může být nestabilní."</string> <string name="system_error_manufacturer" msgid="703545241070116315">"V zařízení došlo k internímu problému. Další informace vám sdělí výrobce."</string> @@ -2338,6 +2346,8 @@ <string name="mic_access_off_toast" msgid="8111040892954242437">"Mikrofon je zablokován"</string> <string name="connected_display_unavailable_notification_title" msgid="5265409360902073556">"Nelze zrcadlit na displej"</string> <string name="connected_display_unavailable_notification_content" msgid="3845903313751217516">"Použijte jiný kabel a zkuste to znovu"</string> + <!-- no translation found for connected_display_thermally_unavailable_notification_content (9205758199439955949) --> + <skip /> <string name="connected_display_cable_dont_support_displays_notification_title" msgid="8477183783847392465">"Kabel možná nepodporuje displeje"</string> <string name="connected_display_cable_dont_support_displays_notification_content" msgid="8080498819171483973">"Váš kabel USB-C se možná nedokáže správně připojit k displejům"</string> <string name="concurrent_display_notification_name" msgid="1526911253558311131">"Dual Screen"</string> diff --git a/core/res/res/values-da/strings.xml b/core/res/res/values-da/strings.xml index 87703cdb2fd9..751831a329c0 100644 --- a/core/res/res/values-da/strings.xml +++ b/core/res/res/values-da/strings.xml @@ -1710,6 +1710,10 @@ <string name="accessibility_service_action_perform_description" msgid="2718852014003170558">"Den kan spore dine interaktioner med en app eller en hardwaresensor og interagere med apps på dine vegne."</string> <string name="accessibility_dialog_button_allow" msgid="2092558122987144530">"Tillad"</string> <string name="accessibility_dialog_button_deny" msgid="4129575637812472671">"Afvis"</string> + <!-- no translation found for accessibility_dialog_button_uninstall (2952465517671708108) --> + <skip /> + <!-- no translation found for accessibility_dialog_touch_filtered_warning (3741940116597822451) --> + <skip /> <string name="accessibility_select_shortcut_menu_title" msgid="6002726538854613272">"Tryk på en funktion for at bruge den:"</string> <string name="accessibility_edit_shortcut_menu_button_title" msgid="239446795930436325">"Vælg, hvilke funktioner du vil bruge med knappen til hjælpefunktioner"</string> <string name="accessibility_edit_shortcut_menu_volume_title" msgid="1077294237378645981">"Vælg de funktioner, du vil bruge via lydstyrkeknapperne"</string> @@ -1904,6 +1908,10 @@ <string name="zen_mode_default_weekends_name" msgid="4707200272709377930">"Weekend"</string> <string name="zen_mode_default_events_name" msgid="2280682960128512257">"Begivenhed"</string> <string name="zen_mode_default_every_night_name" msgid="1467765312174275823">"Sover"</string> + <!-- no translation found for zen_mode_implicit_activated (2634285680776672994) --> + <skip /> + <!-- no translation found for zen_mode_implicit_deactivated (8688441768371501750) --> + <skip /> <string name="muted_by" msgid="91464083490094950">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> slår nogle lyde fra"</string> <string name="system_error_wipe_data" msgid="5910572292172208493">"Der er et internt problem med enheden, og den vil muligvis være ustabil, indtil du gendanner fabriksdataene."</string> <string name="system_error_manufacturer" msgid="703545241070116315">"Der er et internt problem med enheden. Kontakt producenten for at få yderligere oplysninger."</string> @@ -2336,6 +2344,8 @@ <string name="mic_access_off_toast" msgid="8111040892954242437">"Mikrofonen er blokeret"</string> <string name="connected_display_unavailable_notification_title" msgid="5265409360902073556">"Det er ikke muligt at spejle til skærmen"</string> <string name="connected_display_unavailable_notification_content" msgid="3845903313751217516">"Brug et andet kabel, og prøv igen"</string> + <!-- no translation found for connected_display_thermally_unavailable_notification_content (9205758199439955949) --> + <skip /> <string name="connected_display_cable_dont_support_displays_notification_title" msgid="8477183783847392465">"Kablet understøtter muligvis ikke skærme"</string> <string name="connected_display_cable_dont_support_displays_notification_content" msgid="8080498819171483973">"Dit USB-C-kabel kan muligvis ikke sluttes korrekt til skærmene"</string> <string name="concurrent_display_notification_name" msgid="1526911253558311131">"Dual Screen"</string> diff --git a/core/res/res/values-de/strings.xml b/core/res/res/values-de/strings.xml index f8eb0a0655d7..56816fbfd346 100644 --- a/core/res/res/values-de/strings.xml +++ b/core/res/res/values-de/strings.xml @@ -1710,6 +1710,10 @@ <string name="accessibility_service_action_perform_description" msgid="2718852014003170558">"Die Funktion kann deine Interaktionen mit einer App oder einem Hardwaresensor verfolgen und in deinem Namen mit Apps interagieren."</string> <string name="accessibility_dialog_button_allow" msgid="2092558122987144530">"Zulassen"</string> <string name="accessibility_dialog_button_deny" msgid="4129575637812472671">"Ablehnen"</string> + <!-- no translation found for accessibility_dialog_button_uninstall (2952465517671708108) --> + <skip /> + <!-- no translation found for accessibility_dialog_touch_filtered_warning (3741940116597822451) --> + <skip /> <string name="accessibility_select_shortcut_menu_title" msgid="6002726538854613272">"Zum Auswählen der gewünschten Funktion tippen:"</string> <string name="accessibility_edit_shortcut_menu_button_title" msgid="239446795930436325">"Funktionen auswählen, die du mit der Schaltfläche \"Bedienungshilfen\" verwenden möchtest"</string> <string name="accessibility_edit_shortcut_menu_volume_title" msgid="1077294237378645981">"Funktionen für Verknüpfung mit Lautstärketaste auswählen"</string> @@ -1904,6 +1908,10 @@ <string name="zen_mode_default_weekends_name" msgid="4707200272709377930">"Wochenende"</string> <string name="zen_mode_default_events_name" msgid="2280682960128512257">"Termin"</string> <string name="zen_mode_default_every_night_name" msgid="1467765312174275823">"Schlafen"</string> + <!-- no translation found for zen_mode_implicit_activated (2634285680776672994) --> + <skip /> + <!-- no translation found for zen_mode_implicit_deactivated (8688441768371501750) --> + <skip /> <string name="muted_by" msgid="91464083490094950">"Einige Töne werden von <xliff:g id="THIRD_PARTY">%1$s</xliff:g> stummgeschaltet"</string> <string name="system_error_wipe_data" msgid="5910572292172208493">"Es liegt ein internes Problem mit deinem Gerät vor. Möglicherweise verhält es sich instabil, bis du es auf die Werkseinstellungen zurücksetzt."</string> <string name="system_error_manufacturer" msgid="703545241070116315">"Es liegt ein internes Problem mit deinem Gerät vor. Bitte wende dich diesbezüglich an den Hersteller."</string> @@ -2336,6 +2344,8 @@ <string name="mic_access_off_toast" msgid="8111040892954242437">"Mikrofon ist blockiert"</string> <string name="connected_display_unavailable_notification_title" msgid="5265409360902073556">"Kann nicht auf das Display gespiegelt werden"</string> <string name="connected_display_unavailable_notification_content" msgid="3845903313751217516">"Verwende ein anderes Kabel und versuch es noch einmal"</string> + <!-- no translation found for connected_display_thermally_unavailable_notification_content (9205758199439955949) --> + <skip /> <string name="connected_display_cable_dont_support_displays_notification_title" msgid="8477183783847392465">"Kabel unterstützt eventuell keine Bildschirme"</string> <string name="connected_display_cable_dont_support_displays_notification_content" msgid="8080498819171483973">"Dein USB-C-Kabel ist möglicherweise nicht zum Verbinden von Bildschirmen geeignet"</string> <string name="concurrent_display_notification_name" msgid="1526911253558311131">"Dual Screen"</string> diff --git a/core/res/res/values-el/strings.xml b/core/res/res/values-el/strings.xml index af53ddfcfee8..7784e952ed3d 100644 --- a/core/res/res/values-el/strings.xml +++ b/core/res/res/values-el/strings.xml @@ -1710,6 +1710,10 @@ <string name="accessibility_service_action_perform_description" msgid="2718852014003170558">"Μπορεί να παρακολουθήσει τις αλληλεπιδράσεις σας με μια εφαρμογή ή έναν αισθητήρα εξοπλισμού και να αλληλεπιδράσει με εφαρμογές εκ μέρους σας."</string> <string name="accessibility_dialog_button_allow" msgid="2092558122987144530">"Ναι"</string> <string name="accessibility_dialog_button_deny" msgid="4129575637812472671">"Όχι"</string> + <!-- no translation found for accessibility_dialog_button_uninstall (2952465517671708108) --> + <skip /> + <!-- no translation found for accessibility_dialog_touch_filtered_warning (3741940116597822451) --> + <skip /> <string name="accessibility_select_shortcut_menu_title" msgid="6002726538854613272">"Πατήστε μια λειτουργία για να ξεκινήσετε να τη χρησιμοποιείτε:"</string> <string name="accessibility_edit_shortcut_menu_button_title" msgid="239446795930436325">"Επιλέξτε τις λειτουργίες που θέλετε να χρησιμοποιείτε με το κουμπί προσβασιμότητας."</string> <string name="accessibility_edit_shortcut_menu_volume_title" msgid="1077294237378645981">"Επιλέξτε τις λειτουργίες που θέλετε να χρησιμοποιείτε με τη συντόμευση κουμπιού έντασης ήχου"</string> @@ -1904,6 +1908,10 @@ <string name="zen_mode_default_weekends_name" msgid="4707200272709377930">"Σαββατοκύριακο"</string> <string name="zen_mode_default_events_name" msgid="2280682960128512257">"Συμβάν"</string> <string name="zen_mode_default_every_night_name" msgid="1467765312174275823">"Ύπνος"</string> + <!-- no translation found for zen_mode_implicit_activated (2634285680776672994) --> + <skip /> + <!-- no translation found for zen_mode_implicit_deactivated (8688441768371501750) --> + <skip /> <string name="muted_by" msgid="91464083490094950">"Το τρίτο μέρος <xliff:g id="THIRD_PARTY">%1$s</xliff:g> θέτει ορισμένους ήχους σε σίγαση"</string> <string name="system_error_wipe_data" msgid="5910572292172208493">"Υπάρχει ένα εσωτερικό πρόβλημα με τη συσκευή σας και ενδέχεται να είναι ασταθής μέχρι την επαναφορά των εργοστασιακών ρυθμίσεων."</string> <string name="system_error_manufacturer" msgid="703545241070116315">"Υπάρχει ένα εσωτερικό πρόβλημα με τη συσκευή σας. Επικοινωνήστε με τον κατασκευαστή σας για λεπτομέρειες."</string> @@ -2336,6 +2344,8 @@ <string name="mic_access_off_toast" msgid="8111040892954242437">"Το μικρόφωνο έχει αποκλειστεί"</string> <string name="connected_display_unavailable_notification_title" msgid="5265409360902073556">"Δεν είναι δυνατός ο κατοπτρισμός στην οθόνη"</string> <string name="connected_display_unavailable_notification_content" msgid="3845903313751217516">"Χρησιμοποιήστε άλλο καλώδιο και δοκιμάστε ξανά"</string> + <!-- no translation found for connected_display_thermally_unavailable_notification_content (9205758199439955949) --> + <skip /> <string name="connected_display_cable_dont_support_displays_notification_title" msgid="8477183783847392465">"Το καλώδιο μπορεί να μην υποστηρίζει οθόνες"</string> <string name="connected_display_cable_dont_support_displays_notification_content" msgid="8080498819171483973">"Το καλώδιο USB-C που έχετε ίσως να μην μπορεί να συνδεθεί σωστά σε οθόνες"</string> <string name="concurrent_display_notification_name" msgid="1526911253558311131">"Διπλή οθόνη"</string> diff --git a/core/res/res/values-en-rAU/strings.xml b/core/res/res/values-en-rAU/strings.xml index 8917a8203285..72f907cd9484 100644 --- a/core/res/res/values-en-rAU/strings.xml +++ b/core/res/res/values-en-rAU/strings.xml @@ -1710,6 +1710,10 @@ <string name="accessibility_service_action_perform_description" msgid="2718852014003170558">"It can track your interactions with an app or a hardware sensor, and interact with apps on your behalf."</string> <string name="accessibility_dialog_button_allow" msgid="2092558122987144530">"Allow"</string> <string name="accessibility_dialog_button_deny" msgid="4129575637812472671">"Deny"</string> + <!-- no translation found for accessibility_dialog_button_uninstall (2952465517671708108) --> + <skip /> + <!-- no translation found for accessibility_dialog_touch_filtered_warning (3741940116597822451) --> + <skip /> <string name="accessibility_select_shortcut_menu_title" msgid="6002726538854613272">"Tap a feature to start using it:"</string> <string name="accessibility_edit_shortcut_menu_button_title" msgid="239446795930436325">"Choose features to use with the Accessibility button"</string> <string name="accessibility_edit_shortcut_menu_volume_title" msgid="1077294237378645981">"Choose features to use with the volume key shortcut"</string> @@ -1904,6 +1908,10 @@ <string name="zen_mode_default_weekends_name" msgid="4707200272709377930">"Weekend"</string> <string name="zen_mode_default_events_name" msgid="2280682960128512257">"Event"</string> <string name="zen_mode_default_every_night_name" msgid="1467765312174275823">"Sleeping"</string> + <!-- no translation found for zen_mode_implicit_activated (2634285680776672994) --> + <skip /> + <!-- no translation found for zen_mode_implicit_deactivated (8688441768371501750) --> + <skip /> <string name="muted_by" msgid="91464083490094950">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> is muting some sounds"</string> <string name="system_error_wipe_data" msgid="5910572292172208493">"There\'s an internal problem with your device, and it may be unstable until you factory data reset."</string> <string name="system_error_manufacturer" msgid="703545241070116315">"There\'s an internal problem with your device. Contact your manufacturer for details."</string> @@ -2336,6 +2344,8 @@ <string name="mic_access_off_toast" msgid="8111040892954242437">"Microphone is blocked"</string> <string name="connected_display_unavailable_notification_title" msgid="5265409360902073556">"Can\'t mirror to display"</string> <string name="connected_display_unavailable_notification_content" msgid="3845903313751217516">"Please use a different cable and try again"</string> + <!-- no translation found for connected_display_thermally_unavailable_notification_content (9205758199439955949) --> + <skip /> <string name="connected_display_cable_dont_support_displays_notification_title" msgid="8477183783847392465">"Cable may not support displays"</string> <string name="connected_display_cable_dont_support_displays_notification_content" msgid="8080498819171483973">"Your USB-C cable may not connect to displays properly"</string> <string name="concurrent_display_notification_name" msgid="1526911253558311131">"Dual Screen"</string> diff --git a/core/res/res/values-en-rCA/strings.xml b/core/res/res/values-en-rCA/strings.xml index 5a0ed859e441..3381e97a06d8 100644 --- a/core/res/res/values-en-rCA/strings.xml +++ b/core/res/res/values-en-rCA/strings.xml @@ -1710,6 +1710,10 @@ <string name="accessibility_service_action_perform_description" msgid="2718852014003170558">"It can track your interactions with an app or a hardware sensor and interact with apps on your behalf."</string> <string name="accessibility_dialog_button_allow" msgid="2092558122987144530">"Allow"</string> <string name="accessibility_dialog_button_deny" msgid="4129575637812472671">"Deny"</string> + <!-- no translation found for accessibility_dialog_button_uninstall (2952465517671708108) --> + <skip /> + <!-- no translation found for accessibility_dialog_touch_filtered_warning (3741940116597822451) --> + <skip /> <string name="accessibility_select_shortcut_menu_title" msgid="6002726538854613272">"Tap a feature to start using it:"</string> <string name="accessibility_edit_shortcut_menu_button_title" msgid="239446795930436325">"Choose features to use with the accessibility button"</string> <string name="accessibility_edit_shortcut_menu_volume_title" msgid="1077294237378645981">"Choose features to use with the volume key shortcut"</string> @@ -1904,6 +1908,8 @@ <string name="zen_mode_default_weekends_name" msgid="4707200272709377930">"Weekend"</string> <string name="zen_mode_default_events_name" msgid="2280682960128512257">"Event"</string> <string name="zen_mode_default_every_night_name" msgid="1467765312174275823">"Sleeping"</string> + <string name="zen_mode_implicit_activated" msgid="2634285680776672994">"On"</string> + <string name="zen_mode_implicit_deactivated" msgid="8688441768371501750">"Off"</string> <string name="muted_by" msgid="91464083490094950">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> is muting some sounds"</string> <string name="system_error_wipe_data" msgid="5910572292172208493">"There\'s an internal problem with your device, and it may be unstable until you factory data reset."</string> <string name="system_error_manufacturer" msgid="703545241070116315">"There\'s an internal problem with your device. Contact your manufacturer for details."</string> @@ -2336,6 +2342,7 @@ <string name="mic_access_off_toast" msgid="8111040892954242437">"Microphone is blocked"</string> <string name="connected_display_unavailable_notification_title" msgid="5265409360902073556">"Can\'t mirror to display"</string> <string name="connected_display_unavailable_notification_content" msgid="3845903313751217516">"Use a different cable and try again"</string> + <string name="connected_display_thermally_unavailable_notification_content" msgid="9205758199439955949">"Your device is too warm and can\'t mirror to the display until it cools down"</string> <string name="connected_display_cable_dont_support_displays_notification_title" msgid="8477183783847392465">"Cable may not support displays"</string> <string name="connected_display_cable_dont_support_displays_notification_content" msgid="8080498819171483973">"Your USB-C cable may not connect to displays properly"</string> <string name="concurrent_display_notification_name" msgid="1526911253558311131">"Dual screen"</string> diff --git a/core/res/res/values-en-rGB/strings.xml b/core/res/res/values-en-rGB/strings.xml index bcf0790bae59..6975a65451c0 100644 --- a/core/res/res/values-en-rGB/strings.xml +++ b/core/res/res/values-en-rGB/strings.xml @@ -1710,6 +1710,10 @@ <string name="accessibility_service_action_perform_description" msgid="2718852014003170558">"It can track your interactions with an app or a hardware sensor, and interact with apps on your behalf."</string> <string name="accessibility_dialog_button_allow" msgid="2092558122987144530">"Allow"</string> <string name="accessibility_dialog_button_deny" msgid="4129575637812472671">"Deny"</string> + <!-- no translation found for accessibility_dialog_button_uninstall (2952465517671708108) --> + <skip /> + <!-- no translation found for accessibility_dialog_touch_filtered_warning (3741940116597822451) --> + <skip /> <string name="accessibility_select_shortcut_menu_title" msgid="6002726538854613272">"Tap a feature to start using it:"</string> <string name="accessibility_edit_shortcut_menu_button_title" msgid="239446795930436325">"Choose features to use with the Accessibility button"</string> <string name="accessibility_edit_shortcut_menu_volume_title" msgid="1077294237378645981">"Choose features to use with the volume key shortcut"</string> @@ -1904,6 +1908,10 @@ <string name="zen_mode_default_weekends_name" msgid="4707200272709377930">"Weekend"</string> <string name="zen_mode_default_events_name" msgid="2280682960128512257">"Event"</string> <string name="zen_mode_default_every_night_name" msgid="1467765312174275823">"Sleeping"</string> + <!-- no translation found for zen_mode_implicit_activated (2634285680776672994) --> + <skip /> + <!-- no translation found for zen_mode_implicit_deactivated (8688441768371501750) --> + <skip /> <string name="muted_by" msgid="91464083490094950">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> is muting some sounds"</string> <string name="system_error_wipe_data" msgid="5910572292172208493">"There\'s an internal problem with your device, and it may be unstable until you factory data reset."</string> <string name="system_error_manufacturer" msgid="703545241070116315">"There\'s an internal problem with your device. Contact your manufacturer for details."</string> @@ -2336,6 +2344,8 @@ <string name="mic_access_off_toast" msgid="8111040892954242437">"Microphone is blocked"</string> <string name="connected_display_unavailable_notification_title" msgid="5265409360902073556">"Can\'t mirror to display"</string> <string name="connected_display_unavailable_notification_content" msgid="3845903313751217516">"Please use a different cable and try again"</string> + <!-- no translation found for connected_display_thermally_unavailable_notification_content (9205758199439955949) --> + <skip /> <string name="connected_display_cable_dont_support_displays_notification_title" msgid="8477183783847392465">"Cable may not support displays"</string> <string name="connected_display_cable_dont_support_displays_notification_content" msgid="8080498819171483973">"Your USB-C cable may not connect to displays properly"</string> <string name="concurrent_display_notification_name" msgid="1526911253558311131">"Dual Screen"</string> diff --git a/core/res/res/values-en-rIN/strings.xml b/core/res/res/values-en-rIN/strings.xml index 7ebffc6895c7..8f63abda4505 100644 --- a/core/res/res/values-en-rIN/strings.xml +++ b/core/res/res/values-en-rIN/strings.xml @@ -1710,6 +1710,10 @@ <string name="accessibility_service_action_perform_description" msgid="2718852014003170558">"It can track your interactions with an app or a hardware sensor, and interact with apps on your behalf."</string> <string name="accessibility_dialog_button_allow" msgid="2092558122987144530">"Allow"</string> <string name="accessibility_dialog_button_deny" msgid="4129575637812472671">"Deny"</string> + <!-- no translation found for accessibility_dialog_button_uninstall (2952465517671708108) --> + <skip /> + <!-- no translation found for accessibility_dialog_touch_filtered_warning (3741940116597822451) --> + <skip /> <string name="accessibility_select_shortcut_menu_title" msgid="6002726538854613272">"Tap a feature to start using it:"</string> <string name="accessibility_edit_shortcut_menu_button_title" msgid="239446795930436325">"Choose features to use with the Accessibility button"</string> <string name="accessibility_edit_shortcut_menu_volume_title" msgid="1077294237378645981">"Choose features to use with the volume key shortcut"</string> @@ -1904,6 +1908,10 @@ <string name="zen_mode_default_weekends_name" msgid="4707200272709377930">"Weekend"</string> <string name="zen_mode_default_events_name" msgid="2280682960128512257">"Event"</string> <string name="zen_mode_default_every_night_name" msgid="1467765312174275823">"Sleeping"</string> + <!-- no translation found for zen_mode_implicit_activated (2634285680776672994) --> + <skip /> + <!-- no translation found for zen_mode_implicit_deactivated (8688441768371501750) --> + <skip /> <string name="muted_by" msgid="91464083490094950">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> is muting some sounds"</string> <string name="system_error_wipe_data" msgid="5910572292172208493">"There\'s an internal problem with your device, and it may be unstable until you factory data reset."</string> <string name="system_error_manufacturer" msgid="703545241070116315">"There\'s an internal problem with your device. Contact your manufacturer for details."</string> @@ -2336,6 +2344,8 @@ <string name="mic_access_off_toast" msgid="8111040892954242437">"Microphone is blocked"</string> <string name="connected_display_unavailable_notification_title" msgid="5265409360902073556">"Can\'t mirror to display"</string> <string name="connected_display_unavailable_notification_content" msgid="3845903313751217516">"Please use a different cable and try again"</string> + <!-- no translation found for connected_display_thermally_unavailable_notification_content (9205758199439955949) --> + <skip /> <string name="connected_display_cable_dont_support_displays_notification_title" msgid="8477183783847392465">"Cable may not support displays"</string> <string name="connected_display_cable_dont_support_displays_notification_content" msgid="8080498819171483973">"Your USB-C cable may not connect to displays properly"</string> <string name="concurrent_display_notification_name" msgid="1526911253558311131">"Dual Screen"</string> diff --git a/core/res/res/values-en-rXC/strings.xml b/core/res/res/values-en-rXC/strings.xml index b739768c2068..ac2d58c77efa 100644 --- a/core/res/res/values-en-rXC/strings.xml +++ b/core/res/res/values-en-rXC/strings.xml @@ -1710,6 +1710,10 @@ <string name="accessibility_service_action_perform_description" msgid="2718852014003170558">"It can track your interactions with an app or a hardware sensor, and interact with apps on your behalf."</string> <string name="accessibility_dialog_button_allow" msgid="2092558122987144530">"Allow"</string> <string name="accessibility_dialog_button_deny" msgid="4129575637812472671">"Deny"</string> + <!-- no translation found for accessibility_dialog_button_uninstall (2952465517671708108) --> + <skip /> + <!-- no translation found for accessibility_dialog_touch_filtered_warning (3741940116597822451) --> + <skip /> <string name="accessibility_select_shortcut_menu_title" msgid="6002726538854613272">"Tap a feature to start using it:"</string> <string name="accessibility_edit_shortcut_menu_button_title" msgid="239446795930436325">"Choose features to use with the accessibility button"</string> <string name="accessibility_edit_shortcut_menu_volume_title" msgid="1077294237378645981">"Choose features to use with the volume key shortcut"</string> @@ -1904,6 +1908,8 @@ <string name="zen_mode_default_weekends_name" msgid="4707200272709377930">"Weekend"</string> <string name="zen_mode_default_events_name" msgid="2280682960128512257">"Event"</string> <string name="zen_mode_default_every_night_name" msgid="1467765312174275823">"Sleeping"</string> + <string name="zen_mode_implicit_activated" msgid="2634285680776672994">"On"</string> + <string name="zen_mode_implicit_deactivated" msgid="8688441768371501750">"Off"</string> <string name="muted_by" msgid="91464083490094950">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> is muting some sounds"</string> <string name="system_error_wipe_data" msgid="5910572292172208493">"There\'s an internal problem with your device, and it may be unstable until you factory data reset."</string> <string name="system_error_manufacturer" msgid="703545241070116315">"There\'s an internal problem with your device. Contact your manufacturer for details."</string> @@ -2336,6 +2342,7 @@ <string name="mic_access_off_toast" msgid="8111040892954242437">"Microphone is blocked"</string> <string name="connected_display_unavailable_notification_title" msgid="5265409360902073556">"Can\'t mirror to display"</string> <string name="connected_display_unavailable_notification_content" msgid="3845903313751217516">"Use a different cable and try again"</string> + <string name="connected_display_thermally_unavailable_notification_content" msgid="9205758199439955949">"Your device is too warm and can\'t mirror to the display until it cools down"</string> <string name="connected_display_cable_dont_support_displays_notification_title" msgid="8477183783847392465">"Cable may not support displays"</string> <string name="connected_display_cable_dont_support_displays_notification_content" msgid="8080498819171483973">"Your USB-C cable may not connect to displays properly"</string> <string name="concurrent_display_notification_name" msgid="1526911253558311131">"Dual screen"</string> diff --git a/core/res/res/values-es-rUS/strings.xml b/core/res/res/values-es-rUS/strings.xml index ca9ff13550d3..cd83e421c92e 100644 --- a/core/res/res/values-es-rUS/strings.xml +++ b/core/res/res/values-es-rUS/strings.xml @@ -1711,6 +1711,10 @@ <string name="accessibility_service_action_perform_description" msgid="2718852014003170558">"Puede realizar el seguimiento de tus interacciones con una app o un sensor de hardware, así como interactuar con las apps por ti."</string> <string name="accessibility_dialog_button_allow" msgid="2092558122987144530">"Permitir"</string> <string name="accessibility_dialog_button_deny" msgid="4129575637812472671">"Rechazar"</string> + <!-- no translation found for accessibility_dialog_button_uninstall (2952465517671708108) --> + <skip /> + <!-- no translation found for accessibility_dialog_touch_filtered_warning (3741940116597822451) --> + <skip /> <string name="accessibility_select_shortcut_menu_title" msgid="6002726538854613272">"Presiona una función para comenzar a usarla:"</string> <string name="accessibility_edit_shortcut_menu_button_title" msgid="239446795930436325">"Selecciona las funciones a utilizar con el botón de accesibilidad"</string> <string name="accessibility_edit_shortcut_menu_volume_title" msgid="1077294237378645981">"Selecciona las funciones a usar con las teclas de volumen"</string> @@ -1905,6 +1909,10 @@ <string name="zen_mode_default_weekends_name" msgid="4707200272709377930">"Fin de semana"</string> <string name="zen_mode_default_events_name" msgid="2280682960128512257">"Evento"</string> <string name="zen_mode_default_every_night_name" msgid="1467765312174275823">"Dormir"</string> + <!-- no translation found for zen_mode_implicit_activated (2634285680776672994) --> + <skip /> + <!-- no translation found for zen_mode_implicit_deactivated (8688441768371501750) --> + <skip /> <string name="muted_by" msgid="91464083490094950">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> silencia algunos sonidos"</string> <string name="system_error_wipe_data" msgid="5910572292172208493">"Existe un problema interno con el dispositivo, de modo que el dispositivo puede estar inestable hasta que restablezcas la configuración de fábrica."</string> <string name="system_error_manufacturer" msgid="703545241070116315">"Existe un problema interno con el dispositivo. Comunícate con el fabricante para obtener más información."</string> @@ -2337,6 +2345,8 @@ <string name="mic_access_off_toast" msgid="8111040892954242437">"El micrófono está bloqueado"</string> <string name="connected_display_unavailable_notification_title" msgid="5265409360902073556">"No se puede duplicar la pantalla"</string> <string name="connected_display_unavailable_notification_content" msgid="3845903313751217516">"Usa un cable diferente y vuelve a intentarlo"</string> + <!-- no translation found for connected_display_thermally_unavailable_notification_content (9205758199439955949) --> + <skip /> <string name="connected_display_cable_dont_support_displays_notification_title" msgid="8477183783847392465">"Es posible que el cable no admita pantallas"</string> <string name="connected_display_cable_dont_support_displays_notification_content" msgid="8080498819171483973">"Es posible que el cable USB-C no se conecte a las pantallas de manera adecuada"</string> <string name="concurrent_display_notification_name" msgid="1526911253558311131">"Dual Screen"</string> diff --git a/core/res/res/values-es/strings.xml b/core/res/res/values-es/strings.xml index b76229a8563f..bfd877eb443f 100644 --- a/core/res/res/values-es/strings.xml +++ b/core/res/res/values-es/strings.xml @@ -1711,6 +1711,10 @@ <string name="accessibility_service_action_perform_description" msgid="2718852014003170558">"Puede registrar tus interacciones con una aplicación o un sensor de hardware, así como interactuar con las aplicaciones en tu nombre."</string> <string name="accessibility_dialog_button_allow" msgid="2092558122987144530">"Permitir"</string> <string name="accessibility_dialog_button_deny" msgid="4129575637812472671">"Denegar"</string> + <!-- no translation found for accessibility_dialog_button_uninstall (2952465517671708108) --> + <skip /> + <!-- no translation found for accessibility_dialog_touch_filtered_warning (3741940116597822451) --> + <skip /> <string name="accessibility_select_shortcut_menu_title" msgid="6002726538854613272">"Toca una función para empezar a usarla:"</string> <string name="accessibility_edit_shortcut_menu_button_title" msgid="239446795930436325">"Selecciona qué funciones usar con el botón de accesibilidad"</string> <string name="accessibility_edit_shortcut_menu_volume_title" msgid="1077294237378645981">"Selecciona qué funciones usar con la tecla de volumen"</string> @@ -1905,6 +1909,10 @@ <string name="zen_mode_default_weekends_name" msgid="4707200272709377930">"Fin de semana"</string> <string name="zen_mode_default_events_name" msgid="2280682960128512257">"Evento"</string> <string name="zen_mode_default_every_night_name" msgid="1467765312174275823">"Durmiendo"</string> + <!-- no translation found for zen_mode_implicit_activated (2634285680776672994) --> + <skip /> + <!-- no translation found for zen_mode_implicit_deactivated (8688441768371501750) --> + <skip /> <string name="muted_by" msgid="91464083490094950">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> silencia algunos sonidos"</string> <string name="system_error_wipe_data" msgid="5910572292172208493">"Se ha producido un problema interno en el dispositivo y es posible que este no sea estable hasta que restablezcas el estado de fábrica."</string> <string name="system_error_manufacturer" msgid="703545241070116315">"Se ha producido un problema interno en el dispositivo. Ponte en contacto con el fabricante para obtener más información."</string> @@ -2337,6 +2345,8 @@ <string name="mic_access_off_toast" msgid="8111040892954242437">"El micrófono está bloqueado"</string> <string name="connected_display_unavailable_notification_title" msgid="5265409360902073556">"No se puede proyectar a la pantalla"</string> <string name="connected_display_unavailable_notification_content" msgid="3845903313751217516">"Usa otro cable y vuelve a intentarlo"</string> + <!-- no translation found for connected_display_thermally_unavailable_notification_content (9205758199439955949) --> + <skip /> <string name="connected_display_cable_dont_support_displays_notification_title" msgid="8477183783847392465">"El cable puede no ser compatible con pantallas"</string> <string name="connected_display_cable_dont_support_displays_notification_content" msgid="8080498819171483973">"Puede que tu cable USB‑C no sea adecuado para conectarse a pantallas"</string> <string name="concurrent_display_notification_name" msgid="1526911253558311131">"Dual Screen"</string> diff --git a/core/res/res/values-et/strings.xml b/core/res/res/values-et/strings.xml index 4a8666ee1459..dbb7663e0d0e 100644 --- a/core/res/res/values-et/strings.xml +++ b/core/res/res/values-et/strings.xml @@ -1710,6 +1710,10 @@ <string name="accessibility_service_action_perform_description" msgid="2718852014003170558">"See saab jälgida teie suhtlust rakenduse või riistvaraanduriga ja teie eest rakendustega suhelda."</string> <string name="accessibility_dialog_button_allow" msgid="2092558122987144530">"Luba"</string> <string name="accessibility_dialog_button_deny" msgid="4129575637812472671">"Keela"</string> + <!-- no translation found for accessibility_dialog_button_uninstall (2952465517671708108) --> + <skip /> + <!-- no translation found for accessibility_dialog_touch_filtered_warning (3741940116597822451) --> + <skip /> <string name="accessibility_select_shortcut_menu_title" msgid="6002726538854613272">"Puudutage funktsiooni, et selle kasutamist alustada."</string> <string name="accessibility_edit_shortcut_menu_button_title" msgid="239446795930436325">"Valige funktsioonid, mida juurdepääsetavuse nupuga kasutada"</string> <string name="accessibility_edit_shortcut_menu_volume_title" msgid="1077294237378645981">"Valige helitugevuse nupu otsetee funktsioonid"</string> @@ -1904,6 +1908,10 @@ <string name="zen_mode_default_weekends_name" msgid="4707200272709377930">"Nädalavahetus"</string> <string name="zen_mode_default_events_name" msgid="2280682960128512257">"Sündmus"</string> <string name="zen_mode_default_every_night_name" msgid="1467765312174275823">"Magamine"</string> + <!-- no translation found for zen_mode_implicit_activated (2634285680776672994) --> + <skip /> + <!-- no translation found for zen_mode_implicit_deactivated (8688441768371501750) --> + <skip /> <string name="muted_by" msgid="91464083490094950">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> vaigistab teatud helid"</string> <string name="system_error_wipe_data" msgid="5910572292172208493">"Seadmes ilmnes sisemine probleem ja seade võib olla ebastabiilne seni, kuni lähtestate seadme tehase andmetele."</string> <string name="system_error_manufacturer" msgid="703545241070116315">"Seadmes ilmnes sisemine probleem. Üksikasjaliku teabe saamiseks võtke ühendust tootjaga."</string> @@ -2336,6 +2344,8 @@ <string name="mic_access_off_toast" msgid="8111040892954242437">"Mikrofon on blokeeritud"</string> <string name="connected_display_unavailable_notification_title" msgid="5265409360902073556">"Ei saa ekraanile peegeldada"</string> <string name="connected_display_unavailable_notification_content" msgid="3845903313751217516">"Kasutage teist kaablit ja proovige uuesti"</string> + <!-- no translation found for connected_display_thermally_unavailable_notification_content (9205758199439955949) --> + <skip /> <string name="connected_display_cable_dont_support_displays_notification_title" msgid="8477183783847392465">"Kaabel ei pruugi ekraane toetada"</string> <string name="connected_display_cable_dont_support_displays_notification_content" msgid="8080498819171483973">"Teie USB-C-kaabel ei pruugi ekraanidega õigesti ühendust luua"</string> <string name="concurrent_display_notification_name" msgid="1526911253558311131">"Dual Screen"</string> diff --git a/core/res/res/values-eu/strings.xml b/core/res/res/values-eu/strings.xml index 86eaf0a08e1d..a35236f9dd5c 100644 --- a/core/res/res/values-eu/strings.xml +++ b/core/res/res/values-eu/strings.xml @@ -1710,6 +1710,10 @@ <string name="accessibility_service_action_perform_description" msgid="2718852014003170558">"Aplikazioekin edo hardware-sentsoreekin dituzun interakzioen jarraipena egin dezake, eta zure izenean beste aplikazio batzuekin interakzioan jardun."</string> <string name="accessibility_dialog_button_allow" msgid="2092558122987144530">"Baimendu"</string> <string name="accessibility_dialog_button_deny" msgid="4129575637812472671">"Ukatu"</string> + <!-- no translation found for accessibility_dialog_button_uninstall (2952465517671708108) --> + <skip /> + <!-- no translation found for accessibility_dialog_touch_filtered_warning (3741940116597822451) --> + <skip /> <string name="accessibility_select_shortcut_menu_title" msgid="6002726538854613272">"Eginbide bat erabiltzen hasteko, saka ezazu:"</string> <string name="accessibility_edit_shortcut_menu_button_title" msgid="239446795930436325">"Aukeratu zein eginbide erabili nahi duzun Erabilerraztasuna botoiarekin"</string> <string name="accessibility_edit_shortcut_menu_volume_title" msgid="1077294237378645981">"Aukeratu zein eginbide erabili nahi duzun bolumen-botoien lasterbidearekin"</string> @@ -1904,6 +1908,10 @@ <string name="zen_mode_default_weekends_name" msgid="4707200272709377930">"Asteburua"</string> <string name="zen_mode_default_events_name" msgid="2280682960128512257">"Gertaera"</string> <string name="zen_mode_default_every_night_name" msgid="1467765312174275823">"Lo egiteko"</string> + <!-- no translation found for zen_mode_implicit_activated (2634285680776672994) --> + <skip /> + <!-- no translation found for zen_mode_implicit_deactivated (8688441768371501750) --> + <skip /> <string name="muted_by" msgid="91464083490094950">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> soinu batzuk isilarazten ari da"</string> <string name="system_error_wipe_data" msgid="5910572292172208493">"Barneko arazo bat dago zure gailuan eta agian ezegonkor egongo da jatorrizko datuak berrezartzen dituzun arte."</string> <string name="system_error_manufacturer" msgid="703545241070116315">"Barneko arazo bat dago zure gailuan. Xehetasunak jakiteko, jarri fabrikatzailearekin harremanetan."</string> @@ -2336,6 +2344,8 @@ <string name="mic_access_off_toast" msgid="8111040892954242437">"Blokeatuta dago mikrofonoa"</string> <string name="connected_display_unavailable_notification_title" msgid="5265409360902073556">"Ezin da islatu pantailan"</string> <string name="connected_display_unavailable_notification_content" msgid="3845903313751217516">"Erabili beste kable bat eta saiatu berriro"</string> + <!-- no translation found for connected_display_thermally_unavailable_notification_content (9205758199439955949) --> + <skip /> <string name="connected_display_cable_dont_support_displays_notification_title" msgid="8477183783847392465">"Baliteke kablea pantailekin bateragarria ez izatea"</string> <string name="connected_display_cable_dont_support_displays_notification_content" msgid="8080498819171483973">"Baliteke USB-C kablea behar bezala ez konektatzea pantailetara"</string> <string name="concurrent_display_notification_name" msgid="1526911253558311131">"Dual Screen"</string> diff --git a/core/res/res/values-fa/strings.xml b/core/res/res/values-fa/strings.xml index c5a2ee62d891..c9df9d1fbd53 100644 --- a/core/res/res/values-fa/strings.xml +++ b/core/res/res/values-fa/strings.xml @@ -166,7 +166,7 @@ <string name="httpErrorTimeout" msgid="7446272815190334204">"زمان اتصال به سرور تمام شده است."</string> <string name="httpErrorRedirectLoop" msgid="8455757777509512098">"این صفحه دارای تعداد بسیار زیادی تغییر مسیر سرور است."</string> <string name="httpErrorUnsupportedScheme" msgid="2664108769858966374">"پروتکل پشتیبانی نمیشود."</string> - <string name="httpErrorFailedSslHandshake" msgid="546319061228876290">"اتصال امن ایجاد نشد."</string> + <string name="httpErrorFailedSslHandshake" msgid="546319061228876290">"اتصال ایمن ایجاد نشد."</string> <string name="httpErrorBadUrl" msgid="754447723314832538">"بهدلیل نامعتبر بودن نشانی اینترنتی، صفحه باز نمیشود."</string> <string name="httpErrorFile" msgid="3400658466057744084">"دسترسی به فایل انجام نشد."</string> <string name="httpErrorFileNotFound" msgid="5191433324871147386">"فایل درخواستی پیدا نشد."</string> @@ -1710,6 +1710,10 @@ <string name="accessibility_service_action_perform_description" msgid="2718852014003170558">"این عملکرد میتواند با برنامه یا حسگری سختافزاری تعاملاتتان را ردیابی کند و ازطرف شما با برنامهها تعامل داشته باشد."</string> <string name="accessibility_dialog_button_allow" msgid="2092558122987144530">"اجازه دادن"</string> <string name="accessibility_dialog_button_deny" msgid="4129575637812472671">"مجاز نبودن"</string> + <!-- no translation found for accessibility_dialog_button_uninstall (2952465517671708108) --> + <skip /> + <!-- no translation found for accessibility_dialog_touch_filtered_warning (3741940116597822451) --> + <skip /> <string name="accessibility_select_shortcut_menu_title" msgid="6002726538854613272">"برای استفاده از ویژگی، روی آن ضربه بزنید:"</string> <string name="accessibility_edit_shortcut_menu_button_title" msgid="239446795930436325">"انتخاب ویژگیهای موردنظر برای استفاده با دکمه دسترسپذیری"</string> <string name="accessibility_edit_shortcut_menu_volume_title" msgid="1077294237378645981">"انتخاب ویژگیهای موردنظر برای استفاده با میانبر کلید میزان صدا"</string> @@ -1904,6 +1908,10 @@ <string name="zen_mode_default_weekends_name" msgid="4707200272709377930">"آخر هفته"</string> <string name="zen_mode_default_events_name" msgid="2280682960128512257">"رویداد"</string> <string name="zen_mode_default_every_night_name" msgid="1467765312174275823">"خوابیدن"</string> + <!-- no translation found for zen_mode_implicit_activated (2634285680776672994) --> + <skip /> + <!-- no translation found for zen_mode_implicit_deactivated (8688441768371501750) --> + <skip /> <string name="muted_by" msgid="91464083490094950">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> درحال قطع کردن بعضی از صداهاست"</string> <string name="system_error_wipe_data" msgid="5910572292172208493">"دستگاهتان یک مشکل داخلی دارد، و ممکن است تا زمانی که بازنشانی دادههای کارخانه انجام نگیرد، بیثبات بماند."</string> <string name="system_error_manufacturer" msgid="703545241070116315">"دستگاهتان یک مشکل داخلی دارد. برای جزئیات آن با سازندهتان تماس بگیرید."</string> @@ -2336,6 +2344,8 @@ <string name="mic_access_off_toast" msgid="8111040892954242437">"میکروفون مسدود شد"</string> <string name="connected_display_unavailable_notification_title" msgid="5265409360902073556">"بازتاب دادن به نمایشگر ممکن نبود"</string> <string name="connected_display_unavailable_notification_content" msgid="3845903313751217516">"از کابل دیگری استفاده کنید و دوباره امتحان کنید"</string> + <!-- no translation found for connected_display_thermally_unavailable_notification_content (9205758199439955949) --> + <skip /> <string name="connected_display_cable_dont_support_displays_notification_title" msgid="8477183783847392465">"شاید کابل از نمایشگر پشتیبانی نکند"</string> <string name="connected_display_cable_dont_support_displays_notification_content" msgid="8080498819171483973">"کابل USB-C شما ممکن است بهدرستی به نمایشگرها وصل نشود"</string> <string name="concurrent_display_notification_name" msgid="1526911253558311131">"Dual screen"</string> diff --git a/core/res/res/values-fi/strings.xml b/core/res/res/values-fi/strings.xml index 4a08b9006696..69a65a2e5c2a 100644 --- a/core/res/res/values-fi/strings.xml +++ b/core/res/res/values-fi/strings.xml @@ -1710,6 +1710,10 @@ <string name="accessibility_service_action_perform_description" msgid="2718852014003170558">"Se voi seurata toimintaasi sovelluksella tai laitteistoanturilla ja käyttää sovelluksia puolestasi."</string> <string name="accessibility_dialog_button_allow" msgid="2092558122987144530">"Salli"</string> <string name="accessibility_dialog_button_deny" msgid="4129575637812472671">"Estä"</string> + <!-- no translation found for accessibility_dialog_button_uninstall (2952465517671708108) --> + <skip /> + <!-- no translation found for accessibility_dialog_touch_filtered_warning (3741940116597822451) --> + <skip /> <string name="accessibility_select_shortcut_menu_title" msgid="6002726538854613272">"Aloita ominaisuuden käyttö napauttamalla sitä:"</string> <string name="accessibility_edit_shortcut_menu_button_title" msgid="239446795930436325">"Valitse ominaisuudet, joita käytetään esteettömyyspainikkeella"</string> <string name="accessibility_edit_shortcut_menu_volume_title" msgid="1077294237378645981">"Valitse ominaisuudet, joita käytetään äänenvoimakkuuspikanäppäimellä"</string> @@ -1904,6 +1908,10 @@ <string name="zen_mode_default_weekends_name" msgid="4707200272709377930">"Viikonloppuna"</string> <string name="zen_mode_default_events_name" msgid="2280682960128512257">"Tapahtuma"</string> <string name="zen_mode_default_every_night_name" msgid="1467765312174275823">"Nukkuminen"</string> + <!-- no translation found for zen_mode_implicit_activated (2634285680776672994) --> + <skip /> + <!-- no translation found for zen_mode_implicit_deactivated (8688441768371501750) --> + <skip /> <string name="muted_by" msgid="91464083490094950">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> mykistää joitakin ääniä"</string> <string name="system_error_wipe_data" msgid="5910572292172208493">"Laitteellasi on sisäinen ongelma, joka aiheuttaa epävakautta. Voit korjata tilanteen palauttamalla tehdasasetukset."</string> <string name="system_error_manufacturer" msgid="703545241070116315">"Laitteesi yhdistäminen ei onnistu sisäisen virheen takia. Saat lisätietoja valmistajalta."</string> @@ -2336,6 +2344,8 @@ <string name="mic_access_off_toast" msgid="8111040892954242437">"Mikrofoni on estetty"</string> <string name="connected_display_unavailable_notification_title" msgid="5265409360902073556">"Näytön peilaaminen ei onnistu"</string> <string name="connected_display_unavailable_notification_content" msgid="3845903313751217516">"Käytä eri johtoa ja yritä uudelleen"</string> + <!-- no translation found for connected_display_thermally_unavailable_notification_content (9205758199439955949) --> + <skip /> <string name="connected_display_cable_dont_support_displays_notification_title" msgid="8477183783847392465">"Johto ei ehkä tue näyttöjä"</string> <string name="connected_display_cable_dont_support_displays_notification_content" msgid="8080498819171483973">"USB-C-johtosi ei ehkä yhdisty näyttöihin kunnolla"</string> <string name="concurrent_display_notification_name" msgid="1526911253558311131">"Kaksoisnäyttö"</string> diff --git a/core/res/res/values-fr-rCA/strings.xml b/core/res/res/values-fr-rCA/strings.xml index 1b637db1e0d7..acdfaab7ed01 100644 --- a/core/res/res/values-fr-rCA/strings.xml +++ b/core/res/res/values-fr-rCA/strings.xml @@ -1711,6 +1711,10 @@ <string name="accessibility_service_action_perform_description" msgid="2718852014003170558">"Cette fonctionnalité peut faire le suivi de vos interactions avec une application ou un capteur matériel et interagir avec des applications en votre nom."</string> <string name="accessibility_dialog_button_allow" msgid="2092558122987144530">"Autoriser"</string> <string name="accessibility_dialog_button_deny" msgid="4129575637812472671">"Refuser"</string> + <!-- no translation found for accessibility_dialog_button_uninstall (2952465517671708108) --> + <skip /> + <!-- no translation found for accessibility_dialog_touch_filtered_warning (3741940116597822451) --> + <skip /> <string name="accessibility_select_shortcut_menu_title" msgid="6002726538854613272">"Toucher une fonctionnalité pour commencer à l\'utiliser :"</string> <string name="accessibility_edit_shortcut_menu_button_title" msgid="239446795930436325">"Choisir les fonctionnalités à utiliser à l\'aide du bouton d\'accessibilité"</string> <string name="accessibility_edit_shortcut_menu_volume_title" msgid="1077294237378645981">"Choisir les fonctionnalités à utiliser avec le raccourci des touches de volume"</string> @@ -1905,6 +1909,10 @@ <string name="zen_mode_default_weekends_name" msgid="4707200272709377930">"Fin de semaine"</string> <string name="zen_mode_default_events_name" msgid="2280682960128512257">"Événement"</string> <string name="zen_mode_default_every_night_name" msgid="1467765312174275823">"Sommeil"</string> + <!-- no translation found for zen_mode_implicit_activated (2634285680776672994) --> + <skip /> + <!-- no translation found for zen_mode_implicit_deactivated (8688441768371501750) --> + <skip /> <string name="muted_by" msgid="91464083490094950">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> désactive certains sons"</string> <string name="system_error_wipe_data" msgid="5910572292172208493">"Un problème interne est survenu avec votre appareil. Il se peut qu\'il soit instable jusqu\'à ce que vous le réinitialisiez à ses paramètres par défaut."</string> <string name="system_error_manufacturer" msgid="703545241070116315">"Un problème interne est survenu avec votre appareil. Communiquez avec le fabricant pour obtenir plus de détails."</string> @@ -2337,6 +2345,8 @@ <string name="mic_access_off_toast" msgid="8111040892954242437">"Le microphone est bloqué"</string> <string name="connected_display_unavailable_notification_title" msgid="5265409360902073556">"Impossible de dupliquer l\'écran"</string> <string name="connected_display_unavailable_notification_content" msgid="3845903313751217516">"Utilisez un câble différent et réessayez"</string> + <!-- no translation found for connected_display_thermally_unavailable_notification_content (9205758199439955949) --> + <skip /> <string name="connected_display_cable_dont_support_displays_notification_title" msgid="8477183783847392465">"Le câble peut ne pas être compatible avec les écrans"</string> <string name="connected_display_cable_dont_support_displays_notification_content" msgid="8080498819171483973">"Votre câble USB-C peut ne pas se connecter correctement aux écrans"</string> <string name="concurrent_display_notification_name" msgid="1526911253558311131">"Dual Screen"</string> diff --git a/core/res/res/values-fr/strings.xml b/core/res/res/values-fr/strings.xml index 4f8de0c36867..a96b17939908 100644 --- a/core/res/res/values-fr/strings.xml +++ b/core/res/res/values-fr/strings.xml @@ -1711,6 +1711,10 @@ <string name="accessibility_service_action_perform_description" msgid="2718852014003170558">"Le service peut suivre vos interactions avec une application ou un capteur matériel, et interagir avec des applications de votre part."</string> <string name="accessibility_dialog_button_allow" msgid="2092558122987144530">"Autoriser"</string> <string name="accessibility_dialog_button_deny" msgid="4129575637812472671">"Refuser"</string> + <!-- no translation found for accessibility_dialog_button_uninstall (2952465517671708108) --> + <skip /> + <!-- no translation found for accessibility_dialog_touch_filtered_warning (3741940116597822451) --> + <skip /> <string name="accessibility_select_shortcut_menu_title" msgid="6002726538854613272">"Appuyez sur une fonctionnalité pour commencer à l\'utiliser :"</string> <string name="accessibility_edit_shortcut_menu_button_title" msgid="239446795930436325">"Choisir les fonctionnalités à utiliser avec le bouton Accessibilité"</string> <string name="accessibility_edit_shortcut_menu_volume_title" msgid="1077294237378645981">"Choisir les fonctionnalités à utiliser avec le raccourci des touches de volume"</string> @@ -1905,6 +1909,10 @@ <string name="zen_mode_default_weekends_name" msgid="4707200272709377930">"Week-end"</string> <string name="zen_mode_default_events_name" msgid="2280682960128512257">"Événement"</string> <string name="zen_mode_default_every_night_name" msgid="1467765312174275823">"Sommeil"</string> + <!-- no translation found for zen_mode_implicit_activated (2634285680776672994) --> + <skip /> + <!-- no translation found for zen_mode_implicit_deactivated (8688441768371501750) --> + <skip /> <string name="muted_by" msgid="91464083490094950">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> coupe certains sons"</string> <string name="system_error_wipe_data" msgid="5910572292172208493">"Un problème interne lié à votre appareil est survenu. Ce dernier risque d\'être instable jusqu\'à ce que vous rétablissiez la configuration d\'usine."</string> <string name="system_error_manufacturer" msgid="703545241070116315">"Un problème interne lié à votre appareil est survenu. Veuillez contacter le fabricant pour en savoir plus."</string> @@ -2337,15 +2345,17 @@ <string name="mic_access_off_toast" msgid="8111040892954242437">"Le micro est bloqué"</string> <string name="connected_display_unavailable_notification_title" msgid="5265409360902073556">"Duplication impossible"</string> <string name="connected_display_unavailable_notification_content" msgid="3845903313751217516">"Utilisez un autre câble et réessayez"</string> + <!-- no translation found for connected_display_thermally_unavailable_notification_content (9205758199439955949) --> + <skip /> <string name="connected_display_cable_dont_support_displays_notification_title" msgid="8477183783847392465">"Le câble n\'est peut-être pas compatible avec les écrans"</string> <string name="connected_display_cable_dont_support_displays_notification_content" msgid="8080498819171483973">"Votre câble USB-C n\'est peut-être pas connecté correctement à l\'écran"</string> - <string name="concurrent_display_notification_name" msgid="1526911253558311131">"Double écran"</string> - <string name="concurrent_display_notification_active_title" msgid="4892473462327943673">"Double écran activé"</string> + <string name="concurrent_display_notification_name" msgid="1526911253558311131">"Dual Screen"</string> + <string name="concurrent_display_notification_active_title" msgid="4892473462327943673">"Dual Screen activé"</string> <string name="concurrent_display_notification_active_content" msgid="5889355473710601270">"<xliff:g id="APP_NAME">%1$s</xliff:g> utilise les deux écrans pour afficher du contenu"</string> <string name="concurrent_display_notification_thermal_title" msgid="5921609404644739229">"L\'appareil est trop chaud"</string> - <string name="concurrent_display_notification_thermal_content" msgid="2075484836527609319">"Double écran n\'est pas disponible, car votre téléphone surchauffe"</string> - <string name="concurrent_display_notification_power_save_title" msgid="1794569070730736281">"Double écran n\'est pas disponible"</string> - <string name="concurrent_display_notification_power_save_content" msgid="2198116070583851493">"Double écran n\'est pas disponible, car Économiseur de batterie est activé. Vous pouvez désactiver cette option dans les paramètres."</string> + <string name="concurrent_display_notification_thermal_content" msgid="2075484836527609319">"Dual Screen n\'est pas disponible, car votre téléphone surchauffe"</string> + <string name="concurrent_display_notification_power_save_title" msgid="1794569070730736281">"Dual Screen n\'est pas disponible"</string> + <string name="concurrent_display_notification_power_save_content" msgid="2198116070583851493">"Dual Screen n\'est pas disponible, car l\'économiseur de batterie est activé. Vous pouvez désactiver cette option dans les paramètres."</string> <string name="device_state_notification_settings_button" msgid="691937505741872749">"Accédez aux paramètres"</string> <string name="device_state_notification_turn_off_button" msgid="6327161707661689232">"Désactiver"</string> <string name="keyboard_layout_notification_selected_title" msgid="1202560174252421219">"<xliff:g id="DEVICE_NAME">%s</xliff:g> configuré"</string> diff --git a/core/res/res/values-gl/strings.xml b/core/res/res/values-gl/strings.xml index b25cfcb82d1d..d001e90b23f7 100644 --- a/core/res/res/values-gl/strings.xml +++ b/core/res/res/values-gl/strings.xml @@ -1710,6 +1710,10 @@ <string name="accessibility_service_action_perform_description" msgid="2718852014003170558">"Pode facer un seguimento das túas interaccións cunha aplicación ou cun sensor de hardware, así como interactuar por ti coas aplicacións."</string> <string name="accessibility_dialog_button_allow" msgid="2092558122987144530">"Permitir"</string> <string name="accessibility_dialog_button_deny" msgid="4129575637812472671">"Denegar"</string> + <!-- no translation found for accessibility_dialog_button_uninstall (2952465517671708108) --> + <skip /> + <!-- no translation found for accessibility_dialog_touch_filtered_warning (3741940116597822451) --> + <skip /> <string name="accessibility_select_shortcut_menu_title" msgid="6002726538854613272">"Tocar unha función para comezar a utilizala:"</string> <string name="accessibility_edit_shortcut_menu_button_title" msgid="239446795930436325">"Escoller as funcións que queres utilizar co botón Accesibilidade"</string> <string name="accessibility_edit_shortcut_menu_volume_title" msgid="1077294237378645981">"Escolle as funcións que queres utilizar co atallo da tecla de volume"</string> @@ -1904,6 +1908,10 @@ <string name="zen_mode_default_weekends_name" msgid="4707200272709377930">"Fin de semana"</string> <string name="zen_mode_default_events_name" msgid="2280682960128512257">"Evento"</string> <string name="zen_mode_default_every_night_name" msgid="1467765312174275823">"Durmindo"</string> + <!-- no translation found for zen_mode_implicit_activated (2634285680776672994) --> + <skip /> + <!-- no translation found for zen_mode_implicit_deactivated (8688441768371501750) --> + <skip /> <string name="muted_by" msgid="91464083490094950">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> está silenciando algúns sons"</string> <string name="system_error_wipe_data" msgid="5910572292172208493">"Produciuse un erro interno no teu dispositivo e quizais funcione de maneira inestable ata o restablecemento dos datos de fábrica."</string> <string name="system_error_manufacturer" msgid="703545241070116315">"Produciuse un erro interno co teu dispositivo. Contacta co teu fabricante para obter máis información."</string> @@ -2336,6 +2344,8 @@ <string name="mic_access_off_toast" msgid="8111040892954242437">"O micrófono está bloqueado"</string> <string name="connected_display_unavailable_notification_title" msgid="5265409360902073556">"Non se pode proxectar contido na pantalla"</string> <string name="connected_display_unavailable_notification_content" msgid="3845903313751217516">"Cambia de cable e téntao de novo"</string> + <!-- no translation found for connected_display_thermally_unavailable_notification_content (9205758199439955949) --> + <skip /> <string name="connected_display_cable_dont_support_displays_notification_title" msgid="8477183783847392465">"Pode que o cable non sexa compatible con pantallas"</string> <string name="connected_display_cable_dont_support_displays_notification_content" msgid="8080498819171483973">"O teu cable USB-C pode que non se conecte ás pantallas de maneira adecuada"</string> <string name="concurrent_display_notification_name" msgid="1526911253558311131">"Dual Screen"</string> diff --git a/core/res/res/values-gu/strings.xml b/core/res/res/values-gu/strings.xml index fae5ebc3279c..8b54db5f3946 100644 --- a/core/res/res/values-gu/strings.xml +++ b/core/res/res/values-gu/strings.xml @@ -1710,6 +1710,10 @@ <string name="accessibility_service_action_perform_description" msgid="2718852014003170558">"તે ઍપ અથવા હાર્ડવેર સેન્સર વડે તમારી ક્રિયાપ્રતિક્રિયાને ટ્રૅક કરી શકે છે અને તમારા વતી ઍપ સાથે ક્રિયાપ્રતિક્રિયા કરી શકે છે."</string> <string name="accessibility_dialog_button_allow" msgid="2092558122987144530">"મંજૂરી આપો"</string> <string name="accessibility_dialog_button_deny" msgid="4129575637812472671">"નકારો"</string> + <!-- no translation found for accessibility_dialog_button_uninstall (2952465517671708108) --> + <skip /> + <!-- no translation found for accessibility_dialog_touch_filtered_warning (3741940116597822451) --> + <skip /> <string name="accessibility_select_shortcut_menu_title" msgid="6002726538854613272">"સુવિધાનો ઉપયોગ શરૂ કરવા તેના પર ટૅપ કરો:"</string> <string name="accessibility_edit_shortcut_menu_button_title" msgid="239446795930436325">"ઍક્સેસિબિલિટી બટન વડે તમે ઉપયોગમાં લેવા માગો છો તે સુવિધાઓ પસંદ કરો"</string> <string name="accessibility_edit_shortcut_menu_volume_title" msgid="1077294237378645981">"વૉલ્યૂમ કી શૉર્ટકટ વડે તમે ઉપયોગમાં લેવા માગો છો તે સુવિધાઓ પસંદ કરો"</string> @@ -1904,6 +1908,10 @@ <string name="zen_mode_default_weekends_name" msgid="4707200272709377930">"સપ્તાહાંત"</string> <string name="zen_mode_default_events_name" msgid="2280682960128512257">"ઇવેન્ટ"</string> <string name="zen_mode_default_every_night_name" msgid="1467765312174275823">"નિષ્ક્રિય"</string> + <!-- no translation found for zen_mode_implicit_activated (2634285680776672994) --> + <skip /> + <!-- no translation found for zen_mode_implicit_deactivated (8688441768371501750) --> + <skip /> <string name="muted_by" msgid="91464083490094950">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> અમુક અવાજોને મ્યૂટ કરે છે"</string> <string name="system_error_wipe_data" msgid="5910572292172208493">"તમારા ઉપકરણમાં આંતરિક સમસ્યા છે અને જ્યાં સુધી તમે ફેક્ટરી ડેટા ફરીથી સેટ કરશો નહીં ત્યાં સુધી તે અસ્થિર રહી શકે છે."</string> <string name="system_error_manufacturer" msgid="703545241070116315">"તમારા ઉપકરણમાં આંતરિક સમસ્યા છે. વિગતો માટે તમારા નિર્માતાનો સંપર્ક કરો."</string> @@ -2011,7 +2019,7 @@ <string name="app_category_image" msgid="7307840291864213007">"ફોટો અને છબીઓ"</string> <string name="app_category_social" msgid="2278269325488344054">"સામાજિક અને સંચાર"</string> <string name="app_category_news" msgid="1172762719574964544">"સમાચાર અને સામાયિકો"</string> - <string name="app_category_maps" msgid="6395725487922533156">"Maps અને નેવિગેશન"</string> + <string name="app_category_maps" msgid="6395725487922533156">"Maps અને નૅવિગેશન"</string> <string name="app_category_productivity" msgid="1844422703029557883">"ઉત્પાદકતા"</string> <string name="app_category_accessibility" msgid="6643521607848547683">"ઍક્સેસિબિલિટી"</string> <string name="device_storage_monitor_notification_channel" msgid="5164244565844470758">"ડિવાઇસ સ્ટૉરેજ"</string> @@ -2336,6 +2344,8 @@ <string name="mic_access_off_toast" msgid="8111040892954242437">"માઇક્રોફોનને બ્લૉક કરવામાં આવ્યો છે"</string> <string name="connected_display_unavailable_notification_title" msgid="5265409360902073556">"ડિસ્પ્લે પર મિરર કરી શકાતું નથી"</string> <string name="connected_display_unavailable_notification_content" msgid="3845903313751217516">"બીજા કોઈ કેબલનો ઉપયોગ કરો અને ફરી પ્રયાસ કરો"</string> + <!-- no translation found for connected_display_thermally_unavailable_notification_content (9205758199439955949) --> + <skip /> <string name="connected_display_cable_dont_support_displays_notification_title" msgid="8477183783847392465">"શક્ય છે કે કેબલ કદાચ ડિસ્પ્લેને સપોર્ટ ન આપતો હોય"</string> <string name="connected_display_cable_dont_support_displays_notification_content" msgid="8080498819171483973">"તમારો USB-C કેબલ કદાચ ડિસ્પ્લે સાથે યોગ્ય રીતે કનેક્ટ ન થાય"</string> <string name="concurrent_display_notification_name" msgid="1526911253558311131">"Dual screen"</string> diff --git a/core/res/res/values-hi/strings.xml b/core/res/res/values-hi/strings.xml index d4eb380098f8..87313a5f0ae9 100644 --- a/core/res/res/values-hi/strings.xml +++ b/core/res/res/values-hi/strings.xml @@ -1710,6 +1710,10 @@ <string name="accessibility_service_action_perform_description" msgid="2718852014003170558">"यह आपके और किसी ऐप्लिकेशन या हार्डवेयर सेंसर के बीच होने वाले इंटरैक्शन को ट्रैक कर सकता है और आपकी तरफ़ से ऐप्लिकेशन के साथ इंटरैक्ट कर सकता है."</string> <string name="accessibility_dialog_button_allow" msgid="2092558122987144530">"अनुमति दें"</string> <string name="accessibility_dialog_button_deny" msgid="4129575637812472671">"इंकार करें"</string> + <!-- no translation found for accessibility_dialog_button_uninstall (2952465517671708108) --> + <skip /> + <!-- no translation found for accessibility_dialog_touch_filtered_warning (3741940116597822451) --> + <skip /> <string name="accessibility_select_shortcut_menu_title" msgid="6002726538854613272">"किसी सुविधा का इस्तेमाल करने के लिए, उस पर टैप करें:"</string> <string name="accessibility_edit_shortcut_menu_button_title" msgid="239446795930436325">"सुलभता बटन पर टैप करके, इस्तेमाल करने के लिए सुविधाएं चुनें"</string> <string name="accessibility_edit_shortcut_menu_volume_title" msgid="1077294237378645981">"चुनें कि आवाज़ कम या ज़्यादा करने वाले बटन के शॉर्टकट से आप किन सुविधाओं का इस्तेमाल करना चाहते हैं"</string> @@ -1904,6 +1908,10 @@ <string name="zen_mode_default_weekends_name" msgid="4707200272709377930">"सप्ताहांत"</string> <string name="zen_mode_default_events_name" msgid="2280682960128512257">"इवेंट"</string> <string name="zen_mode_default_every_night_name" msgid="1467765312174275823">"सोते समय"</string> + <!-- no translation found for zen_mode_implicit_activated (2634285680776672994) --> + <skip /> + <!-- no translation found for zen_mode_implicit_deactivated (8688441768371501750) --> + <skip /> <string name="muted_by" msgid="91464083490094950">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> कुछ आवाज़ें म्यूट कर रहा है"</string> <string name="system_error_wipe_data" msgid="5910572292172208493">"आपके डिवाइस में कोई अंदरूनी समस्या है और यह तब तक ठीक नहीं होगी जब तक आप फ़ैक्टरी डेटा रीसेट नहीं करते."</string> <string name="system_error_manufacturer" msgid="703545241070116315">"आपके डिवाइस के साथ कोई आंतरिक गड़बड़ी हुई. विवरणों के लिए अपने निर्माता से संपर्क करें."</string> @@ -2336,6 +2344,8 @@ <string name="mic_access_off_toast" msgid="8111040892954242437">"माइक्रोफ़ोन को ब्लॉक किया गया है"</string> <string name="connected_display_unavailable_notification_title" msgid="5265409360902073556">"डिसप्ले का कॉन्टेंट नहीं दिखाया जा सकता"</string> <string name="connected_display_unavailable_notification_content" msgid="3845903313751217516">"कोई दूसरा केबल इस्तेमाल करके फिर से कोशिश करें"</string> + <!-- no translation found for connected_display_thermally_unavailable_notification_content (9205758199439955949) --> + <skip /> <string name="connected_display_cable_dont_support_displays_notification_title" msgid="8477183783847392465">"ऐसा हो सकता है कि केबल, डिसप्ले के साथ ठीक से काम न करे"</string> <string name="connected_display_cable_dont_support_displays_notification_content" msgid="8080498819171483973">"ऐसा हो सकता है कि यूएसबी-सी केबल, डिसप्ले के साथ ठीक से कनेक्ट न हो पाए"</string> <string name="concurrent_display_notification_name" msgid="1526911253558311131">"Dual screen"</string> diff --git a/core/res/res/values-hr/strings.xml b/core/res/res/values-hr/strings.xml index 977f88173117..c5e52bb9f8ad 100644 --- a/core/res/res/values-hr/strings.xml +++ b/core/res/res/values-hr/strings.xml @@ -1711,6 +1711,10 @@ <string name="accessibility_service_action_perform_description" msgid="2718852014003170558">"Može pratiti vaše interakcije s aplikacijama ili senzorom uređaja i stupati u interakciju s aplikacijama u vaše ime."</string> <string name="accessibility_dialog_button_allow" msgid="2092558122987144530">"Dopusti"</string> <string name="accessibility_dialog_button_deny" msgid="4129575637812472671">"Odbij"</string> + <!-- no translation found for accessibility_dialog_button_uninstall (2952465517671708108) --> + <skip /> + <!-- no translation found for accessibility_dialog_touch_filtered_warning (3741940116597822451) --> + <skip /> <string name="accessibility_select_shortcut_menu_title" msgid="6002726538854613272">"Dodirnite značajku da biste je počeli koristiti:"</string> <string name="accessibility_edit_shortcut_menu_button_title" msgid="239446795930436325">"Odabir značajki za upotrebu pomoću gumba za Pristupačnost"</string> <string name="accessibility_edit_shortcut_menu_volume_title" msgid="1077294237378645981">"Odabir značajki za upotrebu pomoću prečaca tipki za glasnoću"</string> @@ -1905,6 +1909,10 @@ <string name="zen_mode_default_weekends_name" msgid="4707200272709377930">"Vikend"</string> <string name="zen_mode_default_events_name" msgid="2280682960128512257">"Događaj"</string> <string name="zen_mode_default_every_night_name" msgid="1467765312174275823">"Spavanje"</string> + <!-- no translation found for zen_mode_implicit_activated (2634285680776672994) --> + <skip /> + <!-- no translation found for zen_mode_implicit_deactivated (8688441768371501750) --> + <skip /> <string name="muted_by" msgid="91464083490094950">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> isključuje neke zvukove"</string> <string name="system_error_wipe_data" msgid="5910572292172208493">"Na vašem uređaju postoji interni problem i možda neće biti stabilan dok ga ne vratite na tvorničko stanje."</string> <string name="system_error_manufacturer" msgid="703545241070116315">"Na vašem uređaju postoji interni problem. Obratite se proizvođaču za više pojedinosti."</string> @@ -2337,6 +2345,8 @@ <string name="mic_access_off_toast" msgid="8111040892954242437">"Mikrofon je blokiran"</string> <string name="connected_display_unavailable_notification_title" msgid="5265409360902073556">"Zrcaljenje na zaslon nije moguće"</string> <string name="connected_display_unavailable_notification_content" msgid="3845903313751217516">"Upotrijebite drugi kabel i pokušajte ponovno"</string> + <!-- no translation found for connected_display_thermally_unavailable_notification_content (9205758199439955949) --> + <skip /> <string name="connected_display_cable_dont_support_displays_notification_title" msgid="8477183783847392465">"Kabel možda ne podržava zaslone"</string> <string name="connected_display_cable_dont_support_displays_notification_content" msgid="8080498819171483973">"Vaš USB-C kabel možda nije ispravno povezan sa zaslonima"</string> <string name="concurrent_display_notification_name" msgid="1526911253558311131">"Dvostruki zaslon"</string> diff --git a/core/res/res/values-hu/strings.xml b/core/res/res/values-hu/strings.xml index 9a389db091b7..39e49f67db64 100644 --- a/core/res/res/values-hu/strings.xml +++ b/core/res/res/values-hu/strings.xml @@ -1710,6 +1710,10 @@ <string name="accessibility_service_action_perform_description" msgid="2718852014003170558">"Követheti az alkalmazásokkal és hardveres érzékelőkkel való interakcióit, és műveleteket végezhet az alkalmazásokkal az Ön nevében."</string> <string name="accessibility_dialog_button_allow" msgid="2092558122987144530">"Engedélyezés"</string> <string name="accessibility_dialog_button_deny" msgid="4129575637812472671">"Tiltás"</string> + <!-- no translation found for accessibility_dialog_button_uninstall (2952465517671708108) --> + <skip /> + <!-- no translation found for accessibility_dialog_touch_filtered_warning (3741940116597822451) --> + <skip /> <string name="accessibility_select_shortcut_menu_title" msgid="6002726538854613272">"Koppintson valamelyik funkcióra a használatához:"</string> <string name="accessibility_edit_shortcut_menu_button_title" msgid="239446795930436325">"Kiválaszthatja a Kisegítő lehetőségek gombbal használni kívánt funkciókat"</string> <string name="accessibility_edit_shortcut_menu_volume_title" msgid="1077294237378645981">"Kiválaszthatja a hangerőgombbal használni kívánt funkciókat"</string> @@ -1904,6 +1908,10 @@ <string name="zen_mode_default_weekends_name" msgid="4707200272709377930">"Hétvége"</string> <string name="zen_mode_default_events_name" msgid="2280682960128512257">"Esemény"</string> <string name="zen_mode_default_every_night_name" msgid="1467765312174275823">"Alvás"</string> + <!-- no translation found for zen_mode_implicit_activated (2634285680776672994) --> + <skip /> + <!-- no translation found for zen_mode_implicit_deactivated (8688441768371501750) --> + <skip /> <string name="muted_by" msgid="91464083490094950">"A(z) <xliff:g id="THIRD_PARTY">%1$s</xliff:g> lenémít néhány hangot"</string> <string name="system_error_wipe_data" msgid="5910572292172208493">"Belső probléma van az eszközzel, és instabil lehet, amíg vissza nem állítja a gyári adatokat."</string> <string name="system_error_manufacturer" msgid="703545241070116315">"Belső probléma van az eszközzel. A részletekért vegye fel a kapcsolatot a gyártóval."</string> @@ -2336,6 +2344,8 @@ <string name="mic_access_off_toast" msgid="8111040892954242437">"A mikrofon le van tiltva"</string> <string name="connected_display_unavailable_notification_title" msgid="5265409360902073556">"Nem lehet tükrözni a kijelzőre"</string> <string name="connected_display_unavailable_notification_content" msgid="3845903313751217516">"Használjon másik kábelt, és próbálja újra"</string> + <!-- no translation found for connected_display_thermally_unavailable_notification_content (9205758199439955949) --> + <skip /> <string name="connected_display_cable_dont_support_displays_notification_title" msgid="8477183783847392465">"Előfordulhat, hogy a kábel nem támogatja a kijelzőket"</string> <string name="connected_display_cable_dont_support_displays_notification_content" msgid="8080498819171483973">"Előfordulhat, hogy az USB-C kábellel nem csatlakoztathatók megfelelően a kijelzők"</string> <string name="concurrent_display_notification_name" msgid="1526911253558311131">"Dual Screen"</string> diff --git a/core/res/res/values-hy/strings.xml b/core/res/res/values-hy/strings.xml index 9c2c2c5daa2c..75c7c747d9e3 100644 --- a/core/res/res/values-hy/strings.xml +++ b/core/res/res/values-hy/strings.xml @@ -1710,6 +1710,10 @@ <string name="accessibility_service_action_perform_description" msgid="2718852014003170558">"Կարող է հետագծել ձեր գործողությունները հավելվածներում և սարքակազմի սենսորների վրա, ինչպես նաև հավելվածներում կատարել գործողություններ ձեր անունից։"</string> <string name="accessibility_dialog_button_allow" msgid="2092558122987144530">"Թույլատրել"</string> <string name="accessibility_dialog_button_deny" msgid="4129575637812472671">"Մերժել"</string> + <!-- no translation found for accessibility_dialog_button_uninstall (2952465517671708108) --> + <skip /> + <!-- no translation found for accessibility_dialog_touch_filtered_warning (3741940116597822451) --> + <skip /> <string name="accessibility_select_shortcut_menu_title" msgid="6002726538854613272">"Ընտրեք՝ որ գործառույթն օգտագործել"</string> <string name="accessibility_edit_shortcut_menu_button_title" msgid="239446795930436325">"Ընտրեք գործառույթները, որոնք կբացվեն «Հատուկ գործառույթներ» կոճակի միջոցով"</string> <string name="accessibility_edit_shortcut_menu_volume_title" msgid="1077294237378645981">"Ընտրեք գործառույթները, որոնք կբացվեն ձայնի կարգավորման կոճակի միջոցով"</string> @@ -1904,6 +1908,10 @@ <string name="zen_mode_default_weekends_name" msgid="4707200272709377930">"Շաբաթ-կիրակի"</string> <string name="zen_mode_default_events_name" msgid="2280682960128512257">"Միջոցառում"</string> <string name="zen_mode_default_every_night_name" msgid="1467765312174275823">"Քնի ժամանակ"</string> + <!-- no translation found for zen_mode_implicit_activated (2634285680776672994) --> + <skip /> + <!-- no translation found for zen_mode_implicit_deactivated (8688441768371501750) --> + <skip /> <string name="muted_by" msgid="91464083490094950">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g>-ն անջատում է որոշ ձայներ"</string> <string name="system_error_wipe_data" msgid="5910572292172208493">"Սարքում ներքին խնդիր է առաջացել և այն կարող է կրկնվել, մինչև չվերականգնեք գործարանային կարգավորումները:"</string> <string name="system_error_manufacturer" msgid="703545241070116315">"Սարքում ներքին խնդիր է առաջացել: Մանրամասների համար կապվեք արտադրողի հետ:"</string> @@ -2336,6 +2344,8 @@ <string name="mic_access_off_toast" msgid="8111040892954242437">"Խոսափողն արգելափակված է"</string> <string name="connected_display_unavailable_notification_title" msgid="5265409360902073556">"Չհաջողվեց հայելապատճենել էկրանին"</string> <string name="connected_display_unavailable_notification_content" msgid="3845903313751217516">"Օգտագործեք այլ մալուխ և նորից փորձեք"</string> + <!-- no translation found for connected_display_thermally_unavailable_notification_content (9205758199439955949) --> + <skip /> <string name="connected_display_cable_dont_support_displays_notification_title" msgid="8477183783847392465">"Մալուխը կարող է համատեղելի չլինել էկրանների հետ"</string> <string name="connected_display_cable_dont_support_displays_notification_content" msgid="8080498819171483973">"Հնարավոր է՝ USB-C մալուխը սխալ է միացված էկրանին"</string> <string name="concurrent_display_notification_name" msgid="1526911253558311131">"Dual Screen"</string> diff --git a/core/res/res/values-in/strings.xml b/core/res/res/values-in/strings.xml index 5bc62c2f227d..2d55f087600f 100644 --- a/core/res/res/values-in/strings.xml +++ b/core/res/res/values-in/strings.xml @@ -1710,6 +1710,10 @@ <string name="accessibility_service_action_perform_description" msgid="2718852014003170558">"Voice Access dapat melacak interaksi Anda dengan aplikasi atau sensor hardware, dan berinteraksi dengan aplikasi untuk Anda."</string> <string name="accessibility_dialog_button_allow" msgid="2092558122987144530">"Izinkan"</string> <string name="accessibility_dialog_button_deny" msgid="4129575637812472671">"Tolak"</string> + <!-- no translation found for accessibility_dialog_button_uninstall (2952465517671708108) --> + <skip /> + <!-- no translation found for accessibility_dialog_touch_filtered_warning (3741940116597822451) --> + <skip /> <string name="accessibility_select_shortcut_menu_title" msgid="6002726538854613272">"Ketuk fitur untuk mulai menggunakannya:"</string> <string name="accessibility_edit_shortcut_menu_button_title" msgid="239446795930436325">"Pilih fitur yang akan digunakan dengan tombol aksesibilitas"</string> <string name="accessibility_edit_shortcut_menu_volume_title" msgid="1077294237378645981">"Pilih fitur yang akan digunakan dengan pintasan tombol volume"</string> @@ -1904,6 +1908,10 @@ <string name="zen_mode_default_weekends_name" msgid="4707200272709377930">"Akhir pekan"</string> <string name="zen_mode_default_events_name" msgid="2280682960128512257">"Acara"</string> <string name="zen_mode_default_every_night_name" msgid="1467765312174275823">"Tidur"</string> + <!-- no translation found for zen_mode_implicit_activated (2634285680776672994) --> + <skip /> + <!-- no translation found for zen_mode_implicit_deactivated (8688441768371501750) --> + <skip /> <string name="muted_by" msgid="91464083490094950">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> mematikan beberapa suara"</string> <string name="system_error_wipe_data" msgid="5910572292172208493">"Ada masalah dengan perangkat. Hal ini mungkin membuat perangkat jadi tidak stabil dan perlu dikembalikan ke setelan pabrik."</string> <string name="system_error_manufacturer" msgid="703545241070116315">"Ada masalah dengan perangkat. Hubungi produsen perangkat untuk informasi selengkapnya."</string> @@ -2336,6 +2344,8 @@ <string name="mic_access_off_toast" msgid="8111040892954242437">"Mikrofon diblokir"</string> <string name="connected_display_unavailable_notification_title" msgid="5265409360902073556">"Tidak dapat mencerminkan ke layar"</string> <string name="connected_display_unavailable_notification_content" msgid="3845903313751217516">"Gunakan kabel lain dan coba lagi"</string> + <!-- no translation found for connected_display_thermally_unavailable_notification_content (9205758199439955949) --> + <skip /> <string name="connected_display_cable_dont_support_displays_notification_title" msgid="8477183783847392465">"Kabel mungkin tidak mendukung layar"</string> <string name="connected_display_cable_dont_support_displays_notification_content" msgid="8080498819171483973">"Kabel USB-C mungkin tidak terhubung dengan benar ke layar"</string> <string name="concurrent_display_notification_name" msgid="1526911253558311131">"Dual Screen"</string> diff --git a/core/res/res/values-is/strings.xml b/core/res/res/values-is/strings.xml index f666308bb537..f5ad24b04053 100644 --- a/core/res/res/values-is/strings.xml +++ b/core/res/res/values-is/strings.xml @@ -1710,6 +1710,10 @@ <string name="accessibility_service_action_perform_description" msgid="2718852014003170558">"Það getur fylgst með samskiptum þínum við forrit eða skynjara vélbúnaðar og haft samskipti við forrit fyrir þína hönd."</string> <string name="accessibility_dialog_button_allow" msgid="2092558122987144530">"Leyfa"</string> <string name="accessibility_dialog_button_deny" msgid="4129575637812472671">"Hafna"</string> + <!-- no translation found for accessibility_dialog_button_uninstall (2952465517671708108) --> + <skip /> + <!-- no translation found for accessibility_dialog_touch_filtered_warning (3741940116597822451) --> + <skip /> <string name="accessibility_select_shortcut_menu_title" msgid="6002726538854613272">"Ýttu á eiginleika til að byrja að nota hann:"</string> <string name="accessibility_edit_shortcut_menu_button_title" msgid="239446795930436325">"Veldu eiginleika sem á að nota með aðgengishnappinum"</string> <string name="accessibility_edit_shortcut_menu_volume_title" msgid="1077294237378645981">"Veldu eiginleika sem á að nota með flýtileið hljóðstyrkstakka"</string> @@ -1904,6 +1908,10 @@ <string name="zen_mode_default_weekends_name" msgid="4707200272709377930">"Helgi"</string> <string name="zen_mode_default_events_name" msgid="2280682960128512257">"Viðburður"</string> <string name="zen_mode_default_every_night_name" msgid="1467765312174275823">"Svefn"</string> + <!-- no translation found for zen_mode_implicit_activated (2634285680776672994) --> + <skip /> + <!-- no translation found for zen_mode_implicit_deactivated (8688441768371501750) --> + <skip /> <string name="muted_by" msgid="91464083490094950">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> þaggar í einhverjum hljóðum"</string> <string name="system_error_wipe_data" msgid="5910572292172208493">"Innra vandamál kom upp í tækinu og það kann að vera óstöðugt þangað til þú núllstillir það."</string> <string name="system_error_manufacturer" msgid="703545241070116315">"Innra vandamál kom upp í tækinu. Hafðu samband við framleiðanda til að fá nánari upplýsingar."</string> @@ -2336,6 +2344,8 @@ <string name="mic_access_off_toast" msgid="8111040892954242437">"Lokað er fyrir hljóðnemann"</string> <string name="connected_display_unavailable_notification_title" msgid="5265409360902073556">"Ekki er hægt að spegla á skjá"</string> <string name="connected_display_unavailable_notification_content" msgid="3845903313751217516">"Notaðu aðra snúru og reyndu aftur"</string> + <!-- no translation found for connected_display_thermally_unavailable_notification_content (9205758199439955949) --> + <skip /> <string name="connected_display_cable_dont_support_displays_notification_title" msgid="8477183783847392465">"Ekki er víst að snúran styðji skjái"</string> <string name="connected_display_cable_dont_support_displays_notification_content" msgid="8080498819171483973">"Ekki er víst að USB-C-snúran tengist skjám á réttan hátt"</string> <string name="concurrent_display_notification_name" msgid="1526911253558311131">"Tveir skjáir"</string> diff --git a/core/res/res/values-it/strings.xml b/core/res/res/values-it/strings.xml index 9ffadbe08fd1..80262d2cc597 100644 --- a/core/res/res/values-it/strings.xml +++ b/core/res/res/values-it/strings.xml @@ -1711,6 +1711,10 @@ <string name="accessibility_service_action_perform_description" msgid="2718852014003170558">"Può tenere traccia delle tue interazioni con un\'app o un sensore hardware e interagire con app per tuo conto."</string> <string name="accessibility_dialog_button_allow" msgid="2092558122987144530">"Consenti"</string> <string name="accessibility_dialog_button_deny" msgid="4129575637812472671">"Rifiuta"</string> + <!-- no translation found for accessibility_dialog_button_uninstall (2952465517671708108) --> + <skip /> + <!-- no translation found for accessibility_dialog_touch_filtered_warning (3741940116597822451) --> + <skip /> <string name="accessibility_select_shortcut_menu_title" msgid="6002726538854613272">"Tocca una funzionalità per iniziare a usarla:"</string> <string name="accessibility_edit_shortcut_menu_button_title" msgid="239446795930436325">"Scegli le funzionalità da usare con il pulsante Accessibilità"</string> <string name="accessibility_edit_shortcut_menu_volume_title" msgid="1077294237378645981">"Scegli le funzionalità da usare con la scorciatoia dei tasti del volume"</string> @@ -1905,6 +1909,10 @@ <string name="zen_mode_default_weekends_name" msgid="4707200272709377930">"Fine settimana"</string> <string name="zen_mode_default_events_name" msgid="2280682960128512257">"Evento"</string> <string name="zen_mode_default_every_night_name" msgid="1467765312174275823">"Notte"</string> + <!-- no translation found for zen_mode_implicit_activated (2634285680776672994) --> + <skip /> + <!-- no translation found for zen_mode_implicit_deactivated (8688441768371501750) --> + <skip /> <string name="muted_by" msgid="91464083490094950">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> sta disattivando alcuni suoni"</string> <string name="system_error_wipe_data" msgid="5910572292172208493">"Si è verificato un problema interno con il dispositivo, che potrebbe essere instabile fino al ripristino dei dati di fabbrica."</string> <string name="system_error_manufacturer" msgid="703545241070116315">"Si è verificato un problema interno con il dispositivo. Per informazioni dettagliate, contatta il produttore."</string> @@ -2337,6 +2345,8 @@ <string name="mic_access_off_toast" msgid="8111040892954242437">"Microfono bloccato"</string> <string name="connected_display_unavailable_notification_title" msgid="5265409360902073556">"Impossibile eseguire il mirroring al display"</string> <string name="connected_display_unavailable_notification_content" msgid="3845903313751217516">"Usa un altro cavo e riprova"</string> + <!-- no translation found for connected_display_thermally_unavailable_notification_content (9205758199439955949) --> + <skip /> <string name="connected_display_cable_dont_support_displays_notification_title" msgid="8477183783847392465">"Il cavo potrebbe non supportare i display"</string> <string name="connected_display_cable_dont_support_displays_notification_content" msgid="8080498819171483973">"Il cavo USB-C potrebbe non collegarsi correttamente ai display"</string> <string name="concurrent_display_notification_name" msgid="1526911253558311131">"Doppio schermo"</string> diff --git a/core/res/res/values-iw/strings.xml b/core/res/res/values-iw/strings.xml index 53ec382af0f1..59dc3b27e8e1 100644 --- a/core/res/res/values-iw/strings.xml +++ b/core/res/res/values-iw/strings.xml @@ -1711,6 +1711,10 @@ <string name="accessibility_service_action_perform_description" msgid="2718852014003170558">"אפשרות למעקב אחר האינטראקציה שלך עם אפליקציות או חיישני חומרה, וביצוע אינטראקציה בשמך."</string> <string name="accessibility_dialog_button_allow" msgid="2092558122987144530">"אישור"</string> <string name="accessibility_dialog_button_deny" msgid="4129575637812472671">"עדיף שלא"</string> + <!-- no translation found for accessibility_dialog_button_uninstall (2952465517671708108) --> + <skip /> + <!-- no translation found for accessibility_dialog_touch_filtered_warning (3741940116597822451) --> + <skip /> <string name="accessibility_select_shortcut_menu_title" msgid="6002726538854613272">"יש להקיש על תכונה כדי להתחיל להשתמש בה:"</string> <string name="accessibility_edit_shortcut_menu_button_title" msgid="239446795930436325">"בחירת תכונה לשימוש עם לחצן הנגישות"</string> <string name="accessibility_edit_shortcut_menu_volume_title" msgid="1077294237378645981">"בחירת תכונות לשימוש עם מקש הקיצור לעוצמת הקול"</string> @@ -1905,6 +1909,10 @@ <string name="zen_mode_default_weekends_name" msgid="4707200272709377930">"סוף השבוע"</string> <string name="zen_mode_default_events_name" msgid="2280682960128512257">"אירוע"</string> <string name="zen_mode_default_every_night_name" msgid="1467765312174275823">"שינה"</string> + <!-- no translation found for zen_mode_implicit_activated (2634285680776672994) --> + <skip /> + <!-- no translation found for zen_mode_implicit_deactivated (8688441768371501750) --> + <skip /> <string name="muted_by" msgid="91464083490094950">"חלק מהצלילים מושתקים על ידי <xliff:g id="THIRD_PARTY">%1$s</xliff:g>"</string> <string name="system_error_wipe_data" msgid="5910572292172208493">"קיימת בעיה פנימית במכשיר שלך, וייתכן שהוא לא יתפקד כראוי עד שיבוצע איפוס לנתוני היצרן."</string> <string name="system_error_manufacturer" msgid="703545241070116315">"קיימת בעיה פנימית במכשיר שלך. לקבלת פרטים, יש ליצור קשר עם היצרן."</string> @@ -2337,6 +2345,8 @@ <string name="mic_access_off_toast" msgid="8111040892954242437">"המיקרופון חסום"</string> <string name="connected_display_unavailable_notification_title" msgid="5265409360902073556">"לא ניתן לשקף למסך"</string> <string name="connected_display_unavailable_notification_content" msgid="3845903313751217516">"צריך להשתמש בכבל שונה ולנסות שוב"</string> + <!-- no translation found for connected_display_thermally_unavailable_notification_content (9205758199439955949) --> + <skip /> <string name="connected_display_cable_dont_support_displays_notification_title" msgid="8477183783847392465">"יכול להיות שהכבל לא תומך במסכים"</string> <string name="connected_display_cable_dont_support_displays_notification_content" msgid="8080498819171483973">"יכול להיות שכבל ה-USB-C לא יתחבר למסכים כמו שצריך"</string> <string name="concurrent_display_notification_name" msgid="1526911253558311131">"מצב שני מסכים"</string> diff --git a/core/res/res/values-ja/strings.xml b/core/res/res/values-ja/strings.xml index ab865aa2ba00..2ac444bdaea9 100644 --- a/core/res/res/values-ja/strings.xml +++ b/core/res/res/values-ja/strings.xml @@ -1710,6 +1710,10 @@ <string name="accessibility_service_action_perform_description" msgid="2718852014003170558">"アプリやハードウェア センサーの操作を記録したり、自動的にアプリを操作したりできます。"</string> <string name="accessibility_dialog_button_allow" msgid="2092558122987144530">"許可"</string> <string name="accessibility_dialog_button_deny" msgid="4129575637812472671">"許可しない"</string> + <!-- no translation found for accessibility_dialog_button_uninstall (2952465517671708108) --> + <skip /> + <!-- no translation found for accessibility_dialog_touch_filtered_warning (3741940116597822451) --> + <skip /> <string name="accessibility_select_shortcut_menu_title" msgid="6002726538854613272">"使用を開始する機能をタップ:"</string> <string name="accessibility_edit_shortcut_menu_button_title" msgid="239446795930436325">"ユーザー補助機能ボタンで使用する機能の選択"</string> <string name="accessibility_edit_shortcut_menu_volume_title" msgid="1077294237378645981">"音量ボタンのショートカットで使用する機能の選択"</string> @@ -1904,6 +1908,10 @@ <string name="zen_mode_default_weekends_name" msgid="4707200272709377930">"週末"</string> <string name="zen_mode_default_events_name" msgid="2280682960128512257">"予定"</string> <string name="zen_mode_default_every_night_name" msgid="1467765312174275823">"睡眠中"</string> + <!-- no translation found for zen_mode_implicit_activated (2634285680776672994) --> + <skip /> + <!-- no translation found for zen_mode_implicit_deactivated (8688441768371501750) --> + <skip /> <string name="muted_by" msgid="91464083490094950">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> により一部の音はミュートに設定"</string> <string name="system_error_wipe_data" msgid="5910572292172208493">"デバイスで内部的な問題が発生しました。データが初期化されるまで不安定になる可能性があります。"</string> <string name="system_error_manufacturer" msgid="703545241070116315">"デバイスで内部的な問題が発生しました。詳しくはメーカーにお問い合わせください。"</string> @@ -2336,6 +2344,8 @@ <string name="mic_access_off_toast" msgid="8111040892954242437">"マイクがブロックされています"</string> <string name="connected_display_unavailable_notification_title" msgid="5265409360902073556">"ディスプレイにミラーリングできません"</string> <string name="connected_display_unavailable_notification_content" msgid="3845903313751217516">"別のケーブルでもう一度お試しください"</string> + <!-- no translation found for connected_display_thermally_unavailable_notification_content (9205758199439955949) --> + <skip /> <string name="connected_display_cable_dont_support_displays_notification_title" msgid="8477183783847392465">"ケーブルはディスプレイに対応していない可能性があります"</string> <string name="connected_display_cable_dont_support_displays_notification_content" msgid="8080498819171483973">"USB-C ケーブルがディスプレイに正しく接続されていない可能性があります"</string> <string name="concurrent_display_notification_name" msgid="1526911253558311131">"デュアル スクリーン"</string> diff --git a/core/res/res/values-ka/strings.xml b/core/res/res/values-ka/strings.xml index 27f596bf7390..8da54ce39653 100644 --- a/core/res/res/values-ka/strings.xml +++ b/core/res/res/values-ka/strings.xml @@ -1710,6 +1710,10 @@ <string name="accessibility_service_action_perform_description" msgid="2718852014003170558">"მას შეუძლია თვალი მიადევნოს თქვენს ინტერაქციებს აპის ან აპარატურის სენსორის საშუალებით, ასევე, თქვენი სახელით აწარმოოს აპებთან ინტერაქცია."</string> <string name="accessibility_dialog_button_allow" msgid="2092558122987144530">"დაშვება"</string> <string name="accessibility_dialog_button_deny" msgid="4129575637812472671">"უარყოფა"</string> + <!-- no translation found for accessibility_dialog_button_uninstall (2952465517671708108) --> + <skip /> + <!-- no translation found for accessibility_dialog_touch_filtered_warning (3741940116597822451) --> + <skip /> <string name="accessibility_select_shortcut_menu_title" msgid="6002726538854613272">"შეეხეთ ფუნქციას მისი გამოყენების დასაწყებად:"</string> <string name="accessibility_edit_shortcut_menu_button_title" msgid="239446795930436325">"აირჩიეთ ფუნქციები, რომელთა გამოყენებაც გსურთ მარტივი წვდომის ღილაკით"</string> <string name="accessibility_edit_shortcut_menu_volume_title" msgid="1077294237378645981">"აირჩიეთ ფუნქციები, რომელთა გამოყენებაც გსურთ ხმის ღილაკის მალსახმობით"</string> @@ -1904,6 +1908,10 @@ <string name="zen_mode_default_weekends_name" msgid="4707200272709377930">"შაბათ-კვირა"</string> <string name="zen_mode_default_events_name" msgid="2280682960128512257">"მოვლენა"</string> <string name="zen_mode_default_every_night_name" msgid="1467765312174275823">"ძილისას"</string> + <!-- no translation found for zen_mode_implicit_activated (2634285680776672994) --> + <skip /> + <!-- no translation found for zen_mode_implicit_deactivated (8688441768371501750) --> + <skip /> <string name="muted_by" msgid="91464083490094950">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> ზოგიერთ ხმას ადუმებს"</string> <string name="system_error_wipe_data" msgid="5910572292172208493">"ფიქსირდება თქვენი მ ოწყობილობის შიდა პრობლემა და შეიძლება არასტაბილური იყოს, სანამ ქარხნულ მონაცემების არ განაახლებთ."</string> <string name="system_error_manufacturer" msgid="703545241070116315">"ფიქსირდება თქვენი მოწყობილობის შიდა პრობლემა. დეტალებისათვის, მიმართეთ თქვენს მწარმოებელს."</string> @@ -2336,6 +2344,8 @@ <string name="mic_access_off_toast" msgid="8111040892954242437">"მიკროფონი დაბლოკილია"</string> <string name="connected_display_unavailable_notification_title" msgid="5265409360902073556">"ეკრანზე არეკვლა შეუძლებელია"</string> <string name="connected_display_unavailable_notification_content" msgid="3845903313751217516">"გამოიყენეთ სხვა კაბელი და ცადეთ ხელახლა"</string> + <!-- no translation found for connected_display_thermally_unavailable_notification_content (9205758199439955949) --> + <skip /> <string name="connected_display_cable_dont_support_displays_notification_title" msgid="8477183783847392465">"კაბელს შეიძლება არ ჰქონდეს ეკრანების მხარდაჭერა"</string> <string name="connected_display_cable_dont_support_displays_notification_content" msgid="8080498819171483973">"თქვენი USB-C კაბელი შეიძლება სათანადოდ არ უკავშირდებოდეს ეკრანებს"</string> <string name="concurrent_display_notification_name" msgid="1526911253558311131">"ორმაგი ეკრანი"</string> diff --git a/core/res/res/values-kk/strings.xml b/core/res/res/values-kk/strings.xml index 1faea616398e..935fa75c6291 100644 --- a/core/res/res/values-kk/strings.xml +++ b/core/res/res/values-kk/strings.xml @@ -1690,7 +1690,7 @@ <string name="kg_reordering_delete_drop_target_text" msgid="2034358143731750914">"Жою"</string> <string name="safe_media_volume_warning" product="default" msgid="3751676824423049994">"Дыбыс деңгейін ұсынылған деңгейден көтеру керек пе?\n\nЖоғары дыбыс деңгейінде ұзақ кезеңдер бойы тыңдау есту қабілетіңізге зиян тигізуі мүмкін."</string> <string name="csd_dose_reached_warning" product="default" msgid="491875107583931974">"Жоғары дыбыс деңгейінде тыңдай бересіз бе?\n\nҚұлақаспаптың жоғары дыбыс деңгейі ұсынылған уақыттан ұзақ қосылып тұрды. Есту мүшеңізге зияны тиюі мүмкін."</string> - <string name="csd_momentary_exposure_warning" product="default" msgid="7730840903435405501">"Қатты дыбыс анықталды\n\nҚұлақаспаптың жоғары дыбыс деңгейі ұсынылған уақыттан ұзақ қосылып тұрды. Есту мүшеңізге зияны тиюі мүмкін."</string> + <string name="csd_momentary_exposure_warning" product="default" msgid="7730840903435405501">"Қатты дыбыс анықталды\n\nҚұлақаспаптың дыбысы ұсынылған деңгейден асып кетті. Есту мүшеңізге зияны тиюі мүмкін."</string> <string name="accessibility_shortcut_warning_dialog_title" msgid="4017995837692622933">"Арнайы мүмкіндік төте жолын пайдалану керек пе?"</string> <string name="accessibility_shortcut_toogle_warning" msgid="4161716521310929544">"Түймелер тіркесімі қосулы кезде, екі дыбыс түймесін 3 секунд басып тұрсаңыз, \"Арнайы мүмкіндіктер\" функциясы іске қосылады."</string> <string name="accessibility_shortcut_multiple_service_warning_title" msgid="3135860819356676426">"Арнайы мүмкіндіктердің жылдам пәрмені іске қосылсын ба?"</string> @@ -1710,6 +1710,10 @@ <string name="accessibility_service_action_perform_description" msgid="2718852014003170558">"Ол қолданбамен немесе жабдық датчигімен істеген тапсырмаларыңызды бақылайды және қолданбаларды сіздің атыңыздан пайдаланады."</string> <string name="accessibility_dialog_button_allow" msgid="2092558122987144530">"Рұқсат ету"</string> <string name="accessibility_dialog_button_deny" msgid="4129575637812472671">"Тыйым салу"</string> + <!-- no translation found for accessibility_dialog_button_uninstall (2952465517671708108) --> + <skip /> + <!-- no translation found for accessibility_dialog_touch_filtered_warning (3741940116597822451) --> + <skip /> <string name="accessibility_select_shortcut_menu_title" msgid="6002726538854613272">"Функцияны пайдалана бастау үшін түртіңіз:"</string> <string name="accessibility_edit_shortcut_menu_button_title" msgid="239446795930436325">"\"Арнайы мүмкіндіктер\" түймесімен қолданылатын функцияларды таңдаңыз"</string> <string name="accessibility_edit_shortcut_menu_volume_title" msgid="1077294237378645981">"Дыбыс деңгейі пернелері тіркесімімен қолданылатын функцияларды таңдаңыз"</string> @@ -1904,6 +1908,10 @@ <string name="zen_mode_default_weekends_name" msgid="4707200272709377930">"Демалыс күндері"</string> <string name="zen_mode_default_events_name" msgid="2280682960128512257">"Іс-шара"</string> <string name="zen_mode_default_every_night_name" msgid="1467765312174275823">"Ұйқы режимі"</string> + <!-- no translation found for zen_mode_implicit_activated (2634285680776672994) --> + <skip /> + <!-- no translation found for zen_mode_implicit_deactivated (8688441768371501750) --> + <skip /> <string name="muted_by" msgid="91464083490094950">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> кейбір дыбыстарды өшіруде"</string> <string name="system_error_wipe_data" msgid="5910572292172208493">"There\'s an internal problem with your device, and it may be unstable until you factory data reset."</string> <string name="system_error_manufacturer" msgid="703545241070116315">"There\'s an internal problem with your device. Contact your manufacturer for details."</string> @@ -2336,6 +2344,8 @@ <string name="mic_access_off_toast" msgid="8111040892954242437">"Микрофон блокталған."</string> <string name="connected_display_unavailable_notification_title" msgid="5265409360902073556">"Дисплейге көшірмені көрсету мүмкін емес"</string> <string name="connected_display_unavailable_notification_content" msgid="3845903313751217516">"Басқа кабельмен әрекетті қайталап көріңіз."</string> + <!-- no translation found for connected_display_thermally_unavailable_notification_content (9205758199439955949) --> + <skip /> <string name="connected_display_cable_dont_support_displays_notification_title" msgid="8477183783847392465">"Кабель дисплейлерді қолдамауы мүмкін"</string> <string name="connected_display_cable_dont_support_displays_notification_content" msgid="8080498819171483973">"USB-C кабелі дисплейлерге дұрыс жалғанбаған болуы мүмкін."</string> <string name="concurrent_display_notification_name" msgid="1526911253558311131">"Dual Screen"</string> diff --git a/core/res/res/values-km/strings.xml b/core/res/res/values-km/strings.xml index 470c39ed2ee6..95d6ca165628 100644 --- a/core/res/res/values-km/strings.xml +++ b/core/res/res/values-km/strings.xml @@ -1710,6 +1710,10 @@ <string name="accessibility_service_action_perform_description" msgid="2718852014003170558">"វាអាចតាមដានអន្តរកម្មរបស់អ្នកជាមួយនឹងកម្មវិធី ឬសេនស័រហាតវែរ និងធ្វើអន្តរកម្មជាមួយកម្មវិធីនានាជំនួសឱ្យអ្នក។"</string> <string name="accessibility_dialog_button_allow" msgid="2092558122987144530">"អនុញ្ញាត"</string> <string name="accessibility_dialog_button_deny" msgid="4129575637812472671">"បដិសេធ"</string> + <!-- no translation found for accessibility_dialog_button_uninstall (2952465517671708108) --> + <skip /> + <!-- no translation found for accessibility_dialog_touch_filtered_warning (3741940116597822451) --> + <skip /> <string name="accessibility_select_shortcut_menu_title" msgid="6002726538854613272">"ចុចមុខងារណាមួយ ដើម្បចាប់ផ្ដើមប្រើ៖"</string> <string name="accessibility_edit_shortcut_menu_button_title" msgid="239446795930436325">"ជ្រើសរើសមុខងារ ដើម្បីប្រើជាមួយប៊ូតុងភាពងាយស្រួល"</string> <string name="accessibility_edit_shortcut_menu_volume_title" msgid="1077294237378645981">"ជ្រើសរើសមុខងារ ដើម្បីប្រើជាមួយផ្លូវកាត់គ្រាប់ចុចកម្រិតសំឡេង"</string> @@ -1904,6 +1908,10 @@ <string name="zen_mode_default_weekends_name" msgid="4707200272709377930">"ចុងសប្ដាហ៍"</string> <string name="zen_mode_default_events_name" msgid="2280682960128512257">"ព្រឹត្តិការណ៍"</string> <string name="zen_mode_default_every_night_name" msgid="1467765312174275823">"កំពុងដេក"</string> + <!-- no translation found for zen_mode_implicit_activated (2634285680776672994) --> + <skip /> + <!-- no translation found for zen_mode_implicit_deactivated (8688441768371501750) --> + <skip /> <string name="muted_by" msgid="91464083490094950">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> កំពុងបិទសំឡេងមួយចំនួន"</string> <string name="system_error_wipe_data" msgid="5910572292172208493">"មានបញ្ហាខាងក្នុងឧបករណ៍របស់អ្នក ហើយវាអ្នកមិនមានស្ថេរភាព រហូតទាល់តែអ្នកកំណត់ដូចដើមវិញទាំងស្រុង។"</string> <string name="system_error_manufacturer" msgid="703545241070116315">"មានបញ្ហាខាងក្នុងឧបករណ៍របស់អ្នក ទំនាក់ទំនងក្រុមហ៊ុនផលិតឧបករណ៍របស់អ្នកសម្រាប់ព័ត៌មានបន្ថែម។"</string> @@ -2336,6 +2344,8 @@ <string name="mic_access_off_toast" msgid="8111040892954242437">"មីក្រូហ្វូនត្រូវបានទប់ស្កាត់"</string> <string name="connected_display_unavailable_notification_title" msgid="5265409360902073556">"មិនអាចបញ្ចាំងទៅផ្ទាំងអេក្រង់បានទេ"</string> <string name="connected_display_unavailable_notification_content" msgid="3845903313751217516">"ប្រើខ្សែផ្សេង រួចព្យាយាមម្តងទៀត"</string> + <!-- no translation found for connected_display_thermally_unavailable_notification_content (9205758199439955949) --> + <skip /> <string name="connected_display_cable_dont_support_displays_notification_title" msgid="8477183783847392465">"ខ្សែប្រហែលជាមិនអាចប្រើជាមួយផ្ទាំងអេក្រង់បានទេ"</string> <string name="connected_display_cable_dont_support_displays_notification_content" msgid="8080498819171483973">"ខ្សែ USB-C របស់អ្នកប្រហែលជាមិនអាចភ្ជាប់ផ្ទាំងអេក្រង់បានត្រឹមត្រូវទេ"</string> <string name="concurrent_display_notification_name" msgid="1526911253558311131">"អេក្រង់ពីរ"</string> diff --git a/core/res/res/values-kn/strings.xml b/core/res/res/values-kn/strings.xml index e2f24f69122e..b6bef49256af 100644 --- a/core/res/res/values-kn/strings.xml +++ b/core/res/res/values-kn/strings.xml @@ -1689,8 +1689,8 @@ <string name="kg_text_message_separator" product="default" msgid="4503708889934976866">" — "</string> <string name="kg_reordering_delete_drop_target_text" msgid="2034358143731750914">"ತೆಗೆದುಹಾಕು"</string> <string name="safe_media_volume_warning" product="default" msgid="3751676824423049994">"ವಾಲ್ಯೂಮ್ ಅನ್ನು ಶಿಫಾರಸು ಮಾಡಲಾದ ಮಟ್ಟಕ್ಕಿಂತಲೂ ಹೆಚ್ಚು ಮಾಡಬೇಕೆ?\n\nದೀರ್ಘ ಅವಧಿಯವರೆಗೆ ಹೆಚ್ಚಿನ ವಾಲ್ಯೂಮ್ನಲ್ಲಿ ಆಲಿಸುವುದರಿಂದ ನಿಮ್ಮ ಆಲಿಸುವಿಕೆ ಸಾಮರ್ಥ್ಯಕ್ಕೆ ಹಾನಿಯುಂಟು ಮಾಡಬಹುದು."</string> - <string name="csd_dose_reached_warning" product="default" msgid="491875107583931974">"ಹೆಚ್ಚಿನ ವಾಲ್ಯೂಮ್ನಲ್ಲಿ ಆಲಿಸುವುದನ್ನು ಮುಂದುವರಿಸಬೇಕೇ?\n\nಹೆಡ್ಫೋನ್ನ ವಾಲ್ಯೂಮ್ ಶಿಫಾರಸು ಮಾಡಿದ್ದಕ್ಕಿಂತಲೂ ಹೆಚ್ಚಿನ ಸಮಯದವರೆಗೆ ಅಧಿಕವಾಗಿದ್ದು, ಇದರಿಂದ ನಿಮ್ಮ ಶ್ರವಣ ಶಕ್ತಿಗೆ ಹಾನಿಯಾಗಬಹುದು"</string> - <string name="csd_momentary_exposure_warning" product="default" msgid="7730840903435405501">"ದೊಡ್ಡ ಧ್ವನಿ ಪತ್ತೆಯಾಗಿದೆ\n\nಹೆಡ್ಫೋನ್ ವಾಲ್ಯೂಮ್ ಶಿಫಾರಸು ಮಾಡಿದ್ದಕ್ಕಿಂತಲೂ ಹೆಚ್ಚಾಗಿದ್ದು, ಇದರಿಂದ ನಿಮ್ಮ ಶ್ರವಣ ಶಕ್ತಿಗೆ ಹಾನಿಯಾಗಬಹುದು"</string> + <string name="csd_dose_reached_warning" product="default" msgid="491875107583931974">"ಹೆಚ್ಚಿನ ವಾಲ್ಯೂಮ್ನಲ್ಲಿ ಆಲಿಸುವುದನ್ನು ಮುಂದುವರಿಸಬೇಕೇ?\n\nಶಿಫಾರಸು ಮಾಡಿದ್ದಕ್ಕಿಂತಲೂ ದೀರ್ಘಕಾಲ ಹೆಡ್ಫೋನ್ನ ವಾಲ್ಯೂಮ್ ಹೆಚ್ಚಿಗೆ ಇದ್ದು, ಇದರಿಂದ ನಿಮ್ಮ ಶ್ರವಣ ಶಕ್ತಿಗೆ ಹಾನಿಯಾಗಬಹುದು"</string> + <string name="csd_momentary_exposure_warning" product="default" msgid="7730840903435405501">"ದೊಡ್ಡ ಧ್ವನಿ ಪತ್ತೆಯಾಗಿದೆ\n\nಶಿಫಾರಸು ಮಾಡಿದ್ದಕ್ಕಿಂತಲೂ ದೀರ್ಘಕಾಲ ಹೆಡ್ಫೋನ್ ವಾಲ್ಯೂಮ್ ಹೆಚ್ಚಿಗೆ ಇದ್ದು, ಇದರಿಂದ ನಿಮ್ಮ ಶ್ರವಣ ಶಕ್ತಿಗೆ ಹಾನಿಯಾಗಬಹುದು"</string> <string name="accessibility_shortcut_warning_dialog_title" msgid="4017995837692622933">"ಆ್ಯಕ್ಸೆಸಿಬಿಲಿಟಿ ಶಾರ್ಟ್ಕಟ್ ಬಳಸುವುದೇ?"</string> <string name="accessibility_shortcut_toogle_warning" msgid="4161716521310929544">"ಶಾರ್ಟ್ಕಟ್ ಆನ್ ಆಗಿರುವಾಗ, ಎರಡೂ ವಾಲ್ಯೂಮ್ ಬಟನ್ಗಳನ್ನು 3 ಸೆಕೆಂಡುಗಳ ಕಾಲ ಒತ್ತಿದರೆ ಆ್ಯಕ್ಸೆಸಿಬಿಲಿಟಿ ವೈಶಿಷ್ಟ್ಯವೊಂದು ಪ್ರಾರಂಭವಾಗುತ್ತದೆ."</string> <string name="accessibility_shortcut_multiple_service_warning_title" msgid="3135860819356676426">"ಆ್ಯಕ್ಸೆಸಿಬಿಲಿಟಿ ವೈಶಿಷ್ಟ್ಯಗಳಿಗಾಗಿ ಶಾರ್ಟ್ಕಟ್ ಆನ್ ಮಾಡಬೇಕೇ?"</string> @@ -1710,6 +1710,10 @@ <string name="accessibility_service_action_perform_description" msgid="2718852014003170558">"ಇದು ಆ್ಯಪ್ ಅಥವಾ ಹಾರ್ಡ್ವೇರ್ ಸೆನ್ಸರ್ನ ಜೊತೆಗಿನ ನಿಮ್ಮ ಸಂವಹನಗಳನ್ನು ಟ್ರ್ಯಾಕ್ ಮಾಡಬಹುದು, ಮತ್ತು ನಿಮ್ಮ ಪರವಾಗಿ ಆ್ಯಪ್ಗಳ ಜೊತೆ ಸಂವಹನ ನಡೆಸಬಹುದು."</string> <string name="accessibility_dialog_button_allow" msgid="2092558122987144530">"ಅನುಮತಿಸಿ"</string> <string name="accessibility_dialog_button_deny" msgid="4129575637812472671">"ನಿರಾಕರಿಸಿ"</string> + <!-- no translation found for accessibility_dialog_button_uninstall (2952465517671708108) --> + <skip /> + <!-- no translation found for accessibility_dialog_touch_filtered_warning (3741940116597822451) --> + <skip /> <string name="accessibility_select_shortcut_menu_title" msgid="6002726538854613272">"ವೈಶಿಷ್ಟ್ದ ಬಳಸುವುದನ್ನು ಪ್ರಾರಂಭಿಸಲು ಅದನ್ನು ಟ್ಯಾಪ್ ಮಾಡಿ:"</string> <string name="accessibility_edit_shortcut_menu_button_title" msgid="239446795930436325">"ಆ್ಯಕ್ಸೆಸಿಬಿಲಿಟಿ ಬಟನ್ ಜೊತೆಗೆ ಬಳಸಲು ವೈಶಿಷ್ಟ್ಯಗಳನ್ನು ಆಯ್ಕೆಮಾಡಿ"</string> <string name="accessibility_edit_shortcut_menu_volume_title" msgid="1077294237378645981">"ವಾಲ್ಯೂಮ್ ಕೀ ಶಾರ್ಟ್ಕಟ್ ಜೊತೆಗೆ ಬಳಸಲು ವೈಶಿಷ್ಟ್ಯಗಳನ್ನು ಆಯ್ಕೆಮಾಡಿ"</string> @@ -1904,6 +1908,10 @@ <string name="zen_mode_default_weekends_name" msgid="4707200272709377930">"ವಾರಾಂತ್ಯ"</string> <string name="zen_mode_default_events_name" msgid="2280682960128512257">"ಈವೆಂಟ್"</string> <string name="zen_mode_default_every_night_name" msgid="1467765312174275823">"ನಿದ್ರೆಯ ಸಮಯ"</string> + <!-- no translation found for zen_mode_implicit_activated (2634285680776672994) --> + <skip /> + <!-- no translation found for zen_mode_implicit_deactivated (8688441768371501750) --> + <skip /> <string name="muted_by" msgid="91464083490094950">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> ಧ್ವನಿ ಮ್ಯೂಟ್ ಮಾಡುತ್ತಿದ್ದಾರೆ"</string> <string name="system_error_wipe_data" msgid="5910572292172208493">"ನಿಮ್ಮ ಸಾಧನದಲ್ಲಿ ಆಂತರಿಕ ಸಮಸ್ಯೆಯಿದೆ ಹಾಗೂ ನೀವು ಫ್ಯಾಕ್ಟರಿ ಡೇಟಾವನ್ನು ರೀಸೆಟ್ ಮಾಡುವವರೆಗೂ ಅದು ಅಸ್ಥಿರವಾಗಬಹುದು."</string> <string name="system_error_manufacturer" msgid="703545241070116315">"ನಿಮ್ಮ ಸಾಧನದಲ್ಲಿ ಆಂತರಿಕ ಸಮಸ್ಯೆಯಿದೆ. ವಿವರಗಳಿಗಾಗಿ ನಿಮ್ಮ ತಯಾರಕರನ್ನು ಸಂಪರ್ಕಿಸಿ."</string> @@ -2336,6 +2344,8 @@ <string name="mic_access_off_toast" msgid="8111040892954242437">"ಮೈಕ್ರೊಫೋನ್ ಅನ್ನು ನಿರ್ಬಂಧಿಸಲಾಗಿದೆ"</string> <string name="connected_display_unavailable_notification_title" msgid="5265409360902073556">"ಡಿಸ್ಪ್ಲೇಗೆ ಪ್ರತಿಬಿಂಬಿಸಲು ಸಾಧ್ಯವಿಲ್ಲ"</string> <string name="connected_display_unavailable_notification_content" msgid="3845903313751217516">"ಬೇರೆ ಕೇಬಲ್ ಬಳಸಿ ಹಾಗೂ ಪುನಃ ಪ್ರಯತ್ನಿಸಿ"</string> + <!-- no translation found for connected_display_thermally_unavailable_notification_content (9205758199439955949) --> + <skip /> <string name="connected_display_cable_dont_support_displays_notification_title" msgid="8477183783847392465">"ಡಿಸ್ಪ್ಲೇಗಳನ್ನು ಕೇಬಲ್ ಬೆಂಬಲಿಸದಿರಬಹುದು"</string> <string name="connected_display_cable_dont_support_displays_notification_content" msgid="8080498819171483973">"ನಿಮ್ಮ USB-C ಕೇಬಲ್ ಡಿಸ್ಪ್ಲೇಗಳಿಗೆ ಸರಿಯಾಗಿ ಕನೆಕ್ಟ್ ಆಗದಿರಬಹುದು"</string> <string name="concurrent_display_notification_name" msgid="1526911253558311131">"Dual Screen"</string> diff --git a/core/res/res/values-ko/strings.xml b/core/res/res/values-ko/strings.xml index 4ed97fe01828..612bc7111378 100644 --- a/core/res/res/values-ko/strings.xml +++ b/core/res/res/values-ko/strings.xml @@ -1710,6 +1710,10 @@ <string name="accessibility_service_action_perform_description" msgid="2718852014003170558">"앱 또는 하드웨어 센서와의 상호작용을 추적할 수 있으며 나를 대신해 앱과 상호작용할 수 있습니다."</string> <string name="accessibility_dialog_button_allow" msgid="2092558122987144530">"허용"</string> <string name="accessibility_dialog_button_deny" msgid="4129575637812472671">"거부"</string> + <!-- no translation found for accessibility_dialog_button_uninstall (2952465517671708108) --> + <skip /> + <!-- no translation found for accessibility_dialog_touch_filtered_warning (3741940116597822451) --> + <skip /> <string name="accessibility_select_shortcut_menu_title" msgid="6002726538854613272">"기능을 사용하려면 탭하세요"</string> <string name="accessibility_edit_shortcut_menu_button_title" msgid="239446795930436325">"접근성 버튼으로 사용할 기능 선택"</string> <string name="accessibility_edit_shortcut_menu_volume_title" msgid="1077294237378645981">"볼륨 키 단축키로 사용할 기능 선택"</string> @@ -1904,6 +1908,10 @@ <string name="zen_mode_default_weekends_name" msgid="4707200272709377930">"주말"</string> <string name="zen_mode_default_events_name" msgid="2280682960128512257">"캘린더 일정"</string> <string name="zen_mode_default_every_night_name" msgid="1467765312174275823">"수면 시간"</string> + <!-- no translation found for zen_mode_implicit_activated (2634285680776672994) --> + <skip /> + <!-- no translation found for zen_mode_implicit_deactivated (8688441768371501750) --> + <skip /> <string name="muted_by" msgid="91464083490094950">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g>(이)가 일부 소리를 음소거함"</string> <string name="system_error_wipe_data" msgid="5910572292172208493">"사용 중인 기기 내부에 문제가 발생했습니다. 초기화할 때까지 불안정할 수 있습니다."</string> <string name="system_error_manufacturer" msgid="703545241070116315">"사용 중인 기기 내부에 문제가 발생했습니다. 자세한 내용은 제조업체에 문의하세요."</string> @@ -2336,6 +2344,8 @@ <string name="mic_access_off_toast" msgid="8111040892954242437">"마이크가 차단됨"</string> <string name="connected_display_unavailable_notification_title" msgid="5265409360902073556">"디스플레이에 미러링할 수 없음"</string> <string name="connected_display_unavailable_notification_content" msgid="3845903313751217516">"다른 케이블을 사용하여 다시 시도해 보세요."</string> + <!-- no translation found for connected_display_thermally_unavailable_notification_content (9205758199439955949) --> + <skip /> <string name="connected_display_cable_dont_support_displays_notification_title" msgid="8477183783847392465">"디스플레이를 지원하지 않는 케이블일 수 있음"</string> <string name="connected_display_cable_dont_support_displays_notification_content" msgid="8080498819171483973">"사용 중인 USB-C 케이블이 디스플레이에 제대로 연결되지 않을 수 있습니다."</string> <string name="concurrent_display_notification_name" msgid="1526911253558311131">"Dual Screen"</string> diff --git a/core/res/res/values-ky/strings.xml b/core/res/res/values-ky/strings.xml index 421284b2a0e1..ab92325140b8 100644 --- a/core/res/res/values-ky/strings.xml +++ b/core/res/res/values-ky/strings.xml @@ -1710,6 +1710,10 @@ <string name="accessibility_service_action_perform_description" msgid="2718852014003170558">"Кызмат колдонмодо жасаган аракеттериңизге же түзмөктүн сенсорлоруна көз салып, сиздин атыңыздан буйруктарды берет."</string> <string name="accessibility_dialog_button_allow" msgid="2092558122987144530">"Ооба"</string> <string name="accessibility_dialog_button_deny" msgid="4129575637812472671">"Жок"</string> + <!-- no translation found for accessibility_dialog_button_uninstall (2952465517671708108) --> + <skip /> + <!-- no translation found for accessibility_dialog_touch_filtered_warning (3741940116597822451) --> + <skip /> <string name="accessibility_select_shortcut_menu_title" msgid="6002726538854613272">"Функцияны колдонуп баштоо үчүн аны таптап коюңуз:"</string> <string name="accessibility_edit_shortcut_menu_button_title" msgid="239446795930436325">"Атайын мүмкүнчүлүктөр баскычы менен колдонгуңуз келген функцияларды тандаңыз"</string> <string name="accessibility_edit_shortcut_menu_volume_title" msgid="1077294237378645981">"Үндү катуулатуу/акырындатуу баскычтары менен кайсы функцияларды иштеткиңиз келет?"</string> @@ -1904,6 +1908,10 @@ <string name="zen_mode_default_weekends_name" msgid="4707200272709377930">"Дем алыш"</string> <string name="zen_mode_default_events_name" msgid="2280682960128512257">"Иш-чара"</string> <string name="zen_mode_default_every_night_name" msgid="1467765312174275823">"Уйку режими"</string> + <!-- no translation found for zen_mode_implicit_activated (2634285680776672994) --> + <skip /> + <!-- no translation found for zen_mode_implicit_deactivated (8688441768371501750) --> + <skip /> <string name="muted_by" msgid="91464083490094950">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> айрым үндөрдү өчүрүүдө"</string> <string name="system_error_wipe_data" msgid="5910572292172208493">"Түзмөгүңүздө ички көйгөй бар жана ал баштапкы абалга кайтарылмайынча туруктуу иштебей коюшу мүмкүн."</string> <string name="system_error_manufacturer" msgid="703545241070116315">"Түзмөгүңүздө ички көйгөй бар. Анын чоо-жайын билүү үчүн өндүрүүчүңүзгө кайрылыңыз."</string> @@ -2336,6 +2344,8 @@ <string name="mic_access_off_toast" msgid="8111040892954242437">"Микрофон бөгөттөлгөн"</string> <string name="connected_display_unavailable_notification_title" msgid="5265409360902073556">"Экранга күзгүдөй чагылдыруу мүмкүн эмес"</string> <string name="connected_display_unavailable_notification_content" msgid="3845903313751217516">"Башка кабелди колдонуп, кайра аракет кылыңыз"</string> + <!-- no translation found for connected_display_thermally_unavailable_notification_content (9205758199439955949) --> + <skip /> <string name="connected_display_cable_dont_support_displays_notification_title" msgid="8477183783847392465">"Кабель дисплейлерди колдоого албашы мүмкүн"</string> <string name="connected_display_cable_dont_support_displays_notification_content" msgid="8080498819171483973">"USB-C кабели дисплейлерге туура туташпашы мүмкүн"</string> <string name="concurrent_display_notification_name" msgid="1526911253558311131">"Кош экран"</string> diff --git a/core/res/res/values-lo/strings.xml b/core/res/res/values-lo/strings.xml index c743fc0b7b23..c4f74d04f834 100644 --- a/core/res/res/values-lo/strings.xml +++ b/core/res/res/values-lo/strings.xml @@ -1710,6 +1710,10 @@ <string name="accessibility_service_action_perform_description" msgid="2718852014003170558">"ມັນສາມາດຕິດຕາມການໂຕ້ຕອບຂອງທ່ານກັບແອັບ ຫຼື ເຊັນເຊີຮາດແວໃດໜຶ່ງ ແລະ ໂຕ້ຕອບກັບແອັບໃນນາມຂອງທ່ານໄດ້."</string> <string name="accessibility_dialog_button_allow" msgid="2092558122987144530">"ອະນຸຍາດ"</string> <string name="accessibility_dialog_button_deny" msgid="4129575637812472671">"ປະຕິເສດ"</string> + <!-- no translation found for accessibility_dialog_button_uninstall (2952465517671708108) --> + <skip /> + <!-- no translation found for accessibility_dialog_touch_filtered_warning (3741940116597822451) --> + <skip /> <string name="accessibility_select_shortcut_menu_title" msgid="6002726538854613272">"ແຕະໃສ່ຄຸນສົມບັດໃດໜຶ່ງເພື່ອເລີ່ມການນຳໃຊ້ມັນ:"</string> <string name="accessibility_edit_shortcut_menu_button_title" msgid="239446795930436325">"ເລືອກຄຸນສົມບັດເພື່ອໃຊ້ກັບປຸ່ມການຊ່ວຍເຂົ້າເຖິງ"</string> <string name="accessibility_edit_shortcut_menu_volume_title" msgid="1077294237378645981">"ເລືອກຄຸນສົມບັດເພື່ອໃຊ້ກັບທາງລັດປຸ່ມລະດັບສຽງ"</string> @@ -1904,6 +1908,10 @@ <string name="zen_mode_default_weekends_name" msgid="4707200272709377930">"ທ້າຍອາທິດ"</string> <string name="zen_mode_default_events_name" msgid="2280682960128512257">"ການນັດໝາຍ"</string> <string name="zen_mode_default_every_night_name" msgid="1467765312174275823">"ການນອນ"</string> + <!-- no translation found for zen_mode_implicit_activated (2634285680776672994) --> + <skip /> + <!-- no translation found for zen_mode_implicit_deactivated (8688441768371501750) --> + <skip /> <string name="muted_by" msgid="91464083490094950">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> ປິດສຽງບາງຢ່າງໄວ້"</string> <string name="system_error_wipe_data" msgid="5910572292172208493">"ມີບັນຫາພາຍໃນກັບອຸປະກອນຂອງທ່ານ, ແລະມັນອາດຈະບໍ່ສະຖຽນຈົນກວ່າທ່ານຕັ້ງເປັນຂໍ້ມູນໂຮງງານຄືນແລ້ວ."</string> <string name="system_error_manufacturer" msgid="703545241070116315">"ມີບັນຫາພາຍໃນກັບອຸປະກອນຂອງທ່ານ. ຕິດຕໍ່ຜູ້ຜະລິດຂອງທ່ານສຳລັບລາຍລະອຽດຕ່າງໆ."</string> @@ -2336,6 +2344,8 @@ <string name="mic_access_off_toast" msgid="8111040892954242437">"ໄມໂຄຣໂຟນຖືກບລັອກໄວ້"</string> <string name="connected_display_unavailable_notification_title" msgid="5265409360902073556">"ບໍ່ສາມາດສະທ້ອນໄປຫາຈໍສະແດງຜົນໄດ້"</string> <string name="connected_display_unavailable_notification_content" msgid="3845903313751217516">"ກະລຸນາໃຊ້ສາຍອື່ນແລ້ວລອງໃໝ່"</string> + <!-- no translation found for connected_display_thermally_unavailable_notification_content (9205758199439955949) --> + <skip /> <string name="connected_display_cable_dont_support_displays_notification_title" msgid="8477183783847392465">"ສາຍອາດບໍ່ຮອງຮັບຈໍສະແດງຜົນ"</string> <string name="connected_display_cable_dont_support_displays_notification_content" msgid="8080498819171483973">"ສາຍ USB-C ຂອງທ່ານອາດບໍ່ໄດ້ເຊື່ອມຕໍ່ກັບຈໍສະແດງຜົນຢ່າງຖືກຕ້ອງ"</string> <string name="concurrent_display_notification_name" msgid="1526911253558311131">"ໜ້າຈໍຄູ່"</string> diff --git a/core/res/res/values-lt/strings.xml b/core/res/res/values-lt/strings.xml index ff665c5bbf8e..96303beb19c9 100644 --- a/core/res/res/values-lt/strings.xml +++ b/core/res/res/values-lt/strings.xml @@ -1712,6 +1712,10 @@ <string name="accessibility_service_action_perform_description" msgid="2718852014003170558">"Naudojant šią funkciją galima stebėti jūsų sąveiką su programa ar aparatinės įrangos jutikliu ir sąveikauti su programomis jūsų vardu."</string> <string name="accessibility_dialog_button_allow" msgid="2092558122987144530">"Leisti"</string> <string name="accessibility_dialog_button_deny" msgid="4129575637812472671">"Atmesti"</string> + <!-- no translation found for accessibility_dialog_button_uninstall (2952465517671708108) --> + <skip /> + <!-- no translation found for accessibility_dialog_touch_filtered_warning (3741940116597822451) --> + <skip /> <string name="accessibility_select_shortcut_menu_title" msgid="6002726538854613272">"Norėdami naudoti funkciją, palieskite ją:"</string> <string name="accessibility_edit_shortcut_menu_button_title" msgid="239446795930436325">"Funkcijų, kurioms bus naudojamas pritaikomumo mygtukas, pasirinkimas"</string> <string name="accessibility_edit_shortcut_menu_volume_title" msgid="1077294237378645981">"Funkcijų, kurioms bus naudojamas garsumo spartusis klavišas, pasirinkimas"</string> @@ -1906,6 +1910,10 @@ <string name="zen_mode_default_weekends_name" msgid="4707200272709377930">"Savaitgalį"</string> <string name="zen_mode_default_events_name" msgid="2280682960128512257">"Įvykis"</string> <string name="zen_mode_default_every_night_name" msgid="1467765312174275823">"Miegas"</string> + <!-- no translation found for zen_mode_implicit_activated (2634285680776672994) --> + <skip /> + <!-- no translation found for zen_mode_implicit_deactivated (8688441768371501750) --> + <skip /> <string name="muted_by" msgid="91464083490094950">"„<xliff:g id="THIRD_PARTY">%1$s</xliff:g>“ nutildo kai kuriuos garsus"</string> <string name="system_error_wipe_data" msgid="5910572292172208493">"Iškilo vidinė su jūsų įrenginiu susijusi problema, todėl įrenginys gali veikti nestabiliai, kol neatkursite gamyklinių duomenų."</string> <string name="system_error_manufacturer" msgid="703545241070116315">"Iškilo vidinė su jūsų įrenginiu susijusi problema. Jei reikia išsamios informacijos, susisiekite su gamintoju."</string> @@ -2338,6 +2346,8 @@ <string name="mic_access_off_toast" msgid="8111040892954242437">"Mikrofonas užblokuotas"</string> <string name="connected_display_unavailable_notification_title" msgid="5265409360902073556">"Negalima bendrinti ekrano vaizdo ekrane"</string> <string name="connected_display_unavailable_notification_content" msgid="3845903313751217516">"Naudokite kitą laiką ir bandykite dar kartą"</string> + <!-- no translation found for connected_display_thermally_unavailable_notification_content (9205758199439955949) --> + <skip /> <string name="connected_display_cable_dont_support_displays_notification_title" msgid="8477183783847392465">"Laidas gali nepalaikyti ekranų"</string> <string name="connected_display_cable_dont_support_displays_notification_content" msgid="8080498819171483973">"Gali būti, kad USB-C laidu nepavyksta tinkamai prisijungti prie ekranų"</string> <string name="concurrent_display_notification_name" msgid="1526911253558311131">"Dual Screen"</string> diff --git a/core/res/res/values-lv/strings.xml b/core/res/res/values-lv/strings.xml index 4d369aaeb8d7..1aa526ca31cd 100644 --- a/core/res/res/values-lv/strings.xml +++ b/core/res/res/values-lv/strings.xml @@ -1711,6 +1711,10 @@ <string name="accessibility_service_action_perform_description" msgid="2718852014003170558">"Tā var izsekot jūsu mijiedarbību ar lietotni vai aparatūras sensoru un mijiedarboties ar lietotnēm jūsu vārdā."</string> <string name="accessibility_dialog_button_allow" msgid="2092558122987144530">"Atļaut"</string> <string name="accessibility_dialog_button_deny" msgid="4129575637812472671">"Neatļaut"</string> + <!-- no translation found for accessibility_dialog_button_uninstall (2952465517671708108) --> + <skip /> + <!-- no translation found for accessibility_dialog_touch_filtered_warning (3741940116597822451) --> + <skip /> <string name="accessibility_select_shortcut_menu_title" msgid="6002726538854613272">"Pieskarieties funkcijai, lai sāktu to izmantot"</string> <string name="accessibility_edit_shortcut_menu_button_title" msgid="239446795930436325">"Izvēlieties funkcijas, ko izmantot ar pieejamības pogu"</string> <string name="accessibility_edit_shortcut_menu_volume_title" msgid="1077294237378645981">"Izvēlieties funkcijas, ko izmantot ar skaļuma pogu saīsni"</string> @@ -1905,6 +1909,10 @@ <string name="zen_mode_default_weekends_name" msgid="4707200272709377930">"Nedēļas nogalē"</string> <string name="zen_mode_default_events_name" msgid="2280682960128512257">"Pasākums"</string> <string name="zen_mode_default_every_night_name" msgid="1467765312174275823">"Gulēšana"</string> + <!-- no translation found for zen_mode_implicit_activated (2634285680776672994) --> + <skip /> + <!-- no translation found for zen_mode_implicit_deactivated (8688441768371501750) --> + <skip /> <string name="muted_by" msgid="91464083490094950">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> izslēdz noteiktas skaņas"</string> <string name="system_error_wipe_data" msgid="5910572292172208493">"Jūsu ierīcē ir radusies iekšēja problēma, un ierīce var darboties nestabili. Lai to labotu, veiciet rūpnīcas datu atiestatīšanu."</string> <string name="system_error_manufacturer" msgid="703545241070116315">"Jūsu ierīcē ir radusies iekšēja problēma. Lai iegūtu plašāku informāciju, lūdzu, sazinieties ar ražotāju."</string> @@ -2337,6 +2345,8 @@ <string name="mic_access_off_toast" msgid="8111040892954242437">"Mikrofons ir bloķēts."</string> <string name="connected_display_unavailable_notification_title" msgid="5265409360902073556">"Nevar spoguļot displeju"</string> <string name="connected_display_unavailable_notification_content" msgid="3845903313751217516">"Izmantojiet citu vadu un mēģiniet vēlreiz."</string> + <!-- no translation found for connected_display_thermally_unavailable_notification_content (9205758199439955949) --> + <skip /> <string name="connected_display_cable_dont_support_displays_notification_title" msgid="8477183783847392465">"Iespējams, vads neatbalsta displejus"</string> <string name="connected_display_cable_dont_support_displays_notification_content" msgid="8080498819171483973">"Iespējams, jūsu USB-C vads nevarēs nodrošināt pareizu savienojumu ar displejiem."</string> <string name="concurrent_display_notification_name" msgid="1526911253558311131">"Dual Screen režīms"</string> diff --git a/core/res/res/values-mk/strings.xml b/core/res/res/values-mk/strings.xml index 29c9de8368d1..79c663d3f696 100644 --- a/core/res/res/values-mk/strings.xml +++ b/core/res/res/values-mk/strings.xml @@ -1710,6 +1710,10 @@ <string name="accessibility_service_action_perform_description" msgid="2718852014003170558">"Може да ја следи вашата интеракција со апликациите или со хардверските сензори и да врши интеракција со апликациите во ваше име."</string> <string name="accessibility_dialog_button_allow" msgid="2092558122987144530">"Дозволи"</string> <string name="accessibility_dialog_button_deny" msgid="4129575637812472671">"Одбиј"</string> + <!-- no translation found for accessibility_dialog_button_uninstall (2952465517671708108) --> + <skip /> + <!-- no translation found for accessibility_dialog_touch_filtered_warning (3741940116597822451) --> + <skip /> <string name="accessibility_select_shortcut_menu_title" msgid="6002726538854613272">"Допрете на функција за да почнете да ја користите:"</string> <string name="accessibility_edit_shortcut_menu_button_title" msgid="239446795930436325">"Изберете ги функциите што ќе ги користите со копчето за пристапност"</string> <string name="accessibility_edit_shortcut_menu_volume_title" msgid="1077294237378645981">"Изберете ги функциите што ќе ги користите со кратенката за копчето за јачина на звук"</string> @@ -1904,6 +1908,10 @@ <string name="zen_mode_default_weekends_name" msgid="4707200272709377930">"Викенд"</string> <string name="zen_mode_default_events_name" msgid="2280682960128512257">"Настан"</string> <string name="zen_mode_default_every_night_name" msgid="1467765312174275823">"Спиење"</string> + <!-- no translation found for zen_mode_implicit_activated (2634285680776672994) --> + <skip /> + <!-- no translation found for zen_mode_implicit_deactivated (8688441768371501750) --> + <skip /> <string name="muted_by" msgid="91464083490094950">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> исклучи некои звуци"</string> <string name="system_error_wipe_data" msgid="5910572292172208493">"Настана внатрешен проблем со уредот и може да биде нестабилен сè додека не ресетирате на фабричките податоци."</string> <string name="system_error_manufacturer" msgid="703545241070116315">"Настана внатрешен проблем со уредот. Контактирајте го производителот за детали."</string> @@ -2336,6 +2344,8 @@ <string name="mic_access_off_toast" msgid="8111040892954242437">"Микрофонот е блокиран"</string> <string name="connected_display_unavailable_notification_title" msgid="5265409360902073556">"Не може да се отсликува за прикажување"</string> <string name="connected_display_unavailable_notification_content" msgid="3845903313751217516">"Користете друг кабел и обидете се повторно"</string> + <!-- no translation found for connected_display_thermally_unavailable_notification_content (9205758199439955949) --> + <skip /> <string name="connected_display_cable_dont_support_displays_notification_title" msgid="8477183783847392465">"Кабелот можеби не поддржува екрани"</string> <string name="connected_display_cable_dont_support_displays_notification_content" msgid="8080498819171483973">"Кабелот USB-C можеби нема да се поврзе правилно со екраните"</string> <string name="concurrent_display_notification_name" msgid="1526911253558311131">"Dual Screen"</string> diff --git a/core/res/res/values-ml/strings.xml b/core/res/res/values-ml/strings.xml index 46587ee13086..e281426d04af 100644 --- a/core/res/res/values-ml/strings.xml +++ b/core/res/res/values-ml/strings.xml @@ -1710,6 +1710,10 @@ <string name="accessibility_service_action_perform_description" msgid="2718852014003170558">"ഇതിന് ഒരു ആപ്പുമായോ ഹാർഡ്വെയർ സെൻസറുമായോ ഉള്ള നിങ്ങളുടെ ആശയവിനിമയങ്ങൾ ട്രാക്ക് ചെയ്യാനും നിങ്ങളുടെ പേരിൽ ആശയവിനിമയം നടത്താനും കഴിയും."</string> <string name="accessibility_dialog_button_allow" msgid="2092558122987144530">"അനുവദിക്കൂ"</string> <string name="accessibility_dialog_button_deny" msgid="4129575637812472671">"നിരസിക്കുക"</string> + <!-- no translation found for accessibility_dialog_button_uninstall (2952465517671708108) --> + <skip /> + <!-- no translation found for accessibility_dialog_touch_filtered_warning (3741940116597822451) --> + <skip /> <string name="accessibility_select_shortcut_menu_title" msgid="6002726538854613272">"ഉപയോഗിച്ച് തുടങ്ങാൻ ഫീച്ചർ ടാപ്പ് ചെയ്യുക:"</string> <string name="accessibility_edit_shortcut_menu_button_title" msgid="239446795930436325">"ഉപയോഗസഹായി ബട്ടണിന്റെ സഹായത്തോടെ, ഉപയോഗിക്കാൻ ഫീച്ചറുകൾ തിരഞ്ഞെടുക്കുക"</string> <string name="accessibility_edit_shortcut_menu_volume_title" msgid="1077294237378645981">"വോളിയം കീ കുറുക്കുവഴിയിലൂടെ ഉപയോഗിക്കാൻ ഫീച്ചറുകൾ തിരഞ്ഞെടുക്കുക"</string> @@ -1904,6 +1908,10 @@ <string name="zen_mode_default_weekends_name" msgid="4707200272709377930">"വാരാന്ത്യം"</string> <string name="zen_mode_default_events_name" msgid="2280682960128512257">"ഇവന്റ്"</string> <string name="zen_mode_default_every_night_name" msgid="1467765312174275823">"ഉറക്കം"</string> + <!-- no translation found for zen_mode_implicit_activated (2634285680776672994) --> + <skip /> + <!-- no translation found for zen_mode_implicit_deactivated (8688441768371501750) --> + <skip /> <string name="muted_by" msgid="91464083490094950">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> ചില ശബ്ദങ്ങൾ മ്യൂട്ട് ചെയ്യുന്നു"</string> <string name="system_error_wipe_data" msgid="5910572292172208493">"നിങ്ങളുടെ ഉപകരണത്തിൽ ഒരു ആന്തരിക പ്രശ്നമുണ്ട്, ഫാക്ടറി വിവര പുനഃസജ്ജീകരണം ചെയ്യുന്നതുവരെ ഇതു അസ്ഥിരമായിരിക്കാനിടയുണ്ട്."</string> <string name="system_error_manufacturer" msgid="703545241070116315">"നിങ്ങളുടെ ഉപകരണത്തിൽ ഒരു ആന്തരിക പ്രശ്നമുണ്ട്. വിശദാംശങ്ങൾക്കായി നിർമ്മാതാവിനെ ബന്ധപ്പെടുക."</string> @@ -2336,6 +2344,8 @@ <string name="mic_access_off_toast" msgid="8111040892954242437">"മൈക്രോഫോൺ ബ്ലോക്ക് ചെയ്തു"</string> <string name="connected_display_unavailable_notification_title" msgid="5265409360902073556">"ഡിസ്പ്ലേയിലേക്ക് മിറർ ചെയ്യാനാകില്ല"</string> <string name="connected_display_unavailable_notification_content" msgid="3845903313751217516">"മറ്റൊരു കേബിൾ ഉപയോഗിച്ച് വീണ്ടും ശ്രമിക്കുക"</string> + <!-- no translation found for connected_display_thermally_unavailable_notification_content (9205758199439955949) --> + <skip /> <string name="connected_display_cable_dont_support_displays_notification_title" msgid="8477183783847392465">"കേബിൾ, ഡിസ്പ്ലേകളെ പിന്തുണച്ചേക്കില്ല"</string> <string name="connected_display_cable_dont_support_displays_notification_content" msgid="8080498819171483973">"നിങ്ങളുടെ USB-C കേബിൾ, ഡിസ്പ്ലേകളിലേക്ക് ശരിയായി കണക്റ്റ് ആയേക്കില്ല"</string> <string name="concurrent_display_notification_name" msgid="1526911253558311131">"ഡ്യുവൽ സ്ക്രീൻ"</string> diff --git a/core/res/res/values-mn/strings.xml b/core/res/res/values-mn/strings.xml index 62a162e75540..6615ac7457dc 100644 --- a/core/res/res/values-mn/strings.xml +++ b/core/res/res/values-mn/strings.xml @@ -1710,6 +1710,10 @@ <string name="accessibility_service_action_perform_description" msgid="2718852014003170558">"Энэ нь таны апп болон техник хангамжийн мэдрэгчтэй хийх харилцан үйлдлийг хянах болон таны өмнөөс апптай харилцан үйлдэл хийх боломжтой."</string> <string name="accessibility_dialog_button_allow" msgid="2092558122987144530">"Зөвшөөрөх"</string> <string name="accessibility_dialog_button_deny" msgid="4129575637812472671">"Татгалзах"</string> + <!-- no translation found for accessibility_dialog_button_uninstall (2952465517671708108) --> + <skip /> + <!-- no translation found for accessibility_dialog_touch_filtered_warning (3741940116597822451) --> + <skip /> <string name="accessibility_select_shortcut_menu_title" msgid="6002726538854613272">"Үүнийг ашиглаж эхлэхийн тулд онцлог дээр товшино уу:"</string> <string name="accessibility_edit_shortcut_menu_button_title" msgid="239446795930436325">"Хандалтын товчлуурын тусламжтай ашиглах онцлогуудыг сонгоно уу"</string> <string name="accessibility_edit_shortcut_menu_volume_title" msgid="1077294237378645981">"Дууны түвшний түлхүүрийн товчлолын тусламжтай ашиглах онцлогуудыг сонгоно уу"</string> @@ -1904,6 +1908,10 @@ <string name="zen_mode_default_weekends_name" msgid="4707200272709377930">"Амралтын өдөр"</string> <string name="zen_mode_default_events_name" msgid="2280682960128512257">"Үйл явдал"</string> <string name="zen_mode_default_every_night_name" msgid="1467765312174275823">"Унтлагын цаг"</string> + <!-- no translation found for zen_mode_implicit_activated (2634285680776672994) --> + <skip /> + <!-- no translation found for zen_mode_implicit_deactivated (8688441768371501750) --> + <skip /> <string name="muted_by" msgid="91464083490094950">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> зарим дууны дууг хааж байна"</string> <string name="system_error_wipe_data" msgid="5910572292172208493">"Таны төхөөрөмжид дотоод алдаа байна.Та төхөөрөмжөө үйлдвэрээс гарсан төлөвт шилжүүлэх хүртэл таны төхөөрөмж чинь тогтворгүй байж болох юм."</string> <string name="system_error_manufacturer" msgid="703545241070116315">"Таны төхөөрөмжид дотоод алдаа байна. Дэлгэрэнгүй мэдээлэл авахыг хүсвэл үйлдвэрлэгчтэйгээ холбоо барина уу."</string> @@ -2336,6 +2344,8 @@ <string name="mic_access_off_toast" msgid="8111040892954242437">"Микрофоныг блоклосон байна"</string> <string name="connected_display_unavailable_notification_title" msgid="5265409360902073556">"Дэлгэцэд тусгал үүсгэх боломжгүй"</string> <string name="connected_display_unavailable_notification_content" msgid="3845903313751217516">"Өөр кабель ашиглаад, дахин оролдоно уу"</string> + <!-- no translation found for connected_display_thermally_unavailable_notification_content (9205758199439955949) --> + <skip /> <string name="connected_display_cable_dont_support_displays_notification_title" msgid="8477183783847392465">"Кабель нь дэлгэцүүдийг дэмждэггүй байж магадгүй"</string> <string name="connected_display_cable_dont_support_displays_notification_content" msgid="8080498819171483973">"Таны USB-C кабель дэлгэцүүдэд зохих ёсоор холбогдохгүй байж магадгүй"</string> <string name="concurrent_display_notification_name" msgid="1526911253558311131">"Dual screen"</string> diff --git a/core/res/res/values-mr/strings.xml b/core/res/res/values-mr/strings.xml index 87227eee7079..6bfa0bfbf328 100644 --- a/core/res/res/values-mr/strings.xml +++ b/core/res/res/values-mr/strings.xml @@ -1710,6 +1710,10 @@ <string name="accessibility_service_action_perform_description" msgid="2718852014003170558">"हे तुमचा ॲप किंवा हार्डवेअर सेन्सरसोबतचा परस्परसंवाद ट्रॅक करू शकते आणि इतर ॲप्ससोबत तुमच्या वतीने संवाद साधू शकते."</string> <string name="accessibility_dialog_button_allow" msgid="2092558122987144530">"अनुमती द्या"</string> <string name="accessibility_dialog_button_deny" msgid="4129575637812472671">"नकार द्या"</string> + <!-- no translation found for accessibility_dialog_button_uninstall (2952465517671708108) --> + <skip /> + <!-- no translation found for accessibility_dialog_touch_filtered_warning (3741940116597822451) --> + <skip /> <string name="accessibility_select_shortcut_menu_title" msgid="6002726538854613272">"वैशिष्ट्य वापरणे सुरू करण्यासाठी त्यावर टॅप करा:"</string> <string name="accessibility_edit_shortcut_menu_button_title" msgid="239446795930436325">"अॅक्सेसिबिलिटी बटणासोबत वापरायची असलेली ॲप्स निवडा"</string> <string name="accessibility_edit_shortcut_menu_volume_title" msgid="1077294237378645981">"व्हॉल्यूम की शॉर्टकटसोबत वापरायची असलेली ॲप्स निवडा"</string> @@ -1904,6 +1908,10 @@ <string name="zen_mode_default_weekends_name" msgid="4707200272709377930">"आठवड्याच्या शेवटी"</string> <string name="zen_mode_default_events_name" msgid="2280682960128512257">"इव्हेंट"</string> <string name="zen_mode_default_every_night_name" msgid="1467765312174275823">"झोपताना"</string> + <!-- no translation found for zen_mode_implicit_activated (2634285680776672994) --> + <skip /> + <!-- no translation found for zen_mode_implicit_deactivated (8688441768371501750) --> + <skip /> <string name="muted_by" msgid="91464083490094950">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> काही ध्वनी म्यूट करत आहे"</string> <string name="system_error_wipe_data" msgid="5910572292172208493">"आपल्या डिव्हाइसमध्ये अंतर्गत समस्या आहे आणि तुमचा फॅक्टरी डेटा रीसेट होईपर्यंत ती अस्थिर असू शकते."</string> <string name="system_error_manufacturer" msgid="703545241070116315">"आपल्या डिव्हाइसमध्ये अंतर्गत समस्या आहे. तपशीलांसाठी आपल्या निर्मात्याशी संपर्क साधा."</string> @@ -2336,6 +2344,7 @@ <string name="mic_access_off_toast" msgid="8111040892954242437">"मायक्रोफोन ब्लॉक केलेला आहे"</string> <string name="connected_display_unavailable_notification_title" msgid="5265409360902073556">"डिस्प्लेवर मिरर करू शकत नाही"</string> <string name="connected_display_unavailable_notification_content" msgid="3845903313751217516">"वेगळी केबल वापरून पुन्हा प्रयत्न करा"</string> + <string name="connected_display_thermally_unavailable_notification_content" msgid="9205758199439955949">"तुमचे डिव्हाइस खूप गरम आहे आणि ते थंड होईपर्यंत डिस्प्लेमध्ये मिरर करू शकत नाही"</string> <string name="connected_display_cable_dont_support_displays_notification_title" msgid="8477183783847392465">"केबल कदाचित डिस्प्लेना सपोर्ट करणार नाही"</string> <string name="connected_display_cable_dont_support_displays_notification_content" msgid="8080498819171483973">"तुमची USB-C केबल कदाचित डिस्प्लेना योग्यरीत्या कनेक्ट होणार नाही"</string> <string name="concurrent_display_notification_name" msgid="1526911253558311131">"Dual screen"</string> diff --git a/core/res/res/values-ms/strings.xml b/core/res/res/values-ms/strings.xml index 7794150ea86e..769f0bddf55d 100644 --- a/core/res/res/values-ms/strings.xml +++ b/core/res/res/values-ms/strings.xml @@ -1710,6 +1710,10 @@ <string name="accessibility_service_action_perform_description" msgid="2718852014003170558">"Ciri ini boleh menjejaki interaksi anda dengan apl atau penderia perkakasan dan berinteraksi dengan apl bagi pihak anda."</string> <string name="accessibility_dialog_button_allow" msgid="2092558122987144530">"Benarkan"</string> <string name="accessibility_dialog_button_deny" msgid="4129575637812472671">"Tolak"</string> + <!-- no translation found for accessibility_dialog_button_uninstall (2952465517671708108) --> + <skip /> + <!-- no translation found for accessibility_dialog_touch_filtered_warning (3741940116597822451) --> + <skip /> <string name="accessibility_select_shortcut_menu_title" msgid="6002726538854613272">"Ketik ciri untuk mula menggunakan ciri itu:"</string> <string name="accessibility_edit_shortcut_menu_button_title" msgid="239446795930436325">"Pilih ciri untuk digunakan dengan butang kebolehaksesan"</string> <string name="accessibility_edit_shortcut_menu_volume_title" msgid="1077294237378645981">"Pilih ciri untuk digunakan dengan pintasan kekunci kelantangan"</string> @@ -1904,6 +1908,10 @@ <string name="zen_mode_default_weekends_name" msgid="4707200272709377930">"Hujung minggu"</string> <string name="zen_mode_default_events_name" msgid="2280682960128512257">"Acara"</string> <string name="zen_mode_default_every_night_name" msgid="1467765312174275823">"Tidur"</string> + <!-- no translation found for zen_mode_implicit_activated (2634285680776672994) --> + <skip /> + <!-- no translation found for zen_mode_implicit_deactivated (8688441768371501750) --> + <skip /> <string name="muted_by" msgid="91464083490094950">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> meredamkan sesetengah bunyi"</string> <string name="system_error_wipe_data" msgid="5910572292172208493">"Terdapat masalah dalaman dengan peranti anda. Peranti mungkin tidak stabil sehingga anda membuat tetapan semula data kilang."</string> <string name="system_error_manufacturer" msgid="703545241070116315">"Terdapat masalah dalaman dengan peranti anda. Hubungi pengilang untuk mengetahui butirannya."</string> @@ -2336,6 +2344,8 @@ <string name="mic_access_off_toast" msgid="8111040892954242437">"Mikrofon disekat"</string> <string name="connected_display_unavailable_notification_title" msgid="5265409360902073556">"Tidak dapat menyegerakkan kepada paparan"</string> <string name="connected_display_unavailable_notification_content" msgid="3845903313751217516">"Gunakan kabel lain dan cuba lagi"</string> + <!-- no translation found for connected_display_thermally_unavailable_notification_content (9205758199439955949) --> + <skip /> <string name="connected_display_cable_dont_support_displays_notification_title" msgid="8477183783847392465">"Kabel mungkin tidak menyokong paparan"</string> <string name="connected_display_cable_dont_support_displays_notification_content" msgid="8080498819171483973">"Kabel USB-C anda mungkin tidak bersambung kepada paparan dengan betul"</string> <string name="concurrent_display_notification_name" msgid="1526911253558311131">"Dwiskrin"</string> diff --git a/core/res/res/values-my/strings.xml b/core/res/res/values-my/strings.xml index fcc98d4f913f..df94876358ed 100644 --- a/core/res/res/values-my/strings.xml +++ b/core/res/res/values-my/strings.xml @@ -1710,6 +1710,10 @@ <string name="accessibility_service_action_perform_description" msgid="2718852014003170558">"၎င်းသည် သင်နှင့် အက်ပ်တစ်ခု (သို့) အာရုံခံကိရိယာအကြား ပြန်လှန်တုံ့ပြန်မှုများကို မှတ်သားနိုင်ပြီး သင့်ကိုယ်စား အက်ပ်များနှင့် ပြန်လှန်တုံ့ပြန်နိုင်သည်။"</string> <string name="accessibility_dialog_button_allow" msgid="2092558122987144530">"ခွင့်ပြုရန်"</string> <string name="accessibility_dialog_button_deny" msgid="4129575637812472671">"ပယ်ရန်"</string> + <!-- no translation found for accessibility_dialog_button_uninstall (2952465517671708108) --> + <skip /> + <!-- no translation found for accessibility_dialog_touch_filtered_warning (3741940116597822451) --> + <skip /> <string name="accessibility_select_shortcut_menu_title" msgid="6002726538854613272">"ဝန်ဆောင်မှုကို စတင်အသုံးပြုရန် တို့ပါ−"</string> <string name="accessibility_edit_shortcut_menu_button_title" msgid="239446795930436325">"အများသုံးနိုင်မှု ခလုတ်ဖြင့် အသုံးပြုရန် ဝန်ဆောင်မှုများကို ရွေးပါ"</string> <string name="accessibility_edit_shortcut_menu_volume_title" msgid="1077294237378645981">"အသံခလုတ် ဖြတ်လမ်းလင့်ခ်ဖြင့် အသုံးပြုရန် ဝန်ဆောင်မှုများကို ရွေးပါ"</string> @@ -1904,6 +1908,10 @@ <string name="zen_mode_default_weekends_name" msgid="4707200272709377930">"စနေ၊ တနင်္ဂနွေ"</string> <string name="zen_mode_default_events_name" msgid="2280682960128512257">"အစီအစဉ်"</string> <string name="zen_mode_default_every_night_name" msgid="1467765312174275823">"အိပ်နေချိန်"</string> + <!-- no translation found for zen_mode_implicit_activated (2634285680776672994) --> + <skip /> + <!-- no translation found for zen_mode_implicit_deactivated (8688441768371501750) --> + <skip /> <string name="muted_by" msgid="91464083490094950">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> သည် အချို့အသံကို ပိတ်နေသည်"</string> <string name="system_error_wipe_data" msgid="5910572292172208493">"သင့်ကိရိယာအတွင်းပိုင်းတွင် ပြဿနာရှိနေပြီး၊ မူလစက်ရုံထုတ်အခြေအနေအဖြစ် ပြန်လည်ရယူနိုင်သည်အထိ အခြေအနေမတည်ငြိမ်နိုင်ပါ။"</string> <string name="system_error_manufacturer" msgid="703545241070116315">"သင့်ကိရိယာအတွင်းပိုင်းတွင် ပြဿနာရှိနေ၏။ အသေးစိတ်သိရန်အတွက် ပစ္စည်းထုတ်လုပ်သူအား ဆက်သွယ်ပါ။"</string> @@ -2336,6 +2344,8 @@ <string name="mic_access_off_toast" msgid="8111040892954242437">"မိုက်ခရိုဖုန်း ပိတ်ထားသည်"</string> <string name="connected_display_unavailable_notification_title" msgid="5265409360902073556">"ဖန်သားပြင်တွင် စကရင်ပွား၍ မရပါ"</string> <string name="connected_display_unavailable_notification_content" msgid="3845903313751217516">"အခြားကေဘယ်ကြိုးသုံးပြီး ထပ်စမ်းကြည့်ပါ"</string> + <!-- no translation found for connected_display_thermally_unavailable_notification_content (9205758199439955949) --> + <skip /> <string name="connected_display_cable_dont_support_displays_notification_title" msgid="8477183783847392465">"ကေဘယ်ကြိုးက ဖန်သားပြင်များကို မပံ့ပိုးခြင်း ဖြစ်နိုင်သည်"</string> <string name="connected_display_cable_dont_support_displays_notification_content" msgid="8080498819171483973">"သင့် USB-C ကေဘယ်ကြိုးသည် ဖန်သားပြင်များနှင့် မှန်ကန်စွာ ချိတ်ဆက်မထားခြင်း ဖြစ်နိုင်သည်"</string> <string name="concurrent_display_notification_name" msgid="1526911253558311131">"Dual screen"</string> diff --git a/core/res/res/values-nb/strings.xml b/core/res/res/values-nb/strings.xml index 9d6e8050de50..4aca6fc6fa64 100644 --- a/core/res/res/values-nb/strings.xml +++ b/core/res/res/values-nb/strings.xml @@ -1710,6 +1710,10 @@ <string name="accessibility_service_action_perform_description" msgid="2718852014003170558">"Den kan spore kommunikasjonen din med en app eller maskinvaresensor og kommunisere med apper på dine vegne."</string> <string name="accessibility_dialog_button_allow" msgid="2092558122987144530">"Tillat"</string> <string name="accessibility_dialog_button_deny" msgid="4129575637812472671">"Avvis"</string> + <!-- no translation found for accessibility_dialog_button_uninstall (2952465517671708108) --> + <skip /> + <!-- no translation found for accessibility_dialog_touch_filtered_warning (3741940116597822451) --> + <skip /> <string name="accessibility_select_shortcut_menu_title" msgid="6002726538854613272">"Trykk på en funksjon for å begynne å bruke den:"</string> <string name="accessibility_edit_shortcut_menu_button_title" msgid="239446795930436325">"Velg funksjonene du vil bruke med Tilgjengelighet-knappen"</string> <string name="accessibility_edit_shortcut_menu_volume_title" msgid="1077294237378645981">"Velg funksjonene du vil bruke med volumtastsnarveien"</string> @@ -1904,6 +1908,10 @@ <string name="zen_mode_default_weekends_name" msgid="4707200272709377930">"Helg"</string> <string name="zen_mode_default_events_name" msgid="2280682960128512257">"Aktivitet"</string> <string name="zen_mode_default_every_night_name" msgid="1467765312174275823">"Sover"</string> + <!-- no translation found for zen_mode_implicit_activated (2634285680776672994) --> + <skip /> + <!-- no translation found for zen_mode_implicit_deactivated (8688441768371501750) --> + <skip /> <string name="muted_by" msgid="91464083490094950">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> slår av noen lyder"</string> <string name="system_error_wipe_data" msgid="5910572292172208493">"Det har oppstått et internt problem på enheten din, og den kan være ustabil til du tilbakestiller den til fabrikkdata."</string> <string name="system_error_manufacturer" msgid="703545241070116315">"Det har oppstått et internt problem på enheten din. Ta kontakt med produsenten for mer informasjon."</string> @@ -2336,6 +2344,8 @@ <string name="mic_access_off_toast" msgid="8111040892954242437">"Mikrofonen er blokkert"</string> <string name="connected_display_unavailable_notification_title" msgid="5265409360902073556">"Kan ikke speile til skjermen"</string> <string name="connected_display_unavailable_notification_content" msgid="3845903313751217516">"Bruk en annen kabel og prøv igjen"</string> + <!-- no translation found for connected_display_thermally_unavailable_notification_content (9205758199439955949) --> + <skip /> <string name="connected_display_cable_dont_support_displays_notification_title" msgid="8477183783847392465">"Kabelen støtter kanskje ikke skjermer"</string> <string name="connected_display_cable_dont_support_displays_notification_content" msgid="8080498819171483973">"USB-C-kabelen din kobler seg kanskje ikke til skjermer på riktig måte"</string> <string name="concurrent_display_notification_name" msgid="1526911253558311131">"Dual Screen"</string> diff --git a/core/res/res/values-ne/strings.xml b/core/res/res/values-ne/strings.xml index bd9853af7d20..16279129f730 100644 --- a/core/res/res/values-ne/strings.xml +++ b/core/res/res/values-ne/strings.xml @@ -1710,6 +1710,10 @@ <string name="accessibility_service_action_perform_description" msgid="2718852014003170558">"यसले कुनै एप वा हार्डवेयर सेन्सरसँग तपाईंले गर्ने अन्तर्क्रिया ट्र्याक गर्न सक्छ र तपाईंका तर्फबाट एपहरूसँग अन्तर्क्रिया गर्न सक्छ।"</string> <string name="accessibility_dialog_button_allow" msgid="2092558122987144530">"अनुमति दिनुहोस्"</string> <string name="accessibility_dialog_button_deny" msgid="4129575637812472671">"नदिनुहोस्"</string> + <!-- no translation found for accessibility_dialog_button_uninstall (2952465517671708108) --> + <skip /> + <!-- no translation found for accessibility_dialog_touch_filtered_warning (3741940116597822451) --> + <skip /> <string name="accessibility_select_shortcut_menu_title" msgid="6002726538854613272">"कुनै सुविधा प्रयोग गर्न थाल्न उक्त सुविधामा ट्याप गर्नुहोस्:"</string> <string name="accessibility_edit_shortcut_menu_button_title" msgid="239446795930436325">"पहुँचको बटनमार्फत प्रयोग गर्न चाहेका सुविधाहरू छनौट गर्नुहोस्"</string> <string name="accessibility_edit_shortcut_menu_volume_title" msgid="1077294237378645981">"भोल्युम कुञ्जीको सर्टकटमार्फत प्रयोग गर्न चाहेका सुविधाहरू छनौट गर्नुहोस्"</string> @@ -1904,6 +1908,10 @@ <string name="zen_mode_default_weekends_name" msgid="4707200272709377930">"शनिबार"</string> <string name="zen_mode_default_events_name" msgid="2280682960128512257">"कार्यक्रम"</string> <string name="zen_mode_default_every_night_name" msgid="1467765312174275823">"निदाएका बेला"</string> + <!-- no translation found for zen_mode_implicit_activated (2634285680776672994) --> + <skip /> + <!-- no translation found for zen_mode_implicit_deactivated (8688441768371501750) --> + <skip /> <string name="muted_by" msgid="91464083490094950">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> ले केही ध्वनिहरू म्युट गर्दै छ"</string> <string name="system_error_wipe_data" msgid="5910572292172208493">"तपाईंको यन्त्रसँग आन्तरिक समस्या छ, र तपाईंले फ्याक्ट्री डाटा रिसेट नगर्दासम्म यो अस्थिर रहन्छ।"</string> <string name="system_error_manufacturer" msgid="703545241070116315">"तपाईंको यन्त्रसँग आन्तरिक समस्या छ। विवरणहरूको लागि आफ्नो निर्मातासँग सम्पर्क गर्नुहोस्।"</string> @@ -2336,6 +2344,8 @@ <string name="mic_access_off_toast" msgid="8111040892954242437">"माइक्रोफोन म्युट गरिएको छ"</string> <string name="connected_display_unavailable_notification_title" msgid="5265409360902073556">"डिस्प्लेमा मिरर गर्न सकिएन"</string> <string name="connected_display_unavailable_notification_content" msgid="3845903313751217516">"अर्कै केबल प्रयोग गरी फेरि प्रयास गर्नुहोस्"</string> + <!-- no translation found for connected_display_thermally_unavailable_notification_content (9205758199439955949) --> + <skip /> <string name="connected_display_cable_dont_support_displays_notification_title" msgid="8477183783847392465">"यो केबल डिस्प्लेहरूमा प्रयोग गर्न नमिल्न सक्छ"</string> <string name="connected_display_cable_dont_support_displays_notification_content" msgid="8080498819171483973">"तपाईंको USB-C केबल डिस्प्लेहरूमा राम्रोसँग नजोडिन सक्छ"</string> <string name="concurrent_display_notification_name" msgid="1526911253558311131">"Dual Screen"</string> diff --git a/core/res/res/values-nl/strings.xml b/core/res/res/values-nl/strings.xml index a4bedd325af2..5ae7d6d25372 100644 --- a/core/res/res/values-nl/strings.xml +++ b/core/res/res/values-nl/strings.xml @@ -1710,6 +1710,10 @@ <string name="accessibility_service_action_perform_description" msgid="2718852014003170558">"Deze functie kan je interacties met een app of een hardwaresensor bijhouden en namens jou met apps communiceren."</string> <string name="accessibility_dialog_button_allow" msgid="2092558122987144530">"Toestaan"</string> <string name="accessibility_dialog_button_deny" msgid="4129575637812472671">"Weigeren"</string> + <!-- no translation found for accessibility_dialog_button_uninstall (2952465517671708108) --> + <skip /> + <!-- no translation found for accessibility_dialog_touch_filtered_warning (3741940116597822451) --> + <skip /> <string name="accessibility_select_shortcut_menu_title" msgid="6002726538854613272">"Tik op een functie om deze te gebruiken:"</string> <string name="accessibility_edit_shortcut_menu_button_title" msgid="239446795930436325">"Functies kiezen voor gebruik met de knop Toegankelijkheid"</string> <string name="accessibility_edit_shortcut_menu_volume_title" msgid="1077294237378645981">"Functies kiezen voor gebruik met de sneltoets via de volumeknop"</string> @@ -1904,6 +1908,10 @@ <string name="zen_mode_default_weekends_name" msgid="4707200272709377930">"Weekend"</string> <string name="zen_mode_default_events_name" msgid="2280682960128512257">"Afspraken"</string> <string name="zen_mode_default_every_night_name" msgid="1467765312174275823">"Slapen"</string> + <!-- no translation found for zen_mode_implicit_activated (2634285680776672994) --> + <skip /> + <!-- no translation found for zen_mode_implicit_deactivated (8688441768371501750) --> + <skip /> <string name="muted_by" msgid="91464083490094950">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> zet sommige geluiden uit"</string> <string name="system_error_wipe_data" msgid="5910572292172208493">"Er is een intern probleem met je apparaat. Het apparaat kan instabiel zijn totdat u het apparaat terugzet naar de fabrieksinstellingen."</string> <string name="system_error_manufacturer" msgid="703545241070116315">"Er is een intern probleem met je apparaat. Neem contact op met de fabrikant voor meer informatie."</string> @@ -2336,6 +2344,8 @@ <string name="mic_access_off_toast" msgid="8111040892954242437">"Microfoon is geblokkeerd"</string> <string name="connected_display_unavailable_notification_title" msgid="5265409360902073556">"Kan niet spiegelen naar scherm"</string> <string name="connected_display_unavailable_notification_content" msgid="3845903313751217516">"Gebruik een andere kabel en probeer het opnieuw"</string> + <!-- no translation found for connected_display_thermally_unavailable_notification_content (9205758199439955949) --> + <skip /> <string name="connected_display_cable_dont_support_displays_notification_title" msgid="8477183783847392465">"De kabel ondersteunt misschien geen schermen"</string> <string name="connected_display_cable_dont_support_displays_notification_content" msgid="8080498819171483973">"Je USB-C-kabel sluit misschien niet goed aan op schermen"</string> <string name="concurrent_display_notification_name" msgid="1526911253558311131">"Dual Screen"</string> diff --git a/core/res/res/values-or/strings.xml b/core/res/res/values-or/strings.xml index af76df84f3d0..9997f165bde6 100644 --- a/core/res/res/values-or/strings.xml +++ b/core/res/res/values-or/strings.xml @@ -1689,8 +1689,8 @@ <string name="kg_text_message_separator" product="default" msgid="4503708889934976866">" — "</string> <string name="kg_reordering_delete_drop_target_text" msgid="2034358143731750914">"କାଢ଼ି ଦିଅନ୍ତୁ"</string> <string name="safe_media_volume_warning" product="default" msgid="3751676824423049994">"ମାତ୍ରା ବଢ଼ାଇ ସୁପାରିଶ ସ୍ତର ବଢ଼ାଉଛନ୍ତି? \n\n ଲମ୍ବା ସମୟ ପର୍ଯ୍ୟନ୍ତ ଉଚ୍ଚ ଶବ୍ଦରେ ଶୁଣିଲେ ଆପଣଙ୍କ ଶ୍ରବଣ ଶକ୍ତି ଖରାପ ହୋଇପାରେ।"</string> - <string name="csd_dose_reached_warning" product="default" msgid="491875107583931974">"ଅଧିକ ଭଲ୍ୟୁମରେ ଶୁଣିବା ଜାରି ରଖିବେ?\n\nସୁପାରିଶ କରାଯାଇଥିବା ଅପେକ୍ଷା ଅଧିକ ସମୟ ପାଇଁ ହେଡଫୋନର ଭଲ୍ୟୁମ ଅଧିକ ଅଛି, ଯାହା ଆପଣଙ୍କ ଶ୍ରବଣ ଶକ୍ତିକୁ ନଷ୍ଟ କରିପାରିବ"</string> - <string name="csd_momentary_exposure_warning" product="default" msgid="7730840903435405501">"ଉଚ୍ଚ ସାଉଣ୍ଡ ଚିହ୍ନଟ କରାଯାଇଛି\n\nହେଡଫୋନର ଭଲ୍ୟୁମ ସୁପାରିଶ କରାଯାଇଥିବା ଅପେକ୍ଷା ଅଧିକ ଅଛି, ଯାହା ଆପଣଙ୍କ ଶ୍ରବଣ ଶକ୍ତିକୁ ନଷ୍ଟ କରିପାରିବ"</string> + <string name="csd_dose_reached_warning" product="default" msgid="491875107583931974">"ଅଧିକ ଭଲ୍ୟୁମରେ ଶୁଣିବା ଜାରି ରଖିବେ?\n\nସୁପାରିଶ କରାଯାଇଥିବା ଭଲ୍ୟୁମ ଠାରୁ ହେଡଫୋନର ଭଲ୍ୟୁମ ଅଧିକ ଅଛି, ଯାହା ଆପଣଙ୍କ ଶ୍ରବଣ ଶକ୍ତିକୁ ନଷ୍ଟ କରିପାରେ"</string> + <string name="csd_momentary_exposure_warning" product="default" msgid="7730840903435405501">"ଲାଉଡ ସାଉଣ୍ଡ ଚିହ୍ନଟ ହୋଇଛି\n\nସୁପାରିଶ ଭଲ୍ୟୁମ ଠାରୁ ହେଡଫୋନର ଭଲ୍ୟୁମ ଅଧିକ ଅଛି, ଯାହା ଆପଣଙ୍କ ଶ୍ରବଣ ଶକ୍ତିକୁ ନଷ୍ଟ କରିପାରେ"</string> <string name="accessibility_shortcut_warning_dialog_title" msgid="4017995837692622933">"ଆକ୍ସେସବିଲିଟି ଶର୍ଟକଟ୍ ବ୍ୟବହାର କରିବେ?"</string> <string name="accessibility_shortcut_toogle_warning" msgid="4161716521310929544">"ସର୍ଟକଟ୍ ଚାଲୁ ଥିବା ବେଳେ, ଉଭୟ ଭଲ୍ୟୁମ୍ ବଟନ୍ 3 ସେକେଣ୍ଡ ପାଇଁ ଦବାଇବା ଦ୍ୱାରା ଏକ ଆକ୍ସେସବିଲିଟି ଫିଚର୍ ଆରମ୍ଭ ହେବ।"</string> <string name="accessibility_shortcut_multiple_service_warning_title" msgid="3135860819356676426">"ଆକ୍ସେସିବିଲିଟୀ ଫିଚରଗୁଡ଼ିକ ପାଇଁ ସର୍ଟକଟ୍ ଚାଲୁ କରିବେ?"</string> @@ -1710,6 +1710,10 @@ <string name="accessibility_service_action_perform_description" msgid="2718852014003170558">"ଏହା କୌଣସି ଆପ କିମ୍ବା ହାର୍ଡୱେର ସେନ୍ସର ସହ ଆପଣଙ୍କର ଇଣ୍ଟେରାକ୍ସନକୁ ଟ୍ରାକ କରିପାରେ ଏବଂ ଆପଣଙ୍କ ତରଫରୁ ଆପ୍ସ ସହ ଇଣ୍ଟରାକ୍ଟ କରିପାରେ।"</string> <string name="accessibility_dialog_button_allow" msgid="2092558122987144530">"ଅନୁମତି"</string> <string name="accessibility_dialog_button_deny" msgid="4129575637812472671">"ଅଗ୍ରାହ୍ୟ"</string> + <!-- no translation found for accessibility_dialog_button_uninstall (2952465517671708108) --> + <skip /> + <!-- no translation found for accessibility_dialog_touch_filtered_warning (3741940116597822451) --> + <skip /> <string name="accessibility_select_shortcut_menu_title" msgid="6002726538854613272">"ଏକ ଫିଚର୍ ବ୍ୟବହାର କରିବା ଆରମ୍ଭ କରିବାକୁ ଏହାକୁ ଟାପ୍ କରନ୍ତୁ:"</string> <string name="accessibility_edit_shortcut_menu_button_title" msgid="239446795930436325">"ଆକ୍ସେସିବିଲିଟୀ ବଟନ୍ ସହିତ ବ୍ୟବହାର କରିବାକୁ ଫିଚରଗୁଡ଼ିକ ବାଛନ୍ତୁ"</string> <string name="accessibility_edit_shortcut_menu_volume_title" msgid="1077294237378645981">"ଭଲ୍ୟୁମ୍ କୀ ସର୍ଟକଟ୍ ସହିତ ବ୍ୟବହାର କରିବାକୁ ଫିଚରଗୁଡ଼ିକ ବାଛନ୍ତୁ"</string> @@ -1904,6 +1908,10 @@ <string name="zen_mode_default_weekends_name" msgid="4707200272709377930">"ସପ୍ତାହାନ୍ତ"</string> <string name="zen_mode_default_events_name" msgid="2280682960128512257">"ଇଭେଣ୍ଟ"</string> <string name="zen_mode_default_every_night_name" msgid="1467765312174275823">"ଶୋଇବା"</string> + <!-- no translation found for zen_mode_implicit_activated (2634285680776672994) --> + <skip /> + <!-- no translation found for zen_mode_implicit_deactivated (8688441768371501750) --> + <skip /> <string name="muted_by" msgid="91464083490094950">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> କିଛି ସାଉଣ୍ଡକୁ ମ୍ୟୁଟ୍ କରୁଛି"</string> <string name="system_error_wipe_data" msgid="5910572292172208493">"ଆପଣଙ୍କ ଡିଭାଇସ୍ରେ ଏକ ସମସ୍ୟା ରହିଛି ଏବଂ ଆପଣ ଫ୍ୟାକ୍ଟୋରୀ ଡାଟା ରିସେଟ୍ ନକରିବା ପର୍ଯ୍ୟନ୍ତ ଏହା ଅସ୍ଥିର ରହିପାରେ।"</string> <string name="system_error_manufacturer" msgid="703545241070116315">"ଆପଣଙ୍କ ଡିଭାଇସରେ ଏକ ସମସ୍ୟା ରହିଛି। ବିବରଣୀ ପାଇଁ ଆପଣଙ୍କ ଉତ୍ପାଦକଙ୍କ ସହ କଣ୍ଟାକ୍ଟ କରନ୍ତୁ।"</string> @@ -2336,6 +2344,8 @@ <string name="mic_access_off_toast" msgid="8111040892954242437">"ମାଇକ୍ରୋଫୋନକୁ ବ୍ଲକ କରାଯାଇଛି"</string> <string name="connected_display_unavailable_notification_title" msgid="5265409360902073556">"ଡିସପ୍ଲେ କରିବାକୁ ମିରର କରାଯାଇପାରିବ ନାହିଁ"</string> <string name="connected_display_unavailable_notification_content" msgid="3845903313751217516">"ଏକ ଭିନ୍ନ କେବୁଲ ବ୍ୟବହାର କରି ପୁଣି ଚେଷ୍ଟା କରନ୍ତୁ"</string> + <!-- no translation found for connected_display_thermally_unavailable_notification_content (9205758199439955949) --> + <skip /> <string name="connected_display_cable_dont_support_displays_notification_title" msgid="8477183783847392465">"କେବୁଲ ଡିସପ୍ଲେଗୁଡ଼ିକୁ ସମର୍ଥନ କରିନପାରେ"</string> <string name="connected_display_cable_dont_support_displays_notification_content" msgid="8080498819171483973">"ଆପଣଙ୍କ USB-C କେବୁଲ ଡିସପ୍ଲେଗୁଡ଼ିକ ସହ ସଠିକ ଭାବରେ କନେକ୍ଟ ହୋଇନପାରେ"</string> <string name="concurrent_display_notification_name" msgid="1526911253558311131">"Dual Screen"</string> diff --git a/core/res/res/values-pa/strings.xml b/core/res/res/values-pa/strings.xml index 1db544a21b42..4b9289dfd457 100644 --- a/core/res/res/values-pa/strings.xml +++ b/core/res/res/values-pa/strings.xml @@ -1689,8 +1689,8 @@ <string name="kg_text_message_separator" product="default" msgid="4503708889934976866">" — "</string> <string name="kg_reordering_delete_drop_target_text" msgid="2034358143731750914">"ਹਟਾਓ"</string> <string name="safe_media_volume_warning" product="default" msgid="3751676824423049994">"ਕੀ ਵੌਲਿਊਮ ਸਿਫ਼ਾਰਸ਼ ਕੀਤੇ ਪੱਧਰ ਤੋਂ ਵਧਾਉਣੀ ਹੈ?\n\nਲੰਮੇ ਸਮੇਂ ਤੱਕ ਉੱਚ ਵੌਲਿਊਮ ਤੇ ਸੁਣਨ ਨਾਲ ਤੁਹਾਡੀ ਸੁਣਨ ਸ਼ਕਤੀ ਨੂੰ ਨੁਕਸਾਨ ਪਹੁੰਚ ਸਕਦਾ ਹੈ।"</string> - <string name="csd_dose_reached_warning" product="default" msgid="491875107583931974">"ਕੀ ਉੱਚੀ ਅਵਾਜ਼ ਵਿੱਚ ਸੁਣਨਾ ਜਾਰੀ ਰੱਖਣਾ ਹੈ?\n\nਹੈੱਡਫ਼ੋਨ ਦੀ ਅਵਾਜ਼ ਸਿਫ਼ਾਰਸ਼ੀ ਸਮੇਂ ਨਾਲੋਂ ਜ਼ਿਆਦਾ ਦੇਰ ਤੱਕ ਉੱਚੀ ਰੱਖੀ ਗਈ, ਜਿਸ ਨਾਲ ਤੁਹਾਡੀ ਸੁਣਨ ਸ਼ਕਤੀ ਨੂੰ ਨੁਕਸਾਨ ਪਹੁੰਚ ਸਕਦਾ ਹੈ"</string> - <string name="csd_momentary_exposure_warning" product="default" msgid="7730840903435405501">"ਉੱਚੀ ਧੁਨੀ ਦਾ ਪਤਾ ਲੱਗਾ\n\nਹੈੱਡਫ਼ੋਨ ਦੀ ਅਵਾਜ਼ ਨੂੰ ਸਿਫ਼ਾਰਸ਼ੀ ਪੱਧਰ ਨਾਲੋਂ ਜ਼ਿਆਦਾ ਦੇਰ ਤੱਕ ਉੱਚੀ ਰੱਖਿਆ ਗਿਆ, ਜਿਸ ਨਾਲ ਤੁਹਾਡੀ ਸੁਣਨ ਸ਼ਕਤੀ ਨੂੰ ਨੁਕਸਾਨ ਪਹੁੰਚ ਸਕਦਾ ਹੈ"</string> + <string name="csd_dose_reached_warning" product="default" msgid="491875107583931974">"ਕੀ ਉੱਚੀ ਅਵਾਜ਼ ਵਿੱਚ ਸੁਣਦੇ ਰਹਿਣਾ ਹੈ?\n\nਹੈੱਡਫ਼ੋਨ ਦੀ ਅਵਾਜ਼ ਸਿਫ਼ਾਰਸ਼ੀ ਸਮੇਂ ਨਾਲੋਂ ਜ਼ਿਆਦਾ ਦੇਰ ਤੱਕ ਉੱਚੀ ਰੱਖੀ ਹੋਈ ਹੈ, ਜਿਸ ਨਾਲ ਤੁਹਾਡੀ ਸੁਣਨ ਸ਼ਕਤੀ ਨੂੰ ਨੁਕਸਾਨ ਪਹੁੰਚ ਸਕਦਾ ਹੈ"</string> + <string name="csd_momentary_exposure_warning" product="default" msgid="7730840903435405501">"ਉੱਚੀ ਅਵਾਜ਼ ਦਾ ਪਤਾ ਲੱਗਾ\n\nਹੈੱਡਫ਼ੋਨ ਦੀ ਅਵਾਜ਼ ਸਿਫ਼ਾਰਸ਼ੀ ਪੱਧਰ ਨਾਲੋਂ ਜ਼ਿਆਦਾ ਦੇਰ ਤੱਕ ਉੱਚੀ ਰੱਖੀ ਹੋਈ ਹੈ, ਜਿਸ ਨਾਲ ਤੁਹਾਡੀ ਸੁਣਨ ਸ਼ਕਤੀ ਨੂੰ ਨੁਕਸਾਨ ਪਹੁੰਚ ਸਕਦਾ ਹੈ"</string> <string name="accessibility_shortcut_warning_dialog_title" msgid="4017995837692622933">"ਕੀ ਪਹੁੰਚਯੋਗਤਾ ਸ਼ਾਰਟਕੱਟ ਵਰਤਣਾ ਹੈ?"</string> <string name="accessibility_shortcut_toogle_warning" msgid="4161716521310929544">"ਸ਼ਾਰਟਕੱਟ ਚਾਲੂ ਹੋਣ \'ਤੇ, ਕਿਸੇ ਪਹੁੰਚਯੋਗਤਾ ਵਿਸ਼ੇਸ਼ਤਾ ਨੂੰ ਸ਼ੁਰੂ ਕਰਨ ਲਈ ਦੋਵੇਂ ਅਵਾਜ਼ ਬਟਨਾਂ ਨੂੰ 3 ਸਕਿੰਟ ਲਈ ਦਬਾ ਕੇ ਰੱਖੋ।"</string> <string name="accessibility_shortcut_multiple_service_warning_title" msgid="3135860819356676426">"ਕੀ ਪਹੁੰਚਯੋਗਤਾ ਵਿਸ਼ੇਸ਼ਤਾਵਾਂ ਲਈ ਸ਼ਾਰਟਕੱਟ ਚਾਲੂ ਕਰਨਾ ਹੈ?"</string> @@ -1710,6 +1710,10 @@ <string name="accessibility_service_action_perform_description" msgid="2718852014003170558">"ਇਹ ਕਿਸੇ ਐਪ ਜਾਂ ਹਾਰਡਵੇਅਰ ਸੈਂਸਰ ਦੇ ਨਾਲ ਤੁਹਾਡੀਆਂ ਅੰਤਰਕਿਰਿਆਵਾਂ ਨੂੰ ਟਰੈਕ ਕਰ ਸਕਦੀ ਹੈ, ਅਤੇ ਤੁਹਾਡੀ ਤਰਫ਼ੋਂ ਐਪਾਂ ਦੇ ਨਾਲ ਅੰਤਰਕਿਰਿਆ ਕਰ ਸਕਦੀ ਹੈ।"</string> <string name="accessibility_dialog_button_allow" msgid="2092558122987144530">"ਕਰਨ ਦਿਓ"</string> <string name="accessibility_dialog_button_deny" msgid="4129575637812472671">"ਨਾ ਕਰਨ ਦਿਓ"</string> + <!-- no translation found for accessibility_dialog_button_uninstall (2952465517671708108) --> + <skip /> + <!-- no translation found for accessibility_dialog_touch_filtered_warning (3741940116597822451) --> + <skip /> <string name="accessibility_select_shortcut_menu_title" msgid="6002726538854613272">"ਕਿਸੇ ਵਿਸ਼ੇਸ਼ਤਾ ਨੂੰ ਵਰਤਣਾ ਸ਼ੁਰੂ ਕਰਨ ਲਈ ਉਸ \'ਤੇ ਟੈਪ ਕਰੋ:"</string> <string name="accessibility_edit_shortcut_menu_button_title" msgid="239446795930436325">"ਪਹੁੰਚਯੋਗਤਾ ਬਟਨ ਨਾਲ ਵਰਤਣ ਲਈ ਵਿਸ਼ੇਸ਼ਤਾਵਾਂ ਚੁਣੋ"</string> <string name="accessibility_edit_shortcut_menu_volume_title" msgid="1077294237378645981">"ਅਵਾਜ਼ ਕੁੰਜੀ ਸ਼ਾਰਟਕੱਟ ਨਾਲ ਵਰਤਣ ਲਈ ਵਿਸ਼ੇਸ਼ਤਾਵਾਂ ਚੁਣੋ"</string> @@ -1904,6 +1908,10 @@ <string name="zen_mode_default_weekends_name" msgid="4707200272709377930">"ਹਫ਼ਤੇ ਦਾ ਅੰਤਲਾ ਦਿਨ"</string> <string name="zen_mode_default_events_name" msgid="2280682960128512257">"ਇਵੈਂਟ"</string> <string name="zen_mode_default_every_night_name" msgid="1467765312174275823">"ਸੌਣ ਵੇਲੇ"</string> + <!-- no translation found for zen_mode_implicit_activated (2634285680776672994) --> + <skip /> + <!-- no translation found for zen_mode_implicit_deactivated (8688441768371501750) --> + <skip /> <string name="muted_by" msgid="91464083490094950">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> ਕੁਝ ਧੁਨੀਆਂ ਨੂੰ ਮਿਊਟ ਕਰ ਰਹੀ ਹੈ"</string> <string name="system_error_wipe_data" msgid="5910572292172208493">"ਤੁਹਾਡੇ ਡੀਵਾਈਸ ਨਾਲ ਇੱਕ ਅੰਦਰੂਨੀ ਸਮੱਸਿਆ ਹੈ ਅਤੇ ਇਹ ਅਸਥਿਰ ਹੋ ਸਕਦੀ ਹੈ ਜਦੋਂ ਤੱਕ ਤੁਸੀਂ ਫੈਕਟਰੀ ਡਾਟਾ ਰੀਸੈੱਟ ਨਹੀਂ ਕਰਦੇ।"</string> <string name="system_error_manufacturer" msgid="703545241070116315">"ਤੁਹਾਡੇ ਡੀਵਾਈਸ ਨਾਲ ਇੱਕ ਅੰਦਰੂਨੀ ਸਮੱਸਿਆ ਸੀ। ਵੇਰਵਿਆਂ ਲਈ ਆਪਣੇ ਨਿਰਮਾਤਾ ਨੂੰ ਸੰਪਰਕ ਕਰੋ।"</string> @@ -2336,6 +2344,8 @@ <string name="mic_access_off_toast" msgid="8111040892954242437">"ਮਾਈਕ੍ਰੋਫ਼ੋਨ ਬਲਾਕ ਕੀਤਾ ਗਿਆ ਹੈ"</string> <string name="connected_display_unavailable_notification_title" msgid="5265409360902073556">"ਡਿਸਪਲੇ \'ਤੇ ਪ੍ਰਤਿਬਿੰਬਿਤ ਨਹੀਂ ਕੀਤਾ ਜਾ ਸਕਦਾ"</string> <string name="connected_display_unavailable_notification_content" msgid="3845903313751217516">"ਕੋਈ ਵੱਖਰੀ ਕੇਬਲ ਵਰਤ ਕੇ ਦੁਬਾਰਾ ਕੋਸ਼ਿਸ਼ ਕਰੋ"</string> + <!-- no translation found for connected_display_thermally_unavailable_notification_content (9205758199439955949) --> + <skip /> <string name="connected_display_cable_dont_support_displays_notification_title" msgid="8477183783847392465">"ਹੋ ਸਕਦਾ ਹੈ ਕਿ ਕੇਬਲ ਡਿਸਪਲੇਆਂ ਦਾ ਸਮਰਥਨ ਨਾ ਕਰੇ"</string> <string name="connected_display_cable_dont_support_displays_notification_content" msgid="8080498819171483973">"ਹੋ ਸਕਦਾ ਹੈ ਕਿ ਤੁਹਾਡੀ USB-C ਕੇਬਲ ਡਿਸਪਲੇਆਂ ਨਾਲ ਠੀਕ ਤਰ੍ਹਾਂ ਕਨੈਕਟ ਨਾ ਹੋਵੇ"</string> <string name="concurrent_display_notification_name" msgid="1526911253558311131">"Dual Screen"</string> diff --git a/core/res/res/values-pl/strings.xml b/core/res/res/values-pl/strings.xml index f708f7de715f..0273cc34a175 100644 --- a/core/res/res/values-pl/strings.xml +++ b/core/res/res/values-pl/strings.xml @@ -1712,6 +1712,10 @@ <string name="accessibility_service_action_perform_description" msgid="2718852014003170558">"Może śledzić Twoje interakcje z aplikacjami lub czujnikiem sprzętowym, a także obsługiwać aplikacje za Ciebie."</string> <string name="accessibility_dialog_button_allow" msgid="2092558122987144530">"Zezwól"</string> <string name="accessibility_dialog_button_deny" msgid="4129575637812472671">"Odmów"</string> + <!-- no translation found for accessibility_dialog_button_uninstall (2952465517671708108) --> + <skip /> + <!-- no translation found for accessibility_dialog_touch_filtered_warning (3741940116597822451) --> + <skip /> <string name="accessibility_select_shortcut_menu_title" msgid="6002726538854613272">"Wybierz funkcję, aby zacząć z niej korzystać:"</string> <string name="accessibility_edit_shortcut_menu_button_title" msgid="239446795930436325">"Wybierz funkcje, których chcesz używać z przyciskiem ułatwień dostępu"</string> <string name="accessibility_edit_shortcut_menu_volume_title" msgid="1077294237378645981">"Wybierz funkcje, do których chcesz używać skrótu z klawiszami głośności"</string> @@ -1906,6 +1910,10 @@ <string name="zen_mode_default_weekends_name" msgid="4707200272709377930">"Weekend"</string> <string name="zen_mode_default_events_name" msgid="2280682960128512257">"Wydarzenie"</string> <string name="zen_mode_default_every_night_name" msgid="1467765312174275823">"Sen"</string> + <!-- no translation found for zen_mode_implicit_activated (2634285680776672994) --> + <skip /> + <!-- no translation found for zen_mode_implicit_deactivated (8688441768371501750) --> + <skip /> <string name="muted_by" msgid="91464083490094950">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> wycisza niektóre dźwięki"</string> <string name="system_error_wipe_data" msgid="5910572292172208493">"W Twoim urządzeniu wystąpił problem wewnętrzny. Może być ono niestabilne, dopóki nie przywrócisz danych fabrycznych."</string> <string name="system_error_manufacturer" msgid="703545241070116315">"W Twoim urządzeniu wystąpił problem wewnętrzny. Skontaktuj się z jego producentem, by otrzymać szczegółowe informacje."</string> @@ -2338,6 +2346,8 @@ <string name="mic_access_off_toast" msgid="8111040892954242437">"Mikrofon jest zablokowany"</string> <string name="connected_display_unavailable_notification_title" msgid="5265409360902073556">"Nie można utworzyć odbicia lustrzanego na wyświetlaczu"</string> <string name="connected_display_unavailable_notification_content" msgid="3845903313751217516">"Użyj innego kabla i spróbuj ponownie"</string> + <!-- no translation found for connected_display_thermally_unavailable_notification_content (9205758199439955949) --> + <skip /> <string name="connected_display_cable_dont_support_displays_notification_title" msgid="8477183783847392465">"Kabel może nie obsługiwać wyświetlaczy"</string> <string name="connected_display_cable_dont_support_displays_notification_content" msgid="8080498819171483973">"Kabel USB-C może nie łączyć się prawidłowo z wyświetlaczami"</string> <string name="concurrent_display_notification_name" msgid="1526911253558311131">"Podwójny ekran"</string> diff --git a/core/res/res/values-pt-rBR/strings.xml b/core/res/res/values-pt-rBR/strings.xml index b3b0e26f6a4e..ec7658da99bf 100644 --- a/core/res/res/values-pt-rBR/strings.xml +++ b/core/res/res/values-pt-rBR/strings.xml @@ -1711,6 +1711,10 @@ <string name="accessibility_service_action_perform_description" msgid="2718852014003170558">"Pode monitorar suas interações com um app ou um sensor de hardware e interagir com apps em seu nome."</string> <string name="accessibility_dialog_button_allow" msgid="2092558122987144530">"Permitir"</string> <string name="accessibility_dialog_button_deny" msgid="4129575637812472671">"Negar"</string> + <!-- no translation found for accessibility_dialog_button_uninstall (2952465517671708108) --> + <skip /> + <!-- no translation found for accessibility_dialog_touch_filtered_warning (3741940116597822451) --> + <skip /> <string name="accessibility_select_shortcut_menu_title" msgid="6002726538854613272">"Toque em um recurso para começar a usá-lo:"</string> <string name="accessibility_edit_shortcut_menu_button_title" msgid="239446795930436325">"Escolha recursos para usar com o botão de acessibilidade"</string> <string name="accessibility_edit_shortcut_menu_volume_title" msgid="1077294237378645981">"Escolha recursos para usar com o atalho da tecla de volume"</string> @@ -1905,6 +1909,10 @@ <string name="zen_mode_default_weekends_name" msgid="4707200272709377930">"Fim de semana"</string> <string name="zen_mode_default_events_name" msgid="2280682960128512257">"Evento"</string> <string name="zen_mode_default_every_night_name" msgid="1467765312174275823">"Dormir"</string> + <!-- no translation found for zen_mode_implicit_activated (2634285680776672994) --> + <skip /> + <!-- no translation found for zen_mode_implicit_deactivated (8688441768371501750) --> + <skip /> <string name="muted_by" msgid="91464083490094950">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> está silenciando alguns sons"</string> <string name="system_error_wipe_data" msgid="5910572292172208493">"Há um problema interno com seu dispositivo. Ele pode ficar instável até que você faça a redefinição para configuração original."</string> <string name="system_error_manufacturer" msgid="703545241070116315">"Há um problema interno com seu dispositivo. Entre em contato com o fabricante para saber mais detalhes."</string> @@ -2337,6 +2345,8 @@ <string name="mic_access_off_toast" msgid="8111040892954242437">"O microfone está bloqueado"</string> <string name="connected_display_unavailable_notification_title" msgid="5265409360902073556">"Não é possível espelhar a tela"</string> <string name="connected_display_unavailable_notification_content" msgid="3845903313751217516">"Use outro cabo e tente de novo"</string> + <!-- no translation found for connected_display_thermally_unavailable_notification_content (9205758199439955949) --> + <skip /> <string name="connected_display_cable_dont_support_displays_notification_title" msgid="8477183783847392465">"Talvez o cabo não tenha suporte a telas"</string> <string name="connected_display_cable_dont_support_displays_notification_content" msgid="8080498819171483973">"Seu cabo USB-C pode não se conectar a telas corretamente"</string> <string name="concurrent_display_notification_name" msgid="1526911253558311131">"Tela dupla"</string> diff --git a/core/res/res/values-pt-rPT/strings.xml b/core/res/res/values-pt-rPT/strings.xml index 784f2a9ca4d0..b834c0f1f48d 100644 --- a/core/res/res/values-pt-rPT/strings.xml +++ b/core/res/res/values-pt-rPT/strings.xml @@ -1711,6 +1711,10 @@ <string name="accessibility_service_action_perform_description" msgid="2718852014003170558">"Pode monitorizar as suas interações com uma app ou um sensor de hardware e interagir com apps em seu nome."</string> <string name="accessibility_dialog_button_allow" msgid="2092558122987144530">"Permitir"</string> <string name="accessibility_dialog_button_deny" msgid="4129575637812472671">"Recusar"</string> + <!-- no translation found for accessibility_dialog_button_uninstall (2952465517671708108) --> + <skip /> + <!-- no translation found for accessibility_dialog_touch_filtered_warning (3741940116597822451) --> + <skip /> <string name="accessibility_select_shortcut_menu_title" msgid="6002726538854613272">"Toque numa funcionalidade para começar a utilizá-la:"</string> <string name="accessibility_edit_shortcut_menu_button_title" msgid="239446795930436325">"Escolha funcionalidades para utilizar com o botão Acessibilidade"</string> <string name="accessibility_edit_shortcut_menu_volume_title" msgid="1077294237378645981">"Escolha funcionalidades para usar com o atalho das teclas de volume"</string> @@ -1905,6 +1909,10 @@ <string name="zen_mode_default_weekends_name" msgid="4707200272709377930">"Fim de semana"</string> <string name="zen_mode_default_events_name" msgid="2280682960128512257">"Evento"</string> <string name="zen_mode_default_every_night_name" msgid="1467765312174275823">"A dormir"</string> + <!-- no translation found for zen_mode_implicit_activated (2634285680776672994) --> + <skip /> + <!-- no translation found for zen_mode_implicit_deactivated (8688441768371501750) --> + <skip /> <string name="muted_by" msgid="91464083490094950">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> está a desativar alguns sons."</string> <string name="system_error_wipe_data" msgid="5910572292172208493">"Existe um problema interno no seu dispositivo e pode ficar instável até efetuar uma reposição de dados de fábrica."</string> <string name="system_error_manufacturer" msgid="703545241070116315">"Existe um problema interno no seu dispositivo. Contacte o fabricante para obter mais informações."</string> @@ -2337,6 +2345,8 @@ <string name="mic_access_off_toast" msgid="8111040892954242437">"O microfone está bloqueado"</string> <string name="connected_display_unavailable_notification_title" msgid="5265409360902073556">"Não é possível espelhar para o ecrã"</string> <string name="connected_display_unavailable_notification_content" msgid="3845903313751217516">"Use um cabo diferente e tente novamente"</string> + <!-- no translation found for connected_display_thermally_unavailable_notification_content (9205758199439955949) --> + <skip /> <string name="connected_display_cable_dont_support_displays_notification_title" msgid="8477183783847392465">"O cabo pode não suportar ecrãs"</string> <string name="connected_display_cable_dont_support_displays_notification_content" msgid="8080498819171483973">"O cabo USB-C pode não se ligar a ecrãs corretamente"</string> <string name="concurrent_display_notification_name" msgid="1526911253558311131">"Dual Screen"</string> diff --git a/core/res/res/values-pt/strings.xml b/core/res/res/values-pt/strings.xml index b3b0e26f6a4e..ec7658da99bf 100644 --- a/core/res/res/values-pt/strings.xml +++ b/core/res/res/values-pt/strings.xml @@ -1711,6 +1711,10 @@ <string name="accessibility_service_action_perform_description" msgid="2718852014003170558">"Pode monitorar suas interações com um app ou um sensor de hardware e interagir com apps em seu nome."</string> <string name="accessibility_dialog_button_allow" msgid="2092558122987144530">"Permitir"</string> <string name="accessibility_dialog_button_deny" msgid="4129575637812472671">"Negar"</string> + <!-- no translation found for accessibility_dialog_button_uninstall (2952465517671708108) --> + <skip /> + <!-- no translation found for accessibility_dialog_touch_filtered_warning (3741940116597822451) --> + <skip /> <string name="accessibility_select_shortcut_menu_title" msgid="6002726538854613272">"Toque em um recurso para começar a usá-lo:"</string> <string name="accessibility_edit_shortcut_menu_button_title" msgid="239446795930436325">"Escolha recursos para usar com o botão de acessibilidade"</string> <string name="accessibility_edit_shortcut_menu_volume_title" msgid="1077294237378645981">"Escolha recursos para usar com o atalho da tecla de volume"</string> @@ -1905,6 +1909,10 @@ <string name="zen_mode_default_weekends_name" msgid="4707200272709377930">"Fim de semana"</string> <string name="zen_mode_default_events_name" msgid="2280682960128512257">"Evento"</string> <string name="zen_mode_default_every_night_name" msgid="1467765312174275823">"Dormir"</string> + <!-- no translation found for zen_mode_implicit_activated (2634285680776672994) --> + <skip /> + <!-- no translation found for zen_mode_implicit_deactivated (8688441768371501750) --> + <skip /> <string name="muted_by" msgid="91464083490094950">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> está silenciando alguns sons"</string> <string name="system_error_wipe_data" msgid="5910572292172208493">"Há um problema interno com seu dispositivo. Ele pode ficar instável até que você faça a redefinição para configuração original."</string> <string name="system_error_manufacturer" msgid="703545241070116315">"Há um problema interno com seu dispositivo. Entre em contato com o fabricante para saber mais detalhes."</string> @@ -2337,6 +2345,8 @@ <string name="mic_access_off_toast" msgid="8111040892954242437">"O microfone está bloqueado"</string> <string name="connected_display_unavailable_notification_title" msgid="5265409360902073556">"Não é possível espelhar a tela"</string> <string name="connected_display_unavailable_notification_content" msgid="3845903313751217516">"Use outro cabo e tente de novo"</string> + <!-- no translation found for connected_display_thermally_unavailable_notification_content (9205758199439955949) --> + <skip /> <string name="connected_display_cable_dont_support_displays_notification_title" msgid="8477183783847392465">"Talvez o cabo não tenha suporte a telas"</string> <string name="connected_display_cable_dont_support_displays_notification_content" msgid="8080498819171483973">"Seu cabo USB-C pode não se conectar a telas corretamente"</string> <string name="concurrent_display_notification_name" msgid="1526911253558311131">"Tela dupla"</string> diff --git a/core/res/res/values-ro/strings.xml b/core/res/res/values-ro/strings.xml index 88f5044eefdf..dc89003efa3d 100644 --- a/core/res/res/values-ro/strings.xml +++ b/core/res/res/values-ro/strings.xml @@ -1711,6 +1711,10 @@ <string name="accessibility_service_action_perform_description" msgid="2718852014003170558">"Poate să urmărească interacțiunile tale cu o aplicație sau cu un senzor hardware și să interacționeze cu aplicații în numele tău."</string> <string name="accessibility_dialog_button_allow" msgid="2092558122987144530">"Permite"</string> <string name="accessibility_dialog_button_deny" msgid="4129575637812472671">"Refuz"</string> + <!-- no translation found for accessibility_dialog_button_uninstall (2952465517671708108) --> + <skip /> + <!-- no translation found for accessibility_dialog_touch_filtered_warning (3741940116597822451) --> + <skip /> <string name="accessibility_select_shortcut_menu_title" msgid="6002726538854613272">"Atinge o funcție ca să începi să o folosești:"</string> <string name="accessibility_edit_shortcut_menu_button_title" msgid="239446795930436325">"Alege funcțiile pe care să le folosești cu butonul de accesibilitate"</string> <string name="accessibility_edit_shortcut_menu_volume_title" msgid="1077294237378645981">"Alege funcțiile pentru comanda rapidă a butonului de volum"</string> @@ -1905,6 +1909,10 @@ <string name="zen_mode_default_weekends_name" msgid="4707200272709377930">"Weekend"</string> <string name="zen_mode_default_events_name" msgid="2280682960128512257">"Eveniment"</string> <string name="zen_mode_default_every_night_name" msgid="1467765312174275823">"Somn"</string> + <!-- no translation found for zen_mode_implicit_activated (2634285680776672994) --> + <skip /> + <!-- no translation found for zen_mode_implicit_deactivated (8688441768371501750) --> + <skip /> <string name="muted_by" msgid="91464083490094950">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> dezactivează anumite sunete"</string> <string name="system_error_wipe_data" msgid="5910572292172208493">"A apărut o problemă internă pe dispozitiv, iar acesta poate fi instabil până la revenirea la setările din fabrică."</string> <string name="system_error_manufacturer" msgid="703545241070116315">"A apărut o problemă internă pe dispozitiv. Pentru detalii, contactează producătorul."</string> @@ -2337,6 +2345,8 @@ <string name="mic_access_off_toast" msgid="8111040892954242437">"Microfonul este blocat"</string> <string name="connected_display_unavailable_notification_title" msgid="5265409360902073556">"Nu se poate oglindi pe ecran"</string> <string name="connected_display_unavailable_notification_content" msgid="3845903313751217516">"Folosește alt cablu și încearcă din nou"</string> + <!-- no translation found for connected_display_thermally_unavailable_notification_content (9205758199439955949) --> + <skip /> <string name="connected_display_cable_dont_support_displays_notification_title" msgid="8477183783847392465">"Cablul poate să nu fie compatibil cu ecranele"</string> <string name="connected_display_cable_dont_support_displays_notification_content" msgid="8080498819171483973">"Cablul USB-C poate să nu se conecteze corespunzător la ecrane"</string> <string name="concurrent_display_notification_name" msgid="1526911253558311131">"Dual screen"</string> diff --git a/core/res/res/values-ru/strings.xml b/core/res/res/values-ru/strings.xml index 7f5e87f2bbb7..8bd65763bbae 100644 --- a/core/res/res/values-ru/strings.xml +++ b/core/res/res/values-ru/strings.xml @@ -1712,6 +1712,10 @@ <string name="accessibility_service_action_perform_description" msgid="2718852014003170558">"Сервис может отслеживать ваше взаимодействие с приложениями и датчиками устройства и давать приложениям команды от вашего имени."</string> <string name="accessibility_dialog_button_allow" msgid="2092558122987144530">"Разрешить"</string> <string name="accessibility_dialog_button_deny" msgid="4129575637812472671">"Отклонить"</string> + <!-- no translation found for accessibility_dialog_button_uninstall (2952465517671708108) --> + <skip /> + <!-- no translation found for accessibility_dialog_touch_filtered_warning (3741940116597822451) --> + <skip /> <string name="accessibility_select_shortcut_menu_title" msgid="6002726538854613272">"Выберите, какую функцию использовать:"</string> <string name="accessibility_edit_shortcut_menu_button_title" msgid="239446795930436325">"Выберите функции, которые будут запускаться с помощью кнопки специальных возможностей"</string> <string name="accessibility_edit_shortcut_menu_volume_title" msgid="1077294237378645981">"Выберите функции, которые будут запускаться с помощью кнопки регулировки громкости"</string> @@ -1906,6 +1910,10 @@ <string name="zen_mode_default_weekends_name" msgid="4707200272709377930">"Выходные"</string> <string name="zen_mode_default_events_name" msgid="2280682960128512257">"Мероприятие"</string> <string name="zen_mode_default_every_night_name" msgid="1467765312174275823">"Время сна"</string> + <!-- no translation found for zen_mode_implicit_activated (2634285680776672994) --> + <skip /> + <!-- no translation found for zen_mode_implicit_deactivated (8688441768371501750) --> + <skip /> <string name="muted_by" msgid="91464083490094950">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> приглушает некоторые звуки."</string> <string name="system_error_wipe_data" msgid="5910572292172208493">"Произошла внутренняя ошибка, и устройство может работать нестабильно, пока вы не выполните сброс настроек."</string> <string name="system_error_manufacturer" msgid="703545241070116315">"Произошла внутренняя ошибка. Обратитесь к производителю устройства за подробными сведениями."</string> @@ -2338,6 +2346,8 @@ <string name="mic_access_off_toast" msgid="8111040892954242437">"Микрофон заблокирован."</string> <string name="connected_display_unavailable_notification_title" msgid="5265409360902073556">"Не удается дублировать на экран"</string> <string name="connected_display_unavailable_notification_content" msgid="3845903313751217516">"Используйте другой кабель или повторите попытку."</string> + <!-- no translation found for connected_display_thermally_unavailable_notification_content (9205758199439955949) --> + <skip /> <string name="connected_display_cable_dont_support_displays_notification_title" msgid="8477183783847392465">"Кабель может не подходить для подключения к дисплеям"</string> <string name="connected_display_cable_dont_support_displays_notification_content" msgid="8080498819171483973">"Возможно, подключение дисплеев с помощью этого кабеля USB-C не поддерживается."</string> <string name="concurrent_display_notification_name" msgid="1526911253558311131">"Dual Screen"</string> diff --git a/core/res/res/values-si/strings.xml b/core/res/res/values-si/strings.xml index e90f1a2cea22..cba8d477ca3b 100644 --- a/core/res/res/values-si/strings.xml +++ b/core/res/res/values-si/strings.xml @@ -1710,6 +1710,10 @@ <string name="accessibility_service_action_perform_description" msgid="2718852014003170558">"මෙයට යෙදුමක් හෝ දෘඪාංග සංවේදකයක් සමඟ ඔබේ අන්තර්ක්රියා හඹා යෑමට, සහ ඔබ වෙනුවෙන් යෙදුම් සමඟ අන්තර්ක්රියාවේ යෙදීමට හැකි ය."</string> <string name="accessibility_dialog_button_allow" msgid="2092558122987144530">"ඉඩ දෙන්න"</string> <string name="accessibility_dialog_button_deny" msgid="4129575637812472671">"ප්රතික්ෂේප කරන්න"</string> + <!-- no translation found for accessibility_dialog_button_uninstall (2952465517671708108) --> + <skip /> + <!-- no translation found for accessibility_dialog_touch_filtered_warning (3741940116597822451) --> + <skip /> <string name="accessibility_select_shortcut_menu_title" msgid="6002726538854613272">"එය භාවිත කිරීම ආරම්භ කිරීමට විශේෂාංගයක් තට්ටු කරන්න:"</string> <string name="accessibility_edit_shortcut_menu_button_title" msgid="239446795930436325">"ප්රවේශ්යතා බොත්තම සමග භාවිත කිරීමට විශේෂාංග තෝරා ගන්න"</string> <string name="accessibility_edit_shortcut_menu_volume_title" msgid="1077294237378645981">"හඬ පරිමා යතුරු කෙටිමග සමග භාවිත කිරීමට විශේෂාංග තෝරා ගන්න"</string> @@ -1904,6 +1908,10 @@ <string name="zen_mode_default_weekends_name" msgid="4707200272709377930">"සති අන්තය"</string> <string name="zen_mode_default_events_name" msgid="2280682960128512257">"සිදුවීම"</string> <string name="zen_mode_default_every_night_name" msgid="1467765312174275823">"නිදා ගනිමින්"</string> + <!-- no translation found for zen_mode_implicit_activated (2634285680776672994) --> + <skip /> + <!-- no translation found for zen_mode_implicit_deactivated (8688441768371501750) --> + <skip /> <string name="muted_by" msgid="91464083490094950">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> සමහර ශබ්ද නිහඬ කරමින්"</string> <string name="system_error_wipe_data" msgid="5910572292172208493">"ඔබේ උපාංගය සමගින් ගැටලුවක් ඇති අතර, ඔබේ කර්මාන්තශාලා දත්ත යළි සකසන තෙක් එය අස්ථායි විය හැකිය."</string> <string name="system_error_manufacturer" msgid="703545241070116315">"ඔබේ උපාංගය සමගින් අභ්යන්තර ගැටලුවක් ඇත. විස්තර සඳහා ඔබේ නිෂ්පාදක අමතන්න."</string> @@ -2336,6 +2344,8 @@ <string name="mic_access_off_toast" msgid="8111040892954242437">"මයික්රෆෝනය අවහිර කර ඇත"</string> <string name="connected_display_unavailable_notification_title" msgid="5265409360902073556">"සංදර්ශකයට දර්පණය කළ නොහැක"</string> <string name="connected_display_unavailable_notification_content" msgid="3845903313751217516">"වෙනස් කේබලයක් භාවිතා කර නැවත උත්සාහ කරන්න"</string> + <!-- no translation found for connected_display_thermally_unavailable_notification_content (9205758199439955949) --> + <skip /> <string name="connected_display_cable_dont_support_displays_notification_title" msgid="8477183783847392465">"කේබලය සංදර්ශක වෙත සහාය නොදැක්විය හැක"</string> <string name="connected_display_cable_dont_support_displays_notification_content" msgid="8080498819171483973">"ඔබේ USB-C කේබලයට සංදර්ශකවලට නිසි ලෙස සම්බන්ධ නොවිය හැක"</string> <string name="concurrent_display_notification_name" msgid="1526911253558311131">"Dual Screen"</string> diff --git a/core/res/res/values-sk/strings.xml b/core/res/res/values-sk/strings.xml index 3da576c4fd5a..61a88201ab05 100644 --- a/core/res/res/values-sk/strings.xml +++ b/core/res/res/values-sk/strings.xml @@ -1712,6 +1712,10 @@ <string name="accessibility_service_action_perform_description" msgid="2718852014003170558">"Môže sledovať vaše interakcie s aplikáciou alebo hardvérovým senzorom a interagovať s aplikáciami za vás."</string> <string name="accessibility_dialog_button_allow" msgid="2092558122987144530">"Povoliť"</string> <string name="accessibility_dialog_button_deny" msgid="4129575637812472671">"Zamietnuť"</string> + <!-- no translation found for accessibility_dialog_button_uninstall (2952465517671708108) --> + <skip /> + <!-- no translation found for accessibility_dialog_touch_filtered_warning (3741940116597822451) --> + <skip /> <string name="accessibility_select_shortcut_menu_title" msgid="6002726538854613272">"Klepnutím na funkciu ju začnite používať:"</string> <string name="accessibility_edit_shortcut_menu_button_title" msgid="239446795930436325">"Výber funkcií, ktoré chcete používať tlačidlom dostupnosti"</string> <string name="accessibility_edit_shortcut_menu_volume_title" msgid="1077294237378645981">"Výber funkcií, ktoré chcete používať klávesovou skratkou"</string> @@ -1906,6 +1910,10 @@ <string name="zen_mode_default_weekends_name" msgid="4707200272709377930">"Víkend"</string> <string name="zen_mode_default_events_name" msgid="2280682960128512257">"Udalosť"</string> <string name="zen_mode_default_every_night_name" msgid="1467765312174275823">"Spánok"</string> + <!-- no translation found for zen_mode_implicit_activated (2634285680776672994) --> + <skip /> + <!-- no translation found for zen_mode_implicit_deactivated (8688441768371501750) --> + <skip /> <string name="muted_by" msgid="91464083490094950">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> vypína niektoré zvuky"</string> <string name="system_error_wipe_data" msgid="5910572292172208493">"Vo vašom zariadení došlo k internému problému. Môže byť nestabilné, kým neobnovíte jeho výrobné nastavenia."</string> <string name="system_error_manufacturer" msgid="703545241070116315">"Vo vašom zariadení došlo k internému problému. Ak chcete získať podrobné informácie, obráťte sa na jeho výrobcu."</string> @@ -2338,6 +2346,8 @@ <string name="mic_access_off_toast" msgid="8111040892954242437">"Mikrofón je blokovaný"</string> <string name="connected_display_unavailable_notification_title" msgid="5265409360902073556">"Nedá sa zrkadliť do obrazovky"</string> <string name="connected_display_unavailable_notification_content" msgid="3845903313751217516">"Použite iný kábel a skúste znova"</string> + <!-- no translation found for connected_display_thermally_unavailable_notification_content (9205758199439955949) --> + <skip /> <string name="connected_display_cable_dont_support_displays_notification_title" msgid="8477183783847392465">"Kábel nemusí podporovať obrazovky"</string> <string name="connected_display_cable_dont_support_displays_notification_content" msgid="8080498819171483973">"Kábel USB‑C sa nemusí dať správne pripojiť k obrazovkám"</string> <string name="concurrent_display_notification_name" msgid="1526911253558311131">"Dual Screen"</string> diff --git a/core/res/res/values-sl/strings.xml b/core/res/res/values-sl/strings.xml index 5b731b730398..97f91f3408e4 100644 --- a/core/res/res/values-sl/strings.xml +++ b/core/res/res/values-sl/strings.xml @@ -1712,6 +1712,10 @@ <string name="accessibility_service_action_perform_description" msgid="2718852014003170558">"Spremlja lahko vaše interakcije z aplikacijo ali tipalom strojne opreme ter komunicira z aplikacijami v vašem imenu."</string> <string name="accessibility_dialog_button_allow" msgid="2092558122987144530">"Dovoli"</string> <string name="accessibility_dialog_button_deny" msgid="4129575637812472671">"Zavrni"</string> + <!-- no translation found for accessibility_dialog_button_uninstall (2952465517671708108) --> + <skip /> + <!-- no translation found for accessibility_dialog_touch_filtered_warning (3741940116597822451) --> + <skip /> <string name="accessibility_select_shortcut_menu_title" msgid="6002726538854613272">"Če želite začeti uporabljati funkcijo, se je dotaknite:"</string> <string name="accessibility_edit_shortcut_menu_button_title" msgid="239446795930436325">"Izberite funkcije, ki jih želite uporabljati z gumbom za dostopnost"</string> <string name="accessibility_edit_shortcut_menu_volume_title" msgid="1077294237378645981">"Izberite funkcije, ki jih želite uporabljati z bližnjico na tipki za glasnost"</string> @@ -1906,6 +1910,10 @@ <string name="zen_mode_default_weekends_name" msgid="4707200272709377930">"Konec tedna"</string> <string name="zen_mode_default_events_name" msgid="2280682960128512257">"Dogodek"</string> <string name="zen_mode_default_every_night_name" msgid="1467765312174275823">"Spanje"</string> + <!-- no translation found for zen_mode_implicit_activated (2634285680776672994) --> + <skip /> + <!-- no translation found for zen_mode_implicit_deactivated (8688441768371501750) --> + <skip /> <string name="muted_by" msgid="91464083490094950">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> izklaplja nekatere zvoke"</string> <string name="system_error_wipe_data" msgid="5910572292172208493">"Vaša naprava ima notranjo napako in bo morda nestabilna, dokler je ne ponastavite na tovarniške nastavitve."</string> <string name="system_error_manufacturer" msgid="703545241070116315">"Vaša naprava ima notranjo napako. Če želite več informacij, se obrnite na proizvajalca."</string> @@ -2338,6 +2346,8 @@ <string name="mic_access_off_toast" msgid="8111040892954242437">"Mikrofon je blokiran"</string> <string name="connected_display_unavailable_notification_title" msgid="5265409360902073556">"Ni mogoče zrcaliti zaslona"</string> <string name="connected_display_unavailable_notification_content" msgid="3845903313751217516">"Uporabite drug kabel in poskusite znova"</string> + <!-- no translation found for connected_display_thermally_unavailable_notification_content (9205758199439955949) --> + <skip /> <string name="connected_display_cable_dont_support_displays_notification_title" msgid="8477183783847392465">"Kabel morda ne podpira zaslonov"</string> <string name="connected_display_cable_dont_support_displays_notification_content" msgid="8080498819171483973">"Kabel USB-C se morda ne more ustrezno povezati z zasloni."</string> <string name="concurrent_display_notification_name" msgid="1526911253558311131">"Dual Screen"</string> diff --git a/core/res/res/values-sq/strings.xml b/core/res/res/values-sq/strings.xml index a4fd1bf18b39..ea5795d38e44 100644 --- a/core/res/res/values-sq/strings.xml +++ b/core/res/res/values-sq/strings.xml @@ -1710,6 +1710,10 @@ <string name="accessibility_service_action_perform_description" msgid="2718852014003170558">"Mund të monitorojë ndërveprimet me një aplikacion ose një sensor hardueri dhe të ndërveprojë me aplikacionet në emrin tënd."</string> <string name="accessibility_dialog_button_allow" msgid="2092558122987144530">"Lejo"</string> <string name="accessibility_dialog_button_deny" msgid="4129575637812472671">"Refuzo"</string> + <!-- no translation found for accessibility_dialog_button_uninstall (2952465517671708108) --> + <skip /> + <!-- no translation found for accessibility_dialog_touch_filtered_warning (3741940116597822451) --> + <skip /> <string name="accessibility_select_shortcut_menu_title" msgid="6002726538854613272">"Trokit te një veçori për të filluar ta përdorësh atë:"</string> <string name="accessibility_edit_shortcut_menu_button_title" msgid="239446795930436325">"Zgjidh veçoritë që do të përdorësh me butonin e qasshmërisë"</string> <string name="accessibility_edit_shortcut_menu_volume_title" msgid="1077294237378645981">"Zgjidh veçoritë që do të përdorësh me shkurtoren e tastit të volumit"</string> @@ -1904,6 +1908,10 @@ <string name="zen_mode_default_weekends_name" msgid="4707200272709377930">"Fundjava"</string> <string name="zen_mode_default_events_name" msgid="2280682960128512257">"Ngjarje"</string> <string name="zen_mode_default_every_night_name" msgid="1467765312174275823">"Në gjumë"</string> + <!-- no translation found for zen_mode_implicit_activated (2634285680776672994) --> + <skip /> + <!-- no translation found for zen_mode_implicit_deactivated (8688441768371501750) --> + <skip /> <string name="muted_by" msgid="91464083490094950">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> po çaktivizon disa tinguj"</string> <string name="system_error_wipe_data" msgid="5910572292172208493">"Ka një problem të brendshëm me pajisjen tënde. Ajo mund të jetë e paqëndrueshme derisa të rivendosësh të dhënat në gjendje fabrike."</string> <string name="system_error_manufacturer" msgid="703545241070116315">"Ka një problem të brendshëm me pajisjen tënde. Kontakto prodhuesin tënd për detaje."</string> @@ -2336,6 +2344,8 @@ <string name="mic_access_off_toast" msgid="8111040892954242437">"Mikrofoni është i bllokuar"</string> <string name="connected_display_unavailable_notification_title" msgid="5265409360902073556">"Nuk mund të pasqyrojë tek ekrani"</string> <string name="connected_display_unavailable_notification_content" msgid="3845903313751217516">"Përdor një kabllo tjetër dhe provo përsëri"</string> + <!-- no translation found for connected_display_thermally_unavailable_notification_content (9205758199439955949) --> + <skip /> <string name="connected_display_cable_dont_support_displays_notification_title" msgid="8477183783847392465">"Kablloja nuk mund të mbështetë ekranet"</string> <string name="connected_display_cable_dont_support_displays_notification_content" msgid="8080498819171483973">"Kablloja jote USB-C mund të mos lidhet siç duhet me ekranet"</string> <string name="concurrent_display_notification_name" msgid="1526911253558311131">"Dual Screen"</string> diff --git a/core/res/res/values-sr/strings.xml b/core/res/res/values-sr/strings.xml index e5ae2f71a226..e5bb5a973817 100644 --- a/core/res/res/values-sr/strings.xml +++ b/core/res/res/values-sr/strings.xml @@ -1711,6 +1711,10 @@ <string name="accessibility_service_action_perform_description" msgid="2718852014003170558">"Може да прати интеракције са апликацијом или сензором хардвера и користи апликације уместо вас."</string> <string name="accessibility_dialog_button_allow" msgid="2092558122987144530">"Дозволи"</string> <string name="accessibility_dialog_button_deny" msgid="4129575637812472671">"Одбиј"</string> + <!-- no translation found for accessibility_dialog_button_uninstall (2952465517671708108) --> + <skip /> + <!-- no translation found for accessibility_dialog_touch_filtered_warning (3741940116597822451) --> + <skip /> <string name="accessibility_select_shortcut_menu_title" msgid="6002726538854613272">"Додирните неку функцију да бисте почели да је користите:"</string> <string name="accessibility_edit_shortcut_menu_button_title" msgid="239446795930436325">"Одаберите функције које ћете користити са дугметом Приступачност"</string> <string name="accessibility_edit_shortcut_menu_volume_title" msgid="1077294237378645981">"Одаберите функције за пречицу тастером јачине звука"</string> @@ -1905,6 +1909,10 @@ <string name="zen_mode_default_weekends_name" msgid="4707200272709377930">"Викенд"</string> <string name="zen_mode_default_events_name" msgid="2280682960128512257">"Догађај"</string> <string name="zen_mode_default_every_night_name" msgid="1467765312174275823">"Спавање"</string> + <!-- no translation found for zen_mode_implicit_activated (2634285680776672994) --> + <skip /> + <!-- no translation found for zen_mode_implicit_deactivated (8688441768371501750) --> + <skip /> <string name="muted_by" msgid="91464083490094950">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> искључује неке звуке"</string> <string name="system_error_wipe_data" msgid="5910572292172208493">"Дошло је до интерног проблема у вези са уређајем и можда ће бити нестабилан док не обавите ресетовање на фабричка подешавања."</string> <string name="system_error_manufacturer" msgid="703545241070116315">"Дошло је до интерног проблема у вези са уређајем. Потражите детаље од произвођача."</string> @@ -2337,6 +2345,8 @@ <string name="mic_access_off_toast" msgid="8111040892954242437">"Микрофон је блокиран"</string> <string name="connected_display_unavailable_notification_title" msgid="5265409360902073556">"Пресликавање на екран није могуће"</string> <string name="connected_display_unavailable_notification_content" msgid="3845903313751217516">"Употребите други кабл и пробајте поново"</string> + <!-- no translation found for connected_display_thermally_unavailable_notification_content (9205758199439955949) --> + <skip /> <string name="connected_display_cable_dont_support_displays_notification_title" msgid="8477183783847392465">"Кабл не подржава екране"</string> <string name="connected_display_cable_dont_support_displays_notification_content" msgid="8080498819171483973">"USB-C кабл се не повезује правилно са екранима"</string> <string name="concurrent_display_notification_name" msgid="1526911253558311131">"Dual Screen"</string> diff --git a/core/res/res/values-sv/strings.xml b/core/res/res/values-sv/strings.xml index f3917fe70d17..d80c7590444f 100644 --- a/core/res/res/values-sv/strings.xml +++ b/core/res/res/values-sv/strings.xml @@ -1710,6 +1710,10 @@ <string name="accessibility_service_action_perform_description" msgid="2718852014003170558">"Den kan registrera din användning av en app eller maskinvarusensor och interagera med appar åt dig."</string> <string name="accessibility_dialog_button_allow" msgid="2092558122987144530">"Tillåt"</string> <string name="accessibility_dialog_button_deny" msgid="4129575637812472671">"Neka"</string> + <!-- no translation found for accessibility_dialog_button_uninstall (2952465517671708108) --> + <skip /> + <!-- no translation found for accessibility_dialog_touch_filtered_warning (3741940116597822451) --> + <skip /> <string name="accessibility_select_shortcut_menu_title" msgid="6002726538854613272">"Tryck på funktioner som du vill aktivera:"</string> <string name="accessibility_edit_shortcut_menu_button_title" msgid="239446795930436325">"Välj vilka funktioner du vill använda med hjälp av tillgänglighetsknappen"</string> <string name="accessibility_edit_shortcut_menu_volume_title" msgid="1077294237378645981">"Välj att funktioner att använda med hjälp av volymknappskortkommandot"</string> @@ -1904,6 +1908,10 @@ <string name="zen_mode_default_weekends_name" msgid="4707200272709377930">"I helgen"</string> <string name="zen_mode_default_events_name" msgid="2280682960128512257">"Händelse"</string> <string name="zen_mode_default_every_night_name" msgid="1467765312174275823">"När jag sover"</string> + <!-- no translation found for zen_mode_implicit_activated (2634285680776672994) --> + <skip /> + <!-- no translation found for zen_mode_implicit_deactivated (8688441768371501750) --> + <skip /> <string name="muted_by" msgid="91464083490094950">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> stänger av vissa ljud"</string> <string name="system_error_wipe_data" msgid="5910572292172208493">"Ett internt problem har uppstått i enheten, och det kan hända att problemet kvarstår tills du återställer standardinställningarna."</string> <string name="system_error_manufacturer" msgid="703545241070116315">"Ett internt problem har uppstått i enheten. Kontakta tillverkaren om du vill veta mer."</string> @@ -2336,6 +2344,8 @@ <string name="mic_access_off_toast" msgid="8111040892954242437">"Mikrofonen är blockerad"</string> <string name="connected_display_unavailable_notification_title" msgid="5265409360902073556">"Det går inte spegla till skärmen"</string> <string name="connected_display_unavailable_notification_content" msgid="3845903313751217516">"Använd en annan kabel och försök igen"</string> + <!-- no translation found for connected_display_thermally_unavailable_notification_content (9205758199439955949) --> + <skip /> <string name="connected_display_cable_dont_support_displays_notification_title" msgid="8477183783847392465">"Kabeln kanske inte har stöd för skärmar"</string> <string name="connected_display_cable_dont_support_displays_notification_content" msgid="8080498819171483973">"Det kanske inte går att ansluta skärmar korrekt med den här USB-C-kabeln"</string> <string name="concurrent_display_notification_name" msgid="1526911253558311131">"Dual Screen"</string> diff --git a/core/res/res/values-sw/strings.xml b/core/res/res/values-sw/strings.xml index 022331c6fd9f..3c2a02bc7ce7 100644 --- a/core/res/res/values-sw/strings.xml +++ b/core/res/res/values-sw/strings.xml @@ -1710,6 +1710,10 @@ <string name="accessibility_service_action_perform_description" msgid="2718852014003170558">"Inaweza kufuatilia mawasiliano yako na programu au kitambuzi cha maunzi na kuwasiliana na programu zingine kwa niaba yako."</string> <string name="accessibility_dialog_button_allow" msgid="2092558122987144530">"Ruhusu"</string> <string name="accessibility_dialog_button_deny" msgid="4129575637812472671">"Kataa"</string> + <!-- no translation found for accessibility_dialog_button_uninstall (2952465517671708108) --> + <skip /> + <!-- no translation found for accessibility_dialog_touch_filtered_warning (3741940116597822451) --> + <skip /> <string name="accessibility_select_shortcut_menu_title" msgid="6002726538854613272">"Gusa kipengele ili uanze kukitumia:"</string> <string name="accessibility_edit_shortcut_menu_button_title" msgid="239446795930436325">"Chagua vipengele vya kutumia na kitufe cha zana za ufikivu"</string> <string name="accessibility_edit_shortcut_menu_volume_title" msgid="1077294237378645981">"Chagua vipengele vya kutumia na njia ya mkato ya kitufe cha sauti"</string> @@ -1904,6 +1908,10 @@ <string name="zen_mode_default_weekends_name" msgid="4707200272709377930">"Wikendi"</string> <string name="zen_mode_default_events_name" msgid="2280682960128512257">"Tukio"</string> <string name="zen_mode_default_every_night_name" msgid="1467765312174275823">"Kulala"</string> + <!-- no translation found for zen_mode_implicit_activated (2634285680776672994) --> + <skip /> + <!-- no translation found for zen_mode_implicit_deactivated (8688441768371501750) --> + <skip /> <string name="muted_by" msgid="91464083490094950">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> inazima baadhi ya sauti"</string> <string name="system_error_wipe_data" msgid="5910572292172208493">"Kuna hitilafu ya ndani ya kifaa chako, na huenda kisiwe thabiti mpaka urejeshe mipangilio ya kiwandani."</string> <string name="system_error_manufacturer" msgid="703545241070116315">"Kuna hitilafu ya ndani ya kifaa chako. Wasiliana na mtengenezaji wa kifaa chako kwa maelezo."</string> @@ -2336,6 +2344,8 @@ <string name="mic_access_off_toast" msgid="8111040892954242437">"Maikrofoni imezuiwa"</string> <string name="connected_display_unavailable_notification_title" msgid="5265409360902073556">"Imeshindwa kuakisi kwenye skrini"</string> <string name="connected_display_unavailable_notification_content" msgid="3845903313751217516">"Tumia kebo tofauti kisha ujaribu tena"</string> + <!-- no translation found for connected_display_thermally_unavailable_notification_content (9205758199439955949) --> + <skip /> <string name="connected_display_cable_dont_support_displays_notification_title" msgid="8477183783847392465">"Huenda kebo haioani na skrini"</string> <string name="connected_display_cable_dont_support_displays_notification_content" msgid="8080498819171483973">"Huenda kebo yako ya USB-C isiunganishwe vizuri na skrini"</string> <string name="concurrent_display_notification_name" msgid="1526911253558311131">"Dual screen"</string> diff --git a/core/res/res/values-ta/strings.xml b/core/res/res/values-ta/strings.xml index 9ad4bd2bfb72..79bc2a472108 100644 --- a/core/res/res/values-ta/strings.xml +++ b/core/res/res/values-ta/strings.xml @@ -1710,6 +1710,10 @@ <string name="accessibility_service_action_perform_description" msgid="2718852014003170558">"ஏதேனும் ஆப்ஸ் அல்லது வன்பொருள் சென்சாரின் உதவியுடன் உரையாடல்களைக் கண்காணித்து உங்கள் சார்பாக ஆப்ஸுடன் உரையாட இச்சேவையால் இயலும்."</string> <string name="accessibility_dialog_button_allow" msgid="2092558122987144530">"அனுமதி"</string> <string name="accessibility_dialog_button_deny" msgid="4129575637812472671">"நிராகரி"</string> + <!-- no translation found for accessibility_dialog_button_uninstall (2952465517671708108) --> + <skip /> + <!-- no translation found for accessibility_dialog_touch_filtered_warning (3741940116597822451) --> + <skip /> <string name="accessibility_select_shortcut_menu_title" msgid="6002726538854613272">"ஒரு அம்சத்தைப் பயன்படுத்த அதைத் தட்டவும்:"</string> <string name="accessibility_edit_shortcut_menu_button_title" msgid="239446795930436325">"அணுகல்தன்மை பட்டன் மூலம் பயன்படுத்த விரும்பும் அம்சங்களைத் தேர்வுசெய்யுங்கள்"</string> <string name="accessibility_edit_shortcut_menu_volume_title" msgid="1077294237378645981">"ஒலியளவு விசை ஷார்ட்கட் மூலம் பயன்படுத்த விரும்பும் அம்சங்களைத் தேர்வுசெய்யுங்கள்"</string> @@ -1904,6 +1908,10 @@ <string name="zen_mode_default_weekends_name" msgid="4707200272709377930">"வார இறுதி"</string> <string name="zen_mode_default_events_name" msgid="2280682960128512257">"நிகழ்வு"</string> <string name="zen_mode_default_every_night_name" msgid="1467765312174275823">"உறக்கத்தில்"</string> + <!-- no translation found for zen_mode_implicit_activated (2634285680776672994) --> + <skip /> + <!-- no translation found for zen_mode_implicit_deactivated (8688441768371501750) --> + <skip /> <string name="muted_by" msgid="91464083490094950">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> சில ஒலிகளை முடக்குகிறது"</string> <string name="system_error_wipe_data" msgid="5910572292172208493">"சாதனத்தில் அகச் சிக்கல் இருக்கிறது, அதனை ஆரம்பநிலைக்கு மீட்டமைக்கும் வரை நிலையற்று இயங்கலாம்."</string> <string name="system_error_manufacturer" msgid="703545241070116315">"சாதனத்தில் அகச் சிக்கல் இருக்கிறது. விவரங்களுக்கு சாதன தயாரிப்பாளரைத் தொடர்புகொள்ளவும்."</string> @@ -2336,6 +2344,8 @@ <string name="mic_access_off_toast" msgid="8111040892954242437">"மைக்ரோஃபோன் முடக்கப்பட்டுள்ளது"</string> <string name="connected_display_unavailable_notification_title" msgid="5265409360902073556">"டிஸ்ப்ளேயில் பிரதிபலிக்க முடியவில்லை"</string> <string name="connected_display_unavailable_notification_content" msgid="3845903313751217516">"வெவ்வேறு கேபிள்களைப் பயன்படுத்தி மீண்டும் முயலவும்"</string> + <!-- no translation found for connected_display_thermally_unavailable_notification_content (9205758199439955949) --> + <skip /> <string name="connected_display_cable_dont_support_displays_notification_title" msgid="8477183783847392465">"டிஸ்ப்ளேக்களைக் கேபிள் ஆதரிக்காமல் இருக்கக்கூடும்"</string> <string name="connected_display_cable_dont_support_displays_notification_content" msgid="8080498819171483973">"டிஸ்ப்ளேக்களில் உங்கள் USB-C கேபிள் சரியாக இணைக்கப்படாமல் இருக்கக்கூடும்"</string> <string name="concurrent_display_notification_name" msgid="1526911253558311131">"இரட்டைத் திரை"</string> diff --git a/core/res/res/values-te/strings.xml b/core/res/res/values-te/strings.xml index d1c336d863f7..a2862ba3123c 100644 --- a/core/res/res/values-te/strings.xml +++ b/core/res/res/values-te/strings.xml @@ -1710,6 +1710,10 @@ <string name="accessibility_service_action_perform_description" msgid="2718852014003170558">"మీరు ఒక యాప్తో చేసే ఇంటరాక్షన్లను లేదా హార్డ్వేర్ సెన్సార్ను ట్రాక్ చేస్తూ మీ తరఫున యాప్లతో ఇంటరాక్ట్ చేయగలదు."</string> <string name="accessibility_dialog_button_allow" msgid="2092558122987144530">"అనుమతించండి"</string> <string name="accessibility_dialog_button_deny" msgid="4129575637812472671">"వద్దు"</string> + <!-- no translation found for accessibility_dialog_button_uninstall (2952465517671708108) --> + <skip /> + <!-- no translation found for accessibility_dialog_touch_filtered_warning (3741940116597822451) --> + <skip /> <string name="accessibility_select_shortcut_menu_title" msgid="6002726538854613272">"ఫీచర్ని ఉపయోగించడం ప్రారంభించడానికి, దాన్ని ట్యాప్ చేయండి:"</string> <string name="accessibility_edit_shortcut_menu_button_title" msgid="239446795930436325">"యాక్సెసిబిలిటీ బటన్తో ఉపయోగించడానికి ఫీచర్లను ఎంచుకోండి"</string> <string name="accessibility_edit_shortcut_menu_volume_title" msgid="1077294237378645981">"వాల్యూమ్ కీ షార్ట్కట్తో ఉపయోగించడానికి ఫీచర్లను ఎంచుకోండి"</string> @@ -1904,6 +1908,10 @@ <string name="zen_mode_default_weekends_name" msgid="4707200272709377930">"వారాంతం"</string> <string name="zen_mode_default_events_name" msgid="2280682960128512257">"ఈవెంట్"</string> <string name="zen_mode_default_every_night_name" msgid="1467765312174275823">"నిద్రావస్థ"</string> + <!-- no translation found for zen_mode_implicit_activated (2634285680776672994) --> + <skip /> + <!-- no translation found for zen_mode_implicit_deactivated (8688441768371501750) --> + <skip /> <string name="muted_by" msgid="91464083490094950">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> కొన్ని ధ్వనులను మ్యూట్ చేస్తోంది"</string> <string name="system_error_wipe_data" msgid="5910572292172208493">"మీ పరికరంతో అంతర్గత సమస్య ఏర్పడింది మరియు మీరు ఫ్యాక్టరీ డేటా రీసెట్ చేసే వరకు అస్థిరంగా ఉంటుంది."</string> <string name="system_error_manufacturer" msgid="703545241070116315">"మీ పరికరంతో అంతర్గత సమస్య ఏర్పడింది. వివరాల కోసం మీ తయారీదారుని సంప్రదించండి."</string> @@ -2336,6 +2344,8 @@ <string name="mic_access_off_toast" msgid="8111040892954242437">"మైక్రోఫోన్ బ్లాక్ చేయబడింది"</string> <string name="connected_display_unavailable_notification_title" msgid="5265409360902073556">"డిస్ప్లే చేయడానికి మిర్రర్ చేయడం సాధ్యపడదు"</string> <string name="connected_display_unavailable_notification_content" msgid="3845903313751217516">"వేరే కేబుల్ను ఉపయోగించి, మళ్లీ ట్రై చేయండి"</string> + <!-- no translation found for connected_display_thermally_unavailable_notification_content (9205758199439955949) --> + <skip /> <string name="connected_display_cable_dont_support_displays_notification_title" msgid="8477183783847392465">"డిస్ప్లేలను కేబుల్ సపోర్ట్ చేయకపోవచ్చు"</string> <string name="connected_display_cable_dont_support_displays_notification_content" msgid="8080498819171483973">"మీ USB-C కేబుల్, డిస్ప్లేలకు సరిగ్గా కనెక్ట్ కాకపోవచ్చు"</string> <string name="concurrent_display_notification_name" msgid="1526911253558311131">"Dual Screen"</string> diff --git a/core/res/res/values-th/strings.xml b/core/res/res/values-th/strings.xml index 06920b0f58f5..16e7611788c7 100644 --- a/core/res/res/values-th/strings.xml +++ b/core/res/res/values-th/strings.xml @@ -1710,6 +1710,10 @@ <string name="accessibility_service_action_perform_description" msgid="2718852014003170558">"การควบคุมนี้สามารถติดตามการโต้ตอบของคุณกับแอปหรือกับเซ็นเซอร์ของฮาร์ดแวร์ และโต้ตอบกับแอปต่างๆ แทนคุณ"</string> <string name="accessibility_dialog_button_allow" msgid="2092558122987144530">"อนุญาต"</string> <string name="accessibility_dialog_button_deny" msgid="4129575637812472671">"ปฏิเสธ"</string> + <!-- no translation found for accessibility_dialog_button_uninstall (2952465517671708108) --> + <skip /> + <!-- no translation found for accessibility_dialog_touch_filtered_warning (3741940116597822451) --> + <skip /> <string name="accessibility_select_shortcut_menu_title" msgid="6002726538854613272">"แตะฟีเจอร์เพื่อเริ่มใช้"</string> <string name="accessibility_edit_shortcut_menu_button_title" msgid="239446795930436325">"เลือกฟีเจอร์ที่จะใช้กับปุ่มการช่วยเหลือพิเศษ"</string> <string name="accessibility_edit_shortcut_menu_volume_title" msgid="1077294237378645981">"เลือกฟีเจอร์ที่จะใช้กับทางลัดปุ่มปรับระดับเสียง"</string> @@ -1904,6 +1908,10 @@ <string name="zen_mode_default_weekends_name" msgid="4707200272709377930">"สุดสัปดาห์"</string> <string name="zen_mode_default_events_name" msgid="2280682960128512257">"กิจกรรม"</string> <string name="zen_mode_default_every_night_name" msgid="1467765312174275823">"นอนหลับ"</string> + <!-- no translation found for zen_mode_implicit_activated (2634285680776672994) --> + <skip /> + <!-- no translation found for zen_mode_implicit_deactivated (8688441768371501750) --> + <skip /> <string name="muted_by" msgid="91464083490094950">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> กำลังปิดเสียงบางรายการ"</string> <string name="system_error_wipe_data" msgid="5910572292172208493">"อุปกรณ์ของคุณเกิดปัญหาภายในเครื่อง อุปกรณ์อาจทำงานไม่เสถียรจนกว่าคุณจะรีเซ็ตข้อมูลเป็นค่าเริ่มต้น"</string> <string name="system_error_manufacturer" msgid="703545241070116315">"อุปกรณ์ของคุณเกิดปัญหาภายในเครื่อง โปรดติดต่อผู้ผลิตเพื่อขอรายละเอียดเพิ่มเติม"</string> @@ -2336,6 +2344,8 @@ <string name="mic_access_off_toast" msgid="8111040892954242437">"ไมโครโฟนถูกบล็อก"</string> <string name="connected_display_unavailable_notification_title" msgid="5265409360902073556">"มิเรอร์ไปยังจอแสดงผลไม่ได้"</string> <string name="connected_display_unavailable_notification_content" msgid="3845903313751217516">"โปรดใช้สายอื่นและลองอีกครั้ง"</string> + <!-- no translation found for connected_display_thermally_unavailable_notification_content (9205758199439955949) --> + <skip /> <string name="connected_display_cable_dont_support_displays_notification_title" msgid="8477183783847392465">"สายสัญญาณอาจไม่รองรับจอแสดงผล"</string> <string name="connected_display_cable_dont_support_displays_notification_content" msgid="8080498819171483973">"สาย USB-C อาจเชื่อมต่อกับจอแสดงผลอย่างไม่ถูกต้อง"</string> <string name="concurrent_display_notification_name" msgid="1526911253558311131">"Dual Screen"</string> diff --git a/core/res/res/values-tl/strings.xml b/core/res/res/values-tl/strings.xml index 2477698e740d..b2a7f25fa771 100644 --- a/core/res/res/values-tl/strings.xml +++ b/core/res/res/values-tl/strings.xml @@ -1710,6 +1710,10 @@ <string name="accessibility_service_action_perform_description" msgid="2718852014003170558">"Masusubaybayan nito ang iyong mga pakikipag-ugayan sa isang app o hardware na sensor, at puwede itong makipag-ugnayan sa mga app para sa iyo."</string> <string name="accessibility_dialog_button_allow" msgid="2092558122987144530">"Payagan"</string> <string name="accessibility_dialog_button_deny" msgid="4129575637812472671">"Tanggihan"</string> + <!-- no translation found for accessibility_dialog_button_uninstall (2952465517671708108) --> + <skip /> + <!-- no translation found for accessibility_dialog_touch_filtered_warning (3741940116597822451) --> + <skip /> <string name="accessibility_select_shortcut_menu_title" msgid="6002726538854613272">"I-tap ang isang feature para simulan itong gamitin:"</string> <string name="accessibility_edit_shortcut_menu_button_title" msgid="239446795930436325">"Pumili ng mga feature na gagana sa pamamagitan ng button ng accessibility"</string> <string name="accessibility_edit_shortcut_menu_volume_title" msgid="1077294237378645981">"Pumili ng mga feature na gagana sa pamamagitan ng shortcut ng volume key"</string> @@ -1904,6 +1908,10 @@ <string name="zen_mode_default_weekends_name" msgid="4707200272709377930">"Weekend"</string> <string name="zen_mode_default_events_name" msgid="2280682960128512257">"Event"</string> <string name="zen_mode_default_every_night_name" msgid="1467765312174275823">"Pag-sleep"</string> + <!-- no translation found for zen_mode_implicit_activated (2634285680776672994) --> + <skip /> + <!-- no translation found for zen_mode_implicit_deactivated (8688441768371501750) --> + <skip /> <string name="muted_by" msgid="91464083490094950">"Minu-mute ng <xliff:g id="THIRD_PARTY">%1$s</xliff:g> ang ilang tunog"</string> <string name="system_error_wipe_data" msgid="5910572292172208493">"May internal na problema sa iyong device, at maaaring hindi ito maging stable hanggang sa i-reset mo ang factory data."</string> <string name="system_error_manufacturer" msgid="703545241070116315">"May internal na problema sa iyong device. Makipag-ugnayan sa iyong manufacturer upang malaman ang mga detalye."</string> @@ -2336,6 +2344,8 @@ <string name="mic_access_off_toast" msgid="8111040892954242437">"Naka-block ang mikropono"</string> <string name="connected_display_unavailable_notification_title" msgid="5265409360902073556">"Hindi makapag-mirror sa display"</string> <string name="connected_display_unavailable_notification_content" msgid="3845903313751217516">"Gumamit ng ibang cable at subukan ulit"</string> + <!-- no translation found for connected_display_thermally_unavailable_notification_content (9205758199439955949) --> + <skip /> <string name="connected_display_cable_dont_support_displays_notification_title" msgid="8477183783847392465">"Posibleng hindi sinusuportahan ng cable ang mga display"</string> <string name="connected_display_cable_dont_support_displays_notification_content" msgid="8080498819171483973">"Posibleng hindi kumonekta nang maayos sa mga display ang iyong USB-C cable"</string> <string name="concurrent_display_notification_name" msgid="1526911253558311131">"Dual screen"</string> diff --git a/core/res/res/values-tr/strings.xml b/core/res/res/values-tr/strings.xml index 5598dbc914ac..eb58785bbf5f 100644 --- a/core/res/res/values-tr/strings.xml +++ b/core/res/res/values-tr/strings.xml @@ -1710,6 +1710,10 @@ <string name="accessibility_service_action_perform_description" msgid="2718852014003170558">"Bir uygulama veya donanım sensörüyle etkileşimlerinizi takip edebilir ve sizin adınıza uygulamalarla etkileşimde bulunabilir."</string> <string name="accessibility_dialog_button_allow" msgid="2092558122987144530">"İzin ver"</string> <string name="accessibility_dialog_button_deny" msgid="4129575637812472671">"Reddet"</string> + <!-- no translation found for accessibility_dialog_button_uninstall (2952465517671708108) --> + <skip /> + <!-- no translation found for accessibility_dialog_touch_filtered_warning (3741940116597822451) --> + <skip /> <string name="accessibility_select_shortcut_menu_title" msgid="6002726538854613272">"Kullanmaya başlamak için bir özelliğe dokunun:"</string> <string name="accessibility_edit_shortcut_menu_button_title" msgid="239446795930436325">"Erişilebilirlik düğmesiyle kullanılacak özellikleri seçin"</string> <string name="accessibility_edit_shortcut_menu_volume_title" msgid="1077294237378645981">"Ses tuşu kısayoluyla kullanılacak özellikleri seçin"</string> @@ -1904,6 +1908,10 @@ <string name="zen_mode_default_weekends_name" msgid="4707200272709377930">"Hafta sonu"</string> <string name="zen_mode_default_events_name" msgid="2280682960128512257">"Etkinlik"</string> <string name="zen_mode_default_every_night_name" msgid="1467765312174275823">"Uyku"</string> + <!-- no translation found for zen_mode_implicit_activated (2634285680776672994) --> + <skip /> + <!-- no translation found for zen_mode_implicit_deactivated (8688441768371501750) --> + <skip /> <string name="muted_by" msgid="91464083490094950">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> bazı sesleri kapatıyor"</string> <string name="system_error_wipe_data" msgid="5910572292172208493">"Cihazınızla ilgili dahili bir sorun oluştu ve fabrika verilerine sıfırlama işlemi gerçekleştirilene kadar kararsız çalışabilir."</string> <string name="system_error_manufacturer" msgid="703545241070116315">"Cihazınızla ilgili dahili bir sorun oluştu. Ayrıntılı bilgi için üreticinizle iletişim kurun."</string> @@ -2336,6 +2344,8 @@ <string name="mic_access_off_toast" msgid="8111040892954242437">"Mikrofon engellenmiş"</string> <string name="connected_display_unavailable_notification_title" msgid="5265409360902073556">"Ekrana yansıtılamıyor"</string> <string name="connected_display_unavailable_notification_content" msgid="3845903313751217516">"Farklı kablo kullanarak tekrar deneyin"</string> + <!-- no translation found for connected_display_thermally_unavailable_notification_content (9205758199439955949) --> + <skip /> <string name="connected_display_cable_dont_support_displays_notification_title" msgid="8477183783847392465">"Kablo, ekranları desteklemeyebilir"</string> <string name="connected_display_cable_dont_support_displays_notification_content" msgid="8080498819171483973">"USB-C kablonuz ekranlara doğru şekilde bağlanamayabilir"</string> <string name="concurrent_display_notification_name" msgid="1526911253558311131">"Dual Screen"</string> diff --git a/core/res/res/values-uk/strings.xml b/core/res/res/values-uk/strings.xml index d4cd2071bd87..393fa761a086 100644 --- a/core/res/res/values-uk/strings.xml +++ b/core/res/res/values-uk/strings.xml @@ -1712,6 +1712,10 @@ <string name="accessibility_service_action_perform_description" msgid="2718852014003170558">"Цей сервіс може відстежувати вашу взаємодію з додатком чи апаратним датчиком, а також взаємодіяти з додатками від вашого імені."</string> <string name="accessibility_dialog_button_allow" msgid="2092558122987144530">"Дозволити"</string> <string name="accessibility_dialog_button_deny" msgid="4129575637812472671">"Заборонити"</string> + <!-- no translation found for accessibility_dialog_button_uninstall (2952465517671708108) --> + <skip /> + <!-- no translation found for accessibility_dialog_touch_filtered_warning (3741940116597822451) --> + <skip /> <string name="accessibility_select_shortcut_menu_title" msgid="6002726538854613272">"Натисніть функцію, щоб почати використовувати її:"</string> <string name="accessibility_edit_shortcut_menu_button_title" msgid="239446795930436325">"Виберіть функції для кнопки спеціальних можливостей"</string> <string name="accessibility_edit_shortcut_menu_volume_title" msgid="1077294237378645981">"Виберіть функції для комбінації з клавішами гучності"</string> @@ -1906,6 +1910,10 @@ <string name="zen_mode_default_weekends_name" msgid="4707200272709377930">"На вихідних"</string> <string name="zen_mode_default_events_name" msgid="2280682960128512257">"Подія"</string> <string name="zen_mode_default_every_night_name" msgid="1467765312174275823">"Під час сну"</string> + <!-- no translation found for zen_mode_implicit_activated (2634285680776672994) --> + <skip /> + <!-- no translation found for zen_mode_implicit_deactivated (8688441768371501750) --> + <skip /> <string name="muted_by" msgid="91464083490094950">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> вимикає деякі звуки"</string> <string name="system_error_wipe_data" msgid="5910572292172208493">"Через внутрішню помилку ваш пристрій може працювати нестабільно. Відновіть заводські налаштування."</string> <string name="system_error_manufacturer" msgid="703545241070116315">"На пристрої сталася внутрішня помилка. Зв’яжіться з виробником пристрою, щоб дізнатися більше."</string> @@ -2338,6 +2346,8 @@ <string name="mic_access_off_toast" msgid="8111040892954242437">"Мікрофон заблоковано"</string> <string name="connected_display_unavailable_notification_title" msgid="5265409360902073556">"Неможливо дублювати на дисплей"</string> <string name="connected_display_unavailable_notification_content" msgid="3845903313751217516">"Скористайтесь іншим кабелем і повторіть спробу"</string> + <!-- no translation found for connected_display_thermally_unavailable_notification_content (9205758199439955949) --> + <skip /> <string name="connected_display_cable_dont_support_displays_notification_title" msgid="8477183783847392465">"Кабель може не підтримувати дисплеї"</string> <string name="connected_display_cable_dont_support_displays_notification_content" msgid="8080498819171483973">"Ваш кабель USB-C може не підключатися до дисплеїв належним чином"</string> <string name="concurrent_display_notification_name" msgid="1526911253558311131">"Dual Screen"</string> diff --git a/core/res/res/values-ur/strings.xml b/core/res/res/values-ur/strings.xml index 8634294d5a05..9ea7348ef577 100644 --- a/core/res/res/values-ur/strings.xml +++ b/core/res/res/values-ur/strings.xml @@ -1710,6 +1710,10 @@ <string name="accessibility_service_action_perform_description" msgid="2718852014003170558">"یہ کسی ایپ یا ہارڈویئر سینسر کے ساتھ آپ کے تعاملات کو ٹریک کر سکتا ہے، اور آپ کی طرف سے ایپس کے ساتھ تعامل کر سکتا ہے۔"</string> <string name="accessibility_dialog_button_allow" msgid="2092558122987144530">"اجازت دیں"</string> <string name="accessibility_dialog_button_deny" msgid="4129575637812472671">"مسترد کریں"</string> + <!-- no translation found for accessibility_dialog_button_uninstall (2952465517671708108) --> + <skip /> + <!-- no translation found for accessibility_dialog_touch_filtered_warning (3741940116597822451) --> + <skip /> <string name="accessibility_select_shortcut_menu_title" msgid="6002726538854613272">"ایک خصوصیت کا استعمال شروع کرنے کیلئے اسے تھپتھپائیں:"</string> <string name="accessibility_edit_shortcut_menu_button_title" msgid="239446795930436325">"ایکسیسبیلٹی بٹن کے ساتھ استعمال کرنے کیلئے خصوصیات منتخب کریں"</string> <string name="accessibility_edit_shortcut_menu_volume_title" msgid="1077294237378645981">"والیوم کلید کے شارٹ کٹ کے ساتھ استعمال کرنے کیلئے خصوصیات منتخب کریں"</string> @@ -1904,6 +1908,10 @@ <string name="zen_mode_default_weekends_name" msgid="4707200272709377930">"ویک اینڈ"</string> <string name="zen_mode_default_events_name" msgid="2280682960128512257">"ایونٹ"</string> <string name="zen_mode_default_every_night_name" msgid="1467765312174275823">"سونا"</string> + <!-- no translation found for zen_mode_implicit_activated (2634285680776672994) --> + <skip /> + <!-- no translation found for zen_mode_implicit_deactivated (8688441768371501750) --> + <skip /> <string name="muted_by" msgid="91464083490094950">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> کچھ آوازوں کو خاموش کر رہا ہے"</string> <string name="system_error_wipe_data" msgid="5910572292172208493">"آپ کے آلہ میں ایک داخلی مسئلہ ہے اور جب تک آپ فیکٹری ڈیٹا کو دوبارہ ترتیب نہیں دے دیتے ہیں، ہوسکتا ہے کہ یہ غیر مستحکم رہے۔"</string> <string name="system_error_manufacturer" msgid="703545241070116315">"آپ کے آلہ میں ایک داخلی مسئلہ ہے۔ تفصیلات کیلئے اپنے مینوفیکچرر سے رابطہ کریں۔"</string> @@ -2336,6 +2344,8 @@ <string name="mic_access_off_toast" msgid="8111040892954242437">"مائیکروفون مسدود ہے"</string> <string name="connected_display_unavailable_notification_title" msgid="5265409360902073556">"ڈسپلے پر دو طرفہ مطابقت پذیری ممکن نہیں ہے"</string> <string name="connected_display_unavailable_notification_content" msgid="3845903313751217516">"مختلف کیبل استعمال کریں اور دوبارہ کوشش کریں"</string> + <!-- no translation found for connected_display_thermally_unavailable_notification_content (9205758199439955949) --> + <skip /> <string name="connected_display_cable_dont_support_displays_notification_title" msgid="8477183783847392465">"ہو سکتا ہے کہ کیبل ڈسپلیز کو سپورٹ نہ کرے"</string> <string name="connected_display_cable_dont_support_displays_notification_content" msgid="8080498819171483973">"ہو سکتا ہے کہ آپ کی USB-C کیبل مناسب طریقے سے ڈسپلیز سے منسلک نہ ہو"</string> <string name="concurrent_display_notification_name" msgid="1526911253558311131">"دوہری اسکرین"</string> diff --git a/core/res/res/values-uz/strings.xml b/core/res/res/values-uz/strings.xml index fdea194637ae..78f352906d1b 100644 --- a/core/res/res/values-uz/strings.xml +++ b/core/res/res/values-uz/strings.xml @@ -1710,6 +1710,10 @@ <string name="accessibility_service_action_perform_description" msgid="2718852014003170558">"Ilova yoki qurilma sensori bilan munosabatlaringizni kuzatishi hamda sizning nomingizdan ilovalar bilan ishlashi mumkin."</string> <string name="accessibility_dialog_button_allow" msgid="2092558122987144530">"Ruxsat"</string> <string name="accessibility_dialog_button_deny" msgid="4129575637812472671">"Rad etish"</string> + <!-- no translation found for accessibility_dialog_button_uninstall (2952465517671708108) --> + <skip /> + <!-- no translation found for accessibility_dialog_touch_filtered_warning (3741940116597822451) --> + <skip /> <string name="accessibility_select_shortcut_menu_title" msgid="6002726538854613272">"Kerakli funksiyani tanlang"</string> <string name="accessibility_edit_shortcut_menu_button_title" msgid="239446795930436325">"Qulayliklar tugmasi bilan foydalanish uchun funksiyalarni tanlang"</string> <string name="accessibility_edit_shortcut_menu_volume_title" msgid="1077294237378645981">"Tovush tugmasi bilan ishga tushiriladigan funksiyalarni tanlang"</string> @@ -1904,6 +1908,10 @@ <string name="zen_mode_default_weekends_name" msgid="4707200272709377930">"Dam olish kunlari"</string> <string name="zen_mode_default_events_name" msgid="2280682960128512257">"Tadbir"</string> <string name="zen_mode_default_every_night_name" msgid="1467765312174275823">"Uyquda"</string> + <!-- no translation found for zen_mode_implicit_activated (2634285680776672994) --> + <skip /> + <!-- no translation found for zen_mode_implicit_deactivated (8688441768371501750) --> + <skip /> <string name="muted_by" msgid="91464083490094950">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> ayrim tovushlarni ovozsiz qilgan"</string> <string name="system_error_wipe_data" msgid="5910572292172208493">"Qurilmangiz bilan bog‘liq ichki muammo mavjud. U zavod sozlamalari tiklanmaguncha barqaror ishlamasligi mumkin."</string> <string name="system_error_manufacturer" msgid="703545241070116315">"Qurilmangiz bilan bog‘liq ichki muammo mavjud. Tafsilotlar uchun qurilmangiz ishlab chiqaruvchisiga murojaat qiling."</string> @@ -2336,6 +2344,8 @@ <string name="mic_access_off_toast" msgid="8111040892954242437">"Mikrofon bloklandi"</string> <string name="connected_display_unavailable_notification_title" msgid="5265409360902073556">"Displeyga translatsiya qilinmaydi"</string> <string name="connected_display_unavailable_notification_content" msgid="3845903313751217516">"Boshqa kabel yordamida qayta urining"</string> + <!-- no translation found for connected_display_thermally_unavailable_notification_content (9205758199439955949) --> + <skip /> <string name="connected_display_cable_dont_support_displays_notification_title" msgid="8477183783847392465">"Kabel displeylar bilan ishlamasligi mumkin"</string> <string name="connected_display_cable_dont_support_displays_notification_content" msgid="8080498819171483973">"USB-C kabelingiz displeylarga toʻgʻri ulanmasligi mumkin"</string> <string name="concurrent_display_notification_name" msgid="1526911253558311131">"Ikkita ekran"</string> diff --git a/core/res/res/values-vi/strings.xml b/core/res/res/values-vi/strings.xml index 12a61edfca58..1b6ededd1d8a 100644 --- a/core/res/res/values-vi/strings.xml +++ b/core/res/res/values-vi/strings.xml @@ -1710,6 +1710,10 @@ <string name="accessibility_service_action_perform_description" msgid="2718852014003170558">"Dịch vụ này có thể theo dõi các hoạt động tương tác của bạn với một ứng dụng hoặc bộ cảm biến phần cứng, cũng như có thể thay mặt bạn tương tác với các ứng dụng."</string> <string name="accessibility_dialog_button_allow" msgid="2092558122987144530">"Cho phép"</string> <string name="accessibility_dialog_button_deny" msgid="4129575637812472671">"Từ chối"</string> + <!-- no translation found for accessibility_dialog_button_uninstall (2952465517671708108) --> + <skip /> + <!-- no translation found for accessibility_dialog_touch_filtered_warning (3741940116597822451) --> + <skip /> <string name="accessibility_select_shortcut_menu_title" msgid="6002726538854613272">"Nhấn vào một tính năng để bắt đầu sử dụng:"</string> <string name="accessibility_edit_shortcut_menu_button_title" msgid="239446795930436325">"Chọn các tính năng để dùng với nút hỗ trợ tiếp cận"</string> <string name="accessibility_edit_shortcut_menu_volume_title" msgid="1077294237378645981">"Chọn các tính năng để dùng với phím tắt là phím âm lượng"</string> @@ -1904,6 +1908,10 @@ <string name="zen_mode_default_weekends_name" msgid="4707200272709377930">"Cuối tuần"</string> <string name="zen_mode_default_events_name" msgid="2280682960128512257">"Sự kiện"</string> <string name="zen_mode_default_every_night_name" msgid="1467765312174275823">"Ngủ"</string> + <!-- no translation found for zen_mode_implicit_activated (2634285680776672994) --> + <skip /> + <!-- no translation found for zen_mode_implicit_deactivated (8688441768371501750) --> + <skip /> <string name="muted_by" msgid="91464083490094950">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> đang tắt một số âm thanh"</string> <string name="system_error_wipe_data" msgid="5910572292172208493">"Đã xảy ra sự cố nội bộ với thiết bị của bạn và thiết bị có thể sẽ không ổn định cho tới khi bạn thiết lập lại dữ liệu ban đầu."</string> <string name="system_error_manufacturer" msgid="703545241070116315">"Đã xảy ra sự cố nội bộ với thiết bị. Hãy liên hệ với nhà sản xuất của bạn để biết chi tiết."</string> @@ -2336,6 +2344,8 @@ <string name="mic_access_off_toast" msgid="8111040892954242437">"Micrô đang bị chặn"</string> <string name="connected_display_unavailable_notification_title" msgid="5265409360902073556">"Không chiếu được nội dung lên màn hình"</string> <string name="connected_display_unavailable_notification_content" msgid="3845903313751217516">"Hãy dùng một cáp khác rồi thử lại"</string> + <!-- no translation found for connected_display_thermally_unavailable_notification_content (9205758199439955949) --> + <skip /> <string name="connected_display_cable_dont_support_displays_notification_title" msgid="8477183783847392465">"Có thể cáp không hỗ trợ màn hình"</string> <string name="connected_display_cable_dont_support_displays_notification_content" msgid="8080498819171483973">"Có thể cáp USB-C của bạn chưa kết nối đúng cách với màn hình"</string> <string name="concurrent_display_notification_name" msgid="1526911253558311131">"Dual screen"</string> diff --git a/core/res/res/values-zh-rCN/strings.xml b/core/res/res/values-zh-rCN/strings.xml index 2ae8fe653ded..676ab00f0464 100644 --- a/core/res/res/values-zh-rCN/strings.xml +++ b/core/res/res/values-zh-rCN/strings.xml @@ -1710,6 +1710,10 @@ <string name="accessibility_service_action_perform_description" msgid="2718852014003170558">"此功能可以跟踪您与应用或硬件传感器的互动,并代表您与应用互动。"</string> <string name="accessibility_dialog_button_allow" msgid="2092558122987144530">"允许"</string> <string name="accessibility_dialog_button_deny" msgid="4129575637812472671">"拒绝"</string> + <!-- no translation found for accessibility_dialog_button_uninstall (2952465517671708108) --> + <skip /> + <!-- no translation found for accessibility_dialog_touch_filtered_warning (3741940116597822451) --> + <skip /> <string name="accessibility_select_shortcut_menu_title" msgid="6002726538854613272">"点按相应功能即可开始使用:"</string> <string name="accessibility_edit_shortcut_menu_button_title" msgid="239446795930436325">"选择可通过“无障碍”按钮使用的功能"</string> <string name="accessibility_edit_shortcut_menu_volume_title" msgid="1077294237378645981">"选择可通过音量键快捷方式使用的功能"</string> @@ -1904,6 +1908,10 @@ <string name="zen_mode_default_weekends_name" msgid="4707200272709377930">"周末"</string> <string name="zen_mode_default_events_name" msgid="2280682960128512257">"活动"</string> <string name="zen_mode_default_every_night_name" msgid="1467765312174275823">"睡眠"</string> + <!-- no translation found for zen_mode_implicit_activated (2634285680776672994) --> + <skip /> + <!-- no translation found for zen_mode_implicit_deactivated (8688441768371501750) --> + <skip /> <string name="muted_by" msgid="91464083490094950">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g>正在将某些音效设为静音"</string> <string name="system_error_wipe_data" msgid="5910572292172208493">"您的设备内部出现了问题。如果不将设备恢复出厂设置,设备运行可能会不稳定。"</string> <string name="system_error_manufacturer" msgid="703545241070116315">"您的设备内部出现了问题。请联系您的设备制造商了解详情。"</string> @@ -2336,6 +2344,8 @@ <string name="mic_access_off_toast" msgid="8111040892954242437">"麦克风已被屏蔽"</string> <string name="connected_display_unavailable_notification_title" msgid="5265409360902073556">"无法镜像到显示屏"</string> <string name="connected_display_unavailable_notification_content" msgid="3845903313751217516">"请改用其他数据线并重试"</string> + <!-- no translation found for connected_display_thermally_unavailable_notification_content (9205758199439955949) --> + <skip /> <string name="connected_display_cable_dont_support_displays_notification_title" msgid="8477183783847392465">"数据线可能不支持显示屏"</string> <string name="connected_display_cable_dont_support_displays_notification_content" msgid="8080498819171483973">"您的 USB-C 数据线可能没有正确连接到显示屏"</string> <string name="concurrent_display_notification_name" msgid="1526911253558311131">"双屏幕"</string> diff --git a/core/res/res/values-zh-rHK/strings.xml b/core/res/res/values-zh-rHK/strings.xml index e10823824b59..76dabaf688f5 100644 --- a/core/res/res/values-zh-rHK/strings.xml +++ b/core/res/res/values-zh-rHK/strings.xml @@ -1710,6 +1710,10 @@ <string name="accessibility_service_action_perform_description" msgid="2718852014003170558">"這項功能會追蹤你與應用程式或硬件感應器的互動,並代表你直接與應用程式互動。"</string> <string name="accessibility_dialog_button_allow" msgid="2092558122987144530">"允許"</string> <string name="accessibility_dialog_button_deny" msgid="4129575637812472671">"拒絕"</string> + <!-- no translation found for accessibility_dialog_button_uninstall (2952465517671708108) --> + <skip /> + <!-- no translation found for accessibility_dialog_touch_filtered_warning (3741940116597822451) --> + <skip /> <string name="accessibility_select_shortcut_menu_title" msgid="6002726538854613272">"輕按即可開始使用所需功能:"</string> <string name="accessibility_edit_shortcut_menu_button_title" msgid="239446795930436325">"選擇要配搭無障礙功能按鈕使用的功能"</string> <string name="accessibility_edit_shortcut_menu_volume_title" msgid="1077294237378645981">"選擇要用音量快速鍵的功能"</string> @@ -1904,6 +1908,10 @@ <string name="zen_mode_default_weekends_name" msgid="4707200272709377930">"週末"</string> <string name="zen_mode_default_events_name" msgid="2280682960128512257">"活動"</string> <string name="zen_mode_default_every_night_name" msgid="1467765312174275823">"睡眠"</string> + <!-- no translation found for zen_mode_implicit_activated (2634285680776672994) --> + <skip /> + <!-- no translation found for zen_mode_implicit_deactivated (8688441768371501750) --> + <skip /> <string name="muted_by" msgid="91464083490094950">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g>正將某些音效設為靜音"</string> <string name="system_error_wipe_data" msgid="5910572292172208493">"你裝置的系統發生問題,回復原廠設定後即可解決該問題。"</string> <string name="system_error_manufacturer" msgid="703545241070116315">"你裝置的系統發生問題,請聯絡你的製造商瞭解詳情。"</string> @@ -2336,6 +2344,7 @@ <string name="mic_access_off_toast" msgid="8111040892954242437">"已封鎖麥克風"</string> <string name="connected_display_unavailable_notification_title" msgid="5265409360902073556">"無法將畫面鏡像投放至螢幕"</string> <string name="connected_display_unavailable_notification_content" msgid="3845903313751217516">"請改用其他連接線,然後再試一次"</string> + <string name="connected_display_thermally_unavailable_notification_content" msgid="9205758199439955949">"裝置過熱,請等到降溫後再將畫面鏡像投放至螢幕"</string> <string name="connected_display_cable_dont_support_displays_notification_title" msgid="8477183783847392465">"連接線可能不支援顯示屏"</string> <string name="connected_display_cable_dont_support_displays_notification_content" msgid="8080498819171483973">"你的 USB-C 連接線可能未妥善連接顯示屏"</string> <string name="concurrent_display_notification_name" msgid="1526911253558311131">"雙螢幕"</string> diff --git a/core/res/res/values-zh-rTW/strings.xml b/core/res/res/values-zh-rTW/strings.xml index 5b6520168d5d..fc5f262f3ebc 100644 --- a/core/res/res/values-zh-rTW/strings.xml +++ b/core/res/res/values-zh-rTW/strings.xml @@ -1710,6 +1710,10 @@ <string name="accessibility_service_action_perform_description" msgid="2718852014003170558">"可追蹤你與應用程式或硬體感應器的互動,並代表你與應用程式進行互動。"</string> <string name="accessibility_dialog_button_allow" msgid="2092558122987144530">"允許"</string> <string name="accessibility_dialog_button_deny" msgid="4129575637812472671">"拒絕"</string> + <!-- no translation found for accessibility_dialog_button_uninstall (2952465517671708108) --> + <skip /> + <!-- no translation found for accessibility_dialog_touch_filtered_warning (3741940116597822451) --> + <skip /> <string name="accessibility_select_shortcut_menu_title" msgid="6002726538854613272">"輕觸即可開始使用所需功能:"</string> <string name="accessibility_edit_shortcut_menu_button_title" msgid="239446795930436325">"選擇要搭配無障礙工具按鈕使用的功能"</string> <string name="accessibility_edit_shortcut_menu_volume_title" msgid="1077294237378645981">"選擇要搭配音量快速鍵使用的功能"</string> @@ -1904,6 +1908,10 @@ <string name="zen_mode_default_weekends_name" msgid="4707200272709377930">"週末"</string> <string name="zen_mode_default_events_name" msgid="2280682960128512257">"活動"</string> <string name="zen_mode_default_every_night_name" msgid="1467765312174275823">"睡眠"</string> + <!-- no translation found for zen_mode_implicit_activated (2634285680776672994) --> + <skip /> + <!-- no translation found for zen_mode_implicit_deactivated (8688441768371501750) --> + <skip /> <string name="muted_by" msgid="91464083490094950">"「<xliff:g id="THIRD_PARTY">%1$s</xliff:g>」正在關閉部分音效"</string> <string name="system_error_wipe_data" msgid="5910572292172208493">"你的裝置發生內部問題,必須將裝置恢復原廠設定才能解除不穩定狀態。"</string> <string name="system_error_manufacturer" msgid="703545241070116315">"你的裝置發生內部問題,詳情請洽裝置製造商。"</string> @@ -2336,6 +2344,7 @@ <string name="mic_access_off_toast" msgid="8111040892954242437">"麥克風已封鎖"</string> <string name="connected_display_unavailable_notification_title" msgid="5265409360902073556">"無法將畫面鏡像投放至螢幕"</string> <string name="connected_display_unavailable_notification_content" msgid="3845903313751217516">"請改用其他傳輸線,然後再試一次"</string> + <string name="connected_display_thermally_unavailable_notification_content" msgid="9205758199439955949">"裝置過熱,請等到降溫後再將畫面鏡像投放至螢幕"</string> <string name="connected_display_cable_dont_support_displays_notification_title" msgid="8477183783847392465">"傳輸線可能不支援螢幕"</string> <string name="connected_display_cable_dont_support_displays_notification_content" msgid="8080498819171483973">"USB-C 傳輸線可能未妥善連接到螢幕"</string> <string name="concurrent_display_notification_name" msgid="1526911253558311131">"雙螢幕"</string> diff --git a/core/res/res/values-zu/strings.xml b/core/res/res/values-zu/strings.xml index b701abe18d93..a88d832b3636 100644 --- a/core/res/res/values-zu/strings.xml +++ b/core/res/res/values-zu/strings.xml @@ -1710,6 +1710,10 @@ <string name="accessibility_service_action_perform_description" msgid="2718852014003170558">"Ingalandela ukusebenzisana kwakho nohlelo lokusebenza noma inzwa yehadiwe, nokusebenzisana nezinhlelo zokusebenza engxenyeni yakho."</string> <string name="accessibility_dialog_button_allow" msgid="2092558122987144530">"Vumela"</string> <string name="accessibility_dialog_button_deny" msgid="4129575637812472671">"Phika"</string> + <!-- no translation found for accessibility_dialog_button_uninstall (2952465517671708108) --> + <skip /> + <!-- no translation found for accessibility_dialog_touch_filtered_warning (3741940116597822451) --> + <skip /> <string name="accessibility_select_shortcut_menu_title" msgid="6002726538854613272">"Thepha isici ukuqala ukusisebenzisa:"</string> <string name="accessibility_edit_shortcut_menu_button_title" msgid="239446795930436325">"Khetha izici ongazisebenzisa nenkinobho yokufinyeleleka"</string> <string name="accessibility_edit_shortcut_menu_volume_title" msgid="1077294237378645981">"Khetha izici ongazisebenzisa nesinqamuleli sokhiye wevolumu"</string> @@ -1904,6 +1908,10 @@ <string name="zen_mode_default_weekends_name" msgid="4707200272709377930">"Ngempelasonto"</string> <string name="zen_mode_default_events_name" msgid="2280682960128512257">"Umcimbi"</string> <string name="zen_mode_default_every_night_name" msgid="1467765312174275823">"Ulele"</string> + <!-- no translation found for zen_mode_implicit_activated (2634285680776672994) --> + <skip /> + <!-- no translation found for zen_mode_implicit_deactivated (8688441768371501750) --> + <skip /> <string name="muted_by" msgid="91464083490094950">"<xliff:g id="THIRD_PARTY">%1$s</xliff:g> ithulisa eminye imisindo"</string> <string name="system_error_wipe_data" msgid="5910572292172208493">"Kukhona inkinga yangaphakathi ngedivayisi yakho, futhi ingase ibe engazinzile kuze kube yilapho usetha kabusha yonke idatha."</string> <string name="system_error_manufacturer" msgid="703545241070116315">"Kukhona inkinga yangaphakathi ngedivayisi yakho. Xhumana nomkhiqizi wakho ukuze uthole imininingwane."</string> @@ -2336,6 +2344,8 @@ <string name="mic_access_off_toast" msgid="8111040892954242437">"Imakrofoni ivinjiwe"</string> <string name="connected_display_unavailable_notification_title" msgid="5265409360902073556">"Ayikwazi ukufanisa nesibonisi"</string> <string name="connected_display_unavailable_notification_content" msgid="3845903313751217516">"Sebenzisa ikhebuli ehlukile bese uyazama futhi"</string> + <!-- no translation found for connected_display_thermally_unavailable_notification_content (9205758199439955949) --> + <skip /> <string name="connected_display_cable_dont_support_displays_notification_title" msgid="8477183783847392465">"Ikhebuli ingase ingasekeli iziboniso"</string> <string name="connected_display_cable_dont_support_displays_notification_content" msgid="8080498819171483973">"Ikhebuli yakho ye-USB-C ingase ingaxhumi kahle kuzibonisi"</string> <string name="concurrent_display_notification_name" msgid="1526911253558311131">"Isikrini esikabili"</string> diff --git a/core/res/res/values/colors.xml b/core/res/res/values/colors.xml index 30beee0d02a1..eddd81e78692 100644 --- a/core/res/res/values/colors.xml +++ b/core/res/res/values/colors.xml @@ -521,7 +521,7 @@ <color name="system_surface_dim_dark">#121316</color> <color name="system_surface_variant_dark">#44474F</color> <color name="system_on_surface_variant_dark">#C4C6D0</color> - <color name="system_outline_dark">#72747D</color> + <color name="system_outline_dark">#8E9099</color> <color name="system_outline_variant_dark">#444746</color> <color name="system_error_dark">#FFB4A8</color> <color name="system_on_error_dark">#690001</color> diff --git a/core/res/res/values/config_telephony.xml b/core/res/res/values/config_telephony.xml index 39d958cdf5ee..8d80af41680a 100644 --- a/core/res/res/values/config_telephony.xml +++ b/core/res/res/values/config_telephony.xml @@ -243,10 +243,6 @@ <bool name="allow_clear_initial_attach_data_profile">false</bool> <java-symbol type="bool" name="allow_clear_initial_attach_data_profile" /> - <!-- Boolean indicating whether TelephonyAnalytics module is active or not. --> - <bool name="telephony_analytics_switch">true</bool> - <java-symbol type="bool" name="telephony_analytics_switch" /> - <!-- Whether to enable modem on boot if behavior is not defined --> <bool name="config_enable_cellular_on_boot_default">true</bool> <java-symbol type="bool" name="config_enable_cellular_on_boot_default" /> diff --git a/core/tests/coretests/src/android/content/pm/LauncherActivityInfoTest.java b/core/tests/coretests/src/android/content/pm/LauncherActivityInfoTest.java new file mode 100644 index 000000000000..e19c4b15d300 --- /dev/null +++ b/core/tests/coretests/src/android/content/pm/LauncherActivityInfoTest.java @@ -0,0 +1,103 @@ +/* + * 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.content.pm; + +import static com.google.common.truth.Truth.assertThat; + +import android.platform.test.annotations.Presubmit; + +import androidx.test.ext.junit.runners.AndroidJUnit4; + +import org.junit.Test; +import org.junit.runner.RunWith; + +/** + * Tests for {@link android.content.pm.LauncherActivityInfo} + */ +@Presubmit +@RunWith(AndroidJUnit4.class) +public class LauncherActivityInfoTest { + + @Test + public void testTrimStart() { + // Invisible case + assertThat(LauncherActivityInfo.trimStart("\u0009").toString()).isEmpty(); + // It is not supported in the system font + assertThat(LauncherActivityInfo.trimStart("\u0FE1").toString()).isEmpty(); + // Surrogates case + assertThat(LauncherActivityInfo.trimStart("\uD83E\uDD36").toString()) + .isEqualTo("\uD83E\uDD36"); + assertThat(LauncherActivityInfo.trimStart("\u0009\u0FE1\uD83E\uDD36A").toString()) + .isEqualTo("\uD83E\uDD36A"); + assertThat(LauncherActivityInfo.trimStart("\uD83E\uDD36A\u0009\u0FE1").toString()) + .isEqualTo("\uD83E\uDD36A\u0009\u0FE1"); + assertThat(LauncherActivityInfo.trimStart("A\uD83E\uDD36\u0009\u0FE1A").toString()) + .isEqualTo("A\uD83E\uDD36\u0009\u0FE1A"); + assertThat(LauncherActivityInfo.trimStart( + "A\uD83E\uDD36\u0009\u0FE1A\uD83E\uDD36").toString()) + .isEqualTo("A\uD83E\uDD36\u0009\u0FE1A\uD83E\uDD36"); + assertThat(LauncherActivityInfo.trimStart( + "\u0009\u0FE1\uD83E\uDD36A\u0009\u0FE1").toString()) + .isEqualTo("\uD83E\uDD36A\u0009\u0FE1"); + } + + @Test + public void testTrimEnd() { + // Invisible case + assertThat(LauncherActivityInfo.trimEnd("\u0009").toString()).isEmpty(); + // It is not supported in the system font + assertThat(LauncherActivityInfo.trimEnd("\u0FE1").toString()).isEmpty(); + // Surrogates case + assertThat(LauncherActivityInfo.trimEnd("\uD83E\uDD36").toString()) + .isEqualTo("\uD83E\uDD36"); + assertThat(LauncherActivityInfo.trimEnd("\u0009\u0FE1\uD83E\uDD36A").toString()) + .isEqualTo("\u0009\u0FE1\uD83E\uDD36A"); + assertThat(LauncherActivityInfo.trimEnd("\uD83E\uDD36A\u0009\u0FE1").toString()) + .isEqualTo("\uD83E\uDD36A"); + assertThat(LauncherActivityInfo.trimEnd("A\uD83E\uDD36\u0009\u0FE1A").toString()) + .isEqualTo("A\uD83E\uDD36\u0009\u0FE1A"); + assertThat(LauncherActivityInfo.trimEnd( + "A\uD83E\uDD36\u0009\u0FE1A\uD83E\uDD36").toString()) + .isEqualTo("A\uD83E\uDD36\u0009\u0FE1A\uD83E\uDD36"); + assertThat(LauncherActivityInfo.trimEnd( + "\u0009\u0FE1\uD83E\uDD36A\u0009\u0FE1").toString()) + .isEqualTo("\u0009\u0FE1\uD83E\uDD36A"); + } + + @Test + public void testTrim() { + // Invisible case + assertThat(LauncherActivityInfo.trim("\u0009").toString()).isEmpty(); + // It is not supported in the system font + assertThat(LauncherActivityInfo.trim("\u0FE1").toString()).isEmpty(); + // Surrogates case + assertThat(LauncherActivityInfo.trim("\uD83E\uDD36").toString()) + .isEqualTo("\uD83E\uDD36"); + assertThat(LauncherActivityInfo.trim("\u0009\u0FE1\uD83E\uDD36A").toString()) + .isEqualTo("\uD83E\uDD36A"); + assertThat(LauncherActivityInfo.trim("\uD83E\uDD36A\u0009\u0FE1").toString()) + .isEqualTo("\uD83E\uDD36A"); + assertThat(LauncherActivityInfo.trim("A\uD83E\uDD36\u0009\u0FE1A").toString()) + .isEqualTo("A\uD83E\uDD36\u0009\u0FE1A"); + assertThat(LauncherActivityInfo.trim( + "A\uD83E\uDD36\u0009\u0FE1A\uD83E\uDD36").toString()) + .isEqualTo("A\uD83E\uDD36\u0009\u0FE1A\uD83E\uDD36"); + assertThat(LauncherActivityInfo.trim( + "\u0009\u0FE1\uD83E\uDD36A\u0009\u0FE1").toString()) + .isEqualTo("\uD83E\uDD36A"); + } +} diff --git a/core/tests/coretests/src/android/service/notification/ConditionTest.java b/core/tests/coretests/src/android/service/notification/ConditionTest.java index 42629ba41287..612562eb22dc 100644 --- a/core/tests/coretests/src/android/service/notification/ConditionTest.java +++ b/core/tests/coretests/src/android/service/notification/ConditionTest.java @@ -16,17 +16,22 @@ package android.service.notification; +import static com.google.common.truth.Truth.assertThat; + import static junit.framework.Assert.assertEquals; import static junit.framework.Assert.fail; +import android.app.Flags; import android.net.Uri; import android.os.Parcel; +import android.platform.test.flag.junit.SetFlagsRule; import androidx.test.ext.junit.runners.AndroidJUnit4; import androidx.test.filters.SmallTest; import com.google.common.base.Strings; +import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; @@ -37,8 +42,11 @@ import java.lang.reflect.Field; public class ConditionTest { private static final String CLASS = "android.service.notification.Condition"; + @Rule + public final SetFlagsRule mSetFlagsRule = new SetFlagsRule(); + @Test - public void testLongFields_inConstructors() { + public void testLongFields_inConstructors_classic() { String longString = Strings.repeat("A", 65536); Uri longUri = Uri.parse("uri://" + Strings.repeat("A", 65530)); @@ -59,7 +67,7 @@ public class ConditionTest { } @Test - public void testLongFields_viaParcel() { + public void testLongFields_viaParcel_classic() { // Set fields via reflection to force them to be long, then parcel and unparcel to make sure // it gets truncated upon unparcelling. Condition cond = new Condition(Uri.parse("uri://placeholder"), "placeholder", @@ -98,4 +106,92 @@ public class ConditionTest { assertEquals(Condition.MAX_STRING_LENGTH, fromParcel.line1.length()); assertEquals(Condition.MAX_STRING_LENGTH, fromParcel.line2.length()); } + + @Test + public void testLongFields_inConstructors() { + mSetFlagsRule.enableFlags(Flags.FLAG_MODES_API); + String longString = Strings.repeat("A", 65536); + Uri longUri = Uri.parse("uri://" + Strings.repeat("A", 65530)); + + // Confirm strings are truncated via short constructor + Condition cond1 = new Condition(longUri, longString, Condition.STATE_TRUE, + Condition.SOURCE_CONTEXT); + + assertThat(cond1.id.toString()).hasLength(Condition.MAX_STRING_LENGTH); + assertThat(cond1.summary).hasLength(Condition.MAX_STRING_LENGTH); + + // Confirm strings are truncated via long constructor + Condition cond2 = new Condition(longUri, longString, longString, longString, + -1, Condition.STATE_TRUE, Condition.SOURCE_CONTEXT, Condition.FLAG_RELEVANT_ALWAYS); + + assertThat(cond2.id.toString()).hasLength(Condition.MAX_STRING_LENGTH); + assertThat(cond2.summary).hasLength(Condition.MAX_STRING_LENGTH); + assertThat(cond2.line1).hasLength(Condition.MAX_STRING_LENGTH); + assertThat(cond2.line2).hasLength(Condition.MAX_STRING_LENGTH); + } + + @Test + public void testLongFields_viaParcel() throws Exception { + mSetFlagsRule.enableFlags(Flags.FLAG_MODES_API); + // Set fields via reflection to force them to be long, then parcel and unparcel to make sure + // it gets truncated upon unparcelling. + Condition cond = new Condition(Uri.parse("uri://placeholder"), "placeholder", + Condition.STATE_TRUE, Condition.SOURCE_CONTEXT); + + String longString = Strings.repeat("A", 65536); + Uri longUri = Uri.parse("uri://" + Strings.repeat("A", 65530)); + Field id = Class.forName(CLASS).getDeclaredField("id"); + id.setAccessible(true); + id.set(cond, longUri); + Field summary = Class.forName(CLASS).getDeclaredField("summary"); + summary.setAccessible(true); + summary.set(cond, longString); + Field line1 = Class.forName(CLASS).getDeclaredField("line1"); + line1.setAccessible(true); + line1.set(cond, longString); + Field line2 = Class.forName(CLASS).getDeclaredField("line2"); + line2.setAccessible(true); + line2.set(cond, longString); + + Parcel parcel = Parcel.obtain(); + cond.writeToParcel(parcel, 0); + parcel.setDataPosition(0); + + Condition fromParcel = new Condition(parcel); + assertThat(fromParcel.id.toString()).hasLength(Condition.MAX_STRING_LENGTH); + assertThat(fromParcel.summary).hasLength(Condition.MAX_STRING_LENGTH); + assertThat(fromParcel.line1).hasLength(Condition.MAX_STRING_LENGTH); + assertThat(fromParcel.line2).hasLength(Condition.MAX_STRING_LENGTH); + } + + @Test + public void testEquals() { + mSetFlagsRule.enableFlags(Flags.FLAG_MODES_API); + + Condition cond1 = new Condition(Uri.parse("uri://placeholder"), "placeholder", + Condition.STATE_TRUE, Condition.SOURCE_USER_ACTION); + Condition cond2 = new Condition(Uri.parse("uri://placeholder"), "placeholder", + "", "", -1, + Condition.STATE_TRUE, Condition.SOURCE_SCHEDULE, Condition.FLAG_RELEVANT_ALWAYS); + + assertThat(cond1).isNotEqualTo(cond2); + Condition cond3 = new Condition(Uri.parse("uri://placeholder"), "placeholder", + Condition.STATE_TRUE, Condition.SOURCE_SCHEDULE); + assertThat(cond3).isEqualTo(cond2); + } + + @Test + public void testParcelConstructor() { + mSetFlagsRule.enableFlags(Flags.FLAG_MODES_API); + + Condition cond = new Condition(Uri.parse("uri://placeholder"), "placeholder", + Condition.STATE_TRUE, Condition.SOURCE_USER_ACTION); + + Parcel parcel = Parcel.obtain(); + cond.writeToParcel(parcel, 0); + parcel.setDataPosition(0); + + Condition fromParcel = new Condition(parcel); + assertThat(fromParcel).isEqualTo(cond); + } } diff --git a/core/tests/coretests/src/com/android/internal/jank/DisplayRefreshRateTest.java b/core/tests/coretests/src/com/android/internal/jank/DisplayRefreshRateTest.java new file mode 100644 index 000000000000..725885a84873 --- /dev/null +++ b/core/tests/coretests/src/com/android/internal/jank/DisplayRefreshRateTest.java @@ -0,0 +1,42 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.internal.jank; + +import static com.android.internal.jank.DisplayRefreshRate.REFRESH_RATE_120_HZ; +import static com.android.internal.jank.DisplayRefreshRate.REFRESH_RATE_240_HZ; +import static com.android.internal.jank.DisplayRefreshRate.REFRESH_RATE_30_HZ; +import static com.android.internal.jank.DisplayRefreshRate.REFRESH_RATE_60_HZ; +import static com.android.internal.jank.DisplayRefreshRate.REFRESH_RATE_90_HZ; +import static com.android.internal.jank.DisplayRefreshRate.getRefreshRate; + +import static com.google.common.truth.Truth.assertThat; + +import androidx.test.filters.SmallTest; + +import org.junit.Test; + +@SmallTest +public class DisplayRefreshRateTest { + @Test + public void testRefreshRateMapping() { + assertThat(getRefreshRate((long) 1e9 / 30)).isEqualTo(REFRESH_RATE_30_HZ); + assertThat(getRefreshRate((long) 1e9 / 60)).isEqualTo(REFRESH_RATE_60_HZ); + assertThat(getRefreshRate((long) 1e9 / 90)).isEqualTo(REFRESH_RATE_90_HZ); + assertThat(getRefreshRate((long) 1e9 / 120)).isEqualTo(REFRESH_RATE_120_HZ); + assertThat(getRefreshRate((long) 1e9 / 240)).isEqualTo(REFRESH_RATE_240_HZ); + } +} diff --git a/core/tests/coretests/src/com/android/internal/jank/FrameTrackerTest.java b/core/tests/coretests/src/com/android/internal/jank/FrameTrackerTest.java index dbbd70525d28..1b9717a6dfc5 100644 --- a/core/tests/coretests/src/com/android/internal/jank/FrameTrackerTest.java +++ b/core/tests/coretests/src/com/android/internal/jank/FrameTrackerTest.java @@ -70,6 +70,8 @@ import java.util.concurrent.TimeUnit; @SmallTest public class FrameTrackerTest { private static final String CUJ_POSTFIX = ""; + private static final long FRAME_TIME_60Hz = (long) 1e9 / 60; + private ViewAttachTestActivity mActivity; @Rule @@ -170,6 +172,7 @@ public class FrameTrackerTest { verify(tracker, never()).triggerPerfetto(); verify(mStatsLog).write(eq(UI_INTERACTION_FRAME_INFO_REPORTED), eq(42), /* displayId */ + eq(DisplayRefreshRate.REFRESH_RATE_60_HZ), eq(CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_NOTIFICATION_SHADE_EXPAND_COLLAPSE]), eq(2L) /* totalFrames */, eq(0L) /* missedFrames */, @@ -207,6 +210,7 @@ public class FrameTrackerTest { verify(mStatsLog).write(eq(UI_INTERACTION_FRAME_INFO_REPORTED), eq(42), /* displayId */ + eq(DisplayRefreshRate.REFRESH_RATE_60_HZ), eq(CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_NOTIFICATION_SHADE_EXPAND_COLLAPSE]), eq(2L) /* totalFrames */, eq(1L) /* missedFrames */, @@ -244,6 +248,7 @@ public class FrameTrackerTest { verify(mStatsLog).write(eq(UI_INTERACTION_FRAME_INFO_REPORTED), eq(42), /* displayId */ + eq(DisplayRefreshRate.REFRESH_RATE_60_HZ), eq(CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_NOTIFICATION_SHADE_EXPAND_COLLAPSE]), eq(2L) /* totalFrames */, eq(0L) /* missedFrames */, @@ -281,6 +286,7 @@ public class FrameTrackerTest { verify(mStatsLog).write(eq(UI_INTERACTION_FRAME_INFO_REPORTED), eq(42), /* displayId */ + eq(DisplayRefreshRate.REFRESH_RATE_60_HZ), eq(CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_NOTIFICATION_SHADE_EXPAND_COLLAPSE]), eq(2L) /* totalFrames */, eq(1L) /* missedFrames */, @@ -321,6 +327,7 @@ public class FrameTrackerTest { verify(mStatsLog).write(eq(UI_INTERACTION_FRAME_INFO_REPORTED), eq(42), /* displayId */ + eq(DisplayRefreshRate.REFRESH_RATE_60_HZ), eq(CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_NOTIFICATION_SHADE_EXPAND_COLLAPSE]), eq(2L) /* totalFrames */, eq(1L) /* missedFrames */, @@ -363,6 +370,7 @@ public class FrameTrackerTest { verify(tracker, never()).triggerPerfetto(); verify(mStatsLog).write(eq(UI_INTERACTION_FRAME_INFO_REPORTED), eq(42), /* displayId */ + eq(DisplayRefreshRate.REFRESH_RATE_60_HZ), eq(CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_NOTIFICATION_SHADE_EXPAND_COLLAPSE]), eq(2L) /* totalFrames */, eq(0L) /* missedFrames */, @@ -491,6 +499,7 @@ public class FrameTrackerTest { verify(mStatsLog).write(eq(UI_INTERACTION_FRAME_INFO_REPORTED), eq(42), /* displayId */ + eq(DisplayRefreshRate.REFRESH_RATE_60_HZ), eq(CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_WALLPAPER_TRANSITION]), eq(2L) /* totalFrames */, eq(1L) /* missedFrames */, @@ -528,6 +537,7 @@ public class FrameTrackerTest { verify(mStatsLog).write(eq(UI_INTERACTION_FRAME_INFO_REPORTED), eq(42), /* displayId */ + eq(DisplayRefreshRate.REFRESH_RATE_60_HZ), eq(CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_WALLPAPER_TRANSITION]), eq(2L) /* totalFrames */, eq(0L) /* missedFrames */, @@ -565,6 +575,7 @@ public class FrameTrackerTest { verify(mStatsLog).write(eq(UI_INTERACTION_FRAME_INFO_REPORTED), eq(42), /* displayId */ + eq(DisplayRefreshRate.REFRESH_RATE_60_HZ), eq(CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_WALLPAPER_TRANSITION]), eq(2L) /* totalFrames */, eq(0L) /* missedFrames */, @@ -596,6 +607,7 @@ public class FrameTrackerTest { verify(tracker).triggerPerfetto(); verify(mStatsLog).write(eq(UI_INTERACTION_FRAME_INFO_REPORTED), eq(42), /* displayId */ + eq(DisplayRefreshRate.REFRESH_RATE_60_HZ), eq(CUJ_TO_STATSD_INTERACTION_TYPE[CUJ_WALLPAPER_TRANSITION]), eq(6L) /* totalFrames */, eq(5L) /* missedFrames */, @@ -648,7 +660,7 @@ public class FrameTrackerTest { final ArgumentCaptor<Runnable> captor = ArgumentCaptor.forClass(Runnable.class); doNothing().when(tracker).postCallback(captor.capture()); mListenerCapture.getValue().onJankDataAvailable(new JankData[] { - new JankData(vsyncId, jankType) + new JankData(vsyncId, jankType, FRAME_TIME_60Hz) }); captor.getValue().run(); } diff --git a/data/etc/services.core.protolog.json b/data/etc/services.core.protolog.json index dc2b0561957d..f19acbe023b8 100644 --- a/data/etc/services.core.protolog.json +++ b/data/etc/services.core.protolog.json @@ -415,12 +415,6 @@ "group": "WM_DEBUG_WINDOW_TRANSITIONS", "at": "com\/android\/server\/wm\/Transition.java" }, - "-1717147904": { - "message": "Current focused window is embeddedWindow. Dispatch KEYCODE_BACK.", - "level": "DEBUG", - "group": "WM_DEBUG_BACK_PREVIEW", - "at": "com\/android\/server\/wm\/BackNavigationController.java" - }, "-1710206702": { "message": "Display id=%d is frozen while keyguard locked, return %d", "level": "VERBOSE", @@ -817,6 +811,12 @@ "group": "WM_DEBUG_STARTING_WINDOW", "at": "com\/android\/server\/wm\/ActivityRecord.java" }, + "-1325565952": { + "message": "Attempted to get home support flag of a display that does not exist: %d", + "level": "WARN", + "group": "WM_ERROR", + "at": "com\/android\/server\/wm\/WindowManagerService.java" + }, "-1323783276": { "message": "performEnableScreen: bootFinished() failed.", "level": "WARN", @@ -1213,12 +1213,6 @@ "group": "WM_DEBUG_STATES", "at": "com\/android\/server\/wm\/ActivityRecord.java" }, - "-997565097": { - "message": "Focused window found using getFocusedWindowToken", - "level": "DEBUG", - "group": "WM_DEBUG_BACK_PREVIEW", - "at": "com\/android\/server\/wm\/BackNavigationController.java" - }, "-993378225": { "message": "finishDrawingLocked: mDrawState=COMMIT_DRAW_PENDING %s in %s", "level": "VERBOSE", @@ -2233,6 +2227,12 @@ "group": "WM_DEBUG_RECENTS_ANIMATIONS", "at": "com\/android\/server\/wm\/RecentsAnimation.java" }, + "-98422345": { + "message": "Focus window is closing.", + "level": "DEBUG", + "group": "WM_DEBUG_BACK_PREVIEW", + "at": "com\/android\/server\/wm\/BackNavigationController.java" + }, "-91393839": { "message": "Set animatingExit: reason=remove\/applyAnimation win=%s", "level": "VERBOSE", @@ -2731,12 +2731,6 @@ "group": "WM_DEBUG_STATES", "at": "com\/android\/server\/wm\/ActivityRecord.java" }, - "309039362": { - "message": "SURFACE MATRIX [%f,%f,%f,%f]: %s", - "level": "INFO", - "group": "WM_SHOW_TRANSACTIONS", - "at": "com\/android\/server\/wm\/WindowSurfaceController.java" - }, "312030608": { "message": "New topFocusedDisplayId=%d", "level": "DEBUG", @@ -3091,12 +3085,6 @@ "group": "WM_ERROR", "at": "com\/android\/server\/wm\/WindowManagerService.java" }, - "633654009": { - "message": "SURFACE POS (setPositionInTransaction) @ (%f,%f): %s", - "level": "INFO", - "group": "WM_SHOW_TRANSACTIONS", - "at": "com\/android\/server\/wm\/WindowSurfaceController.java" - }, "638429464": { "message": "\tRemove container=%s", "level": "DEBUG", diff --git a/data/keyboards/Generic.kl b/data/keyboards/Generic.kl index 51b720ddb758..f9347ee6ea09 100644 --- a/data/keyboards/Generic.kl +++ b/data/keyboards/Generic.kl @@ -324,7 +324,7 @@ key 362 GUIDE # key 365 "KEY_EPG" key 366 DVR # key 367 "KEY_MHP" -# key 368 "KEY_LANGUAGE" +key 368 LANGUAGE_SWITCH # key 369 "KEY_TITLE" key 370 CAPTIONS # key 371 "KEY_ANGLE" diff --git a/keystore/java/android/security/AndroidKeyStoreMaintenance.java b/keystore/java/android/security/AndroidKeyStoreMaintenance.java index b7ea04fdfe07..2beb434566e5 100644 --- a/keystore/java/android/security/AndroidKeyStoreMaintenance.java +++ b/keystore/java/android/security/AndroidKeyStoreMaintenance.java @@ -51,7 +51,7 @@ public class AndroidKeyStoreMaintenance { * @return 0 if successful or a {@code ResponseCode} * @hide */ - public static int onUserAdded(@NonNull int userId) { + public static int onUserAdded(int userId) { StrictMode.noteDiskWrite(); try { getService().onUserAdded(userId); @@ -66,6 +66,30 @@ public class AndroidKeyStoreMaintenance { } /** + * Tells Keystore to create a user's super keys and store them encrypted by the given secret. + * + * @param userId - Android user id of the user + * @param password - a secret derived from the user's synthetic password + * @param allowExisting - true if the keys already existing should not be considered an error + * @return 0 if successful or a {@code ResponseCode} + * @hide + */ + public static int initUserSuperKeys(int userId, @NonNull byte[] password, + boolean allowExisting) { + StrictMode.noteDiskWrite(); + try { + getService().initUserSuperKeys(userId, password, allowExisting); + return 0; + } catch (ServiceSpecificException e) { + Log.e(TAG, "initUserSuperKeys failed", e); + return e.errorCode; + } catch (Exception e) { + Log.e(TAG, "Can not connect to keystore", e); + return SYSTEM_ERROR; + } + } + + /** * Informs Keystore 2.0 about removing a user * * @param userId - Android user id of the user being removed @@ -110,6 +134,28 @@ public class AndroidKeyStoreMaintenance { } /** + * Tells Keystore that a user's LSKF is being removed, ie the user's lock screen is changing to + * Swipe or None. Keystore uses this notification to delete the user's auth-bound keys. + * + * @param userId - Android user id of the user + * @return 0 if successful or a {@code ResponseCode} + * @hide + */ + public static int onUserLskfRemoved(int userId) { + StrictMode.noteDiskWrite(); + try { + getService().onUserLskfRemoved(userId); + return 0; + } catch (ServiceSpecificException e) { + Log.e(TAG, "onUserLskfRemoved failed", e); + return e.errorCode; + } catch (Exception e) { + Log.e(TAG, "Can not connect to keystore", e); + return SYSTEM_ERROR; + } + } + + /** * Informs Keystore 2.0 that an app was uninstalled and the corresponding namespace is to * be cleared. */ diff --git a/keystore/java/android/security/keystore/KeyGenParameterSpec.java b/keystore/java/android/security/keystore/KeyGenParameterSpec.java index b7140355e489..231fa4837441 100644 --- a/keystore/java/android/security/keystore/KeyGenParameterSpec.java +++ b/keystore/java/android/security/keystore/KeyGenParameterSpec.java @@ -1282,15 +1282,18 @@ public final class KeyGenParameterSpec implements AlgorithmParameterSpec, UserAu * function (MGF1) with a digest. * The default digest for MGF1 is {@code SHA-1}, which will be specified during key creation * time if no digests have been explicitly provided. - * When using the key, the caller may not specify any digests that were not provided during - * key creation time. The caller may specify the default digest, {@code SHA-1}, if no + * {@code null} may not be specified as a parameter to this method: It is not possible to + * disable MGF1 digest, a default must be present for when the caller tries to use it. + * + * <p>When using the key, the caller may not specify any digests that were not provided + * during key creation time. The caller may specify the default digest, {@code SHA-1}, if no * digests were explicitly provided during key creation (but it is not necessary to do so). * * <p>See {@link KeyProperties}.{@code DIGEST} constants. */ @NonNull @FlaggedApi("MGF1_DIGEST_SETTER") - public Builder setMgf1Digests(@Nullable @KeyProperties.DigestEnum String... mgf1Digests) { + public Builder setMgf1Digests(@NonNull @KeyProperties.DigestEnum String... mgf1Digests) { mMgf1Digests = Set.of(mgf1Digests); return this; } diff --git a/libs/WindowManager/Shell/aconfig/multitasking.aconfig b/libs/WindowManager/Shell/aconfig/multitasking.aconfig index 29bdd5ce0c9e..c366ccd235db 100644 --- a/libs/WindowManager/Shell/aconfig/multitasking.aconfig +++ b/libs/WindowManager/Shell/aconfig/multitasking.aconfig @@ -35,3 +35,10 @@ flag { description: "Enables taskbar / navbar unification" bug: "309671494" } + +flag { + name: "enable_pip_ui_state_on_entering" + namespace: "multitasking" + description: "Enables PiP UI state callback on entering" + bug: "303718131" +} diff --git a/libs/WindowManager/Shell/res/values-af/strings.xml b/libs/WindowManager/Shell/res/values-af/strings.xml index 2471cbac0c84..90b13cdc79b4 100644 --- a/libs/WindowManager/Shell/res/values-af/strings.xml +++ b/libs/WindowManager/Shell/res/values-af/strings.xml @@ -34,8 +34,7 @@ <string name="accessibility_action_pip_unstash" msgid="7467499339610437646">"Laat los"</string> <string name="dock_forced_resizable" msgid="7429086980048964687">"App sal dalk nie met verdeelde skerm werk nie"</string> <string name="dock_non_resizeble_failed_to_dock_text" msgid="2733543750291266047">"App steun nie verdeelde skerm nie"</string> - <!-- no translation found for dock_multi_instances_not_supported_text (5011042177901502928) --> - <skip /> + <string name="dock_multi_instances_not_supported_text" msgid="5011042177901502928">"Hierdie app kan net in 1 venster oopgemaak word"</string> <string name="forced_resizable_secondary_display" msgid="1768046938673582671">"Program sal dalk nie op \'n sekondêre skerm werk nie."</string> <string name="activity_launch_on_secondary_display_failed_text" msgid="4226485344988071769">"Program steun nie begin op sekondêre skerms nie."</string> <string name="accessibility_divider" msgid="6407584574218956849">"Skermverdeler"</string> diff --git a/libs/WindowManager/Shell/res/values-am/strings.xml b/libs/WindowManager/Shell/res/values-am/strings.xml index 387478c66267..478585aace68 100644 --- a/libs/WindowManager/Shell/res/values-am/strings.xml +++ b/libs/WindowManager/Shell/res/values-am/strings.xml @@ -34,8 +34,7 @@ <string name="accessibility_action_pip_unstash" msgid="7467499339610437646">"Unstash"</string> <string name="dock_forced_resizable" msgid="7429086980048964687">"መተግበሪያ ከተከፈለ ማያ ገፅ ጋር ላይሠራ ይችላል"</string> <string name="dock_non_resizeble_failed_to_dock_text" msgid="2733543750291266047">"መተግበሪያው የተከፈለ ማያ ገጽን አይደግፍም"</string> - <!-- no translation found for dock_multi_instances_not_supported_text (5011042177901502928) --> - <skip /> + <string name="dock_multi_instances_not_supported_text" msgid="5011042177901502928">"ይህ መተግበሪያ መከፈት የሚችለው በ1 መስኮት ብቻ ነው"</string> <string name="forced_resizable_secondary_display" msgid="1768046938673582671">"መተግበሪያ በሁለተኛ ማሳያ ላይ ላይሠራ ይችላል።"</string> <string name="activity_launch_on_secondary_display_failed_text" msgid="4226485344988071769">"መተግበሪያ በሁለተኛ ማሳያዎች ላይ ማስጀመርን አይደግፍም።"</string> <string name="accessibility_divider" msgid="6407584574218956849">"የተከፈለ የማያ ገፅ ከፋይ"</string> diff --git a/libs/WindowManager/Shell/res/values-ar/strings.xml b/libs/WindowManager/Shell/res/values-ar/strings.xml index fb92ed7650de..b2a522c89f8c 100644 --- a/libs/WindowManager/Shell/res/values-ar/strings.xml +++ b/libs/WindowManager/Shell/res/values-ar/strings.xml @@ -34,8 +34,7 @@ <string name="accessibility_action_pip_unstash" msgid="7467499339610437646">"إظهار"</string> <string name="dock_forced_resizable" msgid="7429086980048964687">"قد لا يعمل التطبيق بشكل سليم في وضع تقسيم الشاشة."</string> <string name="dock_non_resizeble_failed_to_dock_text" msgid="2733543750291266047">"لا يعمل التطبيق في وضع تقسيم الشاشة."</string> - <!-- no translation found for dock_multi_instances_not_supported_text (5011042177901502928) --> - <skip /> + <string name="dock_multi_instances_not_supported_text" msgid="5011042177901502928">"لا يمكن فتح هذا التطبيق إلا في نافذة واحدة."</string> <string name="forced_resizable_secondary_display" msgid="1768046938673582671">"قد لا يعمل التطبيق على شاشة عرض ثانوية."</string> <string name="activity_launch_on_secondary_display_failed_text" msgid="4226485344988071769">"لا يمكن تشغيل التطبيق على شاشات عرض ثانوية."</string> <string name="accessibility_divider" msgid="6407584574218956849">"أداة تقسيم الشاشة"</string> diff --git a/libs/WindowManager/Shell/res/values-as/strings.xml b/libs/WindowManager/Shell/res/values-as/strings.xml index 5e44e4723252..897c38f66e4b 100644 --- a/libs/WindowManager/Shell/res/values-as/strings.xml +++ b/libs/WindowManager/Shell/res/values-as/strings.xml @@ -34,8 +34,7 @@ <string name="accessibility_action_pip_unstash" msgid="7467499339610437646">"দেখুৱাওক"</string> <string name="dock_forced_resizable" msgid="7429086980048964687">"এপ্টোৱে বিভাজিত স্ক্ৰীনৰ সৈতে কাম নকৰিব পাৰে"</string> <string name="dock_non_resizeble_failed_to_dock_text" msgid="2733543750291266047">"এপ্টোৱে বিভাজিত স্ক্ৰীন সমৰ্থন নকৰে"</string> - <!-- no translation found for dock_multi_instances_not_supported_text (5011042177901502928) --> - <skip /> + <string name="dock_multi_instances_not_supported_text" msgid="5011042177901502928">"এই এপ্টো কেৱল ১ খন ৱিণ্ড’ত খুলিব পাৰি"</string> <string name="forced_resizable_secondary_display" msgid="1768046938673582671">"গৌণ ডিছপ্লেত এপে সঠিকভাৱে কাম নকৰিব পাৰে।"</string> <string name="activity_launch_on_secondary_display_failed_text" msgid="4226485344988071769">"গৌণ ডিছপ্লেত এপ্ লঞ্চ কৰিব নোৱাৰি।"</string> <string name="accessibility_divider" msgid="6407584574218956849">"স্প্লিট স্ক্ৰীনৰ বিভাজক"</string> diff --git a/libs/WindowManager/Shell/res/values-az/strings.xml b/libs/WindowManager/Shell/res/values-az/strings.xml index 4e2f9b98fba7..4854e0db7ed5 100644 --- a/libs/WindowManager/Shell/res/values-az/strings.xml +++ b/libs/WindowManager/Shell/res/values-az/strings.xml @@ -34,8 +34,7 @@ <string name="accessibility_action_pip_unstash" msgid="7467499339610437646">"Güvənli məkandan çıxarın"</string> <string name="dock_forced_resizable" msgid="7429086980048964687">"Tətbiq bölünmüş ekranda işləməyə bilər"</string> <string name="dock_non_resizeble_failed_to_dock_text" msgid="2733543750291266047">"Tətbiq bölünmüş ekranı dəstəkləmir"</string> - <!-- no translation found for dock_multi_instances_not_supported_text (5011042177901502928) --> - <skip /> + <string name="dock_multi_instances_not_supported_text" msgid="5011042177901502928">"Bu tətbiq yalnız 1 pəncərədə açıla bilər"</string> <string name="forced_resizable_secondary_display" msgid="1768046938673582671">"Tətbiq ikinci ekranda işləməyə bilər."</string> <string name="activity_launch_on_secondary_display_failed_text" msgid="4226485344988071769">"Tətbiq ikinci ekranda başlamağı dəstəkləmir."</string> <string name="accessibility_divider" msgid="6407584574218956849">"Bölünmüş ekran ayırıcısı"</string> diff --git a/libs/WindowManager/Shell/res/values-b+sr+Latn/strings.xml b/libs/WindowManager/Shell/res/values-b+sr+Latn/strings.xml index 990aed8af763..cac4e67b1cfc 100644 --- a/libs/WindowManager/Shell/res/values-b+sr+Latn/strings.xml +++ b/libs/WindowManager/Shell/res/values-b+sr+Latn/strings.xml @@ -34,8 +34,7 @@ <string name="accessibility_action_pip_unstash" msgid="7467499339610437646">"Uklonite iz tajne memorije"</string> <string name="dock_forced_resizable" msgid="7429086980048964687">"Aplikacija možda neće raditi sa podeljenim ekranom."</string> <string name="dock_non_resizeble_failed_to_dock_text" msgid="2733543750291266047">"Aplikacija ne podržava podeljeni ekran."</string> - <!-- no translation found for dock_multi_instances_not_supported_text (5011042177901502928) --> - <skip /> + <string name="dock_multi_instances_not_supported_text" msgid="5011042177901502928">"Ova aplikacija može da se otvori samo u jednom prozoru"</string> <string name="forced_resizable_secondary_display" msgid="1768046938673582671">"Aplikacija možda neće funkcionisati na sekundarnom ekranu."</string> <string name="activity_launch_on_secondary_display_failed_text" msgid="4226485344988071769">"Aplikacija ne podržava pokretanje na sekundarnim ekranima."</string> <string name="accessibility_divider" msgid="6407584574218956849">"Razdelnik podeljenog ekrana"</string> diff --git a/libs/WindowManager/Shell/res/values-be/strings.xml b/libs/WindowManager/Shell/res/values-be/strings.xml index febb0646968d..cac76df15910 100644 --- a/libs/WindowManager/Shell/res/values-be/strings.xml +++ b/libs/WindowManager/Shell/res/values-be/strings.xml @@ -34,8 +34,7 @@ <string name="accessibility_action_pip_unstash" msgid="7467499339610437646">"Паказаць"</string> <string name="dock_forced_resizable" msgid="7429086980048964687">"Праграма можа не працаваць у рэжыме падзеленага экрана"</string> <string name="dock_non_resizeble_failed_to_dock_text" msgid="2733543750291266047">"Праграма не падтрымлівае рэжым падзеленага экрана"</string> - <!-- no translation found for dock_multi_instances_not_supported_text (5011042177901502928) --> - <skip /> + <string name="dock_multi_instances_not_supported_text" msgid="5011042177901502928">"Гэту праграму можна адкрыць толькі ў адным акне"</string> <string name="forced_resizable_secondary_display" msgid="1768046938673582671">"Праграма можа не працаваць на дадатковых экранах."</string> <string name="activity_launch_on_secondary_display_failed_text" msgid="4226485344988071769">"Праграма не падтрымлівае запуск на дадатковых экранах."</string> <string name="accessibility_divider" msgid="6407584574218956849">"Раздзяляльнік падзеленага экрана"</string> diff --git a/libs/WindowManager/Shell/res/values-bg/strings.xml b/libs/WindowManager/Shell/res/values-bg/strings.xml index 8bbdf9174458..ac9a20806b72 100644 --- a/libs/WindowManager/Shell/res/values-bg/strings.xml +++ b/libs/WindowManager/Shell/res/values-bg/strings.xml @@ -34,8 +34,7 @@ <string name="accessibility_action_pip_unstash" msgid="7467499339610437646">"Отмяна на съхраняването"</string> <string name="dock_forced_resizable" msgid="7429086980048964687">"Приложението може да не работи в режим на разделен екран"</string> <string name="dock_non_resizeble_failed_to_dock_text" msgid="2733543750291266047">"Приложението не поддържа разделен екран"</string> - <!-- no translation found for dock_multi_instances_not_supported_text (5011042177901502928) --> - <skip /> + <string name="dock_multi_instances_not_supported_text" msgid="5011042177901502928">"Това приложение може да се отвори само в 1 прозорец"</string> <string name="forced_resizable_secondary_display" msgid="1768046938673582671">"Възможно е приложението да не работи на алтернативни дисплеи."</string> <string name="activity_launch_on_secondary_display_failed_text" msgid="4226485344988071769">"Приложението не поддържа използването на алтернативни дисплеи."</string> <string name="accessibility_divider" msgid="6407584574218956849">"Разделител в режима за разделен екран"</string> diff --git a/libs/WindowManager/Shell/res/values-bn/strings.xml b/libs/WindowManager/Shell/res/values-bn/strings.xml index 4678b174685c..3b83dcb461ee 100644 --- a/libs/WindowManager/Shell/res/values-bn/strings.xml +++ b/libs/WindowManager/Shell/res/values-bn/strings.xml @@ -34,8 +34,7 @@ <string name="accessibility_action_pip_unstash" msgid="7467499339610437646">"আনস্ট্যাস করুন"</string> <string name="dock_forced_resizable" msgid="7429086980048964687">"স্প্লিট স্ক্রিনে এই অ্যাপ নাও কাজ করতে পারে"</string> <string name="dock_non_resizeble_failed_to_dock_text" msgid="2733543750291266047">"স্প্লিট স্ক্রিনে এই অ্যাপ কাজ করে না"</string> - <!-- no translation found for dock_multi_instances_not_supported_text (5011042177901502928) --> - <skip /> + <string name="dock_multi_instances_not_supported_text" msgid="5011042177901502928">"এই অ্যাপটি শুধুমাত্র ১টি উইন্ডোতে খোলা যেতে পারে"</string> <string name="forced_resizable_secondary_display" msgid="1768046938673582671">"সেকেন্ডারি ডিসপ্লেতে অ্যাপটি কাজ নাও করতে পারে।"</string> <string name="activity_launch_on_secondary_display_failed_text" msgid="4226485344988071769">"সেকেন্ডারি ডিসপ্লেতে অ্যাপ লঞ্চ করা যাবে না।"</string> <string name="accessibility_divider" msgid="6407584574218956849">"স্প্লিট স্ক্রিন বিভাজক"</string> diff --git a/libs/WindowManager/Shell/res/values-bs/strings.xml b/libs/WindowManager/Shell/res/values-bs/strings.xml index 076a17d4973e..813d163d07fe 100644 --- a/libs/WindowManager/Shell/res/values-bs/strings.xml +++ b/libs/WindowManager/Shell/res/values-bs/strings.xml @@ -34,8 +34,7 @@ <string name="accessibility_action_pip_unstash" msgid="7467499339610437646">"Vađenje iz stasha"</string> <string name="dock_forced_resizable" msgid="7429086980048964687">"Aplikacija možda neće funkcionirati na podijeljenom ekranu"</string> <string name="dock_non_resizeble_failed_to_dock_text" msgid="2733543750291266047">"Aplikacija ne podržava podijeljeni ekran"</string> - <!-- no translation found for dock_multi_instances_not_supported_text (5011042177901502928) --> - <skip /> + <string name="dock_multi_instances_not_supported_text" msgid="5011042177901502928">"Ova aplikacija se može otvoriti samo u 1 prozoru"</string> <string name="forced_resizable_secondary_display" msgid="1768046938673582671">"Aplikacija možda neće raditi na sekundarnom ekranu."</string> <string name="activity_launch_on_secondary_display_failed_text" msgid="4226485344988071769">"Aplikacija ne podržava pokretanje na sekundarnim ekranima."</string> <string name="accessibility_divider" msgid="6407584574218956849">"Razdjelnik podijeljenog ekrana"</string> diff --git a/libs/WindowManager/Shell/res/values-ca/strings.xml b/libs/WindowManager/Shell/res/values-ca/strings.xml index 311599824779..d00c50bb0294 100644 --- a/libs/WindowManager/Shell/res/values-ca/strings.xml +++ b/libs/WindowManager/Shell/res/values-ca/strings.xml @@ -34,8 +34,7 @@ <string name="accessibility_action_pip_unstash" msgid="7467499339610437646">"Deixa d\'amagar"</string> <string name="dock_forced_resizable" msgid="7429086980048964687">"És possible que l\'aplicació no funcioni amb la pantalla dividida"</string> <string name="dock_non_resizeble_failed_to_dock_text" msgid="2733543750291266047">"L\'aplicació no admet la pantalla dividida"</string> - <!-- no translation found for dock_multi_instances_not_supported_text (5011042177901502928) --> - <skip /> + <string name="dock_multi_instances_not_supported_text" msgid="5011042177901502928">"Aquesta aplicació només pot obrir-se en 1 finestra"</string> <string name="forced_resizable_secondary_display" msgid="1768046938673582671">"És possible que l\'aplicació no funcioni en una pantalla secundària."</string> <string name="activity_launch_on_secondary_display_failed_text" msgid="4226485344988071769">"L\'aplicació no es pot obrir en pantalles secundàries."</string> <string name="accessibility_divider" msgid="6407584574218956849">"Separador de pantalla dividida"</string> diff --git a/libs/WindowManager/Shell/res/values-cs/strings.xml b/libs/WindowManager/Shell/res/values-cs/strings.xml index fe8a7eed7254..40132e4f67f8 100644 --- a/libs/WindowManager/Shell/res/values-cs/strings.xml +++ b/libs/WindowManager/Shell/res/values-cs/strings.xml @@ -34,8 +34,7 @@ <string name="accessibility_action_pip_unstash" msgid="7467499339610437646">"Zrušit uložení"</string> <string name="dock_forced_resizable" msgid="7429086980048964687">"Aplikace v režimu rozdělené obrazovky nemusí fungovat"</string> <string name="dock_non_resizeble_failed_to_dock_text" msgid="2733543750291266047">"Aplikace nepodporuje režim rozdělené obrazovky"</string> - <!-- no translation found for dock_multi_instances_not_supported_text (5011042177901502928) --> - <skip /> + <string name="dock_multi_instances_not_supported_text" msgid="5011042177901502928">"Tuto aplikaci lze otevřít jen v jednom okně"</string> <string name="forced_resizable_secondary_display" msgid="1768046938673582671">"Aplikace na sekundárním displeji nemusí fungovat."</string> <string name="activity_launch_on_secondary_display_failed_text" msgid="4226485344988071769">"Aplikace nepodporuje spuštění na sekundárních displejích."</string> <string name="accessibility_divider" msgid="6407584574218956849">"Čára rozdělující obrazovku"</string> diff --git a/libs/WindowManager/Shell/res/values-da/strings.xml b/libs/WindowManager/Shell/res/values-da/strings.xml index 81c5b228c159..6e9738dc7398 100644 --- a/libs/WindowManager/Shell/res/values-da/strings.xml +++ b/libs/WindowManager/Shell/res/values-da/strings.xml @@ -34,8 +34,7 @@ <string name="accessibility_action_pip_unstash" msgid="7467499339610437646">"Vis"</string> <string name="dock_forced_resizable" msgid="7429086980048964687">"Appen fungerer muligvis ikke i opdelt skærm"</string> <string name="dock_non_resizeble_failed_to_dock_text" msgid="2733543750291266047">"Appen understøtter ikke opdelt skærm"</string> - <!-- no translation found for dock_multi_instances_not_supported_text (5011042177901502928) --> - <skip /> + <string name="dock_multi_instances_not_supported_text" msgid="5011042177901502928">"Denne app kan kun åbnes i 1 vindue"</string> <string name="forced_resizable_secondary_display" msgid="1768046938673582671">"Appen fungerer muligvis ikke på sekundære skærme."</string> <string name="activity_launch_on_secondary_display_failed_text" msgid="4226485344988071769">"Appen kan ikke åbnes på sekundære skærme."</string> <string name="accessibility_divider" msgid="6407584574218956849">"Adskiller til opdelt skærm"</string> diff --git a/libs/WindowManager/Shell/res/values-de/strings.xml b/libs/WindowManager/Shell/res/values-de/strings.xml index 4b9556d4515f..5da224d35360 100644 --- a/libs/WindowManager/Shell/res/values-de/strings.xml +++ b/libs/WindowManager/Shell/res/values-de/strings.xml @@ -34,8 +34,7 @@ <string name="accessibility_action_pip_unstash" msgid="7467499339610437646">"Aus Stash entfernen"</string> <string name="dock_forced_resizable" msgid="7429086980048964687">"Die App funktioniert im Splitscreen-Modus unter Umständen nicht"</string> <string name="dock_non_resizeble_failed_to_dock_text" msgid="2733543750291266047">"Splitscreen wird in dieser App nicht unterstützt"</string> - <!-- no translation found for dock_multi_instances_not_supported_text (5011042177901502928) --> - <skip /> + <string name="dock_multi_instances_not_supported_text" msgid="5011042177901502928">"Diese App kann nur in einem einzigen Fenster geöffnet werden"</string> <string name="forced_resizable_secondary_display" msgid="1768046938673582671">"Die App funktioniert auf einem sekundären Display möglicherweise nicht."</string> <string name="activity_launch_on_secondary_display_failed_text" msgid="4226485344988071769">"Die App unterstützt den Start auf sekundären Displays nicht."</string> <string name="accessibility_divider" msgid="6407584574218956849">"Bildschirmteiler"</string> diff --git a/libs/WindowManager/Shell/res/values-el/strings.xml b/libs/WindowManager/Shell/res/values-el/strings.xml index 907ef38b5c3c..822b5526c6fd 100644 --- a/libs/WindowManager/Shell/res/values-el/strings.xml +++ b/libs/WindowManager/Shell/res/values-el/strings.xml @@ -34,8 +34,7 @@ <string name="accessibility_action_pip_unstash" msgid="7467499339610437646">"Κατάργηση απόκρυψης"</string> <string name="dock_forced_resizable" msgid="7429086980048964687">"Η εφαρμογή ενδέχεται να μην λειτουργεί με διαχωρισμό οθόνης."</string> <string name="dock_non_resizeble_failed_to_dock_text" msgid="2733543750291266047">"Η εφαρμογή δεν υποστηρίζει διαχωρισμό οθόνης."</string> - <!-- no translation found for dock_multi_instances_not_supported_text (5011042177901502928) --> - <skip /> + <string name="dock_multi_instances_not_supported_text" msgid="5011042177901502928">"Αυτή η εφαρμογή μπορεί να ανοίξει μόνο σε ένα παράθυρο"</string> <string name="forced_resizable_secondary_display" msgid="1768046938673582671">"Η εφαρμογή ίσως να μην λειτουργήσει σε δευτερεύουσα οθόνη."</string> <string name="activity_launch_on_secondary_display_failed_text" msgid="4226485344988071769">"Η εφαρμογή δεν υποστηρίζει την εκκίνηση σε δευτερεύουσες οθόνες."</string> <string name="accessibility_divider" msgid="6407584574218956849">"Διαχωριστικό οθόνης"</string> diff --git a/libs/WindowManager/Shell/res/values-en-rAU/strings.xml b/libs/WindowManager/Shell/res/values-en-rAU/strings.xml index 843c8ed3090b..76464b398f89 100644 --- a/libs/WindowManager/Shell/res/values-en-rAU/strings.xml +++ b/libs/WindowManager/Shell/res/values-en-rAU/strings.xml @@ -34,8 +34,7 @@ <string name="accessibility_action_pip_unstash" msgid="7467499339610437646">"Unstash"</string> <string name="dock_forced_resizable" msgid="7429086980048964687">"App may not work with split screen"</string> <string name="dock_non_resizeble_failed_to_dock_text" msgid="2733543750291266047">"App does not support split screen"</string> - <!-- no translation found for dock_multi_instances_not_supported_text (5011042177901502928) --> - <skip /> + <string name="dock_multi_instances_not_supported_text" msgid="5011042177901502928">"This app can only be opened in one window"</string> <string name="forced_resizable_secondary_display" msgid="1768046938673582671">"App may not work on a secondary display."</string> <string name="activity_launch_on_secondary_display_failed_text" msgid="4226485344988071769">"App does not support launch on secondary displays."</string> <string name="accessibility_divider" msgid="6407584574218956849">"Split screen divider"</string> diff --git a/libs/WindowManager/Shell/res/values-en-rCA/strings.xml b/libs/WindowManager/Shell/res/values-en-rCA/strings.xml index 0d9d09a0465f..c0c46cd608ee 100644 --- a/libs/WindowManager/Shell/res/values-en-rCA/strings.xml +++ b/libs/WindowManager/Shell/res/values-en-rCA/strings.xml @@ -34,8 +34,7 @@ <string name="accessibility_action_pip_unstash" msgid="7467499339610437646">"Unstash"</string> <string name="dock_forced_resizable" msgid="7429086980048964687">"App may not work with split screen"</string> <string name="dock_non_resizeble_failed_to_dock_text" msgid="2733543750291266047">"App does not support split screen"</string> - <!-- no translation found for dock_multi_instances_not_supported_text (5011042177901502928) --> - <skip /> + <string name="dock_multi_instances_not_supported_text" msgid="5011042177901502928">"This app can only be opened in 1 window"</string> <string name="forced_resizable_secondary_display" msgid="1768046938673582671">"App may not work on a secondary display."</string> <string name="activity_launch_on_secondary_display_failed_text" msgid="4226485344988071769">"App does not support launch on secondary displays."</string> <string name="accessibility_divider" msgid="6407584574218956849">"Split screen divider"</string> diff --git a/libs/WindowManager/Shell/res/values-en-rGB/strings.xml b/libs/WindowManager/Shell/res/values-en-rGB/strings.xml index 843c8ed3090b..76464b398f89 100644 --- a/libs/WindowManager/Shell/res/values-en-rGB/strings.xml +++ b/libs/WindowManager/Shell/res/values-en-rGB/strings.xml @@ -34,8 +34,7 @@ <string name="accessibility_action_pip_unstash" msgid="7467499339610437646">"Unstash"</string> <string name="dock_forced_resizable" msgid="7429086980048964687">"App may not work with split screen"</string> <string name="dock_non_resizeble_failed_to_dock_text" msgid="2733543750291266047">"App does not support split screen"</string> - <!-- no translation found for dock_multi_instances_not_supported_text (5011042177901502928) --> - <skip /> + <string name="dock_multi_instances_not_supported_text" msgid="5011042177901502928">"This app can only be opened in one window"</string> <string name="forced_resizable_secondary_display" msgid="1768046938673582671">"App may not work on a secondary display."</string> <string name="activity_launch_on_secondary_display_failed_text" msgid="4226485344988071769">"App does not support launch on secondary displays."</string> <string name="accessibility_divider" msgid="6407584574218956849">"Split screen divider"</string> diff --git a/libs/WindowManager/Shell/res/values-en-rIN/strings.xml b/libs/WindowManager/Shell/res/values-en-rIN/strings.xml index 843c8ed3090b..76464b398f89 100644 --- a/libs/WindowManager/Shell/res/values-en-rIN/strings.xml +++ b/libs/WindowManager/Shell/res/values-en-rIN/strings.xml @@ -34,8 +34,7 @@ <string name="accessibility_action_pip_unstash" msgid="7467499339610437646">"Unstash"</string> <string name="dock_forced_resizable" msgid="7429086980048964687">"App may not work with split screen"</string> <string name="dock_non_resizeble_failed_to_dock_text" msgid="2733543750291266047">"App does not support split screen"</string> - <!-- no translation found for dock_multi_instances_not_supported_text (5011042177901502928) --> - <skip /> + <string name="dock_multi_instances_not_supported_text" msgid="5011042177901502928">"This app can only be opened in one window"</string> <string name="forced_resizable_secondary_display" msgid="1768046938673582671">"App may not work on a secondary display."</string> <string name="activity_launch_on_secondary_display_failed_text" msgid="4226485344988071769">"App does not support launch on secondary displays."</string> <string name="accessibility_divider" msgid="6407584574218956849">"Split screen divider"</string> diff --git a/libs/WindowManager/Shell/res/values-en-rXC/strings.xml b/libs/WindowManager/Shell/res/values-en-rXC/strings.xml index 4fbb5b830f29..f089938fd9cb 100644 --- a/libs/WindowManager/Shell/res/values-en-rXC/strings.xml +++ b/libs/WindowManager/Shell/res/values-en-rXC/strings.xml @@ -34,8 +34,7 @@ <string name="accessibility_action_pip_unstash" msgid="7467499339610437646">"Unstash"</string> <string name="dock_forced_resizable" msgid="7429086980048964687">"App may not work with split screen"</string> <string name="dock_non_resizeble_failed_to_dock_text" msgid="2733543750291266047">"App does not support split screen"</string> - <!-- no translation found for dock_multi_instances_not_supported_text (5011042177901502928) --> - <skip /> + <string name="dock_multi_instances_not_supported_text" msgid="5011042177901502928">"This app can only be opened in 1 window"</string> <string name="forced_resizable_secondary_display" msgid="1768046938673582671">"App may not work on a secondary display."</string> <string name="activity_launch_on_secondary_display_failed_text" msgid="4226485344988071769">"App does not support launch on secondary displays."</string> <string name="accessibility_divider" msgid="6407584574218956849">"Split screen divider"</string> diff --git a/libs/WindowManager/Shell/res/values-es-rUS/strings.xml b/libs/WindowManager/Shell/res/values-es-rUS/strings.xml index 9aa985d21819..6bbc1e37671f 100644 --- a/libs/WindowManager/Shell/res/values-es-rUS/strings.xml +++ b/libs/WindowManager/Shell/res/values-es-rUS/strings.xml @@ -34,8 +34,7 @@ <string name="accessibility_action_pip_unstash" msgid="7467499339610437646">"Dejar de almacenar de manera segura"</string> <string name="dock_forced_resizable" msgid="7429086980048964687">"Es posible que la app no funcione en el modo de pantalla dividida"</string> <string name="dock_non_resizeble_failed_to_dock_text" msgid="2733543750291266047">"La app no es compatible con la función de pantalla dividida"</string> - <!-- no translation found for dock_multi_instances_not_supported_text (5011042177901502928) --> - <skip /> + <string name="dock_multi_instances_not_supported_text" msgid="5011042177901502928">"Esta app solo puede estar abierta en 1 ventana"</string> <string name="forced_resizable_secondary_display" msgid="1768046938673582671">"Es posible que la app no funcione en una pantalla secundaria."</string> <string name="activity_launch_on_secondary_display_failed_text" msgid="4226485344988071769">"La app no puede iniciarse en pantallas secundarias."</string> <string name="accessibility_divider" msgid="6407584574218956849">"Divisor de pantalla dividida"</string> diff --git a/libs/WindowManager/Shell/res/values-es/strings.xml b/libs/WindowManager/Shell/res/values-es/strings.xml index e51f73541f5f..c662ff603dd7 100644 --- a/libs/WindowManager/Shell/res/values-es/strings.xml +++ b/libs/WindowManager/Shell/res/values-es/strings.xml @@ -34,8 +34,7 @@ <string name="accessibility_action_pip_unstash" msgid="7467499339610437646">"No esconder"</string> <string name="dock_forced_resizable" msgid="7429086980048964687">"Puede que la aplicación no funcione con la pantalla dividida"</string> <string name="dock_non_resizeble_failed_to_dock_text" msgid="2733543750291266047">"La aplicación no es compatible con la pantalla dividida"</string> - <!-- no translation found for dock_multi_instances_not_supported_text (5011042177901502928) --> - <skip /> + <string name="dock_multi_instances_not_supported_text" msgid="5011042177901502928">"Esta aplicación solo puede abrirse en una ventana"</string> <string name="forced_resizable_secondary_display" msgid="1768046938673582671">"Es posible que la aplicación no funcione en una pantalla secundaria."</string> <string name="activity_launch_on_secondary_display_failed_text" msgid="4226485344988071769">"La aplicación no se puede abrir en pantallas secundarias."</string> <string name="accessibility_divider" msgid="6407584574218956849">"Divisor de pantalla dividida"</string> diff --git a/libs/WindowManager/Shell/res/values-et/strings.xml b/libs/WindowManager/Shell/res/values-et/strings.xml index b3f30e76cd81..ade5e2d18645 100644 --- a/libs/WindowManager/Shell/res/values-et/strings.xml +++ b/libs/WindowManager/Shell/res/values-et/strings.xml @@ -34,8 +34,7 @@ <string name="accessibility_action_pip_unstash" msgid="7467499339610437646">"Eemalda hoidlast"</string> <string name="dock_forced_resizable" msgid="7429086980048964687">"Rakendus ei pruugi jagatud ekraanikuvaga töötada."</string> <string name="dock_non_resizeble_failed_to_dock_text" msgid="2733543750291266047">"Rakendus ei toeta jagatud ekraanikuva."</string> - <!-- no translation found for dock_multi_instances_not_supported_text (5011042177901502928) --> - <skip /> + <string name="dock_multi_instances_not_supported_text" msgid="5011042177901502928">"Selle rakenduse saab avada ainult ühes aknas"</string> <string name="forced_resizable_secondary_display" msgid="1768046938673582671">"Rakendus ei pruugi teisesel ekraanil töötada."</string> <string name="activity_launch_on_secondary_display_failed_text" msgid="4226485344988071769">"Rakendus ei toeta teisestel ekraanidel käivitamist."</string> <string name="accessibility_divider" msgid="6407584574218956849">"Jagatud ekraanikuva jaotur"</string> diff --git a/libs/WindowManager/Shell/res/values-eu/strings.xml b/libs/WindowManager/Shell/res/values-eu/strings.xml index 0d9d70637107..d6cb66885cf5 100644 --- a/libs/WindowManager/Shell/res/values-eu/strings.xml +++ b/libs/WindowManager/Shell/res/values-eu/strings.xml @@ -34,8 +34,7 @@ <string name="accessibility_action_pip_unstash" msgid="7467499339610437646">"Ez gorde"</string> <string name="dock_forced_resizable" msgid="7429086980048964687">"Baliteke aplikazioak ez funtzionatzea pantaila zatituan"</string> <string name="dock_non_resizeble_failed_to_dock_text" msgid="2733543750291266047">"Aplikazioak ez du onartzen pantaila zatitua"</string> - <!-- no translation found for dock_multi_instances_not_supported_text (5011042177901502928) --> - <skip /> + <string name="dock_multi_instances_not_supported_text" msgid="5011042177901502928">"Leiho bakar batean ireki daiteke aplikazioa"</string> <string name="forced_resizable_secondary_display" msgid="1768046938673582671">"Baliteke aplikazioak ez funtzionatzea bigarren mailako pantailetan."</string> <string name="activity_launch_on_secondary_display_failed_text" msgid="4226485344988071769">"Aplikazioa ezin da exekutatu bigarren mailako pantailatan."</string> <string name="accessibility_divider" msgid="6407584574218956849">"Pantaila-zatitzailea"</string> diff --git a/libs/WindowManager/Shell/res/values-fa/strings.xml b/libs/WindowManager/Shell/res/values-fa/strings.xml index 267daaabbb2c..ba0f51cb1490 100644 --- a/libs/WindowManager/Shell/res/values-fa/strings.xml +++ b/libs/WindowManager/Shell/res/values-fa/strings.xml @@ -34,8 +34,7 @@ <string name="accessibility_action_pip_unstash" msgid="7467499339610437646">"لغو مخفیسازی"</string> <string name="dock_forced_resizable" msgid="7429086980048964687">"ممکن است برنامه با صفحهٔ دونیمه کار نکند"</string> <string name="dock_non_resizeble_failed_to_dock_text" msgid="2733543750291266047">"برنامه از صفحهٔ دونیمه پشتیبانی نمیکند"</string> - <!-- no translation found for dock_multi_instances_not_supported_text (5011042177901502928) --> - <skip /> + <string name="dock_multi_instances_not_supported_text" msgid="5011042177901502928">"این برنامه فقط در ۱ پنجره میتواند باز شود"</string> <string name="forced_resizable_secondary_display" msgid="1768046938673582671">"ممکن است برنامه در نمایشگر ثانویه کار نکند."</string> <string name="activity_launch_on_secondary_display_failed_text" msgid="4226485344988071769">"برنامه از راهاندازی در نمایشگرهای ثانویه پشتیبانی نمیکند."</string> <string name="accessibility_divider" msgid="6407584574218956849">"تقسیمکننده صفحهٔ دونیمه"</string> diff --git a/libs/WindowManager/Shell/res/values-fi/strings.xml b/libs/WindowManager/Shell/res/values-fi/strings.xml index 7be7557323ca..a53f861e1d18 100644 --- a/libs/WindowManager/Shell/res/values-fi/strings.xml +++ b/libs/WindowManager/Shell/res/values-fi/strings.xml @@ -34,8 +34,7 @@ <string name="accessibility_action_pip_unstash" msgid="7467499339610437646">"Poista turvasäilytyksestä"</string> <string name="dock_forced_resizable" msgid="7429086980048964687">"Sovellus ei ehkä toimi jaetulla näytöllä"</string> <string name="dock_non_resizeble_failed_to_dock_text" msgid="2733543750291266047">"Sovellus ei tue jaetun näytön tilaa"</string> - <!-- no translation found for dock_multi_instances_not_supported_text (5011042177901502928) --> - <skip /> + <string name="dock_multi_instances_not_supported_text" msgid="5011042177901502928">"Tämän sovelluksen voi avata vain yhdessä ikkunassa"</string> <string name="forced_resizable_secondary_display" msgid="1768046938673582671">"Sovellus ei ehkä toimi toissijaisella näytöllä."</string> <string name="activity_launch_on_secondary_display_failed_text" msgid="4226485344988071769">"Sovellus ei tue käynnistämistä toissijaisilla näytöillä."</string> <string name="accessibility_divider" msgid="6407584574218956849">"Näytönjakaja"</string> diff --git a/libs/WindowManager/Shell/res/values-fr-rCA/strings.xml b/libs/WindowManager/Shell/res/values-fr-rCA/strings.xml index 5cee03786bdc..4563556657af 100644 --- a/libs/WindowManager/Shell/res/values-fr-rCA/strings.xml +++ b/libs/WindowManager/Shell/res/values-fr-rCA/strings.xml @@ -34,8 +34,7 @@ <string name="accessibility_action_pip_unstash" msgid="7467499339610437646">"Retirer de la réserve"</string> <string name="dock_forced_resizable" msgid="7429086980048964687">"L\'application peut ne pas fonctionner avec l\'écran partagé"</string> <string name="dock_non_resizeble_failed_to_dock_text" msgid="2733543750291266047">"L\'application ne prend pas en charge l\'écran partagé"</string> - <!-- no translation found for dock_multi_instances_not_supported_text (5011042177901502928) --> - <skip /> + <string name="dock_multi_instances_not_supported_text" msgid="5011042177901502928">"Cette application ne peut être ouverte que dans une seule fenêtre."</string> <string name="forced_resizable_secondary_display" msgid="1768046938673582671">"Il est possible que l\'application ne fonctionne pas sur un écran secondaire."</string> <string name="activity_launch_on_secondary_display_failed_text" msgid="4226485344988071769">"L\'application ne peut pas être lancée sur des écrans secondaires."</string> <string name="accessibility_divider" msgid="6407584574218956849">"Séparateur d\'écran partagé"</string> diff --git a/libs/WindowManager/Shell/res/values-fr/strings.xml b/libs/WindowManager/Shell/res/values-fr/strings.xml index 0b3b364202cf..895757184b23 100644 --- a/libs/WindowManager/Shell/res/values-fr/strings.xml +++ b/libs/WindowManager/Shell/res/values-fr/strings.xml @@ -34,8 +34,7 @@ <string name="accessibility_action_pip_unstash" msgid="7467499339610437646">"Unstash"</string> <string name="dock_forced_resizable" msgid="7429086980048964687">"L\'appli peut ne pas fonctionner en mode Écran partagé"</string> <string name="dock_non_resizeble_failed_to_dock_text" msgid="2733543750291266047">"Appli incompatible avec l\'écran partagé"</string> - <!-- no translation found for dock_multi_instances_not_supported_text (5011042177901502928) --> - <skip /> + <string name="dock_multi_instances_not_supported_text" msgid="5011042177901502928">"Cette appli ne peut être ouverte que dans 1 fenêtre"</string> <string name="forced_resizable_secondary_display" msgid="1768046938673582671">"Il est possible que l\'application ne fonctionne pas sur un écran secondaire."</string> <string name="activity_launch_on_secondary_display_failed_text" msgid="4226485344988071769">"L\'application ne peut pas être lancée sur des écrans secondaires."</string> <string name="accessibility_divider" msgid="6407584574218956849">"Séparateur d\'écran partagé"</string> diff --git a/libs/WindowManager/Shell/res/values-gl/strings.xml b/libs/WindowManager/Shell/res/values-gl/strings.xml index a46c9e74a178..54c864eced47 100644 --- a/libs/WindowManager/Shell/res/values-gl/strings.xml +++ b/libs/WindowManager/Shell/res/values-gl/strings.xml @@ -34,8 +34,7 @@ <string name="accessibility_action_pip_unstash" msgid="7467499339610437646">"Non esconder"</string> <string name="dock_forced_resizable" msgid="7429086980048964687">"É posible que a aplicación non funcione coa pantalla dividida"</string> <string name="dock_non_resizeble_failed_to_dock_text" msgid="2733543750291266047">"A aplicación non admite a función de pantalla dividida"</string> - <!-- no translation found for dock_multi_instances_not_supported_text (5011042177901502928) --> - <skip /> + <string name="dock_multi_instances_not_supported_text" msgid="5011042177901502928">"Esta aplicación só se pode abrir en 1 ventá"</string> <string name="forced_resizable_secondary_display" msgid="1768046938673582671">"É posible que a aplicación non funcione nunha pantalla secundaria."</string> <string name="activity_launch_on_secondary_display_failed_text" msgid="4226485344988071769">"A aplicación non se pode iniciar en pantallas secundarias."</string> <string name="accessibility_divider" msgid="6407584574218956849">"Divisor de pantalla dividida"</string> diff --git a/libs/WindowManager/Shell/res/values-gu/strings.xml b/libs/WindowManager/Shell/res/values-gu/strings.xml index ad27a79e21a4..2b092795b035 100644 --- a/libs/WindowManager/Shell/res/values-gu/strings.xml +++ b/libs/WindowManager/Shell/res/values-gu/strings.xml @@ -34,8 +34,7 @@ <string name="accessibility_action_pip_unstash" msgid="7467499339610437646">"બતાવો"</string> <string name="dock_forced_resizable" msgid="7429086980048964687">"વિભાજિત સ્ક્રીન સાથે ઍપ કદાચ કામ ન કરે"</string> <string name="dock_non_resizeble_failed_to_dock_text" msgid="2733543750291266047">"ઍપ વિભાજિત સ્ક્રીનને સપોર્ટ કરતી નથી"</string> - <!-- no translation found for dock_multi_instances_not_supported_text (5011042177901502928) --> - <skip /> + <string name="dock_multi_instances_not_supported_text" msgid="5011042177901502928">"આ ઍપ માત્ર 1 વિન્ડોમાં ખોલી શકાય છે"</string> <string name="forced_resizable_secondary_display" msgid="1768046938673582671">"ઍપ્લિકેશન ગૌણ ડિસ્પ્લે પર કદાચ કામ ન કરે."</string> <string name="activity_launch_on_secondary_display_failed_text" msgid="4226485344988071769">"ઍપ્લિકેશન ગૌણ ડિસ્પ્લે પર લૉન્ચનું સમર્થન કરતી નથી."</string> <string name="accessibility_divider" msgid="6407584574218956849">"સ્ક્રીનને વિભાજિત કરતું વિભાજક"</string> diff --git a/libs/WindowManager/Shell/res/values-hi/strings.xml b/libs/WindowManager/Shell/res/values-hi/strings.xml index 9b10fdcf07a0..35b099ac6d38 100644 --- a/libs/WindowManager/Shell/res/values-hi/strings.xml +++ b/libs/WindowManager/Shell/res/values-hi/strings.xml @@ -34,8 +34,7 @@ <string name="accessibility_action_pip_unstash" msgid="7467499339610437646">"दिखाएं"</string> <string name="dock_forced_resizable" msgid="7429086980048964687">"मुमकिन है कि ऐप्लिकेशन, स्प्लिट स्क्रीन मोड में काम न करे"</string> <string name="dock_non_resizeble_failed_to_dock_text" msgid="2733543750291266047">"यह ऐप्लिकेशन, स्प्लिट स्क्रीन मोड पर काम नहीं करता"</string> - <!-- no translation found for dock_multi_instances_not_supported_text (5011042177901502928) --> - <skip /> + <string name="dock_multi_instances_not_supported_text" msgid="5011042177901502928">"इस ऐप्लिकेशन को सिर्फ़ एक विंडो में खोला जा सकता है"</string> <string name="forced_resizable_secondary_display" msgid="1768046938673582671">"हो सकता है कि ऐप प्राइमरी (मुख्य) डिस्प्ले के अलावा बाकी दूसरे डिस्प्ले पर काम न करे."</string> <string name="activity_launch_on_secondary_display_failed_text" msgid="4226485344988071769">"प्राइमरी (मुख्य) डिस्प्ले के अलावा बाकी दूसरे डिस्प्ले पर ऐप लॉन्च नहीं किया जा सकता."</string> <string name="accessibility_divider" msgid="6407584574218956849">"स्प्लिट स्क्रीन डिवाइडर मोड"</string> diff --git a/libs/WindowManager/Shell/res/values-hr/strings.xml b/libs/WindowManager/Shell/res/values-hr/strings.xml index ae4ff2d95a50..f2c3c22414df 100644 --- a/libs/WindowManager/Shell/res/values-hr/strings.xml +++ b/libs/WindowManager/Shell/res/values-hr/strings.xml @@ -34,8 +34,7 @@ <string name="accessibility_action_pip_unstash" msgid="7467499339610437646">"Poništite sakrivanje"</string> <string name="dock_forced_resizable" msgid="7429086980048964687">"Aplikacija možda neće funkcionirati s podijeljenim zaslonom"</string> <string name="dock_non_resizeble_failed_to_dock_text" msgid="2733543750291266047">"Aplikacija ne podržava podijeljeni zaslon"</string> - <!-- no translation found for dock_multi_instances_not_supported_text (5011042177901502928) --> - <skip /> + <string name="dock_multi_instances_not_supported_text" msgid="5011042177901502928">"Ova se aplikacija može otvoriti samo u jednom prozoru"</string> <string name="forced_resizable_secondary_display" msgid="1768046938673582671">"Aplikacija možda neće funkcionirati na sekundarnom zaslonu."</string> <string name="activity_launch_on_secondary_display_failed_text" msgid="4226485344988071769">"Aplikacija ne podržava pokretanje na sekundarnim zaslonima."</string> <string name="accessibility_divider" msgid="6407584574218956849">"Razdjelnik podijeljenog zaslona"</string> diff --git a/libs/WindowManager/Shell/res/values-hu/strings.xml b/libs/WindowManager/Shell/res/values-hu/strings.xml index 070743c46fa9..d94bb29f1d73 100644 --- a/libs/WindowManager/Shell/res/values-hu/strings.xml +++ b/libs/WindowManager/Shell/res/values-hu/strings.xml @@ -34,8 +34,7 @@ <string name="accessibility_action_pip_unstash" msgid="7467499339610437646">"Félretevés megszüntetése"</string> <string name="dock_forced_resizable" msgid="7429086980048964687">"Lehet, hogy az alkalmazás nem működik osztott képernyős nézetben"</string> <string name="dock_non_resizeble_failed_to_dock_text" msgid="2733543750291266047">"Az alkalmazás nem támogatja az osztott képernyőt"</string> - <!-- no translation found for dock_multi_instances_not_supported_text (5011042177901502928) --> - <skip /> + <string name="dock_multi_instances_not_supported_text" msgid="5011042177901502928">"Ez az alkalmazás csak egy ablakban nyitható meg"</string> <string name="forced_resizable_secondary_display" msgid="1768046938673582671">"Előfordulhat, hogy az alkalmazás nem működik másodlagos kijelzőn."</string> <string name="activity_launch_on_secondary_display_failed_text" msgid="4226485344988071769">"Az alkalmazást nem lehet másodlagos kijelzőn elindítani."</string> <string name="accessibility_divider" msgid="6407584574218956849">"Elválasztó az osztott képernyős nézetben"</string> diff --git a/libs/WindowManager/Shell/res/values-hy/strings.xml b/libs/WindowManager/Shell/res/values-hy/strings.xml index dfdc97479743..f2945c16e50b 100644 --- a/libs/WindowManager/Shell/res/values-hy/strings.xml +++ b/libs/WindowManager/Shell/res/values-hy/strings.xml @@ -34,8 +34,7 @@ <string name="accessibility_action_pip_unstash" msgid="7467499339610437646">"Ցուցադրել"</string> <string name="dock_forced_resizable" msgid="7429086980048964687">"Հավելվածը չի կարող աշխատել տրոհված էկրանի ռեժիմում"</string> <string name="dock_non_resizeble_failed_to_dock_text" msgid="2733543750291266047">"Հավելվածը չի աջակցում էկրանի տրոհումը"</string> - <!-- no translation found for dock_multi_instances_not_supported_text (5011042177901502928) --> - <skip /> + <string name="dock_multi_instances_not_supported_text" msgid="5011042177901502928">"Այս հավելվածը հնարավոր է բացել միայն մեկ պատուհանում"</string> <string name="forced_resizable_secondary_display" msgid="1768046938673582671">"Հավելվածը կարող է չաշխատել լրացուցիչ էկրանի վրա"</string> <string name="activity_launch_on_secondary_display_failed_text" msgid="4226485344988071769">"Հավելվածը չի աջակցում գործարկումը լրացուցիչ էկրանների վրա"</string> <string name="accessibility_divider" msgid="6407584574218956849">"Տրոհված էկրանի բաժանիչ"</string> diff --git a/libs/WindowManager/Shell/res/values-in/strings.xml b/libs/WindowManager/Shell/res/values-in/strings.xml index f6161a9d0afd..c39b429e489c 100644 --- a/libs/WindowManager/Shell/res/values-in/strings.xml +++ b/libs/WindowManager/Shell/res/values-in/strings.xml @@ -34,8 +34,7 @@ <string name="accessibility_action_pip_unstash" msgid="7467499339610437646">"Batalkan stash"</string> <string name="dock_forced_resizable" msgid="7429086980048964687">"Aplikasi mungkin tidak berfungsi dengan layar terpisah"</string> <string name="dock_non_resizeble_failed_to_dock_text" msgid="2733543750291266047">"Aplikasi tidak mendukung layar terpisah"</string> - <!-- no translation found for dock_multi_instances_not_supported_text (5011042177901502928) --> - <skip /> + <string name="dock_multi_instances_not_supported_text" msgid="5011042177901502928">"Aplikasi ini hanya dapat dibuka di 1 jendela"</string> <string name="forced_resizable_secondary_display" msgid="1768046938673582671">"Aplikasi mungkin tidak berfungsi pada layar sekunder."</string> <string name="activity_launch_on_secondary_display_failed_text" msgid="4226485344988071769">"Aplikasi tidak mendukung peluncuran pada layar sekunder."</string> <string name="accessibility_divider" msgid="6407584574218956849">"Pembagi layar terpisah"</string> diff --git a/libs/WindowManager/Shell/res/values-is/strings.xml b/libs/WindowManager/Shell/res/values-is/strings.xml index 0cc1006da65e..630eaa3855c1 100644 --- a/libs/WindowManager/Shell/res/values-is/strings.xml +++ b/libs/WindowManager/Shell/res/values-is/strings.xml @@ -34,8 +34,7 @@ <string name="accessibility_action_pip_unstash" msgid="7467499339610437646">"Taka úr geymslu"</string> <string name="dock_forced_resizable" msgid="7429086980048964687">"Forritið virkar hugsanlega ekki með skjáskiptingu"</string> <string name="dock_non_resizeble_failed_to_dock_text" msgid="2733543750291266047">"Forritið styður ekki skjáskiptingu"</string> - <!-- no translation found for dock_multi_instances_not_supported_text (5011042177901502928) --> - <skip /> + <string name="dock_multi_instances_not_supported_text" msgid="5011042177901502928">"Aðeins er hægt að opna þetta forrit í 1 glugga"</string> <string name="forced_resizable_secondary_display" msgid="1768046938673582671">"Hugsanlegt er að forritið virki ekki á öðrum skjá."</string> <string name="activity_launch_on_secondary_display_failed_text" msgid="4226485344988071769">"Forrit styður ekki opnun á öðrum skjá."</string> <string name="accessibility_divider" msgid="6407584574218956849">"Skilrúm skjáskiptingar"</string> diff --git a/libs/WindowManager/Shell/res/values-it/strings.xml b/libs/WindowManager/Shell/res/values-it/strings.xml index bddde703bc80..77893c9e38cf 100644 --- a/libs/WindowManager/Shell/res/values-it/strings.xml +++ b/libs/WindowManager/Shell/res/values-it/strings.xml @@ -34,8 +34,7 @@ <string name="accessibility_action_pip_unstash" msgid="7467499339610437646">"Annulla accantonamento"</string> <string name="dock_forced_resizable" msgid="7429086980048964687">"L\'app potrebbe non funzionare con lo schermo diviso"</string> <string name="dock_non_resizeble_failed_to_dock_text" msgid="2733543750291266047">"L\'app non supporta la modalità schermo diviso"</string> - <!-- no translation found for dock_multi_instances_not_supported_text (5011042177901502928) --> - <skip /> + <string name="dock_multi_instances_not_supported_text" msgid="5011042177901502928">"Questa app può essere aperta soltanto in 1 finestra"</string> <string name="forced_resizable_secondary_display" msgid="1768046938673582671">"L\'app potrebbe non funzionare su un display secondario."</string> <string name="activity_launch_on_secondary_display_failed_text" msgid="4226485344988071769">"L\'app non supporta l\'avvio su display secondari."</string> <string name="accessibility_divider" msgid="6407584574218956849">"Strumento per schermo diviso"</string> diff --git a/libs/WindowManager/Shell/res/values-iw/strings.xml b/libs/WindowManager/Shell/res/values-iw/strings.xml index 32b75ec9cba7..4f28c23ba5df 100644 --- a/libs/WindowManager/Shell/res/values-iw/strings.xml +++ b/libs/WindowManager/Shell/res/values-iw/strings.xml @@ -34,8 +34,7 @@ <string name="accessibility_action_pip_unstash" msgid="7467499339610437646">"ביטול ההסתרה הזמנית"</string> <string name="dock_forced_resizable" msgid="7429086980048964687">"יכול להיות שהאפליקציה לא תפעל עם מסך מפוצל"</string> <string name="dock_non_resizeble_failed_to_dock_text" msgid="2733543750291266047">"האפליקציה לא תומכת במסך מפוצל"</string> - <!-- no translation found for dock_multi_instances_not_supported_text (5011042177901502928) --> - <skip /> + <string name="dock_multi_instances_not_supported_text" msgid="5011042177901502928">"ניתן לפתוח את האפליקציה הזו רק בחלון אחד"</string> <string name="forced_resizable_secondary_display" msgid="1768046938673582671">"ייתכן שהאפליקציה לא תפעל במסך משני."</string> <string name="activity_launch_on_secondary_display_failed_text" msgid="4226485344988071769">"האפליקציה אינה תומכת בהפעלה במסכים משניים."</string> <string name="accessibility_divider" msgid="6407584574218956849">"מחלק מסך מפוצל"</string> diff --git a/libs/WindowManager/Shell/res/values-ja/strings.xml b/libs/WindowManager/Shell/res/values-ja/strings.xml index ea19f5ac2d1e..60b4d7eb8b4d 100644 --- a/libs/WindowManager/Shell/res/values-ja/strings.xml +++ b/libs/WindowManager/Shell/res/values-ja/strings.xml @@ -34,8 +34,7 @@ <string name="accessibility_action_pip_unstash" msgid="7467499339610437646">"表示"</string> <string name="dock_forced_resizable" msgid="7429086980048964687">"アプリは分割画面では動作しないことがあります"</string> <string name="dock_non_resizeble_failed_to_dock_text" msgid="2733543750291266047">"アプリで分割画面がサポートされていません"</string> - <!-- no translation found for dock_multi_instances_not_supported_text (5011042177901502928) --> - <skip /> + <string name="dock_multi_instances_not_supported_text" msgid="5011042177901502928">"このアプリはウィンドウが 1 つの場合のみ開くことができます"</string> <string name="forced_resizable_secondary_display" msgid="1768046938673582671">"アプリはセカンダリ ディスプレイでは動作しないことがあります。"</string> <string name="activity_launch_on_secondary_display_failed_text" msgid="4226485344988071769">"アプリはセカンダリ ディスプレイでの起動に対応していません。"</string> <string name="accessibility_divider" msgid="6407584574218956849">"分割画面の分割線"</string> diff --git a/libs/WindowManager/Shell/res/values-ka/strings.xml b/libs/WindowManager/Shell/res/values-ka/strings.xml index 1a4d17c73a32..28d2257786a7 100644 --- a/libs/WindowManager/Shell/res/values-ka/strings.xml +++ b/libs/WindowManager/Shell/res/values-ka/strings.xml @@ -34,8 +34,7 @@ <string name="accessibility_action_pip_unstash" msgid="7467499339610437646">"გადანახვის გაუქმება"</string> <string name="dock_forced_resizable" msgid="7429086980048964687">"აპმა შეიძლება არ იმუშაოს გაყოფილი ეკრანის რეჟიმში"</string> <string name="dock_non_resizeble_failed_to_dock_text" msgid="2733543750291266047">"ეკრანის გაყოფა არ არის მხარდაჭერილი აპის მიერ"</string> - <!-- no translation found for dock_multi_instances_not_supported_text (5011042177901502928) --> - <skip /> + <string name="dock_multi_instances_not_supported_text" msgid="5011042177901502928">"ამ აპის გახსნა შესაძლებელია მხოლოდ 1 ფანჯარაში"</string> <string name="forced_resizable_secondary_display" msgid="1768046938673582671">"აპმა შეიძლება არ იმუშაოს მეორეულ ეკრანზე."</string> <string name="activity_launch_on_secondary_display_failed_text" msgid="4226485344988071769">"აპს არ გააჩნია მეორეული ეკრანის მხარდაჭერა."</string> <string name="accessibility_divider" msgid="6407584574218956849">"ეკრანის გაყოფის გამყოფი"</string> diff --git a/libs/WindowManager/Shell/res/values-kk/strings.xml b/libs/WindowManager/Shell/res/values-kk/strings.xml index 4d5ac830ce8a..441df8d70e95 100644 --- a/libs/WindowManager/Shell/res/values-kk/strings.xml +++ b/libs/WindowManager/Shell/res/values-kk/strings.xml @@ -34,8 +34,7 @@ <string name="accessibility_action_pip_unstash" msgid="7467499339610437646">"Көрсету"</string> <string name="dock_forced_resizable" msgid="7429086980048964687">"Қолданба экранды бөлу режимінде жұмыс істемеуі мүмкін."</string> <string name="dock_non_resizeble_failed_to_dock_text" msgid="2733543750291266047">"Қолданбада экранды бөлу мүмкін емес."</string> - <!-- no translation found for dock_multi_instances_not_supported_text (5011042177901502928) --> - <skip /> + <string name="dock_multi_instances_not_supported_text" msgid="5011042177901502928">"Бұл қолданбаны тек 1 терезеден ашуға болады."</string> <string name="forced_resizable_secondary_display" msgid="1768046938673582671">"Қолданба қосымша дисплейде жұмыс істемеуі мүмкін."</string> <string name="activity_launch_on_secondary_display_failed_text" msgid="4226485344988071769">"Қолданба қосымша дисплейлерде іске қосуды қолдамайды."</string> <string name="accessibility_divider" msgid="6407584574218956849">"Экранды бөлу режимінің бөлгіші"</string> diff --git a/libs/WindowManager/Shell/res/values-km/strings.xml b/libs/WindowManager/Shell/res/values-km/strings.xml index f90ca9a1bcaf..efa6418eaa47 100644 --- a/libs/WindowManager/Shell/res/values-km/strings.xml +++ b/libs/WindowManager/Shell/res/values-km/strings.xml @@ -34,8 +34,7 @@ <string name="accessibility_action_pip_unstash" msgid="7467499339610437646">"ឈប់លាក់ជាបណ្ដោះអាសន្ន"</string> <string name="dock_forced_resizable" msgid="7429086980048964687">"កម្មវិធីអាចមិនដំណើរការជាមួយមុខងារបំបែកអេក្រង់ទេ"</string> <string name="dock_non_resizeble_failed_to_dock_text" msgid="2733543750291266047">"កម្មវិធីមិនអាចប្រើមុខងារបំបែកអេក្រង់បានទេ"</string> - <!-- no translation found for dock_multi_instances_not_supported_text (5011042177901502928) --> - <skip /> + <string name="dock_multi_instances_not_supported_text" msgid="5011042177901502928">"អាចបើកកម្មវិធីនេះបានតែក្នុងវិនដូ 1 ប៉ុណ្ណោះ"</string> <string name="forced_resizable_secondary_display" msgid="1768046938673582671">"កម្មវិធីនេះប្រហែលជាមិនដំណើរការនៅលើអេក្រង់បន្ទាប់បន្សំទេ។"</string> <string name="activity_launch_on_secondary_display_failed_text" msgid="4226485344988071769">"កម្មវិធីនេះមិនអាចចាប់ផ្តើមនៅលើអេក្រង់បន្ទាប់បន្សំបានទេ។"</string> <string name="accessibility_divider" msgid="6407584574218956849">"បន្ទាត់ខណ្ឌចែកក្នុងមុខងារបំបែកអេក្រង់"</string> diff --git a/libs/WindowManager/Shell/res/values-kn/strings.xml b/libs/WindowManager/Shell/res/values-kn/strings.xml index 57aa771a2548..0cda44509b54 100644 --- a/libs/WindowManager/Shell/res/values-kn/strings.xml +++ b/libs/WindowManager/Shell/res/values-kn/strings.xml @@ -34,8 +34,7 @@ <string name="accessibility_action_pip_unstash" msgid="7467499339610437646">"ಅನ್ಸ್ಟ್ಯಾಶ್ ಮಾಡಿ"</string> <string name="dock_forced_resizable" msgid="7429086980048964687">"ಸ್ಪ್ಲಿಟ್ ಸ್ಕ್ರೀನ್ನಲ್ಲಿ ಆ್ಯಪ್ ಕೆಲಸ ಮಾಡದೇ ಇರಬಹುದು"</string> <string name="dock_non_resizeble_failed_to_dock_text" msgid="2733543750291266047">"ಸ್ಪ್ಲಿಟ್ ಸ್ಕ್ರೀನ್ ಅನ್ನು ಆ್ಯಪ್ ಬೆಂಬಲಿಸುವುದಿಲ್ಲ"</string> - <!-- no translation found for dock_multi_instances_not_supported_text (5011042177901502928) --> - <skip /> + <string name="dock_multi_instances_not_supported_text" msgid="5011042177901502928">"ಈ ಆ್ಯಪ್ ಅನ್ನು 1 ವಿಂಡೋದಲ್ಲಿ ಮಾತ್ರ ತೆರೆಯಬಹುದು"</string> <string name="forced_resizable_secondary_display" msgid="1768046938673582671">"ಸೆಕೆಂಡರಿ ಡಿಸ್ಪ್ಲೇಗಳಲ್ಲಿ ಅಪ್ಲಿಕೇಶನ್ ಕಾರ್ಯ ನಿರ್ವಹಿಸದೇ ಇರಬಹುದು."</string> <string name="activity_launch_on_secondary_display_failed_text" msgid="4226485344988071769">"ಸೆಕೆಂಡರಿ ಡಿಸ್ಪ್ಲೇಗಳಲ್ಲಿ ಪ್ರಾರಂಭಿಸುವಿಕೆಯನ್ನು ಅಪ್ಲಿಕೇಶನ್ ಬೆಂಬಲಿಸುವುದಿಲ್ಲ."</string> <string name="accessibility_divider" msgid="6407584574218956849">"ಸ್ಪ್ಲಿಟ್ ಸ್ಕ್ರೀನ್ ಡಿವೈಡರ್"</string> diff --git a/libs/WindowManager/Shell/res/values-ko/strings.xml b/libs/WindowManager/Shell/res/values-ko/strings.xml index e777fa7dc7a0..676506fc68dd 100644 --- a/libs/WindowManager/Shell/res/values-ko/strings.xml +++ b/libs/WindowManager/Shell/res/values-ko/strings.xml @@ -34,8 +34,7 @@ <string name="accessibility_action_pip_unstash" msgid="7467499339610437646">"숨기기 취소"</string> <string name="dock_forced_resizable" msgid="7429086980048964687">"앱이 화면 분할 모드로는 작동하지 않을 수 있습니다"</string> <string name="dock_non_resizeble_failed_to_dock_text" msgid="2733543750291266047">"앱이 화면 분할을 지원하지 않습니다"</string> - <!-- no translation found for dock_multi_instances_not_supported_text (5011042177901502928) --> - <skip /> + <string name="dock_multi_instances_not_supported_text" msgid="5011042177901502928">"이 앱은 창 1개에서만 열 수 있습니다."</string> <string name="forced_resizable_secondary_display" msgid="1768046938673582671">"앱이 보조 디스플레이에서 작동하지 않을 수도 있습니다."</string> <string name="activity_launch_on_secondary_display_failed_text" msgid="4226485344988071769">"앱이 보조 디스플레이에서의 실행을 지원하지 않습니다."</string> <string name="accessibility_divider" msgid="6407584574218956849">"화면 분할기"</string> diff --git a/libs/WindowManager/Shell/res/values-ky/strings.xml b/libs/WindowManager/Shell/res/values-ky/strings.xml index a96f3c8eb87a..57253ef55085 100644 --- a/libs/WindowManager/Shell/res/values-ky/strings.xml +++ b/libs/WindowManager/Shell/res/values-ky/strings.xml @@ -34,8 +34,7 @@ <string name="accessibility_action_pip_unstash" msgid="7467499339610437646">"Сейфтен чыгаруу"</string> <string name="dock_forced_resizable" msgid="7429086980048964687">"Колдонмодо экран бөлүнбөшү мүмкүн"</string> <string name="dock_non_resizeble_failed_to_dock_text" msgid="2733543750291266047">"Колдонмодо экран бөлүнбөйт"</string> - <!-- no translation found for dock_multi_instances_not_supported_text (5011042177901502928) --> - <skip /> + <string name="dock_multi_instances_not_supported_text" msgid="5011042177901502928">"Бул колдонмону 1 терезеде гана ачууга болот"</string> <string name="forced_resizable_secondary_display" msgid="1768046938673582671">"Колдонмо кошумча экранда иштебей коюшу мүмкүн."</string> <string name="activity_launch_on_secondary_display_failed_text" msgid="4226485344988071769">"Колдонмону кошумча экрандарда иштетүүгө болбойт."</string> <string name="accessibility_divider" msgid="6407584574218956849">"Экранды бөлгүч"</string> diff --git a/libs/WindowManager/Shell/res/values-lo/strings.xml b/libs/WindowManager/Shell/res/values-lo/strings.xml index 6ab04c596cd3..c5f6e2245b31 100644 --- a/libs/WindowManager/Shell/res/values-lo/strings.xml +++ b/libs/WindowManager/Shell/res/values-lo/strings.xml @@ -34,8 +34,7 @@ <string name="accessibility_action_pip_unstash" msgid="7467499339610437646">"ເອົາອອກຈາກບ່ອນເກັບສ່ວນຕົວ"</string> <string name="dock_forced_resizable" msgid="7429086980048964687">"ແອັບອາດໃຊ້ບໍ່ໄດ້ກັບໂໝດແບ່ງໜ້າຈໍ"</string> <string name="dock_non_resizeble_failed_to_dock_text" msgid="2733543750291266047">"ແອັບບໍ່ຮອງຮັບການແບ່ງໜ້າຈໍ"</string> - <!-- no translation found for dock_multi_instances_not_supported_text (5011042177901502928) --> - <skip /> + <string name="dock_multi_instances_not_supported_text" msgid="5011042177901502928">"ແອັບນີ້ສາມາດເປີດໄດ້ໃນ 1 ໜ້າຈໍເທົ່ານັ້ນ"</string> <string name="forced_resizable_secondary_display" msgid="1768046938673582671">"ແອັບອາດບໍ່ສາມາດໃຊ້ໄດ້ໃນໜ້າຈໍທີສອງ."</string> <string name="activity_launch_on_secondary_display_failed_text" msgid="4226485344988071769">"ແອັບບໍ່ຮອງຮັບການເປີດໃນໜ້າຈໍທີສອງ."</string> <string name="accessibility_divider" msgid="6407584574218956849">"ເສັ້ນແບ່ງໜ້າຈໍ"</string> diff --git a/libs/WindowManager/Shell/res/values-lt/strings.xml b/libs/WindowManager/Shell/res/values-lt/strings.xml index 9ef541e91c5b..eeed5a416fdc 100644 --- a/libs/WindowManager/Shell/res/values-lt/strings.xml +++ b/libs/WindowManager/Shell/res/values-lt/strings.xml @@ -34,8 +34,7 @@ <string name="accessibility_action_pip_unstash" msgid="7467499339610437646">"Nebeslėpti"</string> <string name="dock_forced_resizable" msgid="7429086980048964687">"Programa gali neveikti naudojant išskaidyto ekrano režimą"</string> <string name="dock_non_resizeble_failed_to_dock_text" msgid="2733543750291266047">"Programoje nepalaikomas išskaidyto ekrano režimas"</string> - <!-- no translation found for dock_multi_instances_not_supported_text (5011042177901502928) --> - <skip /> + <string name="dock_multi_instances_not_supported_text" msgid="5011042177901502928">"Šią programą galima atidaryti tik viename lange"</string> <string name="forced_resizable_secondary_display" msgid="1768046938673582671">"Programa gali neveikti antriniame ekrane."</string> <string name="activity_launch_on_secondary_display_failed_text" msgid="4226485344988071769">"Programa nepalaiko paleisties antriniuose ekranuose."</string> <string name="accessibility_divider" msgid="6407584574218956849">"Išskaidyto ekrano režimo daliklis"</string> diff --git a/libs/WindowManager/Shell/res/values-lv/strings.xml b/libs/WindowManager/Shell/res/values-lv/strings.xml index 634db045b754..4324d468042b 100644 --- a/libs/WindowManager/Shell/res/values-lv/strings.xml +++ b/libs/WindowManager/Shell/res/values-lv/strings.xml @@ -34,8 +34,7 @@ <string name="accessibility_action_pip_unstash" msgid="7467499339610437646">"Rādīt"</string> <string name="dock_forced_resizable" msgid="7429086980048964687">"Iespējams, lietotne nedarbosies ekrāna sadalīšanas režīmā"</string> <string name="dock_non_resizeble_failed_to_dock_text" msgid="2733543750291266047">"Lietotnē netiek atbalstīta ekrāna sadalīšana"</string> - <!-- no translation found for dock_multi_instances_not_supported_text (5011042177901502928) --> - <skip /> + <string name="dock_multi_instances_not_supported_text" msgid="5011042177901502928">"Šo lietotni var atvērt tikai vienā logā"</string> <string name="forced_resizable_secondary_display" msgid="1768046938673582671">"Lietotne, iespējams, nedarbosies sekundārajā displejā."</string> <string name="activity_launch_on_secondary_display_failed_text" msgid="4226485344988071769">"Lietotnē netiek atbalstīta palaišana sekundārajos displejos."</string> <string name="accessibility_divider" msgid="6407584574218956849">"Ekrāna sadalītājs"</string> diff --git a/libs/WindowManager/Shell/res/values-mk/strings.xml b/libs/WindowManager/Shell/res/values-mk/strings.xml index 6272b05ea768..471f5bdfcf1a 100644 --- a/libs/WindowManager/Shell/res/values-mk/strings.xml +++ b/libs/WindowManager/Shell/res/values-mk/strings.xml @@ -34,8 +34,7 @@ <string name="accessibility_action_pip_unstash" msgid="7467499339610437646">"Прикажете"</string> <string name="dock_forced_resizable" msgid="7429086980048964687">"Апликацијата можеби нема да работи со поделен екран"</string> <string name="dock_non_resizeble_failed_to_dock_text" msgid="2733543750291266047">"Апликацијата не поддржува поделен екран"</string> - <!-- no translation found for dock_multi_instances_not_supported_text (5011042177901502928) --> - <skip /> + <string name="dock_multi_instances_not_supported_text" msgid="5011042177901502928">"Апликацијава може да се отвори само во еден прозорец"</string> <string name="forced_resizable_secondary_display" msgid="1768046938673582671">"Апликацијата може да не функционира на друг екран."</string> <string name="activity_launch_on_secondary_display_failed_text" msgid="4226485344988071769">"Апликацијата не поддржува стартување на други екрани."</string> <string name="accessibility_divider" msgid="6407584574218956849">"Разделник на поделен екран"</string> diff --git a/libs/WindowManager/Shell/res/values-ml/strings.xml b/libs/WindowManager/Shell/res/values-ml/strings.xml index dcc12a752f31..5bc694a10747 100644 --- a/libs/WindowManager/Shell/res/values-ml/strings.xml +++ b/libs/WindowManager/Shell/res/values-ml/strings.xml @@ -34,8 +34,7 @@ <string name="accessibility_action_pip_unstash" msgid="7467499339610437646">"അൺസ്റ്റാഷ് ചെയ്യൽ"</string> <string name="dock_forced_resizable" msgid="7429086980048964687">"സ്ക്രീൻ വിഭജന മോഡിൽ ആപ്പ് പ്രവർത്തിച്ചേക്കില്ല"</string> <string name="dock_non_resizeble_failed_to_dock_text" msgid="2733543750291266047">"സ്ക്രീൻ വിഭജന മോഡിനെ ആപ്പ് പിന്തുണയ്ക്കുന്നില്ല"</string> - <!-- no translation found for dock_multi_instances_not_supported_text (5011042177901502928) --> - <skip /> + <string name="dock_multi_instances_not_supported_text" msgid="5011042177901502928">"ഈ ആപ്പ് ഒരു വിൻഡോയിൽ മാത്രമേ തുറക്കാനാകൂ"</string> <string name="forced_resizable_secondary_display" msgid="1768046938673582671">"രണ്ടാം ഡിസ്പ്ലേയിൽ ആപ്പ് പ്രവർത്തിച്ചേക്കില്ല."</string> <string name="activity_launch_on_secondary_display_failed_text" msgid="4226485344988071769">"രണ്ടാം ഡിസ്പ്ലേകളിൽ സമാരംഭിക്കുന്നതിനെ ആപ്പ് അനുവദിക്കുന്നില്ല."</string> <string name="accessibility_divider" msgid="6407584574218956849">"സ്ക്രീൻ വിഭജന മോഡ് ഡിവൈഡർ"</string> diff --git a/libs/WindowManager/Shell/res/values-mn/strings.xml b/libs/WindowManager/Shell/res/values-mn/strings.xml index 5ff9c97d3432..0268c649380d 100644 --- a/libs/WindowManager/Shell/res/values-mn/strings.xml +++ b/libs/WindowManager/Shell/res/values-mn/strings.xml @@ -34,8 +34,7 @@ <string name="accessibility_action_pip_unstash" msgid="7467499339610437646">"Ил гаргах"</string> <string name="dock_forced_resizable" msgid="7429086980048964687">"Апп дэлгэцийг хуваах горимтой ажиллахгүй байж магадгүй"</string> <string name="dock_non_resizeble_failed_to_dock_text" msgid="2733543750291266047">"Апп дэлгэцийг хуваах горимыг дэмждэггүй"</string> - <!-- no translation found for dock_multi_instances_not_supported_text (5011042177901502928) --> - <skip /> + <string name="dock_multi_instances_not_supported_text" msgid="5011042177901502928">"Энэ аппыг зөвхөн 1 цонхонд нээх боломжтой"</string> <string name="forced_resizable_secondary_display" msgid="1768046938673582671">"Апп хоёрдогч дэлгэцэд ажиллахгүй."</string> <string name="activity_launch_on_secondary_display_failed_text" msgid="4226485344988071769">"Аппыг хоёрдогч дэлгэцэд эхлүүлэх боломжгүй."</string> <string name="accessibility_divider" msgid="6407584574218956849">"Дэлгэцийг хуваах хуваагч"</string> diff --git a/libs/WindowManager/Shell/res/values-mr/strings.xml b/libs/WindowManager/Shell/res/values-mr/strings.xml index 1dc4151e506f..2e6163e65668 100644 --- a/libs/WindowManager/Shell/res/values-mr/strings.xml +++ b/libs/WindowManager/Shell/res/values-mr/strings.xml @@ -34,8 +34,7 @@ <string name="accessibility_action_pip_unstash" msgid="7467499339610437646">"अनस्टॅश करा"</string> <string name="dock_forced_resizable" msgid="7429086980048964687">"अॅप कदाचित स्प्लिट स्क्रीनसह काम करणार नाही"</string> <string name="dock_non_resizeble_failed_to_dock_text" msgid="2733543750291266047">"अॅप हे स्प्लिट स्क्रीनला सपोर्ट करत नाही"</string> - <!-- no translation found for dock_multi_instances_not_supported_text (5011042177901502928) --> - <skip /> + <string name="dock_multi_instances_not_supported_text" msgid="5011042177901502928">"हे अॅप फक्त एका विंडोमध्ये उघडले जाऊ शकते"</string> <string name="forced_resizable_secondary_display" msgid="1768046938673582671">"दुसऱ्या डिस्प्लेवर अॅप कदाचित चालणार नाही."</string> <string name="activity_launch_on_secondary_display_failed_text" msgid="4226485344988071769">"दुसऱ्या डिस्प्लेवर अॅप लाँच होणार नाही."</string> <string name="accessibility_divider" msgid="6407584574218956849">"स्प्लिट स्क्रीन विभाजक"</string> diff --git a/libs/WindowManager/Shell/res/values-ms/strings.xml b/libs/WindowManager/Shell/res/values-ms/strings.xml index c20f2b19afa1..a60e61b892cb 100644 --- a/libs/WindowManager/Shell/res/values-ms/strings.xml +++ b/libs/WindowManager/Shell/res/values-ms/strings.xml @@ -34,8 +34,7 @@ <string name="accessibility_action_pip_unstash" msgid="7467499339610437646">"Tunjukkan"</string> <string name="dock_forced_resizable" msgid="7429086980048964687">"Apl mungkin tidak berfungsi dengan skrin pisah"</string> <string name="dock_non_resizeble_failed_to_dock_text" msgid="2733543750291266047">"Apl tidak menyokong skrin pisah"</string> - <!-- no translation found for dock_multi_instances_not_supported_text (5011042177901502928) --> - <skip /> + <string name="dock_multi_instances_not_supported_text" msgid="5011042177901502928">"Apl ini hanya boleh dibuka dalam 1 tetingkap"</string> <string name="forced_resizable_secondary_display" msgid="1768046938673582671">"Apl mungkin tidak berfungsi pada paparan kedua."</string> <string name="activity_launch_on_secondary_display_failed_text" msgid="4226485344988071769">"Apl tidak menyokong pelancaran pada paparan kedua."</string> <string name="accessibility_divider" msgid="6407584574218956849">"Pembahagi skrin pisah"</string> diff --git a/libs/WindowManager/Shell/res/values-my/strings.xml b/libs/WindowManager/Shell/res/values-my/strings.xml index c07511bde9f9..6b91d4676621 100644 --- a/libs/WindowManager/Shell/res/values-my/strings.xml +++ b/libs/WindowManager/Shell/res/values-my/strings.xml @@ -34,8 +34,7 @@ <string name="accessibility_action_pip_unstash" msgid="7467499339610437646">"မသိုဝှက်ရန်"</string> <string name="dock_forced_resizable" msgid="7429086980048964687">"မျက်နှာပြင် ခွဲ၍ပြသခြင်းဖြင့် အက်ပ်သည် အလုပ်မလုပ်ပါ"</string> <string name="dock_non_resizeble_failed_to_dock_text" msgid="2733543750291266047">"အက်ပ်တွင် မျက်နှာပြင် ခွဲ၍ပြသခြင်းကို မပံ့ပိုးပါ"</string> - <!-- no translation found for dock_multi_instances_not_supported_text (5011042177901502928) --> - <skip /> + <string name="dock_multi_instances_not_supported_text" msgid="5011042177901502928">"ဤအက်ပ်ကို ဝင်းဒိုး ၁ ခုတွင်သာ ဖွင့်နိုင်သည်"</string> <string name="forced_resizable_secondary_display" msgid="1768046938673582671">"ဤအက်ပ်အနေဖြင့် ဒုတိယဖန်သားပြင်ပေါ်တွင် အလုပ်လုပ်မည် မဟုတ်ပါ။"</string> <string name="activity_launch_on_secondary_display_failed_text" msgid="4226485344988071769">"ဤအက်ပ်အနေဖြင့် ဖွင့်ရန်စနစ်ကို ဒုတိယဖန်သားပြင်မှ အသုံးပြုရန် ပံ့ပိုးမထားပါ။"</string> <string name="accessibility_divider" msgid="6407584574218956849">"မျက်နှာပြင် ခွဲ၍ပြသခြင်း ပိုင်းခြားစနစ်"</string> diff --git a/libs/WindowManager/Shell/res/values-nb/strings.xml b/libs/WindowManager/Shell/res/values-nb/strings.xml index 458487c35d63..ec9ece3484b8 100644 --- a/libs/WindowManager/Shell/res/values-nb/strings.xml +++ b/libs/WindowManager/Shell/res/values-nb/strings.xml @@ -34,8 +34,7 @@ <string name="accessibility_action_pip_unstash" msgid="7467499339610437646">"Avslutt oppbevaring"</string> <string name="dock_forced_resizable" msgid="7429086980048964687">"Det kan hende at appen ikke fungerer med delt skjerm"</string> <string name="dock_non_resizeble_failed_to_dock_text" msgid="2733543750291266047">"Appen støtter ikke delt skjerm"</string> - <!-- no translation found for dock_multi_instances_not_supported_text (5011042177901502928) --> - <skip /> + <string name="dock_multi_instances_not_supported_text" msgid="5011042177901502928">"Denne appen kan bare åpnes i ett vindu"</string> <string name="forced_resizable_secondary_display" msgid="1768046938673582671">"Appen fungerer kanskje ikke på en sekundær skjerm."</string> <string name="activity_launch_on_secondary_display_failed_text" msgid="4226485344988071769">"Appen kan ikke kjøres på sekundære skjermer."</string> <string name="accessibility_divider" msgid="6407584574218956849">"Skilleelement for delt skjerm"</string> diff --git a/libs/WindowManager/Shell/res/values-ne/strings.xml b/libs/WindowManager/Shell/res/values-ne/strings.xml index 09d8396eed59..8bb07be12c48 100644 --- a/libs/WindowManager/Shell/res/values-ne/strings.xml +++ b/libs/WindowManager/Shell/res/values-ne/strings.xml @@ -34,8 +34,7 @@ <string name="accessibility_action_pip_unstash" msgid="7467499339610437646">"अनस्ट्यास गर्नुहोस्"</string> <string name="dock_forced_resizable" msgid="7429086980048964687">"यो एपले स्प्लिट स्क्रिन मोडमा काम नगर्न सक्छ"</string> <string name="dock_non_resizeble_failed_to_dock_text" msgid="2733543750291266047">"यो एप स्प्लिट स्क्रिन मोडमा प्रयोग गर्न मिल्दैन"</string> - <!-- no translation found for dock_multi_instances_not_supported_text (5011042177901502928) --> - <skip /> + <string name="dock_multi_instances_not_supported_text" msgid="5011042177901502928">"यो एप एउटा विन्डोमा मात्र खोल्न मिल्छ"</string> <string name="forced_resizable_secondary_display" msgid="1768046938673582671">"यो एपले सहायक प्रदर्शनमा काम नगर्नसक्छ।"</string> <string name="activity_launch_on_secondary_display_failed_text" msgid="4226485344988071769">"अनुप्रयोगले सहायक प्रदर्शनहरूमा लञ्च सुविधालाई समर्थन गर्दैन।"</string> <string name="accessibility_divider" msgid="6407584574218956849">"स्प्लिट स्क्रिन डिभाइडर"</string> diff --git a/libs/WindowManager/Shell/res/values-nl/strings.xml b/libs/WindowManager/Shell/res/values-nl/strings.xml index 8b91fa299847..c6c60ae4b1f2 100644 --- a/libs/WindowManager/Shell/res/values-nl/strings.xml +++ b/libs/WindowManager/Shell/res/values-nl/strings.xml @@ -34,8 +34,7 @@ <string name="accessibility_action_pip_unstash" msgid="7467499339610437646">"Niet meer verbergen"</string> <string name="dock_forced_resizable" msgid="7429086980048964687">"De app werkt misschien niet met gesplitst scherm"</string> <string name="dock_non_resizeble_failed_to_dock_text" msgid="2733543750291266047">"App ondersteunt geen gesplitst scherm"</string> - <!-- no translation found for dock_multi_instances_not_supported_text (5011042177901502928) --> - <skip /> + <string name="dock_multi_instances_not_supported_text" msgid="5011042177901502928">"Deze app kan maar in 1 venster worden geopend"</string> <string name="forced_resizable_secondary_display" msgid="1768046938673582671">"App werkt mogelijk niet op een secundair scherm."</string> <string name="activity_launch_on_secondary_display_failed_text" msgid="4226485344988071769">"App kan niet op secundaire displays worden gestart."</string> <string name="accessibility_divider" msgid="6407584574218956849">"Scheiding voor gesplitst scherm"</string> diff --git a/libs/WindowManager/Shell/res/values-or/strings.xml b/libs/WindowManager/Shell/res/values-or/strings.xml index de1c9983fac9..927dde40134d 100644 --- a/libs/WindowManager/Shell/res/values-or/strings.xml +++ b/libs/WindowManager/Shell/res/values-or/strings.xml @@ -34,8 +34,7 @@ <string name="accessibility_action_pip_unstash" msgid="7467499339610437646">"ଦେଖାନ୍ତୁ"</string> <string name="dock_forced_resizable" msgid="7429086980048964687">"ସ୍ପ୍ଲିଟ ସ୍କ୍ରିନରେ ଆପ କାମ କରିନପାରେ"</string> <string name="dock_non_resizeble_failed_to_dock_text" msgid="2733543750291266047">"ସ୍ପ୍ଲିଟ ସ୍କ୍ରିନକୁ ଆପ ସମର୍ଥନ କରେ ନାହିଁ"</string> - <!-- no translation found for dock_multi_instances_not_supported_text (5011042177901502928) --> - <skip /> + <string name="dock_multi_instances_not_supported_text" msgid="5011042177901502928">"ଏହି ଆପକୁ କେବଳ 1ଟି ୱିଣ୍ଡୋରେ ଖୋଲାଯାଇପାରିବ"</string> <string name="forced_resizable_secondary_display" msgid="1768046938673582671">"ସେକେଣ୍ଡାରୀ ଡିସପ୍ଲେରେ ଆପ୍ କାମ ନକରିପାରେ।"</string> <string name="activity_launch_on_secondary_display_failed_text" msgid="4226485344988071769">"ସେକେଣ୍ଡାରୀ ଡିସପ୍ଲେରେ ଆପ୍ ଲଞ୍ଚ ସପୋର୍ଟ କରେ ନାହିଁ।"</string> <string name="accessibility_divider" msgid="6407584574218956849">"ସ୍ପ୍ଲିଟ ସ୍କ୍ରିନ ଡିଭାଇଡର"</string> diff --git a/libs/WindowManager/Shell/res/values-pa/strings.xml b/libs/WindowManager/Shell/res/values-pa/strings.xml index 2a700d375961..0e12fb872005 100644 --- a/libs/WindowManager/Shell/res/values-pa/strings.xml +++ b/libs/WindowManager/Shell/res/values-pa/strings.xml @@ -34,8 +34,7 @@ <string name="accessibility_action_pip_unstash" msgid="7467499339610437646">"ਅਣਸਟੈਸ਼"</string> <string name="dock_forced_resizable" msgid="7429086980048964687">"ਹੋ ਸਕਦਾ ਹੈ ਕਿ ਐਪ ਸਪਲਿਟ ਸਕ੍ਰੀਨ ਨਾਲ ਕੰਮ ਨਾ ਕਰੇ"</string> <string name="dock_non_resizeble_failed_to_dock_text" msgid="2733543750291266047">"ਐਪ ਸਪਲਿਟ ਸਕ੍ਰੀਨ ਦਾ ਸਮਰਥਨ ਨਹੀਂ ਕਰਦੀ"</string> - <!-- no translation found for dock_multi_instances_not_supported_text (5011042177901502928) --> - <skip /> + <string name="dock_multi_instances_not_supported_text" msgid="5011042177901502928">"ਇਹ ਐਪ ਸਿਰਫ਼ 1 ਵਿੰਡੋ ਵਿੱਚ ਖੋਲ੍ਹੀ ਜਾ ਸਕਦੀ ਹੈ"</string> <string name="forced_resizable_secondary_display" msgid="1768046938673582671">"ਹੋ ਸਕਦਾ ਹੈ ਕਿ ਐਪ ਸੈਕੰਡਰੀ ਡਿਸਪਲੇ \'ਤੇ ਕੰਮ ਨਾ ਕਰੇ।"</string> <string name="activity_launch_on_secondary_display_failed_text" msgid="4226485344988071769">"ਐਪ ਸੈਕੰਡਰੀ ਡਿਸਪਲੇਆਂ \'ਤੇ ਲਾਂਚ ਕਰਨ ਦਾ ਸਮਰਥਨ ਨਹੀਂ ਕਰਦੀ"</string> <string name="accessibility_divider" msgid="6407584574218956849">"ਸਪਲਿਟ ਸਕ੍ਰੀਨ ਵਿਭਾਜਕ"</string> diff --git a/libs/WindowManager/Shell/res/values-pl/strings.xml b/libs/WindowManager/Shell/res/values-pl/strings.xml index 43cfa6461cc8..75a8ce6bc16d 100644 --- a/libs/WindowManager/Shell/res/values-pl/strings.xml +++ b/libs/WindowManager/Shell/res/values-pl/strings.xml @@ -34,8 +34,7 @@ <string name="accessibility_action_pip_unstash" msgid="7467499339610437646">"Zabierz ze schowka"</string> <string name="dock_forced_resizable" msgid="7429086980048964687">"Aplikacja może nie działać przy podzielonym ekranie"</string> <string name="dock_non_resizeble_failed_to_dock_text" msgid="2733543750291266047">"Aplikacja nie obsługuje podzielonego ekranu"</string> - <!-- no translation found for dock_multi_instances_not_supported_text (5011042177901502928) --> - <skip /> + <string name="dock_multi_instances_not_supported_text" msgid="5011042177901502928">"Ta aplikacja może być otwarta tylko w 1 oknie."</string> <string name="forced_resizable_secondary_display" msgid="1768046938673582671">"Aplikacja może nie działać na dodatkowym ekranie."</string> <string name="activity_launch_on_secondary_display_failed_text" msgid="4226485344988071769">"Aplikacja nie obsługuje uruchamiania na dodatkowych ekranach."</string> <string name="accessibility_divider" msgid="6407584574218956849">"Linia dzielenia ekranu"</string> diff --git a/libs/WindowManager/Shell/res/values-pt-rBR/strings.xml b/libs/WindowManager/Shell/res/values-pt-rBR/strings.xml index fb1ef6880dc9..b84a0ded4939 100644 --- a/libs/WindowManager/Shell/res/values-pt-rBR/strings.xml +++ b/libs/WindowManager/Shell/res/values-pt-rBR/strings.xml @@ -34,8 +34,7 @@ <string name="accessibility_action_pip_unstash" msgid="7467499339610437646">"Exibir"</string> <string name="dock_forced_resizable" msgid="7429086980048964687">"É possível que o app não funcione com a tela dividida"</string> <string name="dock_non_resizeble_failed_to_dock_text" msgid="2733543750291266047">"O app não oferece suporte à divisão de tela"</string> - <!-- no translation found for dock_multi_instances_not_supported_text (5011042177901502928) --> - <skip /> + <string name="dock_multi_instances_not_supported_text" msgid="5011042177901502928">"Esse app só pode ser aberto em uma única janela"</string> <string name="forced_resizable_secondary_display" msgid="1768046938673582671">"É possível que o app não funcione em uma tela secundária."</string> <string name="activity_launch_on_secondary_display_failed_text" msgid="4226485344988071769">"O app não é compatível com a inicialização em telas secundárias."</string> <string name="accessibility_divider" msgid="6407584574218956849">"Divisor de tela"</string> diff --git a/libs/WindowManager/Shell/res/values-pt-rPT/strings.xml b/libs/WindowManager/Shell/res/values-pt-rPT/strings.xml index 702c0433fa0a..d84bfcdd73ff 100644 --- a/libs/WindowManager/Shell/res/values-pt-rPT/strings.xml +++ b/libs/WindowManager/Shell/res/values-pt-rPT/strings.xml @@ -34,8 +34,7 @@ <string name="accessibility_action_pip_unstash" msgid="7467499339610437646">"Remover do armazenamento"</string> <string name="dock_forced_resizable" msgid="7429086980048964687">"A app pode não funcionar com o ecrã dividido"</string> <string name="dock_non_resizeble_failed_to_dock_text" msgid="2733543750291266047">"A app não é compatível com o ecrã dividido"</string> - <!-- no translation found for dock_multi_instances_not_supported_text (5011042177901502928) --> - <skip /> + <string name="dock_multi_instances_not_supported_text" msgid="5011042177901502928">"Esta app só pode ser aberta em 1 janela"</string> <string name="forced_resizable_secondary_display" msgid="1768046938673582671">"A app pode não funcionar num ecrã secundário."</string> <string name="activity_launch_on_secondary_display_failed_text" msgid="4226485344988071769">"A app não é compatível com o início em ecrãs secundários."</string> <string name="accessibility_divider" msgid="6407584574218956849">"Divisor do ecrã dividido"</string> diff --git a/libs/WindowManager/Shell/res/values-pt/strings.xml b/libs/WindowManager/Shell/res/values-pt/strings.xml index fb1ef6880dc9..b84a0ded4939 100644 --- a/libs/WindowManager/Shell/res/values-pt/strings.xml +++ b/libs/WindowManager/Shell/res/values-pt/strings.xml @@ -34,8 +34,7 @@ <string name="accessibility_action_pip_unstash" msgid="7467499339610437646">"Exibir"</string> <string name="dock_forced_resizable" msgid="7429086980048964687">"É possível que o app não funcione com a tela dividida"</string> <string name="dock_non_resizeble_failed_to_dock_text" msgid="2733543750291266047">"O app não oferece suporte à divisão de tela"</string> - <!-- no translation found for dock_multi_instances_not_supported_text (5011042177901502928) --> - <skip /> + <string name="dock_multi_instances_not_supported_text" msgid="5011042177901502928">"Esse app só pode ser aberto em uma única janela"</string> <string name="forced_resizable_secondary_display" msgid="1768046938673582671">"É possível que o app não funcione em uma tela secundária."</string> <string name="activity_launch_on_secondary_display_failed_text" msgid="4226485344988071769">"O app não é compatível com a inicialização em telas secundárias."</string> <string name="accessibility_divider" msgid="6407584574218956849">"Divisor de tela"</string> diff --git a/libs/WindowManager/Shell/res/values-ro/strings.xml b/libs/WindowManager/Shell/res/values-ro/strings.xml index 596eebc7dd95..eeea428cc8fa 100644 --- a/libs/WindowManager/Shell/res/values-ro/strings.xml +++ b/libs/WindowManager/Shell/res/values-ro/strings.xml @@ -34,8 +34,7 @@ <string name="accessibility_action_pip_unstash" msgid="7467499339610437646">"Anulează stocarea"</string> <string name="dock_forced_resizable" msgid="7429086980048964687">"Este posibil ca aplicația să nu funcționeze cu ecranul împărțit"</string> <string name="dock_non_resizeble_failed_to_dock_text" msgid="2733543750291266047">"Aplicația nu acceptă ecranul împărțit"</string> - <!-- no translation found for dock_multi_instances_not_supported_text (5011042177901502928) --> - <skip /> + <string name="dock_multi_instances_not_supported_text" msgid="5011042177901502928">"Aplicația se poate deschide într-o singură fereastră"</string> <string name="forced_resizable_secondary_display" msgid="1768046938673582671">"Este posibil ca aplicația să nu funcționeze pe un ecran secundar."</string> <string name="activity_launch_on_secondary_display_failed_text" msgid="4226485344988071769">"Aplicația nu acceptă lansare pe ecrane secundare."</string> <string name="accessibility_divider" msgid="6407584574218956849">"Separator pentru ecranul împărțit"</string> diff --git a/libs/WindowManager/Shell/res/values-ru/strings.xml b/libs/WindowManager/Shell/res/values-ru/strings.xml index f2f1f6fdd857..26b0f94eb585 100644 --- a/libs/WindowManager/Shell/res/values-ru/strings.xml +++ b/libs/WindowManager/Shell/res/values-ru/strings.xml @@ -34,8 +34,7 @@ <string name="accessibility_action_pip_unstash" msgid="7467499339610437646">"Показать"</string> <string name="dock_forced_resizable" msgid="7429086980048964687">"Когда включено разделение экрана, приложение может работать нестабильно."</string> <string name="dock_non_resizeble_failed_to_dock_text" msgid="2733543750291266047">"Приложение не поддерживает разделение экрана."</string> - <!-- no translation found for dock_multi_instances_not_supported_text (5011042177901502928) --> - <skip /> + <string name="dock_multi_instances_not_supported_text" msgid="5011042177901502928">"Это приложение можно открыть только в одном окне."</string> <string name="forced_resizable_secondary_display" msgid="1768046938673582671">"Приложение может не работать на дополнительном экране"</string> <string name="activity_launch_on_secondary_display_failed_text" msgid="4226485344988071769">"Приложение не поддерживает запуск на дополнительных экранах"</string> <string name="accessibility_divider" msgid="6407584574218956849">"Разделитель экрана"</string> diff --git a/libs/WindowManager/Shell/res/values-si/strings.xml b/libs/WindowManager/Shell/res/values-si/strings.xml index 0a1fd94a8998..9b9a430ce73f 100644 --- a/libs/WindowManager/Shell/res/values-si/strings.xml +++ b/libs/WindowManager/Shell/res/values-si/strings.xml @@ -34,8 +34,7 @@ <string name="accessibility_action_pip_unstash" msgid="7467499339610437646">"සඟවා තැබීම ඉවත් කරන්න"</string> <string name="dock_forced_resizable" msgid="7429086980048964687">"යෙදුම බෙදීම් තිරය සමග ක්රියා නොකළ හැක"</string> <string name="dock_non_resizeble_failed_to_dock_text" msgid="2733543750291266047">"යෙදුම බෙදුම් තිරයට සහාය නොදක්වයි"</string> - <!-- no translation found for dock_multi_instances_not_supported_text (5011042177901502928) --> - <skip /> + <string name="dock_multi_instances_not_supported_text" msgid="5011042177901502928">"මෙම යෙදුම විවෘත කළ හැක්කේ 1 කවුළුවක පමණයි"</string> <string name="forced_resizable_secondary_display" msgid="1768046938673582671">"යෙදුම ද්විතියික සංදර්ශකයක ක්රියා නොකළ හැකිය."</string> <string name="activity_launch_on_secondary_display_failed_text" msgid="4226485344988071769">"යෙදුම ද්විතීයික සංදර්ශක මත දියත් කිරීම සඳහා සහාය නොදක්වයි."</string> <string name="accessibility_divider" msgid="6407584574218956849">"බෙදුම් තිර වෙන්කරණය"</string> diff --git a/libs/WindowManager/Shell/res/values-sk/strings.xml b/libs/WindowManager/Shell/res/values-sk/strings.xml index 6e746b01f2c3..4b2153180cbe 100644 --- a/libs/WindowManager/Shell/res/values-sk/strings.xml +++ b/libs/WindowManager/Shell/res/values-sk/strings.xml @@ -34,8 +34,7 @@ <string name="accessibility_action_pip_unstash" msgid="7467499339610437646">"Zrušiť skrytie"</string> <string name="dock_forced_resizable" msgid="7429086980048964687">"Aplikácia nemusí fungovať s rozdelenou obrazovkou"</string> <string name="dock_non_resizeble_failed_to_dock_text" msgid="2733543750291266047">"Aplikácia nepodporuje rozdelenú obrazovku"</string> - <!-- no translation found for dock_multi_instances_not_supported_text (5011042177901502928) --> - <skip /> + <string name="dock_multi_instances_not_supported_text" msgid="5011042177901502928">"Táto aplikácia môže byť otvorená iba v jednom okne"</string> <string name="forced_resizable_secondary_display" msgid="1768046938673582671">"Aplikácia nemusí fungovať na sekundárnej obrazovke."</string> <string name="activity_launch_on_secondary_display_failed_text" msgid="4226485344988071769">"Aplikácia nepodporuje spúšťanie na sekundárnych obrazovkách."</string> <string name="accessibility_divider" msgid="6407584574218956849">"Rozdeľovač obrazovky"</string> diff --git a/libs/WindowManager/Shell/res/values-sl/strings.xml b/libs/WindowManager/Shell/res/values-sl/strings.xml index 9536e05ef057..581cf5b815c6 100644 --- a/libs/WindowManager/Shell/res/values-sl/strings.xml +++ b/libs/WindowManager/Shell/res/values-sl/strings.xml @@ -34,8 +34,7 @@ <string name="accessibility_action_pip_unstash" msgid="7467499339610437646">"Razkrij"</string> <string name="dock_forced_resizable" msgid="7429086980048964687">"Aplikacija morda ne deluje v načinu razdeljenega zaslona."</string> <string name="dock_non_resizeble_failed_to_dock_text" msgid="2733543750291266047">"Aplikacija ne podpira načina razdeljenega zaslona."</string> - <!-- no translation found for dock_multi_instances_not_supported_text (5011042177901502928) --> - <skip /> + <string name="dock_multi_instances_not_supported_text" msgid="5011042177901502928">"To aplikacijo je mogoče odpreti samo v enem oknu"</string> <string name="forced_resizable_secondary_display" msgid="1768046938673582671">"Aplikacija morda ne bo delovala na sekundarnem zaslonu."</string> <string name="activity_launch_on_secondary_display_failed_text" msgid="4226485344988071769">"Aplikacija ne podpira zagona na sekundarnih zaslonih."</string> <string name="accessibility_divider" msgid="6407584574218956849">"Razdelilnik zaslonov"</string> diff --git a/libs/WindowManager/Shell/res/values-sq/strings.xml b/libs/WindowManager/Shell/res/values-sq/strings.xml index a0fff68554e7..9dc7b7ebef99 100644 --- a/libs/WindowManager/Shell/res/values-sq/strings.xml +++ b/libs/WindowManager/Shell/res/values-sq/strings.xml @@ -34,8 +34,7 @@ <string name="accessibility_action_pip_unstash" msgid="7467499339610437646">"Mos e fshih"</string> <string name="dock_forced_resizable" msgid="7429086980048964687">"Aplikacioni mund të mos funksionojë me ekranin e ndarë"</string> <string name="dock_non_resizeble_failed_to_dock_text" msgid="2733543750291266047">"Aplikacioni nuk mbështet ekranin e ndarë"</string> - <!-- no translation found for dock_multi_instances_not_supported_text (5011042177901502928) --> - <skip /> + <string name="dock_multi_instances_not_supported_text" msgid="5011042177901502928">"Ky aplikacion mund të hapet vetëm në 1 dritare"</string> <string name="forced_resizable_secondary_display" msgid="1768046938673582671">"Aplikacioni mund të mos funksionojë në një ekran dytësor."</string> <string name="activity_launch_on_secondary_display_failed_text" msgid="4226485344988071769">"Aplikacioni nuk mbështet nisjen në ekrane dytësore."</string> <string name="accessibility_divider" msgid="6407584574218956849">"Ndarësi i ekranit të ndarë"</string> diff --git a/libs/WindowManager/Shell/res/values-sr/strings.xml b/libs/WindowManager/Shell/res/values-sr/strings.xml index ad9ba9038eb8..cd532f79dd78 100644 --- a/libs/WindowManager/Shell/res/values-sr/strings.xml +++ b/libs/WindowManager/Shell/res/values-sr/strings.xml @@ -34,8 +34,7 @@ <string name="accessibility_action_pip_unstash" msgid="7467499339610437646">"Уклоните из тајне меморије"</string> <string name="dock_forced_resizable" msgid="7429086980048964687">"Апликација можда неће радити са подељеним екраном."</string> <string name="dock_non_resizeble_failed_to_dock_text" msgid="2733543750291266047">"Апликација не подржава подељени екран."</string> - <!-- no translation found for dock_multi_instances_not_supported_text (5011042177901502928) --> - <skip /> + <string name="dock_multi_instances_not_supported_text" msgid="5011042177901502928">"Ова апликација може да се отвори само у једном прозору"</string> <string name="forced_resizable_secondary_display" msgid="1768046938673582671">"Апликација можда неће функционисати на секундарном екрану."</string> <string name="activity_launch_on_secondary_display_failed_text" msgid="4226485344988071769">"Апликација не подржава покретање на секундарним екранима."</string> <string name="accessibility_divider" msgid="6407584574218956849">"Разделник подељеног екрана"</string> diff --git a/libs/WindowManager/Shell/res/values-sv/strings.xml b/libs/WindowManager/Shell/res/values-sv/strings.xml index 488af391b45b..386dda7e088d 100644 --- a/libs/WindowManager/Shell/res/values-sv/strings.xml +++ b/libs/WindowManager/Shell/res/values-sv/strings.xml @@ -34,8 +34,7 @@ <string name="accessibility_action_pip_unstash" msgid="7467499339610437646">"Återställ stash"</string> <string name="dock_forced_resizable" msgid="7429086980048964687">"Appen kanske inte fungerar med delad skärm"</string> <string name="dock_non_resizeble_failed_to_dock_text" msgid="2733543750291266047">"Appen har inte stöd för delad skärm"</string> - <!-- no translation found for dock_multi_instances_not_supported_text (5011042177901502928) --> - <skip /> + <string name="dock_multi_instances_not_supported_text" msgid="5011042177901502928">"Denna app kan bara vara öppen i ett fönster"</string> <string name="forced_resizable_secondary_display" msgid="1768046938673582671">"Appen kanske inte fungerar på en sekundär skärm."</string> <string name="activity_launch_on_secondary_display_failed_text" msgid="4226485344988071769">"Appen kan inte köras på en sekundär skärm."</string> <string name="accessibility_divider" msgid="6407584574218956849">"Avdelare för delad skärm"</string> diff --git a/libs/WindowManager/Shell/res/values-sw/strings.xml b/libs/WindowManager/Shell/res/values-sw/strings.xml index 38cbfe38007c..69b2e34ada3c 100644 --- a/libs/WindowManager/Shell/res/values-sw/strings.xml +++ b/libs/WindowManager/Shell/res/values-sw/strings.xml @@ -34,8 +34,7 @@ <string name="accessibility_action_pip_unstash" msgid="7467499339610437646">"Fichua"</string> <string name="dock_forced_resizable" msgid="7429086980048964687">"Huenda programu isifanye kazi kwenye skrini iliyogawanywa"</string> <string name="dock_non_resizeble_failed_to_dock_text" msgid="2733543750291266047">"Programu haifanyi kazi kwenye skrini iliyogawanywa"</string> - <!-- no translation found for dock_multi_instances_not_supported_text (5011042177901502928) --> - <skip /> + <string name="dock_multi_instances_not_supported_text" msgid="5011042177901502928">"Programu hii inaweza kufunguliwa katika dirisha 1 pekee"</string> <string name="forced_resizable_secondary_display" msgid="1768046938673582671">"Huenda programu isifanye kazi kwenye dirisha lingine."</string> <string name="activity_launch_on_secondary_display_failed_text" msgid="4226485344988071769">"Programu hii haiwezi kufunguliwa kwenye madirisha mengine."</string> <string name="accessibility_divider" msgid="6407584574218956849">"Kitenganishi cha kugawa skrini"</string> diff --git a/libs/WindowManager/Shell/res/values-ta/strings.xml b/libs/WindowManager/Shell/res/values-ta/strings.xml index 616aa274fa15..037b5aba22f5 100644 --- a/libs/WindowManager/Shell/res/values-ta/strings.xml +++ b/libs/WindowManager/Shell/res/values-ta/strings.xml @@ -34,8 +34,7 @@ <string name="accessibility_action_pip_unstash" msgid="7467499339610437646">"Unstash"</string> <string name="dock_forced_resizable" msgid="7429086980048964687">"திரைப் பிரிப்புப் பயன்முறையில் ஆப்ஸ் செயல்படாமல் போகக்கூடும்"</string> <string name="dock_non_resizeble_failed_to_dock_text" msgid="2733543750291266047">"திரைப் பிரிப்புப் பயன்முறையை ஆப்ஸ் ஆதரிக்காது"</string> - <!-- no translation found for dock_multi_instances_not_supported_text (5011042177901502928) --> - <skip /> + <string name="dock_multi_instances_not_supported_text" msgid="5011042177901502928">"இந்த ஆப்ஸை 1 சாளரத்தில் மட்டுமே திறக்க முடியும்"</string> <string name="forced_resizable_secondary_display" msgid="1768046938673582671">"இரண்டாம்நிலைத் திரையில் ஆப்ஸ் வேலை செய்யாமல் போகக்கூடும்."</string> <string name="activity_launch_on_secondary_display_failed_text" msgid="4226485344988071769">"இரண்டாம்நிலைத் திரைகளில் பயன்பாட்டைத் தொடங்க முடியாது."</string> <string name="accessibility_divider" msgid="6407584574218956849">"திரைப் பிரிப்பான்"</string> diff --git a/libs/WindowManager/Shell/res/values-te/strings.xml b/libs/WindowManager/Shell/res/values-te/strings.xml index 6fe1995692ec..694ecb951210 100644 --- a/libs/WindowManager/Shell/res/values-te/strings.xml +++ b/libs/WindowManager/Shell/res/values-te/strings.xml @@ -34,8 +34,7 @@ <string name="accessibility_action_pip_unstash" msgid="7467499339610437646">"ఆన్స్టాచ్"</string> <string name="dock_forced_resizable" msgid="7429086980048964687">"స్ప్లిట్ స్క్రీన్తో యాప్ పని చేయకపోవచ్చు"</string> <string name="dock_non_resizeble_failed_to_dock_text" msgid="2733543750291266047">"యాప్లో స్ప్లిట్ స్క్రీన్కు సపోర్ట్ లేదు"</string> - <!-- no translation found for dock_multi_instances_not_supported_text (5011042177901502928) --> - <skip /> + <string name="dock_multi_instances_not_supported_text" msgid="5011042177901502928">"ఈ యాప్ను 1 విండోలో మాత్రమే తెరవవచ్చు"</string> <string name="forced_resizable_secondary_display" msgid="1768046938673582671">"ప్రత్యామ్నాయ డిస్ప్లేలో యాప్ పని చేయకపోవచ్చు."</string> <string name="activity_launch_on_secondary_display_failed_text" msgid="4226485344988071769">"ప్రత్యామ్నాయ డిస్ప్లేల్లో ప్రారంభానికి యాప్ మద్దతు లేదు."</string> <string name="accessibility_divider" msgid="6407584574218956849">"స్ప్లిట్ స్క్రీన్ డివైడర్"</string> diff --git a/libs/WindowManager/Shell/res/values-th/strings.xml b/libs/WindowManager/Shell/res/values-th/strings.xml index 65e5ff77f6a6..d4b6aff2ee7d 100644 --- a/libs/WindowManager/Shell/res/values-th/strings.xml +++ b/libs/WindowManager/Shell/res/values-th/strings.xml @@ -34,8 +34,7 @@ <string name="accessibility_action_pip_unstash" msgid="7467499339610437646">"เอาออกจากที่เก็บส่วนตัว"</string> <string name="dock_forced_resizable" msgid="7429086980048964687">"แอปอาจใช้ไม่ได้กับโหมดแยกหน้าจอ"</string> <string name="dock_non_resizeble_failed_to_dock_text" msgid="2733543750291266047">"แอปไม่รองรับการแยกหน้าจอ"</string> - <!-- no translation found for dock_multi_instances_not_supported_text (5011042177901502928) --> - <skip /> + <string name="dock_multi_instances_not_supported_text" msgid="5011042177901502928">"แอปนี้เปิดได้ใน 1 หน้าต่างเท่านั้น"</string> <string name="forced_resizable_secondary_display" msgid="1768046938673582671">"แอปอาจไม่ทำงานในจอแสดงผลรอง"</string> <string name="activity_launch_on_secondary_display_failed_text" msgid="4226485344988071769">"แอปไม่รองรับการเรียกใช้ในจอแสดงผลรอง"</string> <string name="accessibility_divider" msgid="6407584574218956849">"เส้นแยกหน้าจอ"</string> diff --git a/libs/WindowManager/Shell/res/values-tl/strings.xml b/libs/WindowManager/Shell/res/values-tl/strings.xml index 74e0abee6732..db9303c0fd9c 100644 --- a/libs/WindowManager/Shell/res/values-tl/strings.xml +++ b/libs/WindowManager/Shell/res/values-tl/strings.xml @@ -34,8 +34,7 @@ <string name="accessibility_action_pip_unstash" msgid="7467499339610437646">"I-unstash"</string> <string name="dock_forced_resizable" msgid="7429086980048964687">"Posibleng hindi gumana sa split screen ang app"</string> <string name="dock_non_resizeble_failed_to_dock_text" msgid="2733543750291266047">"Hindi sinusuportahan ng app ang split-screen"</string> - <!-- no translation found for dock_multi_instances_not_supported_text (5011042177901502928) --> - <skip /> + <string name="dock_multi_instances_not_supported_text" msgid="5011042177901502928">"Sa 1 window lang puwedeng buksan ang app na ito"</string> <string name="forced_resizable_secondary_display" msgid="1768046938673582671">"Maaaring hindi gumana ang app sa pangalawang display."</string> <string name="activity_launch_on_secondary_display_failed_text" msgid="4226485344988071769">"Hindi sinusuportahan ng app ang paglulunsad sa mga pangalawang display."</string> <string name="accessibility_divider" msgid="6407584574218956849">"Divider ng split screen"</string> diff --git a/libs/WindowManager/Shell/res/values-tr/strings.xml b/libs/WindowManager/Shell/res/values-tr/strings.xml index 2d169240afa8..818666c79973 100644 --- a/libs/WindowManager/Shell/res/values-tr/strings.xml +++ b/libs/WindowManager/Shell/res/values-tr/strings.xml @@ -34,8 +34,7 @@ <string name="accessibility_action_pip_unstash" msgid="7467499339610437646">"Depolama"</string> <string name="dock_forced_resizable" msgid="7429086980048964687">"Uygulama bölünmüş ekranda çalışmayabilir"</string> <string name="dock_non_resizeble_failed_to_dock_text" msgid="2733543750291266047">"Uygulama bölünmüş ekranı desteklemiyor."</string> - <!-- no translation found for dock_multi_instances_not_supported_text (5011042177901502928) --> - <skip /> + <string name="dock_multi_instances_not_supported_text" msgid="5011042177901502928">"Bu uygulama yalnızca 1 pencerede açılabilir"</string> <string name="forced_resizable_secondary_display" msgid="1768046938673582671">"Uygulama ikincil ekranda çalışmayabilir."</string> <string name="activity_launch_on_secondary_display_failed_text" msgid="4226485344988071769">"Uygulama ikincil ekranlarda başlatılmayı desteklemiyor."</string> <string name="accessibility_divider" msgid="6407584574218956849">"Bölünmüş ekran ayırıcı"</string> diff --git a/libs/WindowManager/Shell/res/values-uk/strings.xml b/libs/WindowManager/Shell/res/values-uk/strings.xml index 01031281818b..85fb8e114476 100644 --- a/libs/WindowManager/Shell/res/values-uk/strings.xml +++ b/libs/WindowManager/Shell/res/values-uk/strings.xml @@ -34,8 +34,7 @@ <string name="accessibility_action_pip_unstash" msgid="7467499339610437646">"Показати"</string> <string name="dock_forced_resizable" msgid="7429086980048964687">"Додаток може не працювати в режимі розділення екрана"</string> <string name="dock_non_resizeble_failed_to_dock_text" msgid="2733543750291266047">"Додаток не підтримує розділення екрана"</string> - <!-- no translation found for dock_multi_instances_not_supported_text (5011042177901502928) --> - <skip /> + <string name="dock_multi_instances_not_supported_text" msgid="5011042177901502928">"Цей додаток можна відкрити лише в одному вікні"</string> <string name="forced_resizable_secondary_display" msgid="1768046938673582671">"Додаток може не працювати на додатковому екрані."</string> <string name="activity_launch_on_secondary_display_failed_text" msgid="4226485344988071769">"Додаток не підтримує запуск на додаткових екранах."</string> <string name="accessibility_divider" msgid="6407584574218956849">"Розділювач екрана"</string> diff --git a/libs/WindowManager/Shell/res/values-ur/strings.xml b/libs/WindowManager/Shell/res/values-ur/strings.xml index 2fdcfe8015cf..813870b134b4 100644 --- a/libs/WindowManager/Shell/res/values-ur/strings.xml +++ b/libs/WindowManager/Shell/res/values-ur/strings.xml @@ -34,8 +34,7 @@ <string name="accessibility_action_pip_unstash" msgid="7467499339610437646">"Unstash"</string> <string name="dock_forced_resizable" msgid="7429086980048964687">"ممکن ہے کہ ایپ اسپلٹ اسکرین کے ساتھ کام نہ کرے"</string> <string name="dock_non_resizeble_failed_to_dock_text" msgid="2733543750291266047">"ایپ اسپلٹ اسکرین کو سپورٹ نہیں کرتی ہے"</string> - <!-- no translation found for dock_multi_instances_not_supported_text (5011042177901502928) --> - <skip /> + <string name="dock_multi_instances_not_supported_text" msgid="5011042177901502928">"یہ ایپ صرف 1 ونڈو میں کھولی جا سکتی ہے"</string> <string name="forced_resizable_secondary_display" msgid="1768046938673582671">"ممکن ہے ایپ ثانوی ڈسپلے پر کام نہ کرے۔"</string> <string name="activity_launch_on_secondary_display_failed_text" msgid="4226485344988071769">"ایپ ثانوی ڈسپلیز پر شروعات کا تعاون نہیں کرتی۔"</string> <string name="accessibility_divider" msgid="6407584574218956849">"اسپلٹ اسکرین ڈیوائیڈر"</string> diff --git a/libs/WindowManager/Shell/res/values-uz/strings.xml b/libs/WindowManager/Shell/res/values-uz/strings.xml index a0d7cb6d228c..7bcacbb93f1f 100644 --- a/libs/WindowManager/Shell/res/values-uz/strings.xml +++ b/libs/WindowManager/Shell/res/values-uz/strings.xml @@ -34,8 +34,7 @@ <string name="accessibility_action_pip_unstash" msgid="7467499339610437646">"Chiqarish"</string> <string name="dock_forced_resizable" msgid="7429086980048964687">"Bu ilovada ekranni ikkiga ajratish rejimi ishlamaydi."</string> <string name="dock_non_resizeble_failed_to_dock_text" msgid="2733543750291266047">"Bu ilovada ekranni ikkiga ajratish ishlamaydi."</string> - <!-- no translation found for dock_multi_instances_not_supported_text (5011042177901502928) --> - <skip /> + <string name="dock_multi_instances_not_supported_text" msgid="5011042177901502928">"Bu ilovani faqat 1 ta oynada ochish mumkin"</string> <string name="forced_resizable_secondary_display" msgid="1768046938673582671">"Bu ilova qo‘shimcha ekranda ishlamasligi mumkin."</string> <string name="activity_launch_on_secondary_display_failed_text" msgid="4226485344988071769">"Bu ilova qo‘shimcha ekranlarda ishga tushmaydi."</string> <string name="accessibility_divider" msgid="6407584574218956849">"Ekranni ikkiga ajratish chizigʻi"</string> diff --git a/libs/WindowManager/Shell/res/values-vi/strings.xml b/libs/WindowManager/Shell/res/values-vi/strings.xml index 957a4577430b..416dd91162c2 100644 --- a/libs/WindowManager/Shell/res/values-vi/strings.xml +++ b/libs/WindowManager/Shell/res/values-vi/strings.xml @@ -34,8 +34,7 @@ <string name="accessibility_action_pip_unstash" msgid="7467499339610437646">"Hiện"</string> <string name="dock_forced_resizable" msgid="7429086980048964687">"Có thể ứng dụng không dùng được chế độ chia đôi màn hình"</string> <string name="dock_non_resizeble_failed_to_dock_text" msgid="2733543750291266047">"Ứng dụng không hỗ trợ chế độ chia đôi màn hình"</string> - <!-- no translation found for dock_multi_instances_not_supported_text (5011042177901502928) --> - <skip /> + <string name="dock_multi_instances_not_supported_text" msgid="5011042177901502928">"Ứng dụng này chỉ có thể mở trong 1 cửa sổ"</string> <string name="forced_resizable_secondary_display" msgid="1768046938673582671">"Ứng dụng có thể không hoạt động trên màn hình phụ."</string> <string name="activity_launch_on_secondary_display_failed_text" msgid="4226485344988071769">"Ứng dụng không hỗ trợ khởi chạy trên màn hình phụ."</string> <string name="accessibility_divider" msgid="6407584574218956849">"Trình chia đôi màn hình"</string> diff --git a/libs/WindowManager/Shell/res/values-zh-rCN/strings.xml b/libs/WindowManager/Shell/res/values-zh-rCN/strings.xml index e4bf0765ef06..6ad172807f6a 100644 --- a/libs/WindowManager/Shell/res/values-zh-rCN/strings.xml +++ b/libs/WindowManager/Shell/res/values-zh-rCN/strings.xml @@ -34,8 +34,7 @@ <string name="accessibility_action_pip_unstash" msgid="7467499339610437646">"取消隐藏"</string> <string name="dock_forced_resizable" msgid="7429086980048964687">"应用可能无法在分屏模式下正常运行"</string> <string name="dock_non_resizeble_failed_to_dock_text" msgid="2733543750291266047">"应用不支持分屏"</string> - <!-- no translation found for dock_multi_instances_not_supported_text (5011042177901502928) --> - <skip /> + <string name="dock_multi_instances_not_supported_text" msgid="5011042177901502928">"此应用只能在 1 个窗口中打开"</string> <string name="forced_resizable_secondary_display" msgid="1768046938673582671">"应用可能无法在辅显示屏上正常运行。"</string> <string name="activity_launch_on_secondary_display_failed_text" msgid="4226485344988071769">"应用不支持在辅显示屏上启动。"</string> <string name="accessibility_divider" msgid="6407584574218956849">"分屏分隔线"</string> diff --git a/libs/WindowManager/Shell/res/values-zh-rHK/strings.xml b/libs/WindowManager/Shell/res/values-zh-rHK/strings.xml index 20076211d2b6..b5b94ec40fd1 100644 --- a/libs/WindowManager/Shell/res/values-zh-rHK/strings.xml +++ b/libs/WindowManager/Shell/res/values-zh-rHK/strings.xml @@ -34,8 +34,7 @@ <string name="accessibility_action_pip_unstash" msgid="7467499339610437646">"取消保護"</string> <string name="dock_forced_resizable" msgid="7429086980048964687">"應用程式可能無法在分割螢幕中運作"</string> <string name="dock_non_resizeble_failed_to_dock_text" msgid="2733543750291266047">"應用程式不支援分割螢幕"</string> - <!-- no translation found for dock_multi_instances_not_supported_text (5011042177901502928) --> - <skip /> + <string name="dock_multi_instances_not_supported_text" msgid="5011042177901502928">"此應用程式只可在 1 個視窗中開啟"</string> <string name="forced_resizable_secondary_display" msgid="1768046938673582671">"應用程式可能無法在次要顯示屏上運作。"</string> <string name="activity_launch_on_secondary_display_failed_text" msgid="4226485344988071769">"應用程式無法在次要顯示屏上啟動。"</string> <string name="accessibility_divider" msgid="6407584574218956849">"分割螢幕分隔線"</string> diff --git a/libs/WindowManager/Shell/res/values-zh-rTW/strings.xml b/libs/WindowManager/Shell/res/values-zh-rTW/strings.xml index 1d69edd8b421..0f2a052dbbe0 100644 --- a/libs/WindowManager/Shell/res/values-zh-rTW/strings.xml +++ b/libs/WindowManager/Shell/res/values-zh-rTW/strings.xml @@ -34,8 +34,7 @@ <string name="accessibility_action_pip_unstash" msgid="7467499339610437646">"取消暫時隱藏"</string> <string name="dock_forced_resizable" msgid="7429086980048964687">"應用程式可能無法在分割畫面中運作"</string> <string name="dock_non_resizeble_failed_to_dock_text" msgid="2733543750291266047">"這個應用程式不支援分割畫面"</string> - <!-- no translation found for dock_multi_instances_not_supported_text (5011042177901502928) --> - <skip /> + <string name="dock_multi_instances_not_supported_text" msgid="5011042177901502928">"這個應用程式只能在 1 個視窗中開啟"</string> <string name="forced_resizable_secondary_display" msgid="1768046938673582671">"應用程式可能無法在次要顯示器上運作。"</string> <string name="activity_launch_on_secondary_display_failed_text" msgid="4226485344988071769">"應用程式無法在次要顯示器上啟動。"</string> <string name="accessibility_divider" msgid="6407584574218956849">"分割畫面分隔線"</string> diff --git a/libs/WindowManager/Shell/res/values-zu/strings.xml b/libs/WindowManager/Shell/res/values-zu/strings.xml index 099879bca415..a696f9ec6251 100644 --- a/libs/WindowManager/Shell/res/values-zu/strings.xml +++ b/libs/WindowManager/Shell/res/values-zu/strings.xml @@ -34,8 +34,7 @@ <string name="accessibility_action_pip_unstash" msgid="7467499339610437646">"Susa isiteshi"</string> <string name="dock_forced_resizable" msgid="7429086980048964687">"Ama-app okungenzeka angasebenzi ngesikrini esihlukanisiwe"</string> <string name="dock_non_resizeble_failed_to_dock_text" msgid="2733543750291266047">"I-app ayisekeli isikrini esihlukanisiwe."</string> - <!-- no translation found for dock_multi_instances_not_supported_text (5011042177901502928) --> - <skip /> + <string name="dock_multi_instances_not_supported_text" msgid="5011042177901502928">"Le-app ingavulwa kuphela ewindini eli-1."</string> <string name="forced_resizable_secondary_display" msgid="1768046938673582671">"Uhlelo lokusebenza kungenzeka lungasebenzi kusibonisi sesibili."</string> <string name="activity_launch_on_secondary_display_failed_text" msgid="4226485344988071769">"Uhlelo lokusebenza alusekeli ukuqalisa kuzibonisi zesibili."</string> <string name="accessibility_divider" msgid="6407584574218956849">"Isihlukanisi sokuhlukanisa isikrini"</string> diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/RootTaskDisplayAreaOrganizer.java b/libs/WindowManager/Shell/src/com/android/wm/shell/RootTaskDisplayAreaOrganizer.java index ab61a48a715c..5143d419597b 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/RootTaskDisplayAreaOrganizer.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/RootTaskDisplayAreaOrganizer.java @@ -115,6 +115,19 @@ public class RootTaskDisplayAreaOrganizer extends DisplayAreaOrganizer { b.setParent(sc); } + /** + * Re-parents the provided surface to the leash of the provided display. + * + * @param displayId the display area to reparent to. + * @param sc the surface to be reparented. + * @param t a {@link SurfaceControl.Transaction} in which to reparent. + */ + public void reparentToDisplayArea(int displayId, SurfaceControl sc, + SurfaceControl.Transaction t) { + final SurfaceControl displayAreaLeash = mLeashes.get(displayId); + t.reparent(sc, displayAreaLeash); + } + public void setPosition(@NonNull SurfaceControl.Transaction tx, int displayId, int x, int y) { final SurfaceControl sc = mLeashes.get(displayId); if (sc == null) { diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/activityembedding/ActivityEmbeddingAnimationSpec.java b/libs/WindowManager/Shell/src/com/android/wm/shell/activityembedding/ActivityEmbeddingAnimationSpec.java index 6cd1324c7d24..efa5a1a64ade 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/activityembedding/ActivityEmbeddingAnimationSpec.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/activityembedding/ActivityEmbeddingAnimationSpec.java @@ -21,6 +21,7 @@ import static android.app.ActivityOptions.ANIM_CUSTOM; import static com.android.internal.policy.TransitionAnimation.WALLPAPER_TRANSITION_NONE; import static com.android.wm.shell.transition.TransitionAnimationHelper.loadAttributeAnimation; +import static com.android.wm.shell.transition.TransitionAnimationHelper.getTransitionTypeFromInfo; import android.annotation.NonNull; import android.annotation.Nullable; @@ -253,7 +254,8 @@ class ActivityEmbeddingAnimationSpec { private boolean shouldShowBackdrop(@NonNull TransitionInfo info, @NonNull TransitionInfo.Change change) { - final Animation a = loadAttributeAnimation(info, change, WALLPAPER_TRANSITION_NONE, + final int type = getTransitionTypeFromInfo(info); + final Animation a = loadAttributeAnimation(type, info, change, WALLPAPER_TRANSITION_NONE, mTransitionAnimation, false); return a != null && a.getShowBackdrop(); } diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/common/SystemWindows.java b/libs/WindowManager/Shell/src/com/android/wm/shell/common/SystemWindows.java index e9344ffcce0c..1c74f415ec90 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/common/SystemWindows.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/common/SystemWindows.java @@ -322,13 +322,12 @@ public class SystemWindows { } @Override - public void remove(android.view.IWindow window) throws RemoteException { - super.remove(window); + public void remove(IBinder clientToken) throws RemoteException { + super.remove(clientToken); synchronized(this) { - IBinder token = window.asBinder(); - new SurfaceControl.Transaction().remove(mLeashForWindow.get(token)) + new SurfaceControl.Transaction().remove(mLeashForWindow.get(clientToken)) .apply(); - mLeashForWindow.remove(token); + mLeashForWindow.remove(clientToken); } } diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/dagger/WMShellModule.java b/libs/WindowManager/Shell/src/com/android/wm/shell/dagger/WMShellModule.java index 47769a8eeb11..71bf487249fb 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/dagger/WMShellModule.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/dagger/WMShellModule.java @@ -59,6 +59,7 @@ import com.android.wm.shell.dagger.pip.PipModule; import com.android.wm.shell.desktopmode.DesktopModeStatus; import com.android.wm.shell.desktopmode.DesktopModeTaskRepository; import com.android.wm.shell.desktopmode.DesktopTasksController; +import com.android.wm.shell.desktopmode.DragToDesktopTransitionHandler; import com.android.wm.shell.desktopmode.EnterDesktopTaskTransitionHandler; import com.android.wm.shell.desktopmode.ExitDesktopTaskTransitionHandler; import com.android.wm.shell.desktopmode.ToggleResizeDesktopTaskTransitionHandler; @@ -498,6 +499,7 @@ public abstract class WMShellModule { EnterDesktopTaskTransitionHandler enterDesktopTransitionHandler, ExitDesktopTaskTransitionHandler exitDesktopTransitionHandler, ToggleResizeDesktopTaskTransitionHandler toggleResizeDesktopTaskTransitionHandler, + DragToDesktopTransitionHandler dragToDesktopTransitionHandler, @DynamicOverride DesktopModeTaskRepository desktopModeTaskRepository, LaunchAdjacentController launchAdjacentController, RecentsTransitionHandler recentsTransitionHandler, @@ -506,8 +508,19 @@ public abstract class WMShellModule { return new DesktopTasksController(context, shellInit, shellCommandHandler, shellController, displayController, shellTaskOrganizer, syncQueue, rootTaskDisplayAreaOrganizer, transitions, enterDesktopTransitionHandler, exitDesktopTransitionHandler, - toggleResizeDesktopTaskTransitionHandler, desktopModeTaskRepository, - launchAdjacentController, recentsTransitionHandler, mainExecutor); + toggleResizeDesktopTaskTransitionHandler, dragToDesktopTransitionHandler, + desktopModeTaskRepository, launchAdjacentController, recentsTransitionHandler, + mainExecutor); + } + + @WMSingleton + @Provides + static DragToDesktopTransitionHandler provideDragToDesktopTransitionHandler( + Context context, + Transitions transitions, + RootTaskDisplayAreaOrganizer rootTaskDisplayAreaOrganizer) { + return new DragToDesktopTransitionHandler(context, transitions, + rootTaskDisplayAreaOrganizer); } @WMSingleton diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopTasksController.kt b/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopTasksController.kt index 8e12991080ed..4a9ea6fed73f 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopTasksController.kt +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopTasksController.kt @@ -59,6 +59,7 @@ import com.android.wm.shell.common.split.SplitScreenConstants.SPLIT_POSITION_BOT import com.android.wm.shell.common.split.SplitScreenConstants.SPLIT_POSITION_TOP_OR_LEFT import com.android.wm.shell.desktopmode.DesktopModeTaskRepository.VisibleTasksListener import com.android.wm.shell.desktopmode.DesktopModeVisualIndicator.TO_DESKTOP_INDICATOR +import com.android.wm.shell.desktopmode.DragToDesktopTransitionHandler.DragToDesktopStateListener import com.android.wm.shell.protolog.ShellProtoLogGroup.WM_SHELL_DESKTOP_MODE import com.android.wm.shell.recents.RecentsTransitionHandler import com.android.wm.shell.recents.RecentsTransitionStateListener @@ -92,6 +93,7 @@ class DesktopTasksController( private val exitDesktopTaskTransitionHandler: ExitDesktopTaskTransitionHandler, private val toggleResizeDesktopTaskTransitionHandler: ToggleResizeDesktopTaskTransitionHandler, + private val dragToDesktopTransitionHandler: DragToDesktopTransitionHandler, private val desktopModeTaskRepository: DesktopModeTaskRepository, private val launchAdjacentController: LaunchAdjacentController, private val recentsTransitionHandler: RecentsTransitionHandler, @@ -110,6 +112,20 @@ class DesktopTasksController( launchAdjacentController.launchAdjacentEnabled = !hasVisibleFreeformTasks } } + private val dragToDesktopStateListener = object : DragToDesktopStateListener { + override fun onCommitToDesktopAnimationStart(tx: SurfaceControl.Transaction) { + removeVisualIndicator(tx) + } + + override fun onCancelToDesktopAnimationEnd(tx: SurfaceControl.Transaction) { + removeVisualIndicator(tx) + } + + private fun removeVisualIndicator(tx: SurfaceControl.Transaction) { + visualIndicator?.releaseVisualIndicator(tx) + visualIndicator = null + } + } private val transitionAreaHeight get() = context.resources.getDimensionPixelSize( @@ -122,9 +138,7 @@ class DesktopTasksController( ) private var recentsAnimationRunning = false - - // This is public to avoid cyclic dependency; it is set by SplitScreenController - lateinit var splitScreenController: SplitScreenController + private lateinit var splitScreenController: SplitScreenController init { desktopMode = DesktopModeImpl() @@ -143,7 +157,7 @@ class DesktopTasksController( ) transitions.addHandler(this) desktopModeTaskRepository.addVisibleTasksListener(taskVisibilityListener, mainExecutor) - + dragToDesktopTransitionHandler.setDragToDesktopStateListener(dragToDesktopStateListener) recentsTransitionHandler.addTransitionStateListener( object : RecentsTransitionStateListener { override fun onAnimationStateChanged(running: Boolean) { @@ -158,6 +172,12 @@ class DesktopTasksController( ) } + /** Setter needed to avoid cyclic dependency. */ + fun setSplitScreenController(controller: SplitScreenController) { + splitScreenController = controller + dragToDesktopTransitionHandler.setSplitScreenController(controller) + } + /** Show all tasks, that are part of the desktop, on top of launcher */ fun showDesktopApps(displayId: Int, remoteTransition: RemoteTransition? = null) { KtProtoLog.v(WM_SHELL_DESKTOP_MODE, "DesktopTasksController: showDesktopApps") @@ -248,56 +268,43 @@ class DesktopTasksController( } /** - * The first part of the animated move to desktop transition. Applies the changes to move task - * to desktop mode and sets the taskBounds to the passed in bounds, startBounds. This is - * followed with a call to {@link finishMoveToDesktop} or {@link cancelMoveToDesktop}. + * The first part of the animated drag to desktop transition. This is + * followed with a call to [finalizeDragToDesktop] or [cancelDragToDesktop]. */ - fun startMoveToDesktop( + fun startDragToDesktop( taskInfo: RunningTaskInfo, - startBounds: Rect, - dragToDesktopValueAnimator: MoveToDesktopAnimator + dragToDesktopValueAnimator: MoveToDesktopAnimator, + windowDecor: DesktopModeWindowDecoration ) { KtProtoLog.v( - WM_SHELL_DESKTOP_MODE, - "DesktopTasksController: startMoveToDesktop taskId=%d", - taskInfo.taskId + WM_SHELL_DESKTOP_MODE, + "DesktopTasksController: startDragToDesktop taskId=%d", + taskInfo.taskId + ) + dragToDesktopTransitionHandler.startDragToDesktopTransition( + taskInfo.taskId, + dragToDesktopValueAnimator, + windowDecor ) - val wct = WindowContainerTransaction() - exitSplitIfApplicable(wct, taskInfo) - moveHomeTaskToFront(wct) - addMoveToDesktopChanges(wct, taskInfo) - wct.setBounds(taskInfo.token, startBounds) - - if (Transitions.ENABLE_SHELL_TRANSITIONS) { - enterDesktopTaskTransitionHandler.startMoveToDesktop(wct, dragToDesktopValueAnimator, - mOnAnimationFinishedCallback) - } else { - shellTaskOrganizer.applyTransaction(wct) - } } /** - * The second part of the animated move to desktop transition, called after - * {@link startMoveToDesktop}. Brings apps to front and sets freeform task bounds. + * The second part of the animated drag to desktop transition, called after + * [startDragToDesktop]. */ - private fun finalizeMoveToDesktop(taskInfo: RunningTaskInfo, freeformBounds: Rect) { + private fun finalizeDragToDesktop(taskInfo: RunningTaskInfo, freeformBounds: Rect) { KtProtoLog.v( - WM_SHELL_DESKTOP_MODE, - "DesktopTasksController: finalizeMoveToDesktop taskId=%d", - taskInfo.taskId + WM_SHELL_DESKTOP_MODE, + "DesktopTasksController: finalizeDragToDesktop taskId=%d", + taskInfo.taskId ) val wct = WindowContainerTransaction() + exitSplitIfApplicable(wct, taskInfo) + moveHomeTaskToFront(wct) bringDesktopAppsToFront(taskInfo.displayId, wct) addMoveToDesktopChanges(wct, taskInfo) wct.setBounds(taskInfo.token, freeformBounds) - - if (Transitions.ENABLE_SHELL_TRANSITIONS) { - enterDesktopTaskTransitionHandler.finalizeMoveToDesktop(wct, - mOnAnimationFinishedCallback) - } else { - shellTaskOrganizer.applyTransaction(wct) - releaseVisualIndicator() - } + dragToDesktopTransitionHandler.finishDragToDesktopTransition(wct) } /** @@ -353,40 +360,40 @@ class DesktopTasksController( } private fun exitSplitIfApplicable(wct: WindowContainerTransaction, taskInfo: RunningTaskInfo) { - if (taskInfo.windowingMode == WINDOWING_MODE_MULTI_WINDOW) { - splitScreenController.prepareExitSplitScreen(wct, - splitScreenController.getStageOfTask(taskInfo.taskId), EXIT_REASON_ENTER_DESKTOP) + if (splitScreenController.isTaskInSplitScreen(taskInfo.taskId)) { + splitScreenController.prepareExitSplitScreen( + wct, + splitScreenController.getStageOfTask(taskInfo.taskId), + EXIT_REASON_ENTER_DESKTOP + ) + getOtherSplitTask(taskInfo.taskId)?.let { otherTaskInfo -> + wct.removeTask(otherTaskInfo.token) + } } } + private fun getOtherSplitTask(taskId: Int): RunningTaskInfo? { + val remainingTaskPosition: Int = + if (splitScreenController.getSplitPosition(taskId) + == SPLIT_POSITION_BOTTOM_OR_RIGHT) { + SPLIT_POSITION_TOP_OR_LEFT + } else { + SPLIT_POSITION_BOTTOM_OR_RIGHT + } + return splitScreenController.getTaskInfo(remainingTaskPosition) + } + /** - * The second part of the animated move to desktop transition, called after - * {@link startMoveToDesktop}. Move a task to fullscreen after being dragged from fullscreen - * and released back into status bar area. + * The second part of the animated drag to desktop transition, called after + * [startDragToDesktop]. */ - fun cancelMoveToDesktop(task: RunningTaskInfo, moveToDesktopAnimator: MoveToDesktopAnimator) { + fun cancelDragToDesktop(task: RunningTaskInfo) { KtProtoLog.v( WM_SHELL_DESKTOP_MODE, - "DesktopTasksController: cancelMoveToDesktop taskId=%d", + "DesktopTasksController: cancelDragToDesktop taskId=%d", task.taskId ) - val wct = WindowContainerTransaction() - wct.setBounds(task.token, Rect()) - - if (Transitions.ENABLE_SHELL_TRANSITIONS) { - enterDesktopTaskTransitionHandler.startCancelMoveToDesktopMode(wct, - moveToDesktopAnimator) { t -> - val callbackWCT = WindowContainerTransaction() - visualIndicator?.releaseVisualIndicator(t) - visualIndicator = null - addMoveToFullscreenChanges(callbackWCT, task) - transitions.startTransition(TRANSIT_CHANGE, callbackWCT, null /* handler */) - } - } else { - addMoveToFullscreenChanges(wct, task) - shellTaskOrganizer.applyTransaction(wct) - releaseVisualIndicator() - } + dragToDesktopTransitionHandler.cancelDragToDesktopTransition() } private fun moveToFullscreenWithAnimation(task: RunningTaskInfo, position: Point) { @@ -966,6 +973,11 @@ class DesktopTasksController( visualIndicator = DesktopModeVisualIndicator(syncQueue, taskInfo, displayController, context, taskSurface, shellTaskOrganizer, rootTaskDisplayAreaOrganizer, TO_DESKTOP_INDICATOR) + // TODO(b/301106941): don't show the indicator until the drag-to-desktop animation has + // started, or it'll be visible too early on top of the task surface, especially in + // the cancel-early case. Also because it shouldn't even be shown in the cancel-early + // case since its dismissal is tied to the cancel animation end, which doesn't even run + // in cancel-early. visualIndicator?.createIndicatorWithAnimatedBounds() } val indicator = visualIndicator ?: return @@ -988,7 +1000,7 @@ class DesktopTasksController( taskInfo: RunningTaskInfo, freeformBounds: Rect ) { - finalizeMoveToDesktop(taskInfo, freeformBounds) + finalizeDragToDesktop(taskInfo, freeformBounds) } private fun getStatusBarHeight(taskInfo: RunningTaskInfo): Int { diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DragToDesktopTransitionHandler.kt b/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DragToDesktopTransitionHandler.kt new file mode 100644 index 000000000000..75d27d99b9ac --- /dev/null +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DragToDesktopTransitionHandler.kt @@ -0,0 +1,543 @@ +package com.android.wm.shell.desktopmode + +import android.animation.Animator +import android.animation.AnimatorListenerAdapter +import android.animation.RectEvaluator +import android.animation.ValueAnimator +import android.app.ActivityOptions +import android.app.ActivityOptions.SourceInfo +import android.app.PendingIntent +import android.app.PendingIntent.FLAG_ALLOW_UNSAFE_IMPLICIT_INTENT +import android.app.PendingIntent.FLAG_MUTABLE +import android.app.WindowConfiguration.ACTIVITY_TYPE_HOME +import android.app.WindowConfiguration.WINDOWING_MODE_FREEFORM +import android.content.Context +import android.content.Intent +import android.content.Intent.FILL_IN_COMPONENT +import android.graphics.Rect +import android.os.IBinder +import android.os.SystemClock +import android.view.SurfaceControl +import android.view.WindowManager.TRANSIT_CLOSE +import android.window.TransitionInfo +import android.window.TransitionInfo.Change +import android.window.TransitionRequestInfo +import android.window.WindowContainerToken +import android.window.WindowContainerTransaction +import com.android.wm.shell.RootTaskDisplayAreaOrganizer +import com.android.wm.shell.splitscreen.SplitScreenController +import com.android.wm.shell.transition.Transitions +import com.android.wm.shell.transition.Transitions.TRANSIT_DESKTOP_MODE_CANCEL_DRAG_TO_DESKTOP +import com.android.wm.shell.transition.Transitions.TRANSIT_DESKTOP_MODE_END_DRAG_TO_DESKTOP +import com.android.wm.shell.transition.Transitions.TRANSIT_DESKTOP_MODE_START_DRAG_TO_DESKTOP +import com.android.wm.shell.transition.Transitions.TransitionHandler +import com.android.wm.shell.util.TransitionUtil +import com.android.wm.shell.windowdecor.DesktopModeWindowDecoration +import com.android.wm.shell.windowdecor.MoveToDesktopAnimator +import com.android.wm.shell.windowdecor.MoveToDesktopAnimator.Companion.DRAG_FREEFORM_SCALE +import java.util.function.Supplier + +/** + * Handles the transition to enter desktop from fullscreen by dragging on the handle bar. It also + * handles the cancellation case where the task is dragged back to the status bar area in the same + * gesture. + */ +class DragToDesktopTransitionHandler( + private val context: Context, + private val transitions: Transitions, + private val taskDisplayAreaOrganizer: RootTaskDisplayAreaOrganizer, + private val transactionSupplier: Supplier<SurfaceControl.Transaction> +) : TransitionHandler { + + constructor( + context: Context, + transitions: Transitions, + rootTaskDisplayAreaOrganizer: RootTaskDisplayAreaOrganizer + ) : this( + context, + transitions, + rootTaskDisplayAreaOrganizer, + Supplier { SurfaceControl.Transaction() } + ) + + private val rectEvaluator = RectEvaluator(Rect()) + private val launchHomeIntent = Intent(Intent.ACTION_MAIN) + .addCategory(Intent.CATEGORY_HOME) + + private var dragToDesktopStateListener: DragToDesktopStateListener? = null + private var splitScreenController: SplitScreenController? = null + private var transitionState: TransitionState? = null + + /** Sets a listener to receive callback about events during the transition animation. */ + fun setDragToDesktopStateListener(listener: DragToDesktopStateListener) { + dragToDesktopStateListener = listener + } + + /** Setter needed to avoid cyclic dependency. */ + fun setSplitScreenController(controller: SplitScreenController) { + splitScreenController = controller + } + + /** + * Starts a transition that performs a transient launch of Home so that Home is brought to the + * front while still keeping the currently focused task that is being dragged resumed. This + * allows the animation handler to reorder the task to the front and to scale it with the + * gesture into the desktop area with the Home and wallpaper behind it. + * + * Note that the transition handler for this transition doesn't call the finish callback until + * after one of the "end" or "cancel" transitions is merged into this transition. + */ + fun startDragToDesktopTransition( + taskId: Int, + dragToDesktopAnimator: MoveToDesktopAnimator, + windowDecoration: DesktopModeWindowDecoration + ) { + if (transitionState != null) { + error("A drag to desktop is already in progress") + } + + val options = ActivityOptions.makeBasic().apply { + setTransientLaunch() + setSourceInfo(SourceInfo.TYPE_DESKTOP_ANIMATION, SystemClock.uptimeMillis()) + } + val pendingIntent = PendingIntent.getActivity( + context, + 0 /* requestCode */, + launchHomeIntent, + FLAG_MUTABLE or FLAG_ALLOW_UNSAFE_IMPLICIT_INTENT or FILL_IN_COMPONENT + ) + val wct = WindowContainerTransaction() + wct.sendPendingIntent(pendingIntent, launchHomeIntent, options.toBundle()) + val startTransitionToken = transitions + .startTransition(TRANSIT_DESKTOP_MODE_START_DRAG_TO_DESKTOP, wct, this) + + transitionState = if (isSplitTask(taskId)) { + TransitionState.FromSplit( + draggedTaskId = taskId, + dragAnimator = dragToDesktopAnimator, + windowDecoration = windowDecoration, + startTransitionToken = startTransitionToken + ) + } else { + TransitionState.FromFullscreen( + draggedTaskId = taskId, + dragAnimator = dragToDesktopAnimator, + windowDecoration = windowDecoration, + startTransitionToken = startTransitionToken + ) + } + } + + /** + * Starts a transition that "finishes" the drag to desktop gesture. This transition is intended + * to merge into the "start" transition and is the one that actually applies the bounds and + * windowing mode changes to the dragged task. This is called when the dragged task is released + * inside the desktop drop zone. + */ + fun finishDragToDesktopTransition(wct: WindowContainerTransaction) { + transitions.startTransition(TRANSIT_DESKTOP_MODE_END_DRAG_TO_DESKTOP, wct, this) + } + + /** + * Starts a transition that "cancels" the drag to desktop gesture. This transition is intended + * to merge into the "start" transition and it restores the transient state that was used to + * launch the Home task over the dragged task. This is called when the dragged task is released + * outside the desktop drop zone and is instead dropped back into the status bar region that + * means the user wants to remain in their current windowing mode. + */ + fun cancelDragToDesktopTransition() { + val state = requireTransitionState() + state.cancelled = true + if (state.draggedTaskChange != null) { + // Regular case, transient launch of Home happened as is waiting for the cancel + // transient to start and merge. Animate the cancellation (scale back to original + // bounds) first before actually starting the cancel transition so that the wallpaper + // is visible behind the animating task. + startCancelAnimation() + } else { + // There's no dragged task, this can happen when the "cancel" happened too quickly + // before the "start" transition is even ready (like on a fling gesture). The + // "shrink" animation didn't even start, so there's no need to animate the "cancel". + // We also don't want to start the cancel transition yet since we don't have + // enough info to restore the order. We'll check for the cancelled state flag when + // the "start" animation is ready and cancel from #startAnimation instead. + } + } + + override fun startAnimation( + transition: IBinder, + info: TransitionInfo, + startTransaction: SurfaceControl.Transaction, + finishTransaction: SurfaceControl.Transaction, + finishCallback: Transitions.TransitionFinishCallback + ): Boolean { + val state = requireTransitionState() + + val isStartDragToDesktop = info.type == TRANSIT_DESKTOP_MODE_START_DRAG_TO_DESKTOP && + transition == state.startTransitionToken + if (!isStartDragToDesktop) { + return false + } + + // Layering: non-wallpaper, non-home tasks excluding the dragged task go at the bottom, + // then Home on top of that, wallpaper on top of that and finally the dragged task on top + // of everything. + val appLayers = info.changes.size + val homeLayers = info.changes.size * 2 + val wallpaperLayers = info.changes.size * 3 + val dragLayer = wallpaperLayers + val leafTaskFilter = TransitionUtil.LeafTaskFilter() + info.changes.withIndex().forEach { (i, change) -> + if (TransitionUtil.isWallpaper(change)) { + val layer = wallpaperLayers - i + startTransaction.apply { + setLayer(change.leash, layer) + show(change.leash) + } + } else if (isHomeChange(change)) { + state.homeToken = change.container + val layer = homeLayers - i + startTransaction.apply { + setLayer(change.leash, layer) + show(change.leash) + } + } else if (TransitionInfo.isIndependent(change, info)) { + // Root. + when (state) { + is TransitionState.FromSplit -> { + state.splitRootChange = change + val layer = if (!state.cancelled) { + // Normal case, split root goes to the bottom behind everything else. + appLayers - i + } else { + // Cancel-early case, pretend nothing happened so split root stays top. + dragLayer + } + startTransaction.apply { + setLayer(change.leash, layer) + show(change.leash) + } + } + is TransitionState.FromFullscreen -> { + if (change.taskInfo?.taskId == state.draggedTaskId) { + state.draggedTaskChange = change + val bounds = change.endAbsBounds + startTransaction.apply { + setLayer(change.leash, dragLayer) + setWindowCrop(change.leash, bounds.width(), bounds.height()) + show(change.leash) + } + } else { + throw IllegalStateException("Expected root to be dragged task") + } + } + } + } else if (leafTaskFilter.test(change)) { + // When dragging one of the split tasks, the dragged leaf needs to be re-parented + // so that it can be layered separately from the rest of the split root/stages. + // The split root including the other split side was layered behind the wallpaper + // and home while the dragged split needs to be layered in front of them. + // Do not do this in the cancel-early case though, since in that case nothing should + // happen on screen so the layering will remain the same as if no transition + // occurred. + if (change.taskInfo?.taskId == state.draggedTaskId && !state.cancelled) { + state.draggedTaskChange = change + taskDisplayAreaOrganizer.reparentToDisplayArea( + change.endDisplayId, change.leash, startTransaction) + val bounds = change.endAbsBounds + startTransaction.apply { + setLayer(change.leash, dragLayer) + setWindowCrop(change.leash, bounds.width(), bounds.height()) + show(change.leash) + } + } + } + } + state.startTransitionFinishCb = finishCallback + state.startTransitionFinishTransaction = finishTransaction + startTransaction.apply() + + if (!state.cancelled) { + // Normal case, start animation to scale down the dragged task. It'll also be moved to + // follow the finger and when released we'll start the next phase/transition. + state.dragAnimator.startAnimation() + } else { + // Cancel-early case, the state was flagged was cancelled already, which means the + // gesture ended in the cancel region. This can happen even before the start transition + // is ready/animate here when cancelling quickly like with a fling. There's no point + // in starting the scale down animation that we would scale up anyway, so just jump + // directly into starting the cancel transition to restore WM order. Surfaces should + // not move as if no transition happened. + startCancelDragToDesktopTransition() + } + return true + } + + override fun mergeAnimation( + transition: IBinder, + info: TransitionInfo, + t: SurfaceControl.Transaction, + mergeTarget: IBinder, + finishCallback: Transitions.TransitionFinishCallback + ) { + val state = requireTransitionState() + val isCancelTransition = info.type == TRANSIT_DESKTOP_MODE_CANCEL_DRAG_TO_DESKTOP && + transition == state.cancelTransitionToken && + mergeTarget == state.startTransitionToken + val isEndTransition = info.type == TRANSIT_DESKTOP_MODE_END_DRAG_TO_DESKTOP && + mergeTarget == state.startTransitionToken + + val startTransactionFinishT = state.startTransitionFinishTransaction + ?: error("Start transition expected to be waiting for merge but wasn't") + val startTransitionFinishCb = state.startTransitionFinishCb + ?: error("Start transition expected to be waiting for merge but wasn't") + if (isEndTransition) { + info.changes.withIndex().forEach { (i, change) -> + if (change.mode == TRANSIT_CLOSE) { + t.hide(change.leash) + startTransactionFinishT.hide(change.leash) + } else if (change.taskInfo?.taskId == state.draggedTaskId) { + t.show(change.leash) + startTransactionFinishT.show(change.leash) + state.draggedTaskChange = change + } else if (change.taskInfo?.windowingMode == WINDOWING_MODE_FREEFORM) { + // Other freeform tasks that are being restored go behind the dragged task. + val draggedTaskLeash = state.draggedTaskChange?.leash + ?: error("Expected dragged leash to be non-null") + t.setRelativeLayer(change.leash, draggedTaskLeash, -i) + startTransactionFinishT.setRelativeLayer(change.leash, draggedTaskLeash, -i) + } + } + + val draggedTaskChange = state.draggedTaskChange + ?: throw IllegalStateException("Expected non-null change of dragged task") + val draggedTaskLeash = draggedTaskChange.leash + val startBounds = draggedTaskChange.startAbsBounds + val endBounds = draggedTaskChange.endAbsBounds + + // TODO(b/301106941): Instead of forcing-finishing the animation that scales the + // surface down and then starting another that scales it back up to the final size, + // blend the two animations. + state.dragAnimator.endAnimator() + // Using [DRAG_FREEFORM_SCALE] to calculate animated width/height is possible because + // it is known that the animation scale is finished because the animation was + // force-ended above. This won't be true when the two animations are blended. + val animStartWidth = (startBounds.width() * DRAG_FREEFORM_SCALE).toInt() + val animStartHeight = (startBounds.height() * DRAG_FREEFORM_SCALE).toInt() + // Using end bounds here to find the left/top also assumes the center animation has + // finished and the surface is placed exactly in the center of the screen which matches + // the end/default bounds of the now freeform task. + val animStartLeft = endBounds.centerX() - (animStartWidth / 2) + val animStartTop = endBounds.centerY() - (animStartHeight / 2) + val animStartBounds = Rect( + animStartLeft, + animStartTop, + animStartLeft + animStartWidth, + animStartTop + animStartHeight + ) + + + dragToDesktopStateListener?.onCommitToDesktopAnimationStart(t) + t.apply { + setScale(draggedTaskLeash, 1f, 1f) + setPosition( + draggedTaskLeash, + animStartBounds.left.toFloat(), + animStartBounds.top.toFloat() + ) + setWindowCrop( + draggedTaskLeash, + animStartBounds.width(), + animStartBounds.height() + ) + } + // Accept the merge by applying the merging transaction (applied by #showResizeVeil) + // and finish callback. Show the veil and position the task at the first frame before + // starting the final animation. + state.windowDecoration.showResizeVeil(t, animStartBounds) + finishCallback.onTransitionFinished(null /* wct */) + + // Because the task surface was scaled down during the drag, we must use the animated + // bounds instead of the [startAbsBounds]. + val tx: SurfaceControl.Transaction = transactionSupplier.get() + ValueAnimator.ofObject(rectEvaluator, animStartBounds, endBounds) + .setDuration(DRAG_TO_DESKTOP_FINISH_ANIM_DURATION_MS) + .apply { + addUpdateListener { animator -> + val animBounds = animator.animatedValue as Rect + tx.apply { + setScale(draggedTaskLeash, 1f, 1f) + setPosition( + draggedTaskLeash, + animBounds.left.toFloat(), + animBounds.top.toFloat() + ) + setWindowCrop( + draggedTaskLeash, + animBounds.width(), + animBounds.height() + ) + } + state.windowDecoration.updateResizeVeil(tx, animBounds) + } + addListener(object : AnimatorListenerAdapter() { + override fun onAnimationEnd(animation: Animator) { + state.windowDecoration.hideResizeVeil() + startTransitionFinishCb.onTransitionFinished(null /* null */) + clearState() + } + }) + start() + } + } else if (isCancelTransition) { + info.changes.forEach { change -> + t.show(change.leash) + startTransactionFinishT.show(change.leash) + } + t.apply() + finishCallback.onTransitionFinished(null /* wct */) + startTransitionFinishCb.onTransitionFinished(null /* wct */) + clearState() + } + } + + override fun handleRequest( + transition: IBinder, + request: TransitionRequestInfo + ): WindowContainerTransaction? { + // Only handle transitions started from shell. + return null + } + + private fun isHomeChange(change: Change): Boolean { + return change.taskInfo?.activityType == ACTIVITY_TYPE_HOME + } + + private fun startCancelAnimation() { + val state = requireTransitionState() + val dragToDesktopAnimator = state.dragAnimator + + val draggedTaskChange = state.draggedTaskChange + ?: throw IllegalStateException("Expected non-null task change") + val sc = draggedTaskChange.leash + // TODO(b/301106941): Don't end the animation and start one to scale it back, merge them + // instead. + // End the animation that shrinks the window when task is first dragged from fullscreen + dragToDesktopAnimator.endAnimator() + // Then animate the scaled window back to its original bounds. + val x: Float = dragToDesktopAnimator.position.x + val y: Float = dragToDesktopAnimator.position.y + val targetX = draggedTaskChange.endAbsBounds.left + val targetY = draggedTaskChange.endAbsBounds.top + val dx = targetX - x + val dy = targetY - y + val tx: SurfaceControl.Transaction = transactionSupplier.get() + ValueAnimator.ofFloat(DRAG_FREEFORM_SCALE, 1f) + .setDuration(DRAG_TO_DESKTOP_FINISH_ANIM_DURATION_MS) + .apply { + addUpdateListener { animator -> + val scale = animator.animatedValue as Float + val fraction = animator.animatedFraction + val animX = x + (dx * fraction) + val animY = y + (dy * fraction) + tx.apply { + setPosition(sc, animX, animY) + setScale(sc, scale, scale) + show(sc) + apply() + } + } + addListener(object : AnimatorListenerAdapter() { + override fun onAnimationEnd(animation: Animator) { + dragToDesktopStateListener?.onCancelToDesktopAnimationEnd(tx) + // Start the cancel transition to restore order. + startCancelDragToDesktopTransition() + } + }) + start() + } + } + + private fun startCancelDragToDesktopTransition() { + val state = requireTransitionState() + val wct = WindowContainerTransaction() + when (state) { + is TransitionState.FromFullscreen -> { + val wc = state.draggedTaskChange?.container + ?: error("Dragged task should be non-null before cancelling") + wct.reorder(wc, true /* toTop */) + } + is TransitionState.FromSplit -> { + val wc = state.splitRootChange?.container + ?: error("Split root should be non-null before cancelling") + wct.reorder(wc, true /* toTop */) + } + } + val homeWc = state.homeToken ?: error("Home task should be non-null before cancelling") + wct.restoreTransientOrder(homeWc) + + state.cancelTransitionToken = transitions.startTransition( + TRANSIT_DESKTOP_MODE_CANCEL_DRAG_TO_DESKTOP, wct, this) + } + + private fun clearState() { + transitionState = null + } + + private fun isSplitTask(taskId: Int): Boolean { + return splitScreenController?.isTaskInSplitScreen(taskId) ?: false + } + + private fun requireTransitionState(): TransitionState { + return transitionState ?: error("Expected non-null transition state") + } + + interface DragToDesktopStateListener { + fun onCommitToDesktopAnimationStart(tx: SurfaceControl.Transaction) + fun onCancelToDesktopAnimationEnd(tx: SurfaceControl.Transaction) + } + + sealed class TransitionState { + abstract val draggedTaskId: Int + abstract val dragAnimator: MoveToDesktopAnimator + abstract val windowDecoration: DesktopModeWindowDecoration + abstract val startTransitionToken: IBinder + abstract var startTransitionFinishCb: Transitions.TransitionFinishCallback? + abstract var startTransitionFinishTransaction: SurfaceControl.Transaction? + abstract var cancelTransitionToken: IBinder? + abstract var homeToken: WindowContainerToken? + abstract var draggedTaskChange: Change? + abstract var cancelled: Boolean + + data class FromFullscreen( + override val draggedTaskId: Int, + override val dragAnimator: MoveToDesktopAnimator, + override val windowDecoration: DesktopModeWindowDecoration, + override val startTransitionToken: IBinder, + override var startTransitionFinishCb: Transitions.TransitionFinishCallback? = null, + override var startTransitionFinishTransaction: SurfaceControl.Transaction? = null, + override var cancelTransitionToken: IBinder? = null, + override var homeToken: WindowContainerToken? = null, + override var draggedTaskChange: Change? = null, + override var cancelled: Boolean = false, + ) : TransitionState() + data class FromSplit( + override val draggedTaskId: Int, + override val dragAnimator: MoveToDesktopAnimator, + override val windowDecoration: DesktopModeWindowDecoration, + override val startTransitionToken: IBinder, + override var startTransitionFinishCb: Transitions.TransitionFinishCallback? = null, + override var startTransitionFinishTransaction: SurfaceControl.Transaction? = null, + override var cancelTransitionToken: IBinder? = null, + override var homeToken: WindowContainerToken? = null, + override var draggedTaskChange: Change? = null, + override var cancelled: Boolean = false, + var splitRootChange: Change? = null, + ) : TransitionState() + } + + companion object { + /** The duration of the animation to commit or cancel the drag-to-desktop gesture. */ + private const val DRAG_TO_DESKTOP_FINISH_ANIM_DURATION_MS = 336L + } +} diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/EnterDesktopTaskTransitionHandler.java b/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/EnterDesktopTaskTransitionHandler.java index 024465b281b8..605600f54823 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/EnterDesktopTaskTransitionHandler.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/EnterDesktopTaskTransitionHandler.java @@ -18,12 +18,13 @@ package com.android.wm.shell.desktopmode; import static android.app.WindowConfiguration.WINDOWING_MODE_FREEFORM; +import static com.android.wm.shell.transition.Transitions.TRANSIT_MOVE_TO_DESKTOP; + import android.animation.Animator; import android.animation.AnimatorListenerAdapter; import android.animation.RectEvaluator; import android.animation.ValueAnimator; import android.app.ActivityManager; -import android.graphics.PointF; import android.graphics.Rect; import android.os.IBinder; import android.util.Slog; @@ -38,11 +39,9 @@ import androidx.annotation.Nullable; import com.android.wm.shell.transition.Transitions; import com.android.wm.shell.windowdecor.DesktopModeWindowDecoration; -import com.android.wm.shell.windowdecor.MoveToDesktopAnimator; import java.util.ArrayList; import java.util.List; -import java.util.function.Consumer; import java.util.function.Supplier; /** @@ -60,8 +59,6 @@ public class EnterDesktopTaskTransitionHandler implements Transitions.Transition public static final int FREEFORM_ANIMATION_DURATION = 336; private final List<IBinder> mPendingTransitionTokens = new ArrayList<>(); - private Consumer<SurfaceControl.Transaction> mOnAnimationFinishedCallback; - private MoveToDesktopAnimator mMoveToDesktopAnimator; private DesktopModeWindowDecoration mDesktopModeWindowDecoration; public EnterDesktopTaskTransitionHandler( @@ -77,61 +74,6 @@ public class EnterDesktopTaskTransitionHandler implements Transitions.Transition } /** - * Starts Transition of a given type - * @param type Transition type - * @param wct WindowContainerTransaction for transition - * @param onAnimationEndCallback to be called after animation - */ - private void startTransition(@WindowManager.TransitionType int type, - @NonNull WindowContainerTransaction wct, - Consumer<SurfaceControl.Transaction> onAnimationEndCallback) { - mOnAnimationFinishedCallback = onAnimationEndCallback; - final IBinder token = mTransitions.startTransition(type, wct, this); - mPendingTransitionTokens.add(token); - } - - /** - * Starts Transition of type TRANSIT_START_DRAG_TO_DESKTOP_MODE - * @param wct WindowContainerTransaction for transition - * @param moveToDesktopAnimator Animator that shrinks and positions task during two part move - * to desktop animation - * @param onAnimationEndCallback to be called after animation - */ - public void startMoveToDesktop(@NonNull WindowContainerTransaction wct, - @NonNull MoveToDesktopAnimator moveToDesktopAnimator, - Consumer<SurfaceControl.Transaction> onAnimationEndCallback) { - mMoveToDesktopAnimator = moveToDesktopAnimator; - startTransition(Transitions.TRANSIT_START_DRAG_TO_DESKTOP_MODE, wct, - onAnimationEndCallback); - } - - /** - * Starts Transition of type TRANSIT_FINALIZE_DRAG_TO_DESKTOP_MODE - * @param wct WindowContainerTransaction for transition - * @param onAnimationEndCallback to be called after animation - */ - public void finalizeMoveToDesktop(@NonNull WindowContainerTransaction wct, - Consumer<SurfaceControl.Transaction> onAnimationEndCallback) { - startTransition(Transitions.TRANSIT_FINALIZE_DRAG_TO_DESKTOP_MODE, wct, - onAnimationEndCallback); - } - - /** - * Starts Transition of type TRANSIT_CANCEL_ENTERING_DESKTOP_MODE - * @param wct WindowContainerTransaction for transition - * @param moveToDesktopAnimator Animator that shrinks and positions task during two part move - * to desktop animation - * @param onAnimationEndCallback to be called after animation - */ - public void startCancelMoveToDesktopMode(@NonNull WindowContainerTransaction wct, - MoveToDesktopAnimator moveToDesktopAnimator, - Consumer<SurfaceControl.Transaction> onAnimationEndCallback) { - mMoveToDesktopAnimator = moveToDesktopAnimator; - startTransition(Transitions.TRANSIT_CANCEL_DRAG_TO_DESKTOP_MODE, wct, - onAnimationEndCallback); - } - - /** * Starts Transition of type TRANSIT_MOVE_TO_DESKTOP * @param wct WindowContainerTransaction for transition * @param decor {@link DesktopModeWindowDecoration} of task being animated @@ -139,8 +81,8 @@ public class EnterDesktopTaskTransitionHandler implements Transitions.Transition public void moveToDesktop(@NonNull WindowContainerTransaction wct, DesktopModeWindowDecoration decor) { mDesktopModeWindowDecoration = decor; - startTransition(Transitions.TRANSIT_MOVE_TO_DESKTOP, wct, - null /* onAnimationEndCallback */); + final IBinder token = mTransitions.startTransition(TRANSIT_MOVE_TO_DESKTOP, wct, this); + mPendingTransitionTokens.add(token); } @Override @@ -182,30 +124,11 @@ public class EnterDesktopTaskTransitionHandler implements Transitions.Transition } final ActivityManager.RunningTaskInfo taskInfo = change.getTaskInfo(); - if (type == Transitions.TRANSIT_MOVE_TO_DESKTOP + if (type == TRANSIT_MOVE_TO_DESKTOP && taskInfo.getWindowingMode() == WINDOWING_MODE_FREEFORM) { return animateMoveToDesktop(change, startT, finishCallback); } - if (type == Transitions.TRANSIT_START_DRAG_TO_DESKTOP_MODE - && taskInfo.getWindowingMode() == WINDOWING_MODE_FREEFORM) { - return animateStartDragToDesktopMode(change, startT, finishT, finishCallback); - } - - final Rect endBounds = change.getEndAbsBounds(); - if (type == Transitions.TRANSIT_FINALIZE_DRAG_TO_DESKTOP_MODE - && taskInfo.getWindowingMode() == WINDOWING_MODE_FREEFORM - && !endBounds.isEmpty()) { - return animateFinalizeDragToDesktopMode(change, startT, finishT, finishCallback, - endBounds); - } - - if (type == Transitions.TRANSIT_CANCEL_DRAG_TO_DESKTOP_MODE - && taskInfo.getWindowingMode() == WINDOWING_MODE_FREEFORM) { - return animateCancelDragToDesktopMode(change, startT, finishT, finishCallback, - endBounds); - } - return false; } @@ -248,142 +171,6 @@ public class EnterDesktopTaskTransitionHandler implements Transitions.Transition return true; } - private boolean animateStartDragToDesktopMode( - @NonNull TransitionInfo.Change change, - @NonNull SurfaceControl.Transaction startT, - @NonNull SurfaceControl.Transaction finishT, - @NonNull Transitions.TransitionFinishCallback finishCallback) { - // Transitioning to freeform but keeping fullscreen bounds, so the crop is set - // to null and we don't require an animation - final SurfaceControl sc = change.getLeash(); - startT.setWindowCrop(sc, null); - - if (mMoveToDesktopAnimator == null - || mMoveToDesktopAnimator.getTaskId() != change.getTaskInfo().taskId) { - Slog.e(TAG, "No animator available for this transition"); - return false; - } - - // Calculate and set position of the task - final PointF position = mMoveToDesktopAnimator.getPosition(); - startT.setPosition(sc, position.x, position.y); - finishT.setPosition(sc, position.x, position.y); - - startT.apply(); - - mTransitions.getMainExecutor().execute(() -> finishCallback.onTransitionFinished(null)); - - return true; - } - - private boolean animateFinalizeDragToDesktopMode( - @NonNull TransitionInfo.Change change, - @NonNull SurfaceControl.Transaction startT, - @NonNull SurfaceControl.Transaction finishT, - @NonNull Transitions.TransitionFinishCallback finishCallback, - @NonNull Rect endBounds) { - // This Transition animates a task to freeform bounds after being dragged into freeform - // mode and brings the remaining freeform tasks to front - final SurfaceControl sc = change.getLeash(); - startT.setWindowCrop(sc, endBounds.width(), - endBounds.height()); - startT.apply(); - - // End the animation that shrinks the window when task is first dragged from fullscreen - if (mMoveToDesktopAnimator != null) { - mMoveToDesktopAnimator.endAnimator(); - } - - // We want to find the scale of the current bounds relative to the end bounds. The - // task is currently scaled to DRAG_FREEFORM_SCALE and the final bounds will be - // scaled to FINAL_FREEFORM_SCALE. So, it is scaled to - // DRAG_FREEFORM_SCALE / FINAL_FREEFORM_SCALE relative to the freeform bounds - final ValueAnimator animator = - ValueAnimator.ofFloat( - MoveToDesktopAnimator.DRAG_FREEFORM_SCALE / FINAL_FREEFORM_SCALE, 1f); - animator.setDuration(FREEFORM_ANIMATION_DURATION); - final SurfaceControl.Transaction t = mTransactionSupplier.get(); - animator.addUpdateListener(animation -> { - final float animationValue = (float) animation.getAnimatedValue(); - t.setScale(sc, animationValue, animationValue); - - final float animationWidth = endBounds.width() * animationValue; - final float animationHeight = endBounds.height() * animationValue; - final int animationX = endBounds.centerX() - (int) (animationWidth / 2); - final int animationY = endBounds.centerY() - (int) (animationHeight / 2); - - t.setPosition(sc, animationX, animationY); - t.apply(); - }); - - animator.addListener(new AnimatorListenerAdapter() { - @Override - public void onAnimationEnd(Animator animation) { - if (mOnAnimationFinishedCallback != null) { - mOnAnimationFinishedCallback.accept(finishT); - } - mTransitions.getMainExecutor().execute( - () -> finishCallback.onTransitionFinished(null)); - } - }); - - animator.start(); - return true; - } - private boolean animateCancelDragToDesktopMode( - @NonNull TransitionInfo.Change change, - @NonNull SurfaceControl.Transaction startT, - @NonNull SurfaceControl.Transaction finishT, - @NonNull Transitions.TransitionFinishCallback finishCallback, - @NonNull Rect endBounds) { - // This Transition animates a task to fullscreen after being dragged from the status - // bar and then released back into the status bar area - final SurfaceControl sc = change.getLeash(); - // Hide the first (fullscreen) frame because the animation will start from the smaller - // scale size. - startT.hide(sc) - .setWindowCrop(sc, endBounds.width(), endBounds.height()) - .apply(); - - if (mMoveToDesktopAnimator == null - || mMoveToDesktopAnimator.getTaskId() != change.getTaskInfo().taskId) { - Slog.e(TAG, "No animator available for this transition"); - return false; - } - - // End the animation that shrinks the window when task is first dragged from fullscreen - mMoveToDesktopAnimator.endAnimator(); - - final ValueAnimator animator = new ValueAnimator(); - animator.setFloatValues(MoveToDesktopAnimator.DRAG_FREEFORM_SCALE, 1f); - animator.setDuration(FREEFORM_ANIMATION_DURATION); - final SurfaceControl.Transaction t = mTransactionSupplier.get(); - - // Get position of the task - final float x = mMoveToDesktopAnimator.getPosition().x; - final float y = mMoveToDesktopAnimator.getPosition().y; - - animator.addUpdateListener(animation -> { - final float scale = (float) animation.getAnimatedValue(); - t.setPosition(sc, x * (1 - scale), y * (1 - scale)) - .setScale(sc, scale, scale) - .show(sc) - .apply(); - }); - animator.addListener(new AnimatorListenerAdapter() { - @Override - public void onAnimationEnd(Animator animation) { - if (mOnAnimationFinishedCallback != null) { - mOnAnimationFinishedCallback.accept(finishT); - } - mTransitions.getMainExecutor().execute( - () -> finishCallback.onTransitionFinished(null)); - } - }); - animator.start(); - return true; - } - @Nullable @Override public WindowContainerTransaction handleRequest(@NonNull IBinder transition, diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipMenuView.java b/libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipMenuView.java index fc34772f2fce..63cef9e41f98 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipMenuView.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipMenuView.java @@ -107,7 +107,7 @@ public class PipMenuView extends FrameLayout { private static final int POST_INTERACTION_DISMISS_DELAY = 2000; private static final long MENU_SHOW_ON_EXPAND_START_DELAY = 30; - private static final float MENU_BACKGROUND_ALPHA = 0.3f; + private static final float MENU_BACKGROUND_ALPHA = 0.54f; private static final float DISABLED_ACTION_ALPHA = 0.54f; private int mMenuState; diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/TaskSnapshotWindow.java b/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/TaskSnapshotWindow.java index c2f15f6cba75..e6418f35a0b1 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/TaskSnapshotWindow.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/TaskSnapshotWindow.java @@ -182,7 +182,7 @@ public class TaskSnapshotWindow { try { ProtoLog.v(ShellProtoLogGroup.WM_SHELL_STARTING_WINDOW, "Removing taskSnapshot surface, mHasDrawn=%b", mHasDrawn); - mSession.remove(mWindow); + mSession.remove(mWindow.asBinder()); } catch (RemoteException e) { // nothing } diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/transition/DefaultTransitionHandler.java b/libs/WindowManager/Shell/src/com/android/wm/shell/transition/DefaultTransitionHandler.java index 723a4a7ca664..193a4fb5b503 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/transition/DefaultTransitionHandler.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/transition/DefaultTransitionHandler.java @@ -60,6 +60,7 @@ import static com.android.internal.policy.TransitionAnimation.WALLPAPER_TRANSITI import static com.android.internal.policy.TransitionAnimation.WALLPAPER_TRANSITION_OPEN; import static com.android.wm.shell.transition.TransitionAnimationHelper.edgeExtendWindow; import static com.android.wm.shell.transition.TransitionAnimationHelper.getTransitionBackgroundColorIfSet; +import static com.android.wm.shell.transition.TransitionAnimationHelper.getTransitionTypeFromInfo; import static com.android.wm.shell.transition.TransitionAnimationHelper.loadAttributeAnimation; import android.animation.Animator; @@ -424,7 +425,8 @@ public class DefaultTransitionHandler implements Transitions.TransitionHandler { // Don't animate anything that isn't independent. if (!TransitionInfo.isIndependent(change, info)) continue; - Animation a = loadAnimation(info, change, wallpaperTransit, isDreamTransition); + final int type = getTransitionTypeFromInfo(info); + Animation a = loadAnimation(type, info, change, wallpaperTransit, isDreamTransition); if (a != null) { if (isTask) { final boolean isTranslucent = (change.getFlags() & FLAG_TRANSLUCENT) != 0; @@ -660,12 +662,11 @@ public class DefaultTransitionHandler implements Transitions.TransitionHandler { } @Nullable - private Animation loadAnimation(@NonNull TransitionInfo info, - @NonNull TransitionInfo.Change change, int wallpaperTransit, - boolean isDreamTransition) { + private Animation loadAnimation(@WindowManager.TransitionType int type, + @NonNull TransitionInfo info, @NonNull TransitionInfo.Change change, + int wallpaperTransit, boolean isDreamTransition) { Animation a; - final int type = info.getType(); final int flags = info.getFlags(); final int changeMode = change.getMode(); final int changeFlags = change.getFlags(); @@ -721,7 +722,7 @@ public class DefaultTransitionHandler implements Transitions.TransitionHandler { return null; } else { a = loadAttributeAnimation( - info, change, wallpaperTransit, mTransitionAnimation, isDreamTransition); + type, info, change, wallpaperTransit, mTransitionAnimation, isDreamTransition); } if (a != null) { diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/transition/TransitionAnimationHelper.java b/libs/WindowManager/Shell/src/com/android/wm/shell/transition/TransitionAnimationHelper.java index d07d2b7b6db9..b012d359931a 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/transition/TransitionAnimationHelper.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/transition/TransitionAnimationHelper.java @@ -24,6 +24,7 @@ import static android.view.WindowManager.TRANSIT_TO_BACK; import static android.view.WindowManager.TRANSIT_TO_FRONT; import static android.view.WindowManager.transitTypeToString; import static android.window.TransitionInfo.FLAGS_IS_NON_APP_WINDOW; +import static android.window.TransitionInfo.FLAG_IS_DISPLAY; import static android.window.TransitionInfo.FLAG_STARTING_WINDOW_TRANSFER_RECIPIENT; import static android.window.TransitionInfo.FLAG_TRANSLUCENT; @@ -45,6 +46,7 @@ import android.graphics.Rect; import android.graphics.Shader; import android.view.Surface; import android.view.SurfaceControl; +import android.view.WindowManager; import android.view.animation.Animation; import android.view.animation.Transformation; import android.window.ScreenCapture; @@ -61,10 +63,10 @@ public class TransitionAnimationHelper { /** Loads the animation that is defined through attribute id for the given transition. */ @Nullable - public static Animation loadAttributeAnimation(@NonNull TransitionInfo info, + public static Animation loadAttributeAnimation(@WindowManager.TransitionType int type, + @NonNull TransitionInfo info, @NonNull TransitionInfo.Change change, int wallpaperTransit, @NonNull TransitionAnimation transitionAnimation, boolean isDreamTransition) { - final int type = info.getType(); final int changeMode = change.getMode(); final int changeFlags = change.getFlags(); final boolean enter = TransitionUtil.isOpeningType(changeMode); @@ -186,6 +188,38 @@ public class TransitionAnimationHelper { return options.getCustomActivityTransition(isOpen); } + /** + * Gets the final transition type from {@link TransitionInfo} for determining the animation. + */ + public static int getTransitionTypeFromInfo(@NonNull TransitionInfo info) { + final int type = info.getType(); + // If the info transition type is opening transition, iterate its changes to see if it + // has any opening change, if none, returns TRANSIT_CLOSE type for closing animation. + if (type == TRANSIT_OPEN) { + boolean hasOpenTransit = false; + for (TransitionInfo.Change change : info.getChanges()) { + if ((change.getTaskInfo() != null || change.hasFlags(FLAG_IS_DISPLAY)) + && !TransitionUtil.isOrderOnly(change)) { + // This isn't an activity-level transition. + return type; + } + if (change.getTaskInfo() != null + && change.hasFlags(FLAG_IS_DISPLAY | FLAGS_IS_NON_APP_WINDOW)) { + // Ignore non-activity containers. + continue; + } + if (change.getMode() == TRANSIT_OPEN) { + hasOpenTransit = true; + break; + } + } + if (!hasOpenTransit) { + return TRANSIT_CLOSE; + } + } + return type; + } + static Animation loadCustomActivityTransition( @NonNull TransitionInfo.AnimationOptions.CustomActivityTransition transitionAnim, TransitionInfo.AnimationOptions options, boolean enter, diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/transition/Transitions.java b/libs/WindowManager/Shell/src/com/android/wm/shell/transition/Transitions.java index ab5c0636f2b5..41ec33c9c762 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/transition/Transitions.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/transition/Transitions.java @@ -150,19 +150,19 @@ public class Transitions implements RemoteCallable<Transitions>, /** Transition type for maximize to freeform transition. */ public static final int TRANSIT_RESTORE_FROM_MAXIMIZE = WindowManager.TRANSIT_FIRST_CUSTOM + 9; - /** Transition type for starting the move to desktop mode. */ - public static final int TRANSIT_START_DRAG_TO_DESKTOP_MODE = + /** Transition type for starting the drag to desktop mode. */ + public static final int TRANSIT_DESKTOP_MODE_START_DRAG_TO_DESKTOP = WindowManager.TRANSIT_FIRST_CUSTOM + 10; - /** Transition type for finalizing the move to desktop mode. */ - public static final int TRANSIT_FINALIZE_DRAG_TO_DESKTOP_MODE = + /** Transition type for finalizing the drag to desktop mode. */ + public static final int TRANSIT_DESKTOP_MODE_END_DRAG_TO_DESKTOP = WindowManager.TRANSIT_FIRST_CUSTOM + 11; /** Transition type to fullscreen from desktop mode. */ public static final int TRANSIT_EXIT_DESKTOP_MODE = WindowManager.TRANSIT_FIRST_CUSTOM + 12; - /** Transition type to animate back to fullscreen when drag to freeform is cancelled. */ - public static final int TRANSIT_CANCEL_DRAG_TO_DESKTOP_MODE = + /** Transition type to cancel the drag to desktop mode. */ + public static final int TRANSIT_DESKTOP_MODE_CANCEL_DRAG_TO_DESKTOP = WindowManager.TRANSIT_FIRST_CUSTOM + 13; /** Transition type to animate the toggle resize between the max and default desktop sizes. */ diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/CaptionWindowDecoration.java b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/CaptionWindowDecoration.java index aff35a347183..c12ac8b3772e 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/CaptionWindowDecoration.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/CaptionWindowDecoration.java @@ -149,7 +149,8 @@ public class CaptionWindowDecoration extends WindowDecoration<WindowDecorLinearL mDecorationContainerSurface, mDragPositioningCallback, mSurfaceControlBuilderSupplier, - mSurfaceControlTransactionSupplier); + mSurfaceControlTransactionSupplier, + mDisplayController); } final int touchSlop = ViewConfiguration.get(mResult.mRootView.getContext()) 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 e206039aa6bf..3add6f4175bc 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 @@ -268,13 +268,19 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel { @NonNull TransitionInfo info, @NonNull TransitionInfo.Change change) { if (change.getMode() == WindowManager.TRANSIT_CHANGE - && (info.getType() == Transitions.TRANSIT_FINALIZE_DRAG_TO_DESKTOP_MODE - || info.getType() == Transitions.TRANSIT_CANCEL_DRAG_TO_DESKTOP_MODE - || info.getType() == Transitions.TRANSIT_EXIT_DESKTOP_MODE + && (info.getType() == Transitions.TRANSIT_EXIT_DESKTOP_MODE || info.getType() == Transitions.TRANSIT_DESKTOP_MODE_TOGGLE_RESIZE || info.getType() == Transitions.TRANSIT_MOVE_TO_DESKTOP)) { mWindowDecorByTaskId.get(change.getTaskInfo().taskId) .addTransitionPausingRelayout(transition); + } else if (change.getMode() == WindowManager.TRANSIT_TO_BACK + && info.getType() == Transitions.TRANSIT_DESKTOP_MODE_START_DRAG_TO_DESKTOP + && change.getTaskInfo() != null) { + final DesktopModeWindowDecoration decor = + mWindowDecorByTaskId.get(change.getTaskInfo().taskId); + if (decor != null) { + decor.addTransitionPausingRelayout(transition); + } } } @@ -765,10 +771,8 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel { mMoveToDesktopAnimator = null; return; } else if (mMoveToDesktopAnimator != null) { - relevantDecor.incrementRelayoutBlock(); mDesktopTasksController.ifPresent( - c -> c.cancelMoveToDesktop(relevantDecor.mTaskInfo, - mMoveToDesktopAnimator)); + c -> c.cancelDragToDesktop(relevantDecor.mTaskInfo)); mMoveToDesktopAnimator = null; return; } @@ -790,15 +794,24 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel { relevantDecor.mTaskInfo.displayId); if (ev.getY() > statusBarHeight) { if (mMoveToDesktopAnimator == null) { - closeOtherSplitTask(relevantDecor.mTaskInfo.taskId); mMoveToDesktopAnimator = new MoveToDesktopAnimator( - mDragToDesktopAnimationStartBounds, relevantDecor.mTaskInfo, - relevantDecor.mTaskSurface); + mContext, mDragToDesktopAnimationStartBounds, + relevantDecor.mTaskInfo, relevantDecor.mTaskSurface); mDesktopTasksController.ifPresent( - c -> c.startMoveToDesktop(relevantDecor.mTaskInfo, - mDragToDesktopAnimationStartBounds, - mMoveToDesktopAnimator)); - mMoveToDesktopAnimator.startAnimation(); + c -> { + final int taskId = relevantDecor.mTaskInfo.taskId; + relevantDecor.incrementRelayoutBlock(); + if (isTaskInSplitScreen(taskId)) { + final DesktopModeWindowDecoration otherDecor = + mWindowDecorByTaskId.get( + getOtherSplitTask(taskId).taskId); + if (otherDecor != null) { + otherDecor.incrementRelayoutBlock(); + } + } + c.startDragToDesktop(relevantDecor.mTaskInfo, + mMoveToDesktopAnimator, relevantDecor); + }); } } if (mMoveToDesktopAnimator != null) { @@ -837,7 +850,6 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel { */ private void animateToDesktop(DesktopModeWindowDecoration relevantDecor, MotionEvent ev) { - relevantDecor.incrementRelayoutBlock(); centerAndMoveToDesktopWithAnimation(relevantDecor, ev); } @@ -853,15 +865,15 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel { final SurfaceControl sc = relevantDecor.mTaskSurface; final Rect endBounds = calculateFreeformBounds(ev.getDisplayId(), DRAG_FREEFORM_SCALE); final Transaction t = mTransactionFactory.get(); - final float diffX = endBounds.centerX() - ev.getX(); - final float diffY = endBounds.top - ev.getY(); - final float startingX = ev.getX() - DRAG_FREEFORM_SCALE + final float diffX = endBounds.centerX() - ev.getRawX(); + final float diffY = endBounds.top - ev.getRawY(); + final float startingX = ev.getRawX() - DRAG_FREEFORM_SCALE * mDragToDesktopAnimationStartBounds.width() / 2; animator.addUpdateListener(animation -> { final float animatorValue = (float) animation.getAnimatedValue(); final float x = startingX + diffX * animatorValue; - final float y = ev.getY() + diffY * animatorValue; + final float y = ev.getRawY() + diffY * animatorValue; t.setPosition(sc, x, y); t.apply(); }); @@ -869,9 +881,11 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel { @Override public void onAnimationEnd(Animator animation) { mDesktopTasksController.ifPresent( - c -> c.onDragPositioningEndThroughStatusBar( - relevantDecor.mTaskInfo, - calculateFreeformBounds(ev.getDisplayId(), FINAL_FREEFORM_SCALE))); + c -> { + c.onDragPositioningEndThroughStatusBar(relevantDecor.mTaskInfo, + calculateFreeformBounds(ev.getDisplayId(), + FINAL_FREEFORM_SCALE)); + }); } }); animator.start(); diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecoration.java b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecoration.java index eba1a36ef29f..e1d177af2331 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecoration.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecoration.java @@ -293,7 +293,8 @@ public class DesktopModeWindowDecoration extends WindowDecoration<WindowDecorLin mDecorationContainerSurface, mDragPositioningCallback, mSurfaceControlBuilderSupplier, - mSurfaceControlTransactionSupplier); + mSurfaceControlTransactionSupplier, + mDisplayController); } final int touchSlop = ViewConfiguration.get(mResult.mRootView.getContext()) diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DragPositioningCallback.java b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DragPositioningCallback.java index 1669cf4a222c..8ce2d6d6d092 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DragPositioningCallback.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DragPositioningCallback.java @@ -40,8 +40,9 @@ public interface DragPositioningCallback { * {@code 0} to indicate it's a move * @param x x coordinate in window decoration coordinate system where the drag starts * @param y y coordinate in window decoration coordinate system where the drag starts + * @return the starting task bounds */ - void onDragPositioningStart(@CtrlType int ctrlType, float x, float y); + Rect onDragPositioningStart(@CtrlType int ctrlType, float x, float y); /** * Called when the pointer moves during a drag-resize or drag-move. diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DragResizeInputListener.java b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DragResizeInputListener.java index 7c6fb99e9c8b..8cbcde320795 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DragResizeInputListener.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DragResizeInputListener.java @@ -50,6 +50,8 @@ import android.view.ViewConfiguration; import android.view.WindowManagerGlobal; import com.android.internal.view.BaseIWindow; +import com.android.wm.shell.common.DisplayController; +import com.android.wm.shell.common.DisplayLayout; import java.util.function.Supplier; @@ -78,6 +80,7 @@ class DragResizeInputListener implements AutoCloseable { private final SurfaceControl mInputSinkSurface; private final BaseIWindow mFakeSinkWindow; private final InputChannel mSinkInputChannel; + private final DisplayController mDisplayController; private int mTaskWidth; private int mTaskHeight; @@ -92,6 +95,7 @@ class DragResizeInputListener implements AutoCloseable { private int mDragPointerId = -1; private DragDetector mDragDetector; + private final Region mTouchRegion = new Region(); DragResizeInputListener( Context context, @@ -102,7 +106,8 @@ class DragResizeInputListener implements AutoCloseable { SurfaceControl decorationSurface, DragPositioningCallback callback, Supplier<SurfaceControl.Builder> surfaceControlBuilderSupplier, - Supplier<SurfaceControl.Transaction> surfaceControlTransactionSupplier) { + Supplier<SurfaceControl.Transaction> surfaceControlTransactionSupplier, + DisplayController displayController) { mInputManager = context.getSystemService(InputManager.class); mHandler = handler; mChoreographer = choreographer; @@ -110,6 +115,7 @@ class DragResizeInputListener implements AutoCloseable { mDisplayId = displayId; mTaskCornerRadius = taskCornerRadius; mDecorationSurface = decorationSurface; + mDisplayController = displayController; // Use a fake window as the backing surface is a container layer, and we don't want to // create a buffer layer for it, so we can't use ViewRootImpl. mFakeWindow = new BaseIWindow(); @@ -120,7 +126,7 @@ class DragResizeInputListener implements AutoCloseable { mWindowSession.grantInputChannel( mDisplayId, mDecorationSurface, - mFakeWindow, + mFakeWindow.asBinder(), null /* hostInputToken */, FLAG_NOT_FOCUSABLE, PRIVATE_FLAG_TRUSTED_OVERLAY, @@ -155,7 +161,7 @@ class DragResizeInputListener implements AutoCloseable { mWindowSession.grantInputChannel( mDisplayId, mInputSinkSurface, - mFakeSinkWindow, + mFakeSinkWindow.asBinder(), null /* hostInputToken */, FLAG_NOT_FOCUSABLE, 0 /* privateFlags */, @@ -195,34 +201,34 @@ class DragResizeInputListener implements AutoCloseable { mCornerSize = cornerSize; mDragDetector.setTouchSlop(touchSlop); - Region touchRegion = new Region(); + mTouchRegion.setEmpty(); final Rect topInputBounds = new Rect( -mResizeHandleThickness, -mResizeHandleThickness, mTaskWidth + mResizeHandleThickness, 0); - touchRegion.union(topInputBounds); + mTouchRegion.union(topInputBounds); final Rect leftInputBounds = new Rect( -mResizeHandleThickness, 0, 0, mTaskHeight); - touchRegion.union(leftInputBounds); + mTouchRegion.union(leftInputBounds); final Rect rightInputBounds = new Rect( mTaskWidth, 0, mTaskWidth + mResizeHandleThickness, mTaskHeight); - touchRegion.union(rightInputBounds); + mTouchRegion.union(rightInputBounds); final Rect bottomInputBounds = new Rect( -mResizeHandleThickness, mTaskHeight, mTaskWidth + mResizeHandleThickness, mTaskHeight + mResizeHandleThickness); - touchRegion.union(bottomInputBounds); + mTouchRegion.union(bottomInputBounds); // Set up touch areas in each corner. int cornerRadius = mCornerSize / 2; @@ -231,28 +237,28 @@ class DragResizeInputListener implements AutoCloseable { -cornerRadius, cornerRadius, cornerRadius); - touchRegion.union(mLeftTopCornerBounds); + mTouchRegion.union(mLeftTopCornerBounds); mRightTopCornerBounds = new Rect( mTaskWidth - cornerRadius, -cornerRadius, mTaskWidth + cornerRadius, cornerRadius); - touchRegion.union(mRightTopCornerBounds); + mTouchRegion.union(mRightTopCornerBounds); mLeftBottomCornerBounds = new Rect( -cornerRadius, mTaskHeight - cornerRadius, cornerRadius, mTaskHeight + cornerRadius); - touchRegion.union(mLeftBottomCornerBounds); + mTouchRegion.union(mLeftBottomCornerBounds); mRightBottomCornerBounds = new Rect( mTaskWidth - cornerRadius, mTaskHeight - cornerRadius, mTaskWidth + cornerRadius, mTaskHeight + cornerRadius); - touchRegion.union(mRightBottomCornerBounds); + mTouchRegion.union(mRightBottomCornerBounds); try { mWindowSession.updateInputChannel( @@ -262,7 +268,7 @@ class DragResizeInputListener implements AutoCloseable { FLAG_NOT_FOCUSABLE, PRIVATE_FLAG_TRUSTED_OVERLAY, INPUT_FEATURE_SPY, - touchRegion); + mTouchRegion); } catch (RemoteException e) { e.rethrowFromSystemServer(); } @@ -281,19 +287,8 @@ class DragResizeInputListener implements AutoCloseable { // issue. However, were there touchscreen-only a region out of the task bounds, mouse // gestures will become no-op in that region, even though the mouse gestures may appear to // be performed on the input window behind the resize handle. - touchRegion.op(0, 0, mTaskWidth, mTaskHeight, Region.Op.DIFFERENCE); - try { - mWindowSession.updateInputChannel( - mSinkInputChannel.getToken(), - mDisplayId, - mInputSinkSurface, - FLAG_NOT_FOCUSABLE, - 0 /* privateFlags */, - INPUT_FEATURE_NO_INPUT_CHANNEL, - touchRegion); - } catch (RemoteException e) { - e.rethrowFromSystemServer(); - } + mTouchRegion.op(0, 0, mTaskWidth, mTaskHeight, Region.Op.DIFFERENCE); + updateSinkInputChannel(mTouchRegion); return true; } @@ -309,19 +304,34 @@ class DragResizeInputListener implements AutoCloseable { return region; } + private void updateSinkInputChannel(Region region) { + try { + mWindowSession.updateInputChannel( + mSinkInputChannel.getToken(), + mDisplayId, + mInputSinkSurface, + FLAG_NOT_FOCUSABLE, + 0 /* privateFlags */, + INPUT_FEATURE_NO_INPUT_CHANNEL, + region); + } catch (RemoteException ex) { + ex.rethrowFromSystemServer(); + } + } + @Override public void close() { mInputEventReceiver.dispose(); mInputChannel.dispose(); try { - mWindowSession.remove(mFakeWindow); + mWindowSession.remove(mFakeWindow.asBinder()); } catch (RemoteException e) { e.rethrowFromSystemServer(); } mSinkInputChannel.dispose(); try { - mWindowSession.remove(mFakeSinkWindow); + mWindowSession.remove(mFakeSinkWindow.asBinder()); } catch (RemoteException e) { e.rethrowFromSystemServer(); } @@ -337,6 +347,7 @@ class DragResizeInputListener implements AutoCloseable { private boolean mConsumeBatchEventScheduled; private boolean mShouldHandleEvents; private int mLastCursorType = PointerIcon.TYPE_DEFAULT; + private Rect mDragStartTaskBounds; private TaskResizeInputEventReceiver( InputChannel inputChannel, Handler handler, Choreographer choreographer) { @@ -398,12 +409,15 @@ class DragResizeInputListener implements AutoCloseable { } if (mShouldHandleEvents) { mInputManager.pilferPointers(mInputChannel.getToken()); - mDragPointerId = e.getPointerId(0); float rawX = e.getRawX(0); float rawY = e.getRawY(0); int ctrlType = calculateCtrlType(isTouch, x, y); - mCallback.onDragPositioningStart(ctrlType, rawX, rawY); + mDragStartTaskBounds = mCallback.onDragPositioningStart(ctrlType, + rawX, rawY); + // Increase the input sink region to cover the whole screen; this is to + // prevent input and focus from going to other tasks during a drag resize. + updateInputSinkRegionForDrag(mDragStartTaskBounds); result = true; } break; @@ -415,7 +429,8 @@ class DragResizeInputListener implements AutoCloseable { int dragPointerIndex = e.findPointerIndex(mDragPointerId); float rawX = e.getRawX(dragPointerIndex); float rawY = e.getRawY(dragPointerIndex); - mCallback.onDragPositioningMove(rawX, rawY); + final Rect taskBounds = mCallback.onDragPositioningMove(rawX, rawY); + updateInputSinkRegionForDrag(taskBounds); result = true; break; } @@ -423,8 +438,13 @@ class DragResizeInputListener implements AutoCloseable { case MotionEvent.ACTION_CANCEL: { if (mShouldHandleEvents) { int dragPointerIndex = e.findPointerIndex(mDragPointerId); - mCallback.onDragPositioningEnd( + final Rect taskBounds = mCallback.onDragPositioningEnd( e.getRawX(dragPointerIndex), e.getRawY(dragPointerIndex)); + // If taskBounds has changed, setGeometry will be called and update the + // sink region. Otherwise, we should revert it here. + if (taskBounds.equals(mDragStartTaskBounds)) { + updateSinkInputChannel(mTouchRegion); + } } mShouldHandleEvents = false; mDragPointerId = -1; @@ -444,6 +464,18 @@ class DragResizeInputListener implements AutoCloseable { return result; } + private void updateInputSinkRegionForDrag(Rect taskBounds) { + final DisplayLayout layout = mDisplayController.getDisplayLayout(mDisplayId); + final Region dragTouchRegion = new Region(-taskBounds.left, + -taskBounds.top, + -taskBounds.left + layout.width(), + -taskBounds.top + layout.height()); + // Remove the localized task bounds from the touch region. + taskBounds.offsetTo(0, 0); + dragTouchRegion.op(taskBounds, Region.Op.DIFFERENCE); + updateSinkInputChannel(dragTouchRegion); + } + private boolean isInCornerBounds(float xf, float yf) { return calculateCornersCtrlType(xf, yf) != 0; } diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/FluidResizeTaskPositioner.java b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/FluidResizeTaskPositioner.java index dadd264596fb..bf11c8bc4f79 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/FluidResizeTaskPositioner.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/FluidResizeTaskPositioner.java @@ -68,7 +68,7 @@ class FluidResizeTaskPositioner implements DragPositioningCallback { } @Override - public void onDragPositioningStart(int ctrlType, float x, float y) { + public Rect onDragPositioningStart(int ctrlType, float x, float y) { mCtrlType = ctrlType; mTaskBoundsAtDragStart.set( mWindowDecoration.mTaskInfo.configuration.windowConfiguration.getBounds()); @@ -87,6 +87,7 @@ class FluidResizeTaskPositioner implements DragPositioningCallback { mDisplayController.getDisplayLayout(mWindowDecoration.mDisplay.getDisplayId()) .getStableBounds(mStableBounds); } + return mRepositionTaskBounds; } @Override diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/MoveToDesktopAnimator.kt b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/MoveToDesktopAnimator.kt index b2267ddb6ba7..af055230b629 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/MoveToDesktopAnimator.kt +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/MoveToDesktopAnimator.kt @@ -2,10 +2,12 @@ package com.android.wm.shell.windowdecor import android.animation.ValueAnimator import android.app.ActivityManager.RunningTaskInfo +import android.content.Context import android.graphics.PointF import android.graphics.Rect import android.view.MotionEvent import android.view.SurfaceControl +import com.android.internal.policy.ScreenDecorationsUtils /** * Creates an animator to shrink and position task after a user drags a fullscreen task from @@ -14,6 +16,7 @@ import android.view.SurfaceControl * accessed by the EnterDesktopTaskTransitionHandler. */ class MoveToDesktopAnimator @JvmOverloads constructor( + private val context: Context, private val startBounds: Rect, private val taskInfo: RunningTaskInfo, private val taskSurface: SurfaceControl, @@ -33,9 +36,11 @@ class MoveToDesktopAnimator @JvmOverloads constructor( .setDuration(ANIMATION_DURATION.toLong()) .apply { val t = SurfaceControl.Transaction() + val cornerRadius = ScreenDecorationsUtils.getWindowCornerRadius(context) addUpdateListener { animation -> val animatorValue = animation.animatedValue as Float t.setScale(taskSurface, animatorValue, animatorValue) + .setCornerRadius(taskSurface, cornerRadius) .apply() } } @@ -44,19 +49,40 @@ class MoveToDesktopAnimator @JvmOverloads constructor( val position: PointF = PointF(0.0f, 0.0f) /** + * Whether motion events from the drag gesture should affect the dragged surface or not. Used + * to disallow moving the surface's position prematurely since it should not start moving at + * all until the drag-to-desktop transition is ready to animate and the wallpaper/home are + * ready to be revealed behind the dragged/scaled task. + */ + private var allowSurfaceChangesOnMove = false + + /** * Starts the animation that scales the task down. */ fun startAnimation() { + allowSurfaceChangesOnMove = true dragToDesktopAnimator.start() } /** - * Uses the position of the motion event and the current scale of the task as defined by the - * ValueAnimator to update the local position variable and set the task surface's position + * Uses the position of the motion event of the drag-to-desktop gesture to update the dragged + * task's position on screen to follow the touch point. Note that the position change won't + * be applied immediately always, such as near the beginning where it waits until the wallpaper + * or home are visible behind it. Once they're visible the surface will catch-up to the most + * recent touch position. */ fun updatePosition(ev: MotionEvent) { - position.x = ev.x - animatedTaskWidth / 2 - position.y = ev.y + // Using rawX/Y because when dragging a task in split, the local X/Y is relative to the + // split stages, but the split task surface is re-parented to the task display area to + // allow dragging beyond its stage across any region of the display. Because of that, the + // rawX/Y are more true to where the gesture is on screen and where the surface should be + // positioned. + position.x = ev.rawX - animatedTaskWidth / 2 + position.y = ev.rawY + + if (!allowSurfaceChangesOnMove) { + return + } val t = transactionFactory() t.setPosition(taskSurface, position.x, position.y) diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/VeiledResizeTaskPositioner.java b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/VeiledResizeTaskPositioner.java index 852c037baad5..79fec0978a12 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/VeiledResizeTaskPositioner.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/VeiledResizeTaskPositioner.java @@ -85,7 +85,7 @@ public class VeiledResizeTaskPositioner implements DragPositioningCallback, } @Override - public void onDragPositioningStart(int ctrlType, float x, float y) { + public Rect onDragPositioningStart(int ctrlType, float x, float y) { mCtrlType = ctrlType; mTaskBoundsAtDragStart.set( mDesktopWindowDecoration.mTaskInfo.configuration.windowConfiguration.getBounds()); @@ -107,6 +107,7 @@ public class VeiledResizeTaskPositioner implements DragPositioningCallback, mDisplayController.getDisplayLayout(mDesktopWindowDecoration.mDisplay.getDisplayId()) .getStableBounds(mStableBounds); } + return mRepositionTaskBounds; } @Override diff --git a/libs/WindowManager/Shell/tests/flicker/pip/Android.bp b/libs/WindowManager/Shell/tests/flicker/pip/Android.bp index 4d11dfb37c05..386983ce6aae 100644 --- a/libs/WindowManager/Shell/tests/flicker/pip/Android.bp +++ b/libs/WindowManager/Shell/tests/flicker/pip/Android.bp @@ -124,6 +124,10 @@ android_test { ":WMShellFlickerTestsPipCommon-src", ], static_libs: ["WMShellFlickerTestsBase"], + test_suites: [ + "device-tests", + "csuite", + ], } csuite_test { diff --git a/libs/WindowManager/Shell/tests/flicker/pip/csuiteDefaultTemplate.xml b/libs/WindowManager/Shell/tests/flicker/pip/csuiteDefaultTemplate.xml index 6df65391ea61..89ecc29d977b 100644 --- a/libs/WindowManager/Shell/tests/flicker/pip/csuiteDefaultTemplate.xml +++ b/libs/WindowManager/Shell/tests/flicker/pip/csuiteDefaultTemplate.xml @@ -71,9 +71,9 @@ <!-- Enable mocking GPS location by the test app --> <target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer"> <option name="run-command" - value="appops set com.android.wm.shell.flicker.pip.apps android:mock_location allow"/> + value="appops set com.android.shell android:mock_location allow"/> <option name="teardown-command" - value="appops set com.android.wm.shell.flicker.pip.apps android:mock_location deny"/> + value="appops set com.android.shell android:mock_location deny"/> </target_preparer> <!-- Needed for pushing the trace config file --> diff --git a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/apps/AppsEnterPipTransition.kt b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/apps/AppsEnterPipTransition.kt index bd8b0056a6a3..182a9089d040 100644 --- a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/apps/AppsEnterPipTransition.kt +++ b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/apps/AppsEnterPipTransition.kt @@ -31,10 +31,18 @@ import org.junit.runners.Parameterized abstract class AppsEnterPipTransition(flicker: LegacyFlickerTest) : EnterPipTransition(flicker) { protected abstract val standardAppHelper: StandardAppHelper + protected abstract val permissions: Array<String> + @FlickerBuilderProvider override fun buildFlicker(): FlickerBuilder { return FlickerBuilder(instrumentation).apply { - withoutScreenRecorder() + instrumentation.uiAutomation.adoptShellPermissionIdentity() + for (permission in permissions) { + instrumentation.uiAutomation.grantRuntimePermission( + standardAppHelper.packageName, + permission + ) + } setup { flicker.scenario.setIsTablet(tapl.isTablet) } transition() } diff --git a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/apps/MapsEnterPipTest.kt b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/apps/MapsEnterPipTest.kt index 4da52ef1272c..d06cf775ca60 100644 --- a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/apps/MapsEnterPipTest.kt +++ b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/apps/MapsEnterPipTest.kt @@ -16,6 +16,7 @@ package com.android.wm.shell.flicker.pip.apps +import android.Manifest import android.content.Context import android.location.Criteria import android.location.Location @@ -64,6 +65,9 @@ import org.junit.runners.Parameterized open class MapsEnterPipTest(flicker: LegacyFlickerTest) : AppsEnterPipTransition(flicker) { override val standardAppHelper: MapsAppHelper = MapsAppHelper(instrumentation) + override val permissions: Array<String> = arrayOf(Manifest.permission.POST_NOTIFICATIONS, + Manifest.permission.ACCESS_FINE_LOCATION) + val locationManager: LocationManager = instrumentation.context.getSystemService(Context.LOCATION_SERVICE) as LocationManager val mainHandler = Handler(Looper.getMainLooper()) diff --git a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/apps/NetflixEnterPipTest.kt b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/apps/NetflixEnterPipTest.kt index 5498e8c4f970..32f12592135d 100644 --- a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/apps/NetflixEnterPipTest.kt +++ b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/apps/NetflixEnterPipTest.kt @@ -16,6 +16,7 @@ package com.android.wm.shell.flicker.pip.apps +import android.Manifest import android.platform.test.annotations.Postsubmit import android.tools.common.NavBar import android.tools.common.Rotation @@ -62,6 +63,8 @@ import org.junit.runners.Parameterized open class NetflixEnterPipTest(flicker: LegacyFlickerTest) : AppsEnterPipTransition(flicker) { override val standardAppHelper: NetflixAppHelper = NetflixAppHelper(instrumentation) + override val permissions: Array<String> = arrayOf(Manifest.permission.POST_NOTIFICATIONS) + override val defaultEnterPip: FlickerBuilder.() -> Unit = { setup { standardAppHelper.launchViaIntent( diff --git a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/apps/YouTubeEnterPipTest.kt b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/apps/YouTubeEnterPipTest.kt index d8afc25caf71..509b32c11afe 100644 --- a/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/apps/YouTubeEnterPipTest.kt +++ b/libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/apps/YouTubeEnterPipTest.kt @@ -16,6 +16,7 @@ package com.android.wm.shell.flicker.pip.apps +import android.Manifest import android.platform.test.annotations.Postsubmit import android.tools.common.traces.component.ComponentNameMatcher import android.tools.device.apphelpers.YouTubeAppHelper @@ -58,6 +59,8 @@ import org.junit.runners.Parameterized open class YouTubeEnterPipTest(flicker: LegacyFlickerTest) : AppsEnterPipTransition(flicker) { override val standardAppHelper: YouTubeAppHelper = YouTubeAppHelper(instrumentation) + override val permissions: Array<String> = arrayOf(Manifest.permission.POST_NOTIFICATIONS) + override val defaultEnterPip: FlickerBuilder.() -> Unit = { setup { standardAppHelper.launchViaIntent( diff --git a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/desktopmode/DesktopTasksControllerTest.kt b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/desktopmode/DesktopTasksControllerTest.kt index ebcb6407a6fd..fde6acb9bfe5 100644 --- a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/desktopmode/DesktopTasksControllerTest.kt +++ b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/desktopmode/DesktopTasksControllerTest.kt @@ -100,6 +100,7 @@ class DesktopTasksControllerTest : ShellTestCase() { @Mock lateinit var enterDesktopTransitionHandler: EnterDesktopTaskTransitionHandler @Mock lateinit var mToggleResizeDesktopTaskTransitionHandler: ToggleResizeDesktopTaskTransitionHandler + @Mock lateinit var dragToDesktopTransitionHandler: DragToDesktopTransitionHandler @Mock lateinit var launchAdjacentController: LaunchAdjacentController @Mock lateinit var desktopModeWindowDecoration: DesktopModeWindowDecoration @Mock lateinit var splitScreenController: SplitScreenController @@ -127,7 +128,7 @@ class DesktopTasksControllerTest : ShellTestCase() { whenever(transitions.startTransition(anyInt(), any(), isNull())).thenAnswer { Binder() } controller = createController() - controller.splitScreenController = splitScreenController + controller.setSplitScreenController(splitScreenController) shellInit.init() @@ -150,6 +151,7 @@ class DesktopTasksControllerTest : ShellTestCase() { enterDesktopTransitionHandler, exitDesktopTransitionHandler, mToggleResizeDesktopTaskTransitionHandler, + dragToDesktopTransitionHandler, desktopModeTaskRepository, launchAdjacentController, recentsTransitionHandler, @@ -757,6 +759,7 @@ class DesktopTasksControllerTest : ShellTestCase() { private fun setUpSplitScreenTask(displayId: Int = DEFAULT_DISPLAY): RunningTaskInfo { val task = createSplitScreenTask(displayId) + whenever(splitScreenController.isTaskInSplitScreen(task.taskId)).thenReturn(true) whenever(shellTaskOrganizer.getRunningTaskInfo(task.taskId)).thenReturn(task) runningTasks.add(task) return task diff --git a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/desktopmode/DragToDesktopTransitionHandlerTest.kt b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/desktopmode/DragToDesktopTransitionHandlerTest.kt new file mode 100644 index 000000000000..a5629c8f8f15 --- /dev/null +++ b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/desktopmode/DragToDesktopTransitionHandlerTest.kt @@ -0,0 +1,211 @@ +package com.android.wm.shell.desktopmode + +import android.app.ActivityManager.RunningTaskInfo +import android.app.WindowConfiguration.ACTIVITY_TYPE_HOME +import android.app.WindowConfiguration.ACTIVITY_TYPE_STANDARD +import android.app.WindowConfiguration.WINDOWING_MODE_FULLSCREEN +import android.app.WindowConfiguration.WINDOWING_MODE_MULTI_WINDOW +import android.app.WindowConfiguration.WindowingMode +import android.graphics.PointF +import android.os.IBinder +import android.testing.AndroidTestingRunner +import android.testing.TestableLooper.RunWithLooper +import android.view.SurfaceControl +import android.window.TransitionInfo +import android.window.TransitionInfo.FLAG_IS_WALLPAPER +import androidx.test.filters.SmallTest +import com.android.server.testutils.any +import com.android.server.testutils.mock +import com.android.wm.shell.RootTaskDisplayAreaOrganizer +import com.android.wm.shell.ShellTestCase +import com.android.wm.shell.TestRunningTaskInfoBuilder +import com.android.wm.shell.splitscreen.SplitScreenController +import com.android.wm.shell.transition.Transitions +import com.android.wm.shell.transition.Transitions.TRANSIT_DESKTOP_MODE_CANCEL_DRAG_TO_DESKTOP +import com.android.wm.shell.transition.Transitions.TRANSIT_DESKTOP_MODE_START_DRAG_TO_DESKTOP +import com.android.wm.shell.windowdecor.MoveToDesktopAnimator +import java.util.function.Supplier +import org.junit.Before +import org.junit.Test +import org.junit.runner.RunWith +import org.mockito.ArgumentMatchers.eq +import org.mockito.Mock +import org.mockito.kotlin.never +import org.mockito.kotlin.verify +import org.mockito.kotlin.verifyZeroInteractions +import org.mockito.kotlin.whenever + +/** Tests of [DragToDesktopTransitionHandler]. */ +@SmallTest +@RunWithLooper +@RunWith(AndroidTestingRunner::class) +class DragToDesktopTransitionHandlerTest : ShellTestCase() { + + @Mock private lateinit var transitions: Transitions + @Mock private lateinit var taskDisplayAreaOrganizer: RootTaskDisplayAreaOrganizer + @Mock private lateinit var splitScreenController: SplitScreenController + + private val transactionSupplier = Supplier { mock<SurfaceControl.Transaction>() } + + private lateinit var handler: DragToDesktopTransitionHandler + + @Before + fun setUp() { + handler = + DragToDesktopTransitionHandler( + context, + transitions, + taskDisplayAreaOrganizer, + transactionSupplier + ) + .apply { setSplitScreenController(splitScreenController) } + } + + @Test + fun startDragToDesktop_animateDragWhenReady() { + val task = createTask() + val dragAnimator = mock<MoveToDesktopAnimator>() + // Simulate transition is started. + val transition = startDragToDesktopTransition(task, dragAnimator) + + // Now it's ready to animate. + handler.startAnimation( + transition = transition, + info = + createTransitionInfo( + type = TRANSIT_DESKTOP_MODE_START_DRAG_TO_DESKTOP, + draggedTask = task + ), + startTransaction = mock(), + finishTransaction = mock(), + finishCallback = {} + ) + + verify(dragAnimator).startAnimation() + } + + @Test + fun startDragToDesktop_cancelledBeforeReady_startCancelTransition() { + val task = createTask() + val dragAnimator = mock<MoveToDesktopAnimator>() + // Simulate transition is started and is ready to animate. + val transition = startDragToDesktopTransition(task, dragAnimator) + + handler.cancelDragToDesktopTransition() + + handler.startAnimation( + transition = transition, + info = + createTransitionInfo( + type = TRANSIT_DESKTOP_MODE_START_DRAG_TO_DESKTOP, + draggedTask = task + ), + startTransaction = mock(), + finishTransaction = mock(), + finishCallback = {} + ) + + // Don't even animate the "drag" since it was already cancelled. + verify(dragAnimator, never()).startAnimation() + // Instead, start the cancel transition. + verify(transitions) + .startTransition(eq(TRANSIT_DESKTOP_MODE_CANCEL_DRAG_TO_DESKTOP), any(), eq(handler)) + } + + @Test + fun cancelDragToDesktop_startWasReady_cancel() { + val task = createTask() + val dragAnimator = mock<MoveToDesktopAnimator>() + whenever(dragAnimator.position).thenReturn(PointF()) + // Simulate transition is started and is ready to animate. + val transition = startDragToDesktopTransition(task, dragAnimator) + handler.startAnimation( + transition = transition, + info = + createTransitionInfo( + type = TRANSIT_DESKTOP_MODE_START_DRAG_TO_DESKTOP, + draggedTask = task + ), + startTransaction = mock(), + finishTransaction = mock(), + finishCallback = {} + ) + + // Then user cancelled after it had already started. + handler.cancelDragToDesktopTransition() + + // Cancel animation should run since it had already started. + verify(dragAnimator).endAnimator() + } + + @Test + fun cancelDragToDesktop_startWasNotReady_animateCancel() { + val task = createTask() + val dragAnimator = mock<MoveToDesktopAnimator>() + // Simulate transition is started and is ready to animate. + startDragToDesktopTransition(task, dragAnimator) + + // Then user cancelled before the transition was ready and animated. + handler.cancelDragToDesktopTransition() + + // No need to animate the cancel since the start animation couldn't even start. + verifyZeroInteractions(dragAnimator) + } + + private fun startDragToDesktopTransition( + task: RunningTaskInfo, + dragAnimator: MoveToDesktopAnimator + ): IBinder { + val token = mock<IBinder>() + whenever( + transitions.startTransition( + eq(TRANSIT_DESKTOP_MODE_START_DRAG_TO_DESKTOP), + any(), + eq(handler) + ) + ) + .thenReturn(token) + handler.startDragToDesktopTransition(task.taskId, dragAnimator, mock()) + return token + } + + private fun createTask( + @WindowingMode windowingMode: Int = WINDOWING_MODE_FULLSCREEN, + isHome: Boolean = false, + ): RunningTaskInfo { + return TestRunningTaskInfoBuilder() + .setActivityType(if (isHome) ACTIVITY_TYPE_HOME else ACTIVITY_TYPE_STANDARD) + .setWindowingMode(windowingMode) + .build() + .also { + whenever(splitScreenController.isTaskInSplitScreen(it.taskId)) + .thenReturn(windowingMode == WINDOWING_MODE_MULTI_WINDOW) + } + } + + private fun createTransitionInfo(type: Int, draggedTask: RunningTaskInfo): TransitionInfo { + return TransitionInfo(type, 0 /* flags */).apply { + addChange( // Home. + TransitionInfo.Change(mock(), mock()).apply { + parent = null + taskInfo = + TestRunningTaskInfoBuilder().setActivityType(ACTIVITY_TYPE_HOME).build() + flags = flags or FLAG_IS_WALLPAPER + } + ) + addChange( // Dragged Task. + TransitionInfo.Change(mock(), mock()).apply { + parent = null + taskInfo = draggedTask + } + ) + addChange( // Wallpaper. + TransitionInfo.Change(mock(), mock()).apply { + parent = null + taskInfo = null + flags = flags or FLAG_IS_WALLPAPER + } + ) + } + } +} diff --git a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/desktopmode/EnterDesktopTaskTransitionHandlerTest.java b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/desktopmode/EnterDesktopTaskTransitionHandlerTest.java deleted file mode 100644 index 772d97d8eb32..000000000000 --- a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/desktopmode/EnterDesktopTaskTransitionHandlerTest.java +++ /dev/null @@ -1,171 +0,0 @@ -/* - * Copyright (C) 2023 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.android.wm.shell.desktopmode; - -import static android.app.WindowConfiguration.WINDOWING_MODE_FREEFORM; - -import static androidx.test.internal.runner.junit4.statement.UiThreadStatement.runOnUiThread; - -import static org.junit.Assert.assertTrue; -import static org.mockito.Mockito.doReturn; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.verify; - -import android.annotation.NonNull; -import android.app.ActivityManager; -import android.app.WindowConfiguration; -import android.graphics.PointF; -import android.graphics.Rect; -import android.os.IBinder; -import android.view.SurfaceControl; -import android.view.WindowManager; -import android.window.IWindowContainerToken; -import android.window.TransitionInfo; -import android.window.WindowContainerToken; -import android.window.WindowContainerTransaction; - -import androidx.test.filters.SmallTest; - -import com.android.wm.shell.common.ShellExecutor; -import com.android.wm.shell.transition.Transitions; -import com.android.wm.shell.windowdecor.MoveToDesktopAnimator; - -import junit.framework.AssertionFailedError; - -import org.junit.Before; -import org.junit.Test; -import org.mockito.Mock; -import org.mockito.MockitoAnnotations; - -import java.util.function.Supplier; - -/** Tests of {@link com.android.wm.shell.desktopmode.EnterDesktopTaskTransitionHandler} */ -@SmallTest -public class EnterDesktopTaskTransitionHandlerTest { - - @Mock - private Transitions mTransitions; - @Mock - IBinder mToken; - @Mock - Supplier<SurfaceControl.Transaction> mTransactionFactory; - @Mock - SurfaceControl.Transaction mStartT; - @Mock - SurfaceControl.Transaction mFinishT; - @Mock - SurfaceControl.Transaction mAnimationT; - @Mock - Transitions.TransitionFinishCallback mTransitionFinishCallback; - @Mock - ShellExecutor mExecutor; - @Mock - SurfaceControl mSurfaceControl; - @Mock - MoveToDesktopAnimator mMoveToDesktopAnimator; - @Mock - PointF mPosition; - - private EnterDesktopTaskTransitionHandler mEnterDesktopTaskTransitionHandler; - - @Before - public void setUp() { - MockitoAnnotations.initMocks(this); - - doReturn(mExecutor).when(mTransitions).getMainExecutor(); - doReturn(mAnimationT).when(mTransactionFactory).get(); - doReturn(mPosition).when(mMoveToDesktopAnimator).getPosition(); - - mEnterDesktopTaskTransitionHandler = new EnterDesktopTaskTransitionHandler(mTransitions, - mTransactionFactory); - } - - @Test - public void testEnterFreeformAnimation() { - final int taskId = 1; - WindowContainerTransaction wct = new WindowContainerTransaction(); - doReturn(mToken).when(mTransitions) - .startTransition(Transitions.TRANSIT_START_DRAG_TO_DESKTOP_MODE, wct, - mEnterDesktopTaskTransitionHandler); - doReturn(taskId).when(mMoveToDesktopAnimator).getTaskId(); - - mEnterDesktopTaskTransitionHandler.startMoveToDesktop(wct, - mMoveToDesktopAnimator, null); - - TransitionInfo.Change change = - createChange(WindowManager.TRANSIT_CHANGE, taskId, WINDOWING_MODE_FREEFORM); - TransitionInfo info = createTransitionInfo(Transitions.TRANSIT_START_DRAG_TO_DESKTOP_MODE, - change); - - - assertTrue(mEnterDesktopTaskTransitionHandler - .startAnimation(mToken, info, mStartT, mFinishT, mTransitionFinishCallback)); - - verify(mStartT).setWindowCrop(mSurfaceControl, null); - verify(mStartT).apply(); - } - - @Test - public void testTransitEnterDesktopModeAnimation() throws Throwable { - final int transitionType = Transitions.TRANSIT_FINALIZE_DRAG_TO_DESKTOP_MODE; - final int taskId = 1; - WindowContainerTransaction wct = new WindowContainerTransaction(); - doReturn(mToken).when(mTransitions) - .startTransition(transitionType, wct, mEnterDesktopTaskTransitionHandler); - mEnterDesktopTaskTransitionHandler.finalizeMoveToDesktop(wct, null); - - TransitionInfo.Change change = - createChange(WindowManager.TRANSIT_CHANGE, taskId, WINDOWING_MODE_FREEFORM); - change.setEndAbsBounds(new Rect(0, 0, 1, 1)); - TransitionInfo info = createTransitionInfo( - Transitions.TRANSIT_FINALIZE_DRAG_TO_DESKTOP_MODE, change); - - runOnUiThread(() -> { - try { - assertTrue(mEnterDesktopTaskTransitionHandler - .startAnimation(mToken, info, mStartT, mFinishT, - mTransitionFinishCallback)); - } catch (Exception e) { - throw new AssertionFailedError(e.getMessage()); - } - }); - - verify(mStartT).setWindowCrop(mSurfaceControl, change.getEndAbsBounds().width(), - change.getEndAbsBounds().height()); - verify(mStartT).apply(); - } - - private TransitionInfo.Change createChange(@WindowManager.TransitionType int type, int taskId, - @WindowConfiguration.WindowingMode int windowingMode) { - final ActivityManager.RunningTaskInfo taskInfo = new ActivityManager.RunningTaskInfo(); - taskInfo.taskId = taskId; - taskInfo.configuration.windowConfiguration.setWindowingMode(windowingMode); - final TransitionInfo.Change change = new TransitionInfo.Change( - new WindowContainerToken(mock(IWindowContainerToken.class)), mSurfaceControl); - change.setMode(type); - change.setTaskInfo(taskInfo); - return change; - } - - private static TransitionInfo createTransitionInfo( - @WindowManager.TransitionType int type, @NonNull TransitionInfo.Change change) { - TransitionInfo info = new TransitionInfo(type, 0); - info.addChange(change); - return info; - } - -} diff --git a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/transition/ShellTransitionTests.java b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/transition/ShellTransitionTests.java index 4e300d9a7e69..01c9bd0cb9f7 100644 --- a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/transition/ShellTransitionTests.java +++ b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/transition/ShellTransitionTests.java @@ -40,6 +40,8 @@ import static android.window.TransitionInfo.FLAG_SYNC; import static android.window.TransitionInfo.FLAG_TRANSLUCENT; import static com.android.dx.mockito.inline.extended.ExtendedMockito.doReturn; +import static com.android.dx.mockito.inline.extended.ExtendedMockito.spyOn; +import static com.android.wm.shell.transition.TransitionAnimationHelper.getTransitionTypeFromInfo; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; @@ -93,6 +95,8 @@ import androidx.test.ext.junit.runners.AndroidJUnit4; import androidx.test.filters.SmallTest; import androidx.test.platform.app.InstrumentationRegistry; +import com.android.internal.R; +import com.android.internal.policy.TransitionAnimation; import com.android.wm.shell.RootTaskDisplayAreaOrganizer; import com.android.wm.shell.ShellTestCase; import com.android.wm.shell.TestShellExecutor; @@ -1463,6 +1467,43 @@ public class ShellTransitionTests extends ShellTestCase { assertEquals(0, mDefaultHandler.activeCount()); } + @Test + public void testCloseTransitAnimationWhenClosingChangesExists() { + Transitions transitions = createTestTransitions(); + Transitions.TransitionObserver observer = mock(Transitions.TransitionObserver.class); + transitions.registerObserver(observer); + transitions.replaceDefaultHandlerForTest(mDefaultHandler); + final TransitionAnimation transitionAnimation = new TransitionAnimation(mContext, false, + Transitions.TAG); + spyOn(transitionAnimation); + + // Creating a transition by the app hooking the back key event to start the + // previous activity with FLAG_ACTIVITY_CLEAR_TOP | FLAG_ACTIVITY_RESET_TASK_IF_NEEDED + // flags in order to clear the top activity and bring the exist previous activity to front. + // Expects the activity transition should playing the close animation instead the initiated + // open animation made by startActivity. + IBinder transitToken = new Binder(); + transitions.requestStartTransition(transitToken, + new TransitionRequestInfo(TRANSIT_OPEN, null /* trigger */, null /* remote */)); + TransitionInfo info = new TransitionInfoBuilder(TRANSIT_OPEN) + .addChange(TRANSIT_CLOSE).addChange(TRANSIT_TO_FRONT).build(); + transitions.onTransitionReady(transitToken, info, new StubTransaction(), + new StubTransaction()); + + final int type = getTransitionTypeFromInfo(info); + assertEquals(TRANSIT_CLOSE, type); + + TransitionAnimationHelper.loadAttributeAnimation(type, info, info.getChanges().get(0), 0, + transitionAnimation, false); + verify(transitionAnimation).loadDefaultAnimationAttr( + eq(R.styleable.WindowAnimation_activityCloseExitAnimation), anyBoolean()); + + TransitionAnimationHelper.loadAttributeAnimation(type, info, info.getChanges().get(1), 0, + transitionAnimation, false); + verify(transitionAnimation).loadDefaultAnimationAttr( + eq(R.styleable.WindowAnimation_activityCloseEnterAnimation), anyBoolean()); + } + class ChangeBuilder { final TransitionInfo.Change mChange; diff --git a/libs/hwui/SkiaCanvas.cpp b/libs/hwui/SkiaCanvas.cpp index 31fc929dfcdf..008ea3aaa2e7 100644 --- a/libs/hwui/SkiaCanvas.cpp +++ b/libs/hwui/SkiaCanvas.cpp @@ -589,10 +589,40 @@ void SkiaCanvas::drawMesh(const Mesh& mesh, sk_sp<SkBlender> blender, const Pain // Canvas draw operations: Bitmaps // ---------------------------------------------------------------------------- +bool SkiaCanvas::useGainmapShader(Bitmap& bitmap) { + // If the bitmap doesn't have a gainmap, don't use the gainmap shader + if (!bitmap.hasGainmap()) return false; + + // If we don't have an owned canvas, then we're either hardware accelerated or drawing + // to a picture - use the gainmap shader out of caution. Ideally a picture canvas would + // use a drawable here instead to defer making that decision until the last possible + // moment + if (!mCanvasOwned) return true; + + auto info = mCanvasOwned->imageInfo(); + + // If it's an unknown colortype then it's not a bitmap-backed canvas + if (info.colorType() == SkColorType::kUnknown_SkColorType) return true; + + skcms_TransferFunction tfn; + info.colorSpace()->transferFn(&tfn); + + auto transferType = skcms_TransferFunction_getType(&tfn); + switch (transferType) { + case skcms_TFType_HLGish: + case skcms_TFType_HLGinvish: + case skcms_TFType_PQish: + return true; + case skcms_TFType_Invalid: + case skcms_TFType_sRGBish: + return false; + } +} + void SkiaCanvas::drawBitmap(Bitmap& bitmap, float left, float top, const Paint* paint) { auto image = bitmap.makeImage(); - if (bitmap.hasGainmap()) { + if (useGainmapShader(bitmap)) { Paint gainmapPaint = paint ? *paint : Paint(); sk_sp<SkShader> gainmapShader = uirenderer::MakeGainmapShader( image, bitmap.gainmap()->bitmap->makeImage(), bitmap.gainmap()->info, @@ -619,7 +649,7 @@ void SkiaCanvas::drawBitmap(Bitmap& bitmap, float srcLeft, float srcTop, float s SkRect srcRect = SkRect::MakeLTRB(srcLeft, srcTop, srcRight, srcBottom); SkRect dstRect = SkRect::MakeLTRB(dstLeft, dstTop, dstRight, dstBottom); - if (bitmap.hasGainmap()) { + if (useGainmapShader(bitmap)) { Paint gainmapPaint = paint ? *paint : Paint(); sk_sp<SkShader> gainmapShader = uirenderer::MakeGainmapShader( image, bitmap.gainmap()->bitmap->makeImage(), bitmap.gainmap()->info, diff --git a/libs/hwui/SkiaCanvas.h b/libs/hwui/SkiaCanvas.h index ced02241ffe2..4bf1790e2415 100644 --- a/libs/hwui/SkiaCanvas.h +++ b/libs/hwui/SkiaCanvas.h @@ -223,6 +223,8 @@ private: void drawPoints(const float* points, int count, const Paint& paint, SkCanvas::PointMode mode); + bool useGainmapShader(Bitmap& bitmap); + class Clip; std::unique_ptr<SkCanvas> mCanvasOwned; // Might own a canvas we allocated. diff --git a/media/java/android/media/AudioRecord.java b/media/java/android/media/AudioRecord.java index 7faa13c80c62..447d3bbddceb 100644 --- a/media/java/android/media/AudioRecord.java +++ b/media/java/android/media/AudioRecord.java @@ -1176,6 +1176,7 @@ public class AudioRecord implements AudioRouting, MicrophoneDirection, case AudioFormat.ENCODING_PCM_FLOAT: case AudioFormat.ENCODING_PCM_16BIT: case AudioFormat.ENCODING_PCM_8BIT: + case AudioFormat.ENCODING_E_AC3_JOC: mAudioFormat = audioFormat; break; default: @@ -1188,20 +1189,12 @@ public class AudioRecord implements AudioRouting, MicrophoneDirection, // Convenience method for the contructor's audio buffer size check. - // preconditions: - // mChannelCount is valid - // mAudioFormat is AudioFormat.ENCODING_PCM_8BIT, AudioFormat.ENCODING_PCM_16BIT, - // or AudioFormat.ENCODING_PCM_FLOAT // postcondition: // mNativeBufferSizeInBytes is valid (multiple of frame size, positive) private void audioBuffSizeCheck(int audioBufferSize) throws IllegalArgumentException { - // NB: this section is only valid with PCM data. - // To update when supporting compressed formats - int frameSizeInBytes = mChannelCount - * (AudioFormat.getBytesPerSample(mAudioFormat)); - if ((audioBufferSize % frameSizeInBytes != 0) || (audioBufferSize < 1)) { + if ((audioBufferSize % getFormat().getFrameSizeInBytes() != 0) || (audioBufferSize < 1)) { throw new IllegalArgumentException("Invalid audio buffer size " + audioBufferSize - + " (frame size " + frameSizeInBytes + ")"); + + " (frame size " + getFormat().getFrameSizeInBytes() + ")"); } mNativeBufferSizeInBytes = audioBufferSize; diff --git a/media/jni/android_media_tv_Tuner.cpp b/media/jni/android_media_tv_Tuner.cpp index feb914fe3161..757e9f8e41b1 100644 --- a/media/jni/android_media_tv_Tuner.cpp +++ b/media/jni/android_media_tv_Tuner.cpp @@ -630,7 +630,6 @@ void FilterClientCallbackImpl::getMediaEvent(const jobjectArray& arr, const int const DemuxFilterMediaEvent &mediaEvent = event.get<DemuxFilterEvent::Tag::media>(); ScopedLocalRef<jobject> audioDescriptor(env); - gAudioPresentationFields.init(env); ScopedLocalRef presentationsJObj(env, JAudioPresentationInfo::asJobject( env, gAudioPresentationFields)); switch (mediaEvent.extraMetaData.getTag()) { @@ -3731,6 +3730,7 @@ static void android_media_tv_Tuner_native_init(JNIEnv *env) { gFields.linearBlockInitID = env->GetMethodID(linearBlockClazz, "<init>", "()V"); gFields.linearBlockSetInternalStateID = env->GetMethodID(linearBlockClazz, "setInternalStateLocked", "(JZ)V"); + gAudioPresentationFields.init(env); } static void android_media_tv_Tuner_native_setup(JNIEnv *env, jobject thiz) { diff --git a/native/android/TEST_MAPPING b/native/android/TEST_MAPPING index fd394fc43477..7c710982e4f6 100644 --- a/native/android/TEST_MAPPING +++ b/native/android/TEST_MAPPING @@ -22,5 +22,15 @@ ], "file_patterns": ["performance_hint.cpp"] } + ], + "postsubmit": [ + { + "name": "CtsThermalTestCases", + "file_patterns": ["thermal.cpp"] + }, + { + "name": "NativeThermalUnitTestCases", + "file_patterns": ["thermal.cpp"] + } ] } diff --git a/native/android/libandroid.map.txt b/native/android/libandroid.map.txt index f4be33c7e6ea..9f2a9ac4798d 100644 --- a/native/android/libandroid.map.txt +++ b/native/android/libandroid.map.txt @@ -327,6 +327,7 @@ LIBANDROID { AThermal_registerThermalStatusListener; # introduced=30 AThermal_unregisterThermalStatusListener; # introduced=30 AThermal_getThermalHeadroom; # introduced=31 + AThermal_getThermalHeadroomThresholds; # introduced=VanillaIceCream APerformanceHint_getManager; # introduced=Tiramisu APerformanceHint_createSession; # introduced=Tiramisu APerformanceHint_getPreferredUpdateRateNanos; # introduced=Tiramisu @@ -348,6 +349,7 @@ LIBANDROID { LIBANDROID_PLATFORM { global: + AThermal_setIThermalServiceForTesting; APerformanceHint_setIHintManagerForTesting; APerformanceHint_sendHint; APerformanceHint_getThreadIds; diff --git a/native/android/tests/thermal/Android.bp b/native/android/tests/thermal/Android.bp new file mode 100644 index 000000000000..8540d8327ada --- /dev/null +++ b/native/android/tests/thermal/Android.bp @@ -0,0 +1,65 @@ +// Copyright (C) 2021 The Android Open Source Project +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package { + // See: http://go/android-license-faq + // A large-scale-change added 'default_applicable_licenses' to import + // all of the 'license_kinds' from "frameworks_base_license" + // to get the below license kinds: + // SPDX-license-identifier-Apache-2.0 + default_applicable_licenses: ["frameworks_base_license"], +} + +cc_test { + name: "NativeThermalUnitTestCases", + + multilib: { + lib32: { + suffix: "32", + }, + lib64: { + suffix: "64", + }, + }, + + srcs: ["NativeThermalUnitTest.cpp"], + + shared_libs: [ + "libandroid", + "liblog", + "libbinder", + "libpowermanager", + "libutils", + ], + + static_libs: [ + "libbase", + "libgmock", + "libgtest", + ], + stl: "c++_shared", + + test_suites: [ + "device-tests", + ], + + cflags: [ + "-Werror", + "-Wall", + ], + + header_libs: [ + "libandroid_headers_private", + ], +} diff --git a/native/android/tests/thermal/NativeThermalUnitTest.cpp b/native/android/tests/thermal/NativeThermalUnitTest.cpp new file mode 100644 index 000000000000..6d6861a3026a --- /dev/null +++ b/native/android/tests/thermal/NativeThermalUnitTest.cpp @@ -0,0 +1,158 @@ +/* + * 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. + */ + +#define LOG_TAG "NativeThermalUnitTest" + +#include <android/os/IThermalService.h> +#include <android/thermal.h> +#include <binder/IBinder.h> +#include <gmock/gmock.h> +#include <gtest/gtest.h> +#include <thermal_private.h> + +using android::binder::Status; + +using namespace testing; +using namespace android; +using namespace android::os; + +class MockIThermalService : public IThermalService { +public: + MOCK_METHOD(Status, registerThermalEventListener, + (const ::android::sp<::android::os::IThermalEventListener>& listener, + bool* _aidl_return), + (override)); + MOCK_METHOD(Status, registerThermalEventListenerWithType, + (const ::android::sp<::android::os::IThermalEventListener>& listener, int32_t type, + bool* _aidl_return), + (override)); + MOCK_METHOD(Status, unregisterThermalEventListener, + (const ::android::sp<::android::os::IThermalEventListener>& listener, + bool* _aidl_return), + (override)); + MOCK_METHOD(Status, getCurrentTemperatures, + (::std::vector<::android::os::Temperature> * _aidl_return), (override)); + MOCK_METHOD(Status, getCurrentTemperaturesWithType, + (int32_t type, ::std::vector<::android::os::Temperature>* _aidl_return), + (override)); + MOCK_METHOD(Status, registerThermalStatusListener, + (const ::android::sp<::android::os::IThermalStatusListener>& listener, + bool* _aidl_return), + (override)); + MOCK_METHOD(Status, unregisterThermalStatusListener, + (const ::android::sp<::android::os::IThermalStatusListener>& listener, + bool* _aidl_return), + (override)); + MOCK_METHOD(Status, getCurrentThermalStatus, (int32_t * _aidl_return), (override)); + MOCK_METHOD(Status, getCurrentCoolingDevices, + (::std::vector<::android::os::CoolingDevice> * _aidl_return), (override)); + MOCK_METHOD(Status, getCurrentCoolingDevicesWithType, + (int32_t type, ::std::vector<::android::os::CoolingDevice>* _aidl_return), + (override)); + MOCK_METHOD(Status, getThermalHeadroom, (int32_t forecastSeconds, float* _aidl_return), + (override)); + MOCK_METHOD(Status, getThermalHeadroomThresholds, (::std::vector<float> * _aidl_return), + (override)); + MOCK_METHOD(IBinder*, onAsBinder, (), (override)); +}; + +class NativeThermalUnitTest : public Test { +public: + void SetUp() override { + mMockIThermalService = new StrictMock<MockIThermalService>(); + AThermal_setIThermalServiceForTesting(mMockIThermalService); + mThermalManager = AThermal_acquireManager(); + } + + void TearDown() override { + AThermal_setIThermalServiceForTesting(nullptr); + AThermal_releaseManager(mThermalManager); + } + + StrictMock<MockIThermalService>* mMockIThermalService = nullptr; + AThermalManager* mThermalManager = nullptr; +}; + +static void checkThermalHeadroomThresholds(const std::vector<float>& expected, + const AThermalHeadroomThreshold* thresholds, + size_t size) { + if (thresholds == nullptr) { + FAIL() << "Unexpected null thresholds pointer"; + } + for (int i = 0; i < (int)size; i++) { + auto t = thresholds[i]; + ASSERT_EQ(i, t.thermalStatus) << "threshold " << i << " should have status " << i; + ASSERT_EQ(expected[i], t.headroom) + << "threshold " << i << " should have headroom " << expected[i]; + } +} + +TEST_F(NativeThermalUnitTest, TestGetThermalHeadroomThresholds) { + std::vector<float> expected = {1, 2, 3, 4, 5, 6, 7, 8, 9}; + EXPECT_CALL(*mMockIThermalService, getThermalHeadroomThresholds(_)) + .Times(Exactly(1)) + .WillRepeatedly(DoAll(SetArgPointee<0>(expected), Return(Status()))); + const AThermalHeadroomThreshold* thresholds1 = nullptr; + size_t size1; + ASSERT_EQ(OK, AThermal_getThermalHeadroomThresholds(mThermalManager, &thresholds1, &size1)); + checkThermalHeadroomThresholds(expected, thresholds1, size1); + // following calls should be cached + EXPECT_CALL(*mMockIThermalService, getThermalHeadroomThresholds(_)).Times(0); + + const AThermalHeadroomThreshold* thresholds2 = nullptr; + size_t size2; + ASSERT_EQ(OK, AThermal_getThermalHeadroomThresholds(mThermalManager, &thresholds2, &size2)); + checkThermalHeadroomThresholds(expected, thresholds2, size2); +} + +TEST_F(NativeThermalUnitTest, TestGetThermalHeadroomThresholdsFailedWithServerError) { + const AThermalHeadroomThreshold* thresholds = nullptr; + size_t size; + EXPECT_CALL(*mMockIThermalService, getThermalHeadroomThresholds(_)) + .Times(Exactly(1)) + .WillOnce(Return( + Status::fromExceptionCode(binder::Status::Exception::EX_ILLEGAL_ARGUMENT))); + ASSERT_EQ(EPIPE, AThermal_getThermalHeadroomThresholds(mThermalManager, &thresholds, &size)); + ASSERT_EQ(nullptr, thresholds); +} + +TEST_F(NativeThermalUnitTest, TestGetThermalHeadroomThresholdsFailedWithFeatureDisabled) { + const AThermalHeadroomThreshold* thresholds = nullptr; + size_t size; + EXPECT_CALL(*mMockIThermalService, getThermalHeadroomThresholds(_)) + .Times(Exactly(1)) + .WillOnce(Return(Status::fromExceptionCode( + binder::Status::Exception::EX_UNSUPPORTED_OPERATION))); + ASSERT_EQ(ENOSYS, AThermal_getThermalHeadroomThresholds(mThermalManager, &thresholds, &size)); + ASSERT_EQ(nullptr, thresholds); +} + +TEST_F(NativeThermalUnitTest, TestGetThermalHeadroomThresholdsFailedWithNullPtr) { + const AThermalHeadroomThreshold* thresholds = nullptr; + size_t size; + size_t* nullSize = nullptr; + ASSERT_EQ(EINVAL, + AThermal_getThermalHeadroomThresholds(mThermalManager, &thresholds, nullSize)); + ASSERT_EQ(nullptr, thresholds); + ASSERT_EQ(EINVAL, AThermal_getThermalHeadroomThresholds(mThermalManager, nullptr, &size)); +} + +TEST_F(NativeThermalUnitTest, TestGetThermalHeadroomThresholdsFailedWithNonEmptyPtr) { + const AThermalHeadroomThreshold* initialized = new AThermalHeadroomThreshold[1]; + size_t size; + ASSERT_EQ(EINVAL, AThermal_getThermalHeadroomThresholds(mThermalManager, &initialized, &size)); + delete[] initialized; +} diff --git a/native/android/tests/thermal/OWNERS b/native/android/tests/thermal/OWNERS new file mode 100644 index 000000000000..e3bbee92057d --- /dev/null +++ b/native/android/tests/thermal/OWNERS @@ -0,0 +1 @@ +include /ADPF_OWNERS diff --git a/native/android/thermal.cpp b/native/android/thermal.cpp index 1f6ef4755aff..b43f2f16a7cb 100644 --- a/native/android/thermal.cpp +++ b/native/android/thermal.cpp @@ -16,27 +16,32 @@ #define LOG_TAG "thermal" -#include <cerrno> -#include <thread> -#include <limits> - -#include <android/thermal.h> +#include <android-base/thread_annotations.h> #include <android/os/BnThermalStatusListener.h> #include <android/os/IThermalService.h> +#include <android/thermal.h> #include <binder/IServiceManager.h> +#include <thermal_private.h> #include <utils/Log.h> +#include <cerrno> +#include <limits> +#include <thread> + using android::sp; using namespace android; using namespace android::os; struct ThermalServiceListener : public BnThermalStatusListener { - public: - virtual binder::Status onStatusChange(int32_t status) override; - ThermalServiceListener(AThermalManager *manager) {mMgr = manager;} - private: - AThermalManager *mMgr; +public: + virtual binder::Status onStatusChange(int32_t status) override; + ThermalServiceListener(AThermalManager *manager) { + mMgr = manager; + } + +private: + AThermalManager *mMgr; }; struct ListenerCallback { @@ -44,22 +49,29 @@ struct ListenerCallback { void* data; }; +static IThermalService *gIThermalServiceForTesting = nullptr; + struct AThermalManager { - public: - static AThermalManager* createAThermalManager(); - AThermalManager() = delete; - ~AThermalManager(); - status_t notifyStateChange(int32_t status); - status_t getCurrentThermalStatus(int32_t *status); - status_t addListener(AThermal_StatusCallback, void *data); - status_t removeListener(AThermal_StatusCallback, void *data); - status_t getThermalHeadroom(int32_t forecastSeconds, float *result); - private: - AThermalManager(sp<IThermalService> service); - sp<IThermalService> mThermalSvc; - sp<ThermalServiceListener> mServiceListener; - std::vector<ListenerCallback> mListeners; - std::mutex mMutex; +public: + static AThermalManager *createAThermalManager(); + AThermalManager() = delete; + ~AThermalManager(); + status_t notifyStateChange(int32_t status); + status_t getCurrentThermalStatus(int32_t *status); + status_t addListener(AThermal_StatusCallback, void *data); + status_t removeListener(AThermal_StatusCallback, void *data); + status_t getThermalHeadroom(int32_t forecastSeconds, float *result); + status_t getThermalHeadroomThresholds(const AThermalHeadroomThreshold **, size_t *size); + +private: + AThermalManager(sp<IThermalService> service); + sp<IThermalService> mThermalSvc; + std::mutex mListenerMutex; + sp<ThermalServiceListener> mServiceListener GUARDED_BY(mListenerMutex); + std::vector<ListenerCallback> mListeners GUARDED_BY(mListenerMutex); + std::mutex mThresholdsMutex; + const AThermalHeadroomThreshold *mThresholds = nullptr; // GUARDED_BY(mThresholdsMutex) + size_t mThresholdsCount GUARDED_BY(mThresholdsMutex); }; binder::Status ThermalServiceListener::onStatusChange(int32_t status) { @@ -70,6 +82,9 @@ binder::Status ThermalServiceListener::onStatusChange(int32_t status) { } AThermalManager* AThermalManager::createAThermalManager() { + if (gIThermalServiceForTesting) { + return new AThermalManager(gIThermalServiceForTesting); + } sp<IBinder> binder = defaultServiceManager()->checkService(String16("thermalservice")); @@ -81,12 +96,10 @@ AThermalManager* AThermalManager::createAThermalManager() { } AThermalManager::AThermalManager(sp<IThermalService> service) - : mThermalSvc(service), - mServiceListener(nullptr) { -} + : mThermalSvc(std::move(service)), mServiceListener(nullptr) {} AThermalManager::~AThermalManager() { - std::unique_lock<std::mutex> lock(mMutex); + std::unique_lock<std::mutex> listenerLock(mListenerMutex); mListeners.clear(); if (mServiceListener != nullptr) { @@ -94,10 +107,13 @@ AThermalManager::~AThermalManager() { mThermalSvc->unregisterThermalStatusListener(mServiceListener, &success); mServiceListener = nullptr; } + listenerLock.unlock(); + std::unique_lock<std::mutex> lock(mThresholdsMutex); + delete[] mThresholds; } status_t AThermalManager::notifyStateChange(int32_t status) { - std::unique_lock<std::mutex> lock(mMutex); + std::unique_lock<std::mutex> lock(mListenerMutex); AThermalStatus thermalStatus = static_cast<AThermalStatus>(status); for (auto listener : mListeners) { @@ -107,7 +123,7 @@ status_t AThermalManager::notifyStateChange(int32_t status) { } status_t AThermalManager::addListener(AThermal_StatusCallback callback, void *data) { - std::unique_lock<std::mutex> lock(mMutex); + std::unique_lock<std::mutex> lock(mListenerMutex); if (callback == nullptr) { // Callback can not be nullptr @@ -141,7 +157,7 @@ status_t AThermalManager::addListener(AThermal_StatusCallback callback, void *da } status_t AThermalManager::removeListener(AThermal_StatusCallback callback, void *data) { - std::unique_lock<std::mutex> lock(mMutex); + std::unique_lock<std::mutex> lock(mListenerMutex); auto it = std::remove_if(mListeners.begin(), mListeners.end(), @@ -198,6 +214,32 @@ status_t AThermalManager::getThermalHeadroom(int32_t forecastSeconds, float *res return OK; } +status_t AThermalManager::getThermalHeadroomThresholds(const AThermalHeadroomThreshold **result, + size_t *size) { + std::unique_lock<std::mutex> lock(mThresholdsMutex); + if (mThresholds == nullptr) { + auto thresholds = std::make_unique<std::vector<float>>(); + binder::Status ret = mThermalSvc->getThermalHeadroomThresholds(thresholds.get()); + if (!ret.isOk()) { + if (ret.exceptionCode() == binder::Status::EX_UNSUPPORTED_OPERATION) { + // feature is not enabled + return ENOSYS; + } + return EPIPE; + } + mThresholdsCount = thresholds->size(); + auto t = new AThermalHeadroomThreshold[mThresholdsCount]; + for (int i = 0; i < (int)mThresholdsCount; i++) { + t[i].headroom = (*thresholds)[i]; + t[i].thermalStatus = static_cast<AThermalStatus>(i); + } + mThresholds = t; + } + *size = mThresholdsCount; + *result = mThresholds; + return OK; +} + /** * Acquire an instance of the thermal manager. This must be freed using * {@link AThermal_releaseManager}. @@ -291,14 +333,24 @@ int AThermal_unregisterThermalStatusListener(AThermalManager *manager, * threshold. Returns NaN if the device does not support this functionality or if * this function is called significantly faster than once per second. */ -float AThermal_getThermalHeadroom(AThermalManager *manager, - int forecastSeconds) { +float AThermal_getThermalHeadroom(AThermalManager *manager, int forecastSeconds) { float result = 0.0f; status_t ret = manager->getThermalHeadroom(forecastSeconds, &result); - if (ret != OK) { result = std::numeric_limits<float>::quiet_NaN(); } - return result; } + +int AThermal_getThermalHeadroomThresholds(AThermalManager *manager, + const AThermalHeadroomThreshold **outThresholds, + size_t *size) { + if (outThresholds == nullptr || *outThresholds != nullptr || size == nullptr) { + return EINVAL; + } + return manager->getThermalHeadroomThresholds(outThresholds, size); +} + +void AThermal_setIThermalServiceForTesting(void *iThermalService) { + gIThermalServiceForTesting = static_cast<IThermalService *>(iThermalService); +} diff --git a/packages/CredentialManager/shared/src/com/android/credentialmanager/IntentParser.kt b/packages/CredentialManager/shared/src/com/android/credentialmanager/IntentParser.kt index 98ad22c8060e..42f1207c69cb 100644 --- a/packages/CredentialManager/shared/src/com/android/credentialmanager/IntentParser.kt +++ b/packages/CredentialManager/shared/src/com/android/credentialmanager/IntentParser.kt @@ -19,35 +19,46 @@ package com.android.credentialmanager import android.content.Intent import android.content.pm.PackageManager import android.credentials.ui.RequestInfo +import android.util.Log +import com.android.credentialmanager.ktx.appLabel +import com.android.credentialmanager.ktx.cancelUiRequest import com.android.credentialmanager.ktx.requestInfo import com.android.credentialmanager.mapper.toGet -import com.android.credentialmanager.mapper.toRequestCancel -import com.android.credentialmanager.mapper.toRequestClose import com.android.credentialmanager.model.Request fun Intent.parse( packageManager: PackageManager, - previousIntent: Intent? = null, ): Request { - this.toRequestClose(previousIntent)?.let { closeRequest -> - return closeRequest - } - - this.toRequestCancel(packageManager)?.let { cancelRequest -> - return cancelRequest - } + return parseCancelUiRequest(packageManager) + ?: parseRequestInfo() +} - return when (requestInfo?.type) { - RequestInfo.TYPE_CREATE -> { - Request.Create +fun Intent.parseCancelUiRequest(packageManager: PackageManager): Request? = + this.cancelUiRequest?.let { cancelUiRequest -> + val showCancel = cancelUiRequest.shouldShowCancellationUi().apply { + Log.d(TAG, "Received UI cancel request, shouldShowCancellationUi: $this") } - - RequestInfo.TYPE_GET -> { - this.toGet() + if (showCancel) { + val appLabel = packageManager.appLabel(cancelUiRequest.appPackageName) + if (appLabel == null) { + Log.d(TAG, "Received UI cancel request with an invalid package name.") + null + } else { + Request.Cancel(appName = appLabel, token = cancelUiRequest.token) + } + } else { + Request.Close(cancelUiRequest.token) } + } - else -> { - throw IllegalStateException("Unrecognized request type: ${requestInfo?.type}") +fun Intent.parseRequestInfo(): Request = + requestInfo.let{ info -> + when (info?.type) { + RequestInfo.TYPE_CREATE -> Request.Create(info.token) + RequestInfo.TYPE_GET -> toGet() + else -> { + throw IllegalStateException("Unrecognized request type: ${info?.type}") + } } } -} + diff --git a/packages/CredentialManager/shared/src/com/android/credentialmanager/client/CredentialManagerClient.kt b/packages/CredentialManager/shared/src/com/android/credentialmanager/client/CredentialManagerClient.kt new file mode 100644 index 000000000000..49387cf410ac --- /dev/null +++ b/packages/CredentialManager/shared/src/com/android/credentialmanager/client/CredentialManagerClient.kt @@ -0,0 +1,57 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.credentialmanager.client + +import android.content.Intent +import android.credentials.ui.BaseDialogResult +import android.credentials.ui.UserSelectionDialogResult +import com.android.credentialmanager.model.Request +import kotlinx.coroutines.flow.StateFlow + +interface CredentialManagerClient { + /** The UI should monitor the request update. */ + val requests: StateFlow<Request?> + + /** The UI got a new intent; update the request state. */ + fun updateRequest(intent: Intent) + + /** Sends an error encountered during the UI. */ + fun sendError( + @BaseDialogResult.ResultCode resultCode: Int, + errorMessage: String? = null, + ) + + /** + * Sends a response to the system service. The response + * contains information about the user's choice from the selector + * UI and the result of the provider operation launched with + * that selection. + * + * If the user choice was a normal entry, then the UI can finish + * the activity immediately. Otherwise if it was an authentication + * (locked) entry, then the UI will need to stay up and wait for + * a new intent from the system containing the new data for + * display. + * + * Note that if the provider operation returns RESULT_CANCELED, + * then the selector should not send that result back, and instead + * re-display the options to allow a user to have another choice. + * + * @throws [IllegalStateException] if [requests] is not [Request.Get]. + */ + fun sendResult(result: UserSelectionDialogResult) +}
\ No newline at end of file diff --git a/packages/CredentialManager/shared/src/com/android/credentialmanager/client/impl/CredentialManagerClientImpl.kt b/packages/CredentialManager/shared/src/com/android/credentialmanager/client/impl/CredentialManagerClientImpl.kt new file mode 100644 index 000000000000..83183b5f58eb --- /dev/null +++ b/packages/CredentialManager/shared/src/com/android/credentialmanager/client/impl/CredentialManagerClientImpl.kt @@ -0,0 +1,71 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.credentialmanager.client.impl + +import android.content.Intent +import android.content.pm.PackageManager +import android.credentials.ui.BaseDialogResult +import android.credentials.ui.UserSelectionDialogResult +import android.os.Bundle +import android.util.Log +import com.android.credentialmanager.TAG +import com.android.credentialmanager.model.Request +import com.android.credentialmanager.parse +import com.android.credentialmanager.client.CredentialManagerClient +import kotlinx.coroutines.flow.MutableStateFlow +import kotlinx.coroutines.flow.StateFlow +import javax.inject.Inject + +class CredentialManagerClientImpl @Inject constructor( + private val packageManager: PackageManager, +) : CredentialManagerClient { + + private val _requests = MutableStateFlow<Request?>(null) + override val requests: StateFlow<Request?> = _requests + + + override fun updateRequest(intent: Intent) { + val request = intent.parse( + packageManager = packageManager, + ) + Log.d(TAG, "Request parsed: $request, client instance: $this") + if (request is Request.Cancel || request is Request.Close) { + if (request.token != null && request.token != _requests.value?.token) { + Log.w(TAG, "drop terminate request for previous session.") + return + } + } + _requests.value = request + } + + override fun sendError(resultCode: Int, errorMessage: String?) { + TODO("b/300422310 - [Wear] Implement UI for cancellation request with message") + } + + override fun sendResult(result: UserSelectionDialogResult) { + val currentRequest = requests.value + check(currentRequest is Request.Get) { "current request is not get." } + currentRequest.resultReceiver?.let { receiver -> + val resultDataBundle = Bundle() + UserSelectionDialogResult.addToBundle(result, resultDataBundle) + receiver.send( + BaseDialogResult.RESULT_CODE_DIALOG_COMPLETE_WITH_SELECTION, + resultDataBundle + ) + } + } +} diff --git a/packages/CredentialManager/shared/src/com/android/credentialmanager/mapper/RequestCancelMapper.kt b/packages/CredentialManager/shared/src/com/android/credentialmanager/mapper/RequestCancelMapper.kt deleted file mode 100644 index 99dc9ec38eff..000000000000 --- a/packages/CredentialManager/shared/src/com/android/credentialmanager/mapper/RequestCancelMapper.kt +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (C) 2023 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0N - * - * 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.credentialmanager.mapper - -import android.content.Intent -import android.content.pm.PackageManager -import android.util.Log -import com.android.credentialmanager.TAG -import com.android.credentialmanager.ktx.appLabel -import com.android.credentialmanager.ktx.cancelUiRequest -import com.android.credentialmanager.model.Request - -fun Intent.toRequestCancel(packageManager: PackageManager): Request.Cancel? = - this.cancelUiRequest?.let { cancelUiRequest -> - val appLabel = packageManager.appLabel(cancelUiRequest.appPackageName) - if (appLabel == null) { - Log.d(TAG, "Received UI cancel request with an invalid package name.") - null - } else { - Request.Cancel(appName = appLabel) - } - } diff --git a/packages/CredentialManager/shared/src/com/android/credentialmanager/mapper/RequestCloseMapper.kt b/packages/CredentialManager/shared/src/com/android/credentialmanager/mapper/RequestCloseMapper.kt deleted file mode 100644 index 02ee77bc5ec3..000000000000 --- a/packages/CredentialManager/shared/src/com/android/credentialmanager/mapper/RequestCloseMapper.kt +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (C) 2023 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0N - * - * 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.credentialmanager.mapper - -import android.content.Intent -import com.android.credentialmanager.ktx.cancelUiRequest -import com.android.credentialmanager.ktx.requestInfo -import com.android.credentialmanager.model.Request - -fun Intent.toRequestClose( - previousIntent: Intent? = null, -): Request.Close? { - // Close request comes as "Cancel" request from Credential Manager API - this.cancelUiRequest?.let { cancelUiRequest -> - - if (cancelUiRequest.shouldShowCancellationUi()) { - // Current request is to Cancel and not to Close - return null - } - - previousIntent?.let { - val previousToken = previousIntent.requestInfo?.token - val currentToken = this.requestInfo?.token - - if (previousToken != currentToken) { - // Current cancellation is for a different request, don't close the current flow. - return null - } - } - - return Request.Close - } - - return null -}
\ No newline at end of file diff --git a/packages/CredentialManager/shared/src/com/android/credentialmanager/model/Request.kt b/packages/CredentialManager/shared/src/com/android/credentialmanager/model/Request.kt index ed98f3ed5154..2289ed7320ca 100644 --- a/packages/CredentialManager/shared/src/com/android/credentialmanager/model/Request.kt +++ b/packages/CredentialManager/shared/src/com/android/credentialmanager/model/Request.kt @@ -25,33 +25,40 @@ import com.google.common.collect.ImmutableMap /** * Represents the request made by the CredentialManager API. */ -sealed class Request { +sealed class Request private constructor( + open val token: IBinder?, +) { /** * Request to close the app without displaying a message to the user and without reporting * anything back to the Credential Manager service. */ - data object Close : Request() + data class Close( + override val token: IBinder?, + ) : Request(token) /** * Request to close the app, displaying a message to the user. */ data class Cancel( - val appName: String - ) : Request() + val appName: String, + override val token: IBinder?, + ) : Request(token) /** * Request to start the get credentials flow. */ data class Get( - val token: IBinder?, + override val token: IBinder?, val resultReceiver: ResultReceiver?, val providers: ImmutableMap<String, ProviderData>, val passwordEntries: ImmutableList<Password>, - ) : Request() - + ) : Request(token) /** * Request to start the create credentials flow. */ - data object Create : Request() + data class Create( + override val token: IBinder?, + ) : Request(token) } + diff --git a/packages/CredentialManager/shared/src/com/android/credentialmanager/repository/PasswordRepository.kt b/packages/CredentialManager/shared/src/com/android/credentialmanager/repository/PasswordRepository.kt deleted file mode 100644 index 5738feea0772..000000000000 --- a/packages/CredentialManager/shared/src/com/android/credentialmanager/repository/PasswordRepository.kt +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (C) 2023 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0N - * - * 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.credentialmanager.repository - -import android.content.Intent -import android.credentials.ui.BaseDialogResult -import android.credentials.ui.ProviderPendingIntentResponse -import android.credentials.ui.UserSelectionDialogResult -import android.os.Bundle -import android.util.Log -import com.android.credentialmanager.TAG -import com.android.credentialmanager.model.Password -import com.android.credentialmanager.model.Request -import javax.inject.Inject -import javax.inject.Singleton - -@Singleton -class PasswordRepository @Inject constructor() { - - suspend fun selectPassword( - password: Password, - request: Request.Get, - resultCode: Int? = null, - resultData: Intent? = null, - ) { - Log.d(TAG, "password selected: {provider=${password.providerId}" + - ", key=${password.entry.key}, subkey=${password.entry.subkey}}") - - val userSelectionDialogResult = UserSelectionDialogResult( - request.token, - password.providerId, - password.entry.key, - password.entry.subkey, - if (resultCode != null) ProviderPendingIntentResponse(resultCode, resultData) else null - ) - val resultDataBundle = Bundle() - UserSelectionDialogResult.addToBundle(userSelectionDialogResult, resultDataBundle) - request.resultReceiver?.send( - BaseDialogResult.RESULT_CODE_DIALOG_COMPLETE_WITH_SELECTION, - resultDataBundle - ) - } -} diff --git a/packages/CredentialManager/shared/src/com/android/credentialmanager/repository/RequestRepository.kt b/packages/CredentialManager/shared/src/com/android/credentialmanager/repository/RequestRepository.kt deleted file mode 100644 index 1973fc175c1f..000000000000 --- a/packages/CredentialManager/shared/src/com/android/credentialmanager/repository/RequestRepository.kt +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (C) 2023 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0N - * - * 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.credentialmanager.repository - -import android.content.Intent -import android.content.pm.PackageManager -import android.util.Log -import com.android.credentialmanager.TAG -import com.android.credentialmanager.model.Request -import com.android.credentialmanager.parse -import kotlinx.coroutines.flow.MutableStateFlow -import kotlinx.coroutines.flow.StateFlow -import javax.inject.Inject -import javax.inject.Singleton - -@Singleton -class RequestRepository @Inject constructor( - private val packageManager: PackageManager, -) { - - private val _requests = MutableStateFlow<Request?>(null) - val requests: StateFlow<Request?> = _requests - - suspend fun processRequest(intent: Intent, previousIntent: Intent? = null) { - val request = intent.parse( - packageManager = packageManager, - previousIntent = previousIntent - ) - - Log.d(TAG, "Request parsed: $request") - - _requests.value = request - } -} diff --git a/packages/CredentialManager/wear/src/com/android/credentialmanager/CredentialSelectorActivity.kt b/packages/CredentialManager/wear/src/com/android/credentialmanager/CredentialSelectorActivity.kt index f2df64aee22e..0df40d7adba5 100644 --- a/packages/CredentialManager/wear/src/com/android/credentialmanager/CredentialSelectorActivity.kt +++ b/packages/CredentialManager/wear/src/com/android/credentialmanager/CredentialSelectorActivity.kt @@ -25,6 +25,7 @@ import androidx.wear.compose.material.MaterialTheme import com.android.credentialmanager.ui.WearApp import com.google.android.horologist.annotations.ExperimentalHorologistApi import dagger.hilt.android.AndroidEntryPoint +import kotlin.system.exitProcess @AndroidEntryPoint(ComponentActivity::class) class CredentialSelectorActivity : Hilt_CredentialSelectorActivity() { @@ -34,25 +35,21 @@ class CredentialSelectorActivity : Hilt_CredentialSelectorActivity() { @OptIn(ExperimentalHorologistApi::class) override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) - setTheme(android.R.style.Theme_DeviceDefault) setContent { MaterialTheme { WearApp( viewModel = viewModel, - onCloseApp = ::finish, + onCloseApp = { exitProcess(0) }, ) } } - viewModel.onNewIntent(intent) + viewModel.updateRequest(intent) } override fun onNewIntent(intent: Intent) { super.onNewIntent(intent) - - val previousIntent = getIntent() setIntent(intent) - - viewModel.onNewIntent(intent, previousIntent) + viewModel.updateRequest(intent) } } diff --git a/packages/CredentialManager/wear/src/com/android/credentialmanager/CredentialSelectorViewModel.kt b/packages/CredentialManager/wear/src/com/android/credentialmanager/CredentialSelectorViewModel.kt index 435cd377114d..2a7e9e16a10e 100644 --- a/packages/CredentialManager/wear/src/com/android/credentialmanager/CredentialSelectorViewModel.kt +++ b/packages/CredentialManager/wear/src/com/android/credentialmanager/CredentialSelectorViewModel.kt @@ -20,28 +20,27 @@ import android.content.Intent import androidx.lifecycle.ViewModel import androidx.lifecycle.viewModelScope import com.android.credentialmanager.model.Request -import com.android.credentialmanager.repository.RequestRepository +import com.android.credentialmanager.client.CredentialManagerClient import com.android.credentialmanager.ui.mappers.toGet import dagger.hilt.android.lifecycle.HiltViewModel import kotlinx.coroutines.flow.SharingStarted import kotlinx.coroutines.flow.StateFlow import kotlinx.coroutines.flow.map import kotlinx.coroutines.flow.stateIn -import kotlinx.coroutines.launch import javax.inject.Inject @HiltViewModel class CredentialSelectorViewModel @Inject constructor( - private val requestRepository: RequestRepository, + private val credentialManagerClient: CredentialManagerClient, ) : ViewModel() { - val uiState: StateFlow<CredentialSelectorUiState> = requestRepository.requests + val uiState: StateFlow<CredentialSelectorUiState> = credentialManagerClient.requests .map { request -> when (request) { null -> CredentialSelectorUiState.Idle is Request.Cancel -> CredentialSelectorUiState.Cancel(request.appName) - Request.Close -> CredentialSelectorUiState.Close - Request.Create -> CredentialSelectorUiState.Create + is Request.Close -> CredentialSelectorUiState.Close + is Request.Create -> CredentialSelectorUiState.Create is Request.Get -> request.toGet() } } @@ -51,10 +50,8 @@ class CredentialSelectorViewModel @Inject constructor( initialValue = CredentialSelectorUiState.Idle, ) - fun onNewIntent(intent: Intent, previousIntent: Intent? = null) { - viewModelScope.launch { - requestRepository.processRequest(intent = intent, previousIntent = previousIntent) - } + fun updateRequest(intent: Intent) { + credentialManagerClient.updateRequest(intent = intent) } } diff --git a/packages/CredentialManager/wear/src/com/android/credentialmanager/di/AppModule.kt b/packages/CredentialManager/wear/src/com/android/credentialmanager/di/AppModule.kt index cb1a4a13690e..6ededf3411bf 100644 --- a/packages/CredentialManager/wear/src/com/android/credentialmanager/di/AppModule.kt +++ b/packages/CredentialManager/wear/src/com/android/credentialmanager/di/AppModule.kt @@ -2,17 +2,28 @@ package com.android.credentialmanager.di import android.content.Context import android.content.pm.PackageManager +import com.android.credentialmanager.client.CredentialManagerClient +import com.android.credentialmanager.client.impl.CredentialManagerClientImpl import dagger.Module import dagger.Provides import dagger.hilt.InstallIn import dagger.hilt.android.qualifiers.ApplicationContext import dagger.hilt.components.SingletonComponent +import javax.inject.Singleton + @Module @InstallIn(SingletonComponent::class) internal object AppModule { @Provides + @Singleton @JvmStatic fun providePackageManager(@ApplicationContext context: Context): PackageManager = - context.packageManager + context.packageManager + + @Provides + @Singleton + @JvmStatic + fun provideCredentialManagerClient(packageManager: PackageManager): CredentialManagerClient = + CredentialManagerClientImpl(packageManager) } diff --git a/packages/CredentialManager/wear/src/com/android/credentialmanager/ui/Navigation.kt b/packages/CredentialManager/wear/src/com/android/credentialmanager/ui/Navigation.kt index da5697dab8d4..77fb3e7dfd9c 100644 --- a/packages/CredentialManager/wear/src/com/android/credentialmanager/ui/Navigation.kt +++ b/packages/CredentialManager/wear/src/com/android/credentialmanager/ui/Navigation.kt @@ -19,9 +19,14 @@ package com.android.credentialmanager.ui import androidx.navigation.NavController fun NavController.navigateToLoading() { - navigate(Screen.Loading.route) + navigateToAsRoot(Screen.Loading.route) } fun NavController.navigateToSinglePasswordScreen() { - navigate(Screen.SinglePasswordScreen.route) + navigateToAsRoot(Screen.SinglePasswordScreen.route) +} + +fun NavController.navigateToAsRoot(route: String) { + popBackStack() + navigate(route) } diff --git a/packages/CredentialManager/wear/src/com/android/credentialmanager/ui/screens/single/password/SinglePasswordScreenViewModel.kt b/packages/CredentialManager/wear/src/com/android/credentialmanager/ui/screens/single/password/SinglePasswordScreenViewModel.kt index 43514a039661..fb72c544c978 100644 --- a/packages/CredentialManager/wear/src/com/android/credentialmanager/ui/screens/single/password/SinglePasswordScreenViewModel.kt +++ b/packages/CredentialManager/wear/src/com/android/credentialmanager/ui/screens/single/password/SinglePasswordScreenViewModel.kt @@ -17,6 +17,8 @@ package com.android.credentialmanager.ui.screens.single.password import android.content.Intent +import android.credentials.ui.ProviderPendingIntentResponse +import android.credentials.ui.UserSelectionDialogResult import android.util.Log import androidx.activity.result.IntentSenderRequest import androidx.annotation.MainThread @@ -26,20 +28,17 @@ import com.android.credentialmanager.TAG import com.android.credentialmanager.ktx.getIntentSenderRequest import com.android.credentialmanager.model.Password import com.android.credentialmanager.model.Request -import com.android.credentialmanager.repository.PasswordRepository -import com.android.credentialmanager.repository.RequestRepository +import com.android.credentialmanager.client.CredentialManagerClient import com.android.credentialmanager.ui.model.PasswordUiModel import dagger.hilt.android.lifecycle.HiltViewModel import kotlinx.coroutines.flow.MutableStateFlow import kotlinx.coroutines.flow.StateFlow -import kotlinx.coroutines.flow.first import kotlinx.coroutines.launch import javax.inject.Inject @HiltViewModel class SinglePasswordScreenViewModel @Inject constructor( - private val requestRepository: RequestRepository, - private val passwordRepository: PasswordRepository, + private val credentialManagerClient: CredentialManagerClient, ) : ViewModel() { private var initializeCalled = false @@ -57,8 +56,8 @@ class SinglePasswordScreenViewModel @Inject constructor( initializeCalled = true viewModelScope.launch { - val request = requestRepository.requests.first() - Log.d(TAG, "request: $request") + val request = credentialManagerClient.requests.value + Log.d(TAG, "request: $request, client instance: $credentialManagerClient") if (request !is Request.Get) { _uiState.value = SinglePasswordScreenUiState.Error @@ -93,16 +92,15 @@ class SinglePasswordScreenViewModel @Inject constructor( resultCode: Int? = null, resultData: Intent? = null, ) { - viewModelScope.launch { - passwordRepository.selectPassword( - password = password, - request = requestGet, - resultCode = resultCode, - resultData = resultData - ) - - _uiState.value = SinglePasswordScreenUiState.Completed - } + val userSelectionDialogResult = UserSelectionDialogResult( + requestGet.token, + password.providerId, + password.entry.key, + password.entry.subkey, + if (resultCode != null) ProviderPendingIntentResponse(resultCode, resultData) else null + ) + credentialManagerClient.sendResult(userSelectionDialogResult) + _uiState.value = SinglePasswordScreenUiState.Completed } } diff --git a/packages/PackageInstaller/Android.bp b/packages/PackageInstaller/Android.bp index 58224b817a4d..38bd7d5f3944 100644 --- a/packages/PackageInstaller/Android.bp +++ b/packages/PackageInstaller/Android.bp @@ -46,6 +46,9 @@ android_app { "xz-java", "androidx.leanback_leanback", "androidx.annotation_annotation", + "androidx.fragment_fragment", + "androidx.lifecycle_lifecycle-livedata", + "androidx.lifecycle_lifecycle-extensions", ], lint: { @@ -69,6 +72,9 @@ android_app { static_libs: [ "xz-java", "androidx.leanback_leanback", + "androidx.fragment_fragment", + "androidx.lifecycle_lifecycle-livedata", + "androidx.lifecycle_lifecycle-extensions", ], aaptflags: ["--product tablet"], @@ -94,6 +100,9 @@ android_app { "xz-java", "androidx.leanback_leanback", "androidx.annotation_annotation", + "androidx.fragment_fragment", + "androidx.lifecycle_lifecycle-livedata", + "androidx.lifecycle_lifecycle-extensions", ], aaptflags: ["--product tv"], diff --git a/packages/PackageInstaller/AndroidManifest.xml b/packages/PackageInstaller/AndroidManifest.xml index a16f9f55b466..b845c2b6cc8b 100644 --- a/packages/PackageInstaller/AndroidManifest.xml +++ b/packages/PackageInstaller/AndroidManifest.xml @@ -43,6 +43,11 @@ </intent-filter> </receiver> + <activity android:name=".v2.ui.InstallLaunch" + android:configChanges="orientation|keyboardHidden|screenSize" + android:theme="@style/Theme.AlertDialogActivity" + android:exported="true"/> + <activity android:name=".InstallStart" android:theme="@style/Theme.AlertDialogActivity" android:exported="true" @@ -81,6 +86,7 @@ android:exported="false" /> <activity android:name=".PackageInstallerActivity" + android:theme="@style/Theme.AlertDialogActivity.NoAnimation" android:exported="false" /> <activity android:name=".InstallInstalling" diff --git a/packages/PackageInstaller/res/values/themes.xml b/packages/PackageInstaller/res/values/themes.xml index aa1fa164b021..811fa7380c48 100644 --- a/packages/PackageInstaller/res/values/themes.xml +++ b/packages/PackageInstaller/res/values/themes.xml @@ -32,8 +32,8 @@ <item name="android:windowNoTitle">true</item> </style> - <style name="Theme.AlertDialogActivity.NoDim"> - <item name="android:windowNoTitle">true</item> + <style name="Theme.AlertDialogActivity.NoDim" + parent="@style/Theme.AlertDialogActivity.NoActionBar"> <item name="android:backgroundDimAmount">0</item> </style> diff --git a/packages/PackageInstaller/src/com/android/packageinstaller/InstallFailed.java b/packages/PackageInstaller/src/com/android/packageinstaller/InstallFailed.java index 74f04e093162..eef21991b845 100644 --- a/packages/PackageInstaller/src/com/android/packageinstaller/InstallFailed.java +++ b/packages/PackageInstaller/src/com/android/packageinstaller/InstallFailed.java @@ -36,12 +36,14 @@ import androidx.annotation.Nullable; /** * Installation failed: Return status code to the caller or display failure UI to user */ -public class InstallFailed extends AlertActivity { +public class InstallFailed extends Activity { private static final String LOG_TAG = InstallFailed.class.getSimpleName(); /** Label of the app that failed to install */ private CharSequence mLabel; + private AlertDialog mDialog; + /** * Unhide the appropriate label for the statusCode. * @@ -53,19 +55,19 @@ public class InstallFailed extends AlertActivity { View viewToEnable; switch (statusCode) { case PackageInstaller.STATUS_FAILURE_BLOCKED: - viewToEnable = requireViewById(R.id.install_failed_blocked); + viewToEnable = mDialog.requireViewById(R.id.install_failed_blocked); break; case PackageInstaller.STATUS_FAILURE_CONFLICT: - viewToEnable = requireViewById(R.id.install_failed_conflict); + viewToEnable = mDialog.requireViewById(R.id.install_failed_conflict); break; case PackageInstaller.STATUS_FAILURE_INCOMPATIBLE: - viewToEnable = requireViewById(R.id.install_failed_incompatible); + viewToEnable = mDialog.requireViewById(R.id.install_failed_incompatible); break; case PackageInstaller.STATUS_FAILURE_INVALID: - viewToEnable = requireViewById(R.id.install_failed_invalid_apk); + viewToEnable = mDialog.requireViewById(R.id.install_failed_invalid_apk); break; default: - viewToEnable = requireViewById(R.id.install_failed); + viewToEnable = mDialog.requireViewById(R.id.install_failed); break; } @@ -105,12 +107,18 @@ public class InstallFailed extends AlertActivity { // Store label for dialog mLabel = as.label; - mAlert.setIcon(as.icon); - mAlert.setTitle(as.label); - mAlert.setView(R.layout.install_content_view); - mAlert.setButton(DialogInterface.BUTTON_POSITIVE, getString(R.string.done), - (ignored, ignored2) -> finish(), null); - setupAlert(); + AlertDialog.Builder builder = new AlertDialog.Builder(this); + + builder.setIcon(as.icon); + builder.setTitle(as.label); + builder.setView(R.layout.install_content_view); + builder.setPositiveButton(getString(R.string.done), + (ignored, ignored2) -> finish()); + builder.setOnCancelListener(dialog -> { + finish(); + }); + mDialog = builder.create(); + mDialog.show(); // Show out of space dialog if needed if (statusCode == PackageInstaller.STATUS_FAILURE_STORAGE) { diff --git a/packages/PackageInstaller/src/com/android/packageinstaller/InstallInstalling.java b/packages/PackageInstaller/src/com/android/packageinstaller/InstallInstalling.java index 4992ef1e1c00..8d8254ad4058 100644 --- a/packages/PackageInstaller/src/com/android/packageinstaller/InstallInstalling.java +++ b/packages/PackageInstaller/src/com/android/packageinstaller/InstallInstalling.java @@ -19,6 +19,8 @@ package com.android.packageinstaller; import static com.android.packageinstaller.PackageInstallerActivity.EXTRA_APP_SNIPPET; import static com.android.packageinstaller.PackageInstallerActivity.EXTRA_STAGED_SESSION_ID; +import android.app.Activity; +import android.app.AlertDialog; import android.app.PendingIntent; import android.content.DialogInterface; import android.content.Intent; @@ -43,7 +45,7 @@ import java.io.IOException; * <p>This has two phases: First send the data to the package manager, then wait until the package * manager processed the result.</p> */ -public class InstallInstalling extends AlertActivity { +public class InstallInstalling extends Activity { private static final String LOG_TAG = InstallInstalling.class.getSimpleName(); private static final String SESSION_ID = "com.android.packageinstaller.SESSION_ID"; @@ -67,6 +69,8 @@ public class InstallInstalling extends AlertActivity { /** The button that can cancel this dialog */ private Button mCancelButton; + private AlertDialog mDialog; + @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); @@ -90,10 +94,12 @@ public class InstallInstalling extends AlertActivity { PackageUtil.AppSnippet as = getIntent() .getParcelableExtra(EXTRA_APP_SNIPPET, PackageUtil.AppSnippet.class); - mAlert.setIcon(as.icon); - mAlert.setTitle(as.label); - mAlert.setView(R.layout.install_content_view); - mAlert.setButton(DialogInterface.BUTTON_NEGATIVE, getString(R.string.cancel), + AlertDialog.Builder builder = new AlertDialog.Builder(this); + + builder.setIcon(as.icon); + builder.setTitle(as.label); + builder.setView(R.layout.install_content_view); + builder.setNegativeButton(getString(R.string.cancel), (ignored, ignored2) -> { if (mInstallingTask != null) { mInstallingTask.cancel(true); @@ -106,9 +112,11 @@ public class InstallInstalling extends AlertActivity { setResult(RESULT_CANCELED); finish(); - }, null); - setupAlert(); - requireViewById(R.id.installing).setVisibility(View.VISIBLE); + }); + builder.setCancelable(false); + mDialog = builder.create(); + mDialog.show(); + mDialog.requireViewById(R.id.installing).setVisibility(View.VISIBLE); if (savedInstanceState != null) { mSessionId = savedInstanceState.getInt(SESSION_ID); @@ -145,7 +153,7 @@ public class InstallInstalling extends AlertActivity { } } - mCancelButton = mAlert.getButton(DialogInterface.BUTTON_NEGATIVE); + mCancelButton = mDialog.getButton(DialogInterface.BUTTON_NEGATIVE); } } diff --git a/packages/PackageInstaller/src/com/android/packageinstaller/InstallStaging.java b/packages/PackageInstaller/src/com/android/packageinstaller/InstallStaging.java index 483fb8c451ae..cf2f85ed5356 100644 --- a/packages/PackageInstaller/src/com/android/packageinstaller/InstallStaging.java +++ b/packages/PackageInstaller/src/com/android/packageinstaller/InstallStaging.java @@ -52,7 +52,7 @@ import java.io.OutputStream; * If a package gets installed from a content URI this step stages the installation session * reading bytes from the URI. */ -public class InstallStaging extends AlertActivity { +public class InstallStaging extends Activity { private static final String LOG_TAG = InstallStaging.class.getSimpleName(); private static final String STAGED_SESSION_ID = "STAGED_SESSION_ID"; @@ -65,6 +65,8 @@ public class InstallStaging extends AlertActivity { /** The session the package is in */ private int mStagedSessionId; + private AlertDialog mDialog; + @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); @@ -72,10 +74,13 @@ public class InstallStaging extends AlertActivity { mInstaller = getPackageManager().getPackageInstaller(); setFinishOnTouchOutside(true); - mAlert.setIcon(R.drawable.ic_file_download); - mAlert.setTitle(getString(R.string.app_name_unknown)); - mAlert.setView(R.layout.install_content_view); - mAlert.setButton(DialogInterface.BUTTON_NEGATIVE, getString(R.string.cancel), + + AlertDialog.Builder builder = new AlertDialog.Builder(this); + + builder.setIcon(R.drawable.ic_file_download); + builder.setTitle(getString(R.string.app_name_unknown)); + builder.setView(R.layout.install_content_view); + builder.setNegativeButton(getString(R.string.cancel), (ignored, ignored2) -> { if (mStagingTask != null) { mStagingTask.cancel(true); @@ -85,9 +90,21 @@ public class InstallStaging extends AlertActivity { setResult(RESULT_CANCELED); finish(); - }, null); - setupAlert(); - requireViewById(R.id.staging).setVisibility(View.VISIBLE); + }); + builder.setOnCancelListener(dialog -> { + if (mStagingTask != null) { + mStagingTask.cancel(true); + } + + cleanupStagingSession(); + + setResult(RESULT_CANCELED); + finish(); + }); + mDialog = builder.create(); + mDialog.show(); + mDialog.requireViewById(com.android.packageinstaller.R.id.staging) + .setVisibility(View.VISIBLE); if (savedInstanceState != null) { mStagedSessionId = savedInstanceState.getInt(STAGED_SESSION_ID, 0); @@ -275,8 +292,9 @@ public class InstallStaging extends AlertActivity { @Override protected void onPreExecute() { final long sizeBytes = getContentSizeBytes(); - - mProgressBar = sizeBytes > 0 ? requireViewById(R.id.progress_indeterminate) : null; + if (sizeBytes > 0 && mDialog != null) { + mProgressBar = mDialog.requireViewById(R.id.progress_indeterminate); + } if (mProgressBar != null) { mProgressBar.setProgress(0); mProgressBar.setMax(100); diff --git a/packages/PackageInstaller/src/com/android/packageinstaller/InstallStart.java b/packages/PackageInstaller/src/com/android/packageinstaller/InstallStart.java index 736e0efe872a..e2107ebe2525 100644 --- a/packages/PackageInstaller/src/com/android/packageinstaller/InstallStart.java +++ b/packages/PackageInstaller/src/com/android/packageinstaller/InstallStart.java @@ -40,7 +40,7 @@ import android.util.Log; import androidx.annotation.NonNull; import androidx.annotation.Nullable; - +import com.android.packageinstaller.v2.ui.InstallLaunch; import java.util.Arrays; /** @@ -57,9 +57,23 @@ public class InstallStart extends Activity { private final boolean mLocalLOGV = false; + // TODO (sumedhsen): Replace with an Android Feature Flag once implemented + private static final boolean USE_PIA_V2 = false; + @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); + + if (USE_PIA_V2) { + Intent piaV2 = new Intent(getIntent()); + piaV2.putExtra(InstallLaunch.EXTRA_CALLING_PKG_NAME, getCallingPackage()); + piaV2.putExtra(InstallLaunch.EXTRA_CALLING_PKG_UID, getLaunchedFromUid()); + piaV2.setClass(this, InstallLaunch.class); + piaV2.addFlags(Intent.FLAG_ACTIVITY_FORWARD_RESULT); + startActivity(piaV2); + finish(); + return; + } mPackageManager = getPackageManager(); mUserManager = getSystemService(UserManager.class); diff --git a/packages/PackageInstaller/src/com/android/packageinstaller/InstallSuccess.java b/packages/PackageInstaller/src/com/android/packageinstaller/InstallSuccess.java index fbc9525d4615..9af88c3b4694 100644 --- a/packages/PackageInstaller/src/com/android/packageinstaller/InstallSuccess.java +++ b/packages/PackageInstaller/src/com/android/packageinstaller/InstallSuccess.java @@ -17,6 +17,7 @@ package com.android.packageinstaller; import android.app.Activity; +import android.app.AlertDialog; import android.content.DialogInterface; import android.content.Intent; import android.content.pm.ApplicationInfo; @@ -34,7 +35,7 @@ import java.util.List; /** * Finish installation: Return status code to the caller or display "success" UI to user */ -public class InstallSuccess extends AlertActivity { +public class InstallSuccess extends Activity { private static final String LOG_TAG = InstallSuccess.class.getSimpleName(); @Nullable @@ -46,6 +47,8 @@ public class InstallSuccess extends AlertActivity { @Nullable private Intent mLaunchIntent; + private AlertDialog mDialog; + @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); @@ -83,20 +86,27 @@ public class InstallSuccess extends AlertActivity { return; } - mAlert.setIcon(mAppSnippet.icon); - mAlert.setTitle(mAppSnippet.label); - mAlert.setView(R.layout.install_content_view); - mAlert.setButton(DialogInterface.BUTTON_POSITIVE, getString(R.string.launch), null, - null); - mAlert.setButton(DialogInterface.BUTTON_NEGATIVE, getString(R.string.done), + AlertDialog.Builder builder = new AlertDialog.Builder(this); + builder.setIcon(mAppSnippet.icon); + builder.setTitle(mAppSnippet.label); + builder.setView(R.layout.install_content_view); + builder.setPositiveButton(getString(R.string.launch), null); + builder.setNegativeButton(getString(R.string.done), (ignored, ignored2) -> { if (mAppPackageName != null) { Log.i(LOG_TAG, "Finished installing " + mAppPackageName); } finish(); - }, null); - setupAlert(); - requireViewById(R.id.install_success).setVisibility(View.VISIBLE); + }); + builder.setOnCancelListener(dialog -> { + if (mAppPackageName != null) { + Log.i(LOG_TAG, "Finished installing " + mAppPackageName); + } + finish(); + }); + mDialog = builder.create(); + mDialog.show(); + mDialog.requireViewById(R.id.install_success).setVisibility(View.VISIBLE); // Enable or disable "launch" button boolean enabled = false; if (mLaunchIntent != null) { @@ -107,7 +117,7 @@ public class InstallSuccess extends AlertActivity { } } - Button launchButton = mAlert.getButton(DialogInterface.BUTTON_POSITIVE); + Button launchButton = mDialog.getButton(DialogInterface.BUTTON_POSITIVE); if (enabled) { launchButton.setOnClickListener(view -> { setResult(Activity.RESULT_OK, mLaunchIntent); diff --git a/packages/PackageInstaller/src/com/android/packageinstaller/PackageInstallerActivity.java b/packages/PackageInstaller/src/com/android/packageinstaller/PackageInstallerActivity.java index c5ae4a37b355..ceb580d170d0 100644 --- a/packages/PackageInstaller/src/com/android/packageinstaller/PackageInstallerActivity.java +++ b/packages/PackageInstaller/src/com/android/packageinstaller/PackageInstallerActivity.java @@ -71,7 +71,7 @@ import java.util.List; * Based on the user response the package is then installed by launching InstallAppConfirm * sub activity. All state transitions are handled in this activity */ -public class PackageInstallerActivity extends AlertActivity { +public class PackageInstallerActivity extends Activity { private static final String TAG = "PackageInstaller"; private static final int REQUEST_TRUST_EXTERNAL_SOURCE = 1; @@ -135,11 +135,13 @@ public class PackageInstallerActivity extends AlertActivity { // Would the mOk button be enabled if this activity would be resumed private boolean mEnableOk = false; + private AlertDialog mDialog; + private void startInstallConfirm() { TextView viewToEnable; if (mAppInfo != null) { - viewToEnable = requireViewById(R.id.install_confirm_question_update); + viewToEnable = mDialog.requireViewById(R.id.install_confirm_question_update); final CharSequence existingUpdateOwnerLabel = getExistingUpdateOwnerLabel(); final CharSequence requestedUpdateOwnerLabel = getApplicationLabel(mCallingPackage); @@ -157,7 +159,7 @@ public class PackageInstallerActivity extends AlertActivity { } } else { // This is a new application with no permissions. - viewToEnable = requireViewById(R.id.install_confirm_question); + viewToEnable = mDialog.requireViewById(R.id.install_confirm_question); } viewToEnable.setVisibility(View.VISIBLE); @@ -480,10 +482,11 @@ public class PackageInstallerActivity extends AlertActivity { } private void bindUi() { - mAlert.setIcon(mAppSnippet.icon); - mAlert.setTitle(mAppSnippet.label); - mAlert.setView(R.layout.install_content_view); - mAlert.setButton(DialogInterface.BUTTON_POSITIVE, getString(R.string.install), + AlertDialog.Builder builder = new AlertDialog.Builder(this); + builder.setIcon(mAppSnippet.icon); + builder.setTitle(mAppSnippet.label); + builder.setView(R.layout.install_content_view); + builder.setPositiveButton(getString(R.string.install), (ignored, ignored2) -> { if (mOk.isEnabled()) { if (mSessionId != -1) { @@ -493,20 +496,26 @@ public class PackageInstallerActivity extends AlertActivity { startInstall(); } } - }, null); - mAlert.setButton(DialogInterface.BUTTON_NEGATIVE, getString(R.string.cancel), + }); + builder.setNegativeButton(getString(R.string.cancel), (ignored, ignored2) -> { // Cancel and finish setActivityResult(RESULT_CANCELED); finish(); - }, null); - setupAlert(); + }); + builder.setOnCancelListener(dialog -> { + // Cancel and finish + setActivityResult(RESULT_CANCELED); + finish(); + }); + mDialog = builder.create(); + mDialog.show(); - mOk = mAlert.getButton(DialogInterface.BUTTON_POSITIVE); + mOk = mDialog.getButton(DialogInterface.BUTTON_POSITIVE); mOk.setEnabled(false); if (!mOk.isInTouchMode()) { - mAlert.getButton(DialogInterface.BUTTON_NEGATIVE).requestFocus(); + mDialog.getButton(DialogInterface.BUTTON_NEGATIVE).requestFocus(); } } diff --git a/packages/PackageInstaller/src/com/android/packageinstaller/v2/model/InstallRepository.java b/packages/PackageInstaller/src/com/android/packageinstaller/v2/model/InstallRepository.java new file mode 100644 index 000000000000..03af95180009 --- /dev/null +++ b/packages/PackageInstaller/src/com/android/packageinstaller/v2/model/InstallRepository.java @@ -0,0 +1,376 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.packageinstaller.v2.model; + +import static com.android.packageinstaller.v2.model.PackageUtil.canPackageQuery; +import static com.android.packageinstaller.v2.model.PackageUtil.isCallerSessionOwner; +import static com.android.packageinstaller.v2.model.PackageUtil.isInstallPermissionGrantedOrRequested; +import static com.android.packageinstaller.v2.model.PackageUtil.isPermissionGranted; +import static com.android.packageinstaller.v2.model.installstagedata.InstallAborted.ABORT_REASON_INTERNAL_ERROR; +import static com.android.packageinstaller.v2.model.installstagedata.InstallAborted.ABORT_REASON_POLICY; + +import android.Manifest; +import android.app.Activity; +import android.app.admin.DevicePolicyManager; +import android.content.ContentResolver; +import android.content.Context; +import android.content.Intent; +import android.content.pm.ApplicationInfo; +import android.content.pm.PackageInstaller; +import android.content.pm.PackageInstaller.SessionInfo; +import android.content.pm.PackageManager; +import android.content.res.AssetFileDescriptor; +import android.net.Uri; +import android.os.ParcelFileDescriptor; +import android.os.Process; +import android.os.UserManager; +import android.text.TextUtils; +import android.util.EventLog; +import android.util.Log; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.lifecycle.MutableLiveData; +import com.android.packageinstaller.v2.model.installstagedata.InstallAborted; +import com.android.packageinstaller.v2.model.installstagedata.InstallReady; +import com.android.packageinstaller.v2.model.installstagedata.InstallStage; +import com.android.packageinstaller.v2.model.installstagedata.InstallStaging; +import java.io.IOException; + +public class InstallRepository { + + private static final String SCHEME_PACKAGE = "package"; + private static final String TAG = InstallRepository.class.getSimpleName(); + private final Context mContext; + private final PackageManager mPackageManager; + private final PackageInstaller mPackageInstaller; + private final UserManager mUserManager; + private final DevicePolicyManager mDevicePolicyManager; + private final MutableLiveData<InstallStage> mStagingResult = new MutableLiveData<>(); + private final boolean mLocalLOGV = false; + private Intent mIntent; + private boolean mIsSessionInstall; + private boolean mIsTrustedSource; + /** + * Session ID for a session created when caller uses PackageInstaller APIs + */ + private int mSessionId; + /** + * Session ID for a session created by this app + */ + private int mStagedSessionId = SessionInfo.INVALID_ID; + private int mCallingUid; + private String mCallingPackage; + private SessionStager mSessionStager; + + public InstallRepository(Context context) { + mContext = context; + mPackageManager = context.getPackageManager(); + mPackageInstaller = mPackageManager.getPackageInstaller(); + mDevicePolicyManager = context.getSystemService(DevicePolicyManager.class); + mUserManager = context.getSystemService(UserManager.class); + } + + /** + * Extracts information from the incoming install intent, checks caller's permission to install + * packages, verifies that the caller is the install session owner (in case of a session based + * install) and checks if the current user has restrictions set that prevent app installation, + * + * @param intent the incoming {@link Intent} object for installing a package + * @param callerInfo {@link CallerInfo} that holds the callingUid and callingPackageName + * @return <p>{@link InstallAborted} if there are errors while performing the checks</p> + * <p>{@link InstallStaging} after successfully performing the checks</p> + */ + public InstallStage performPreInstallChecks(Intent intent, CallerInfo callerInfo) { + mIntent = intent; + + String callingAttributionTag = null; + + mIsSessionInstall = + PackageInstaller.ACTION_CONFIRM_PRE_APPROVAL.equals(intent.getAction()) + || PackageInstaller.ACTION_CONFIRM_INSTALL.equals(intent.getAction()); + + mSessionId = mIsSessionInstall + ? intent.getIntExtra(PackageInstaller.EXTRA_SESSION_ID, SessionInfo.INVALID_ID) + : SessionInfo.INVALID_ID; + + mCallingPackage = callerInfo.getPackageName(); + + if (mCallingPackage == null && mSessionId != SessionInfo.INVALID_ID) { + PackageInstaller.SessionInfo sessionInfo = mPackageInstaller.getSessionInfo(mSessionId); + mCallingPackage = (sessionInfo != null) ? sessionInfo.getInstallerPackageName() : null; + callingAttributionTag = + (sessionInfo != null) ? sessionInfo.getInstallerAttributionTag() : null; + } + + // Uid of the source package, coming from ActivityManager + mCallingUid = callerInfo.getUid(); + if (mCallingUid == Process.INVALID_UID) { + Log.e(TAG, "Could not determine the launching uid."); + } + final ApplicationInfo sourceInfo = getSourceInfo(mCallingPackage); + // Uid of the source package, with a preference to uid from ApplicationInfo + final int originatingUid = sourceInfo != null ? sourceInfo.uid : mCallingUid; + + if (mCallingUid == Process.INVALID_UID && sourceInfo == null) { + // Caller's identity could not be determined. Abort the install + return new InstallAborted.Builder(ABORT_REASON_INTERNAL_ERROR).build(); + } + + if (!isCallerSessionOwner(mPackageInstaller, originatingUid, mSessionId)) { + return new InstallAborted.Builder(ABORT_REASON_INTERNAL_ERROR).build(); + } + + mIsTrustedSource = isInstallRequestFromTrustedSource(sourceInfo, mIntent, originatingUid); + + if (!isInstallPermissionGrantedOrRequested(mContext, mCallingUid, originatingUid, + mIsTrustedSource)) { + return new InstallAborted.Builder(ABORT_REASON_INTERNAL_ERROR).build(); + } + + String restriction = getDevicePolicyRestrictions(); + if (restriction != null) { + InstallAborted.Builder abortedBuilder = + new InstallAborted.Builder(ABORT_REASON_POLICY).setMessage(restriction); + final Intent adminSupportDetailsIntent = + mDevicePolicyManager.createAdminSupportIntent(restriction); + if (adminSupportDetailsIntent != null) { + abortedBuilder.setResultIntent(adminSupportDetailsIntent); + } + return abortedBuilder.build(); + } + + maybeRemoveInvalidInstallerPackageName(callerInfo); + + return new InstallStaging(); + } + + /** + * @return the ApplicationInfo for the installation source (the calling package), if available + */ + @Nullable + private ApplicationInfo getSourceInfo(@Nullable String callingPackage) { + if (callingPackage == null) { + return null; + } + try { + return mPackageManager.getApplicationInfo(callingPackage, 0); + } catch (PackageManager.NameNotFoundException ignored) { + return null; + } + } + + private boolean isInstallRequestFromTrustedSource(ApplicationInfo sourceInfo, Intent intent, + int originatingUid) { + boolean isNotUnknownSource = intent.getBooleanExtra(Intent.EXTRA_NOT_UNKNOWN_SOURCE, false); + return sourceInfo != null && sourceInfo.isPrivilegedApp() + && (isNotUnknownSource + || isPermissionGranted(mContext, Manifest.permission.INSTALL_PACKAGES, originatingUid)); + } + + private String getDevicePolicyRestrictions() { + final String[] restrictions = new String[]{ + UserManager.DISALLOW_INSTALL_APPS, + UserManager.DISALLOW_INSTALL_UNKNOWN_SOURCES, + UserManager.DISALLOW_INSTALL_UNKNOWN_SOURCES_GLOBALLY + }; + + for (String restriction : restrictions) { + if (!mUserManager.hasUserRestrictionForUser(restriction, Process.myUserHandle())) { + continue; + } + return restriction; + } + return null; + } + + private void maybeRemoveInvalidInstallerPackageName(CallerInfo callerInfo) { + final String installerPackageNameFromIntent = + mIntent.getStringExtra(Intent.EXTRA_INSTALLER_PACKAGE_NAME); + if (installerPackageNameFromIntent == null) { + return; + } + if (!TextUtils.equals(installerPackageNameFromIntent, callerInfo.getPackageName()) + && !isPermissionGranted(mPackageManager, Manifest.permission.INSTALL_PACKAGES, + callerInfo.getPackageName())) { + Log.e(TAG, "The given installer package name " + installerPackageNameFromIntent + + " is invalid. Remove it."); + EventLog.writeEvent(0x534e4554, "236687884", callerInfo.getUid(), + "Invalid EXTRA_INSTALLER_PACKAGE_NAME"); + mIntent.removeExtra(Intent.EXTRA_INSTALLER_PACKAGE_NAME); + } + } + + public void stageForInstall() { + Uri uri = mIntent.getData(); + if (mIsSessionInstall || (uri != null && SCHEME_PACKAGE.equals(uri.getScheme()))) { + // For a session based install or installing with a package:// URI, there is no file + // for us to stage. Setting the mStagingResult as null will signal InstallViewModel to + // proceed with user confirmation stage. + mStagingResult.setValue(new InstallReady()); + return; + } + if (uri != null + && ContentResolver.SCHEME_CONTENT.equals(uri.getScheme()) + && canPackageQuery(mContext, mCallingUid, uri)) { + + if (mStagedSessionId > 0) { + final PackageInstaller.SessionInfo info = + mPackageInstaller.getSessionInfo(mStagedSessionId); + if (info == null || !info.isActive() || info.getResolvedBaseApkPath() == null) { + Log.w(TAG, "Session " + mStagedSessionId + " in funky state; ignoring"); + if (info != null) { + cleanupStagingSession(); + } + mStagedSessionId = 0; + } + } + + // Session does not exist, or became invalid. + if (mStagedSessionId <= 0) { + // Create session here to be able to show error. + try (final AssetFileDescriptor afd = + mContext.getContentResolver().openAssetFileDescriptor(uri, "r")) { + ParcelFileDescriptor pfd = afd != null ? afd.getParcelFileDescriptor() : null; + PackageInstaller.SessionParams params = + createSessionParams(mIntent, pfd, uri.toString()); + mStagedSessionId = mPackageInstaller.createSession(params); + } catch (IOException e) { + Log.w(TAG, "Failed to create a staging session", e); + mStagingResult.setValue( + new InstallAborted.Builder(ABORT_REASON_INTERNAL_ERROR) + .setResultIntent(new Intent().putExtra(Intent.EXTRA_INSTALL_RESULT, + PackageManager.INSTALL_FAILED_INVALID_APK)) + .setActivityResultCode(Activity.RESULT_FIRST_USER) + .build()); + return; + } + } + + SessionStageListener listener = new SessionStageListener() { + @Override + public void onStagingSuccess(SessionInfo info) { + //TODO: Verify if the returned sessionInfo should be used anywhere + mStagingResult.setValue(new InstallReady()); + } + + @Override + public void onStagingFailure() { + cleanupStagingSession(); + mStagingResult.setValue( + new InstallAborted.Builder(ABORT_REASON_INTERNAL_ERROR) + .setResultIntent(new Intent().putExtra(Intent.EXTRA_INSTALL_RESULT, + PackageManager.INSTALL_FAILED_INVALID_APK)) + .setActivityResultCode(Activity.RESULT_FIRST_USER) + .build()); + } + }; + if (mSessionStager != null) { + mSessionStager.cancel(true); + } + mSessionStager = new SessionStager(mContext, uri, mStagedSessionId, listener); + mSessionStager.execute(); + } + } + + private void cleanupStagingSession() { + if (mStagedSessionId > 0) { + try { + mPackageInstaller.abandonSession(mStagedSessionId); + } catch (SecurityException ignored) { + } + mStagedSessionId = 0; + } + } + + private PackageInstaller.SessionParams createSessionParams(@NonNull Intent intent, + @Nullable ParcelFileDescriptor pfd, @NonNull String debugPathName) { + PackageInstaller.SessionParams params = new PackageInstaller.SessionParams( + PackageInstaller.SessionParams.MODE_FULL_INSTALL); + final Uri referrerUri = intent.getParcelableExtra(Intent.EXTRA_REFERRER, Uri.class); + params.setPackageSource( + referrerUri != null ? PackageInstaller.PACKAGE_SOURCE_DOWNLOADED_FILE + : PackageInstaller.PACKAGE_SOURCE_LOCAL_FILE); + params.setInstallAsInstantApp(false); + params.setReferrerUri(referrerUri); + params.setOriginatingUri( + intent.getParcelableExtra(Intent.EXTRA_ORIGINATING_URI, Uri.class)); + params.setOriginatingUid(intent.getIntExtra(Intent.EXTRA_ORIGINATING_UID, + Process.INVALID_UID)); + params.setInstallerPackageName(intent.getStringExtra(Intent.EXTRA_INSTALLER_PACKAGE_NAME)); + params.setInstallReason(PackageManager.INSTALL_REASON_USER); + // Disable full screen intent usage by for sideloads. + params.setPermissionState(Manifest.permission.USE_FULL_SCREEN_INTENT, + PackageInstaller.SessionParams.PERMISSION_STATE_DENIED); + + if (pfd != null) { + try { + final PackageInstaller.InstallInfo result = mPackageInstaller.readInstallInfo(pfd, + debugPathName, 0); + params.setAppPackageName(result.getPackageName()); + params.setInstallLocation(result.getInstallLocation()); + params.setSize(result.calculateInstalledSize(params, pfd)); + } catch (PackageInstaller.PackageParsingException e) { + Log.e(TAG, "Cannot parse package " + debugPathName + ". Assuming defaults.", e); + params.setSize(pfd.getStatSize()); + } catch (IOException e) { + Log.e(TAG, + "Cannot calculate installed size " + debugPathName + + ". Try only apk size.", e); + } + } else { + Log.e(TAG, "Cannot parse package " + debugPathName + ". Assuming defaults."); + } + return params; + } + + public MutableLiveData<Integer> getStagingProgress() { + if (mSessionStager != null) { + return mSessionStager.getProgress(); + } + return new MutableLiveData<>(0); + } + + public MutableLiveData<InstallStage> getStagingResult() { + return mStagingResult; + } + + public interface SessionStageListener { + + void onStagingSuccess(SessionInfo info); + + void onStagingFailure(); + } + + public static class CallerInfo { + + private final String mPackageName; + private final int mUid; + + public CallerInfo(String packageName, int uid) { + mPackageName = packageName; + mUid = uid; + } + + public String getPackageName() { + return mPackageName; + } + + public int getUid() { + return mUid; + } + } +} diff --git a/packages/PackageInstaller/src/com/android/packageinstaller/v2/model/PackageUtil.java b/packages/PackageInstaller/src/com/android/packageinstaller/v2/model/PackageUtil.java new file mode 100644 index 000000000000..82a8c9598051 --- /dev/null +++ b/packages/PackageInstaller/src/com/android/packageinstaller/v2/model/PackageUtil.java @@ -0,0 +1,215 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.packageinstaller.v2.model; + +import android.Manifest; +import android.content.Context; +import android.content.pm.ApplicationInfo; +import android.content.pm.PackageInfo; +import android.content.pm.PackageInstaller; +import android.content.pm.PackageInstaller.SessionInfo; +import android.content.pm.PackageManager; +import android.content.pm.ProviderInfo; +import android.net.Uri; +import android.os.Build; +import android.os.Process; +import android.util.Log; +import androidx.annotation.NonNull; +import java.util.Arrays; + +public class PackageUtil { + + private static final String TAG = InstallRepository.class.getSimpleName(); + private static final String DOWNLOADS_AUTHORITY = "downloads"; + + /** + * Determines if the UID belongs to the system downloads provider and returns the + * {@link ApplicationInfo} of the provider + * + * @param uid UID of the caller + * @return {@link ApplicationInfo} of the provider if a downloads provider exists, it is a + * system app, and its UID matches with the passed UID, null otherwise. + */ + public static ApplicationInfo getSystemDownloadsProviderInfo(PackageManager pm, int uid) { + final ProviderInfo providerInfo = pm.resolveContentProvider( + DOWNLOADS_AUTHORITY, 0); + if (providerInfo == null) { + // There seems to be no currently enabled downloads provider on the system. + return null; + } + ApplicationInfo appInfo = providerInfo.applicationInfo; + if ((appInfo.flags & ApplicationInfo.FLAG_SYSTEM) != 0 && uid == appInfo.uid) { + return appInfo; + } + return null; + } + + /** + * Get the maximum target sdk for a UID. + * + * @param context The context to use + * @param uid The UID requesting the install/uninstall + * @return The maximum target SDK or -1 if the uid does not match any packages. + */ + public static int getMaxTargetSdkVersionForUid(@NonNull Context context, int uid) { + PackageManager pm = context.getPackageManager(); + final String[] packages = pm.getPackagesForUid(uid); + int targetSdkVersion = -1; + if (packages != null) { + for (String packageName : packages) { + try { + ApplicationInfo info = pm.getApplicationInfo(packageName, 0); + targetSdkVersion = Math.max(targetSdkVersion, info.targetSdkVersion); + } catch (PackageManager.NameNotFoundException e) { + // Ignore and try the next package + } + } + } + return targetSdkVersion; + } + + public static boolean canPackageQuery(Context context, int callingUid, Uri packageUri) { + PackageManager pm = context.getPackageManager(); + ProviderInfo info = pm.resolveContentProvider(packageUri.getAuthority(), + PackageManager.ComponentInfoFlags.of(0)); + if (info == null) { + return false; + } + String targetPackage = info.packageName; + + String[] callingPackages = pm.getPackagesForUid(callingUid); + if (callingPackages == null) { + return false; + } + for (String callingPackage : callingPackages) { + try { + if (pm.canPackageQuery(callingPackage, targetPackage)) { + return true; + } + } catch (PackageManager.NameNotFoundException e) { + // no-op + } + } + return false; + } + + /** + * @param context the {@link Context} object + * @param permission the permission name to check + * @param callingUid the UID of the caller who's permission is being checked + * @return {@code true} if the callingUid is granted the said permission + */ + public static boolean isPermissionGranted(Context context, String permission, int callingUid) { + return context.checkPermission(permission, -1, callingUid) + == PackageManager.PERMISSION_GRANTED; + } + + /** + * @param pm the {@link PackageManager} object + * @param permission the permission name to check + * @param packageName the name of the package who's permission is being checked + * @return {@code true} if the package is granted the said permission + */ + public static boolean isPermissionGranted(PackageManager pm, String permission, + String packageName) { + return pm.checkPermission(permission, packageName) == PackageManager.PERMISSION_GRANTED; + } + + /** + * @param context the {@link Context} object + * @param callingUid the UID of the caller who's permission is being checked + * @param originatingUid the UID from where install is being originated. This could be same as + * callingUid or it will be the UID of the package performing a session based install + * @param isTrustedSource whether install request is coming from a privileged app or an app that + * has {@link Manifest.permission.INSTALL_PACKAGES} permission granted + * @return {@code true} if the package is granted the said permission + */ + public static boolean isInstallPermissionGrantedOrRequested(Context context, int callingUid, + int originatingUid, boolean isTrustedSource) { + boolean isDocumentsManager = + isPermissionGranted(context, Manifest.permission.MANAGE_DOCUMENTS, callingUid); + boolean isSystemDownloadsProvider = + getSystemDownloadsProviderInfo(context.getPackageManager(), callingUid) != null; + + if (!isTrustedSource && !isSystemDownloadsProvider && !isDocumentsManager) { + + final int targetSdkVersion = getMaxTargetSdkVersionForUid(context, originatingUid); + if (targetSdkVersion < 0) { + // Invalid originating uid supplied. Abort install. + Log.w(TAG, "Cannot get target sdk version for uid " + originatingUid); + return false; + } else if (targetSdkVersion >= Build.VERSION_CODES.O + && !isUidRequestingPermission(context.getPackageManager(), originatingUid, + Manifest.permission.REQUEST_INSTALL_PACKAGES)) { + Log.e(TAG, "Requesting uid " + originatingUid + " needs to declare permission " + + Manifest.permission.REQUEST_INSTALL_PACKAGES); + return false; + } + } + return true; + } + + /** + * @param pm the {@link PackageManager} object + * @param uid the UID of the caller who's permission is being checked + * @param permission the permission name to check + * @return {@code true} if the caller is requesting the said permission in its Manifest + */ + public static boolean isUidRequestingPermission(PackageManager pm, int uid, String permission) { + final String[] packageNames = pm.getPackagesForUid(uid); + if (packageNames == null) { + return false; + } + for (final String packageName : packageNames) { + final PackageInfo packageInfo; + try { + packageInfo = pm.getPackageInfo(packageName, + PackageManager.GET_PERMISSIONS); + } catch (PackageManager.NameNotFoundException e) { + // Ignore and try the next package + continue; + } + if (packageInfo.requestedPermissions != null + && Arrays.asList(packageInfo.requestedPermissions).contains(permission)) { + return true; + } + } + return false; + } + + /** + * @param pi the {@link PackageInstaller} object to use + * @param originatingUid the UID of the package performing a session based install + * @param sessionId ID of the install session + * @return {@code true} if the caller is the session owner + */ + public static boolean isCallerSessionOwner(PackageInstaller pi, int originatingUid, + int sessionId) { + if (sessionId == SessionInfo.INVALID_ID) { + return false; + } + if (originatingUid == Process.ROOT_UID) { + return true; + } + PackageInstaller.SessionInfo sessionInfo = pi.getSessionInfo(sessionId); + if (sessionInfo == null) { + return false; + } + int installerUid = sessionInfo.getInstallerUid(); + return originatingUid == installerUid; + } +} diff --git a/packages/PackageInstaller/src/com/android/packageinstaller/v2/model/SessionStager.java b/packages/PackageInstaller/src/com/android/packageinstaller/v2/model/SessionStager.java new file mode 100644 index 000000000000..a2c81f11cf68 --- /dev/null +++ b/packages/PackageInstaller/src/com/android/packageinstaller/v2/model/SessionStager.java @@ -0,0 +1,126 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.packageinstaller.v2.model; + +import static android.content.res.AssetFileDescriptor.UNKNOWN_LENGTH; + +import android.content.Context; +import android.content.pm.PackageInstaller; +import android.content.pm.PackageInstaller.SessionInfo; +import android.content.res.AssetFileDescriptor; +import android.net.Uri; +import android.os.AsyncTask; +import android.util.Log; +import androidx.lifecycle.MutableLiveData; +import com.android.packageinstaller.v2.model.InstallRepository.SessionStageListener; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; + +public class SessionStager extends AsyncTask<Void, Integer, SessionInfo> { + + private static final String TAG = SessionStager.class.getSimpleName(); + private final Context mContext; + private final Uri mUri; + private final int mStagedSessionId; + private final MutableLiveData<Integer> mProgressLiveData = new MutableLiveData<>(0); + private final SessionStageListener mListener; + + SessionStager(Context context, Uri uri, int stagedSessionId, SessionStageListener listener) { + mContext = context; + mUri = uri; + mStagedSessionId = stagedSessionId; + mListener = listener; + } + + @Override + protected PackageInstaller.SessionInfo doInBackground(Void... params) { + PackageInstaller pi = mContext.getPackageManager().getPackageInstaller(); + try (PackageInstaller.Session session = pi.openSession(mStagedSessionId); + InputStream in = mContext.getContentResolver().openInputStream(mUri)) { + session.setStagingProgress(0); + + if (in == null) { + return null; + } + final long sizeBytes = getContentSizeBytes(); + mProgressLiveData.postValue(sizeBytes > 0 ? 0 : -1); + + long totalRead = 0; + try (OutputStream out = session.openWrite("PackageInstaller", 0, sizeBytes)) { + byte[] buffer = new byte[1024 * 1024]; + while (true) { + int numRead = in.read(buffer); + + if (numRead == -1) { + session.fsync(out); + break; + } + + if (isCancelled()) { + break; + } + + out.write(buffer, 0, numRead); + if (sizeBytes > 0) { + totalRead += numRead; + float fraction = ((float) totalRead / (float) sizeBytes); + session.setStagingProgress(fraction); + publishProgress((int) (fraction * 100.0)); + } + } + } + return pi.getSessionInfo(mStagedSessionId); + } catch (IOException | SecurityException | IllegalStateException + | IllegalArgumentException e) { + Log.w(TAG, "Error staging apk from content URI", e); + return null; + } + } + + private long getContentSizeBytes() { + try (AssetFileDescriptor afd = mContext.getContentResolver() + .openAssetFileDescriptor(mUri, "r")) { + return afd != null ? afd.getLength() : UNKNOWN_LENGTH; + } catch (IOException e) { + Log.w(TAG, "Failed to open asset file descriptor", e); + return UNKNOWN_LENGTH; + } + } + + public MutableLiveData<Integer> getProgress() { + return mProgressLiveData; + } + + @Override + protected void onProgressUpdate(Integer... progress) { + if (progress != null && progress.length > 0) { + mProgressLiveData.setValue(progress[0]); + } + } + + @Override + protected void onPostExecute(SessionInfo sessionInfo) { + if (sessionInfo == null || !sessionInfo.isActive() + || sessionInfo.getResolvedBaseApkPath() == null) { + Log.w(TAG, "Session info is invalid: " + sessionInfo); + mListener.onStagingFailure(); + return; + } + mListener.onStagingSuccess(sessionInfo); + } +} diff --git a/packages/PackageInstaller/src/com/android/packageinstaller/v2/model/installstagedata/InstallAborted.java b/packages/PackageInstaller/src/com/android/packageinstaller/v2/model/installstagedata/InstallAborted.java new file mode 100644 index 000000000000..cc9857d45bc4 --- /dev/null +++ b/packages/PackageInstaller/src/com/android/packageinstaller/v2/model/installstagedata/InstallAborted.java @@ -0,0 +1,112 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.packageinstaller.v2.model.installstagedata; + + +import android.app.Activity; +import android.content.Intent; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; + +public class InstallAborted extends InstallStage { + + public static final int ABORT_REASON_INTERNAL_ERROR = 0; + public static final int ABORT_REASON_POLICY = 1; + private final int mStage = InstallStage.STAGE_ABORTED; + private final int mAbortReason; + + /** + * It will hold the restriction name, when the restriction was enforced by the system, and not + * a device admin. + */ + @NonNull + private final String mMessage; + /** + * <p>If abort reason is ABORT_REASON_POLICY, then this will hold the Intent + * to display a support dialog when a feature was disabled by an admin. It will be + * {@code null} if the feature is disabled by the system. In this case, the restriction name + * will be set in {@link #mMessage} </p> + * + * <p>If the abort reason is ABORT_REASON_INTERNAL_ERROR, it <b>may</b> hold an + * intent to be sent as a result to the calling activity.</p> + */ + @Nullable + private final Intent mIntent; + private final int mActivityResultCode; + + private InstallAborted(int reason, @NonNull String message, @Nullable Intent intent, + int activityResultCode) { + mAbortReason = reason; + mMessage = message; + mIntent = intent; + mActivityResultCode = activityResultCode; + } + + public int getAbortReason() { + return mAbortReason; + } + + @NonNull + public String getMessage() { + return mMessage; + } + + @Nullable + public Intent getResultIntent() { + return mIntent; + } + + public int getActivityResultCode() { + return mActivityResultCode; + } + + @Override + public int getStageCode() { + return mStage; + } + + public static class Builder { + + private final int mAbortReason; + private String mMessage = ""; + private Intent mIntent = null; + private int mActivityResultCode = Activity.RESULT_CANCELED; + + public Builder(int reason) { + mAbortReason = reason; + } + + public Builder setMessage(@NonNull String message) { + mMessage = message; + return this; + } + + public Builder setResultIntent(@NonNull Intent intent) { + mIntent = intent; + return this; + } + + public Builder setActivityResultCode(int resultCode) { + mActivityResultCode = resultCode; + return this; + } + + public InstallAborted build() { + return new InstallAborted(mAbortReason, mMessage, mIntent, mActivityResultCode); + } + } +} diff --git a/packages/PackageInstaller/src/com/android/packageinstaller/v2/model/installstagedata/InstallReady.java b/packages/PackageInstaller/src/com/android/packageinstaller/v2/model/installstagedata/InstallReady.java new file mode 100644 index 000000000000..548f2c544da7 --- /dev/null +++ b/packages/PackageInstaller/src/com/android/packageinstaller/v2/model/installstagedata/InstallReady.java @@ -0,0 +1,27 @@ +/* + * 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 + * + * https://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.packageinstaller.v2.model.installstagedata; + +public class InstallReady extends InstallStage{ + + private final int mStage = InstallStage.STAGE_READY; + + @Override + public int getStageCode() { + return mStage; + } +} diff --git a/packages/PackageInstaller/src/com/android/packageinstaller/v2/model/installstagedata/InstallStage.java b/packages/PackageInstaller/src/com/android/packageinstaller/v2/model/installstagedata/InstallStage.java new file mode 100644 index 000000000000..f91e64bdc326 --- /dev/null +++ b/packages/PackageInstaller/src/com/android/packageinstaller/v2/model/installstagedata/InstallStage.java @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.packageinstaller.v2.model.installstagedata; + +public abstract class InstallStage { + + public static final int STAGE_DEFAULT = -1; + public static final int STAGE_ABORTED = 0; + public static final int STAGE_STAGING = 1; + public static final int STAGE_READY = 2; + public static final int STAGE_USER_ACTION_REQUIRED = 3; + public static final int STAGE_INSTALLING = 4; + public static final int STAGE_SUCCESS = 5; + public static final int STAGE_FAILED = 6; + + /** + * @return the integer value representing current install stage. + */ + public abstract int getStageCode(); +} diff --git a/packages/PackageInstaller/src/com/android/packageinstaller/v2/model/installstagedata/InstallStaging.java b/packages/PackageInstaller/src/com/android/packageinstaller/v2/model/installstagedata/InstallStaging.java new file mode 100644 index 000000000000..a979cf87c350 --- /dev/null +++ b/packages/PackageInstaller/src/com/android/packageinstaller/v2/model/installstagedata/InstallStaging.java @@ -0,0 +1,27 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.packageinstaller.v2.model.installstagedata; + +public class InstallStaging extends InstallStage { + + private final int mStage = InstallStage.STAGE_STAGING; + + @Override + public int getStageCode() { + return mStage; + } +} diff --git a/packages/PackageInstaller/src/com/android/packageinstaller/v2/ui/InstallLaunch.java b/packages/PackageInstaller/src/com/android/packageinstaller/v2/ui/InstallLaunch.java new file mode 100644 index 000000000000..ba5a0cdc7b0d --- /dev/null +++ b/packages/PackageInstaller/src/com/android/packageinstaller/v2/ui/InstallLaunch.java @@ -0,0 +1,172 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.packageinstaller.v2.ui; + +import static android.os.Process.INVALID_UID; +import static com.android.packageinstaller.v2.model.installstagedata.InstallAborted.ABORT_REASON_INTERNAL_ERROR; +import static com.android.packageinstaller.v2.model.installstagedata.InstallAborted.ABORT_REASON_POLICY; + +import android.content.Intent; +import android.os.Bundle; +import android.os.UserManager; +import android.util.Log; +import android.view.Window; +import androidx.annotation.Nullable; +import androidx.fragment.app.DialogFragment; +import androidx.fragment.app.FragmentActivity; +import androidx.fragment.app.FragmentManager; +import androidx.lifecycle.ViewModelProvider; +import com.android.packageinstaller.R; +import com.android.packageinstaller.v2.model.InstallRepository; +import com.android.packageinstaller.v2.model.InstallRepository.CallerInfo; +import com.android.packageinstaller.v2.model.installstagedata.InstallAborted; +import com.android.packageinstaller.v2.model.installstagedata.InstallStage; +import com.android.packageinstaller.v2.ui.fragments.InstallStagingFragment; +import com.android.packageinstaller.v2.ui.fragments.SimpleErrorFragment; +import com.android.packageinstaller.v2.viewmodel.InstallViewModel; +import com.android.packageinstaller.v2.viewmodel.InstallViewModelFactory; + +public class InstallLaunch extends FragmentActivity { + + public static final String EXTRA_CALLING_PKG_UID = + InstallLaunch.class.getPackageName() + ".callingPkgUid"; + public static final String EXTRA_CALLING_PKG_NAME = + InstallLaunch.class.getPackageName() + ".callingPkgName"; + private static final String TAG = InstallLaunch.class.getSimpleName(); + private static final String TAG_DIALOG = "dialog"; + private final boolean mLocalLOGV = false; + private InstallViewModel mInstallViewModel; + private InstallRepository mInstallRepository; + + private FragmentManager mFragmentManager; + + @Override + protected void onCreate(@Nullable Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + + this.requestWindowFeature(Window.FEATURE_NO_TITLE); + + mFragmentManager = getSupportFragmentManager(); + mInstallRepository = new InstallRepository(getApplicationContext()); + mInstallViewModel = new ViewModelProvider(this, + new InstallViewModelFactory(this.getApplication(), mInstallRepository)).get( + InstallViewModel.class); + + Intent intent = getIntent(); + CallerInfo info = new CallerInfo( + intent.getStringExtra(EXTRA_CALLING_PKG_NAME), + intent.getIntExtra(EXTRA_CALLING_PKG_UID, INVALID_UID)); + mInstallViewModel.preprocessIntent(intent, info); + + mInstallViewModel.getCurrentInstallStage().observe(this, this::onInstallStageChange); + } + + /** + * Main controller of the UI. This method shows relevant dialogs based on the install stage + */ + private void onInstallStageChange(InstallStage installStage) { + if (installStage.getStageCode() == InstallStage.STAGE_STAGING) { + InstallStagingFragment stagingDialog = new InstallStagingFragment(); + showDialogInner(stagingDialog); + mInstallViewModel.getStagingProgress().observe(this, stagingDialog::setProgress); + } else if (installStage.getStageCode() == InstallStage.STAGE_ABORTED) { + InstallAborted aborted = (InstallAborted) installStage; + switch (aborted.getAbortReason()) { + // TODO: check if any dialog is to be shown for ABORT_REASON_INTERNAL_ERROR + case ABORT_REASON_INTERNAL_ERROR -> setResult(RESULT_CANCELED, true); + case ABORT_REASON_POLICY -> showPolicyRestrictionDialog(aborted); + default -> setResult(RESULT_CANCELED, true); + } + } else { + Log.d(TAG, "Unimplemented stage: " + installStage.getStageCode()); + showDialogInner(null); + } + } + + private void showPolicyRestrictionDialog(InstallAborted aborted) { + String restriction = aborted.getMessage(); + Intent adminSupportIntent = aborted.getResultIntent(); + boolean shouldFinish; + + // If the given restriction is set by an admin, display information about the + // admin enforcing the restriction for the affected user. If not enforced by the admin, + // show the system dialog. + if (adminSupportIntent != null) { + if (mLocalLOGV) { + Log.i(TAG, "Restriction set by admin, starting " + adminSupportIntent); + } + startActivity(adminSupportIntent); + // Finish the package installer app since the next dialog will not be shown by this app + shouldFinish = true; + } else { + if (mLocalLOGV) { + Log.i(TAG, "Restriction set by system: " + restriction); + } + DialogFragment blockedByPolicyDialog = createDevicePolicyRestrictionDialog(restriction); + // Don't finish the package installer app since the next dialog + // will be shown by this app + shouldFinish = false; + showDialogInner(blockedByPolicyDialog); + } + setResult(RESULT_CANCELED, shouldFinish); + } + + /** + * Create a new dialog based on the install restriction enforced. + * + * @param restriction The restriction to create the dialog for + * @return The dialog + */ + private DialogFragment createDevicePolicyRestrictionDialog(String restriction) { + if (mLocalLOGV) { + Log.i(TAG, "createDialog(" + restriction + ")"); + } + return switch (restriction) { + case UserManager.DISALLOW_INSTALL_APPS -> + new SimpleErrorFragment(R.string.install_apps_user_restriction_dlg_text); + case UserManager.DISALLOW_INSTALL_UNKNOWN_SOURCES, + UserManager.DISALLOW_INSTALL_UNKNOWN_SOURCES_GLOBALLY -> + new SimpleErrorFragment(R.string.unknown_apps_user_restriction_dlg_text); + default -> null; + }; + } + + /** + * Replace any visible dialog by the dialog returned by InstallRepository + * + * @param newDialog The new dialog to display + */ + private void showDialogInner(@Nullable DialogFragment newDialog) { + DialogFragment currentDialog = (DialogFragment) mFragmentManager.findFragmentByTag( + TAG_DIALOG); + if (currentDialog != null) { + currentDialog.dismissAllowingStateLoss(); + } + if (newDialog != null) { + newDialog.show(mFragmentManager, TAG_DIALOG); + } + } + + public void setResult(int resultCode, boolean shouldFinish) { + // TODO: This is incomplete. We need to send RESULT_FIRST_USER, RESULT_OK etc + // for relevant use cases. Investigate when to send what result. + super.setResult(resultCode); + if (shouldFinish) { + finish(); + } + } +} diff --git a/packages/PackageInstaller/src/com/android/packageinstaller/v2/ui/fragments/InstallStagingFragment.java b/packages/PackageInstaller/src/com/android/packageinstaller/v2/ui/fragments/InstallStagingFragment.java new file mode 100644 index 000000000000..feb24282e0a5 --- /dev/null +++ b/packages/PackageInstaller/src/com/android/packageinstaller/v2/ui/fragments/InstallStagingFragment.java @@ -0,0 +1,69 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.packageinstaller.v2.ui.fragments; + +import android.app.AlertDialog; +import android.app.Dialog; +import android.content.DialogInterface; +import android.os.Bundle; +import android.view.View; +import android.widget.ProgressBar; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.fragment.app.DialogFragment; +import com.android.packageinstaller.R; + +public class InstallStagingFragment extends DialogFragment { + + private static final String TAG = InstallStagingFragment.class.getSimpleName(); + private ProgressBar mProgressBar; + private AlertDialog mDialog; + + @NonNull + @Override + public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) { + View dialogView = getLayoutInflater().inflate(R.layout.install_content_view, null); + dialogView.requireViewById(R.id.staging).setVisibility(View.VISIBLE); + + mDialog = new AlertDialog.Builder(requireContext()) + .setTitle(getString(R.string.app_name_unknown)) + .setIcon(R.drawable.ic_file_download) + .setView(dialogView) + .setNegativeButton(R.string.cancel, null) + .setCancelable(false) + .create(); + + mDialog.setCanceledOnTouchOutside(false); + return mDialog; + } + + @Override + public void onStart() { + super.onStart(); + mDialog.getButton(DialogInterface.BUTTON_NEGATIVE).setEnabled(false); + mProgressBar = mDialog.requireViewById(R.id.progress_indeterminate); + mProgressBar.setProgress(0); + mProgressBar.setMax(100); + mProgressBar.setIndeterminate(false); + } + + public void setProgress(int progress) { + if (mProgressBar != null) { + mProgressBar.setProgress(progress); + } + } +} diff --git a/packages/PackageInstaller/src/com/android/packageinstaller/v2/ui/fragments/SimpleErrorFragment.java b/packages/PackageInstaller/src/com/android/packageinstaller/v2/ui/fragments/SimpleErrorFragment.java new file mode 100644 index 000000000000..dce0b9abd035 --- /dev/null +++ b/packages/PackageInstaller/src/com/android/packageinstaller/v2/ui/fragments/SimpleErrorFragment.java @@ -0,0 +1,51 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.packageinstaller.v2.ui.fragments; + +import android.app.Activity; +import android.app.AlertDialog; +import android.app.Dialog; +import android.content.DialogInterface; +import android.os.Bundle; +import androidx.annotation.NonNull; +import androidx.fragment.app.DialogFragment; +import com.android.packageinstaller.R; + +public class SimpleErrorFragment extends DialogFragment { + + private static final String TAG = SimpleErrorFragment.class.getSimpleName(); + private final int mMessageResId; + + public SimpleErrorFragment(int messageResId) { + mMessageResId = messageResId; + } + + @NonNull + @Override + public Dialog onCreateDialog(Bundle savedInstanceState) { + return new AlertDialog.Builder(getActivity()) + .setMessage(mMessageResId) + .setPositiveButton(R.string.ok, (dialog, which) -> getActivity().finish()) + .create(); + } + + @Override + public void onCancel(DialogInterface dialog) { + getActivity().setResult(Activity.RESULT_CANCELED); + getActivity().finish(); + } +} diff --git a/packages/PackageInstaller/src/com/android/packageinstaller/v2/viewmodel/InstallViewModel.java b/packages/PackageInstaller/src/com/android/packageinstaller/v2/viewmodel/InstallViewModel.java new file mode 100644 index 000000000000..42b30234288d --- /dev/null +++ b/packages/PackageInstaller/src/com/android/packageinstaller/v2/viewmodel/InstallViewModel.java @@ -0,0 +1,70 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.packageinstaller.v2.viewmodel; + +import android.app.Application; +import android.content.Intent; +import androidx.annotation.NonNull; +import androidx.lifecycle.AndroidViewModel; +import androidx.lifecycle.MediatorLiveData; +import androidx.lifecycle.MutableLiveData; +import com.android.packageinstaller.v2.model.InstallRepository; +import com.android.packageinstaller.v2.model.InstallRepository.CallerInfo; +import com.android.packageinstaller.v2.model.installstagedata.InstallStage; +import com.android.packageinstaller.v2.model.installstagedata.InstallStaging; + + +public class InstallViewModel extends AndroidViewModel { + + private static final String TAG = InstallViewModel.class.getSimpleName(); + private final InstallRepository mRepository; + private final MediatorLiveData<InstallStage> mCurrentInstallStage = new MediatorLiveData<>( + new InstallStaging()); + + public InstallViewModel(@NonNull Application application, InstallRepository repository) { + super(application); + mRepository = repository; + } + + public MutableLiveData<InstallStage> getCurrentInstallStage() { + return mCurrentInstallStage; + } + + public void preprocessIntent(Intent intent, CallerInfo callerInfo) { + InstallStage stage = mRepository.performPreInstallChecks(intent, callerInfo); + if (stage.getStageCode() == InstallStage.STAGE_ABORTED) { + mCurrentInstallStage.setValue(stage); + } else { + // Since staging is an async operation, we will get the staging result later in time. + // Result of the file staging will be set in InstallRepository#mStagingResult. + // As such, mCurrentInstallStage will need to add another MutableLiveData + // as a data source + mRepository.stageForInstall(); + mCurrentInstallStage.addSource(mRepository.getStagingResult(), installStage -> { + if (installStage.getStageCode() != InstallStage.STAGE_READY) { + mCurrentInstallStage.setValue(installStage); + } else { + // Proceed with user confirmation here. + } + }); + } + } + + public MutableLiveData<Integer> getStagingProgress() { + return mRepository.getStagingProgress(); + } +} diff --git a/packages/PackageInstaller/src/com/android/packageinstaller/v2/viewmodel/InstallViewModelFactory.java b/packages/PackageInstaller/src/com/android/packageinstaller/v2/viewmodel/InstallViewModelFactory.java new file mode 100644 index 000000000000..ef459e64d7d5 --- /dev/null +++ b/packages/PackageInstaller/src/com/android/packageinstaller/v2/viewmodel/InstallViewModelFactory.java @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.packageinstaller.v2.viewmodel; + +import android.app.Application; +import androidx.annotation.NonNull; +import androidx.lifecycle.ViewModel; +import androidx.lifecycle.ViewModelProvider; +import com.android.packageinstaller.v2.model.InstallRepository; + +public class InstallViewModelFactory extends ViewModelProvider.AndroidViewModelFactory { + + private final InstallRepository mRepository; + private final Application mApplication; + + public InstallViewModelFactory(Application application, InstallRepository repository) { + // Calling super class' ctor ensures that create method is called correctly and the right + // ctor of InstallViewModel is used. If we fail to do that, the default ctor: + // InstallViewModel(application) is used, and repository isn't initialized in the viewmodel + super(application); + mApplication = application; + mRepository = repository; + } + + @NonNull + @Override + @SuppressWarnings("unchecked") + public <T extends ViewModel> T create(@NonNull Class<T> modelClass) { + return (T) new InstallViewModel(mApplication, mRepository); + } +} diff --git a/packages/SettingsLib/Spa/gradle/libs.versions.toml b/packages/SettingsLib/Spa/gradle/libs.versions.toml index fdb0471755de..905640f1ca4b 100644 --- a/packages/SettingsLib/Spa/gradle/libs.versions.toml +++ b/packages/SettingsLib/Spa/gradle/libs.versions.toml @@ -15,7 +15,7 @@ # [versions] -agp = "8.1.2" +agp = "8.1.3" compose-compiler = "1.5.1" dexmaker-mockito = "2.28.3" jvm = "17" diff --git a/packages/SettingsLib/Spa/screenshot/robotests/assets/phone/light_landscape_mainSwitchPreference.png b/packages/SettingsLib/Spa/screenshot/robotests/assets/phone/light_landscape_mainSwitchPreference.png Binary files differindex 7c135a09d588..63efaf557c3c 100644 --- a/packages/SettingsLib/Spa/screenshot/robotests/assets/phone/light_landscape_mainSwitchPreference.png +++ b/packages/SettingsLib/Spa/screenshot/robotests/assets/phone/light_landscape_mainSwitchPreference.png diff --git a/packages/SettingsLib/Spa/screenshot/robotests/assets/phone/light_landscape_preference.png b/packages/SettingsLib/Spa/screenshot/robotests/assets/phone/light_landscape_preference.png Binary files differindex 7b438c40134c..3ac1d0f4572c 100644 --- a/packages/SettingsLib/Spa/screenshot/robotests/assets/phone/light_landscape_preference.png +++ b/packages/SettingsLib/Spa/screenshot/robotests/assets/phone/light_landscape_preference.png diff --git a/packages/SettingsLib/Spa/screenshot/robotests/assets/phone/light_landscape_progressBar.png b/packages/SettingsLib/Spa/screenshot/robotests/assets/phone/light_landscape_progressBar.png Binary files differindex ac64619057b1..105d1a108620 100644 --- a/packages/SettingsLib/Spa/screenshot/robotests/assets/phone/light_landscape_progressBar.png +++ b/packages/SettingsLib/Spa/screenshot/robotests/assets/phone/light_landscape_progressBar.png diff --git a/packages/SettingsLib/Spa/screenshot/robotests/assets/phone/light_landscape_slider.png b/packages/SettingsLib/Spa/screenshot/robotests/assets/phone/light_landscape_slider.png Binary files differindex 5506c8c7854a..a038779b0e79 100644 --- a/packages/SettingsLib/Spa/screenshot/robotests/assets/phone/light_landscape_slider.png +++ b/packages/SettingsLib/Spa/screenshot/robotests/assets/phone/light_landscape_slider.png diff --git a/packages/SettingsLib/Spa/screenshot/robotests/assets/phone/light_landscape_switchPreference.png b/packages/SettingsLib/Spa/screenshot/robotests/assets/phone/light_landscape_switchPreference.png Binary files differindex f4b90634b536..a042ffbdc4d0 100644 --- a/packages/SettingsLib/Spa/screenshot/robotests/assets/phone/light_landscape_switchPreference.png +++ b/packages/SettingsLib/Spa/screenshot/robotests/assets/phone/light_landscape_switchPreference.png diff --git a/packages/SettingsLib/Spa/screenshot/robotests/assets/phone/light_landscape_twoTargetSwitchPreference.png b/packages/SettingsLib/Spa/screenshot/robotests/assets/phone/light_landscape_twoTargetSwitchPreference.png Binary files differindex fc60c0f43513..ae0abdde0c4f 100644 --- a/packages/SettingsLib/Spa/screenshot/robotests/assets/phone/light_landscape_twoTargetSwitchPreference.png +++ b/packages/SettingsLib/Spa/screenshot/robotests/assets/phone/light_landscape_twoTargetSwitchPreference.png diff --git a/packages/SettingsLib/Spa/screenshot/robotests/assets/phone/light_portrait_mainSwitchPreference.png b/packages/SettingsLib/Spa/screenshot/robotests/assets/phone/light_portrait_mainSwitchPreference.png Binary files differindex 81a181f96f17..ae11f810c0bf 100644 --- a/packages/SettingsLib/Spa/screenshot/robotests/assets/phone/light_portrait_mainSwitchPreference.png +++ b/packages/SettingsLib/Spa/screenshot/robotests/assets/phone/light_portrait_mainSwitchPreference.png diff --git a/packages/SettingsLib/Spa/screenshot/robotests/assets/phone/light_portrait_preference.png b/packages/SettingsLib/Spa/screenshot/robotests/assets/phone/light_portrait_preference.png Binary files differindex a6200400687e..9bc2b5d3b0c7 100644 --- a/packages/SettingsLib/Spa/screenshot/robotests/assets/phone/light_portrait_preference.png +++ b/packages/SettingsLib/Spa/screenshot/robotests/assets/phone/light_portrait_preference.png diff --git a/packages/SettingsLib/Spa/screenshot/robotests/assets/phone/light_portrait_progressBar.png b/packages/SettingsLib/Spa/screenshot/robotests/assets/phone/light_portrait_progressBar.png Binary files differindex 0b40aa872764..fc845a63efb4 100644 --- a/packages/SettingsLib/Spa/screenshot/robotests/assets/phone/light_portrait_progressBar.png +++ b/packages/SettingsLib/Spa/screenshot/robotests/assets/phone/light_portrait_progressBar.png diff --git a/packages/SettingsLib/Spa/screenshot/robotests/assets/phone/light_portrait_slider.png b/packages/SettingsLib/Spa/screenshot/robotests/assets/phone/light_portrait_slider.png Binary files differindex cfe8587e852b..03db688f6799 100644 --- a/packages/SettingsLib/Spa/screenshot/robotests/assets/phone/light_portrait_slider.png +++ b/packages/SettingsLib/Spa/screenshot/robotests/assets/phone/light_portrait_slider.png diff --git a/packages/SettingsLib/Spa/screenshot/robotests/assets/phone/light_portrait_switchPreference.png b/packages/SettingsLib/Spa/screenshot/robotests/assets/phone/light_portrait_switchPreference.png Binary files differindex 363275527101..235df22934e7 100644 --- a/packages/SettingsLib/Spa/screenshot/robotests/assets/phone/light_portrait_switchPreference.png +++ b/packages/SettingsLib/Spa/screenshot/robotests/assets/phone/light_portrait_switchPreference.png diff --git a/packages/SettingsLib/Spa/screenshot/robotests/assets/phone/light_portrait_twoTargetSwitchPreference.png b/packages/SettingsLib/Spa/screenshot/robotests/assets/phone/light_portrait_twoTargetSwitchPreference.png Binary files differindex 7e5b602e8adb..90442080fe22 100644 --- a/packages/SettingsLib/Spa/screenshot/robotests/assets/phone/light_portrait_twoTargetSwitchPreference.png +++ b/packages/SettingsLib/Spa/screenshot/robotests/assets/phone/light_portrait_twoTargetSwitchPreference.png diff --git a/packages/SettingsLib/Spa/screenshot/robotests/assets/tablet/dark_portrait_mainSwitchPreference.png b/packages/SettingsLib/Spa/screenshot/robotests/assets/tablet/dark_portrait_mainSwitchPreference.png Binary files differindex 8a0da3130281..8333e68bfc13 100644 --- a/packages/SettingsLib/Spa/screenshot/robotests/assets/tablet/dark_portrait_mainSwitchPreference.png +++ b/packages/SettingsLib/Spa/screenshot/robotests/assets/tablet/dark_portrait_mainSwitchPreference.png diff --git a/packages/SettingsLib/Spa/screenshot/robotests/assets/tablet/dark_portrait_preference.png b/packages/SettingsLib/Spa/screenshot/robotests/assets/tablet/dark_portrait_preference.png Binary files differindex 236a1a0234d1..fcfd1d8763c1 100644 --- a/packages/SettingsLib/Spa/screenshot/robotests/assets/tablet/dark_portrait_preference.png +++ b/packages/SettingsLib/Spa/screenshot/robotests/assets/tablet/dark_portrait_preference.png diff --git a/packages/SettingsLib/Spa/screenshot/robotests/assets/tablet/dark_portrait_progressBar.png b/packages/SettingsLib/Spa/screenshot/robotests/assets/tablet/dark_portrait_progressBar.png Binary files differindex 72b7954b9972..693c59243257 100644 --- a/packages/SettingsLib/Spa/screenshot/robotests/assets/tablet/dark_portrait_progressBar.png +++ b/packages/SettingsLib/Spa/screenshot/robotests/assets/tablet/dark_portrait_progressBar.png diff --git a/packages/SettingsLib/Spa/screenshot/robotests/assets/tablet/dark_portrait_slider.png b/packages/SettingsLib/Spa/screenshot/robotests/assets/tablet/dark_portrait_slider.png Binary files differindex 36486c44198a..1345c379cfb0 100644 --- a/packages/SettingsLib/Spa/screenshot/robotests/assets/tablet/dark_portrait_slider.png +++ b/packages/SettingsLib/Spa/screenshot/robotests/assets/tablet/dark_portrait_slider.png diff --git a/packages/SettingsLib/Spa/screenshot/robotests/assets/tablet/dark_portrait_switchPreference.png b/packages/SettingsLib/Spa/screenshot/robotests/assets/tablet/dark_portrait_switchPreference.png Binary files differindex fedce448e970..d0d014e5f8ed 100644 --- a/packages/SettingsLib/Spa/screenshot/robotests/assets/tablet/dark_portrait_switchPreference.png +++ b/packages/SettingsLib/Spa/screenshot/robotests/assets/tablet/dark_portrait_switchPreference.png diff --git a/packages/SettingsLib/Spa/screenshot/robotests/assets/tablet/dark_portrait_twoTargetSwitchPreference.png b/packages/SettingsLib/Spa/screenshot/robotests/assets/tablet/dark_portrait_twoTargetSwitchPreference.png Binary files differindex 3b389d77b04d..5bd1144b4e88 100644 --- a/packages/SettingsLib/Spa/screenshot/robotests/assets/tablet/dark_portrait_twoTargetSwitchPreference.png +++ b/packages/SettingsLib/Spa/screenshot/robotests/assets/tablet/dark_portrait_twoTargetSwitchPreference.png diff --git a/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/framework/theme/SettingsDimension.kt b/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/framework/theme/SettingsDimension.kt index 47660bc44cc8..5a1120e6c7a1 100644 --- a/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/framework/theme/SettingsDimension.kt +++ b/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/framework/theme/SettingsDimension.kt @@ -20,6 +20,7 @@ import androidx.compose.foundation.layout.PaddingValues import androidx.compose.ui.unit.dp object SettingsDimension { + val paddingTiny = 2.dp val paddingSmall = 4.dp val itemIconSize = 24.dp diff --git a/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/widget/ui/Text.kt b/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/widget/ui/Text.kt index f4b284362c52..b4a6a0d00720 100644 --- a/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/widget/ui/Text.kt +++ b/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/widget/ui/Text.kt @@ -39,6 +39,7 @@ import com.android.settingslib.spa.framework.theme.toMediumWeight fun SettingsTitle(title: String, useMediumWeight: Boolean = false) { Text( text = title, + modifier = Modifier.padding(vertical = SettingsDimension.paddingTiny), color = MaterialTheme.colorScheme.onSurface, style = MaterialTheme.typography.titleMedium.withWeight(useMediumWeight), ) diff --git a/packages/SettingsLib/SpaPrivileged/src/com/android/settingslib/spaprivileged/model/enterprise/EnterpriseRepository.kt b/packages/SettingsLib/SpaPrivileged/src/com/android/settingslib/spaprivileged/model/enterprise/EnterpriseRepository.kt index 352503742b9c..5baf7be98666 100644 --- a/packages/SettingsLib/SpaPrivileged/src/com/android/settingslib/spaprivileged/model/enterprise/EnterpriseRepository.kt +++ b/packages/SettingsLib/SpaPrivileged/src/com/android/settingslib/spaprivileged/model/enterprise/EnterpriseRepository.kt @@ -16,20 +16,22 @@ package com.android.settingslib.spaprivileged.model.enterprise -import android.app.admin.DevicePolicyManager import android.app.admin.DevicePolicyResources.Strings.Settings.PERSONAL_CATEGORY_HEADER import android.app.admin.DevicePolicyResources.Strings.Settings.PRIVATE_CATEGORY_HEADER import android.app.admin.DevicePolicyResources.Strings.Settings.WORK_CATEGORY_HEADER import android.content.Context import android.content.pm.UserInfo import com.android.settingslib.R +import com.android.settingslib.spaprivileged.framework.common.devicePolicyManager -class EnterpriseRepository(private val context: Context) { - private val resources by lazy { - checkNotNull(context.getSystemService(DevicePolicyManager::class.java)).resources - } +interface IEnterpriseRepository { + fun getEnterpriseString(updatableStringId: String, resId: Int): String +} + +class EnterpriseRepository(private val context: Context) : IEnterpriseRepository { + private val resources by lazy { context.devicePolicyManager.resources } - fun getEnterpriseString(updatableStringId: String, resId: Int): String = + override fun getEnterpriseString(updatableStringId: String, resId: Int): String = checkNotNull(resources.getString(updatableStringId) { context.getString(resId) }) fun getProfileTitle(userInfo: UserInfo): String = if (userInfo.isManagedProfile) { diff --git a/packages/SettingsLib/SpaPrivileged/src/com/android/settingslib/spaprivileged/model/enterprise/RestrictedMode.kt b/packages/SettingsLib/SpaPrivileged/src/com/android/settingslib/spaprivileged/model/enterprise/RestrictedMode.kt new file mode 100644 index 000000000000..3acc9ad83d2c --- /dev/null +++ b/packages/SettingsLib/SpaPrivileged/src/com/android/settingslib/spaprivileged/model/enterprise/RestrictedMode.kt @@ -0,0 +1,57 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.settingslib.spaprivileged.model.enterprise + +import android.app.admin.DevicePolicyResources.Strings.Settings +import android.content.Context +import com.android.settingslib.RestrictedLockUtils +import com.android.settingslib.widget.restricted.R + +sealed interface RestrictedMode + +data object NoRestricted : RestrictedMode + +data object BaseUserRestricted : RestrictedMode + +interface BlockedByAdmin : RestrictedMode { + fun getSummary(checked: Boolean?): String + fun sendShowAdminSupportDetailsIntent() +} + +internal data class BlockedByAdminImpl( + private val context: Context, + private val enforcedAdmin: RestrictedLockUtils.EnforcedAdmin, + private val enterpriseRepository: IEnterpriseRepository = EnterpriseRepository(context), +) : BlockedByAdmin { + override fun getSummary(checked: Boolean?) = when (checked) { + true -> enterpriseRepository.getEnterpriseString( + updatableStringId = Settings.ENABLED_BY_ADMIN_SWITCH_SUMMARY, + resId = R.string.enabled_by_admin, + ) + + false -> enterpriseRepository.getEnterpriseString( + updatableStringId = Settings.DISABLED_BY_ADMIN_SWITCH_SUMMARY, + resId = R.string.disabled_by_admin, + ) + + else -> "" + } + + override fun sendShowAdminSupportDetailsIntent() { + RestrictedLockUtils.sendShowAdminSupportDetailsIntent(context, enforcedAdmin) + } +} diff --git a/packages/SettingsLib/SpaPrivileged/src/com/android/settingslib/spaprivileged/model/enterprise/RestrictionsProvider.kt b/packages/SettingsLib/SpaPrivileged/src/com/android/settingslib/spaprivileged/model/enterprise/RestrictionsProvider.kt index 09cb98e22af3..550966beb0b8 100644 --- a/packages/SettingsLib/SpaPrivileged/src/com/android/settingslib/spaprivileged/model/enterprise/RestrictionsProvider.kt +++ b/packages/SettingsLib/SpaPrivileged/src/com/android/settingslib/spaprivileged/model/enterprise/RestrictionsProvider.kt @@ -16,7 +16,6 @@ package com.android.settingslib.spaprivileged.model.enterprise -import android.app.admin.DevicePolicyResources.Strings.Settings import android.content.Context import android.os.UserHandle import android.os.UserManager @@ -25,55 +24,16 @@ import androidx.compose.runtime.State import androidx.compose.runtime.remember import androidx.compose.ui.platform.LocalContext import androidx.lifecycle.compose.collectAsStateWithLifecycle -import com.android.settingslib.RestrictedLockUtils -import com.android.settingslib.RestrictedLockUtils.EnforcedAdmin import com.android.settingslib.RestrictedLockUtilsInternal import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.flow.flow import kotlinx.coroutines.flow.flowOn -import com.android.settingslib.widget.restricted.R data class Restrictions( val userId: Int = UserHandle.myUserId(), val keys: List<String>, ) -sealed interface RestrictedMode - -data object NoRestricted : RestrictedMode - -data object BaseUserRestricted : RestrictedMode - -interface BlockedByAdmin : RestrictedMode { - fun getSummary(checked: Boolean?): String - fun sendShowAdminSupportDetailsIntent() -} - -private data class BlockedByAdminImpl( - private val context: Context, - private val enforcedAdmin: EnforcedAdmin, -) : BlockedByAdmin { - private val enterpriseRepository by lazy { EnterpriseRepository(context) } - - override fun getSummary(checked: Boolean?) = when (checked) { - true -> enterpriseRepository.getEnterpriseString( - updatableStringId = Settings.ENABLED_BY_ADMIN_SWITCH_SUMMARY, - resId = R.string.enabled_by_admin, - ) - - false -> enterpriseRepository.getEnterpriseString( - updatableStringId = Settings.DISABLED_BY_ADMIN_SWITCH_SUMMARY, - resId = R.string.disabled_by_admin, - ) - - else -> "" - } - - override fun sendShowAdminSupportDetailsIntent() { - RestrictedLockUtils.sendShowAdminSupportDetailsIntent(context, enforcedAdmin) - } -} - interface RestrictionsProvider { @Composable fun restrictedModeState(): State<RestrictedMode?> diff --git a/packages/SettingsLib/SpaPrivileged/src/com/android/settingslib/spaprivileged/template/app/AppOpPermissionAppList.kt b/packages/SettingsLib/SpaPrivileged/src/com/android/settingslib/spaprivileged/template/app/AppOpPermissionAppList.kt index 7bd7fbe0c526..06b3eabfad26 100644 --- a/packages/SettingsLib/SpaPrivileged/src/com/android/settingslib/spaprivileged/template/app/AppOpPermissionAppList.kt +++ b/packages/SettingsLib/SpaPrivileged/src/com/android/settingslib/spaprivileged/template/app/AppOpPermissionAppList.kt @@ -16,9 +16,7 @@ package com.android.settingslib.spaprivileged.template.app -import android.app.AppOpsManager.MODE_ALLOWED -import android.app.AppOpsManager.MODE_DEFAULT -import android.app.AppOpsManager.MODE_ERRORED +import android.app.AppOpsManager import android.content.Context import android.content.pm.ApplicationInfo import androidx.compose.runtime.Composable @@ -64,7 +62,7 @@ abstract class AppOpPermissionListModel( */ open val permissionHasAppOpFlag: Boolean = true - open val modeForNotAllowed: Int = MODE_ERRORED + open val modeForNotAllowed: Int = AppOpsManager.MODE_ERRORED /** * Use AppOpsManager#setUidMode() instead of AppOpsManager#setMode() when set allowed. @@ -130,27 +128,14 @@ abstract class AppOpPermissionListModel( override fun filter(userIdFlow: Flow<Int>, recordListFlow: Flow<List<AppOpPermissionRecord>>) = recordListFlow.filterItem(::isChangeable) - /** - * Defining the default behavior as permissible as long as the package requested this permission - * (This means pre-M gets approval during install time; M apps gets approval during runtime). - */ @Composable - override fun isAllowed(record: AppOpPermissionRecord): () -> Boolean? { - if (record.hasRequestBroaderPermission) { - // Broader permission trumps the specific permission. - return { true } - } - - val mode = record.appOpsController.mode.observeAsState() - return { - when (mode.value) { - null -> null - MODE_ALLOWED -> true - MODE_DEFAULT -> with(packageManagers) { record.app.hasGrantPermission(permission) } - else -> false - } - } - } + override fun isAllowed(record: AppOpPermissionRecord): () -> Boolean? = + isAllowed( + record = record, + appOpsController = record.appOpsController, + permission = permission, + packageManagers = packageManagers, + ) override fun isChangeable(record: AppOpPermissionRecord) = record.hasRequestPermission && @@ -161,3 +146,33 @@ abstract class AppOpPermissionListModel( record.appOpsController.setAllowed(newAllowed) } } + +/** + * Defining the default behavior as permissible as long as the package requested this permission + * (This means pre-M gets approval during install time; M apps gets approval during runtime). + */ +@Composable +internal fun isAllowed( + record: AppOpPermissionRecord, + appOpsController: IAppOpsController, + permission: String, + packageManagers: IPackageManagers = PackageManagers, +): () -> Boolean? { + if (record.hasRequestBroaderPermission) { + // Broader permission trumps the specific permission. + return { true } + } + + val mode = appOpsController.mode.observeAsState() + return { + when (mode.value) { + null -> null + AppOpsManager.MODE_ALLOWED -> true + AppOpsManager.MODE_DEFAULT -> { + with(packageManagers) { record.app.hasGrantPermission(permission) } + } + + else -> false + } + } +} diff --git a/packages/SettingsLib/SpaPrivileged/src/com/android/settingslib/spaprivileged/template/app/TogglePermissionAppInfoPage.kt b/packages/SettingsLib/SpaPrivileged/src/com/android/settingslib/spaprivileged/template/app/TogglePermissionAppInfoPage.kt index 3380b7db4cd0..565543614866 100644 --- a/packages/SettingsLib/SpaPrivileged/src/com/android/settingslib/spaprivileged/template/app/TogglePermissionAppInfoPage.kt +++ b/packages/SettingsLib/SpaPrivileged/src/com/android/settingslib/spaprivileged/template/app/TogglePermissionAppInfoPage.kt @@ -16,19 +16,16 @@ package com.android.settingslib.spaprivileged.template.app -import android.content.Context import android.content.pm.ApplicationInfo import android.os.Bundle import androidx.annotation.VisibleForTesting import androidx.compose.runtime.Composable -import androidx.compose.runtime.LaunchedEffect import androidx.compose.runtime.getValue -import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.remember -import androidx.compose.runtime.setValue import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.res.stringResource import androidx.core.os.bundleOf +import androidx.lifecycle.compose.collectAsStateWithLifecycle import androidx.navigation.NavType import androidx.navigation.navArgument import com.android.settingslib.spa.framework.common.SettingsEntry @@ -49,6 +46,8 @@ import com.android.settingslib.spaprivileged.model.enterprise.RestrictionsProvid import com.android.settingslib.spaprivileged.model.enterprise.RestrictionsProviderImpl import com.android.settingslib.spaprivileged.template.preference.RestrictedSwitchPreference import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.flow.flow +import kotlinx.coroutines.flow.flowOn internal class TogglePermissionAppInfoPageProvider( private val appListTemplate: TogglePermissionAppListTemplate, @@ -132,7 +131,7 @@ internal fun <T : AppRecord> TogglePermissionAppListModel<T>.TogglePermissionApp @VisibleForTesting @Composable -internal fun TogglePermissionAppListModel<out AppRecord>.TogglePermissionAppInfoPage( +internal fun <T : AppRecord> TogglePermissionAppListModel<T>.TogglePermissionAppInfoPage( packageName: String, userId: Int, packageManagers: IPackageManagers = PackageManagers, @@ -145,40 +144,34 @@ internal fun TogglePermissionAppListModel<out AppRecord>.TogglePermissionAppInfo footerContent = { AnnotatedText(footerResId) }, packageManagers = packageManagers, ) { - val model = createSwitchModel(checkNotNull(applicationInfo)) + val app = applicationInfo ?: return@AppInfoPage + val record = rememberRecord(app).value ?: return@AppInfoPage + val isAllowed = isAllowed(record) + val isChangeable by rememberIsChangeable(record) + val switchModel = object : SwitchPreferenceModel { + override val title = stringResource(switchTitleResId) + override val checked = isAllowed + override val changeable = { isChangeable } + override val onCheckedChange: (Boolean) -> Unit = { setAllowed(record, it) } + } val restrictions = Restrictions(userId, switchRestrictionKeys) - RestrictedSwitchPreference(model, restrictions, restrictionsProviderFactory) + RestrictedSwitchPreference(switchModel, restrictions, restrictionsProviderFactory) } } @Composable -private fun <T : AppRecord> TogglePermissionAppListModel<T>.createSwitchModel( - app: ApplicationInfo, -): TogglePermissionSwitchModel<T> { - val context = LocalContext.current - val record = remember(app) { transformItem(app) } - val isAllowed = isAllowed(record) - return remember(record) { TogglePermissionSwitchModel(context, this, record, isAllowed) } - .also { model -> LaunchedEffect(model, Dispatchers.IO) { model.initState() } } -} - -private class TogglePermissionSwitchModel<T : AppRecord>( - context: Context, - private val listModel: TogglePermissionAppListModel<T>, - private val record: T, - isAllowed: () -> Boolean?, -) : SwitchPreferenceModel { - private var appChangeable by mutableStateOf(true) +private fun <T : AppRecord> TogglePermissionAppListModel<T>.rememberRecord(app: ApplicationInfo) = + remember(app) { + flow { + emit(transformItem(app)) + }.flowOn(Dispatchers.Default) + }.collectAsStateWithLifecycle(initialValue = null) - override val title: String = context.getString(listModel.switchTitleResId) - override val checked = isAllowed - override val changeable = { appChangeable } - fun initState() { - appChangeable = listModel.isChangeable(record) - } - - override val onCheckedChange: (Boolean) -> Unit = { newChecked -> - listModel.setAllowed(record, newChecked) - } -} +@Composable +private fun <T : AppRecord> TogglePermissionAppListModel<T>.rememberIsChangeable(record: T) = + remember(record) { + flow { + emit(isChangeable(record)) + }.flowOn(Dispatchers.Default) + }.collectAsStateWithLifecycle(initialValue = false) diff --git a/packages/SettingsLib/SpaPrivileged/tests/src/com/android/settingslib/spaprivileged/model/enterprise/RestrictedModeTest.kt b/packages/SettingsLib/SpaPrivileged/tests/src/com/android/settingslib/spaprivileged/model/enterprise/RestrictedModeTest.kt new file mode 100644 index 000000000000..8fd16b37bfeb --- /dev/null +++ b/packages/SettingsLib/SpaPrivileged/tests/src/com/android/settingslib/spaprivileged/model/enterprise/RestrictedModeTest.kt @@ -0,0 +1,67 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.settingslib.spaprivileged.model.enterprise + +import android.app.admin.DevicePolicyResources.Strings.Settings +import android.content.Context +import androidx.test.core.app.ApplicationProvider +import androidx.test.ext.junit.runners.AndroidJUnit4 +import com.android.settingslib.RestrictedLockUtils +import com.google.common.truth.Truth.assertThat +import org.junit.Test +import org.junit.runner.RunWith + +@RunWith(AndroidJUnit4::class) +class RestrictedModeTest { + private val context: Context = ApplicationProvider.getApplicationContext() + + private val fakeEnterpriseRepository = object : IEnterpriseRepository { + override fun getEnterpriseString(updatableStringId: String, resId: Int): String = + when (updatableStringId) { + Settings.ENABLED_BY_ADMIN_SWITCH_SUMMARY -> ENABLED_BY_ADMIN + Settings.DISABLED_BY_ADMIN_SWITCH_SUMMARY -> DISABLED_BY_ADMIN + else -> "" + } + } + + @Test + fun blockedByAdmin_getSummaryWhenChecked() { + val blockedByAdmin = BlockedByAdminImpl(context, ENFORCED_ADMIN, fakeEnterpriseRepository) + + val summary = blockedByAdmin.getSummary(true) + + assertThat(summary).isEqualTo(ENABLED_BY_ADMIN) + } + + @Test + fun blockedByAdmin_getSummaryNotWhenChecked() { + val blockedByAdmin = BlockedByAdminImpl(context, ENFORCED_ADMIN, fakeEnterpriseRepository) + + val summary = blockedByAdmin.getSummary(false) + + assertThat(summary).isEqualTo(DISABLED_BY_ADMIN) + } + + private companion object { + const val RESTRICTION = "restriction" + val ENFORCED_ADMIN: RestrictedLockUtils.EnforcedAdmin = + RestrictedLockUtils.EnforcedAdmin.createDefaultEnforcedAdminWithRestriction(RESTRICTION) + + const val ENABLED_BY_ADMIN = "Enabled by admin" + const val DISABLED_BY_ADMIN = "Disabled by admin" + } +} diff --git a/packages/SettingsLib/SpaPrivileged/tests/src/com/android/settingslib/spaprivileged/template/app/AppOpPermissionAppListTest.kt b/packages/SettingsLib/SpaPrivileged/tests/src/com/android/settingslib/spaprivileged/template/app/AppOpPermissionAppListTest.kt index 3b2fe0f5c16b..d158a2414f85 100644 --- a/packages/SettingsLib/SpaPrivileged/tests/src/com/android/settingslib/spaprivileged/template/app/AppOpPermissionAppListTest.kt +++ b/packages/SettingsLib/SpaPrivileged/tests/src/com/android/settingslib/spaprivileged/template/app/AppOpPermissionAppListTest.kt @@ -32,44 +32,37 @@ import com.android.settingslib.spaprivileged.test.R import com.google.common.truth.Truth.assertThat import kotlinx.coroutines.flow.flowOf import kotlinx.coroutines.test.runTest -import org.junit.Before import org.junit.Rule import org.junit.Test import org.junit.runner.RunWith -import org.mockito.Mock -import org.mockito.Spy -import org.mockito.junit.MockitoJUnit -import org.mockito.junit.MockitoRule import org.mockito.kotlin.any import org.mockito.kotlin.doNothing +import org.mockito.kotlin.doReturn +import org.mockito.kotlin.mock +import org.mockito.kotlin.spy import org.mockito.kotlin.verify import org.mockito.kotlin.whenever @RunWith(AndroidJUnit4::class) class AppOpPermissionAppListTest { - @get:Rule val mockito: MockitoRule = MockitoJUnit.rule() + @get:Rule + val composeTestRule = createComposeRule() - @get:Rule val composeTestRule = createComposeRule() + private val packageManagers = mock<IPackageManagers>() - @Spy private val context: Context = ApplicationProvider.getApplicationContext() + private val appOpsManager = mock<AppOpsManager>() - @Mock private lateinit var packageManagers: IPackageManagers - - @Mock private lateinit var appOpsManager: AppOpsManager - - @Mock private lateinit var packageManager: PackageManager - - private lateinit var listModel: TestAppOpPermissionAppListModel + private val packageManager = mock<PackageManager> { + doNothing().whenever(mock).updatePermissionFlags(any(), any(), any(), any(), any()) + } - @Before - fun setUp() { - whenever(context.appOpsManager).thenReturn(appOpsManager) - whenever(context.packageManager).thenReturn(packageManager) - doNothing().whenever(packageManager) - .updatePermissionFlags(any(), any(), any(), any(), any()) - listModel = TestAppOpPermissionAppListModel() + private val context: Context = spy(ApplicationProvider.getApplicationContext()) { + on { appOpsManager } doReturn appOpsManager + on { packageManager } doReturn packageManager } + private val listModel = TestAppOpPermissionAppListModel() + @Test fun transformItem_recordHasCorrectApp() { val record = listModel.transformItem(APP) diff --git a/packages/SettingsLib/SpaPrivileged/tests/src/com/android/settingslib/spaprivileged/template/app/TogglePermissionAppInfoPageTest.kt b/packages/SettingsLib/SpaPrivileged/tests/src/com/android/settingslib/spaprivileged/template/app/TogglePermissionAppInfoPageTest.kt index 8bfae14b3b8f..270b3faa7ec6 100644 --- a/packages/SettingsLib/SpaPrivileged/tests/src/com/android/settingslib/spaprivileged/template/app/TogglePermissionAppInfoPageTest.kt +++ b/packages/SettingsLib/SpaPrivileged/tests/src/com/android/settingslib/spaprivileged/template/app/TogglePermissionAppInfoPageTest.kt @@ -38,44 +38,34 @@ import com.android.settingslib.spaprivileged.tests.testutils.FakeRestrictionsPro import com.android.settingslib.spaprivileged.tests.testutils.TestTogglePermissionAppListModel import com.android.settingslib.spaprivileged.tests.testutils.TestTogglePermissionAppListProvider import com.google.common.truth.Truth.assertThat -import org.junit.Before import org.junit.Rule import org.junit.Test import org.junit.runner.RunWith -import org.mockito.Mock -import org.mockito.junit.MockitoJUnit -import org.mockito.junit.MockitoRule -import org.mockito.kotlin.whenever +import org.mockito.kotlin.doReturn +import org.mockito.kotlin.mock @RunWith(AndroidJUnit4::class) class TogglePermissionAppInfoPageTest { @get:Rule val composeTestRule = createComposeRule() - @get:Rule - val mockito: MockitoRule = MockitoJUnit.rule() - private val context: Context = ApplicationProvider.getApplicationContext() - @Mock - private lateinit var packageManagers: IPackageManagers + private val packageManagers = mock<IPackageManagers> { + on { getPackageInfoAsUser(PACKAGE_NAME, USER_ID) } doReturn PACKAGE_INFO + } private val fakeNavControllerWrapper = FakeNavControllerWrapper() - private val fakeRestrictionsProvider = FakeRestrictionsProvider() + private val fakeRestrictionsProvider = FakeRestrictionsProvider().apply { + restrictedMode = NoRestricted + } private val appListTemplate = TogglePermissionAppListTemplate(listOf(TestTogglePermissionAppListProvider)) private val appInfoPageProvider = TogglePermissionAppInfoPageProvider(appListTemplate) - @Before - fun setUp() { - fakeRestrictionsProvider.restrictedMode = NoRestricted - whenever(packageManagers.getPackageInfoAsUser(PACKAGE_NAME, USER_ID)) - .thenReturn(PACKAGE_INFO) - } - @Test fun buildEntry() { val entryList = appInfoPageProvider.buildEntry(null) diff --git a/packages/SettingsLib/res/values-be/strings.xml b/packages/SettingsLib/res/values-be/strings.xml index ea744688f21a..de703e98bf34 100644 --- a/packages/SettingsLib/res/values-be/strings.xml +++ b/packages/SettingsLib/res/values-be/strings.xml @@ -437,8 +437,8 @@ <string name="transcode_notification" msgid="5560515979793436168">"Паказваць апавяшчэнні пра перакадзіраванне"</string> <string name="transcode_disable_cache" msgid="3160069309377467045">"Адключыць кэш перакадзіравання"</string> <string name="widevine_settings_title" msgid="4023329801172572917">"Налады Widevine"</string> - <string name="force_l3_fallback_title" msgid="4987972688770202547">"Прымусовае выкарыстанне альтэрнатывы L3"</string> - <string name="force_l3_fallback_summary" msgid="3080790841069996016">"Выберыце, ці трэба прымусова выкарыстоўваць альтэрнатыву L3"</string> + <string name="force_l3_fallback_title" msgid="4987972688770202547">"Прымусовы пераход на ўзровень бяспекі 3"</string> + <string name="force_l3_fallback_summary" msgid="3080790841069996016">"Выберыце, каб прымусова пераходзіць на ўзровень бяспекі 3"</string> <string name="runningservices_settings_title" msgid="6460099290493086515">"Запушчаныя службы"</string> <string name="runningservices_settings_summary" msgid="1046080643262665743">"Прагляд запушчаных службаў i кіраванне iмi"</string> <string name="select_webview_provider_title" msgid="3917815648099445503">"Рэалізацыя WebView"</string> diff --git a/packages/SettingsLib/res/values-mn/strings.xml b/packages/SettingsLib/res/values-mn/strings.xml index e35754326b5f..0a99650ce990 100644 --- a/packages/SettingsLib/res/values-mn/strings.xml +++ b/packages/SettingsLib/res/values-mn/strings.xml @@ -437,7 +437,7 @@ <string name="transcode_notification" msgid="5560515979793436168">"Хөрвүүлгийн мэдэгдэл харуулах"</string> <string name="transcode_disable_cache" msgid="3160069309377467045">"Хөрвүүлгийн завсрын санах ойг идэвхгүй болгох"</string> <string name="widevine_settings_title" msgid="4023329801172572917">"Widevine-н тохиргоо"</string> - <string name="force_l3_fallback_title" msgid="4987972688770202547">"L3 нөөцийг хүчилнэ үү"</string> + <string name="force_l3_fallback_title" msgid="4987972688770202547">"L3 нөөцийг хүчлэх"</string> <string name="force_l3_fallback_summary" msgid="3080790841069996016">"L3 нөөцийг хүчлэхийг сонгоно уу"</string> <string name="runningservices_settings_title" msgid="6460099290493086515">"Ажиллаж байгаа үйлчилгээнүүд"</string> <string name="runningservices_settings_summary" msgid="1046080643262665743">"Одоо ажиллаж байгаа үйлчилгээнүүдийг харах болон хянах"</string> diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothUtils.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothUtils.java index fa8c1fba6780..0ffcc45b6466 100644 --- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothUtils.java +++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothUtils.java @@ -594,6 +594,16 @@ public class BluetoothUtils { || cachedDevice.isActiveDevice(BluetoothProfile.LE_AUDIO); } + /** + * Check if the Bluetooth device is an active LE Audio device + * + * @param cachedDevice the CachedBluetoothDevice + * @return if the Bluetooth device is an active LE Audio device + */ + public static boolean isActiveLeAudioDevice(CachedBluetoothDevice cachedDevice) { + return cachedDevice.isActiveDevice(BluetoothProfile.LE_AUDIO); + } + private static boolean isDeviceConnected(CachedBluetoothDevice cachedDevice) { if (cachedDevice == null) { return false; diff --git a/packages/Shell/AndroidManifest.xml b/packages/Shell/AndroidManifest.xml index ed03d94b44c0..0b0e06319a89 100644 --- a/packages/Shell/AndroidManifest.xml +++ b/packages/Shell/AndroidManifest.xml @@ -325,6 +325,7 @@ <uses-permission android:name="android.permission.CONTROL_KEYGUARD" /> <uses-permission android:name="android.permission.CONTROL_REMOTE_APP_TRANSITION_ANIMATIONS" /> <uses-permission android:name="android.permission.SUSPEND_APPS" /> + <uses-permission android:name="android.permission.QUARANTINE_APPS" /> <uses-permission android:name="android.permission.OBSERVE_APP_USAGE" /> <uses-permission android:name="android.permission.READ_CLIPBOARD_IN_BACKGROUND" /> <!-- Permission needed to wipe the device for Test Harness Mode --> diff --git a/packages/SystemUI/Android.bp b/packages/SystemUI/Android.bp index cf51e2193833..d78038ecee61 100644 --- a/packages/SystemUI/Android.bp +++ b/packages/SystemUI/Android.bp @@ -294,6 +294,8 @@ filegroup { "tests/src/com/android/systemui/bouncer/ui/viewmodel/KeyguardBouncerViewModelTest.kt", "tests/src/com/android/systemui/keyguard/ui/viewmodel/DreamingToLockscreenTransitionViewModelTest.kt", "tests/src/com/android/systemui/keyguard/ui/viewmodel/GoneToDreamingTransitionViewModelTest.kt", + "tests/src/com/android/systemui/keyguard/ui/viewmodel/LockscreenToDreamingTransitionViewModelTest.kt", + "tests/src/com/android/systemui/keyguard/ui/viewmodel/LockscreenToOccludedTransitionViewModelTest.kt", "tests/src/com/android/systemui/keyguard/ui/viewmodel/OccludedToLockscreenTransitionViewModelTest.kt", "tests/src/com/android/systemui/keyguard/ui/viewmodel/PrimaryBouncerToGoneTransitionViewModelTest.kt", // Keyguard helper @@ -600,6 +602,7 @@ android_robolectric_test { ":SystemUI-tests-multivalent", ], static_libs: [ + "dagger2", "androidx.test.uiautomator_uiautomator", "androidx.core_core-animation-testing", "androidx.test.ext.junit", @@ -616,6 +619,9 @@ android_robolectric_test { instrumentation_for: "SystemUIRobo-stub", java_resource_dirs: ["tests/robolectric/config"], + plugins: [ + "dagger2-compiler", + ], } // Opt-out config for optimizing the SystemUI target using R8. diff --git a/packages/SystemUI/AndroidManifest.xml b/packages/SystemUI/AndroidManifest.xml index 58816310d495..e218308758ab 100644 --- a/packages/SystemUI/AndroidManifest.xml +++ b/packages/SystemUI/AndroidManifest.xml @@ -982,6 +982,24 @@ android:excludeFromRecents="true" android:visibleToInstantApps="true"/> + <activity android:name="com.android.systemui.communal.widgets.WidgetPickerActivity" + android:theme="@style/Theme.EditWidgetsActivity" + android:excludeFromRecents="true" + android:autoRemoveFromRecents="true" + android:showOnLockScreen="true" + android:launchMode="singleTop" + android:exported="false"> + </activity> + + <activity android:name="com.android.systemui.communal.widgets.EditWidgetsActivity" + android:theme="@style/Theme.EditWidgetsActivity" + android:excludeFromRecents="true" + android:autoRemoveFromRecents="true" + android:showOnLockScreen="true" + android:launchMode="singleTop" + android:exported="false"> + </activity> + <!-- Doze with notifications, run in main sysui process for every user --> <service android:name=".doze.DozeService" diff --git a/packages/SystemUI/aconfig/systemui.aconfig b/packages/SystemUI/aconfig/systemui.aconfig index e340209afbb8..68d4b6319b2f 100644 --- a/packages/SystemUI/aconfig/systemui.aconfig +++ b/packages/SystemUI/aconfig/systemui.aconfig @@ -61,6 +61,13 @@ flag { } flag { + name: "notification_throttle_hun" + namespace: "systemui" + description: "During notification avalanche, throttle HUNs showing in fast succession." + bug: "307288824" +} + +flag { name: "scene_container" namespace: "systemui" description: "Enables the scene container framework go/flexiglass." @@ -119,4 +126,18 @@ flag { description: "Adds thread-local data to System UI's global coroutine scopes to " "allow for tracing of coroutine continuations using System UI's tracinglib" bug: "289353932" +} + +flag { + name: "new_aod_transition" + namespace: "systemui" + description: "New LOCKSCREEN <=> AOD transition" + bug: "301915812" +} + +flag { + name: "light_reveal_migration" + namespace: "systemui" + description: "Move LightRevealScrim to recommended architecture" + bug: "281655028" }
\ No newline at end of file diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/bouncer/ui/composable/PasswordBouncer.kt b/packages/SystemUI/compose/features/src/com/android/systemui/bouncer/ui/composable/PasswordBouncer.kt index 53e437a2944f..0b1338305076 100644 --- a/packages/SystemUI/compose/features/src/com/android/systemui/bouncer/ui/composable/PasswordBouncer.kt +++ b/packages/SystemUI/compose/features/src/com/android/systemui/bouncer/ui/composable/PasswordBouncer.kt @@ -28,6 +28,7 @@ import androidx.compose.material3.LocalTextStyle import androidx.compose.material3.MaterialTheme import androidx.compose.material3.TextField import androidx.compose.runtime.Composable +import androidx.compose.runtime.DisposableEffect import androidx.compose.runtime.LaunchedEffect import androidx.compose.runtime.collectAsState import androidx.compose.runtime.getValue @@ -63,11 +64,13 @@ internal fun PasswordBouncer( val isImeVisible by rememberUpdatedState(WindowInsets.imeAnimationTarget.getBottom(density) > 0) LaunchedEffect(isImeVisible) { viewModel.onImeVisibilityChanged(isImeVisible) } - LaunchedEffect(Unit) { + DisposableEffect(Unit) { + viewModel.onShown() + // When the UI comes up, request focus on the TextField to bring up the software keyboard. focusRequester.requestFocus() - // Also, report that the UI is shown to let the view-model run some logic. - viewModel.onShown() + + onDispose { viewModel.onHidden() } } LaunchedEffect(animateFailure) { diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/bouncer/ui/composable/PatternBouncer.kt b/packages/SystemUI/compose/features/src/com/android/systemui/bouncer/ui/composable/PatternBouncer.kt index 03efbe0fe1ff..2bbe9b8fc20a 100644 --- a/packages/SystemUI/compose/features/src/com/android/systemui/bouncer/ui/composable/PatternBouncer.kt +++ b/packages/SystemUI/compose/features/src/com/android/systemui/bouncer/ui/composable/PatternBouncer.kt @@ -26,6 +26,7 @@ import androidx.compose.foundation.gestures.awaitFirstDown import androidx.compose.foundation.gestures.detectDragGestures import androidx.compose.material3.MaterialTheme import androidx.compose.runtime.Composable +import androidx.compose.runtime.DisposableEffect import androidx.compose.runtime.LaunchedEffect import androidx.compose.runtime.collectAsState import androidx.compose.runtime.getValue @@ -65,8 +66,10 @@ internal fun PatternBouncer( viewModel: PatternBouncerViewModel, modifier: Modifier = Modifier, ) { - // Report that the UI is shown to let the view-model run some logic. - LaunchedEffect(Unit) { viewModel.onShown() } + DisposableEffect(Unit) { + viewModel.onShown() + onDispose { viewModel.onHidden() } + } val colCount = viewModel.columnCount val rowCount = viewModel.rowCount diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/bouncer/ui/composable/PinBouncer.kt b/packages/SystemUI/compose/features/src/com/android/systemui/bouncer/ui/composable/PinBouncer.kt index 243751fafe5d..59617c9022ab 100644 --- a/packages/SystemUI/compose/features/src/com/android/systemui/bouncer/ui/composable/PinBouncer.kt +++ b/packages/SystemUI/compose/features/src/com/android/systemui/bouncer/ui/composable/PinBouncer.kt @@ -31,6 +31,7 @@ import androidx.compose.foundation.layout.sizeIn import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Text import androidx.compose.runtime.Composable +import androidx.compose.runtime.DisposableEffect import androidx.compose.runtime.LaunchedEffect import androidx.compose.runtime.collectAsState import androidx.compose.runtime.getValue @@ -69,8 +70,10 @@ fun PinPad( viewModel: PinBouncerViewModel, modifier: Modifier = Modifier, ) { - // Report that the UI is shown to let the view-model run some logic. - LaunchedEffect(Unit) { viewModel.onShown() } + DisposableEffect(Unit) { + viewModel.onShown() + onDispose { viewModel.onHidden() } + } val isInputEnabled: Boolean by viewModel.isInputEnabled.collectAsState() val backspaceButtonAppearance by viewModel.backspaceButtonAppearance.collectAsState() diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/CommunalHub.kt b/packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/CommunalHub.kt index 6e18cb9cd46b..d822d1996eff 100644 --- a/packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/CommunalHub.kt +++ b/packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/CommunalHub.kt @@ -45,6 +45,7 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color import androidx.compose.ui.input.pointer.pointerInput import androidx.compose.ui.platform.LocalContext +import androidx.compose.ui.res.stringResource import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.dp import androidx.compose.ui.viewinterop.AndroidView @@ -89,11 +90,8 @@ fun CommunalHub( ) } } - IconButton(onClick = viewModel::onOpenWidgetPicker) { - Icon( - Icons.Default.Add, - LocalContext.current.getString(R.string.button_to_open_widget_picker) - ) + IconButton(onClick = viewModel::onOpenWidgetEditor) { + Icon(Icons.Default.Add, stringResource(R.string.button_to_open_widget_editor)) } // This spacer covers the edge of the LazyHorizontalGrid and prevents it from receiving @@ -148,8 +146,6 @@ private fun WidgetContent( .createView(context, model.appWidgetId, model.providerInfo) .apply { updateAppWidgetSize(Bundle.EMPTY, listOf(size)) } }, - // For reusing composition in lazy lists. - onReset = {} ) } } diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/scene/ui/composable/SceneContainer.kt b/packages/SystemUI/compose/features/src/com/android/systemui/scene/ui/composable/SceneContainer.kt index 0da562bcb3bb..4eb9089dc589 100644 --- a/packages/SystemUI/compose/features/src/com/android/systemui/scene/ui/composable/SceneContainer.kt +++ b/packages/SystemUI/compose/features/src/com/android/systemui/scene/ui/composable/SceneContainer.kt @@ -18,7 +18,6 @@ package com.android.systemui.scene.ui.composable -import android.os.SystemProperties import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.material3.Text @@ -84,7 +83,6 @@ fun SceneContainer( val currentDestinations: Map<UserAction, SceneModel> by currentScene.destinationScenes.collectAsState() val state = remember { SceneTransitionLayoutState(currentSceneKey.toTransitionSceneKey()) } - val isRibbonEnabled = remember { SystemProperties.getBoolean("flexi.ribbon", false) } DisposableEffect(viewModel, state) { viewModel.setTransitionState(state.observableTransitionState().map { it.toModel() }) @@ -137,17 +135,15 @@ fun SceneContainer( } } - if (isRibbonEnabled) { - BottomRightCornerRibbon( - content = { - Text( - text = "flexi\uD83E\uDD43", - color = Color.White, - ) - }, - modifier = Modifier.align(Alignment.BottomEnd), - ) - } + BottomRightCornerRibbon( + content = { + Text( + text = "flexi\uD83E\uDD43", + color = Color.White, + ) + }, + modifier = Modifier.align(Alignment.BottomEnd), + ) } } diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/scene/ui/composable/transitions/FromLockscreenToShadeTransition.kt b/packages/SystemUI/compose/features/src/com/android/systemui/scene/ui/composable/transitions/FromLockscreenToShadeTransition.kt index fadbdce80cbf..22dc0aee45b4 100644 --- a/packages/SystemUI/compose/features/src/com/android/systemui/scene/ui/composable/transitions/FromLockscreenToShadeTransition.kt +++ b/packages/SystemUI/compose/features/src/com/android/systemui/scene/ui/composable/transitions/FromLockscreenToShadeTransition.kt @@ -10,7 +10,6 @@ import com.android.systemui.shade.ui.composable.Shade fun TransitionBuilder.lockscreenToShadeTransition() { spec = tween(durationMillis = 500) - punchHole(Shade.Elements.QuickSettings, bounds = Shade.Elements.Scrim, Shade.Shapes.Scrim) translate(Shade.Elements.Scrim, Edge.Top, startsOutsideLayoutBounds = false) fractionRange(end = 0.5f) { fade(Shade.Elements.ScrimBackground) diff --git a/packages/SystemUI/compose/scene/Android.bp b/packages/SystemUI/compose/scene/Android.bp index 050d1d5651ad..3424085049cc 100644 --- a/packages/SystemUI/compose/scene/Android.bp +++ b/packages/SystemUI/compose/scene/Android.bp @@ -21,12 +21,19 @@ package { default_applicable_licenses: ["frameworks_base_packages_SystemUI_license"], } +filegroup { + name: "PlatformComposeSceneTransitionLayout-srcs", + srcs: [ + "src/**/*.kt", + ], +} + android_library { name: "PlatformComposeSceneTransitionLayout", manifest: "AndroidManifest.xml", srcs: [ - "src/**/*.kt", + ":PlatformComposeSceneTransitionLayout-srcs", ], static_libs: [ diff --git a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/Element.kt b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/Element.kt index 6153e199c24e..2b1195229c76 100644 --- a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/Element.kt +++ b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/Element.kt @@ -17,28 +17,27 @@ package com.android.compose.animation.scene import androidx.compose.runtime.Composable -import androidx.compose.runtime.DisposableEffect -import androidx.compose.runtime.derivedStateOf +import androidx.compose.runtime.Stable import androidx.compose.runtime.getValue import androidx.compose.runtime.movableContentOf import androidx.compose.runtime.mutableStateOf -import androidx.compose.runtime.remember import androidx.compose.runtime.setValue import androidx.compose.runtime.snapshots.Snapshot import androidx.compose.runtime.snapshots.SnapshotStateMap import androidx.compose.ui.ExperimentalComposeUiApi import androidx.compose.ui.Modifier -import androidx.compose.ui.composed -import androidx.compose.ui.draw.drawWithContent import androidx.compose.ui.geometry.Offset import androidx.compose.ui.geometry.isSpecified import androidx.compose.ui.geometry.isUnspecified import androidx.compose.ui.geometry.lerp +import androidx.compose.ui.graphics.drawscope.ContentDrawScope import androidx.compose.ui.graphics.drawscope.scale import androidx.compose.ui.layout.IntermediateMeasureScope import androidx.compose.ui.layout.Measurable import androidx.compose.ui.layout.Placeable import androidx.compose.ui.layout.intermediateLayout +import androidx.compose.ui.node.DrawModifierNode +import androidx.compose.ui.node.ModifierNodeElement import androidx.compose.ui.platform.testTag import androidx.compose.ui.unit.Constraints import androidx.compose.ui.unit.IntSize @@ -46,8 +45,10 @@ import androidx.compose.ui.unit.round import com.android.compose.animation.scene.transformation.PropertyTransformation import com.android.compose.animation.scene.transformation.SharedElementTransformation import com.android.compose.ui.util.lerp +import kotlinx.coroutines.launch /** An element on screen, that can be composed in one or more scenes. */ +@Stable internal class Element(val key: ElementKey) { /** * The last values of this element, coming from any scene. Note that this value will be unstable @@ -92,16 +93,25 @@ internal class Element(val key: ElementKey) { } /** The target values of this element in a given scene. */ - class TargetValues { + @Stable + class TargetValues(val scene: SceneKey) { val lastValues = Values() var targetSize by mutableStateOf(SizeUnspecified) var targetOffset by mutableStateOf(Offset.Unspecified) val sharedValues = SnapshotStateMap<ValueKey, SharedValue<*>>() + + /** + * The attached [ElementNode] a Modifier.element() for a given element and scene. During + * composition, this set could have 0 to 2 elements. After composition and after all + * modifier nodes have been attached/detached, this set should contain exactly 1 element. + */ + val nodes = mutableSetOf<ElementNode>() } /** A shared value of this element. */ + @Stable class SharedValue<T>(val key: ValueKey, initialValue: T) { var value by mutableStateOf(initialValue) } @@ -121,69 +131,136 @@ data class Scale(val scaleX: Float, val scaleY: Float, val pivot: Offset = Offse /** The implementation of [SceneScope.element]. */ @OptIn(ExperimentalComposeUiApi::class) +@Stable internal fun Modifier.element( layoutImpl: SceneTransitionLayoutImpl, scene: Scene, key: ElementKey, -): Modifier = composed { - val sceneValues = remember(scene, key) { Element.TargetValues() } - val element = - // Get the element associated to [key] if it was already composed in another scene, - // otherwise create it and add it to our Map<ElementKey, Element>. This is done inside a - // withoutReadObservation() because there is no need to recompose when that map is mutated. - Snapshot.withoutReadObservation { - val element = - layoutImpl.elements[key] ?: Element(key).also { layoutImpl.elements[key] = it } - val previousValues = element.sceneValues[scene.key] - if (previousValues == null) { - element.sceneValues[scene.key] = sceneValues - } else if (previousValues != sceneValues) { - error("$key was composed multiple times in $scene") - } +): Modifier { + val element: Element + val sceneValues: Element.TargetValues + + // Get the element associated to [key] if it was already composed in another scene, + // otherwise create it and add it to our Map<ElementKey, Element>. This is done inside a + // withoutReadObservation() because there is no need to recompose when that map is mutated. + Snapshot.withoutReadObservation { + element = layoutImpl.elements[key] ?: Element(key).also { layoutImpl.elements[key] = it } + sceneValues = + element.sceneValues[scene.key] + ?: Element.TargetValues(scene.key).also { element.sceneValues[scene.key] = it } + } - element + return this.then(ElementModifier(layoutImpl, scene, element, sceneValues)) + // TODO(b/311132415): Move this into ElementNode once we can create a delegate + // IntermediateLayoutModifierNode. + .intermediateLayout { measurable, constraints -> + val placeable = + measure(layoutImpl, scene, element, sceneValues, measurable, constraints) + layout(placeable.width, placeable.height) { + place(layoutImpl, scene, element, sceneValues, placeable, placementScope = this) + } } + .testTag(key.testTag) +} + +/** + * An element associated to [ElementNode]. Note that this element does not support updates as its + * arguments should always be the same. + */ +private data class ElementModifier( + private val layoutImpl: SceneTransitionLayoutImpl, + private val scene: Scene, + private val element: Element, + private val sceneValues: Element.TargetValues, +) : ModifierNodeElement<ElementNode>() { + override fun create(): ElementNode = ElementNode(layoutImpl, scene, element, sceneValues) + + override fun update(node: ElementNode) { + node.update(layoutImpl, scene, element, sceneValues) + } +} + +internal class ElementNode( + layoutImpl: SceneTransitionLayoutImpl, + scene: Scene, + element: Element, + sceneValues: Element.TargetValues, +) : Modifier.Node(), DrawModifierNode { + private var layoutImpl: SceneTransitionLayoutImpl = layoutImpl + private var scene: Scene = scene + private var element: Element = element + private var sceneValues: Element.TargetValues = sceneValues + + override fun onAttach() { + super.onAttach() + addNodeToSceneValues() + } - DisposableEffect(scene, sceneValues, element) { - onDispose { - element.sceneValues.remove(scene.key) + private fun addNodeToSceneValues() { + sceneValues.nodes.add(this) - // This was the last scene this element was in, so remove it from the map. - if (element.sceneValues.isEmpty()) { - layoutImpl.elements.remove(element.key) + coroutineScope.launch { + // At this point all [CodeLocationNode] have been attached or detached, which means that + // [sceneValues.codeLocations] should have exactly 1 element, otherwise this means that + // this element was composed multiple times in the same scene. + val nCodeLocations = sceneValues.nodes.size + if (nCodeLocations != 1 || !sceneValues.nodes.contains(this@ElementNode)) { + error("${element.key} was composed $nCodeLocations times in ${sceneValues.scene}") } } } - val drawScale by - remember(layoutImpl, element, scene, sceneValues) { - derivedStateOf { getDrawScale(layoutImpl, element, scene, sceneValues) } + override fun onDetach() { + super.onDetach() + removeNodeFromSceneValues() + } + + private fun removeNodeFromSceneValues() { + sceneValues.nodes.remove(this) + + // If element is not composed from this scene anymore, remove the scene values. This works + // because [onAttach] is called before [onDetach], so if an element is moved from the UI + // tree we will first add the new code location then remove the old one. + if (sceneValues.nodes.isEmpty()) { + element.sceneValues.remove(sceneValues.scene) } - drawWithContent { - if (shouldDrawElement(layoutImpl, scene, element)) { - if (drawScale == Scale.Default) { - this@drawWithContent.drawContent() - } else { - scale( - drawScale.scaleX, - drawScale.scaleY, - if (drawScale.pivot.isUnspecified) center else drawScale.pivot - ) { - this@drawWithContent.drawContent() - } - } - } + // If the element is not composed in any scene, remove it from the elements map. + if (element.sceneValues.isEmpty()) { + layoutImpl.elements.remove(element.key) } - .modifierTransformations(layoutImpl, scene, element, sceneValues) - .intermediateLayout { measurable, constraints -> - val placeable = - measure(layoutImpl, scene, element, sceneValues, measurable, constraints) - layout(placeable.width, placeable.height) { - place(layoutImpl, scene, element, sceneValues, placeable, placementScope = this) + } + + fun update( + layoutImpl: SceneTransitionLayoutImpl, + scene: Scene, + element: Element, + sceneValues: Element.TargetValues, + ) { + removeNodeFromSceneValues() + this.layoutImpl = layoutImpl + this.scene = scene + this.element = element + this.sceneValues = sceneValues + addNodeToSceneValues() + } + + override fun ContentDrawScope.draw() { + if (shouldDrawElement(layoutImpl, scene, element)) { + val drawScale = getDrawScale(layoutImpl, element, scene, sceneValues) + if (drawScale == Scale.Default) { + drawContent() + } else { + scale( + drawScale.scaleX, + drawScale.scaleY, + if (drawScale.pivot.isUnspecified) center else drawScale.pivot, + ) { + this@draw.drawContent() + } } } - .testTag(key.testTag) + } } private fun shouldDrawElement( @@ -268,39 +345,6 @@ internal fun sharedElementTransformation( } /** - * Chain the [com.android.compose.animation.scene.transformation.ModifierTransformation] applied - * throughout the current transition, if any. - */ -private fun Modifier.modifierTransformations( - layoutImpl: SceneTransitionLayoutImpl, - scene: Scene, - element: Element, - sceneValues: Element.TargetValues, -): Modifier { - when (val state = layoutImpl.state.transitionState) { - is TransitionState.Idle -> return this - is TransitionState.Transition -> { - val fromScene = state.fromScene - val toScene = state.toScene - if (fromScene == toScene) { - // Same as idle. - return this - } - - return layoutImpl.transitions - .transitionSpec(fromScene, state.toScene) - .transformations(element.key, scene.key) - .modifier - .fold(this) { modifier, transformation -> - with(transformation) { - modifier.transform(layoutImpl, scene, element, sceneValues) - } - } - } - } -} - -/** * Whether the element is opaque or not. * * Important: The logic here should closely match the logic in [elementAlpha]. Note that we don't diff --git a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/Key.kt b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/Key.kt index bc015eedb1b4..84d3b8647d6c 100644 --- a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/Key.kt +++ b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/Key.kt @@ -17,11 +17,13 @@ package com.android.compose.animation.scene import androidx.annotation.VisibleForTesting +import androidx.compose.runtime.Stable /** * A base class to create unique keys, associated to an [identity] that is used to check the * equality of two key instances. */ +@Stable sealed class Key(val debugName: String, val identity: Any) { override fun equals(other: Any?): Boolean { if (this === other) return true @@ -43,7 +45,10 @@ class SceneKey( name: String, identity: Any = Object(), ) : Key(name, identity) { - @VisibleForTesting val testTag: String = "scene:$name" + @VisibleForTesting + // TODO(b/240432457): Make internal once PlatformComposeSceneTransitionLayoutTestsUtils can + // access internal members. + val testTag: String = "scene:$name" /** The unique [ElementKey] identifying this scene's root element. */ val rootElementKey = ElementKey(name, identity) @@ -64,7 +69,10 @@ class ElementKey( */ val isBackground: Boolean = false, ) : Key(name, identity), ElementMatcher { - @VisibleForTesting val testTag: String = "element:$name" + @VisibleForTesting + // TODO(b/240432457): Make internal once PlatformComposeSceneTransitionLayoutTestsUtils can + // access internal members. + val testTag: String = "element:$name" override fun matches(key: ElementKey, scene: SceneKey): Boolean { return key == this diff --git a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/MultiPointerDraggable.kt b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/MultiPointerDraggable.kt index d48781a4529b..a0fba8076517 100644 --- a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/MultiPointerDraggable.kt +++ b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/MultiPointerDraggable.kt @@ -23,20 +23,25 @@ import androidx.compose.foundation.gestures.awaitHorizontalTouchSlopOrCancellati import androidx.compose.foundation.gestures.awaitVerticalTouchSlopOrCancellation import androidx.compose.foundation.gestures.horizontalDrag import androidx.compose.foundation.gestures.verticalDrag +import androidx.compose.runtime.Stable import androidx.compose.runtime.getValue -import androidx.compose.runtime.remember -import androidx.compose.runtime.rememberUpdatedState import androidx.compose.ui.Modifier -import androidx.compose.ui.composed import androidx.compose.ui.geometry.Offset +import androidx.compose.ui.input.pointer.PointerEvent import androidx.compose.ui.input.pointer.PointerEventPass import androidx.compose.ui.input.pointer.PointerId import androidx.compose.ui.input.pointer.PointerInputChange import androidx.compose.ui.input.pointer.PointerInputScope +import androidx.compose.ui.input.pointer.SuspendingPointerInputModifierNode import androidx.compose.ui.input.pointer.pointerInput import androidx.compose.ui.input.pointer.positionChange import androidx.compose.ui.input.pointer.util.VelocityTracker import androidx.compose.ui.input.pointer.util.addPointerInputChange +import androidx.compose.ui.node.CompositionLocalConsumerModifierNode +import androidx.compose.ui.node.DelegatingNode +import androidx.compose.ui.node.ModifierNodeElement +import androidx.compose.ui.node.PointerInputModifierNode +import androidx.compose.ui.node.currentValueOf import androidx.compose.ui.platform.LocalViewConfiguration import androidx.compose.ui.unit.IntSize import androidx.compose.ui.unit.Velocity @@ -56,7 +61,7 @@ import androidx.compose.ui.util.fastForEach * dragged) and a second pointer is down and dragged. This is an implementation detail that might * change in the future. */ -// TODO(b/291055080): Migrate to the Modifier.Node API. +@Stable internal fun Modifier.multiPointerDraggable( orientation: Orientation, enabled: Boolean, @@ -64,22 +69,88 @@ internal fun Modifier.multiPointerDraggable( onDragStarted: (layoutSize: IntSize, startedPosition: Offset, pointersDown: Int) -> Unit, onDragDelta: (Float) -> Unit, onDragStopped: (velocity: Float) -> Unit, -): Modifier = composed { - val onDragStarted by rememberUpdatedState(onDragStarted) - val onDragStopped by rememberUpdatedState(onDragStopped) - val onDragDelta by rememberUpdatedState(onDragDelta) - val startDragImmediately by rememberUpdatedState(startDragImmediately) - - val velocityTracker = remember { VelocityTracker() } - val maxFlingVelocity = - LocalViewConfiguration.current.maximumFlingVelocity.let { max -> - val maxF = max.toFloat() - Velocity(maxF, maxF) +): Modifier = + this.then( + MultiPointerDraggableElement( + orientation, + enabled, + startDragImmediately, + onDragStarted, + onDragDelta, + onDragStopped, + ) + ) + +private data class MultiPointerDraggableElement( + private val orientation: Orientation, + private val enabled: Boolean, + private val startDragImmediately: Boolean, + private val onDragStarted: + (layoutSize: IntSize, startedPosition: Offset, pointersDown: Int) -> Unit, + private val onDragDelta: (Float) -> Unit, + private val onDragStopped: (velocity: Float) -> Unit, +) : ModifierNodeElement<MultiPointerDraggableNode>() { + override fun create(): MultiPointerDraggableNode = + MultiPointerDraggableNode( + orientation = orientation, + enabled = enabled, + startDragImmediately = startDragImmediately, + onDragStarted = onDragStarted, + onDragDelta = onDragDelta, + onDragStopped = onDragStopped, + ) + + override fun update(node: MultiPointerDraggableNode) { + node.orientation = orientation + node.enabled = enabled + node.startDragImmediately = startDragImmediately + node.onDragStarted = onDragStarted + node.onDragDelta = onDragDelta + node.onDragStopped = onDragStopped + } +} + +private class MultiPointerDraggableNode( + orientation: Orientation, + enabled: Boolean, + var startDragImmediately: Boolean, + var onDragStarted: (layoutSize: IntSize, startedPosition: Offset, pointersDown: Int) -> Unit, + var onDragDelta: (Float) -> Unit, + var onDragStopped: (velocity: Float) -> Unit, +) : PointerInputModifierNode, DelegatingNode(), CompositionLocalConsumerModifierNode { + private val pointerInputHandler: suspend PointerInputScope.() -> Unit = { pointerInput() } + private val delegate = delegate(SuspendingPointerInputModifierNode(pointerInputHandler)) + private val velocityTracker = VelocityTracker() + + var enabled: Boolean = enabled + set(value) { + // Reset the pointer input whenever enabled changed. + if (value != field) { + field = value + delegate.resetPointerInputHandler() + } + } + + var orientation: Orientation = orientation + set(value) { + // Reset the pointer input whenever enabled orientation. + if (value != field) { + field = value + delegate.resetPointerInputHandler() + } } - pointerInput(enabled, orientation, maxFlingVelocity) { + override fun onCancelPointerInput() = delegate.onCancelPointerInput() + + override fun onPointerEvent( + pointerEvent: PointerEvent, + pass: PointerEventPass, + bounds: IntSize + ) = delegate.onPointerEvent(pointerEvent, pass, bounds) + + private suspend fun PointerInputScope.pointerInput() { if (!enabled) { - return@pointerInput + return } val onDragStart: (Offset, Int) -> Unit = { startedPosition, pointersDown -> @@ -90,6 +161,12 @@ internal fun Modifier.multiPointerDraggable( val onDragCancel: () -> Unit = { onDragStopped(/* velocity= */ 0f) } val onDragEnd: () -> Unit = { + val maxFlingVelocity = + currentValueOf(LocalViewConfiguration).maximumFlingVelocity.let { max -> + val maxF = max.toFloat() + Velocity(maxF, maxF) + } + val velocity = velocityTracker.calculateVelocity(maxFlingVelocity) onDragStopped( when (orientation) { diff --git a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/transformation/PunchHole.kt b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/PunchHole.kt index 984086b7792a..560e92becba5 100644 --- a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/transformation/PunchHole.kt +++ b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/PunchHole.kt @@ -1,5 +1,5 @@ /* - * Copyright 2023 The Android Open Source Project + * 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. @@ -14,10 +14,9 @@ * limitations under the License. */ -package com.android.compose.animation.scene.transformation +package com.android.compose.animation.scene import androidx.compose.ui.Modifier -import androidx.compose.ui.draw.drawWithContent import androidx.compose.ui.geometry.Offset import androidx.compose.ui.geometry.Size import androidx.compose.ui.geometry.toRect @@ -28,52 +27,68 @@ import androidx.compose.ui.graphics.Paint import androidx.compose.ui.graphics.RectangleShape import androidx.compose.ui.graphics.Shape import androidx.compose.ui.graphics.drawOutline +import androidx.compose.ui.graphics.drawscope.ContentDrawScope import androidx.compose.ui.graphics.drawscope.DrawScope import androidx.compose.ui.graphics.drawscope.drawIntoCanvas import androidx.compose.ui.graphics.drawscope.translate import androidx.compose.ui.graphics.withSaveLayer +import androidx.compose.ui.node.DrawModifierNode +import androidx.compose.ui.node.ModifierNodeElement import androidx.compose.ui.unit.LayoutDirection import androidx.compose.ui.unit.toSize -import com.android.compose.animation.scene.Element -import com.android.compose.animation.scene.ElementKey -import com.android.compose.animation.scene.ElementMatcher -import com.android.compose.animation.scene.Scene -import com.android.compose.animation.scene.SceneTransitionLayoutImpl -/** Punch a hole in an element using the bounds of another element and a given [shape]. */ -internal class PunchHole( - override val matcher: ElementMatcher, +internal fun Modifier.punchHole( + layoutImpl: SceneTransitionLayoutImpl, + element: ElementKey, + bounds: ElementKey, + shape: Shape, +): Modifier = this.then(PunchHoleElement(layoutImpl, element, bounds, shape)) + +private data class PunchHoleElement( + private val layoutImpl: SceneTransitionLayoutImpl, + private val element: ElementKey, private val bounds: ElementKey, private val shape: Shape, -) : ModifierTransformation { +) : ModifierNodeElement<PunchHoleNode>() { + override fun create(): PunchHoleNode = PunchHoleNode(layoutImpl, element, bounds, shape) + override fun update(node: PunchHoleNode) { + node.layoutImpl = layoutImpl + node.element = element + node.bounds = bounds + node.shape = shape + } +} + +private class PunchHoleNode( + var layoutImpl: SceneTransitionLayoutImpl, + var element: ElementKey, + var bounds: ElementKey, + var shape: Shape, +) : Modifier.Node(), DrawModifierNode { private var lastSize: Size = Size.Unspecified private var lastLayoutDirection: LayoutDirection = LayoutDirection.Ltr private var lastOutline: Outline? = null - override fun Modifier.transform( - layoutImpl: SceneTransitionLayoutImpl, - scene: Scene, - element: Element, - sceneValues: Element.TargetValues, - ): Modifier { - return drawWithContent { - val bounds = layoutImpl.elements[bounds] - if ( - bounds == null || - bounds.lastSharedValues.size == Element.SizeUnspecified || - bounds.lastSharedValues.offset == Offset.Unspecified - ) { + override fun ContentDrawScope.draw() { + val bounds = layoutImpl.elements[bounds] + + if ( + bounds == null || + bounds.lastSharedValues.size == Element.SizeUnspecified || + bounds.lastSharedValues.offset == Offset.Unspecified + ) { + drawContent() + return + } + + val element = layoutImpl.elements.getValue(element) + drawIntoCanvas { canvas -> + canvas.withSaveLayer(size.toRect(), Paint()) { drawContent() - return@drawWithContent - } - drawIntoCanvas { canvas -> - canvas.withSaveLayer(size.toRect(), Paint()) { - drawContent() - val offset = bounds.lastSharedValues.offset - element.lastSharedValues.offset - translate(offset.x, offset.y) { drawHole(bounds) } - } + val offset = bounds.lastSharedValues.offset - element.lastSharedValues.offset + translate(offset.x, offset.y) { drawHole(bounds) } } } } diff --git a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/Scene.kt b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/Scene.kt index 1a79522da05d..f5561cb404b6 100644 --- a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/Scene.kt +++ b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/Scene.kt @@ -19,20 +19,24 @@ package com.android.compose.animation.scene import androidx.compose.foundation.gestures.Orientation import androidx.compose.foundation.layout.Box import androidx.compose.runtime.Composable +import androidx.compose.runtime.Stable import androidx.compose.runtime.State import androidx.compose.runtime.getValue import androidx.compose.runtime.mutableFloatStateOf import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.setValue +import androidx.compose.runtime.snapshots.Snapshot import androidx.compose.runtime.snapshots.SnapshotStateMap import androidx.compose.ui.ExperimentalComposeUiApi import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.Shape import androidx.compose.ui.layout.intermediateLayout import androidx.compose.ui.platform.testTag import androidx.compose.ui.unit.IntSize import androidx.compose.ui.zIndex /** A scene in a [SceneTransitionLayout]. */ +@Stable internal class Scene( val key: SceneKey, layoutImpl: SceneTransitionLayoutImpl, @@ -76,6 +80,8 @@ private class SceneScopeImpl( private val layoutImpl: SceneTransitionLayoutImpl, private val scene: Scene, ) : SceneScope { + override val layoutState: SceneTransitionLayoutState = layoutImpl.state + override fun Modifier.element(key: ElementKey): Modifier { return element(layoutImpl, scene, key) } @@ -102,11 +108,13 @@ private class SceneScopeImpl( ): State<T> { val element = element?.let { key -> - layoutImpl.elements[key] - ?: error( - "Element $key is not composed. Make sure to call animateSharedXAsState " + - "*after* Modifier.element(key)." - ) + Snapshot.withoutReadObservation { + layoutImpl.elements[key] + ?: error( + "Element $key is not composed. Make sure to call " + + "animateSharedXAsState *after* Modifier.element(key)." + ) + } } return animateSharedValueAsState( @@ -128,4 +136,10 @@ private class SceneScopeImpl( ) { MovableElement(layoutImpl, scene, key, modifier, content) } + + override fun Modifier.punchHole( + element: ElementKey, + bounds: ElementKey, + shape: Shape + ): Modifier = punchHole(layoutImpl, element, bounds, shape) } diff --git a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/SceneGestureHandler.kt b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/SceneGestureHandler.kt index 838cb3bd5fba..c51287a7bb71 100644 --- a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/SceneGestureHandler.kt +++ b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/SceneGestureHandler.kt @@ -17,7 +17,6 @@ package com.android.compose.animation.scene import android.util.Log -import androidx.annotation.VisibleForTesting import androidx.compose.animation.core.Animatable import androidx.compose.animation.core.Spring import androidx.compose.animation.core.spring @@ -37,8 +36,7 @@ import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Job import kotlinx.coroutines.launch -@VisibleForTesting -class SceneGestureHandler( +internal class SceneGestureHandler( internal val layoutImpl: SceneTransitionLayoutImpl, internal val orientation: Orientation, private val coroutineScope: CoroutineScope, @@ -63,12 +61,10 @@ class SceneGestureHandler( internal val currentScene: Scene get() = layoutImpl.scene(transitionState.currentScene) - @VisibleForTesting - val isDrivingTransition + internal val isDrivingTransition get() = transitionState == swipeTransition - @VisibleForTesting - var isAnimatingOffset + internal var isAnimatingOffset get() = swipeTransition.isAnimatingOffset private set(value) { swipeTransition.isAnimatingOffset = value @@ -81,7 +77,7 @@ class SceneGestureHandler( * The velocity threshold at which the intent of the user is to swipe up or down. It is the same * as SwipeableV2Defaults.VelocityThreshold. */ - @VisibleForTesting val velocityThreshold = with(layoutImpl.density) { 125.dp.toPx() } + internal val velocityThreshold = with(layoutImpl.density) { 125.dp.toPx() } /** * The positional threshold at which the intent of the user is to swipe to the next scene. It is @@ -533,8 +529,7 @@ private class SceneDraggableHandler( } } -@VisibleForTesting -class SceneNestedScrollHandler( +internal class SceneNestedScrollHandler( private val gestureHandler: SceneGestureHandler, private val startBehavior: NestedScrollBehavior, private val endBehavior: NestedScrollBehavior, diff --git a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/SceneTransitionLayout.kt b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/SceneTransitionLayout.kt index 9c31445e1b96..07add77eccd4 100644 --- a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/SceneTransitionLayout.kt +++ b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/SceneTransitionLayout.kt @@ -19,10 +19,12 @@ package com.android.compose.animation.scene import androidx.annotation.FloatRange import androidx.compose.foundation.gestures.Orientation import androidx.compose.runtime.Composable +import androidx.compose.runtime.Stable import androidx.compose.runtime.State import androidx.compose.runtime.remember import androidx.compose.runtime.rememberCoroutineScope import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.Shape import androidx.compose.ui.input.nestedscroll.NestedScrollConnection import androidx.compose.ui.platform.LocalDensity @@ -57,30 +59,17 @@ fun SceneTransitionLayout( @FloatRange(from = 0.0, to = 0.5) transitionInterceptionThreshold: Float = 0f, scenes: SceneTransitionLayoutScope.() -> Unit, ) { - val density = LocalDensity.current - val coroutineScope = rememberCoroutineScope() - val layoutImpl = remember { - SceneTransitionLayoutImpl( - onChangeScene = onChangeScene, - builder = scenes, - transitions = transitions, - state = state, - density = density, - edgeDetector = edgeDetector, - transitionInterceptionThreshold = transitionInterceptionThreshold, - coroutineScope = coroutineScope, - ) - } - - layoutImpl.onChangeScene = onChangeScene - layoutImpl.transitions = transitions - layoutImpl.density = density - layoutImpl.edgeDetector = edgeDetector - layoutImpl.transitionInterceptionThreshold = transitionInterceptionThreshold - - layoutImpl.setScenes(scenes) - layoutImpl.setCurrentScene(currentScene) - layoutImpl.Content(modifier) + SceneTransitionLayoutForTesting( + currentScene, + onChangeScene, + transitions, + state, + edgeDetector, + transitionInterceptionThreshold, + modifier, + onLayoutImpl = null, + scenes, + ) } interface SceneTransitionLayoutScope { @@ -107,7 +96,11 @@ interface SceneTransitionLayoutScope { @DslMarker annotation class ElementDsl @ElementDsl +@Stable interface SceneScope { + /** The state of the [SceneTransitionLayout] in which this scene is contained. */ + val layoutState: SceneTransitionLayoutState + /** * Tag an element identified by [key]. * @@ -187,6 +180,18 @@ interface SceneScope { lerp: (start: T, stop: T, fraction: Float) -> T, canOverflow: Boolean, ): State<T> + + /** + * Punch a hole in this [element] using the bounds of [bounds] in [scene] and the given [shape]. + * + * Punching a hole in an element will "remove" any pixel drawn by that element in the hole area. + * This can be used to make content drawn below an opaque element visible. For example, if we + * have [this lockscreen scene](http://shortn/_VYySFnJDhN) drawn below + * [this shade scene](http://shortn/_fpxGUk0Rg7) and punch a hole in the latter using the big + * clock time bounds and a RoundedCornerShape(10dp), [this](http://shortn/_qt80IvORFj) would be + * the result. + */ + fun Modifier.punchHole(element: ElementKey, bounds: ElementKey, shape: Shape): Modifier } // TODO(b/291053742): Add animateSharedValueAsState(targetValue) without any ValueKey and ElementKey @@ -228,3 +233,47 @@ enum class SwipeDirection(val orientation: Orientation) { Left(Orientation.Horizontal), Right(Orientation.Horizontal), } + +/** + * An internal version of [SceneTransitionLayout] to be used for tests. + * + * Important: You should use this only in tests and if you need to access the underlying + * [SceneTransitionLayoutImpl]. In other cases, you should use [SceneTransitionLayout]. + */ +@Composable +internal fun SceneTransitionLayoutForTesting( + currentScene: SceneKey, + onChangeScene: (SceneKey) -> Unit, + transitions: SceneTransitions, + state: SceneTransitionLayoutState, + edgeDetector: EdgeDetector, + transitionInterceptionThreshold: Float, + modifier: Modifier, + onLayoutImpl: ((SceneTransitionLayoutImpl) -> Unit)?, + scenes: SceneTransitionLayoutScope.() -> Unit, +) { + val density = LocalDensity.current + val coroutineScope = rememberCoroutineScope() + val layoutImpl = remember { + SceneTransitionLayoutImpl( + onChangeScene = onChangeScene, + builder = scenes, + transitions = transitions, + state = state, + density = density, + edgeDetector = edgeDetector, + transitionInterceptionThreshold = transitionInterceptionThreshold, + coroutineScope = coroutineScope, + ) + .also { onLayoutImpl?.invoke(it) } + } + + layoutImpl.onChangeScene = onChangeScene + layoutImpl.transitions = transitions + layoutImpl.density = density + layoutImpl.edgeDetector = edgeDetector + + layoutImpl.setScenes(scenes) + layoutImpl.setCurrentScene(currentScene) + layoutImpl.Content(modifier) +} diff --git a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/SceneTransitionLayoutImpl.kt b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/SceneTransitionLayoutImpl.kt index 94f2737039f4..02ddccbc051b 100644 --- a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/SceneTransitionLayoutImpl.kt +++ b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/SceneTransitionLayoutImpl.kt @@ -17,13 +17,13 @@ package com.android.compose.animation.scene import androidx.activity.compose.BackHandler -import androidx.annotation.VisibleForTesting import androidx.compose.foundation.gestures.Orientation import androidx.compose.foundation.layout.Box import androidx.compose.runtime.Composable import androidx.compose.runtime.DisposableEffect import androidx.compose.runtime.LaunchedEffect import androidx.compose.runtime.SideEffect +import androidx.compose.runtime.Stable import androidx.compose.runtime.getValue import androidx.compose.runtime.key import androidx.compose.runtime.mutableStateOf @@ -42,8 +42,8 @@ import com.android.compose.ui.util.lerp import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.channels.Channel -@VisibleForTesting -class SceneTransitionLayoutImpl( +@Stable +internal class SceneTransitionLayoutImpl( onChangeScene: (SceneKey) -> Unit, builder: SceneTransitionLayoutScope.() -> Unit, transitions: SceneTransitions, @@ -260,8 +260,7 @@ class SceneTransitionLayoutImpl( internal fun isSceneReady(scene: SceneKey): Boolean = readyScenes.containsKey(scene) - @VisibleForTesting - fun setScenesTargetSizeForTest(size: IntSize) { + internal fun setScenesTargetSizeForTest(size: IntSize) { scenes.values.forEach { it.targetSize = size } } } diff --git a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/SceneTransitionLayoutState.kt b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/SceneTransitionLayoutState.kt index b9f83c545122..f48e9147eef4 100644 --- a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/SceneTransitionLayoutState.kt +++ b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/SceneTransitionLayoutState.kt @@ -16,11 +16,13 @@ package com.android.compose.animation.scene +import androidx.compose.runtime.Stable import androidx.compose.runtime.getValue import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.setValue /** The state of a [SceneTransitionLayout]. */ +@Stable class SceneTransitionLayoutState(initialScene: SceneKey) { /** * The current [TransitionState]. All values read here are backed by the Snapshot system. @@ -29,9 +31,31 @@ class SceneTransitionLayoutState(initialScene: SceneKey) { * [SceneTransitionLayoutState.observableTransitionState] instead. */ var transitionState: TransitionState by mutableStateOf(TransitionState.Idle(initialScene)) - internal set + + /** + * Whether we are transitioning, optionally restricting the check to the transition between + * [from] and [to]. + */ + fun isTransitioning(from: SceneKey? = null, to: SceneKey? = null): Boolean { + val transition = transitionState as? TransitionState.Transition ?: return false + + // TODO(b/310915136): Remove this check. + if (transition.fromScene == transition.toScene) { + return false + } + + return (from == null || transition.fromScene == from) && + (to == null || transition.toScene == to) + } + + /** Whether we are transitioning from [scene] to [other], or from [other] to [scene]. */ + fun isTransitioningBetween(scene: SceneKey, other: SceneKey): Boolean { + return isTransitioning(from = scene, to = other) || + isTransitioning(from = other, to = scene) + } } +@Stable sealed interface TransitionState { /** * The current effective scene. If a new transition was triggered, it would start from this diff --git a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/SceneTransitions.kt b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/SceneTransitions.kt index 72a2d612d8e3..f91895bb0e05 100644 --- a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/SceneTransitions.kt +++ b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/SceneTransitions.kt @@ -16,9 +16,9 @@ package com.android.compose.animation.scene -import androidx.annotation.VisibleForTesting import androidx.compose.animation.core.AnimationSpec import androidx.compose.animation.core.snap +import androidx.compose.runtime.Stable import androidx.compose.ui.geometry.Offset import androidx.compose.ui.unit.IntSize import androidx.compose.ui.util.fastForEach @@ -28,7 +28,6 @@ import com.android.compose.animation.scene.transformation.AnchoredTranslate import com.android.compose.animation.scene.transformation.DrawScale import com.android.compose.animation.scene.transformation.EdgeTranslate import com.android.compose.animation.scene.transformation.Fade -import com.android.compose.animation.scene.transformation.ModifierTransformation import com.android.compose.animation.scene.transformation.PropertyTransformation import com.android.compose.animation.scene.transformation.RangedPropertyTransformation import com.android.compose.animation.scene.transformation.ScaleSize @@ -38,12 +37,11 @@ import com.android.compose.animation.scene.transformation.Translate /** The transitions configuration of a [SceneTransitionLayout]. */ class SceneTransitions( - @get:VisibleForTesting val transitionSpecs: List<TransitionSpec>, + internal val transitionSpecs: List<TransitionSpec>, ) { private val cache = mutableMapOf<SceneKey, MutableMap<SceneKey, TransitionSpec>>() - @VisibleForTesting - fun transitionSpec(from: SceneKey, to: SceneKey): TransitionSpec { + internal fun transitionSpec(from: SceneKey, to: SceneKey): TransitionSpec { return cache.getOrPut(from) { mutableMapOf() }.getOrPut(to) { findSpec(from, to) } } @@ -95,6 +93,7 @@ class SceneTransitions( } /** The definition of a transition between [from] and [to]. */ +@Stable data class TransitionSpec( val from: SceneKey?, val to: SceneKey?, @@ -124,7 +123,6 @@ data class TransitionSpec( scene: SceneKey, ): ElementTransformations { var shared: SharedElementTransformation? = null - val modifier = mutableListOf<ModifierTransformation>() var offset: PropertyTransformation<Offset>? = null var size: PropertyTransformation<IntSize>? = null var drawScale: PropertyTransformation<Scale>? = null @@ -168,12 +166,11 @@ data class TransitionSpec( throwIfNotNull(shared, element, name = "shared") shared = transformation } - is ModifierTransformation -> modifier.add(transformation) is PropertyTransformation<*> -> onPropertyTransformation(transformation) } } - return ElementTransformations(shared, modifier, offset, size, drawScale, alpha) + return ElementTransformations(shared, offset, size, drawScale, alpha) } private fun throwIfNotNull( @@ -190,7 +187,6 @@ data class TransitionSpec( /** The transformations of an element during a transition. */ internal class ElementTransformations( val shared: SharedElementTransformation?, - val modifier: List<ModifierTransformation>, val offset: PropertyTransformation<Offset>?, val size: PropertyTransformation<IntSize>?, val drawScale: PropertyTransformation<Scale>?, diff --git a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/TransitionDsl.kt b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/TransitionDsl.kt index ca66dff5e231..f820074ec3d1 100644 --- a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/TransitionDsl.kt +++ b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/TransitionDsl.kt @@ -18,8 +18,6 @@ package com.android.compose.animation.scene import androidx.compose.animation.core.AnimationSpec import androidx.compose.ui.geometry.Offset -import androidx.compose.ui.graphics.RectangleShape -import androidx.compose.ui.graphics.Shape import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.dp @@ -131,19 +129,6 @@ interface TransitionBuilder : PropertyTransformationBuilder { ) /** - * Punch a hole in the element(s) matching [matcher] that has the same bounds as [bounds] and - * using the given [shape]. - * - * Punching a hole in an element will "remove" any pixel drawn by that element in the hole area. - * This can be used to make content drawn below an opaque element visible. For example, if we - * have [this lockscreen scene](http://shortn/_VYySFnJDhN) drawn below - * [this shade scene](http://shortn/_fpxGUk0Rg7) and punch a hole in the latter using the big - * clock time bounds and a RoundedCornerShape(10dp), [this](http://shortn/_qt80IvORFj) would be - * the result. - */ - fun punchHole(matcher: ElementMatcher, bounds: ElementKey, shape: Shape = RectangleShape) - - /** * Adds the transformations in [builder] but in reversed order. This allows you to partially * reuse the definition of the transition from scene `Foo` to scene `Bar` inside the definition * of the transition from scene `Bar` to scene `Foo`. diff --git a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/TransitionDslImpl.kt b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/TransitionDslImpl.kt index d4909892f492..8c0a5a394331 100644 --- a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/TransitionDslImpl.kt +++ b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/TransitionDslImpl.kt @@ -22,7 +22,6 @@ import androidx.compose.animation.core.Spring import androidx.compose.animation.core.VectorConverter import androidx.compose.animation.core.spring import androidx.compose.ui.geometry.Offset -import androidx.compose.ui.graphics.Shape import androidx.compose.ui.unit.Dp import com.android.compose.animation.scene.transformation.AnchoredSize import com.android.compose.animation.scene.transformation.AnchoredTranslate @@ -30,7 +29,6 @@ import com.android.compose.animation.scene.transformation.DrawScale import com.android.compose.animation.scene.transformation.EdgeTranslate import com.android.compose.animation.scene.transformation.Fade import com.android.compose.animation.scene.transformation.PropertyTransformation -import com.android.compose.animation.scene.transformation.PunchHole import com.android.compose.animation.scene.transformation.RangedPropertyTransformation import com.android.compose.animation.scene.transformation.ScaleSize import com.android.compose.animation.scene.transformation.SharedElementTransformation @@ -93,10 +91,6 @@ internal class TransitionBuilderImpl : TransitionBuilder { spec.vectorize(Float.VectorConverter).durationMillis } - override fun punchHole(matcher: ElementMatcher, bounds: ElementKey, shape: Shape) { - transformations.add(PunchHole(matcher, bounds, shape)) - } - override fun reversed(builder: TransitionBuilder.() -> Unit) { reversed = true builder() diff --git a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/transformation/Transformation.kt b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/transformation/Transformation.kt index 0db8469466ef..206935558179 100644 --- a/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/transformation/Transformation.kt +++ b/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/transformation/Transformation.kt @@ -16,7 +16,6 @@ package com.android.compose.animation.scene.transformation -import androidx.compose.ui.Modifier import com.android.compose.animation.scene.Element import com.android.compose.animation.scene.ElementMatcher import com.android.compose.animation.scene.Scene @@ -52,19 +51,6 @@ internal class SharedElementTransformation( internal val scenePicker: SharedElementScenePicker, ) : Transformation -/** A transformation that is applied on the element during the whole transition. */ -internal interface ModifierTransformation : Transformation { - /** Apply the transformation to [element]. */ - // TODO(b/290184746): Figure out a public API for custom transformations that don't have access - // to these internal classes. - fun Modifier.transform( - layoutImpl: SceneTransitionLayoutImpl, - scene: Scene, - element: Element, - sceneValues: Element.TargetValues, - ): Modifier -} - /** A transformation that changes the value of an element property, like its size or offset. */ internal sealed interface PropertyTransformation<T> : Transformation { /** diff --git a/packages/SystemUI/compose/scene/tests/Android.bp b/packages/SystemUI/compose/scene/tests/Android.bp index 6de75501dd34..13df35b7e1e8 100644 --- a/packages/SystemUI/compose/scene/tests/Android.bp +++ b/packages/SystemUI/compose/scene/tests/Android.bp @@ -30,10 +30,13 @@ android_test { srcs: [ "src/**/*.kt", + + // TODO(b/240432457): Depend on PlatformComposeSceneTransitionLayout + // directly once Kotlin tests can access internal declarations. + ":PlatformComposeSceneTransitionLayout-srcs", ], static_libs: [ - "PlatformComposeSceneTransitionLayout", "PlatformComposeSceneTransitionLayoutTestsUtils", "androidx.test.runner", diff --git a/packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/ElementTest.kt b/packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/ElementTest.kt index 6401bb3d994a..ce3e1db2c3d0 100644 --- a/packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/ElementTest.kt +++ b/packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/ElementTest.kt @@ -18,9 +18,16 @@ package com.android.compose.animation.scene import androidx.compose.animation.core.tween import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.offset import androidx.compose.foundation.layout.size import androidx.compose.runtime.Composable +import androidx.compose.runtime.SideEffect +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.remember +import androidx.compose.runtime.setValue import androidx.compose.ui.ExperimentalComposeUiApi import androidx.compose.ui.Modifier import androidx.compose.ui.layout.intermediateLayout @@ -29,6 +36,7 @@ import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.dp import androidx.test.ext.junit.runners.AndroidJUnit4 import com.google.common.truth.Truth.assertThat +import org.junit.Assert.assertThrows import org.junit.Rule import org.junit.Test import org.junit.runner.RunWith @@ -209,4 +217,241 @@ class ElementTest { } } } + + @Test + fun elementIsReusedInSameSceneAndBetweenScenes() { + var currentScene by mutableStateOf(TestScenes.SceneA) + var sceneCState by mutableStateOf(0) + var sceneDState by mutableStateOf(0) + val key = TestElements.Foo + var nullableLayoutImpl: SceneTransitionLayoutImpl? = null + + rule.setContent { + SceneTransitionLayoutForTesting( + currentScene = currentScene, + onChangeScene = { currentScene = it }, + transitions = remember { transitions {} }, + state = remember { SceneTransitionLayoutState(currentScene) }, + edgeDetector = DefaultEdgeDetector, + modifier = Modifier, + transitionInterceptionThreshold = 0f, + onLayoutImpl = { nullableLayoutImpl = it }, + ) { + scene(TestScenes.SceneA) { /* Nothing */} + scene(TestScenes.SceneB) { Box(Modifier.element(key)) } + scene(TestScenes.SceneC) { + when (sceneCState) { + 0 -> Row(Modifier.element(key)) {} + 1 -> Column(Modifier.element(key)) {} + else -> { + /* Nothing */ + } + } + } + scene(TestScenes.SceneD) { + // We should be able to extract the modifier before assigning it to different + // nodes. + val childModifier = Modifier.element(key) + when (sceneDState) { + 0 -> Row(childModifier) {} + 1 -> Column(childModifier) {} + else -> { + /* Nothing */ + } + } + } + } + } + + assertThat(nullableLayoutImpl).isNotNull() + val layoutImpl = nullableLayoutImpl!! + + // Scene A: no elements in the elements map. + rule.waitForIdle() + assertThat(layoutImpl.elements).isEmpty() + + // Scene B: element is in the map. + currentScene = TestScenes.SceneB + rule.waitForIdle() + + assertThat(layoutImpl.elements.keys).containsExactly(key) + val element = layoutImpl.elements.getValue(key) + assertThat(element.sceneValues.keys).containsExactly(TestScenes.SceneB) + + // Scene C, state 0: the same element is reused. + currentScene = TestScenes.SceneC + sceneCState = 0 + rule.waitForIdle() + + assertThat(layoutImpl.elements.keys).containsExactly(key) + assertThat(layoutImpl.elements.getValue(key)).isSameInstanceAs(element) + assertThat(element.sceneValues.keys).containsExactly(TestScenes.SceneC) + + // Scene C, state 1: the same element is reused. + sceneCState = 1 + rule.waitForIdle() + + assertThat(layoutImpl.elements.keys).containsExactly(key) + assertThat(layoutImpl.elements.getValue(key)).isSameInstanceAs(element) + assertThat(element.sceneValues.keys).containsExactly(TestScenes.SceneC) + + // Scene D, state 0: the same element is reused. + currentScene = TestScenes.SceneD + sceneDState = 0 + rule.waitForIdle() + + assertThat(layoutImpl.elements.keys).containsExactly(key) + assertThat(layoutImpl.elements.getValue(key)).isSameInstanceAs(element) + assertThat(element.sceneValues.keys).containsExactly(TestScenes.SceneD) + + // Scene D, state 1: the same element is reused. + sceneDState = 1 + rule.waitForIdle() + + assertThat(layoutImpl.elements.keys).containsExactly(key) + assertThat(layoutImpl.elements.getValue(key)).isSameInstanceAs(element) + assertThat(element.sceneValues.keys).containsExactly(TestScenes.SceneD) + + // Scene D, state 2: the element is removed from the map. + sceneDState = 2 + rule.waitForIdle() + + assertThat(element.sceneValues).isEmpty() + assertThat(layoutImpl.elements).isEmpty() + } + + @Test + fun throwsExceptionWhenElementIsComposedMultipleTimes() { + val key = TestElements.Foo + + assertThrows(IllegalStateException::class.java) { + rule.setContent { + TestSceneScope { + Column { + Box(Modifier.element(key)) + Box(Modifier.element(key)) + } + } + } + } + } + + @Test + fun throwsExceptionWhenElementIsComposedMultipleTimes_childModifier() { + val key = TestElements.Foo + + assertThrows(IllegalStateException::class.java) { + rule.setContent { + TestSceneScope { + Column { + val childModifier = Modifier.element(key) + Box(childModifier) + Box(childModifier) + } + } + } + } + } + + @Test + fun throwsExceptionWhenElementIsComposedMultipleTimes_childModifier_laterDuplication() { + val key = TestElements.Foo + + assertThrows(IllegalStateException::class.java) { + var nElements by mutableStateOf(1) + rule.setContent { + TestSceneScope { + Column { + val childModifier = Modifier.element(key) + repeat(nElements) { Box(childModifier) } + } + } + } + + nElements = 2 + rule.waitForIdle() + } + } + + @Test + fun throwsExceptionWhenElementIsComposedMultipleTimes_updatedNode() { + assertThrows(IllegalStateException::class.java) { + var key by mutableStateOf(TestElements.Foo) + rule.setContent { + TestSceneScope { + Column { + Box(Modifier.element(key)) + Box(Modifier.element(TestElements.Bar)) + } + } + } + + key = TestElements.Bar + rule.waitForIdle() + } + } + + @Test + fun elementModifierSupportsUpdates() { + var key by mutableStateOf(TestElements.Foo) + var nullableLayoutImpl: SceneTransitionLayoutImpl? = null + + rule.setContent { + SceneTransitionLayoutForTesting( + currentScene = TestScenes.SceneA, + onChangeScene = {}, + transitions = remember { transitions {} }, + state = remember { SceneTransitionLayoutState(TestScenes.SceneA) }, + edgeDetector = DefaultEdgeDetector, + modifier = Modifier, + transitionInterceptionThreshold = 0f, + onLayoutImpl = { nullableLayoutImpl = it }, + ) { + scene(TestScenes.SceneA) { Box(Modifier.element(key)) } + } + } + + assertThat(nullableLayoutImpl).isNotNull() + val layoutImpl = nullableLayoutImpl!! + + // There is only Foo in the elements map. + assertThat(layoutImpl.elements.keys).containsExactly(TestElements.Foo) + val fooElement = layoutImpl.elements.getValue(TestElements.Foo) + assertThat(fooElement.sceneValues.keys).containsExactly(TestScenes.SceneA) + + key = TestElements.Bar + + // There is only Bar in the elements map and foo scene values was cleaned up. + rule.waitForIdle() + assertThat(layoutImpl.elements.keys).containsExactly(TestElements.Bar) + val barElement = layoutImpl.elements.getValue(TestElements.Bar) + assertThat(barElement.sceneValues.keys).containsExactly(TestScenes.SceneA) + assertThat(fooElement.sceneValues).isEmpty() + } + + @Test + fun existingElementsDontRecomposeWhenTransitionStateChanges() { + var fooCompositions = 0 + + rule.testTransition( + fromSceneContent = { + SideEffect { fooCompositions++ } + Box(Modifier.element(TestElements.Foo)) + }, + toSceneContent = {}, + transition = { + spec = tween(4 * 16) + + scaleSize(TestElements.Foo, width = 2f, height = 0.5f) + translate(TestElements.Foo, x = 10.dp, y = 10.dp) + fade(TestElements.Foo) + } + ) { + before { assertThat(fooCompositions).isEqualTo(1) } + at(16) { assertThat(fooCompositions).isEqualTo(1) } + at(32) { assertThat(fooCompositions).isEqualTo(1) } + at(48) { assertThat(fooCompositions).isEqualTo(1) } + after { assertThat(fooCompositions).isEqualTo(1) } + } + } } diff --git a/packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/SceneTransitionLayoutStateTest.kt b/packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/SceneTransitionLayoutStateTest.kt new file mode 100644 index 000000000000..94c51ca50667 --- /dev/null +++ b/packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/SceneTransitionLayoutStateTest.kt @@ -0,0 +1,76 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.compose.animation.scene + +import androidx.compose.ui.test.junit4.createComposeRule +import androidx.test.ext.junit.runners.AndroidJUnit4 +import com.google.common.truth.Truth.assertThat +import org.junit.Rule +import org.junit.Test +import org.junit.runner.RunWith + +@RunWith(AndroidJUnit4::class) +class SceneTransitionLayoutStateTest { + @get:Rule val rule = createComposeRule() + + @Test + fun isTransitioningTo_idle() { + val state = SceneTransitionLayoutState(TestScenes.SceneA) + + assertThat(state.isTransitioning()).isFalse() + assertThat(state.isTransitioning(from = TestScenes.SceneA)).isFalse() + assertThat(state.isTransitioning(to = TestScenes.SceneB)).isFalse() + assertThat(state.isTransitioning(from = TestScenes.SceneA, to = TestScenes.SceneB)) + .isFalse() + } + + @Test + fun isTransitioningTo_fromSceneEqualToToScene() { + val state = SceneTransitionLayoutState(TestScenes.SceneA) + state.transitionState = transition(from = TestScenes.SceneA, to = TestScenes.SceneA) + + assertThat(state.isTransitioning()).isFalse() + assertThat(state.isTransitioning(from = TestScenes.SceneA)).isFalse() + assertThat(state.isTransitioning(to = TestScenes.SceneB)).isFalse() + assertThat(state.isTransitioning(from = TestScenes.SceneA, to = TestScenes.SceneB)) + .isFalse() + } + + @Test + fun isTransitioningTo_transition() { + val state = SceneTransitionLayoutState(TestScenes.SceneA) + state.transitionState = transition(from = TestScenes.SceneA, to = TestScenes.SceneB) + + assertThat(state.isTransitioning()).isTrue() + assertThat(state.isTransitioning(from = TestScenes.SceneA)).isTrue() + assertThat(state.isTransitioning(from = TestScenes.SceneB)).isFalse() + assertThat(state.isTransitioning(to = TestScenes.SceneB)).isTrue() + assertThat(state.isTransitioning(to = TestScenes.SceneA)).isFalse() + assertThat(state.isTransitioning(from = TestScenes.SceneA, to = TestScenes.SceneB)).isTrue() + } + + private fun transition(from: SceneKey, to: SceneKey): TransitionState.Transition { + return object : TransitionState.Transition { + override val currentScene: SceneKey = from + override val fromScene: SceneKey = from + override val toScene: SceneKey = to + override val progress: Float = 0f + override val isInitiatedByUserInput: Boolean = false + override val isUserInputOngoing: Boolean = false + } + } +} diff --git a/packages/SystemUI/compose/scene/tests/utils/src/com/android/compose/animation/scene/TestValues.kt b/packages/SystemUI/compose/scene/tests/utils/src/com/android/compose/animation/scene/TestValues.kt index b4c393e9bfbe..b83705aa64fc 100644 --- a/packages/SystemUI/compose/scene/tests/utils/src/com/android/compose/animation/scene/TestValues.kt +++ b/packages/SystemUI/compose/scene/tests/utils/src/com/android/compose/animation/scene/TestValues.kt @@ -26,6 +26,7 @@ object TestScenes { val SceneA = SceneKey("SceneA") val SceneB = SceneKey("SceneB") val SceneC = SceneKey("SceneC") + val SceneD = SceneKey("SceneD") } /** Element keys that can be reused by tests. */ diff --git a/packages/SystemUI/flag_check.py b/packages/SystemUI/flag_check.py index 5db27d8a9529..bac3553e7498 100755 --- a/packages/SystemUI/flag_check.py +++ b/packages/SystemUI/flag_check.py @@ -14,7 +14,7 @@ following case-sensitive regex: The Flag: stanza is regex matched and should describe whether your change is behind a flag or flags. As a CL author, you'll have a consistent place to describe the risk of the proposed change by explicitly calling out the name of the -flag in addition to its state (ENABLED|DISABLED|DEVELOPMENT|TEAMFOOD|TRUNKFOOD|NEXTFOOD). +flag in addition to its state (ENABLED|DISABLED|DEVELOPMENT|STAGING|TEAMFOOD|TRUNKFOOD|NEXTFOOD). Some examples below: @@ -74,11 +74,11 @@ def main(): #common_typos_disable flagName = '([a-zA-z0-9_.])+' - #[state:ENABLED|DISABLED|DEVELOPMENT|TEAM*(TEAMFOOD)|TRUNK*(TRUNK_STAGING, TRUNK_FOOD)|NEXT*(NEXTFOOD)] - stateExpression = '\s*(ENABLED|DISABLED|DEVELOPMENT|TEAM[a-zA-z]*|TRUNK[a-zA-z]*|NEXT[a-zA-z]*)' + #[state:ENABLED|DISABLED|DEVELOPMENT|TEAM*(TEAMFOOD)|STAGING|TRUNK*(TRUNK_STAGING, TRUNK_FOOD)|NEXT*(NEXTFOOD)] + stateExpression = '\s*(ENABLED|DISABLED|DEVELOPMENT|TEAM[a-zA-z]*|STAGING|TRUNK[a-zA-z]*|NEXT[a-zA-z]*)' #common_typos_enable - readableRegexMsg = '\n\tFlag: (NONE|NA)\n\tFlag: LEGACY|ACONFIG FlagName|packageName.flagName ENABLED|DISABLED|DEVELOPMENT|TEAMFOOD|TRUNKFOOD|NEXTFOOD' + readableRegexMsg = '\n\tFlag: (NONE|NA)\n\tFlag: LEGACY|ACONFIG FlagName|packageName.flagName ENABLED|DISABLED|DEVELOPMENT|TEAMFOOD|STAGING|TRUNKFOOD|NEXTFOOD' flagRegex = fr'^{field}: .*$' check_flag = re.compile(flagRegex) #Flag: diff --git a/packages/SystemUI/res-keyguard/layout/alternate_bouncer.xml b/packages/SystemUI/res-keyguard/layout/alternate_bouncer.xml index 218735229a5d..7b9027004eea 100644 --- a/packages/SystemUI/res-keyguard/layout/alternate_bouncer.xml +++ b/packages/SystemUI/res-keyguard/layout/alternate_bouncer.xml @@ -22,7 +22,8 @@ android:focusable="true" android:clickable="true" android:layout_width="match_parent" - android:layout_height="match_parent"> + android:layout_height="match_parent" + android:visibility="invisible"> <com.android.systemui.scrim.ScrimView android:id="@+id/alternate_bouncer_scrim" diff --git a/packages/SystemUI/res/drawable/shortcut_button_colored.xml b/packages/SystemUI/res/drawable/shortcut_button_colored.xml index a21489cc47aa..bf908532ac17 100644 --- a/packages/SystemUI/res/drawable/shortcut_button_colored.xml +++ b/packages/SystemUI/res/drawable/shortcut_button_colored.xml @@ -22,8 +22,8 @@ <item> <shape android:shape="rectangle"> <corners android:radius="16dp"/> - <solid android:color="?androidprv:attr/colorSurface"/> + <solid android:color="?androidprv:attr/materialColorSurfaceBright"/> </shape> </item> </ripple> -</inset>
\ No newline at end of file +</inset> diff --git a/packages/SystemUI/res/drawable/shortcut_button_focus_colored.xml b/packages/SystemUI/res/drawable/shortcut_button_focus_colored.xml index 2ff32b6ee9b5..f692ed975319 100644 --- a/packages/SystemUI/res/drawable/shortcut_button_focus_colored.xml +++ b/packages/SystemUI/res/drawable/shortcut_button_focus_colored.xml @@ -22,8 +22,8 @@ <item> <shape android:shape="rectangle"> <corners android:radius="16dp"/> - <solid android:color="?androidprv:attr/colorAccentPrimary"/> + <solid android:color="?androidprv:attr/materialColorPrimary"/> </shape> </item> </ripple> -</inset>
\ No newline at end of file +</inset> diff --git a/packages/SystemUI/res/drawable/shortcut_search_cancel_button.xml b/packages/SystemUI/res/drawable/shortcut_search_cancel_button.xml new file mode 100644 index 000000000000..6c4d4fbcc1fe --- /dev/null +++ b/packages/SystemUI/res/drawable/shortcut_search_cancel_button.xml @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- 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. +--> +<inset xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"> +<ripple android:color="?android:attr/colorControlHighlight" android:radius="24dp"> + <item> + <shape android:shape="oval"> + <size android:width="24dp" + android:height="24dp" /> + <solid android:color="?androidprv:attr/colorSurface"/> + </shape> + </item> +</ripple> +</inset> diff --git a/packages/SystemUI/res/layout/edit_widgets.xml b/packages/SystemUI/res/layout/edit_widgets.xml new file mode 100644 index 000000000000..182e651aa66d --- /dev/null +++ b/packages/SystemUI/res/layout/edit_widgets.xml @@ -0,0 +1,32 @@ +<!-- + ~ 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. + --> + +<FrameLayout + xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/edit_widgets" + android:layout_width="match_parent" + android:layout_height="match_parent"> + + <Button + style="@android:Widget.DeviceDefault.Button.Colored" + android:id="@+id/add_widget" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center" + android:textSize="28sp" + android:text="@string/hub_mode_add_widget_button_text"/> + +</FrameLayout> diff --git a/packages/SystemUI/res/layout/keyboard_shortcuts_search_view.xml b/packages/SystemUI/res/layout/keyboard_shortcuts_search_view.xml index 13425c9259de..dbcd2636134f 100644 --- a/packages/SystemUI/res/layout/keyboard_shortcuts_search_view.xml +++ b/packages/SystemUI/res/layout/keyboard_shortcuts_search_view.xml @@ -53,7 +53,7 @@ android:hint="@string/keyboard_shortcut_search_list_hint" android:textColorHint="?android:attr/textColorTertiary" /> - <ImageView + <ImageButton android:id="@+id/keyboard_shortcuts_search_cancel" android:layout_gravity="center_vertical|end" android:layout_width="wrap_content" @@ -61,7 +61,10 @@ android:layout_marginEnd="49dp" android:padding="16dp" android:contentDescription="@string/keyboard_shortcut_clear_text" - android:src="@drawable/ic_shortcutlist_search_button_cancel" /> + android:src="@drawable/ic_shortcutlist_search_button_cancel" + android:background="@drawable/shortcut_search_cancel_button" + style="@android:style/Widget.Material.Button.Borderless.Small" + android:pointerIcon="arrow" /> </FrameLayout> <HorizontalScrollView @@ -82,15 +85,13 @@ android:id="@+id/shortcut_system" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginStart="12dp" style="@style/ShortCutButton" - android:text="@string/keyboard_shortcut_search_category_system"/> + android:text="@string/keyboard_shortcut_search_category_system" /> <Button android:id="@+id/shortcut_input" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginStart="12dp" style="@style/ShortCutButton" android:text="@string/keyboard_shortcut_search_category_input"/> @@ -98,7 +99,6 @@ android:id="@+id/shortcut_open_apps" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginStart="12dp" style="@style/ShortCutButton" android:text="@string/keyboard_shortcut_search_category_open_apps"/> @@ -106,7 +106,6 @@ android:id="@+id/shortcut_specific_app" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginStart="12dp" style="@style/ShortCutButton" android:text="@string/keyboard_shortcut_search_category_current_app"/> </LinearLayout> diff --git a/packages/SystemUI/res/layout/super_notification_shade.xml b/packages/SystemUI/res/layout/super_notification_shade.xml index 7e03bd9d4325..ca0fb85beb6e 100644 --- a/packages/SystemUI/res/layout/super_notification_shade.xml +++ b/packages/SystemUI/res/layout/super_notification_shade.xml @@ -30,7 +30,6 @@ android:id="@+id/scrim_behind" android:layout_width="match_parent" android:layout_height="match_parent" - android:importantForAccessibility="no" sysui:ignoreRightInset="true" /> @@ -38,7 +37,6 @@ android:id="@+id/scrim_notifications" android:layout_width="match_parent" android:layout_height="match_parent" - android:importantForAccessibility="no" sysui:ignoreRightInset="true" /> @@ -78,7 +76,6 @@ android:id="@+id/scrim_in_front" android:layout_width="match_parent" android:layout_height="match_parent" - android:importantForAccessibility="no" sysui:ignoreRightInset="true" /> @@ -119,11 +116,6 @@ android:inflatedId="@+id/multi_shade" android:layout="@layout/multi_shade" /> - <include layout="@layout/alternate_bouncer" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:visibility="invisible" /> - <com.android.systemui.biometrics.AuthRippleView android:id="@+id/auth_ripple" android:layout_width="match_parent" diff --git a/packages/SystemUI/res/layout/widget_picker.xml b/packages/SystemUI/res/layout/widget_picker.xml new file mode 100644 index 000000000000..827bd5d2e0b1 --- /dev/null +++ b/packages/SystemUI/res/layout/widget_picker.xml @@ -0,0 +1,26 @@ +<!-- + ~ 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. + --> + +<LinearLayout + xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/widgets_container" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:padding="64dp" + android:gravity="center_vertical" + android:orientation="horizontal"> + +</LinearLayout> diff --git a/packages/SystemUI/res/values-af/strings.xml b/packages/SystemUI/res/values-af/strings.xml index 33b241b161b6..b0c4fa56a73a 100644 --- a/packages/SystemUI/res/values-af/strings.xml +++ b/packages/SystemUI/res/values-af/strings.xml @@ -197,6 +197,10 @@ <string name="accessibility_bluetooth_connected" msgid="4745196874551115205">"Bluetooth gekoppel."</string> <string name="accessibility_bluetooth_device_icon" msgid="9163840051642587982">"Bluetooth-toestelikoon"</string> <string name="accessibility_bluetooth_device_settings_gear" msgid="3314916468105272540">"Klik om toestelbesonderhede op te stel."</string> + <!-- no translation found for accessibility_bluetooth_device_settings_see_all (9111952496905423543) --> + <skip /> + <!-- no translation found for accessibility_bluetooth_device_settings_pair_new_device (2435184865793496966) --> + <skip /> <string name="accessibility_battery_unknown" msgid="1807789554617976440">"Batterypersentasie is onbekend."</string> <string name="accessibility_bluetooth_name" msgid="7300973230214067678">"Gekoppel aan <xliff:g id="BLUETOOTH">%s</xliff:g>."</string> <string name="accessibility_cast_name" msgid="7344437925388773685">"Gekoppel aan <xliff:g id="CAST">%s</xliff:g>."</string> @@ -255,6 +259,10 @@ <string name="turn_on_bluetooth" msgid="5681370462180289071">"Gebruik Bluetooth"</string> <string name="quick_settings_bluetooth_device_connected" msgid="7884777006729260996">"Gekoppel"</string> <string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Gestoor"</string> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_disconnect (415980329093277342) --> + <skip /> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_activate (3724301751036877403) --> + <skip /> <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="4182034939479344093">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g> batterykrag"</string> <string name="quick_settings_bluetooth_secondary_label_audio" msgid="780333390310051161">"Oudio"</string> <string name="quick_settings_bluetooth_secondary_label_headset" msgid="2332093067553000852">"Kopstuk"</string> diff --git a/packages/SystemUI/res/values-am/strings.xml b/packages/SystemUI/res/values-am/strings.xml index be58b528a8af..b17455241d57 100644 --- a/packages/SystemUI/res/values-am/strings.xml +++ b/packages/SystemUI/res/values-am/strings.xml @@ -197,6 +197,10 @@ <string name="accessibility_bluetooth_connected" msgid="4745196874551115205">"ብሉቱዝ ተያይዟል።"</string> <string name="accessibility_bluetooth_device_icon" msgid="9163840051642587982">"የብሉቱዝ መሣሪያ አዶ"</string> <string name="accessibility_bluetooth_device_settings_gear" msgid="3314916468105272540">"የመሣሪያ ዝርዝርን ለማዋቀር ጠቅ ያድርጉ"</string> + <!-- no translation found for accessibility_bluetooth_device_settings_see_all (9111952496905423543) --> + <skip /> + <!-- no translation found for accessibility_bluetooth_device_settings_pair_new_device (2435184865793496966) --> + <skip /> <string name="accessibility_battery_unknown" msgid="1807789554617976440">"የባትሪ መቶኛ አይታወቅም።"</string> <string name="accessibility_bluetooth_name" msgid="7300973230214067678">"ከ<xliff:g id="BLUETOOTH">%s</xliff:g> ጋር ተገናኝቷል።"</string> <string name="accessibility_cast_name" msgid="7344437925388773685">"ከ<xliff:g id="CAST">%s</xliff:g> ጋር ተገናኝቷል።"</string> @@ -255,6 +259,10 @@ <string name="turn_on_bluetooth" msgid="5681370462180289071">"ብሉቱዝን ይጠቀሙ"</string> <string name="quick_settings_bluetooth_device_connected" msgid="7884777006729260996">"ተገናኝቷል"</string> <string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"ተቀምጧል"</string> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_disconnect (415980329093277342) --> + <skip /> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_activate (3724301751036877403) --> + <skip /> <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="4182034939479344093">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g> ባትሪ"</string> <string name="quick_settings_bluetooth_secondary_label_audio" msgid="780333390310051161">"ኦዲዮ"</string> <string name="quick_settings_bluetooth_secondary_label_headset" msgid="2332093067553000852">"ማዳመጫ"</string> @@ -397,10 +405,8 @@ <string name="keyguard_indication_charging_time_slowly" msgid="301936949731705417">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • በዝግታ ኃይልን በመሙላት ላይ • በ<xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g> ውስጥ ይሞላል"</string> <string name="keyguard_indication_charging_time_dock" msgid="3149328898931741271">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • ኃይል በመሙላት ላይ • በ<xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g> ውስጥ ይሞላል"</string> <string name="communal_tutorial_indicator_text" msgid="4503010353591430123">"የጋራ አጋዥ ሥልጠናውን ለመጀመር ወደ ግራ ያንሸራትቱ።"</string> - <!-- no translation found for button_to_open_widget_picker (8007261659745030810) --> - <skip /> - <!-- no translation found for button_to_remove_widget (1511255853677835341) --> - <skip /> + <string name="button_to_open_widget_picker" msgid="8007261659745030810">"ምግብር መራጩን ክፈት"</string> + <string name="button_to_remove_widget" msgid="1511255853677835341">"ምግብርን አስወግድ"</string> <string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"ተጠቃሚ ቀይር"</string> <string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"ወደታች ተጎታች ምናሌ"</string> <string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"በዚህ ክፍለ-ጊዜ ውስጥ ያሉ ሁሉም መተግበሪያዎች እና ውሂብ ይሰረዛሉ።"</string> @@ -1209,8 +1215,6 @@ <string name="privacy_dialog_recent_app_usage_1" msgid="2551340497722370109">"በቅርብ ጊዜ በ<xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g>) ጥቅም ላይ ውሏል"</string> <string name="privacy_dialog_active_app_usage_2" msgid="2770926061339921767">"በ<xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>) ጥቅም ላይ እየዋለ ነው"</string> <string name="privacy_dialog_recent_app_usage_2" msgid="2874689735085367167">"በቅርብ ጊዜ በ<xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>) ጥቅም ላይ ውሏል"</string> - <!-- no translation found for keyboard_backlight_dialog_title (8273102932345564724) --> - <skip /> - <!-- no translation found for keyboard_backlight_value (7336398765584393538) --> - <skip /> + <string name="keyboard_backlight_dialog_title" msgid="8273102932345564724">"የቁልፍ ሰሌዳ የጀርባ ብርሃን"</string> + <string name="keyboard_backlight_value" msgid="7336398765584393538">"ደረጃ %1$d ከ %2$d"</string> </resources> diff --git a/packages/SystemUI/res/values-ar/strings.xml b/packages/SystemUI/res/values-ar/strings.xml index 2dbd3e95604e..0b53b41ffa7d 100644 --- a/packages/SystemUI/res/values-ar/strings.xml +++ b/packages/SystemUI/res/values-ar/strings.xml @@ -197,6 +197,10 @@ <string name="accessibility_bluetooth_connected" msgid="4745196874551115205">"تم توصيل البلوتوث."</string> <string name="accessibility_bluetooth_device_icon" msgid="9163840051642587982">"رمز الجهاز الذي يتضمّن بلوتوث"</string> <string name="accessibility_bluetooth_device_settings_gear" msgid="3314916468105272540">"انقر هنا لضبط إعدادات الجهاز."</string> + <!-- no translation found for accessibility_bluetooth_device_settings_see_all (9111952496905423543) --> + <skip /> + <!-- no translation found for accessibility_bluetooth_device_settings_pair_new_device (2435184865793496966) --> + <skip /> <string name="accessibility_battery_unknown" msgid="1807789554617976440">"نسبة شحن البطارية غير معروفة."</string> <string name="accessibility_bluetooth_name" msgid="7300973230214067678">"متصل بـ <xliff:g id="BLUETOOTH">%s</xliff:g>."</string> <string name="accessibility_cast_name" msgid="7344437925388773685">"تم الاتصال بـ <xliff:g id="CAST">%s</xliff:g>."</string> @@ -255,6 +259,10 @@ <string name="turn_on_bluetooth" msgid="5681370462180289071">"استخدام البلوتوث"</string> <string name="quick_settings_bluetooth_device_connected" msgid="7884777006729260996">"متّصل"</string> <string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"محفوظ"</string> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_disconnect (415980329093277342) --> + <skip /> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_activate (3724301751036877403) --> + <skip /> <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="4182034939479344093">"مستوى طاقة البطارية <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g>"</string> <string name="quick_settings_bluetooth_secondary_label_audio" msgid="780333390310051161">"صوت"</string> <string name="quick_settings_bluetooth_secondary_label_headset" msgid="2332093067553000852">"سماعة الرأس"</string> @@ -396,8 +404,7 @@ <string name="keyguard_indication_charging_time_fast" msgid="8390311020603859480">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • جارٍ الشحن سريعًا • ستمتلئ البطارية خلال <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> <string name="keyguard_indication_charging_time_slowly" msgid="301936949731705417">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • جارٍ الشحن ببطء • ستمتلئ البطارية خلال <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> <string name="keyguard_indication_charging_time_dock" msgid="3149328898931741271">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • جارٍ الشحن • ستمتلئ البطارية خلال <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> - <!-- no translation found for communal_tutorial_indicator_text (4503010353591430123) --> - <skip /> + <string name="communal_tutorial_indicator_text" msgid="4503010353591430123">"مرِّر سريعًا لليمين لبدء الدليل التوجيهي العام."</string> <!-- no translation found for button_to_open_widget_picker (8007261659745030810) --> <skip /> <!-- no translation found for button_to_remove_widget (1511255853677835341) --> diff --git a/packages/SystemUI/res/values-as/strings.xml b/packages/SystemUI/res/values-as/strings.xml index 9bad7b90dcc3..e593a5bb731b 100644 --- a/packages/SystemUI/res/values-as/strings.xml +++ b/packages/SystemUI/res/values-as/strings.xml @@ -197,6 +197,10 @@ <string name="accessibility_bluetooth_connected" msgid="4745196874551115205">"ব্লুটুথ সংযোগ হ’ল।"</string> <string name="accessibility_bluetooth_device_icon" msgid="9163840051642587982">"ব্লুটুথ ডিভাইচৰ চিহ্ন"</string> <string name="accessibility_bluetooth_device_settings_gear" msgid="3314916468105272540">"ডিভাইচৰ সবিশেষ কনফিগাৰ কৰিবলৈ ক্লিক কৰক"</string> + <!-- no translation found for accessibility_bluetooth_device_settings_see_all (9111952496905423543) --> + <skip /> + <!-- no translation found for accessibility_bluetooth_device_settings_pair_new_device (2435184865793496966) --> + <skip /> <string name="accessibility_battery_unknown" msgid="1807789554617976440">"বেটাৰীৰ চাৰ্জৰ শতাংশ অজ্ঞাত।"</string> <string name="accessibility_bluetooth_name" msgid="7300973230214067678">"<xliff:g id="BLUETOOTH">%s</xliff:g>ৰ লগত সংযোগ কৰা হ’ল।"</string> <string name="accessibility_cast_name" msgid="7344437925388773685">"<xliff:g id="CAST">%s</xliff:g>ত সংযোগ হ’ল।"</string> @@ -255,6 +259,10 @@ <string name="turn_on_bluetooth" msgid="5681370462180289071">"ব্লুটুথ ব্যৱহাৰ কৰক"</string> <string name="quick_settings_bluetooth_device_connected" msgid="7884777006729260996">"সংযুক্ত আছে"</string> <string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"ছেভ কৰা হৈছে"</string> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_disconnect (415980329093277342) --> + <skip /> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_activate (3724301751036877403) --> + <skip /> <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="4182034939479344093">"বেটাৰী <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g>"</string> <string name="quick_settings_bluetooth_secondary_label_audio" msgid="780333390310051161">"অডিঅ’"</string> <string name="quick_settings_bluetooth_secondary_label_headset" msgid="2332093067553000852">"হেডছেট"</string> @@ -397,10 +405,8 @@ <string name="keyguard_indication_charging_time_slowly" msgid="301936949731705417">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • লাহে লাহে চাৰ্জ হৈ আছে • <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>ত সম্পূৰ্ণ হ’ব"</string> <string name="keyguard_indication_charging_time_dock" msgid="3149328898931741271">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • চাৰ্জ হৈ আছে • <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>ত সম্পূৰ্ণ হ’ব"</string> <string name="communal_tutorial_indicator_text" msgid="4503010353591430123">"সম্প্ৰদায় সম্পৰ্কীয় নিৰ্দেশনা আৰম্ভ কৰিবলৈ বাওঁফালে ছোৱাইপ কৰক"</string> - <!-- no translation found for button_to_open_widget_picker (8007261659745030810) --> - <skip /> - <!-- no translation found for button_to_remove_widget (1511255853677835341) --> - <skip /> + <string name="button_to_open_widget_picker" msgid="8007261659745030810">"ৱিজেট বাছনিকৰ্তাটো খোলক"</string> + <string name="button_to_remove_widget" msgid="1511255853677835341">"এটা ৱিজেট আঁতৰাওক"</string> <string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"ব্যৱহাৰকাৰী সলনি কৰক"</string> <string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"পুল-ডাউনৰ মেনু"</string> <string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"এই ছেশ্বনৰ আটাইবোৰ এপ্ আৰু ডেটা মচা হ\'ব।"</string> @@ -1209,8 +1215,6 @@ <string name="privacy_dialog_recent_app_usage_1" msgid="2551340497722370109">"শেহতীয়াকৈ <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g>)এ ব্যৱহাৰ কৰিছে"</string> <string name="privacy_dialog_active_app_usage_2" msgid="2770926061339921767">"<xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>)এ ব্যৱহাৰ কৰি আছে"</string> <string name="privacy_dialog_recent_app_usage_2" msgid="2874689735085367167">"শেহতীয়াকৈ <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>)এ ব্যৱহাৰ কৰিছে"</string> - <!-- no translation found for keyboard_backlight_dialog_title (8273102932345564724) --> - <skip /> - <!-- no translation found for keyboard_backlight_value (7336398765584393538) --> - <skip /> + <string name="keyboard_backlight_dialog_title" msgid="8273102932345564724">"কীব’ৰ্ডৰ বেকলাইট"</string> + <string name="keyboard_backlight_value" msgid="7336398765584393538">"%2$dৰ %1$d স্তৰ"</string> </resources> diff --git a/packages/SystemUI/res/values-az/strings.xml b/packages/SystemUI/res/values-az/strings.xml index dfba8c2fbe79..4a2a595c8893 100644 --- a/packages/SystemUI/res/values-az/strings.xml +++ b/packages/SystemUI/res/values-az/strings.xml @@ -197,6 +197,10 @@ <string name="accessibility_bluetooth_connected" msgid="4745196874551115205">"Bluetooth qoşulub."</string> <string name="accessibility_bluetooth_device_icon" msgid="9163840051642587982">"Bluetooth cihazı ikonası"</string> <string name="accessibility_bluetooth_device_settings_gear" msgid="3314916468105272540">"Cihaz təfərrüatlarını konfiqurasiya etmək üçün klikləyin"</string> + <!-- no translation found for accessibility_bluetooth_device_settings_see_all (9111952496905423543) --> + <skip /> + <!-- no translation found for accessibility_bluetooth_device_settings_pair_new_device (2435184865793496966) --> + <skip /> <string name="accessibility_battery_unknown" msgid="1807789554617976440">"Batareyanın faizi naməlumdur."</string> <string name="accessibility_bluetooth_name" msgid="7300973230214067678">"<xliff:g id="BLUETOOTH">%s</xliff:g> üzərindən qoşuldu."</string> <string name="accessibility_cast_name" msgid="7344437925388773685">"<xliff:g id="CAST">%s</xliff:g> cihazına qoşulub."</string> @@ -255,6 +259,10 @@ <string name="turn_on_bluetooth" msgid="5681370462180289071">"Bluetooth aç"</string> <string name="quick_settings_bluetooth_device_connected" msgid="7884777006729260996">"Qoşulub"</string> <string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Yadda saxlandı"</string> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_disconnect (415980329093277342) --> + <skip /> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_activate (3724301751036877403) --> + <skip /> <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="4182034939479344093">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g> batareya"</string> <string name="quick_settings_bluetooth_secondary_label_audio" msgid="780333390310051161">"Audio"</string> <string name="quick_settings_bluetooth_secondary_label_headset" msgid="2332093067553000852">"Qulaqlıq"</string> @@ -396,8 +404,7 @@ <string name="keyguard_indication_charging_time_fast" msgid="8390311020603859480">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Sürətlə şarj edilir • <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g> sonra dolacaq"</string> <string name="keyguard_indication_charging_time_slowly" msgid="301936949731705417">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Asta şarj edilir • <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g> sonra dolacaq"</string> <string name="keyguard_indication_charging_time_dock" msgid="3149328898931741271">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Şarj edilir • <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g> sonra dolacaq"</string> - <!-- no translation found for communal_tutorial_indicator_text (4503010353591430123) --> - <skip /> + <string name="communal_tutorial_indicator_text" msgid="4503010353591430123">"İcma təlimatını başlatmaq üçün sola sürüşdürün"</string> <!-- no translation found for button_to_open_widget_picker (8007261659745030810) --> <skip /> <!-- no translation found for button_to_remove_widget (1511255853677835341) --> diff --git a/packages/SystemUI/res/values-b+sr+Latn/strings.xml b/packages/SystemUI/res/values-b+sr+Latn/strings.xml index 4060a8d0db14..c7f2eafb9a4f 100644 --- a/packages/SystemUI/res/values-b+sr+Latn/strings.xml +++ b/packages/SystemUI/res/values-b+sr+Latn/strings.xml @@ -197,6 +197,10 @@ <string name="accessibility_bluetooth_connected" msgid="4745196874551115205">"Bluetooth je priključen."</string> <string name="accessibility_bluetooth_device_icon" msgid="9163840051642587982">"Ikona Bluetooth uređaja"</string> <string name="accessibility_bluetooth_device_settings_gear" msgid="3314916468105272540">"Kliknite da biste konfigurisali detalje o uređaju"</string> + <!-- no translation found for accessibility_bluetooth_device_settings_see_all (9111952496905423543) --> + <skip /> + <!-- no translation found for accessibility_bluetooth_device_settings_pair_new_device (2435184865793496966) --> + <skip /> <string name="accessibility_battery_unknown" msgid="1807789554617976440">"Procenat napunjenosti baterije nije poznat."</string> <string name="accessibility_bluetooth_name" msgid="7300973230214067678">"Povezani ste sa <xliff:g id="BLUETOOTH">%s</xliff:g>."</string> <string name="accessibility_cast_name" msgid="7344437925388773685">"Povezani smo sa uređajem <xliff:g id="CAST">%s</xliff:g>."</string> @@ -255,6 +259,10 @@ <string name="turn_on_bluetooth" msgid="5681370462180289071">"Koristi Bluetooth"</string> <string name="quick_settings_bluetooth_device_connected" msgid="7884777006729260996">"Povezano"</string> <string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Sačuvano"</string> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_disconnect (415980329093277342) --> + <skip /> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_activate (3724301751036877403) --> + <skip /> <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="4182034939479344093">"Nivo baterije je <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g>"</string> <string name="quick_settings_bluetooth_secondary_label_audio" msgid="780333390310051161">"Audio"</string> <string name="quick_settings_bluetooth_secondary_label_headset" msgid="2332093067553000852">"Slušalice"</string> @@ -396,12 +404,9 @@ <string name="keyguard_indication_charging_time_fast" msgid="8390311020603859480">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Brzo se puni • <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g> do kraja punjenja"</string> <string name="keyguard_indication_charging_time_slowly" msgid="301936949731705417">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Sporo se puni • <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g> do kraja punjenja"</string> <string name="keyguard_indication_charging_time_dock" msgid="3149328898931741271">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Puni se • <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g> do kraja punjenja"</string> - <!-- no translation found for communal_tutorial_indicator_text (4503010353591430123) --> - <skip /> - <!-- no translation found for button_to_open_widget_picker (8007261659745030810) --> - <skip /> - <!-- no translation found for button_to_remove_widget (1511255853677835341) --> - <skip /> + <string name="communal_tutorial_indicator_text" msgid="4503010353591430123">"Prevucite ulevo da biste započeli zajednički vodič"</string> + <string name="button_to_open_widget_picker" msgid="8007261659745030810">"Otvori birač vidžeta"</string> + <string name="button_to_remove_widget" msgid="1511255853677835341">"Ukloni vidžet"</string> <string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"Zameni korisnika"</string> <string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"padajući meni"</string> <string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"Sve aplikacije i podaci u ovoj sesiji će biti izbrisani."</string> @@ -1210,8 +1215,6 @@ <string name="privacy_dialog_recent_app_usage_1" msgid="2551340497722370109">"Nedavno koristila aplikacija <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g>)"</string> <string name="privacy_dialog_active_app_usage_2" msgid="2770926061339921767">"Koriste <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>)"</string> <string name="privacy_dialog_recent_app_usage_2" msgid="2874689735085367167">"Nedavno koristila aplikacija <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>)"</string> - <!-- no translation found for keyboard_backlight_dialog_title (8273102932345564724) --> - <skip /> - <!-- no translation found for keyboard_backlight_value (7336398765584393538) --> - <skip /> + <string name="keyboard_backlight_dialog_title" msgid="8273102932345564724">"Pozadinsko osvetljenje tastature"</string> + <string name="keyboard_backlight_value" msgid="7336398765584393538">"%1$d. nivo od %2$d"</string> </resources> diff --git a/packages/SystemUI/res/values-be/strings.xml b/packages/SystemUI/res/values-be/strings.xml index f5490010e653..41d674416f86 100644 --- a/packages/SystemUI/res/values-be/strings.xml +++ b/packages/SystemUI/res/values-be/strings.xml @@ -197,6 +197,10 @@ <string name="accessibility_bluetooth_connected" msgid="4745196874551115205">"Bluetooth-сувязь."</string> <string name="accessibility_bluetooth_device_icon" msgid="9163840051642587982">"Значок прылады з Bluetooth"</string> <string name="accessibility_bluetooth_device_settings_gear" msgid="3314916468105272540">"Націсніце, каб задаць падрабязныя налады прылады"</string> + <!-- no translation found for accessibility_bluetooth_device_settings_see_all (9111952496905423543) --> + <skip /> + <!-- no translation found for accessibility_bluetooth_device_settings_pair_new_device (2435184865793496966) --> + <skip /> <string name="accessibility_battery_unknown" msgid="1807789554617976440">"Працэнт зараду акумулятара невядомы."</string> <string name="accessibility_bluetooth_name" msgid="7300973230214067678">"Падлучаны да <xliff:g id="BLUETOOTH">%s</xliff:g>."</string> <string name="accessibility_cast_name" msgid="7344437925388773685">"Ёсць падключэнне да <xliff:g id="CAST">%s</xliff:g>."</string> @@ -255,6 +259,10 @@ <string name="turn_on_bluetooth" msgid="5681370462180289071">"Выкарыстоўваць Bluetooth"</string> <string name="quick_settings_bluetooth_device_connected" msgid="7884777006729260996">"Падключана"</string> <string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Захавана"</string> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_disconnect (415980329093277342) --> + <skip /> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_activate (3724301751036877403) --> + <skip /> <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="4182034939479344093">"Узровень зараду: <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g>"</string> <string name="quick_settings_bluetooth_secondary_label_audio" msgid="780333390310051161">"Гук"</string> <string name="quick_settings_bluetooth_secondary_label_headset" msgid="2332093067553000852">"Гарнітура"</string> @@ -396,8 +404,7 @@ <string name="keyguard_indication_charging_time_fast" msgid="8390311020603859480">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Ідзе хуткая зарадка • Поўны зарад праз <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> <string name="keyguard_indication_charging_time_slowly" msgid="301936949731705417">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Ідзе павольная зарадка • Поўны зарад праз <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> <string name="keyguard_indication_charging_time_dock" msgid="3149328898931741271">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Ідзе зарадка • Поўны зарад праз <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> - <!-- no translation found for communal_tutorial_indicator_text (4503010353591430123) --> - <skip /> + <string name="communal_tutorial_indicator_text" msgid="4503010353591430123">"Правядзіце пальцам па экране ўлева, каб азнаёміцца з дапаможнікам"</string> <!-- no translation found for button_to_open_widget_picker (8007261659745030810) --> <skip /> <!-- no translation found for button_to_remove_widget (1511255853677835341) --> diff --git a/packages/SystemUI/res/values-bg/strings.xml b/packages/SystemUI/res/values-bg/strings.xml index ceb98a04a083..8f64831df295 100644 --- a/packages/SystemUI/res/values-bg/strings.xml +++ b/packages/SystemUI/res/values-bg/strings.xml @@ -197,6 +197,10 @@ <string name="accessibility_bluetooth_connected" msgid="4745196874551115205">"Bluetooth е включен."</string> <string name="accessibility_bluetooth_device_icon" msgid="9163840051642587982">"Икона за устройство с Bluetooth"</string> <string name="accessibility_bluetooth_device_settings_gear" msgid="3314916468105272540">"Кликнете, за да конфигурирате подробностите за устройството"</string> + <!-- no translation found for accessibility_bluetooth_device_settings_see_all (9111952496905423543) --> + <skip /> + <!-- no translation found for accessibility_bluetooth_device_settings_pair_new_device (2435184865793496966) --> + <skip /> <string name="accessibility_battery_unknown" msgid="1807789554617976440">"Процентът на батерията е неизвестен."</string> <string name="accessibility_bluetooth_name" msgid="7300973230214067678">"Има връзка с <xliff:g id="BLUETOOTH">%s</xliff:g>."</string> <string name="accessibility_cast_name" msgid="7344437925388773685">"Установена е връзка с/ъс <xliff:g id="CAST">%s</xliff:g>."</string> @@ -255,6 +259,10 @@ <string name="turn_on_bluetooth" msgid="5681370462180289071">"Използване на Bluetooth"</string> <string name="quick_settings_bluetooth_device_connected" msgid="7884777006729260996">"Установена е връзка"</string> <string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Запазено"</string> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_disconnect (415980329093277342) --> + <skip /> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_activate (3724301751036877403) --> + <skip /> <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="4182034939479344093">"Батерия: <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g>"</string> <string name="quick_settings_bluetooth_secondary_label_audio" msgid="780333390310051161">"Аудио"</string> <string name="quick_settings_bluetooth_secondary_label_headset" msgid="2332093067553000852">"Слушалки"</string> @@ -396,8 +404,7 @@ <string name="keyguard_indication_charging_time_fast" msgid="8390311020603859480">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Зарежда се бързо • <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g> до пълно зареждане"</string> <string name="keyguard_indication_charging_time_slowly" msgid="301936949731705417">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Зарежда се бавно • <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g> до пълно зареждане"</string> <string name="keyguard_indication_charging_time_dock" msgid="3149328898931741271">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Зарежда се • <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g> до пълно зареждане"</string> - <!-- no translation found for communal_tutorial_indicator_text (4503010353591430123) --> - <skip /> + <string name="communal_tutorial_indicator_text" msgid="4503010353591430123">"Прекарайте пръст наляво, за да стартирате общия урок"</string> <!-- no translation found for button_to_open_widget_picker (8007261659745030810) --> <skip /> <!-- no translation found for button_to_remove_widget (1511255853677835341) --> diff --git a/packages/SystemUI/res/values-bn/strings.xml b/packages/SystemUI/res/values-bn/strings.xml index c1ccba5fdb0c..809a25d583bf 100644 --- a/packages/SystemUI/res/values-bn/strings.xml +++ b/packages/SystemUI/res/values-bn/strings.xml @@ -197,6 +197,10 @@ <string name="accessibility_bluetooth_connected" msgid="4745196874551115205">"ব্লুটুথ সংযুক্ত হয়েছে৷"</string> <string name="accessibility_bluetooth_device_icon" msgid="9163840051642587982">"ব্লুটুথ ডিভাইসের আইকন"</string> <string name="accessibility_bluetooth_device_settings_gear" msgid="3314916468105272540">"ডিভাইসের বিবরণ কনফিগার করতে ক্লিক করুন"</string> + <!-- no translation found for accessibility_bluetooth_device_settings_see_all (9111952496905423543) --> + <skip /> + <!-- no translation found for accessibility_bluetooth_device_settings_pair_new_device (2435184865793496966) --> + <skip /> <string name="accessibility_battery_unknown" msgid="1807789554617976440">"ব্যাটারি কত শতাংশ আছে তা জানা যায়নি।"</string> <string name="accessibility_bluetooth_name" msgid="7300973230214067678">"<xliff:g id="BLUETOOTH">%s</xliff:g>এ সংযুক্ত হয়ে আছে।"</string> <string name="accessibility_cast_name" msgid="7344437925388773685">"<xliff:g id="CAST">%s</xliff:g> এর সাথে সংযুক্ত৷"</string> @@ -255,6 +259,10 @@ <string name="turn_on_bluetooth" msgid="5681370462180289071">"ব্লুটুথ ব্যবহার করুন"</string> <string name="quick_settings_bluetooth_device_connected" msgid="7884777006729260996">"কানেক্ট করা আছে"</string> <string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"সেভ করা আছে"</string> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_disconnect (415980329093277342) --> + <skip /> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_activate (3724301751036877403) --> + <skip /> <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="4182034939479344093">"চার্জ <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g>"</string> <string name="quick_settings_bluetooth_secondary_label_audio" msgid="780333390310051161">"অডিও"</string> <string name="quick_settings_bluetooth_secondary_label_headset" msgid="2332093067553000852">"হেডসেট"</string> @@ -396,8 +404,7 @@ <string name="keyguard_indication_charging_time_fast" msgid="8390311020603859480">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • দ্রুত চার্জ হচ্ছে • পুরো চার্জ হতে <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g> লাগবে"</string> <string name="keyguard_indication_charging_time_slowly" msgid="301936949731705417">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • ধীরে চার্জ হচ্ছে • পুরো চার্জ হতে <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g> লাগবে"</string> <string name="keyguard_indication_charging_time_dock" msgid="3149328898931741271">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • চার্জ হচ্ছে • পুরো চার্জ হতে আরও <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g> সময় লাগবে"</string> - <!-- no translation found for communal_tutorial_indicator_text (4503010353591430123) --> - <skip /> + <string name="communal_tutorial_indicator_text" msgid="4503010353591430123">"কমিউনিটি টিউটোরিয়াল চালু করতে বাঁদিকে সোয়াইপ করুন"</string> <!-- no translation found for button_to_open_widget_picker (8007261659745030810) --> <skip /> <!-- no translation found for button_to_remove_widget (1511255853677835341) --> diff --git a/packages/SystemUI/res/values-bs/strings.xml b/packages/SystemUI/res/values-bs/strings.xml index 08656e5b9340..f97b05569e57 100644 --- a/packages/SystemUI/res/values-bs/strings.xml +++ b/packages/SystemUI/res/values-bs/strings.xml @@ -197,6 +197,10 @@ <string name="accessibility_bluetooth_connected" msgid="4745196874551115205">"Bluetooth je povezan."</string> <string name="accessibility_bluetooth_device_icon" msgid="9163840051642587982">"Ikona Bluetooth uređaja"</string> <string name="accessibility_bluetooth_device_settings_gear" msgid="3314916468105272540">"Kliknite da konfigurirate detalje uređaja"</string> + <!-- no translation found for accessibility_bluetooth_device_settings_see_all (9111952496905423543) --> + <skip /> + <!-- no translation found for accessibility_bluetooth_device_settings_pair_new_device (2435184865793496966) --> + <skip /> <string name="accessibility_battery_unknown" msgid="1807789554617976440">"Postotak napunjenosti baterije nije poznat"</string> <string name="accessibility_bluetooth_name" msgid="7300973230214067678">"Povezan na <xliff:g id="BLUETOOTH">%s</xliff:g>."</string> <string name="accessibility_cast_name" msgid="7344437925388773685">"Povezan na <xliff:g id="CAST">%s</xliff:g>."</string> @@ -255,6 +259,10 @@ <string name="turn_on_bluetooth" msgid="5681370462180289071">"Koristi Bluetooth"</string> <string name="quick_settings_bluetooth_device_connected" msgid="7884777006729260996">"Povezano"</string> <string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Sačuvano"</string> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_disconnect (415980329093277342) --> + <skip /> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_activate (3724301751036877403) --> + <skip /> <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="4182034939479344093">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g> baterije"</string> <string name="quick_settings_bluetooth_secondary_label_audio" msgid="780333390310051161">"Zvuk"</string> <string name="quick_settings_bluetooth_secondary_label_headset" msgid="2332093067553000852">"Slušalice"</string> @@ -396,12 +404,9 @@ <string name="keyguard_indication_charging_time_fast" msgid="8390311020603859480">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Brzo punjenje • Potpuna napunjenost za <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> <string name="keyguard_indication_charging_time_slowly" msgid="301936949731705417">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Sporo punjenje • Potpuna napunjenost za <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> <string name="keyguard_indication_charging_time_dock" msgid="3149328898931741271">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Punjenje • Potpuna napunjenost za <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> - <!-- no translation found for communal_tutorial_indicator_text (4503010353591430123) --> - <skip /> - <!-- no translation found for button_to_open_widget_picker (8007261659745030810) --> - <skip /> - <!-- no translation found for button_to_remove_widget (1511255853677835341) --> - <skip /> + <string name="communal_tutorial_indicator_text" msgid="4503010353591430123">"Prevucite ulijevo da pokrenete zajednički vodič"</string> + <string name="button_to_open_widget_picker" msgid="8007261659745030810">"Otvaranje birača vidžeta"</string> + <string name="button_to_remove_widget" msgid="1511255853677835341">"Uklanjanje vidžeta"</string> <string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"Zamijeni korisnika"</string> <string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"padajući meni"</string> <string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"Sve aplikacije i podaci iz ove sesije će se izbrisati."</string> @@ -1210,8 +1215,6 @@ <string name="privacy_dialog_recent_app_usage_1" msgid="2551340497722370109">"Nedavno je koristila aplikacija <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g>)"</string> <string name="privacy_dialog_active_app_usage_2" msgid="2770926061339921767">"Koristi aplikacija <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>)"</string> <string name="privacy_dialog_recent_app_usage_2" msgid="2874689735085367167">"Nedavno je koristila aplikacija <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>)"</string> - <!-- no translation found for keyboard_backlight_dialog_title (8273102932345564724) --> - <skip /> - <!-- no translation found for keyboard_backlight_value (7336398765584393538) --> - <skip /> + <string name="keyboard_backlight_dialog_title" msgid="8273102932345564724">"Pozadinsko osvjetljenje tastature"</string> + <string name="keyboard_backlight_value" msgid="7336398765584393538">"%1$d. nivo od %2$d"</string> </resources> diff --git a/packages/SystemUI/res/values-ca/strings.xml b/packages/SystemUI/res/values-ca/strings.xml index 443c2eee9ef3..ba82dfe47298 100644 --- a/packages/SystemUI/res/values-ca/strings.xml +++ b/packages/SystemUI/res/values-ca/strings.xml @@ -197,6 +197,10 @@ <string name="accessibility_bluetooth_connected" msgid="4745196874551115205">"Bluetooth connectat."</string> <string name="accessibility_bluetooth_device_icon" msgid="9163840051642587982">"Icona de dispositiu Bluetooth"</string> <string name="accessibility_bluetooth_device_settings_gear" msgid="3314916468105272540">"Fes clic per configurar els detalls del dispositiu"</string> + <!-- no translation found for accessibility_bluetooth_device_settings_see_all (9111952496905423543) --> + <skip /> + <!-- no translation found for accessibility_bluetooth_device_settings_pair_new_device (2435184865793496966) --> + <skip /> <string name="accessibility_battery_unknown" msgid="1807789554617976440">"Es desconeix el percentatge de bateria."</string> <string name="accessibility_bluetooth_name" msgid="7300973230214067678">"S\'ha connectat a <xliff:g id="BLUETOOTH">%s</xliff:g>."</string> <string name="accessibility_cast_name" msgid="7344437925388773685">"Està connectat amb <xliff:g id="CAST">%s</xliff:g>."</string> @@ -255,6 +259,10 @@ <string name="turn_on_bluetooth" msgid="5681370462180289071">"Utilitza\'l"</string> <string name="quick_settings_bluetooth_device_connected" msgid="7884777006729260996">"Connectat"</string> <string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Desat"</string> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_disconnect (415980329093277342) --> + <skip /> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_activate (3724301751036877403) --> + <skip /> <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="4182034939479344093">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g> de bateria"</string> <string name="quick_settings_bluetooth_secondary_label_audio" msgid="780333390310051161">"Àudio"</string> <string name="quick_settings_bluetooth_secondary_label_headset" msgid="2332093067553000852">"Auriculars"</string> @@ -396,8 +404,7 @@ <string name="keyguard_indication_charging_time_fast" msgid="8390311020603859480">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Carregant ràpidament • Es completarà d\'aquí a <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> <string name="keyguard_indication_charging_time_slowly" msgid="301936949731705417">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Carregant lentament • Es completarà d\'aquí a <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> <string name="keyguard_indication_charging_time_dock" msgid="3149328898931741271">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • S\'està carregant • Es completarà d\'aquí a <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> - <!-- no translation found for communal_tutorial_indicator_text (4503010353591430123) --> - <skip /> + <string name="communal_tutorial_indicator_text" msgid="4503010353591430123">"Llisca cap a l\'esquerra per iniciar el tutorial de la comunitat"</string> <!-- no translation found for button_to_open_widget_picker (8007261659745030810) --> <skip /> <!-- no translation found for button_to_remove_widget (1511255853677835341) --> diff --git a/packages/SystemUI/res/values-cs/strings.xml b/packages/SystemUI/res/values-cs/strings.xml index ada9c3cca76d..2201d64676b9 100644 --- a/packages/SystemUI/res/values-cs/strings.xml +++ b/packages/SystemUI/res/values-cs/strings.xml @@ -197,6 +197,10 @@ <string name="accessibility_bluetooth_connected" msgid="4745196874551115205">"Rozhraní Bluetooth je připojeno."</string> <string name="accessibility_bluetooth_device_icon" msgid="9163840051642587982">"Ikona zařízení Bluetooth"</string> <string name="accessibility_bluetooth_device_settings_gear" msgid="3314916468105272540">"Kliknutím nakonfigurujete podrobnosti o zařízení"</string> + <!-- no translation found for accessibility_bluetooth_device_settings_see_all (9111952496905423543) --> + <skip /> + <!-- no translation found for accessibility_bluetooth_device_settings_pair_new_device (2435184865793496966) --> + <skip /> <string name="accessibility_battery_unknown" msgid="1807789554617976440">"Procento baterie není známé."</string> <string name="accessibility_bluetooth_name" msgid="7300973230214067678">"Připojeno k zařízení <xliff:g id="BLUETOOTH">%s</xliff:g>."</string> <string name="accessibility_cast_name" msgid="7344437925388773685">"Jste připojeni k zařízení <xliff:g id="CAST">%s</xliff:g>."</string> @@ -255,6 +259,10 @@ <string name="turn_on_bluetooth" msgid="5681370462180289071">"Použít Bluetooth"</string> <string name="quick_settings_bluetooth_device_connected" msgid="7884777006729260996">"Připojeno"</string> <string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Uloženo"</string> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_disconnect (415980329093277342) --> + <skip /> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_activate (3724301751036877403) --> + <skip /> <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="4182034939479344093">"Baterie: <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g>"</string> <string name="quick_settings_bluetooth_secondary_label_audio" msgid="780333390310051161">"Zvuk"</string> <string name="quick_settings_bluetooth_secondary_label_headset" msgid="2332093067553000852">"Sluchátka"</string> @@ -396,12 +404,9 @@ <string name="keyguard_indication_charging_time_fast" msgid="8390311020603859480">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Rychlé nabíjení • Plně nabito za <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> <string name="keyguard_indication_charging_time_slowly" msgid="301936949731705417">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Pomalé nabíjení • Plně nabito za <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> <string name="keyguard_indication_charging_time_dock" msgid="3149328898931741271">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Nabíjení • Plně nabito za <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> - <!-- no translation found for communal_tutorial_indicator_text (4503010353591430123) --> - <skip /> - <!-- no translation found for button_to_open_widget_picker (8007261659745030810) --> - <skip /> - <!-- no translation found for button_to_remove_widget (1511255853677835341) --> - <skip /> + <string name="communal_tutorial_indicator_text" msgid="4503010353591430123">"Přejetím doleva spustíte komunitní výukový program"</string> + <string name="button_to_open_widget_picker" msgid="8007261659745030810">"Otevřít výběr widgetu"</string> + <string name="button_to_remove_widget" msgid="1511255853677835341">"Odstranit widget"</string> <string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"Přepnout uživatele"</string> <string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"rozbalovací nabídka"</string> <string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"Veškeré aplikace a data v této relaci budou vymazána."</string> @@ -1210,8 +1215,6 @@ <string name="privacy_dialog_recent_app_usage_1" msgid="2551340497722370109">"Nedávno použila aplikace <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g>)"</string> <string name="privacy_dialog_active_app_usage_2" msgid="2770926061339921767">"Právě používán aplikací <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>)"</string> <string name="privacy_dialog_recent_app_usage_2" msgid="2874689735085367167">"Nedávno použila aplikace <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>)"</string> - <!-- no translation found for keyboard_backlight_dialog_title (8273102932345564724) --> - <skip /> - <!-- no translation found for keyboard_backlight_value (7336398765584393538) --> - <skip /> + <string name="keyboard_backlight_dialog_title" msgid="8273102932345564724">"Podsvícení klávesnice"</string> + <string name="keyboard_backlight_value" msgid="7336398765584393538">"Úroveň %1$d z %2$d"</string> </resources> diff --git a/packages/SystemUI/res/values-da/strings.xml b/packages/SystemUI/res/values-da/strings.xml index f6f40d04c4c0..14bce296477e 100644 --- a/packages/SystemUI/res/values-da/strings.xml +++ b/packages/SystemUI/res/values-da/strings.xml @@ -197,6 +197,10 @@ <string name="accessibility_bluetooth_connected" msgid="4745196874551115205">"Bluetooth tilsluttet."</string> <string name="accessibility_bluetooth_device_icon" msgid="9163840051642587982">"Ikon for Bluetooth-enhed"</string> <string name="accessibility_bluetooth_device_settings_gear" msgid="3314916468105272540">"Klik for at konfigurere enhedsoplysninger"</string> + <!-- no translation found for accessibility_bluetooth_device_settings_see_all (9111952496905423543) --> + <skip /> + <!-- no translation found for accessibility_bluetooth_device_settings_pair_new_device (2435184865793496966) --> + <skip /> <string name="accessibility_battery_unknown" msgid="1807789554617976440">"Batteriniveauet er ukendt."</string> <string name="accessibility_bluetooth_name" msgid="7300973230214067678">"Tilsluttet <xliff:g id="BLUETOOTH">%s</xliff:g>."</string> <string name="accessibility_cast_name" msgid="7344437925388773685">"Forbundet til <xliff:g id="CAST">%s</xliff:g>."</string> @@ -255,6 +259,10 @@ <string name="turn_on_bluetooth" msgid="5681370462180289071">"Brug Bluetooth"</string> <string name="quick_settings_bluetooth_device_connected" msgid="7884777006729260996">"Der er oprettet forbindelse"</string> <string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Gemt"</string> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_disconnect (415980329093277342) --> + <skip /> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_activate (3724301751036877403) --> + <skip /> <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="4182034939479344093">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g> batteri"</string> <string name="quick_settings_bluetooth_secondary_label_audio" msgid="780333390310051161">"Lyd"</string> <string name="quick_settings_bluetooth_secondary_label_headset" msgid="2332093067553000852">"Headset"</string> @@ -396,8 +404,7 @@ <string name="keyguard_indication_charging_time_fast" msgid="8390311020603859480">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Oplader hurtigt • Fuldt opladet om <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> <string name="keyguard_indication_charging_time_slowly" msgid="301936949731705417">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Oplader langsomt • Fuldt opladet om <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> <string name="keyguard_indication_charging_time_dock" msgid="3149328898931741271">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Oplader • Fuldt opladet om <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> - <!-- no translation found for communal_tutorial_indicator_text (4503010353591430123) --> - <skip /> + <string name="communal_tutorial_indicator_text" msgid="4503010353591430123">"Stryg mod venstre for at starte den fælles vejledning"</string> <!-- no translation found for button_to_open_widget_picker (8007261659745030810) --> <skip /> <!-- no translation found for button_to_remove_widget (1511255853677835341) --> diff --git a/packages/SystemUI/res/values-de/strings.xml b/packages/SystemUI/res/values-de/strings.xml index f8709c8e3597..2d9a83023018 100644 --- a/packages/SystemUI/res/values-de/strings.xml +++ b/packages/SystemUI/res/values-de/strings.xml @@ -197,6 +197,10 @@ <string name="accessibility_bluetooth_connected" msgid="4745196874551115205">"Mit Bluetooth verbunden"</string> <string name="accessibility_bluetooth_device_icon" msgid="9163840051642587982">"Symbol des Bluetooth-Geräts"</string> <string name="accessibility_bluetooth_device_settings_gear" msgid="3314916468105272540">"Klicke, um das Gerätedetail zu konfigurieren"</string> + <!-- no translation found for accessibility_bluetooth_device_settings_see_all (9111952496905423543) --> + <skip /> + <!-- no translation found for accessibility_bluetooth_device_settings_pair_new_device (2435184865793496966) --> + <skip /> <string name="accessibility_battery_unknown" msgid="1807789554617976440">"Akkustand unbekannt."</string> <string name="accessibility_bluetooth_name" msgid="7300973230214067678">"Mit <xliff:g id="BLUETOOTH">%s</xliff:g> verbunden"</string> <string name="accessibility_cast_name" msgid="7344437925388773685">"Verbunden mit <xliff:g id="CAST">%s</xliff:g>."</string> @@ -255,6 +259,10 @@ <string name="turn_on_bluetooth" msgid="5681370462180289071">"Bluetooth verwenden"</string> <string name="quick_settings_bluetooth_device_connected" msgid="7884777006729260996">"Verbunden"</string> <string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Gespeichert"</string> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_disconnect (415980329093277342) --> + <skip /> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_activate (3724301751036877403) --> + <skip /> <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="4182034939479344093">"Akkustand: <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g>"</string> <string name="quick_settings_bluetooth_secondary_label_audio" msgid="780333390310051161">"Audio"</string> <string name="quick_settings_bluetooth_secondary_label_headset" msgid="2332093067553000852">"Headset"</string> @@ -398,10 +406,8 @@ <string name="keyguard_indication_charging_time_dock" msgid="3149328898931741271">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Wird geladen • Voll in <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> <!-- no translation found for communal_tutorial_indicator_text (4503010353591430123) --> <skip /> - <!-- no translation found for button_to_open_widget_picker (8007261659745030810) --> - <skip /> - <!-- no translation found for button_to_remove_widget (1511255853677835341) --> - <skip /> + <string name="button_to_open_widget_picker" msgid="8007261659745030810">"Widget-Auswahl öffnen"</string> + <string name="button_to_remove_widget" msgid="1511255853677835341">"Widget entfernen"</string> <string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"Nutzer wechseln"</string> <string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"Pull-down-Menü"</string> <string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"Alle Apps und Daten in dieser Sitzung werden gelöscht."</string> @@ -1210,8 +1216,6 @@ <string name="privacy_dialog_recent_app_usage_1" msgid="2551340497722370109">"Kürzlich von <xliff:g id="APP_NAME">%1$s</xliff:g> verwendet (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g>)"</string> <string name="privacy_dialog_active_app_usage_2" msgid="2770926061339921767">"Verwendet von <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>)"</string> <string name="privacy_dialog_recent_app_usage_2" msgid="2874689735085367167">"Kürzlich von <xliff:g id="APP_NAME">%1$s</xliff:g> verwendet (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>)"</string> - <!-- no translation found for keyboard_backlight_dialog_title (8273102932345564724) --> - <skip /> - <!-- no translation found for keyboard_backlight_value (7336398765584393538) --> - <skip /> + <string name="keyboard_backlight_dialog_title" msgid="8273102932345564724">"Tastaturbeleuchtung"</string> + <string name="keyboard_backlight_value" msgid="7336398765584393538">"Level %1$d von %2$d"</string> </resources> diff --git a/packages/SystemUI/res/values-el/strings.xml b/packages/SystemUI/res/values-el/strings.xml index c42f04dc9b8b..72fe0804889f 100644 --- a/packages/SystemUI/res/values-el/strings.xml +++ b/packages/SystemUI/res/values-el/strings.xml @@ -197,6 +197,10 @@ <string name="accessibility_bluetooth_connected" msgid="4745196874551115205">"Το Bluetooth είναι συνδεδεμένο."</string> <string name="accessibility_bluetooth_device_icon" msgid="9163840051642587982">"Εικονίδιο συσκευής Bluetooth"</string> <string name="accessibility_bluetooth_device_settings_gear" msgid="3314916468105272540">"Κάντε κλικ για να διαμορφώσετε τις λεπτομέρειες συσκευής"</string> + <!-- no translation found for accessibility_bluetooth_device_settings_see_all (9111952496905423543) --> + <skip /> + <!-- no translation found for accessibility_bluetooth_device_settings_pair_new_device (2435184865793496966) --> + <skip /> <string name="accessibility_battery_unknown" msgid="1807789554617976440">"Άγνωστο ποσοστό μπαταρίας."</string> <string name="accessibility_bluetooth_name" msgid="7300973230214067678">"Συνδέθηκε στο <xliff:g id="BLUETOOTH">%s</xliff:g>."</string> <string name="accessibility_cast_name" msgid="7344437925388773685">"Συνδέθηκε σε <xliff:g id="CAST">%s</xliff:g>."</string> @@ -255,6 +259,10 @@ <string name="turn_on_bluetooth" msgid="5681370462180289071">"Χρήση Bluetooth"</string> <string name="quick_settings_bluetooth_device_connected" msgid="7884777006729260996">"Συνδέθηκε"</string> <string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Αποθηκεύτηκε"</string> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_disconnect (415980329093277342) --> + <skip /> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_activate (3724301751036877403) --> + <skip /> <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="4182034939479344093">"Μπαταρία <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g>"</string> <string name="quick_settings_bluetooth_secondary_label_audio" msgid="780333390310051161">"Ήχος"</string> <string name="quick_settings_bluetooth_secondary_label_headset" msgid="2332093067553000852">"Ακουστικά"</string> @@ -397,10 +405,8 @@ <string name="keyguard_indication_charging_time_slowly" msgid="301936949731705417">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Αργή φόρτιση • Πλήρης φόρτιση σε <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> <string name="keyguard_indication_charging_time_dock" msgid="3149328898931741271">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Φόρτιση • Πλήρης φόρτιση σε <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> <string name="communal_tutorial_indicator_text" msgid="4503010353591430123">"Σύρετε προς τα αριστερά για να ξεκινήσετε τον κοινόχρηστο οδηγό"</string> - <!-- no translation found for button_to_open_widget_picker (8007261659745030810) --> - <skip /> - <!-- no translation found for button_to_remove_widget (1511255853677835341) --> - <skip /> + <string name="button_to_open_widget_picker" msgid="8007261659745030810">"Άνοιγμα του εργαλείου επιλογής γραφικών στοιχείων"</string> + <string name="button_to_remove_widget" msgid="1511255853677835341">"Αφαίρεση ενός widget"</string> <string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"Εναλλαγή χρήστη"</string> <string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"αναπτυσσόμενο μενού"</string> <string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"Όλες οι εφαρμογές και τα δεδομένα αυτής της περιόδου σύνδεσης θα διαγραφούν."</string> @@ -1209,8 +1215,6 @@ <string name="privacy_dialog_recent_app_usage_1" msgid="2551340497722370109">"Χρησιμοποιήθηκε πρόσφατα από την εφαρμογή <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g>)"</string> <string name="privacy_dialog_active_app_usage_2" msgid="2770926061339921767">"Χρησιμοποιείται από την εφαρμογή <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>)"</string> <string name="privacy_dialog_recent_app_usage_2" msgid="2874689735085367167">"Χρησιμοποιήθηκε πρόσφατα από την εφαρμογή <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>)"</string> - <!-- no translation found for keyboard_backlight_dialog_title (8273102932345564724) --> - <skip /> - <!-- no translation found for keyboard_backlight_value (7336398765584393538) --> - <skip /> + <string name="keyboard_backlight_dialog_title" msgid="8273102932345564724">"Οπίσθιος φωτισμός πληκτρολογίου"</string> + <string name="keyboard_backlight_value" msgid="7336398765584393538">"Επίπεδο %1$d από %2$d"</string> </resources> diff --git a/packages/SystemUI/res/values-en-rAU/strings.xml b/packages/SystemUI/res/values-en-rAU/strings.xml index cc1b908d7ee8..d7062e157c4a 100644 --- a/packages/SystemUI/res/values-en-rAU/strings.xml +++ b/packages/SystemUI/res/values-en-rAU/strings.xml @@ -197,6 +197,10 @@ <string name="accessibility_bluetooth_connected" msgid="4745196874551115205">"Bluetooth connected."</string> <string name="accessibility_bluetooth_device_icon" msgid="9163840051642587982">"Bluetooth device icon"</string> <string name="accessibility_bluetooth_device_settings_gear" msgid="3314916468105272540">"Click to configure device detail"</string> + <!-- no translation found for accessibility_bluetooth_device_settings_see_all (9111952496905423543) --> + <skip /> + <!-- no translation found for accessibility_bluetooth_device_settings_pair_new_device (2435184865793496966) --> + <skip /> <string name="accessibility_battery_unknown" msgid="1807789554617976440">"Battery percentage unknown."</string> <string name="accessibility_bluetooth_name" msgid="7300973230214067678">"Connected to <xliff:g id="BLUETOOTH">%s</xliff:g>."</string> <string name="accessibility_cast_name" msgid="7344437925388773685">"Connected to <xliff:g id="CAST">%s</xliff:g>."</string> @@ -255,6 +259,10 @@ <string name="turn_on_bluetooth" msgid="5681370462180289071">"Use Bluetooth"</string> <string name="quick_settings_bluetooth_device_connected" msgid="7884777006729260996">"Connected"</string> <string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Saved"</string> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_disconnect (415980329093277342) --> + <skip /> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_activate (3724301751036877403) --> + <skip /> <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="4182034939479344093">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g> battery"</string> <string name="quick_settings_bluetooth_secondary_label_audio" msgid="780333390310051161">"Audio"</string> <string name="quick_settings_bluetooth_secondary_label_headset" msgid="2332093067553000852">"Headset"</string> @@ -397,10 +405,8 @@ <string name="keyguard_indication_charging_time_slowly" msgid="301936949731705417">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Charging slowly • Full in <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> <string name="keyguard_indication_charging_time_dock" msgid="3149328898931741271">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Charging • Full in <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> <string name="communal_tutorial_indicator_text" msgid="4503010353591430123">"Swipe left to start the communal tutorial"</string> - <!-- no translation found for button_to_open_widget_picker (8007261659745030810) --> - <skip /> - <!-- no translation found for button_to_remove_widget (1511255853677835341) --> - <skip /> + <string name="button_to_open_widget_picker" msgid="8007261659745030810">"Open the widget picker"</string> + <string name="button_to_remove_widget" msgid="1511255853677835341">"Remove a widget"</string> <string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"Switch user"</string> <string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"pulldown menu"</string> <string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"All apps and data in this session will be deleted."</string> @@ -1209,8 +1215,6 @@ <string name="privacy_dialog_recent_app_usage_1" msgid="2551340497722370109">"Recently used by <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g>)"</string> <string name="privacy_dialog_active_app_usage_2" msgid="2770926061339921767">"In use by <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>)"</string> <string name="privacy_dialog_recent_app_usage_2" msgid="2874689735085367167">"Recently used by <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>)"</string> - <!-- no translation found for keyboard_backlight_dialog_title (8273102932345564724) --> - <skip /> - <!-- no translation found for keyboard_backlight_value (7336398765584393538) --> - <skip /> + <string name="keyboard_backlight_dialog_title" msgid="8273102932345564724">"Keyboard backlight"</string> + <string name="keyboard_backlight_value" msgid="7336398765584393538">"Level %1$d of %2$d"</string> </resources> diff --git a/packages/SystemUI/res/values-en-rCA/strings.xml b/packages/SystemUI/res/values-en-rCA/strings.xml index c3c2d1753bfe..9fcf1a3fc68e 100644 --- a/packages/SystemUI/res/values-en-rCA/strings.xml +++ b/packages/SystemUI/res/values-en-rCA/strings.xml @@ -197,6 +197,10 @@ <string name="accessibility_bluetooth_connected" msgid="4745196874551115205">"Bluetooth connected."</string> <string name="accessibility_bluetooth_device_icon" msgid="9163840051642587982">"Bluetooth device icon"</string> <string name="accessibility_bluetooth_device_settings_gear" msgid="3314916468105272540">"Click to configure device detail"</string> + <!-- no translation found for accessibility_bluetooth_device_settings_see_all (9111952496905423543) --> + <skip /> + <!-- no translation found for accessibility_bluetooth_device_settings_pair_new_device (2435184865793496966) --> + <skip /> <string name="accessibility_battery_unknown" msgid="1807789554617976440">"Battery percentage unknown."</string> <string name="accessibility_bluetooth_name" msgid="7300973230214067678">"Connected to <xliff:g id="BLUETOOTH">%s</xliff:g>."</string> <string name="accessibility_cast_name" msgid="7344437925388773685">"Connected to <xliff:g id="CAST">%s</xliff:g>."</string> @@ -255,6 +259,10 @@ <string name="turn_on_bluetooth" msgid="5681370462180289071">"Use Bluetooth"</string> <string name="quick_settings_bluetooth_device_connected" msgid="7884777006729260996">"Connected"</string> <string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Saved"</string> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_disconnect (415980329093277342) --> + <skip /> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_activate (3724301751036877403) --> + <skip /> <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="4182034939479344093">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g> battery"</string> <string name="quick_settings_bluetooth_secondary_label_audio" msgid="780333390310051161">"Audio"</string> <string name="quick_settings_bluetooth_secondary_label_headset" msgid="2332093067553000852">"Headset"</string> diff --git a/packages/SystemUI/res/values-en-rGB/strings.xml b/packages/SystemUI/res/values-en-rGB/strings.xml index cc1b908d7ee8..d7062e157c4a 100644 --- a/packages/SystemUI/res/values-en-rGB/strings.xml +++ b/packages/SystemUI/res/values-en-rGB/strings.xml @@ -197,6 +197,10 @@ <string name="accessibility_bluetooth_connected" msgid="4745196874551115205">"Bluetooth connected."</string> <string name="accessibility_bluetooth_device_icon" msgid="9163840051642587982">"Bluetooth device icon"</string> <string name="accessibility_bluetooth_device_settings_gear" msgid="3314916468105272540">"Click to configure device detail"</string> + <!-- no translation found for accessibility_bluetooth_device_settings_see_all (9111952496905423543) --> + <skip /> + <!-- no translation found for accessibility_bluetooth_device_settings_pair_new_device (2435184865793496966) --> + <skip /> <string name="accessibility_battery_unknown" msgid="1807789554617976440">"Battery percentage unknown."</string> <string name="accessibility_bluetooth_name" msgid="7300973230214067678">"Connected to <xliff:g id="BLUETOOTH">%s</xliff:g>."</string> <string name="accessibility_cast_name" msgid="7344437925388773685">"Connected to <xliff:g id="CAST">%s</xliff:g>."</string> @@ -255,6 +259,10 @@ <string name="turn_on_bluetooth" msgid="5681370462180289071">"Use Bluetooth"</string> <string name="quick_settings_bluetooth_device_connected" msgid="7884777006729260996">"Connected"</string> <string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Saved"</string> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_disconnect (415980329093277342) --> + <skip /> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_activate (3724301751036877403) --> + <skip /> <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="4182034939479344093">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g> battery"</string> <string name="quick_settings_bluetooth_secondary_label_audio" msgid="780333390310051161">"Audio"</string> <string name="quick_settings_bluetooth_secondary_label_headset" msgid="2332093067553000852">"Headset"</string> @@ -397,10 +405,8 @@ <string name="keyguard_indication_charging_time_slowly" msgid="301936949731705417">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Charging slowly • Full in <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> <string name="keyguard_indication_charging_time_dock" msgid="3149328898931741271">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Charging • Full in <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> <string name="communal_tutorial_indicator_text" msgid="4503010353591430123">"Swipe left to start the communal tutorial"</string> - <!-- no translation found for button_to_open_widget_picker (8007261659745030810) --> - <skip /> - <!-- no translation found for button_to_remove_widget (1511255853677835341) --> - <skip /> + <string name="button_to_open_widget_picker" msgid="8007261659745030810">"Open the widget picker"</string> + <string name="button_to_remove_widget" msgid="1511255853677835341">"Remove a widget"</string> <string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"Switch user"</string> <string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"pulldown menu"</string> <string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"All apps and data in this session will be deleted."</string> @@ -1209,8 +1215,6 @@ <string name="privacy_dialog_recent_app_usage_1" msgid="2551340497722370109">"Recently used by <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g>)"</string> <string name="privacy_dialog_active_app_usage_2" msgid="2770926061339921767">"In use by <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>)"</string> <string name="privacy_dialog_recent_app_usage_2" msgid="2874689735085367167">"Recently used by <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>)"</string> - <!-- no translation found for keyboard_backlight_dialog_title (8273102932345564724) --> - <skip /> - <!-- no translation found for keyboard_backlight_value (7336398765584393538) --> - <skip /> + <string name="keyboard_backlight_dialog_title" msgid="8273102932345564724">"Keyboard backlight"</string> + <string name="keyboard_backlight_value" msgid="7336398765584393538">"Level %1$d of %2$d"</string> </resources> diff --git a/packages/SystemUI/res/values-en-rIN/strings.xml b/packages/SystemUI/res/values-en-rIN/strings.xml index cc1b908d7ee8..d7062e157c4a 100644 --- a/packages/SystemUI/res/values-en-rIN/strings.xml +++ b/packages/SystemUI/res/values-en-rIN/strings.xml @@ -197,6 +197,10 @@ <string name="accessibility_bluetooth_connected" msgid="4745196874551115205">"Bluetooth connected."</string> <string name="accessibility_bluetooth_device_icon" msgid="9163840051642587982">"Bluetooth device icon"</string> <string name="accessibility_bluetooth_device_settings_gear" msgid="3314916468105272540">"Click to configure device detail"</string> + <!-- no translation found for accessibility_bluetooth_device_settings_see_all (9111952496905423543) --> + <skip /> + <!-- no translation found for accessibility_bluetooth_device_settings_pair_new_device (2435184865793496966) --> + <skip /> <string name="accessibility_battery_unknown" msgid="1807789554617976440">"Battery percentage unknown."</string> <string name="accessibility_bluetooth_name" msgid="7300973230214067678">"Connected to <xliff:g id="BLUETOOTH">%s</xliff:g>."</string> <string name="accessibility_cast_name" msgid="7344437925388773685">"Connected to <xliff:g id="CAST">%s</xliff:g>."</string> @@ -255,6 +259,10 @@ <string name="turn_on_bluetooth" msgid="5681370462180289071">"Use Bluetooth"</string> <string name="quick_settings_bluetooth_device_connected" msgid="7884777006729260996">"Connected"</string> <string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Saved"</string> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_disconnect (415980329093277342) --> + <skip /> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_activate (3724301751036877403) --> + <skip /> <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="4182034939479344093">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g> battery"</string> <string name="quick_settings_bluetooth_secondary_label_audio" msgid="780333390310051161">"Audio"</string> <string name="quick_settings_bluetooth_secondary_label_headset" msgid="2332093067553000852">"Headset"</string> @@ -397,10 +405,8 @@ <string name="keyguard_indication_charging_time_slowly" msgid="301936949731705417">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Charging slowly • Full in <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> <string name="keyguard_indication_charging_time_dock" msgid="3149328898931741271">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Charging • Full in <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> <string name="communal_tutorial_indicator_text" msgid="4503010353591430123">"Swipe left to start the communal tutorial"</string> - <!-- no translation found for button_to_open_widget_picker (8007261659745030810) --> - <skip /> - <!-- no translation found for button_to_remove_widget (1511255853677835341) --> - <skip /> + <string name="button_to_open_widget_picker" msgid="8007261659745030810">"Open the widget picker"</string> + <string name="button_to_remove_widget" msgid="1511255853677835341">"Remove a widget"</string> <string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"Switch user"</string> <string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"pulldown menu"</string> <string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"All apps and data in this session will be deleted."</string> @@ -1209,8 +1215,6 @@ <string name="privacy_dialog_recent_app_usage_1" msgid="2551340497722370109">"Recently used by <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g>)"</string> <string name="privacy_dialog_active_app_usage_2" msgid="2770926061339921767">"In use by <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>)"</string> <string name="privacy_dialog_recent_app_usage_2" msgid="2874689735085367167">"Recently used by <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>)"</string> - <!-- no translation found for keyboard_backlight_dialog_title (8273102932345564724) --> - <skip /> - <!-- no translation found for keyboard_backlight_value (7336398765584393538) --> - <skip /> + <string name="keyboard_backlight_dialog_title" msgid="8273102932345564724">"Keyboard backlight"</string> + <string name="keyboard_backlight_value" msgid="7336398765584393538">"Level %1$d of %2$d"</string> </resources> diff --git a/packages/SystemUI/res/values-en-rXC/strings.xml b/packages/SystemUI/res/values-en-rXC/strings.xml index 1badbb35fb57..a68c7c557fcf 100644 --- a/packages/SystemUI/res/values-en-rXC/strings.xml +++ b/packages/SystemUI/res/values-en-rXC/strings.xml @@ -197,6 +197,10 @@ <string name="accessibility_bluetooth_connected" msgid="4745196874551115205">"Bluetooth connected."</string> <string name="accessibility_bluetooth_device_icon" msgid="9163840051642587982">"Bluetooth device icon"</string> <string name="accessibility_bluetooth_device_settings_gear" msgid="3314916468105272540">"Click to configure device detail"</string> + <!-- no translation found for accessibility_bluetooth_device_settings_see_all (9111952496905423543) --> + <skip /> + <!-- no translation found for accessibility_bluetooth_device_settings_pair_new_device (2435184865793496966) --> + <skip /> <string name="accessibility_battery_unknown" msgid="1807789554617976440">"Battery percentage unknown."</string> <string name="accessibility_bluetooth_name" msgid="7300973230214067678">"Connected to <xliff:g id="BLUETOOTH">%s</xliff:g>."</string> <string name="accessibility_cast_name" msgid="7344437925388773685">"Connected to <xliff:g id="CAST">%s</xliff:g>."</string> @@ -255,6 +259,10 @@ <string name="turn_on_bluetooth" msgid="5681370462180289071">"Use Bluetooth"</string> <string name="quick_settings_bluetooth_device_connected" msgid="7884777006729260996">"Connected"</string> <string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Saved"</string> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_disconnect (415980329093277342) --> + <skip /> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_activate (3724301751036877403) --> + <skip /> <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="4182034939479344093">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g> battery"</string> <string name="quick_settings_bluetooth_secondary_label_audio" msgid="780333390310051161">"Audio"</string> <string name="quick_settings_bluetooth_secondary_label_headset" msgid="2332093067553000852">"Headset"</string> diff --git a/packages/SystemUI/res/values-es-rUS/strings.xml b/packages/SystemUI/res/values-es-rUS/strings.xml index e0ad6ff8ac01..03acc6a43cc2 100644 --- a/packages/SystemUI/res/values-es-rUS/strings.xml +++ b/packages/SystemUI/res/values-es-rUS/strings.xml @@ -197,6 +197,10 @@ <string name="accessibility_bluetooth_connected" msgid="4745196874551115205">"Bluetooth conectado"</string> <string name="accessibility_bluetooth_device_icon" msgid="9163840051642587982">"Ícono de dispositivo Bluetooth"</string> <string name="accessibility_bluetooth_device_settings_gear" msgid="3314916468105272540">"Haz clic para configurar los detalles del dispositivo"</string> + <!-- no translation found for accessibility_bluetooth_device_settings_see_all (9111952496905423543) --> + <skip /> + <!-- no translation found for accessibility_bluetooth_device_settings_pair_new_device (2435184865793496966) --> + <skip /> <string name="accessibility_battery_unknown" msgid="1807789554617976440">"Se desconoce el porcentaje de la batería."</string> <string name="accessibility_bluetooth_name" msgid="7300973230214067678">"Conectado a <xliff:g id="BLUETOOTH">%s</xliff:g>"</string> <string name="accessibility_cast_name" msgid="7344437925388773685">"Conectado a <xliff:g id="CAST">%s</xliff:g>."</string> @@ -255,6 +259,10 @@ <string name="turn_on_bluetooth" msgid="5681370462180289071">"Usar Bluetooth"</string> <string name="quick_settings_bluetooth_device_connected" msgid="7884777006729260996">"Conectado"</string> <string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Guardado"</string> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_disconnect (415980329093277342) --> + <skip /> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_activate (3724301751036877403) --> + <skip /> <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="4182034939479344093">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g> de batería"</string> <string name="quick_settings_bluetooth_secondary_label_audio" msgid="780333390310051161">"Audio"</string> <string name="quick_settings_bluetooth_secondary_label_headset" msgid="2332093067553000852">"Auriculares"</string> @@ -397,10 +405,8 @@ <string name="keyguard_indication_charging_time_slowly" msgid="301936949731705417">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Cargando lento • Se completará en <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> <string name="keyguard_indication_charging_time_dock" msgid="3149328898931741271">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Cargando • Se completará en <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> <string name="communal_tutorial_indicator_text" msgid="4503010353591430123">"Desliza el dedo a la izquierda para iniciar el instructivo comunal"</string> - <!-- no translation found for button_to_open_widget_picker (8007261659745030810) --> - <skip /> - <!-- no translation found for button_to_remove_widget (1511255853677835341) --> - <skip /> + <string name="button_to_open_widget_picker" msgid="8007261659745030810">"Abre el selector de widgets"</string> + <string name="button_to_remove_widget" msgid="1511255853677835341">"Quita el widget"</string> <string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"Cambiar usuario"</string> <string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"menú expandible"</string> <string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"Se eliminarán las aplicaciones y los datos de esta sesión."</string> @@ -1209,8 +1215,6 @@ <string name="privacy_dialog_recent_app_usage_1" msgid="2551340497722370109">"Uso reciente en <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g>)"</string> <string name="privacy_dialog_active_app_usage_2" msgid="2770926061339921767">"En uso por <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>)"</string> <string name="privacy_dialog_recent_app_usage_2" msgid="2874689735085367167">"Uso reciente en <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>)"</string> - <!-- no translation found for keyboard_backlight_dialog_title (8273102932345564724) --> - <skip /> - <!-- no translation found for keyboard_backlight_value (7336398765584393538) --> - <skip /> + <string name="keyboard_backlight_dialog_title" msgid="8273102932345564724">"Retroiluminación del teclado"</string> + <string name="keyboard_backlight_value" msgid="7336398765584393538">"Nivel %1$d de %2$d"</string> </resources> diff --git a/packages/SystemUI/res/values-es/strings.xml b/packages/SystemUI/res/values-es/strings.xml index 5685b31b679d..18131372ec40 100644 --- a/packages/SystemUI/res/values-es/strings.xml +++ b/packages/SystemUI/res/values-es/strings.xml @@ -197,6 +197,10 @@ <string name="accessibility_bluetooth_connected" msgid="4745196874551115205">"Bluetooth conectado"</string> <string name="accessibility_bluetooth_device_icon" msgid="9163840051642587982">"Icono de dispositivo Bluetooth"</string> <string name="accessibility_bluetooth_device_settings_gear" msgid="3314916468105272540">"Haz clic para configurar la información del dispositivo"</string> + <!-- no translation found for accessibility_bluetooth_device_settings_see_all (9111952496905423543) --> + <skip /> + <!-- no translation found for accessibility_bluetooth_device_settings_pair_new_device (2435184865793496966) --> + <skip /> <string name="accessibility_battery_unknown" msgid="1807789554617976440">"Porcentaje de batería desconocido."</string> <string name="accessibility_bluetooth_name" msgid="7300973230214067678">"Conectado a <xliff:g id="BLUETOOTH">%s</xliff:g>."</string> <string name="accessibility_cast_name" msgid="7344437925388773685">"Conectado a <xliff:g id="CAST">%s</xliff:g>."</string> @@ -255,6 +259,10 @@ <string name="turn_on_bluetooth" msgid="5681370462180289071">"Usar Bluetooth"</string> <string name="quick_settings_bluetooth_device_connected" msgid="7884777006729260996">"Conectado"</string> <string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Guardado"</string> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_disconnect (415980329093277342) --> + <skip /> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_activate (3724301751036877403) --> + <skip /> <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="4182034939479344093">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g> de batería"</string> <string name="quick_settings_bluetooth_secondary_label_audio" msgid="780333390310051161">"Audio"</string> <string name="quick_settings_bluetooth_secondary_label_headset" msgid="2332093067553000852">"Auriculares"</string> @@ -396,8 +404,7 @@ <string name="keyguard_indication_charging_time_fast" msgid="8390311020603859480">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Carga rápida • En <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g> terminará de cargarse"</string> <string name="keyguard_indication_charging_time_slowly" msgid="301936949731705417">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Carga lenta • En <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g> terminará de cargarse"</string> <string name="keyguard_indication_charging_time_dock" msgid="3149328898931741271">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Cargando • Carga completa en <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> - <!-- no translation found for communal_tutorial_indicator_text (4503010353591430123) --> - <skip /> + <string name="communal_tutorial_indicator_text" msgid="4503010353591430123">"Desliza hacia la izquierda para iniciar el tutorial de la comunidad"</string> <!-- no translation found for button_to_open_widget_picker (8007261659745030810) --> <skip /> <!-- no translation found for button_to_remove_widget (1511255853677835341) --> diff --git a/packages/SystemUI/res/values-et/strings.xml b/packages/SystemUI/res/values-et/strings.xml index 86f982b8437e..57dbb96c7143 100644 --- a/packages/SystemUI/res/values-et/strings.xml +++ b/packages/SystemUI/res/values-et/strings.xml @@ -197,6 +197,10 @@ <string name="accessibility_bluetooth_connected" msgid="4745196874551115205">"Bluetooth on ühendatud."</string> <string name="accessibility_bluetooth_device_icon" msgid="9163840051642587982">"Bluetooth-seadme ikoon"</string> <string name="accessibility_bluetooth_device_settings_gear" msgid="3314916468105272540">"Klõpsake seadme üksikasjade konfigureerimiseks"</string> + <!-- no translation found for accessibility_bluetooth_device_settings_see_all (9111952496905423543) --> + <skip /> + <!-- no translation found for accessibility_bluetooth_device_settings_pair_new_device (2435184865793496966) --> + <skip /> <string name="accessibility_battery_unknown" msgid="1807789554617976440">"Aku laetuse protsent on teadmata."</string> <string name="accessibility_bluetooth_name" msgid="7300973230214067678">"Ühendatud: <xliff:g id="BLUETOOTH">%s</xliff:g>."</string> <string name="accessibility_cast_name" msgid="7344437925388773685">"Ühendatud ülekandega <xliff:g id="CAST">%s</xliff:g>."</string> @@ -255,6 +259,10 @@ <string name="turn_on_bluetooth" msgid="5681370462180289071">"Kasuta Bluetoothi"</string> <string name="quick_settings_bluetooth_device_connected" msgid="7884777006729260996">"Ühendatud"</string> <string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Salvestatud"</string> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_disconnect (415980329093277342) --> + <skip /> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_activate (3724301751036877403) --> + <skip /> <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="4182034939479344093">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g> akut"</string> <string name="quick_settings_bluetooth_secondary_label_audio" msgid="780333390310051161">"Heli"</string> <string name="quick_settings_bluetooth_secondary_label_headset" msgid="2332093067553000852">"Peakomplekt"</string> @@ -396,8 +404,7 @@ <string name="keyguard_indication_charging_time_fast" msgid="8390311020603859480">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Kiirlaadimine • Täis <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g> pärast"</string> <string name="keyguard_indication_charging_time_slowly" msgid="301936949731705417">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Aeglane laadimine • Täis <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g> pärast"</string> <string name="keyguard_indication_charging_time_dock" msgid="3149328898931741271">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Laadimine • Täis <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g> pärast"</string> - <!-- no translation found for communal_tutorial_indicator_text (4503010353591430123) --> - <skip /> + <string name="communal_tutorial_indicator_text" msgid="4503010353591430123">"Ühise õpetuse käivitamiseks pühkige vasakule"</string> <!-- no translation found for button_to_open_widget_picker (8007261659745030810) --> <skip /> <!-- no translation found for button_to_remove_widget (1511255853677835341) --> diff --git a/packages/SystemUI/res/values-eu/strings.xml b/packages/SystemUI/res/values-eu/strings.xml index fb89c044341d..0902354bfa82 100644 --- a/packages/SystemUI/res/values-eu/strings.xml +++ b/packages/SystemUI/res/values-eu/strings.xml @@ -197,6 +197,10 @@ <string name="accessibility_bluetooth_connected" msgid="4745196874551115205">"Bluetootha konektatuta."</string> <string name="accessibility_bluetooth_device_icon" msgid="9163840051642587982">"Bluetooth bidezko gailuaren ikonoa"</string> <string name="accessibility_bluetooth_device_settings_gear" msgid="3314916468105272540">"Gailuaren xehetasuna konfiguratzeko, sakatu hau"</string> + <!-- no translation found for accessibility_bluetooth_device_settings_see_all (9111952496905423543) --> + <skip /> + <!-- no translation found for accessibility_bluetooth_device_settings_pair_new_device (2435184865793496966) --> + <skip /> <string name="accessibility_battery_unknown" msgid="1807789554617976440">"Bateriaren ehunekoa ezezaguna da."</string> <string name="accessibility_bluetooth_name" msgid="7300973230214067678">"<xliff:g id="BLUETOOTH">%s</xliff:g> gailura konektatuta."</string> <string name="accessibility_cast_name" msgid="7344437925388773685">"Hona konektatuta: <xliff:g id="CAST">%s</xliff:g>."</string> @@ -255,6 +259,10 @@ <string name="turn_on_bluetooth" msgid="5681370462180289071">"Erabili Bluetootha"</string> <string name="quick_settings_bluetooth_device_connected" msgid="7884777006729260996">"Konektatuta"</string> <string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Gordeta"</string> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_disconnect (415980329093277342) --> + <skip /> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_activate (3724301751036877403) --> + <skip /> <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="4182034939479344093">"Bateria: <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g>"</string> <string name="quick_settings_bluetooth_secondary_label_audio" msgid="780333390310051161">"Audioa"</string> <string name="quick_settings_bluetooth_secondary_label_headset" msgid="2332093067553000852">"Entzungailua"</string> @@ -396,8 +404,7 @@ <string name="keyguard_indication_charging_time_fast" msgid="8390311020603859480">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Bizkor kargatzen • <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g> guztiz kargatu arte"</string> <string name="keyguard_indication_charging_time_slowly" msgid="301936949731705417">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Mantso kargatzen • <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g> guztiz kargatu arte"</string> <string name="keyguard_indication_charging_time_dock" msgid="3149328898931741271">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Kargatzen • <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g> guztiz kargatu arte"</string> - <!-- no translation found for communal_tutorial_indicator_text (4503010353591430123) --> - <skip /> + <string name="communal_tutorial_indicator_text" msgid="4503010353591430123">"Tutorial komuna hasteko, pasatu hatza ezkerrera"</string> <!-- no translation found for button_to_open_widget_picker (8007261659745030810) --> <skip /> <!-- no translation found for button_to_remove_widget (1511255853677835341) --> diff --git a/packages/SystemUI/res/values-fa/strings.xml b/packages/SystemUI/res/values-fa/strings.xml index 7ab2ef156bc9..f42bf5038298 100644 --- a/packages/SystemUI/res/values-fa/strings.xml +++ b/packages/SystemUI/res/values-fa/strings.xml @@ -197,6 +197,10 @@ <string name="accessibility_bluetooth_connected" msgid="4745196874551115205">"بلوتوث متصل است."</string> <string name="accessibility_bluetooth_device_icon" msgid="9163840051642587982">"نماد دستگاه بلوتوث"</string> <string name="accessibility_bluetooth_device_settings_gear" msgid="3314916468105272540">"برای پیکربندی جزئیات دستگاه کلیک کنید"</string> + <!-- no translation found for accessibility_bluetooth_device_settings_see_all (9111952496905423543) --> + <skip /> + <!-- no translation found for accessibility_bluetooth_device_settings_pair_new_device (2435184865793496966) --> + <skip /> <string name="accessibility_battery_unknown" msgid="1807789554617976440">"درصد شارژ باتری مشخص نیست."</string> <string name="accessibility_bluetooth_name" msgid="7300973230214067678">"به <xliff:g id="BLUETOOTH">%s</xliff:g> متصل شد."</string> <string name="accessibility_cast_name" msgid="7344437925388773685">"به <xliff:g id="CAST">%s</xliff:g> متصل شد."</string> @@ -255,6 +259,10 @@ <string name="turn_on_bluetooth" msgid="5681370462180289071">"استفاده از بلوتوث"</string> <string name="quick_settings_bluetooth_device_connected" msgid="7884777006729260996">"متصل"</string> <string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"ذخیرهشده"</string> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_disconnect (415980329093277342) --> + <skip /> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_activate (3724301751036877403) --> + <skip /> <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="4182034939479344093">"شارژ باتری <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g>"</string> <string name="quick_settings_bluetooth_secondary_label_audio" msgid="780333390310051161">"صوت"</string> <string name="quick_settings_bluetooth_secondary_label_headset" msgid="2332093067553000852">"هدست"</string> @@ -397,10 +405,8 @@ <string name="keyguard_indication_charging_time_slowly" msgid="301936949731705417">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • درحال شارژ کردن آهسته • <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g> تا شارژ کامل"</string> <string name="keyguard_indication_charging_time_dock" msgid="3149328898931741271">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • درحال شارژ شدن • <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g> تا شارژ کامل"</string> <string name="communal_tutorial_indicator_text" msgid="4503010353591430123">"برای شروع آموزش گامبهگام عمومی، تند بهچپ بکشید"</string> - <!-- no translation found for button_to_open_widget_picker (8007261659745030810) --> - <skip /> - <!-- no translation found for button_to_remove_widget (1511255853677835341) --> - <skip /> + <string name="button_to_open_widget_picker" msgid="8007261659745030810">"باز کردن انتخابگر ابزارک"</string> + <string name="button_to_remove_widget" msgid="1511255853677835341">"حذف ابزارک"</string> <string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"تغییر کاربر"</string> <string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"منوی پایینپر"</string> <string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"همه برنامهها و دادههای این جلسه حذف خواهد شد."</string> @@ -1209,8 +1215,6 @@ <string name="privacy_dialog_recent_app_usage_1" msgid="2551340497722370109">"اخیراً <xliff:g id="APP_NAME">%1$s</xliff:g> از آن استفاده کرده است (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g>)"</string> <string name="privacy_dialog_active_app_usage_2" msgid="2770926061339921767">"<xliff:g id="APP_NAME">%1$s</xliff:g> از آن استفاده میکند (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>)"</string> <string name="privacy_dialog_recent_app_usage_2" msgid="2874689735085367167">"اخیراً <xliff:g id="APP_NAME">%1$s</xliff:g> از آن استفاده کرده است (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>)"</string> - <!-- no translation found for keyboard_backlight_dialog_title (8273102932345564724) --> - <skip /> - <!-- no translation found for keyboard_backlight_value (7336398765584393538) --> - <skip /> + <string name="keyboard_backlight_dialog_title" msgid="8273102932345564724">"نور پسزمینه صفحهکلید"</string> + <string name="keyboard_backlight_value" msgid="7336398765584393538">"سطح %1$d از %2$d"</string> </resources> diff --git a/packages/SystemUI/res/values-fi/strings.xml b/packages/SystemUI/res/values-fi/strings.xml index 9023d6331ac8..ae3ac060d494 100644 --- a/packages/SystemUI/res/values-fi/strings.xml +++ b/packages/SystemUI/res/values-fi/strings.xml @@ -197,6 +197,10 @@ <string name="accessibility_bluetooth_connected" msgid="4745196874551115205">"Bluetooth yhdistetty."</string> <string name="accessibility_bluetooth_device_icon" msgid="9163840051642587982">"Bluetooth-laitekuvake"</string> <string name="accessibility_bluetooth_device_settings_gear" msgid="3314916468105272540">"Määritä laitteen asetukset klikkaamalla"</string> + <!-- no translation found for accessibility_bluetooth_device_settings_see_all (9111952496905423543) --> + <skip /> + <!-- no translation found for accessibility_bluetooth_device_settings_pair_new_device (2435184865793496966) --> + <skip /> <string name="accessibility_battery_unknown" msgid="1807789554617976440">"Akun varaustaso ei tiedossa."</string> <string name="accessibility_bluetooth_name" msgid="7300973230214067678">"Yhteys: <xliff:g id="BLUETOOTH">%s</xliff:g>."</string> <string name="accessibility_cast_name" msgid="7344437925388773685">"Yhdistetty kohteeseen <xliff:g id="CAST">%s</xliff:g>"</string> @@ -255,6 +259,10 @@ <string name="turn_on_bluetooth" msgid="5681370462180289071">"Käytä Bluetoothia"</string> <string name="quick_settings_bluetooth_device_connected" msgid="7884777006729260996">"Yhdistetty"</string> <string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Tallennettu"</string> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_disconnect (415980329093277342) --> + <skip /> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_activate (3724301751036877403) --> + <skip /> <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="4182034939479344093">"Akun taso <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g>"</string> <string name="quick_settings_bluetooth_secondary_label_audio" msgid="780333390310051161">"Ääni"</string> <string name="quick_settings_bluetooth_secondary_label_headset" msgid="2332093067553000852">"Headset"</string> @@ -396,8 +404,7 @@ <string name="keyguard_indication_charging_time_fast" msgid="8390311020603859480">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Latautuu nopeasti • Täynnä <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g> päästä"</string> <string name="keyguard_indication_charging_time_slowly" msgid="301936949731705417">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Latautuu hitaasti • Täynnä <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g> päästä"</string> <string name="keyguard_indication_charging_time_dock" msgid="3149328898931741271">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Latautuu • Täynnä <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g> päästä"</string> - <!-- no translation found for communal_tutorial_indicator_text (4503010353591430123) --> - <skip /> + <string name="communal_tutorial_indicator_text" msgid="4503010353591430123">"Aloita yhteisöesittely pyyhkäisemällä vasemmalle"</string> <!-- no translation found for button_to_open_widget_picker (8007261659745030810) --> <skip /> <!-- no translation found for button_to_remove_widget (1511255853677835341) --> diff --git a/packages/SystemUI/res/values-fr-rCA/strings.xml b/packages/SystemUI/res/values-fr-rCA/strings.xml index f63f96fd739d..286753d01041 100644 --- a/packages/SystemUI/res/values-fr-rCA/strings.xml +++ b/packages/SystemUI/res/values-fr-rCA/strings.xml @@ -197,6 +197,10 @@ <string name="accessibility_bluetooth_connected" msgid="4745196874551115205">"Bluetooth connecté"</string> <string name="accessibility_bluetooth_device_icon" msgid="9163840051642587982">"Icône de l\'appareil Bluetooth"</string> <string name="accessibility_bluetooth_device_settings_gear" msgid="3314916468105272540">"Cliquez pour configurer les détails de l\'appareil"</string> + <!-- no translation found for accessibility_bluetooth_device_settings_see_all (9111952496905423543) --> + <skip /> + <!-- no translation found for accessibility_bluetooth_device_settings_pair_new_device (2435184865793496966) --> + <skip /> <string name="accessibility_battery_unknown" msgid="1807789554617976440">"Pourcentage de la pile inconnu."</string> <string name="accessibility_bluetooth_name" msgid="7300973230214067678">"Connecté à : <xliff:g id="BLUETOOTH">%s</xliff:g>"</string> <string name="accessibility_cast_name" msgid="7344437925388773685">"Connecté à <xliff:g id="CAST">%s</xliff:g>."</string> @@ -255,6 +259,10 @@ <string name="turn_on_bluetooth" msgid="5681370462180289071">"Utiliser le Bluetooth"</string> <string name="quick_settings_bluetooth_device_connected" msgid="7884777006729260996">"Connecté"</string> <string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Enregistré"</string> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_disconnect (415980329093277342) --> + <skip /> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_activate (3724301751036877403) --> + <skip /> <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="4182034939479344093">"Pile : <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g>"</string> <string name="quick_settings_bluetooth_secondary_label_audio" msgid="780333390310051161">"Audio"</string> <string name="quick_settings_bluetooth_secondary_label_headset" msgid="2332093067553000852">"Écouteurs"</string> @@ -396,8 +404,7 @@ <string name="keyguard_indication_charging_time_fast" msgid="8390311020603859480">"En recharge rapide : <xliff:g id="PERCENTAGE">%2$s</xliff:g> • Terminée dans <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> <string name="keyguard_indication_charging_time_slowly" msgid="301936949731705417">"En recharge lente : <xliff:g id="PERCENTAGE">%2$s</xliff:g> • Terminée <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> <string name="keyguard_indication_charging_time_dock" msgid="3149328898931741271">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Recharge en cours… • Se terminera dans <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> - <!-- no translation found for communal_tutorial_indicator_text (4503010353591430123) --> - <skip /> + <string name="communal_tutorial_indicator_text" msgid="4503010353591430123">"Balayer l\'écran vers la gauche pour démarrer le tutoriel communautaire"</string> <!-- no translation found for button_to_open_widget_picker (8007261659745030810) --> <skip /> <!-- no translation found for button_to_remove_widget (1511255853677835341) --> diff --git a/packages/SystemUI/res/values-fr/strings.xml b/packages/SystemUI/res/values-fr/strings.xml index 3d765b2a3a32..7f4e4cc36d5c 100644 --- a/packages/SystemUI/res/values-fr/strings.xml +++ b/packages/SystemUI/res/values-fr/strings.xml @@ -197,6 +197,10 @@ <string name="accessibility_bluetooth_connected" msgid="4745196874551115205">"Bluetooth connecté"</string> <string name="accessibility_bluetooth_device_icon" msgid="9163840051642587982">"Icône de l\'appareil Bluetooth"</string> <string name="accessibility_bluetooth_device_settings_gear" msgid="3314916468105272540">"Cliquer pour configurer les détails de l\'appareil"</string> + <!-- no translation found for accessibility_bluetooth_device_settings_see_all (9111952496905423543) --> + <skip /> + <!-- no translation found for accessibility_bluetooth_device_settings_pair_new_device (2435184865793496966) --> + <skip /> <string name="accessibility_battery_unknown" msgid="1807789554617976440">"Pourcentage de la batterie inconnu."</string> <string name="accessibility_bluetooth_name" msgid="7300973230214067678">"Connecté à : <xliff:g id="BLUETOOTH">%s</xliff:g>"</string> <string name="accessibility_cast_name" msgid="7344437925388773685">"Connecté à <xliff:g id="CAST">%s</xliff:g>."</string> @@ -255,6 +259,10 @@ <string name="turn_on_bluetooth" msgid="5681370462180289071">"Utiliser le Bluetooth"</string> <string name="quick_settings_bluetooth_device_connected" msgid="7884777006729260996">"Connecté"</string> <string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Enregistré"</string> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_disconnect (415980329093277342) --> + <skip /> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_activate (3724301751036877403) --> + <skip /> <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="4182034939479344093">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g> de batterie"</string> <string name="quick_settings_bluetooth_secondary_label_audio" msgid="780333390310051161">"Audio"</string> <string name="quick_settings_bluetooth_secondary_label_headset" msgid="2332093067553000852">"Casque"</string> @@ -397,10 +405,8 @@ <string name="keyguard_indication_charging_time_slowly" msgid="301936949731705417">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Recharge lente • Temps restant : <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> <string name="keyguard_indication_charging_time_dock" msgid="3149328898931741271">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Recharge • Temps restant : <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> <string name="communal_tutorial_indicator_text" msgid="4503010353591430123">"Balayer vers la gauche pour démarrer le tutoriel collectif"</string> - <!-- no translation found for button_to_open_widget_picker (8007261659745030810) --> - <skip /> - <!-- no translation found for button_to_remove_widget (1511255853677835341) --> - <skip /> + <string name="button_to_open_widget_picker" msgid="8007261659745030810">"Ouvrez le sélecteur de widgets"</string> + <string name="button_to_remove_widget" msgid="1511255853677835341">"Retirez un widget"</string> <string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"Changer d\'utilisateur"</string> <string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"menu déroulant"</string> <string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"Toutes les applications et les données de cette session seront supprimées."</string> @@ -1209,8 +1215,6 @@ <string name="privacy_dialog_recent_app_usage_1" msgid="2551340497722370109">"Récemment utilisé par <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g>)"</string> <string name="privacy_dialog_active_app_usage_2" msgid="2770926061339921767">"En cours d\'utilisation par <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>)"</string> <string name="privacy_dialog_recent_app_usage_2" msgid="2874689735085367167">"Récemment utilisé par <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>)"</string> - <!-- no translation found for keyboard_backlight_dialog_title (8273102932345564724) --> - <skip /> - <!-- no translation found for keyboard_backlight_value (7336398765584393538) --> - <skip /> + <string name="keyboard_backlight_dialog_title" msgid="8273102932345564724">"Rétroéclairage du clavier"</string> + <string name="keyboard_backlight_value" msgid="7336398765584393538">"Niveau %1$d sur %2$d"</string> </resources> diff --git a/packages/SystemUI/res/values-gl/strings.xml b/packages/SystemUI/res/values-gl/strings.xml index 5846c94f6f26..88d0a314789d 100644 --- a/packages/SystemUI/res/values-gl/strings.xml +++ b/packages/SystemUI/res/values-gl/strings.xml @@ -197,6 +197,10 @@ <string name="accessibility_bluetooth_connected" msgid="4745196874551115205">"Bluetooth conectado"</string> <string name="accessibility_bluetooth_device_icon" msgid="9163840051642587982">"Icona do dispositivo Bluetooth"</string> <string name="accessibility_bluetooth_device_settings_gear" msgid="3314916468105272540">"Facer clic para configurar os detalles do dispositivo"</string> + <!-- no translation found for accessibility_bluetooth_device_settings_see_all (9111952496905423543) --> + <skip /> + <!-- no translation found for accessibility_bluetooth_device_settings_pair_new_device (2435184865793496966) --> + <skip /> <string name="accessibility_battery_unknown" msgid="1807789554617976440">"Descoñécese a porcentaxe da batería."</string> <string name="accessibility_bluetooth_name" msgid="7300973230214067678">"Conectado a <xliff:g id="BLUETOOTH">%s</xliff:g>."</string> <string name="accessibility_cast_name" msgid="7344437925388773685">"Dispositivo conectado: <xliff:g id="CAST">%s</xliff:g>."</string> @@ -255,6 +259,10 @@ <string name="turn_on_bluetooth" msgid="5681370462180289071">"Usar Bluetooth"</string> <string name="quick_settings_bluetooth_device_connected" msgid="7884777006729260996">"Estableceuse a conexión"</string> <string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Gardouse"</string> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_disconnect (415980329093277342) --> + <skip /> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_activate (3724301751036877403) --> + <skip /> <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="4182034939479344093">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g> de batería"</string> <string name="quick_settings_bluetooth_secondary_label_audio" msgid="780333390310051161">"Audio"</string> <string name="quick_settings_bluetooth_secondary_label_headset" msgid="2332093067553000852">"Auriculares"</string> @@ -396,8 +404,7 @@ <string name="keyguard_indication_charging_time_fast" msgid="8390311020603859480">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Cargando rapidamente • A carga completarase en <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> <string name="keyguard_indication_charging_time_slowly" msgid="301936949731705417">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Cargando lentamente • A carga completarase en <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> <string name="keyguard_indication_charging_time_dock" msgid="3149328898931741271">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Cargando • A carga completarase en <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> - <!-- no translation found for communal_tutorial_indicator_text (4503010353591430123) --> - <skip /> + <string name="communal_tutorial_indicator_text" msgid="4503010353591430123">"Pasa o dedo cara á esquerda para iniciar o titorial comunitario"</string> <!-- no translation found for button_to_open_widget_picker (8007261659745030810) --> <skip /> <!-- no translation found for button_to_remove_widget (1511255853677835341) --> diff --git a/packages/SystemUI/res/values-gu/strings.xml b/packages/SystemUI/res/values-gu/strings.xml index 71177029ac4c..92638a22fc79 100644 --- a/packages/SystemUI/res/values-gu/strings.xml +++ b/packages/SystemUI/res/values-gu/strings.xml @@ -197,6 +197,10 @@ <string name="accessibility_bluetooth_connected" msgid="4745196874551115205">"બ્લૂટૂથ કનેક્ટ થયું."</string> <string name="accessibility_bluetooth_device_icon" msgid="9163840051642587982">"બ્લૂટૂથ ડિવાઇસનું આઇકન"</string> <string name="accessibility_bluetooth_device_settings_gear" msgid="3314916468105272540">"ડિવાઇસની વિગત ગોઠવવા માટે ક્લિક કરો"</string> + <!-- no translation found for accessibility_bluetooth_device_settings_see_all (9111952496905423543) --> + <skip /> + <!-- no translation found for accessibility_bluetooth_device_settings_pair_new_device (2435184865793496966) --> + <skip /> <string name="accessibility_battery_unknown" msgid="1807789554617976440">"બૅટરીની ટકાવારી અજાણ છે."</string> <string name="accessibility_bluetooth_name" msgid="7300973230214067678">"<xliff:g id="BLUETOOTH">%s</xliff:g> થી કનેક્ટ થયાં."</string> <string name="accessibility_cast_name" msgid="7344437925388773685">"<xliff:g id="CAST">%s</xliff:g> થી કનેક્ટ કરેલ."</string> @@ -255,6 +259,10 @@ <string name="turn_on_bluetooth" msgid="5681370462180289071">"બ્લૂટૂથનો ઉપયોગ કરો"</string> <string name="quick_settings_bluetooth_device_connected" msgid="7884777006729260996">"કનેક્ટેડ છે"</string> <string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"સાચવેલું"</string> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_disconnect (415980329093277342) --> + <skip /> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_activate (3724301751036877403) --> + <skip /> <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="4182034939479344093">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g> બૅટરી"</string> <string name="quick_settings_bluetooth_secondary_label_audio" msgid="780333390310051161">"ઑડિયો"</string> <string name="quick_settings_bluetooth_secondary_label_headset" msgid="2332093067553000852">"હૅડસેટ"</string> @@ -397,10 +405,8 @@ <string name="keyguard_indication_charging_time_slowly" msgid="301936949731705417">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • ધીમેથી ચાર્જ થઈ રહ્યું છે • <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>માં ચાર્જ થઈ જશે"</string> <string name="keyguard_indication_charging_time_dock" msgid="3149328898931741271">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • ચાર્જ થઈ રહ્યું છે • <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>માં પૂરું ચાર્જ થઈ જશે"</string> <string name="communal_tutorial_indicator_text" msgid="4503010353591430123">"કૉમ્યુનલ ટ્યૂટૉરિઅલ શરૂ કરવા માટે ડાબે સ્વાઇપ કરો"</string> - <!-- no translation found for button_to_open_widget_picker (8007261659745030810) --> - <skip /> - <!-- no translation found for button_to_remove_widget (1511255853677835341) --> - <skip /> + <string name="button_to_open_widget_picker" msgid="8007261659745030810">"વિજેટ પિકર ખોલો"</string> + <string name="button_to_remove_widget" msgid="1511255853677835341">"કોઈ વિજેટ કાઢી નાખો"</string> <string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"વપરાશકર્તા સ્વિચ કરો"</string> <string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"પુલડાઉન મેનૂ"</string> <string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"આ સત્રમાંની તમામ ઍપ અને ડેટા કાઢી નાખવામાં આવશે."</string> @@ -723,7 +729,7 @@ <string name="switch_bar_off" msgid="5669805115416379556">"બંધ"</string> <string name="tile_unavailable" msgid="3095879009136616920">"ઉપલબ્ધ નથી"</string> <string name="accessibility_tile_disabled_by_policy_action_description" msgid="6958422730461646926">"વધુ જાણો"</string> - <string name="nav_bar" msgid="4642708685386136807">"નેવિગેશન બાર"</string> + <string name="nav_bar" msgid="4642708685386136807">"નૅવિગેશન બાર"</string> <string name="nav_bar_layout" msgid="4716392484772899544">"લેઆઉટ"</string> <string name="left_nav_bar_button_type" msgid="2634852842345192790">"અતિરિક્ત ડાબો બટન પ્રકાર"</string> <string name="right_nav_bar_button_type" msgid="4472566498647364715">"અતિરિક્ત જમણો બટન પ્રકાર"</string> @@ -742,7 +748,7 @@ <string name="save" msgid="3392754183673848006">"સાચવો"</string> <string name="reset" msgid="8715144064608810383">"રીસેટ કરો"</string> <string name="clipboard" msgid="8517342737534284617">"ક્લિપબોર્ડ"</string> - <string name="accessibility_key" msgid="3471162841552818281">"કસ્ટમ નેવિગેશન બટન"</string> + <string name="accessibility_key" msgid="3471162841552818281">"કસ્ટમ નૅવિગેશન બટન"</string> <string name="left_keycode" msgid="8211040899126637342">"ડાબો કીકોડ"</string> <string name="right_keycode" msgid="2480715509844798438">"જમણો કીકોડ"</string> <string name="left_icon" msgid="5036278531966897006">"ડાબું આઇકન"</string> @@ -1209,8 +1215,6 @@ <string name="privacy_dialog_recent_app_usage_1" msgid="2551340497722370109">"<xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g>) દ્વારા તાજેતરમાં ઉપયોગ કરવામાં આવ્યો"</string> <string name="privacy_dialog_active_app_usage_2" msgid="2770926061339921767">"<xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>) દ્વારા ઉપયોગ ચાલુ છે"</string> <string name="privacy_dialog_recent_app_usage_2" msgid="2874689735085367167">"<xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>) દ્વારા તાજેતરમાં ઉપયોગ કરવામાં આવ્યો"</string> - <!-- no translation found for keyboard_backlight_dialog_title (8273102932345564724) --> - <skip /> - <!-- no translation found for keyboard_backlight_value (7336398765584393538) --> - <skip /> + <string name="keyboard_backlight_dialog_title" msgid="8273102932345564724">"કીબોર્ડની બૅકલાઇટ"</string> + <string name="keyboard_backlight_value" msgid="7336398765584393538">"%2$dમાંથી %1$d લેવલ"</string> </resources> diff --git a/packages/SystemUI/res/values-hi/strings.xml b/packages/SystemUI/res/values-hi/strings.xml index fa44aed32672..213457fef803 100644 --- a/packages/SystemUI/res/values-hi/strings.xml +++ b/packages/SystemUI/res/values-hi/strings.xml @@ -197,6 +197,10 @@ <string name="accessibility_bluetooth_connected" msgid="4745196874551115205">"ब्लूटूथ कनेक्ट किया गया."</string> <string name="accessibility_bluetooth_device_icon" msgid="9163840051642587982">"ब्लूटूथ डिवाइस का आइकॉन"</string> <string name="accessibility_bluetooth_device_settings_gear" msgid="3314916468105272540">"डिवाइस की जानकारी कॉन्फ़िगर करने के लिए क्लिक करें"</string> + <!-- no translation found for accessibility_bluetooth_device_settings_see_all (9111952496905423543) --> + <skip /> + <!-- no translation found for accessibility_bluetooth_device_settings_pair_new_device (2435184865793496966) --> + <skip /> <string name="accessibility_battery_unknown" msgid="1807789554617976440">"इस बारे में जानकारी नहीं है कि अभी बैटरी कितने प्रतिशत चार्ज है."</string> <string name="accessibility_bluetooth_name" msgid="7300973230214067678">"<xliff:g id="BLUETOOTH">%s</xliff:g> से कनेक्ट किया गया."</string> <string name="accessibility_cast_name" msgid="7344437925388773685">"<xliff:g id="CAST">%s</xliff:g> से कनेक्ट है."</string> @@ -255,6 +259,10 @@ <string name="turn_on_bluetooth" msgid="5681370462180289071">"ब्लूटूथ इस्तेमाल करें"</string> <string name="quick_settings_bluetooth_device_connected" msgid="7884777006729260996">"कनेक्ट है"</string> <string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"सेव किया गया"</string> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_disconnect (415980329093277342) --> + <skip /> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_activate (3724301751036877403) --> + <skip /> <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="4182034939479344093">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g> बैटरी"</string> <string name="quick_settings_bluetooth_secondary_label_audio" msgid="780333390310051161">"ऑडियो"</string> <string name="quick_settings_bluetooth_secondary_label_headset" msgid="2332093067553000852">"हेडसेट"</string> @@ -396,12 +404,9 @@ <string name="keyguard_indication_charging_time_fast" msgid="8390311020603859480">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • तेज़ चार्ज हो रहा है • <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g> में पूरा चार्ज हो जाएगा"</string> <string name="keyguard_indication_charging_time_slowly" msgid="301936949731705417">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • धीरे चार्ज हो रहा है • <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g> में पूरा चार्ज हो जाएगा"</string> <string name="keyguard_indication_charging_time_dock" msgid="3149328898931741271">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • चार्ज हो रहा है • <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g> में पूरा चार्ज हो जाएगा"</string> - <!-- no translation found for communal_tutorial_indicator_text (4503010353591430123) --> - <skip /> - <!-- no translation found for button_to_open_widget_picker (8007261659745030810) --> - <skip /> - <!-- no translation found for button_to_remove_widget (1511255853677835341) --> - <skip /> + <string name="communal_tutorial_indicator_text" msgid="4503010353591430123">"कम्यूनिटी ट्यूटोरियल शुरू करने के लिए, बाईं ओर स्वाइप करें"</string> + <string name="button_to_open_widget_picker" msgid="8007261659745030810">"विजेट पिकर को खोलें"</string> + <string name="button_to_remove_widget" msgid="1511255853677835341">"विजेट को हटाएं"</string> <string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"उपयोगकर्ता बदलें"</string> <string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"पुलडाउन मेन्यू"</string> <string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"इस सेशन के सभी ऐप्लिकेशन और डेटा को हटा दिया जाएगा."</string> @@ -1210,8 +1215,6 @@ <string name="privacy_dialog_recent_app_usage_1" msgid="2551340497722370109">"हाल ही में, <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g>) ने इस्तेमाल किया"</string> <string name="privacy_dialog_active_app_usage_2" msgid="2770926061339921767">"<xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>) पर इस्तेमाल किया जा रहा है"</string> <string name="privacy_dialog_recent_app_usage_2" msgid="2874689735085367167">"हाल ही में, <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>) ने इस्तेमाल किया"</string> - <!-- no translation found for keyboard_backlight_dialog_title (8273102932345564724) --> - <skip /> - <!-- no translation found for keyboard_backlight_value (7336398765584393538) --> - <skip /> + <string name="keyboard_backlight_dialog_title" msgid="8273102932345564724">"कीबोर्ड की बैकलाइट"</string> + <string name="keyboard_backlight_value" msgid="7336398765584393538">"%2$d में से %1$d लेवल"</string> </resources> diff --git a/packages/SystemUI/res/values-hr/strings.xml b/packages/SystemUI/res/values-hr/strings.xml index c3a4ec29ec86..cf86c466b645 100644 --- a/packages/SystemUI/res/values-hr/strings.xml +++ b/packages/SystemUI/res/values-hr/strings.xml @@ -197,6 +197,10 @@ <string name="accessibility_bluetooth_connected" msgid="4745196874551115205">"Bluetooth povezan."</string> <string name="accessibility_bluetooth_device_icon" msgid="9163840051642587982">"Ikona Bluetooth uređaja"</string> <string name="accessibility_bluetooth_device_settings_gear" msgid="3314916468105272540">"Kliknite da biste konfigurirali pojedinosti o uređaju"</string> + <!-- no translation found for accessibility_bluetooth_device_settings_see_all (9111952496905423543) --> + <skip /> + <!-- no translation found for accessibility_bluetooth_device_settings_pair_new_device (2435184865793496966) --> + <skip /> <string name="accessibility_battery_unknown" msgid="1807789554617976440">"Postotak baterije nije poznat."</string> <string name="accessibility_bluetooth_name" msgid="7300973230214067678">"Spojen na <xliff:g id="BLUETOOTH">%s</xliff:g> ."</string> <string name="accessibility_cast_name" msgid="7344437925388773685">"Povezani ste sa sljedećim uređajem: <xliff:g id="CAST">%s</xliff:g>."</string> @@ -255,6 +259,10 @@ <string name="turn_on_bluetooth" msgid="5681370462180289071">"Uključi"</string> <string name="quick_settings_bluetooth_device_connected" msgid="7884777006729260996">"Povezano"</string> <string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Spremljeno"</string> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_disconnect (415980329093277342) --> + <skip /> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_activate (3724301751036877403) --> + <skip /> <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="4182034939479344093">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g> baterije"</string> <string name="quick_settings_bluetooth_secondary_label_audio" msgid="780333390310051161">"Audio"</string> <string name="quick_settings_bluetooth_secondary_label_headset" msgid="2332093067553000852">"Slušalice"</string> @@ -396,12 +404,9 @@ <string name="keyguard_indication_charging_time_fast" msgid="8390311020603859480">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • brzo punjenje • <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g> do napunjenosti"</string> <string name="keyguard_indication_charging_time_slowly" msgid="301936949731705417">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • sporo punjenje • <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g> do napunjenosti"</string> <string name="keyguard_indication_charging_time_dock" msgid="3149328898931741271">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • punjenje • <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g> do napunjenosti"</string> - <!-- no translation found for communal_tutorial_indicator_text (4503010353591430123) --> - <skip /> - <!-- no translation found for button_to_open_widget_picker (8007261659745030810) --> - <skip /> - <!-- no translation found for button_to_remove_widget (1511255853677835341) --> - <skip /> + <string name="communal_tutorial_indicator_text" msgid="4503010353591430123">"Prijeđite prstom ulijevo da biste pokrenuli zajednički vodič"</string> + <string name="button_to_open_widget_picker" msgid="8007261659745030810">"Otvaranje alata za odabir widgeta"</string> + <string name="button_to_remove_widget" msgid="1511255853677835341">"Uklanjanje widgeta"</string> <string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"Promjena korisnika"</string> <string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"padajući izbornik"</string> <string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"Izbrisat će se sve aplikacije i podaci u ovoj sesiji."</string> @@ -1210,8 +1215,6 @@ <string name="privacy_dialog_recent_app_usage_1" msgid="2551340497722370109">"Nedavno koristila aplikacija <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g>)"</string> <string name="privacy_dialog_active_app_usage_2" msgid="2770926061339921767">"Koristi: <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>)"</string> <string name="privacy_dialog_recent_app_usage_2" msgid="2874689735085367167">"Nedavno koristila aplikacija <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>)"</string> - <!-- no translation found for keyboard_backlight_dialog_title (8273102932345564724) --> - <skip /> - <!-- no translation found for keyboard_backlight_value (7336398765584393538) --> - <skip /> + <string name="keyboard_backlight_dialog_title" msgid="8273102932345564724">"Pozadinsko osvjetljenje tipkovnice"</string> + <string name="keyboard_backlight_value" msgid="7336398765584393538">"Razina %1$d od %2$d"</string> </resources> diff --git a/packages/SystemUI/res/values-hu/strings.xml b/packages/SystemUI/res/values-hu/strings.xml index 5552b5134f62..6f1d2c609bb0 100644 --- a/packages/SystemUI/res/values-hu/strings.xml +++ b/packages/SystemUI/res/values-hu/strings.xml @@ -197,6 +197,10 @@ <string name="accessibility_bluetooth_connected" msgid="4745196874551115205">"Bluetooth csatlakoztatva."</string> <string name="accessibility_bluetooth_device_icon" msgid="9163840051642587982">"Bluetooth-eszköz ikon"</string> <string name="accessibility_bluetooth_device_settings_gear" msgid="3314916468105272540">"Kattintson az eszköz beállításainak megadásához"</string> + <!-- no translation found for accessibility_bluetooth_device_settings_see_all (9111952496905423543) --> + <skip /> + <!-- no translation found for accessibility_bluetooth_device_settings_pair_new_device (2435184865793496966) --> + <skip /> <string name="accessibility_battery_unknown" msgid="1807789554617976440">"Az akkumulátor töltöttségi szintje ismeretlen."</string> <string name="accessibility_bluetooth_name" msgid="7300973230214067678">"Csatlakoztatva a következőhöz: <xliff:g id="BLUETOOTH">%s</xliff:g>."</string> <string name="accessibility_cast_name" msgid="7344437925388773685">"Csatlakozva a következőhöz: <xliff:g id="CAST">%s</xliff:g>."</string> @@ -255,6 +259,10 @@ <string name="turn_on_bluetooth" msgid="5681370462180289071">"Bluetooth használata"</string> <string name="quick_settings_bluetooth_device_connected" msgid="7884777006729260996">"Csatlakozva"</string> <string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Mentve"</string> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_disconnect (415980329093277342) --> + <skip /> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_activate (3724301751036877403) --> + <skip /> <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="4182034939479344093">"Akkumulátor: <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g>"</string> <string name="quick_settings_bluetooth_secondary_label_audio" msgid="780333390310051161">"Hang"</string> <string name="quick_settings_bluetooth_secondary_label_headset" msgid="2332093067553000852">"Headset"</string> @@ -396,12 +404,9 @@ <string name="keyguard_indication_charging_time_fast" msgid="8390311020603859480">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Gyors töltés • A teljes töltöttségig: <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> <string name="keyguard_indication_charging_time_slowly" msgid="301936949731705417">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Lassú töltés • A teljes töltöttségig: <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> <string name="keyguard_indication_charging_time_dock" msgid="3149328898931741271">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Töltés • A teljes töltöttségig: <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> - <!-- no translation found for communal_tutorial_indicator_text (4503010353591430123) --> - <skip /> - <!-- no translation found for button_to_open_widget_picker (8007261659745030810) --> - <skip /> - <!-- no translation found for button_to_remove_widget (1511255853677835341) --> - <skip /> + <string name="communal_tutorial_indicator_text" msgid="4503010353591430123">"Csúsztasson gyorsan balra a közösségi útmutató elindításához"</string> + <string name="button_to_open_widget_picker" msgid="8007261659745030810">"A modulválasztó megnyitása"</string> + <string name="button_to_remove_widget" msgid="1511255853677835341">"A modul eltávolítása"</string> <string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"Felhasználóváltás"</string> <string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"lehúzható menü"</string> <string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"A munkamenetben található összes alkalmazás és adat törlődni fog."</string> @@ -1210,8 +1215,6 @@ <string name="privacy_dialog_recent_app_usage_1" msgid="2551340497722370109">"Legutóbb használta: <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g>)"</string> <string name="privacy_dialog_active_app_usage_2" msgid="2770926061339921767">"Használatban a következő által: <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>)"</string> <string name="privacy_dialog_recent_app_usage_2" msgid="2874689735085367167">"Legutóbb használta: <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>)"</string> - <!-- no translation found for keyboard_backlight_dialog_title (8273102932345564724) --> - <skip /> - <!-- no translation found for keyboard_backlight_value (7336398765584393538) --> - <skip /> + <string name="keyboard_backlight_dialog_title" msgid="8273102932345564724">"A billentyűzet háttérvilágítása"</string> + <string name="keyboard_backlight_value" msgid="7336398765584393538">"Fényerő: %2$d/%1$d"</string> </resources> diff --git a/packages/SystemUI/res/values-hy/strings.xml b/packages/SystemUI/res/values-hy/strings.xml index 714d50027293..8ceeb4b187bb 100644 --- a/packages/SystemUI/res/values-hy/strings.xml +++ b/packages/SystemUI/res/values-hy/strings.xml @@ -197,6 +197,10 @@ <string name="accessibility_bluetooth_connected" msgid="4745196874551115205">"Bluetooth-ը միացված է:"</string> <string name="accessibility_bluetooth_device_icon" msgid="9163840051642587982">"Bluetooth սարքի պատկերակ"</string> <string name="accessibility_bluetooth_device_settings_gear" msgid="3314916468105272540">"Սեղմեք՝ սարքի մանրամասները կազմաձևելու համար"</string> + <!-- no translation found for accessibility_bluetooth_device_settings_see_all (9111952496905423543) --> + <skip /> + <!-- no translation found for accessibility_bluetooth_device_settings_pair_new_device (2435184865793496966) --> + <skip /> <string name="accessibility_battery_unknown" msgid="1807789554617976440">"Մարտկոցի լիցքի մակարդակն անհայտ է։"</string> <string name="accessibility_bluetooth_name" msgid="7300973230214067678">"Միացված է <xliff:g id="BLUETOOTH">%s</xliff:g>-ին:"</string> <string name="accessibility_cast_name" msgid="7344437925388773685">"Միացված է <xliff:g id="CAST">%s</xliff:g>-ին:"</string> @@ -255,6 +259,10 @@ <string name="turn_on_bluetooth" msgid="5681370462180289071">"Միացնել Bluetooth-ը"</string> <string name="quick_settings_bluetooth_device_connected" msgid="7884777006729260996">"Միացված է"</string> <string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Պահված է"</string> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_disconnect (415980329093277342) --> + <skip /> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_activate (3724301751036877403) --> + <skip /> <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="4182034939479344093">"Մարտկոցի լիցքը՝ <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g>"</string> <string name="quick_settings_bluetooth_secondary_label_audio" msgid="780333390310051161">"Աուդիո"</string> <string name="quick_settings_bluetooth_secondary_label_headset" msgid="2332093067553000852">"Ականջակալ"</string> @@ -396,8 +404,7 @@ <string name="keyguard_indication_charging_time_fast" msgid="8390311020603859480">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Արագ լիցքավորում • Մնացել է <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> <string name="keyguard_indication_charging_time_slowly" msgid="301936949731705417">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Դանդաղ լիցքավորում • Մնացել է <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> <string name="keyguard_indication_charging_time_dock" msgid="3149328898931741271">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Լիցքավորում • Մնացել է <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> - <!-- no translation found for communal_tutorial_indicator_text (4503010353591430123) --> - <skip /> + <string name="communal_tutorial_indicator_text" msgid="4503010353591430123">"Թերթեք ձախ՝ ուղեցույցը գործարկելու համար"</string> <!-- no translation found for button_to_open_widget_picker (8007261659745030810) --> <skip /> <!-- no translation found for button_to_remove_widget (1511255853677835341) --> diff --git a/packages/SystemUI/res/values-in/strings.xml b/packages/SystemUI/res/values-in/strings.xml index 1ff866e203bf..285bb3935b33 100644 --- a/packages/SystemUI/res/values-in/strings.xml +++ b/packages/SystemUI/res/values-in/strings.xml @@ -197,6 +197,10 @@ <string name="accessibility_bluetooth_connected" msgid="4745196874551115205">"Bluetooth terhubung."</string> <string name="accessibility_bluetooth_device_icon" msgid="9163840051642587982">"Ikon perangkat Bluetooth"</string> <string name="accessibility_bluetooth_device_settings_gear" msgid="3314916468105272540">"Klik untuk mengonfigurasi detail perangkat"</string> + <!-- no translation found for accessibility_bluetooth_device_settings_see_all (9111952496905423543) --> + <skip /> + <!-- no translation found for accessibility_bluetooth_device_settings_pair_new_device (2435184865793496966) --> + <skip /> <string name="accessibility_battery_unknown" msgid="1807789554617976440">"Persentase baterai tidak diketahui."</string> <string name="accessibility_bluetooth_name" msgid="7300973230214067678">"Terhubung ke <xliff:g id="BLUETOOTH">%s</xliff:g>."</string> <string name="accessibility_cast_name" msgid="7344437925388773685">"Terhubung ke <xliff:g id="CAST">%s</xliff:g>."</string> @@ -255,6 +259,10 @@ <string name="turn_on_bluetooth" msgid="5681370462180289071">"Gunakan Bluetooth"</string> <string name="quick_settings_bluetooth_device_connected" msgid="7884777006729260996">"Terhubung"</string> <string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Disimpan"</string> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_disconnect (415980329093277342) --> + <skip /> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_activate (3724301751036877403) --> + <skip /> <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="4182034939479344093">"Baterai <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g>"</string> <string name="quick_settings_bluetooth_secondary_label_audio" msgid="780333390310051161">"Audio"</string> <string name="quick_settings_bluetooth_secondary_label_headset" msgid="2332093067553000852">"Headset"</string> @@ -396,8 +404,7 @@ <string name="keyguard_indication_charging_time_fast" msgid="8390311020603859480">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Mengisi daya dengan cepat • Penuh dalam waktu <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> <string name="keyguard_indication_charging_time_slowly" msgid="301936949731705417">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Mengisi daya dengan lambat • Penuh dalam waktu <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> <string name="keyguard_indication_charging_time_dock" msgid="3149328898931741271">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Mengisi daya • Penuh dalam waktu <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> - <!-- no translation found for communal_tutorial_indicator_text (4503010353591430123) --> - <skip /> + <string name="communal_tutorial_indicator_text" msgid="4503010353591430123">"Geser ke kiri untuk memulai tutorial komunal"</string> <!-- no translation found for button_to_open_widget_picker (8007261659745030810) --> <skip /> <!-- no translation found for button_to_remove_widget (1511255853677835341) --> diff --git a/packages/SystemUI/res/values-is/strings.xml b/packages/SystemUI/res/values-is/strings.xml index 82e470f2455c..2cf9237766ac 100644 --- a/packages/SystemUI/res/values-is/strings.xml +++ b/packages/SystemUI/res/values-is/strings.xml @@ -197,6 +197,10 @@ <string name="accessibility_bluetooth_connected" msgid="4745196874551115205">"Bluetooth tengt."</string> <string name="accessibility_bluetooth_device_icon" msgid="9163840051642587982">"Tákn Bluetooth-tækis"</string> <string name="accessibility_bluetooth_device_settings_gear" msgid="3314916468105272540">"Smelltu til að stilla tækjaupplýsingar"</string> + <!-- no translation found for accessibility_bluetooth_device_settings_see_all (9111952496905423543) --> + <skip /> + <!-- no translation found for accessibility_bluetooth_device_settings_pair_new_device (2435184865793496966) --> + <skip /> <string name="accessibility_battery_unknown" msgid="1807789554617976440">"Staða rafhlöðu óþekkt."</string> <string name="accessibility_bluetooth_name" msgid="7300973230214067678">"Tengt við <xliff:g id="BLUETOOTH">%s</xliff:g>."</string> <string name="accessibility_cast_name" msgid="7344437925388773685">"Tengt við <xliff:g id="CAST">%s</xliff:g>."</string> @@ -255,6 +259,10 @@ <string name="turn_on_bluetooth" msgid="5681370462180289071">"Nota Bluetooth"</string> <string name="quick_settings_bluetooth_device_connected" msgid="7884777006729260996">"Tengt"</string> <string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Vistað"</string> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_disconnect (415980329093277342) --> + <skip /> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_activate (3724301751036877403) --> + <skip /> <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="4182034939479344093">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g> rafhlöðuhleðsla"</string> <string name="quick_settings_bluetooth_secondary_label_audio" msgid="780333390310051161">"Hljóð"</string> <string name="quick_settings_bluetooth_secondary_label_headset" msgid="2332093067553000852">"Höfuðtól"</string> @@ -396,8 +404,7 @@ <string name="keyguard_indication_charging_time_fast" msgid="8390311020603859480">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Hraðhleðsla • Full hleðsla eftir <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> <string name="keyguard_indication_charging_time_slowly" msgid="301936949731705417">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Hæg hleðsla • Full hleðsla eftir <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> <string name="keyguard_indication_charging_time_dock" msgid="3149328898931741271">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Í hleðslu • Full hleðsla eftir <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> - <!-- no translation found for communal_tutorial_indicator_text (4503010353591430123) --> - <skip /> + <string name="communal_tutorial_indicator_text" msgid="4503010353591430123">"Strjúktu til vinstri til að hefja samfélagsleiðsögnina"</string> <!-- no translation found for button_to_open_widget_picker (8007261659745030810) --> <skip /> <!-- no translation found for button_to_remove_widget (1511255853677835341) --> diff --git a/packages/SystemUI/res/values-it/strings.xml b/packages/SystemUI/res/values-it/strings.xml index 50fc1ee3ebe0..4912a53f8c6d 100644 --- a/packages/SystemUI/res/values-it/strings.xml +++ b/packages/SystemUI/res/values-it/strings.xml @@ -197,6 +197,10 @@ <string name="accessibility_bluetooth_connected" msgid="4745196874551115205">"Bluetooth collegato."</string> <string name="accessibility_bluetooth_device_icon" msgid="9163840051642587982">"Icona del dispositivo Bluetooth"</string> <string name="accessibility_bluetooth_device_settings_gear" msgid="3314916468105272540">"Fai clic per configurare i dettagli del dispositivo"</string> + <!-- no translation found for accessibility_bluetooth_device_settings_see_all (9111952496905423543) --> + <skip /> + <!-- no translation found for accessibility_bluetooth_device_settings_pair_new_device (2435184865793496966) --> + <skip /> <string name="accessibility_battery_unknown" msgid="1807789554617976440">"Percentuale della batteria sconosciuta."</string> <string name="accessibility_bluetooth_name" msgid="7300973230214067678">"Connesso a <xliff:g id="BLUETOOTH">%s</xliff:g>."</string> <string name="accessibility_cast_name" msgid="7344437925388773685">"Connesso a: <xliff:g id="CAST">%s</xliff:g>."</string> @@ -255,6 +259,10 @@ <string name="turn_on_bluetooth" msgid="5681370462180289071">"Usa Bluetooth"</string> <string name="quick_settings_bluetooth_device_connected" msgid="7884777006729260996">"Dispositivo connesso"</string> <string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Dispositivo salvato"</string> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_disconnect (415980329093277342) --> + <skip /> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_activate (3724301751036877403) --> + <skip /> <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="4182034939479344093">"Batteria: <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g>"</string> <string name="quick_settings_bluetooth_secondary_label_audio" msgid="780333390310051161">"Audio"</string> <string name="quick_settings_bluetooth_secondary_label_headset" msgid="2332093067553000852">"Auricolare"</string> @@ -396,8 +404,7 @@ <string name="keyguard_indication_charging_time_fast" msgid="8390311020603859480">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Ricarica veloce • <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g> alla ricarica completa"</string> <string name="keyguard_indication_charging_time_slowly" msgid="301936949731705417">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Ricarica lenta • <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g> alla ricarica completa"</string> <string name="keyguard_indication_charging_time_dock" msgid="3149328898931741271">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • In carica • <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g> alla ricarica completa"</string> - <!-- no translation found for communal_tutorial_indicator_text (4503010353591430123) --> - <skip /> + <string name="communal_tutorial_indicator_text" msgid="4503010353591430123">"Scorri a sinistra per iniziare il tutorial della community"</string> <!-- no translation found for button_to_open_widget_picker (8007261659745030810) --> <skip /> <!-- no translation found for button_to_remove_widget (1511255853677835341) --> diff --git a/packages/SystemUI/res/values-iw/strings.xml b/packages/SystemUI/res/values-iw/strings.xml index 718cfb4bdf3a..eef614225afe 100644 --- a/packages/SystemUI/res/values-iw/strings.xml +++ b/packages/SystemUI/res/values-iw/strings.xml @@ -197,6 +197,10 @@ <string name="accessibility_bluetooth_connected" msgid="4745196874551115205">"Bluetooth מחובר."</string> <string name="accessibility_bluetooth_device_icon" msgid="9163840051642587982">"סמל של מכשיר Bluetooth"</string> <string name="accessibility_bluetooth_device_settings_gear" msgid="3314916468105272540">"יש ללחוץ כדי להגדיר את פרטי המכשיר"</string> + <!-- no translation found for accessibility_bluetooth_device_settings_see_all (9111952496905423543) --> + <skip /> + <!-- no translation found for accessibility_bluetooth_device_settings_pair_new_device (2435184865793496966) --> + <skip /> <string name="accessibility_battery_unknown" msgid="1807789554617976440">"אחוז טעינת הסוללה לא ידוע."</string> <string name="accessibility_bluetooth_name" msgid="7300973230214067678">"התבצע חיבור אל <xliff:g id="BLUETOOTH">%s</xliff:g>."</string> <string name="accessibility_cast_name" msgid="7344437925388773685">"מחובר אל <xliff:g id="CAST">%s</xliff:g>."</string> @@ -255,6 +259,10 @@ <string name="turn_on_bluetooth" msgid="5681370462180289071">"Bluetooth"</string> <string name="quick_settings_bluetooth_device_connected" msgid="7884777006729260996">"מחובר"</string> <string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"נשמר"</string> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_disconnect (415980329093277342) --> + <skip /> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_activate (3724301751036877403) --> + <skip /> <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="4182034939479344093">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g> סוללה"</string> <string name="quick_settings_bluetooth_secondary_label_audio" msgid="780333390310051161">"אודיו"</string> <string name="quick_settings_bluetooth_secondary_label_headset" msgid="2332093067553000852">"אוזניות"</string> @@ -396,8 +404,7 @@ <string name="keyguard_indication_charging_time_fast" msgid="8390311020603859480">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • בטעינה מהירה • <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g> עד לסיום"</string> <string name="keyguard_indication_charging_time_slowly" msgid="301936949731705417">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • בטעינה איטית • <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g> עד לסיום"</string> <string name="keyguard_indication_charging_time_dock" msgid="3149328898931741271">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • בטעינה • <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g> עד לסיום"</string> - <!-- no translation found for communal_tutorial_indicator_text (4503010353591430123) --> - <skip /> + <string name="communal_tutorial_indicator_text" msgid="4503010353591430123">"אפשר להחליק שמאלה כדי להפעיל את המדריך המשותף"</string> <!-- no translation found for button_to_open_widget_picker (8007261659745030810) --> <skip /> <!-- no translation found for button_to_remove_widget (1511255853677835341) --> diff --git a/packages/SystemUI/res/values-ja/strings.xml b/packages/SystemUI/res/values-ja/strings.xml index a699f93a61ee..eaf719a49f36 100644 --- a/packages/SystemUI/res/values-ja/strings.xml +++ b/packages/SystemUI/res/values-ja/strings.xml @@ -197,6 +197,10 @@ <string name="accessibility_bluetooth_connected" msgid="4745196874551115205">"Bluetoothに接続済み。"</string> <string name="accessibility_bluetooth_device_icon" msgid="9163840051642587982">"Bluetooth デバイスのアイコン"</string> <string name="accessibility_bluetooth_device_settings_gear" msgid="3314916468105272540">"クリックしてデバイスの詳細を設定します"</string> + <!-- no translation found for accessibility_bluetooth_device_settings_see_all (9111952496905423543) --> + <skip /> + <!-- no translation found for accessibility_bluetooth_device_settings_pair_new_device (2435184865793496966) --> + <skip /> <string name="accessibility_battery_unknown" msgid="1807789554617976440">"バッテリー残量は不明です。"</string> <string name="accessibility_bluetooth_name" msgid="7300973230214067678">"<xliff:g id="BLUETOOTH">%s</xliff:g>に接続しました。"</string> <string name="accessibility_cast_name" msgid="7344437925388773685">"<xliff:g id="CAST">%s</xliff:g>に接続されています。"</string> @@ -255,6 +259,10 @@ <string name="turn_on_bluetooth" msgid="5681370462180289071">"Bluetooth を使用"</string> <string name="quick_settings_bluetooth_device_connected" msgid="7884777006729260996">"接続しました"</string> <string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"保存しました"</string> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_disconnect (415980329093277342) --> + <skip /> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_activate (3724301751036877403) --> + <skip /> <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="4182034939479344093">"バッテリー <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g>"</string> <string name="quick_settings_bluetooth_secondary_label_audio" msgid="780333390310051161">"オーディオ"</string> <string name="quick_settings_bluetooth_secondary_label_headset" msgid="2332093067553000852">"ヘッドセット"</string> @@ -397,10 +405,8 @@ <string name="keyguard_indication_charging_time_slowly" msgid="301936949731705417">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • 低速充電中 • 完了まで <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> <string name="keyguard_indication_charging_time_dock" msgid="3149328898931741271">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • 充電中 • フル充電まで <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> <string name="communal_tutorial_indicator_text" msgid="4503010353591430123">"左にスワイプすると、コミュニティ チュートリアルが開始します"</string> - <!-- no translation found for button_to_open_widget_picker (8007261659745030810) --> - <skip /> - <!-- no translation found for button_to_remove_widget (1511255853677835341) --> - <skip /> + <string name="button_to_open_widget_picker" msgid="8007261659745030810">"ウィジェット選択ツールを開きます"</string> + <string name="button_to_remove_widget" msgid="1511255853677835341">"ウィジェットを削除します"</string> <string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"ユーザーを切り替える"</string> <string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"プルダウン メニュー"</string> <string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"このセッションでのアプリとデータはすべて削除されます。"</string> @@ -1209,8 +1215,6 @@ <string name="privacy_dialog_recent_app_usage_1" msgid="2551340497722370109">"<xliff:g id="APP_NAME">%1$s</xliff:g> が最近使用(<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g>)"</string> <string name="privacy_dialog_active_app_usage_2" msgid="2770926061339921767">"<xliff:g id="APP_NAME">%1$s</xliff:g> が使用中(<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>)"</string> <string name="privacy_dialog_recent_app_usage_2" msgid="2874689735085367167">"<xliff:g id="APP_NAME">%1$s</xliff:g> が最近使用(<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>)"</string> - <!-- no translation found for keyboard_backlight_dialog_title (8273102932345564724) --> - <skip /> - <!-- no translation found for keyboard_backlight_value (7336398765584393538) --> - <skip /> + <string name="keyboard_backlight_dialog_title" msgid="8273102932345564724">"キーボード バックライト"</string> + <string name="keyboard_backlight_value" msgid="7336398765584393538">"レベル %1$d/%2$d"</string> </resources> diff --git a/packages/SystemUI/res/values-ka/strings.xml b/packages/SystemUI/res/values-ka/strings.xml index cf3a740d0f65..b3295e3220f9 100644 --- a/packages/SystemUI/res/values-ka/strings.xml +++ b/packages/SystemUI/res/values-ka/strings.xml @@ -197,6 +197,10 @@ <string name="accessibility_bluetooth_connected" msgid="4745196874551115205">"Bluetooth დაკავშირებულია."</string> <string name="accessibility_bluetooth_device_icon" msgid="9163840051642587982">"Bluetooth მოწყობილობის ხატულა"</string> <string name="accessibility_bluetooth_device_settings_gear" msgid="3314916468105272540">"დააწკაპუნეთ მოწყობილობის დეტალების კონფიგურირებისთვის"</string> + <!-- no translation found for accessibility_bluetooth_device_settings_see_all (9111952496905423543) --> + <skip /> + <!-- no translation found for accessibility_bluetooth_device_settings_pair_new_device (2435184865793496966) --> + <skip /> <string name="accessibility_battery_unknown" msgid="1807789554617976440">"ბატარეის პროცენტული მაჩვენებელი უცნობია."</string> <string name="accessibility_bluetooth_name" msgid="7300973230214067678">"დაკავშირებულია <xliff:g id="BLUETOOTH">%s</xliff:g>-თან."</string> <string name="accessibility_cast_name" msgid="7344437925388773685">"დაკავშირებულია მოწყობილობასთან: <xliff:g id="CAST">%s</xliff:g>."</string> @@ -255,6 +259,10 @@ <string name="turn_on_bluetooth" msgid="5681370462180289071">"Bluetooth-ის გამოყენება"</string> <string name="quick_settings_bluetooth_device_connected" msgid="7884777006729260996">"დაკავშირებული"</string> <string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"შენახული"</string> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_disconnect (415980329093277342) --> + <skip /> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_activate (3724301751036877403) --> + <skip /> <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="4182034939479344093">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g> ბატარეა"</string> <string name="quick_settings_bluetooth_secondary_label_audio" msgid="780333390310051161">"აუდიო"</string> <string name="quick_settings_bluetooth_secondary_label_headset" msgid="2332093067553000852">"ყურსაცვამი"</string> @@ -396,8 +404,7 @@ <string name="keyguard_indication_charging_time_fast" msgid="8390311020603859480">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • სწრაფად იტენება • სრულ დატენვამდე <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> <string name="keyguard_indication_charging_time_slowly" msgid="301936949731705417">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • ნელა იტენება • სრულ დატენვამდე <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> <string name="keyguard_indication_charging_time_dock" msgid="3149328898931741271">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • იტენება • სრულ დატენვამდე <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> - <!-- no translation found for communal_tutorial_indicator_text (4503010353591430123) --> - <skip /> + <string name="communal_tutorial_indicator_text" msgid="4503010353591430123">"გადაფურცლეთ მარცხნივ, რათა დაიწყოთ საერთო სახელმძღვანელო"</string> <!-- no translation found for button_to_open_widget_picker (8007261659745030810) --> <skip /> <!-- no translation found for button_to_remove_widget (1511255853677835341) --> diff --git a/packages/SystemUI/res/values-kk/strings.xml b/packages/SystemUI/res/values-kk/strings.xml index d8eaba0c3fde..3dc2ebcee7b6 100644 --- a/packages/SystemUI/res/values-kk/strings.xml +++ b/packages/SystemUI/res/values-kk/strings.xml @@ -197,6 +197,10 @@ <string name="accessibility_bluetooth_connected" msgid="4745196874551115205">"Bluetooth қосылған."</string> <string name="accessibility_bluetooth_device_icon" msgid="9163840051642587982">"Bluetooth құрылғысы белгішесі"</string> <string name="accessibility_bluetooth_device_settings_gear" msgid="3314916468105272540">"Құрылғы деректерін конфигурациялау үшін басыңыз."</string> + <!-- no translation found for accessibility_bluetooth_device_settings_see_all (9111952496905423543) --> + <skip /> + <!-- no translation found for accessibility_bluetooth_device_settings_pair_new_device (2435184865793496966) --> + <skip /> <string name="accessibility_battery_unknown" msgid="1807789554617976440">"Батарея зарядының мөлшері белгісіз."</string> <string name="accessibility_bluetooth_name" msgid="7300973230214067678">"<xliff:g id="BLUETOOTH">%s</xliff:g> қосылған."</string> <string name="accessibility_cast_name" msgid="7344437925388773685">"<xliff:g id="CAST">%s</xliff:g> трансляциясына қосылды."</string> @@ -255,6 +259,10 @@ <string name="turn_on_bluetooth" msgid="5681370462180289071">"Bluetooth-ты пайдалану"</string> <string name="quick_settings_bluetooth_device_connected" msgid="7884777006729260996">"Қосылды"</string> <string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Сақталды"</string> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_disconnect (415980329093277342) --> + <skip /> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_activate (3724301751036877403) --> + <skip /> <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="4182034939479344093">"Батарея деңгейі: <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g>"</string> <string name="quick_settings_bluetooth_secondary_label_audio" msgid="780333390310051161">"Aудио"</string> <string name="quick_settings_bluetooth_secondary_label_headset" msgid="2332093067553000852">"Гарнитура"</string> @@ -396,8 +404,7 @@ <string name="keyguard_indication_charging_time_fast" msgid="8390311020603859480">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Жылдам зарядтау • Толуына <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g> қалды."</string> <string name="keyguard_indication_charging_time_slowly" msgid="301936949731705417">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Баяу зарядталуда • Толуына <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g> қалды."</string> <string name="keyguard_indication_charging_time_dock" msgid="3149328898931741271">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Зарядталып жатыр. • Толуына <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g> қалды."</string> - <!-- no translation found for communal_tutorial_indicator_text (4503010353591430123) --> - <skip /> + <string name="communal_tutorial_indicator_text" msgid="4503010353591430123">"Ортақ оқулықты ашу үшін солға қарай сырғытыңыз."</string> <!-- no translation found for button_to_open_widget_picker (8007261659745030810) --> <skip /> <!-- no translation found for button_to_remove_widget (1511255853677835341) --> diff --git a/packages/SystemUI/res/values-km/strings.xml b/packages/SystemUI/res/values-km/strings.xml index 6c936857bc91..6ba41b83d4ed 100644 --- a/packages/SystemUI/res/values-km/strings.xml +++ b/packages/SystemUI/res/values-km/strings.xml @@ -197,6 +197,10 @@ <string name="accessibility_bluetooth_connected" msgid="4745196874551115205">"បានតភ្ជាប់ប៊្លូធូស។"</string> <string name="accessibility_bluetooth_device_icon" msgid="9163840051642587982">"រូបឧបករណ៍ប៊្លូធូស"</string> <string name="accessibility_bluetooth_device_settings_gear" msgid="3314916468105272540">"ចុចដើម្បីកំណត់រចនាសម្ព័ន្ធព័ត៌មានលម្អិតអំពីឧបករណ៍"</string> + <!-- no translation found for accessibility_bluetooth_device_settings_see_all (9111952496905423543) --> + <skip /> + <!-- no translation found for accessibility_bluetooth_device_settings_pair_new_device (2435184865793496966) --> + <skip /> <string name="accessibility_battery_unknown" msgid="1807789554617976440">"មិនដឹងអំពីភាគរយថ្មទេ។"</string> <string name="accessibility_bluetooth_name" msgid="7300973230214067678">"បានភ្ជាប់ទៅ <xliff:g id="BLUETOOTH">%s</xliff:g> ។"</string> <string name="accessibility_cast_name" msgid="7344437925388773685">"បានភ្ជាប់ទៅ <xliff:g id="CAST">%s</xliff:g>"</string> @@ -255,6 +259,10 @@ <string name="turn_on_bluetooth" msgid="5681370462180289071">"ប្រើប៊្លូធូស"</string> <string name="quick_settings_bluetooth_device_connected" msgid="7884777006729260996">"បានភ្ជាប់"</string> <string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"បានរក្សាទុក"</string> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_disconnect (415980329093277342) --> + <skip /> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_activate (3724301751036877403) --> + <skip /> <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="4182034939479344093">"ថ្ម <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g>"</string> <string name="quick_settings_bluetooth_secondary_label_audio" msgid="780333390310051161">"សំឡេង"</string> <string name="quick_settings_bluetooth_secondary_label_headset" msgid="2332093067553000852">"កាស"</string> @@ -397,10 +405,8 @@ <string name="keyguard_indication_charging_time_slowly" msgid="301936949731705417">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • កំពុងសាកថ្មយឺត • ពេញក្នុងរយៈពេល <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> <string name="keyguard_indication_charging_time_dock" msgid="3149328898931741271">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • កំពុងសាកថ្ម • ពេញក្នុងរយៈពេល <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> <string name="communal_tutorial_indicator_text" msgid="4503010353591430123">"អូសទៅឆ្វេង ដើម្បីចាប់ផ្ដើមមេរៀនសហគមន៍"</string> - <!-- no translation found for button_to_open_widget_picker (8007261659745030810) --> - <skip /> - <!-- no translation found for button_to_remove_widget (1511255853677835341) --> - <skip /> + <string name="button_to_open_widget_picker" msgid="8007261659745030810">"បើកផ្ទាំងជ្រើសរើសធាតុក្រាហ្វិក"</string> + <string name="button_to_remove_widget" msgid="1511255853677835341">"ដកធាតុក្រាហ្វិកចេញ"</string> <string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"ប្ដូរអ្នកប្រើ"</string> <string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"ម៉ឺនុយទាញចុះ"</string> <string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"កម្មវិធី និងទិន្នន័យទាំងអស់ក្នុងវគ្គនេះនឹងត្រូវលុប។"</string> @@ -1209,8 +1215,6 @@ <string name="privacy_dialog_recent_app_usage_1" msgid="2551340497722370109">"បានប្រើនាពេលថ្មីៗនេះដោយ <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g>)"</string> <string name="privacy_dialog_active_app_usage_2" msgid="2770926061339921767">"កំពុងប្រើដោយ <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>)"</string> <string name="privacy_dialog_recent_app_usage_2" msgid="2874689735085367167">"បានប្រើនាពេលថ្មីៗនេះដោយ <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>)"</string> - <!-- no translation found for keyboard_backlight_dialog_title (8273102932345564724) --> - <skip /> - <!-- no translation found for keyboard_backlight_value (7336398765584393538) --> - <skip /> + <string name="keyboard_backlight_dialog_title" msgid="8273102932345564724">"ពន្លឺក្រោយក្ដារចុច"</string> + <string name="keyboard_backlight_value" msgid="7336398765584393538">"កម្រិតទី %1$d នៃ %2$d"</string> </resources> diff --git a/packages/SystemUI/res/values-kn/strings.xml b/packages/SystemUI/res/values-kn/strings.xml index ff2d4c5bae86..080ce108e46c 100644 --- a/packages/SystemUI/res/values-kn/strings.xml +++ b/packages/SystemUI/res/values-kn/strings.xml @@ -197,6 +197,10 @@ <string name="accessibility_bluetooth_connected" msgid="4745196874551115205">"ಬ್ಲೂಟೂತ್ ಸಂಪರ್ಕಗೊಂಡಿದೆ."</string> <string name="accessibility_bluetooth_device_icon" msgid="9163840051642587982">"ಬ್ಲೂಟೂತ್ ಸಾಧನ ಐಕಾನ್"</string> <string name="accessibility_bluetooth_device_settings_gear" msgid="3314916468105272540">"ಸಾಧನದ ವಿವರಗಳನ್ನು ಕಾನ್ಫಿಗರ್ ಮಾಡಲು ಕ್ಲಿಕ್ ಮಾಡಿ"</string> + <!-- no translation found for accessibility_bluetooth_device_settings_see_all (9111952496905423543) --> + <skip /> + <!-- no translation found for accessibility_bluetooth_device_settings_pair_new_device (2435184865793496966) --> + <skip /> <string name="accessibility_battery_unknown" msgid="1807789554617976440">"ಬ್ಯಾಟರಿ ಶೇಕಡಾವಾರು ತಿಳಿದಿಲ್ಲ."</string> <string name="accessibility_bluetooth_name" msgid="7300973230214067678">"<xliff:g id="BLUETOOTH">%s</xliff:g> ಗೆ ಸಂಪರ್ಕಪಡಿಸಲಾಗಿದೆ."</string> <string name="accessibility_cast_name" msgid="7344437925388773685">"<xliff:g id="CAST">%s</xliff:g> ಗೆ ಸಂಪರ್ಕಿಸಲಾಗಿದೆ."</string> @@ -255,6 +259,10 @@ <string name="turn_on_bluetooth" msgid="5681370462180289071">"ಬ್ಲೂಟೂತ್ ಬಳಸಿ"</string> <string name="quick_settings_bluetooth_device_connected" msgid="7884777006729260996">"ಕನೆಕ್ಟ್ ಆಗಿದೆ"</string> <string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"ಸೇವ್ ಮಾಡಲಾಗಿದೆ"</string> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_disconnect (415980329093277342) --> + <skip /> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_activate (3724301751036877403) --> + <skip /> <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="4182034939479344093">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g> ಬ್ಯಾಟರಿ"</string> <string name="quick_settings_bluetooth_secondary_label_audio" msgid="780333390310051161">"ಆಡಿಯೋ"</string> <string name="quick_settings_bluetooth_secondary_label_headset" msgid="2332093067553000852">"ಹೆಡ್ಸೆಟ್"</string> @@ -396,12 +404,9 @@ <string name="keyguard_indication_charging_time_fast" msgid="8390311020603859480">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • ವೇಗವಾಗಿ ಚಾರ್ಜ್ ಆಗುತ್ತಿದೆ • <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g> ಸಮಯದಲ್ಲಿ ಪೂರ್ಣಗೊಳ್ಳುತ್ತದೆ"</string> <string name="keyguard_indication_charging_time_slowly" msgid="301936949731705417">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • ನಿಧಾನವಾಗಿ ಚಾರ್ಜ್ ಆಗುತ್ತಿದೆ • <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g> ಸಮಯದಲ್ಲಿ ಪೂರ್ಣಗೊಳ್ಳುತ್ತದೆ"</string> <string name="keyguard_indication_charging_time_dock" msgid="3149328898931741271">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • ಚಾರ್ಜ್ ಆಗುತ್ತಿದೆ • <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g> ದಲ್ಲಿ ಪೂರ್ಣಗೊಳ್ಳುತ್ತದೆ"</string> - <!-- no translation found for communal_tutorial_indicator_text (4503010353591430123) --> - <skip /> - <!-- no translation found for button_to_open_widget_picker (8007261659745030810) --> - <skip /> - <!-- no translation found for button_to_remove_widget (1511255853677835341) --> - <skip /> + <string name="communal_tutorial_indicator_text" msgid="4503010353591430123">"ಸಮುದಾಯದ ಟ್ಯುಟೋರಿಯಲ್ ಅನ್ನು ಪ್ರಾರಂಭಿಸಲು ಎಡಕ್ಕೆ ಸ್ವೈಪ್ ಮಾಡಿ"</string> + <string name="button_to_open_widget_picker" msgid="8007261659745030810">"ವಿಜೆಟ್ ಪಿಕರ್ ತೆರೆಯಿರಿ"</string> + <string name="button_to_remove_widget" msgid="1511255853677835341">"ವಿಜೆಟ್ ತೆಗೆದುಹಾಕಿ"</string> <string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"ಬಳಕೆದಾರರನ್ನು ಬದಲಿಸಿ"</string> <string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"ಪುಲ್ಡೌನ್ ಮೆನು"</string> <string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"ಈ ಸೆಷನ್ನಲ್ಲಿನ ಎಲ್ಲ ಅಪ್ಲಿಕೇಶನ್ಗಳು ಮತ್ತು ಡೇಟಾವನ್ನು ಅಳಿಸಲಾಗುತ್ತದೆ."</string> @@ -509,7 +514,7 @@ <string name="sound_settings" msgid="8874581353127418308">"ಧ್ವನಿ & ವೈಬ್ರೇಷನ್"</string> <string name="volume_panel_dialog_settings_button" msgid="2513228491513390310">"ಸೆಟ್ಟಿಂಗ್ಗಳು"</string> <string name="csd_lowered_title" product="default" msgid="2464112924151691129">"ವಾಲ್ಯೂಮ್ ಅನ್ನು ಸುರಕ್ಷಿತ ಮಟ್ಟಕ್ಕೆ ತಗ್ಗಿಸಲಾಗಿದೆ"</string> - <string name="csd_system_lowered_text" product="default" msgid="1250251883692996888">"ಹೆಡ್ಫೋನ್ನ ವಾಲ್ಯೂಮ್ ಶಿಫಾರಸು ಮಾಡಿದ್ದಕ್ಕಿಂತಲೂ ಹೆಚ್ಚಿನ ಸಮಯದವರೆಗೆ ಅಧಿಕವಾಗಿದೆ"</string> + <string name="csd_system_lowered_text" product="default" msgid="1250251883692996888">"ಶಿಫಾರಸು ಮಾಡಿದ್ದಕ್ಕಿಂತಲೂ ದೀರ್ಘಕಾಲ ಹೆಡ್ಫೋನ್ನ ವಾಲ್ಯೂಮ್ ಹೆಚ್ಚಿಗೆ ಇದೆ"</string> <string name="csd_500_system_lowered_text" product="default" msgid="7414943302186884124">"ಹೆಡ್ಫೋನ್ನ ವಾಲ್ಯೂಮ್ ಈ ವಾರದ ಮಟ್ಟಿಗೆ ಸುರಕ್ಷಿತ ಮಿತಿಯನ್ನು ಮೀರಿದೆ"</string> <string name="csd_button_keep_listening" product="default" msgid="4093794049149286784">"ಆಲಿಸುತ್ತಿರಿ"</string> <string name="csd_button_lower_volume" product="default" msgid="5347210412376264579">"ವಾಲ್ಯೂಮ್ ತಗ್ಗಿಸಿ"</string> @@ -1210,8 +1215,6 @@ <string name="privacy_dialog_recent_app_usage_1" msgid="2551340497722370109">"ಇತ್ತೀಚೆಗೆ <xliff:g id="APP_NAME">%1$s</xliff:g> ಇದನ್ನು ಬಳಸಿದೆ (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g>)"</string> <string name="privacy_dialog_active_app_usage_2" msgid="2770926061339921767">"<xliff:g id="APP_NAME">%1$s</xliff:g> ನಿಂದ ಬಳಕೆಯಲ್ಲಿದೆ (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>)"</string> <string name="privacy_dialog_recent_app_usage_2" msgid="2874689735085367167">"ಇತ್ತೀಚೆಗೆ <xliff:g id="APP_NAME">%1$s</xliff:g> ಇದನ್ನು ಬಳಸಿದೆ (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>)"</string> - <!-- no translation found for keyboard_backlight_dialog_title (8273102932345564724) --> - <skip /> - <!-- no translation found for keyboard_backlight_value (7336398765584393538) --> - <skip /> + <string name="keyboard_backlight_dialog_title" msgid="8273102932345564724">"ಕೀಬೋರ್ಡ್ ಬ್ಯಾಕ್ಲೈಟ್"</string> + <string name="keyboard_backlight_value" msgid="7336398765584393538">"%2$d ರಲ್ಲಿ %1$d ಮಟ್ಟ"</string> </resources> diff --git a/packages/SystemUI/res/values-ko/strings.xml b/packages/SystemUI/res/values-ko/strings.xml index ddab1749038d..917781662a20 100644 --- a/packages/SystemUI/res/values-ko/strings.xml +++ b/packages/SystemUI/res/values-ko/strings.xml @@ -197,6 +197,10 @@ <string name="accessibility_bluetooth_connected" msgid="4745196874551115205">"블루투스가 연결되었습니다."</string> <string name="accessibility_bluetooth_device_icon" msgid="9163840051642587982">"블루투스 기기 아이콘"</string> <string name="accessibility_bluetooth_device_settings_gear" msgid="3314916468105272540">"기기 세부정보를 구성하려면 클릭하세요."</string> + <!-- no translation found for accessibility_bluetooth_device_settings_see_all (9111952496905423543) --> + <skip /> + <!-- no translation found for accessibility_bluetooth_device_settings_pair_new_device (2435184865793496966) --> + <skip /> <string name="accessibility_battery_unknown" msgid="1807789554617976440">"배터리 잔량을 알 수 없습니다."</string> <string name="accessibility_bluetooth_name" msgid="7300973230214067678">"<xliff:g id="BLUETOOTH">%s</xliff:g>에 연결되었습니다."</string> <string name="accessibility_cast_name" msgid="7344437925388773685">"<xliff:g id="CAST">%s</xliff:g>에 연결됨"</string> @@ -255,6 +259,10 @@ <string name="turn_on_bluetooth" msgid="5681370462180289071">"블루투스 사용"</string> <string name="quick_settings_bluetooth_device_connected" msgid="7884777006729260996">"연결됨"</string> <string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"저장됨"</string> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_disconnect (415980329093277342) --> + <skip /> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_activate (3724301751036877403) --> + <skip /> <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="4182034939479344093">"배터리 <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g>"</string> <string name="quick_settings_bluetooth_secondary_label_audio" msgid="780333390310051161">"오디오"</string> <string name="quick_settings_bluetooth_secondary_label_headset" msgid="2332093067553000852">"헤드셋"</string> @@ -396,8 +404,7 @@ <string name="keyguard_indication_charging_time_fast" msgid="8390311020603859480">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • 고속 충전 중 • <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g> 후 충전 완료"</string> <string name="keyguard_indication_charging_time_slowly" msgid="301936949731705417">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • 저속 충전 중 • <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g> 후 충전 완료"</string> <string name="keyguard_indication_charging_time_dock" msgid="3149328898931741271">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • 충전 중 • <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g> 후 충전 완료"</string> - <!-- no translation found for communal_tutorial_indicator_text (4503010353591430123) --> - <skip /> + <string name="communal_tutorial_indicator_text" msgid="4503010353591430123">"공동 튜토리얼을 시작하려면 왼쪽으로 스와이프하세요"</string> <!-- no translation found for button_to_open_widget_picker (8007261659745030810) --> <skip /> <!-- no translation found for button_to_remove_widget (1511255853677835341) --> diff --git a/packages/SystemUI/res/values-ky/strings.xml b/packages/SystemUI/res/values-ky/strings.xml index 90ba042e4565..e58cf593bde7 100644 --- a/packages/SystemUI/res/values-ky/strings.xml +++ b/packages/SystemUI/res/values-ky/strings.xml @@ -197,6 +197,10 @@ <string name="accessibility_bluetooth_connected" msgid="4745196874551115205">"Bluetooth байланышта"</string> <string name="accessibility_bluetooth_device_icon" msgid="9163840051642587982">"Bluetooth түзмөгүнүн сүрөтчөсү"</string> <string name="accessibility_bluetooth_device_settings_gear" msgid="3314916468105272540">"Түзмөктүн чоо-жайын конфигурациялоо үчүн чыкылдатыңыз"</string> + <!-- no translation found for accessibility_bluetooth_device_settings_see_all (9111952496905423543) --> + <skip /> + <!-- no translation found for accessibility_bluetooth_device_settings_pair_new_device (2435184865793496966) --> + <skip /> <string name="accessibility_battery_unknown" msgid="1807789554617976440">"Батарея кубатынын деңгээли белгисиз."</string> <string name="accessibility_bluetooth_name" msgid="7300973230214067678">"<xliff:g id="BLUETOOTH">%s</xliff:g> менен туташкан."</string> <string name="accessibility_cast_name" msgid="7344437925388773685">"<xliff:g id="CAST">%s</xliff:g> менен туташты."</string> @@ -255,6 +259,10 @@ <string name="turn_on_bluetooth" msgid="5681370462180289071">"Иштетүү"</string> <string name="quick_settings_bluetooth_device_connected" msgid="7884777006729260996">"Туташты"</string> <string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Сакталды"</string> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_disconnect (415980329093277342) --> + <skip /> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_activate (3724301751036877403) --> + <skip /> <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="4182034939479344093">"Батареянын деңгээли <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g>"</string> <string name="quick_settings_bluetooth_secondary_label_audio" msgid="780333390310051161">"Аудио"</string> <string name="quick_settings_bluetooth_secondary_label_headset" msgid="2332093067553000852">"Гарнитура"</string> @@ -396,8 +404,7 @@ <string name="keyguard_indication_charging_time_fast" msgid="8390311020603859480">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Тез кубатталууда • Толгонго чейин <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g> калды"</string> <string name="keyguard_indication_charging_time_slowly" msgid="301936949731705417">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Жай кубатталууда • Толгонго чейин <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g> калды"</string> <string name="keyguard_indication_charging_time_dock" msgid="3149328898931741271">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Кубатталууда • Толгонго чейин <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g> калды"</string> - <!-- no translation found for communal_tutorial_indicator_text (4503010353591430123) --> - <skip /> + <string name="communal_tutorial_indicator_text" msgid="4503010353591430123">"Жалпы үйрөткүчтү иштетүү үчүн солго сүрүңүз"</string> <!-- no translation found for button_to_open_widget_picker (8007261659745030810) --> <skip /> <!-- no translation found for button_to_remove_widget (1511255853677835341) --> diff --git a/packages/SystemUI/res/values-lo/strings.xml b/packages/SystemUI/res/values-lo/strings.xml index bdd0f2e807e7..0c220cce1b86 100644 --- a/packages/SystemUI/res/values-lo/strings.xml +++ b/packages/SystemUI/res/values-lo/strings.xml @@ -197,6 +197,10 @@ <string name="accessibility_bluetooth_connected" msgid="4745196874551115205">"ເຊື່ອມຕໍ່ Bluetooth ແລ້ວ."</string> <string name="accessibility_bluetooth_device_icon" msgid="9163840051642587982">"ໄອຄອນອຸປະກອນ Bluetooth"</string> <string name="accessibility_bluetooth_device_settings_gear" msgid="3314916468105272540">"ຄລິກເພື່ອຕັ້ງຄ່າລາຍລະອຽດອຸປະກອນ"</string> + <!-- no translation found for accessibility_bluetooth_device_settings_see_all (9111952496905423543) --> + <skip /> + <!-- no translation found for accessibility_bluetooth_device_settings_pair_new_device (2435184865793496966) --> + <skip /> <string name="accessibility_battery_unknown" msgid="1807789554617976440">"ບໍ່ຮູ້ເປີເຊັນແບັດເຕີຣີ."</string> <string name="accessibility_bluetooth_name" msgid="7300973230214067678">"ເຊື່ອມຕໍ່ຫາ <xliff:g id="BLUETOOTH">%s</xliff:g> ແລ້ວ."</string> <string name="accessibility_cast_name" msgid="7344437925388773685">"ເຊື່ອມຕໍ່ຫາ <xliff:g id="CAST">%s</xliff:g> ແລ້ວ."</string> @@ -255,6 +259,10 @@ <string name="turn_on_bluetooth" msgid="5681370462180289071">"ໃຊ້ Bluetooth"</string> <string name="quick_settings_bluetooth_device_connected" msgid="7884777006729260996">"ເຊື່ອມຕໍ່ແລ້ວ"</string> <string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"ບັນທຶກແລ້ວ"</string> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_disconnect (415980329093277342) --> + <skip /> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_activate (3724301751036877403) --> + <skip /> <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="4182034939479344093">"ແບັດເຕີຣີ <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g>"</string> <string name="quick_settings_bluetooth_secondary_label_audio" msgid="780333390310051161">"ສຽງ"</string> <string name="quick_settings_bluetooth_secondary_label_headset" msgid="2332093067553000852">"ຊຸດຫູຟັງ"</string> diff --git a/packages/SystemUI/res/values-lt/strings.xml b/packages/SystemUI/res/values-lt/strings.xml index d86eeb933558..b1139a2bd4fc 100644 --- a/packages/SystemUI/res/values-lt/strings.xml +++ b/packages/SystemUI/res/values-lt/strings.xml @@ -197,6 +197,10 @@ <string name="accessibility_bluetooth_connected" msgid="4745196874551115205">"„Bluetooth“ prijungtas."</string> <string name="accessibility_bluetooth_device_icon" msgid="9163840051642587982">"„Bluetooth“ įrenginio piktograma"</string> <string name="accessibility_bluetooth_device_settings_gear" msgid="3314916468105272540">"Spustelėkite, jei norite konfigūruoti išsamią įrenginio informaciją"</string> + <!-- no translation found for accessibility_bluetooth_device_settings_see_all (9111952496905423543) --> + <skip /> + <!-- no translation found for accessibility_bluetooth_device_settings_pair_new_device (2435184865793496966) --> + <skip /> <string name="accessibility_battery_unknown" msgid="1807789554617976440">"Akumuliatoriaus energija procentais nežinoma."</string> <string name="accessibility_bluetooth_name" msgid="7300973230214067678">"Prisijungta prie „<xliff:g id="BLUETOOTH">%s</xliff:g>“."</string> <string name="accessibility_cast_name" msgid="7344437925388773685">"Prisijungta prie <xliff:g id="CAST">%s</xliff:g>."</string> @@ -255,6 +259,10 @@ <string name="turn_on_bluetooth" msgid="5681370462180289071">"„Bluetooth“ naudojimas"</string> <string name="quick_settings_bluetooth_device_connected" msgid="7884777006729260996">"Prisijungta"</string> <string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Išsaugota"</string> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_disconnect (415980329093277342) --> + <skip /> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_activate (3724301751036877403) --> + <skip /> <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="4182034939479344093">"Akumuliatorius: <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g>"</string> <string name="quick_settings_bluetooth_secondary_label_audio" msgid="780333390310051161">"Garsas"</string> <string name="quick_settings_bluetooth_secondary_label_headset" msgid="2332093067553000852">"Virtualiosios realybės įrenginys"</string> @@ -396,8 +404,7 @@ <string name="keyguard_indication_charging_time_fast" msgid="8390311020603859480">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Sparčiai įkraunama • <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g> iki visiško įkrovimo"</string> <string name="keyguard_indication_charging_time_slowly" msgid="301936949731705417">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Lėtai įkraunama • <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g> iki visiško įkrovimo"</string> <string name="keyguard_indication_charging_time_dock" msgid="3149328898931741271">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Įkraunama • <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g> iki visiško įkrovimo"</string> - <!-- no translation found for communal_tutorial_indicator_text (4503010353591430123) --> - <skip /> + <string name="communal_tutorial_indicator_text" msgid="4503010353591430123">"Perbraukite kairėn, paleistumėte bendruomenės mokomąją medžiagą"</string> <!-- no translation found for button_to_open_widget_picker (8007261659745030810) --> <skip /> <!-- no translation found for button_to_remove_widget (1511255853677835341) --> diff --git a/packages/SystemUI/res/values-lv/strings.xml b/packages/SystemUI/res/values-lv/strings.xml index a98cba0a58d7..03d6237f9125 100644 --- a/packages/SystemUI/res/values-lv/strings.xml +++ b/packages/SystemUI/res/values-lv/strings.xml @@ -197,6 +197,10 @@ <string name="accessibility_bluetooth_connected" msgid="4745196874551115205">"Bluetooth savienojums ir izveidots."</string> <string name="accessibility_bluetooth_device_icon" msgid="9163840051642587982">"Bluetooth ierīces ikona"</string> <string name="accessibility_bluetooth_device_settings_gear" msgid="3314916468105272540">"Lai konfigurētu ierīces informāciju, noklikšķiniet"</string> + <!-- no translation found for accessibility_bluetooth_device_settings_see_all (9111952496905423543) --> + <skip /> + <!-- no translation found for accessibility_bluetooth_device_settings_pair_new_device (2435184865793496966) --> + <skip /> <string name="accessibility_battery_unknown" msgid="1807789554617976440">"Akumulatora uzlādes līmenis procentos nav zināms."</string> <string name="accessibility_bluetooth_name" msgid="7300973230214067678">"Ir izveidots savienojum ar <xliff:g id="BLUETOOTH">%s</xliff:g>."</string> <string name="accessibility_cast_name" msgid="7344437925388773685">"Savienots ar ierīci <xliff:g id="CAST">%s</xliff:g>."</string> @@ -255,6 +259,10 @@ <string name="turn_on_bluetooth" msgid="5681370462180289071">"Izmantot Bluetooth"</string> <string name="quick_settings_bluetooth_device_connected" msgid="7884777006729260996">"Savienojums izveidots"</string> <string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Saglabāta"</string> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_disconnect (415980329093277342) --> + <skip /> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_activate (3724301751036877403) --> + <skip /> <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="4182034939479344093">"Akumulators: <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g>"</string> <string name="quick_settings_bluetooth_secondary_label_audio" msgid="780333390310051161">"Audio"</string> <string name="quick_settings_bluetooth_secondary_label_headset" msgid="2332093067553000852">"Austiņas"</string> @@ -396,8 +404,7 @@ <string name="keyguard_indication_charging_time_fast" msgid="8390311020603859480">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Ātrā uzlāde • Laiks līdz pilnai uzlādei: <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> <string name="keyguard_indication_charging_time_slowly" msgid="301936949731705417">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Lēnā uzlāde • Laiks līdz pilnai uzlādei: <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> <string name="keyguard_indication_charging_time_dock" msgid="3149328898931741271">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Notiek uzlāde • Laiks līdz pilnai uzlādei: <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> - <!-- no translation found for communal_tutorial_indicator_text (4503010353591430123) --> - <skip /> + <string name="communal_tutorial_indicator_text" msgid="4503010353591430123">"Velciet pa kreisi, lai palaistu kopienas pamācību."</string> <!-- no translation found for button_to_open_widget_picker (8007261659745030810) --> <skip /> <!-- no translation found for button_to_remove_widget (1511255853677835341) --> diff --git a/packages/SystemUI/res/values-mk/strings.xml b/packages/SystemUI/res/values-mk/strings.xml index 0464bb34e09b..3374ba335b44 100644 --- a/packages/SystemUI/res/values-mk/strings.xml +++ b/packages/SystemUI/res/values-mk/strings.xml @@ -197,6 +197,10 @@ <string name="accessibility_bluetooth_connected" msgid="4745196874551115205">"Bluetooth е поврзан."</string> <string name="accessibility_bluetooth_device_icon" msgid="9163840051642587982">"Икона за уред со Bluetooth"</string> <string name="accessibility_bluetooth_device_settings_gear" msgid="3314916468105272540">"Кликнете за да ги конфигурирате деталите за уредот"</string> + <!-- no translation found for accessibility_bluetooth_device_settings_see_all (9111952496905423543) --> + <skip /> + <!-- no translation found for accessibility_bluetooth_device_settings_pair_new_device (2435184865793496966) --> + <skip /> <string name="accessibility_battery_unknown" msgid="1807789554617976440">"Процентот на батеријата е непознат."</string> <string name="accessibility_bluetooth_name" msgid="7300973230214067678">"Поврзано со <xliff:g id="BLUETOOTH">%s</xliff:g>."</string> <string name="accessibility_cast_name" msgid="7344437925388773685">"Поврзано со <xliff:g id="CAST">%s</xliff:g>."</string> @@ -255,6 +259,10 @@ <string name="turn_on_bluetooth" msgid="5681370462180289071">"Користи Bluetooth"</string> <string name="quick_settings_bluetooth_device_connected" msgid="7884777006729260996">"Поврзано"</string> <string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Зачувано"</string> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_disconnect (415980329093277342) --> + <skip /> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_activate (3724301751036877403) --> + <skip /> <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="4182034939479344093">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g> батерија"</string> <string name="quick_settings_bluetooth_secondary_label_audio" msgid="780333390310051161">"Аудио"</string> <string name="quick_settings_bluetooth_secondary_label_headset" msgid="2332093067553000852">"Слушалки"</string> diff --git a/packages/SystemUI/res/values-ml/strings.xml b/packages/SystemUI/res/values-ml/strings.xml index b4ff31416534..6e70f84df206 100644 --- a/packages/SystemUI/res/values-ml/strings.xml +++ b/packages/SystemUI/res/values-ml/strings.xml @@ -197,6 +197,10 @@ <string name="accessibility_bluetooth_connected" msgid="4745196874551115205">"ബ്ലൂടൂത്ത് കണക്റ്റുചെയ്തു."</string> <string name="accessibility_bluetooth_device_icon" msgid="9163840051642587982">"Bluetooth ഉപകരണ ഐക്കൺ"</string> <string name="accessibility_bluetooth_device_settings_gear" msgid="3314916468105272540">"ഉപകരണത്തിന്റെ വിശദാംശങ്ങൾ കോൺഫിഗർ ചെയ്യാൻ ക്ലിക്ക് ചെയ്യുക"</string> + <!-- no translation found for accessibility_bluetooth_device_settings_see_all (9111952496905423543) --> + <skip /> + <!-- no translation found for accessibility_bluetooth_device_settings_pair_new_device (2435184865793496966) --> + <skip /> <string name="accessibility_battery_unknown" msgid="1807789554617976440">"ബാറ്ററി ശതമാനം അജ്ഞാതമാണ്."</string> <string name="accessibility_bluetooth_name" msgid="7300973230214067678">"<xliff:g id="BLUETOOTH">%s</xliff:g> എന്നതിലേക്ക് കണക്റ്റുചെയ്തു."</string> <string name="accessibility_cast_name" msgid="7344437925388773685">"<xliff:g id="CAST">%s</xliff:g> എന്നതിലേക്ക് കണക്റ്റുചെയ്തു."</string> @@ -255,6 +259,10 @@ <string name="turn_on_bluetooth" msgid="5681370462180289071">"Bluetooth ഉപയോഗിക്കുക"</string> <string name="quick_settings_bluetooth_device_connected" msgid="7884777006729260996">"കണക്റ്റ് ചെയ്തു"</string> <string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"സംരക്ഷിച്ചു"</string> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_disconnect (415980329093277342) --> + <skip /> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_activate (3724301751036877403) --> + <skip /> <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="4182034939479344093">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g> ബാറ്ററി"</string> <string name="quick_settings_bluetooth_secondary_label_audio" msgid="780333390310051161">"ഓഡിയോ"</string> <string name="quick_settings_bluetooth_secondary_label_headset" msgid="2332093067553000852">"ഹെഡ്സെറ്റ്"</string> @@ -397,10 +405,8 @@ <string name="keyguard_indication_charging_time_slowly" msgid="301936949731705417">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • പതുക്കെ ചാർജ് ചെയ്യുന്നു • <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>-ൽ പൂർത്തിയാകും"</string> <string name="keyguard_indication_charging_time_dock" msgid="3149328898931741271">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • ചാർജ് ചെയ്യുന്നു • <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>-ൽ പൂർത്തിയാകും"</string> <string name="communal_tutorial_indicator_text" msgid="4503010353591430123">"കമ്മ്യൂണൽ ട്യൂട്ടോറിയൽ ആരംഭിക്കാൻ ഇടത്തോട്ട് സ്വൈപ്പ് ചെയ്യുക"</string> - <!-- no translation found for button_to_open_widget_picker (8007261659745030810) --> - <skip /> - <!-- no translation found for button_to_remove_widget (1511255853677835341) --> - <skip /> + <string name="button_to_open_widget_picker" msgid="8007261659745030810">"വിജറ്റ് പിക്കർ തുറക്കുക"</string> + <string name="button_to_remove_widget" msgid="1511255853677835341">"വിജറ്റ് നീക്കം ചെയ്യുക"</string> <string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"ഉപയോക്താവ് മാറുക"</string> <string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"പുൾഡൗൺ മെനു"</string> <string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"ഈ സെഷനിലെ എല്ലാ ആപ്പുകളും ഡാറ്റയും ഇല്ലാതാക്കും."</string> @@ -1209,8 +1215,6 @@ <string name="privacy_dialog_recent_app_usage_1" msgid="2551340497722370109">"<xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g>) അടുത്തിടെ ഉപയോഗിച്ചു"</string> <string name="privacy_dialog_active_app_usage_2" msgid="2770926061339921767">"<xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>) ഉപയോഗിക്കുന്നു"</string> <string name="privacy_dialog_recent_app_usage_2" msgid="2874689735085367167">"<xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>) അടുത്തിടെ ഉപയോഗിച്ചു"</string> - <!-- no translation found for keyboard_backlight_dialog_title (8273102932345564724) --> - <skip /> - <!-- no translation found for keyboard_backlight_value (7336398765584393538) --> - <skip /> + <string name="keyboard_backlight_dialog_title" msgid="8273102932345564724">"കീബോഡ് ബാക്ക്ലൈറ്റ്"</string> + <string name="keyboard_backlight_value" msgid="7336398765584393538">"%2$d-ൽ %1$d-ാമത്തെ ലെവൽ"</string> </resources> diff --git a/packages/SystemUI/res/values-mn/strings.xml b/packages/SystemUI/res/values-mn/strings.xml index 42b0caefee97..93538c119eb6 100644 --- a/packages/SystemUI/res/values-mn/strings.xml +++ b/packages/SystemUI/res/values-mn/strings.xml @@ -197,6 +197,10 @@ <string name="accessibility_bluetooth_connected" msgid="4745196874551115205">"Bluetooth холбогдсон."</string> <string name="accessibility_bluetooth_device_icon" msgid="9163840051642587982">"Bluetooth төхөөрөмжийн дүрс тэмдэг"</string> <string name="accessibility_bluetooth_device_settings_gear" msgid="3314916468105272540">"Төхөөрөмжийн дэлгэрэнгүйг тохируулахын тулд товшино уу"</string> + <!-- no translation found for accessibility_bluetooth_device_settings_see_all (9111952496905423543) --> + <skip /> + <!-- no translation found for accessibility_bluetooth_device_settings_pair_new_device (2435184865793496966) --> + <skip /> <string name="accessibility_battery_unknown" msgid="1807789554617976440">"Батарейн хувь тодорхойгүй байна."</string> <string name="accessibility_bluetooth_name" msgid="7300973230214067678">"<xliff:g id="BLUETOOTH">%s</xliff:g>-тай холбогдсон."</string> <string name="accessibility_cast_name" msgid="7344437925388773685">"<xliff:g id="CAST">%s</xliff:g>-д холбогдсон."</string> @@ -255,6 +259,10 @@ <string name="turn_on_bluetooth" msgid="5681370462180289071">"Bluetooth-г ашиглах"</string> <string name="quick_settings_bluetooth_device_connected" msgid="7884777006729260996">"Холбогдсон"</string> <string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Хадгалсан"</string> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_disconnect (415980329093277342) --> + <skip /> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_activate (3724301751036877403) --> + <skip /> <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="4182034939479344093">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g> батарей"</string> <string name="quick_settings_bluetooth_secondary_label_audio" msgid="780333390310051161">"Аудио"</string> <string name="quick_settings_bluetooth_secondary_label_headset" msgid="2332093067553000852">"Чихэвч"</string> @@ -396,8 +404,7 @@ <string name="keyguard_indication_charging_time_fast" msgid="8390311020603859480">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Хурдтай цэнэглэж байна • <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>-н дараа дүүрнэ"</string> <string name="keyguard_indication_charging_time_slowly" msgid="301936949731705417">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Удаан цэнэглэж байна • <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>-н дараа дүүрнэ"</string> <string name="keyguard_indication_charging_time_dock" msgid="3149328898931741271">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Цэнэглэж байна • <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>-н дараа дүүрнэ"</string> - <!-- no translation found for communal_tutorial_indicator_text (4503010353591430123) --> - <skip /> + <string name="communal_tutorial_indicator_text" msgid="4503010353591430123">"Нийтийн практик хичээлийг эхлүүлэхийн тулд зүүн тийш шударна уу"</string> <!-- no translation found for button_to_open_widget_picker (8007261659745030810) --> <skip /> <!-- no translation found for button_to_remove_widget (1511255853677835341) --> diff --git a/packages/SystemUI/res/values-mr/strings.xml b/packages/SystemUI/res/values-mr/strings.xml index ffa36a40c17d..32c27ac0e828 100644 --- a/packages/SystemUI/res/values-mr/strings.xml +++ b/packages/SystemUI/res/values-mr/strings.xml @@ -197,6 +197,10 @@ <string name="accessibility_bluetooth_connected" msgid="4745196874551115205">"ब्लूटूथ कनेक्ट केले."</string> <string name="accessibility_bluetooth_device_icon" msgid="9163840051642587982">"ब्लूटूथ डिव्हाइस आयकन"</string> <string name="accessibility_bluetooth_device_settings_gear" msgid="3314916468105272540">"डिव्हाइसचे तपशील कॉंफिगर करण्यासाठी क्लिक करा"</string> + <!-- no translation found for accessibility_bluetooth_device_settings_see_all (9111952496905423543) --> + <skip /> + <!-- no translation found for accessibility_bluetooth_device_settings_pair_new_device (2435184865793496966) --> + <skip /> <string name="accessibility_battery_unknown" msgid="1807789554617976440">"बॅटरीच्या चार्जिंगची टक्केवारी माहित नाही."</string> <string name="accessibility_bluetooth_name" msgid="7300973230214067678">"<xliff:g id="BLUETOOTH">%s</xliff:g> शी कनेक्ट केले."</string> <string name="accessibility_cast_name" msgid="7344437925388773685">"<xliff:g id="CAST">%s</xliff:g> शी कनेक्ट केले."</string> @@ -255,6 +259,10 @@ <string name="turn_on_bluetooth" msgid="5681370462180289071">"ब्लूटूथ वापरा"</string> <string name="quick_settings_bluetooth_device_connected" msgid="7884777006729260996">"कनेक्ट केले"</string> <string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"सेव्ह केले"</string> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_disconnect (415980329093277342) --> + <skip /> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_activate (3724301751036877403) --> + <skip /> <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="4182034939479344093">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g> बॅटरी"</string> <string name="quick_settings_bluetooth_secondary_label_audio" msgid="780333390310051161">"ऑडिओ"</string> <string name="quick_settings_bluetooth_secondary_label_headset" msgid="2332093067553000852">"हेडसेट"</string> @@ -397,10 +405,8 @@ <string name="keyguard_indication_charging_time_slowly" msgid="301936949731705417">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • हळू चार्ज होत आहे • <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g> मध्ये पूर्ण होईल"</string> <string name="keyguard_indication_charging_time_dock" msgid="3149328898931741271">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • चार्ज होत आहे • <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g> मध्ये पूर्ण होईल"</string> <string name="communal_tutorial_indicator_text" msgid="4503010353591430123">"सामुदायिक ट्यूटोरियल सुरू करण्यासाठी डावीकडे स्वाइप करा"</string> - <!-- no translation found for button_to_open_widget_picker (8007261659745030810) --> - <skip /> - <!-- no translation found for button_to_remove_widget (1511255853677835341) --> - <skip /> + <string name="button_to_open_widget_picker" msgid="8007261659745030810">"विजेट पिकर उघडा"</string> + <string name="button_to_remove_widget" msgid="1511255853677835341">"विजेट काढून टाका"</string> <string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"वापरकर्ता स्विच करा"</string> <string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"पुलडाउन मेनू"</string> <string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"या सत्रातील सर्व अॅप्स आणि डेटा हटवला जाईल."</string> @@ -1209,8 +1215,6 @@ <string name="privacy_dialog_recent_app_usage_1" msgid="2551340497722370109">"अलीकडे <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g>) ने वापरले"</string> <string name="privacy_dialog_active_app_usage_2" msgid="2770926061339921767">"<xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>) द्वारे वापरले जात आहे"</string> <string name="privacy_dialog_recent_app_usage_2" msgid="2874689735085367167">"अलीकडे <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>) ने वापरले"</string> - <!-- no translation found for keyboard_backlight_dialog_title (8273102932345564724) --> - <skip /> - <!-- no translation found for keyboard_backlight_value (7336398765584393538) --> - <skip /> + <string name="keyboard_backlight_dialog_title" msgid="8273102932345564724">"कीबोर्ड बॅकलाइट"</string> + <string name="keyboard_backlight_value" msgid="7336398765584393538">"%2$d पैकी %1$d पातळी"</string> </resources> diff --git a/packages/SystemUI/res/values-ms/strings.xml b/packages/SystemUI/res/values-ms/strings.xml index 7e0bba46bd8e..62efce1cd8f0 100644 --- a/packages/SystemUI/res/values-ms/strings.xml +++ b/packages/SystemUI/res/values-ms/strings.xml @@ -197,6 +197,10 @@ <string name="accessibility_bluetooth_connected" msgid="4745196874551115205">"Bluetooth disambungkan."</string> <string name="accessibility_bluetooth_device_icon" msgid="9163840051642587982">"Ikon peranti Bluetooth"</string> <string name="accessibility_bluetooth_device_settings_gear" msgid="3314916468105272540">"Klik untuk mengkonfigurasi butiran peranti"</string> + <!-- no translation found for accessibility_bluetooth_device_settings_see_all (9111952496905423543) --> + <skip /> + <!-- no translation found for accessibility_bluetooth_device_settings_pair_new_device (2435184865793496966) --> + <skip /> <string name="accessibility_battery_unknown" msgid="1807789554617976440">"Peratusan kuasa bateri tidak diketahui."</string> <string name="accessibility_bluetooth_name" msgid="7300973230214067678">"Disambungkan kepada <xliff:g id="BLUETOOTH">%s</xliff:g>."</string> <string name="accessibility_cast_name" msgid="7344437925388773685">"Disambungkan ke <xliff:g id="CAST">%s</xliff:g>."</string> @@ -255,6 +259,10 @@ <string name="turn_on_bluetooth" msgid="5681370462180289071">"Gunakan Bluetooth"</string> <string name="quick_settings_bluetooth_device_connected" msgid="7884777006729260996">"Disambungkan"</string> <string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Disimpan"</string> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_disconnect (415980329093277342) --> + <skip /> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_activate (3724301751036877403) --> + <skip /> <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="4182034939479344093">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g> bateri"</string> <string name="quick_settings_bluetooth_secondary_label_audio" msgid="780333390310051161">"Audio"</string> <string name="quick_settings_bluetooth_secondary_label_headset" msgid="2332093067553000852">"Set Kepala"</string> @@ -397,10 +405,8 @@ <string name="keyguard_indication_charging_time_slowly" msgid="301936949731705417">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Mengecas dengan perlahan • Penuh dalam masa <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> <string name="keyguard_indication_charging_time_dock" msgid="3149328898931741271">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Mengecas • Penuh dalam masa <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> <string name="communal_tutorial_indicator_text" msgid="4503010353591430123">"Leret ke kiri untuk memulakan tutorial umum"</string> - <!-- no translation found for button_to_open_widget_picker (8007261659745030810) --> - <skip /> - <!-- no translation found for button_to_remove_widget (1511255853677835341) --> - <skip /> + <string name="button_to_open_widget_picker" msgid="8007261659745030810">"Buka pemilih widget"</string> + <string name="button_to_remove_widget" msgid="1511255853677835341">"Alih keluar widget"</string> <string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"Tukar pengguna"</string> <string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"menu tarik turun"</string> <string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"Semua apl dan data dalam sesi ini akan dipadam."</string> @@ -1209,8 +1215,6 @@ <string name="privacy_dialog_recent_app_usage_1" msgid="2551340497722370109">"Digunakan baru-baru ini oleh <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g>)"</string> <string name="privacy_dialog_active_app_usage_2" msgid="2770926061339921767">"Digunakan oleh <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>)"</string> <string name="privacy_dialog_recent_app_usage_2" msgid="2874689735085367167">"Digunakan baru-baru ini oleh <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>)"</string> - <!-- no translation found for keyboard_backlight_dialog_title (8273102932345564724) --> - <skip /> - <!-- no translation found for keyboard_backlight_value (7336398765584393538) --> - <skip /> + <string name="keyboard_backlight_dialog_title" msgid="8273102932345564724">"Cahaya latar papan kekunci"</string> + <string name="keyboard_backlight_value" msgid="7336398765584393538">"Tahap %1$d daripada %2$d"</string> </resources> diff --git a/packages/SystemUI/res/values-my/strings.xml b/packages/SystemUI/res/values-my/strings.xml index 9b3f6ca18593..6dd247dd71a6 100644 --- a/packages/SystemUI/res/values-my/strings.xml +++ b/packages/SystemUI/res/values-my/strings.xml @@ -197,6 +197,10 @@ <string name="accessibility_bluetooth_connected" msgid="4745196874551115205">"ဘလူးတုသ်ချိတ်ဆက်ထားမှု"</string> <string name="accessibility_bluetooth_device_icon" msgid="9163840051642587982">"ဘလူးတုသ်သုံးစက် သင်္ကေတ"</string> <string name="accessibility_bluetooth_device_settings_gear" msgid="3314916468105272540">"စက်အသေးစိတ်ကို စီစဉ်သတ်မှတ်ရန် နှိပ်ပါ"</string> + <!-- no translation found for accessibility_bluetooth_device_settings_see_all (9111952496905423543) --> + <skip /> + <!-- no translation found for accessibility_bluetooth_device_settings_pair_new_device (2435184865793496966) --> + <skip /> <string name="accessibility_battery_unknown" msgid="1807789554617976440">"ဘက်ထရီရာခိုင်နှုန်းကို မသိပါ။"</string> <string name="accessibility_bluetooth_name" msgid="7300973230214067678">"<xliff:g id="BLUETOOTH">%s</xliff:g>သို့ ချိတ်ဆက်ထား"</string> <string name="accessibility_cast_name" msgid="7344437925388773685">"<xliff:g id="CAST">%s</xliff:g> သို့ချိတ်ဆက်ထားပါသည်။"</string> @@ -255,6 +259,10 @@ <string name="turn_on_bluetooth" msgid="5681370462180289071">"ဘလူးတုသ်သုံးရန်"</string> <string name="quick_settings_bluetooth_device_connected" msgid="7884777006729260996">"ချိတ်ဆက်ထားသည်"</string> <string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"သိမ်းထားသည်"</string> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_disconnect (415980329093277342) --> + <skip /> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_activate (3724301751036877403) --> + <skip /> <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="4182034939479344093">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g> ဘက်ထရီ"</string> <string name="quick_settings_bluetooth_secondary_label_audio" msgid="780333390310051161">"အသံ"</string> <string name="quick_settings_bluetooth_secondary_label_headset" msgid="2332093067553000852">"မိုက်ခွက်ပါနားကြပ်"</string> @@ -396,8 +404,7 @@ <string name="keyguard_indication_charging_time_fast" msgid="8390311020603859480">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • အမြန်အားသွင်းနေသည် • အားပြည့်ရန် <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g> လိုသည်"</string> <string name="keyguard_indication_charging_time_slowly" msgid="301936949731705417">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • နှေးကွေးစွာ အားသွင်းနေသည် • အားပြည့်ရန် <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g> လိုသည်"</string> <string name="keyguard_indication_charging_time_dock" msgid="3149328898931741271">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • အားသွင်းနေသည် • အားပြည့်ရန် <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g> လိုသည်"</string> - <!-- no translation found for communal_tutorial_indicator_text (4503010353591430123) --> - <skip /> + <string name="communal_tutorial_indicator_text" msgid="4503010353591430123">"အများသုံးရှင်းလင်းပို့ချချက် စတင်ရန် ဘယ်သို့ပွတ်ဆွဲပါ"</string> <!-- no translation found for button_to_open_widget_picker (8007261659745030810) --> <skip /> <!-- no translation found for button_to_remove_widget (1511255853677835341) --> diff --git a/packages/SystemUI/res/values-nb/strings.xml b/packages/SystemUI/res/values-nb/strings.xml index 0f73d986dc16..f873274d9f95 100644 --- a/packages/SystemUI/res/values-nb/strings.xml +++ b/packages/SystemUI/res/values-nb/strings.xml @@ -197,6 +197,10 @@ <string name="accessibility_bluetooth_connected" msgid="4745196874551115205">"Bluetooth er tilkoblet."</string> <string name="accessibility_bluetooth_device_icon" msgid="9163840051642587982">"Ikon for Bluetooth-enheter"</string> <string name="accessibility_bluetooth_device_settings_gear" msgid="3314916468105272540">"Klikk for å konfigurere enhetsdetaljer"</string> + <!-- no translation found for accessibility_bluetooth_device_settings_see_all (9111952496905423543) --> + <skip /> + <!-- no translation found for accessibility_bluetooth_device_settings_pair_new_device (2435184865793496966) --> + <skip /> <string name="accessibility_battery_unknown" msgid="1807789554617976440">"Batteriprosenten er ukjent."</string> <string name="accessibility_bluetooth_name" msgid="7300973230214067678">"Koblet til <xliff:g id="BLUETOOTH">%s</xliff:g>."</string> <string name="accessibility_cast_name" msgid="7344437925388773685">"Koblet til <xliff:g id="CAST">%s</xliff:g>."</string> @@ -255,6 +259,10 @@ <string name="turn_on_bluetooth" msgid="5681370462180289071">"Bruk Bluetooth"</string> <string name="quick_settings_bluetooth_device_connected" msgid="7884777006729260996">"Tilkoblet"</string> <string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Lagret"</string> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_disconnect (415980329093277342) --> + <skip /> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_activate (3724301751036877403) --> + <skip /> <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="4182034939479344093">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g> batteri"</string> <string name="quick_settings_bluetooth_secondary_label_audio" msgid="780333390310051161">"Lyd"</string> <string name="quick_settings_bluetooth_secondary_label_headset" msgid="2332093067553000852">"Hodetelefoner"</string> @@ -396,12 +404,9 @@ <string name="keyguard_indication_charging_time_fast" msgid="8390311020603859480">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Lader raskt • Fulladet om <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> <string name="keyguard_indication_charging_time_slowly" msgid="301936949731705417">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Lader sakte • Fulladet om <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> <string name="keyguard_indication_charging_time_dock" msgid="3149328898931741271">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Lader • Fulladet om <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> - <!-- no translation found for communal_tutorial_indicator_text (4503010353591430123) --> - <skip /> - <!-- no translation found for button_to_open_widget_picker (8007261659745030810) --> - <skip /> - <!-- no translation found for button_to_remove_widget (1511255853677835341) --> - <skip /> + <string name="communal_tutorial_indicator_text" msgid="4503010353591430123">"Sveip til venstre for å starte fellesveiledningen"</string> + <string name="button_to_open_widget_picker" msgid="8007261659745030810">"Åpne modulvelgeren"</string> + <string name="button_to_remove_widget" msgid="1511255853677835341">"Fjern en modul"</string> <string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"Bytt bruker"</string> <string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"rullegardinmeny"</string> <string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"Alle apper og data i denne økten blir slettet."</string> @@ -1210,8 +1215,6 @@ <string name="privacy_dialog_recent_app_usage_1" msgid="2551340497722370109">"Nylig brukt av <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g>)"</string> <string name="privacy_dialog_active_app_usage_2" msgid="2770926061339921767">"I bruk av <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>)"</string> <string name="privacy_dialog_recent_app_usage_2" msgid="2874689735085367167">"Nylig brukt av <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>)"</string> - <!-- no translation found for keyboard_backlight_dialog_title (8273102932345564724) --> - <skip /> - <!-- no translation found for keyboard_backlight_value (7336398765584393538) --> - <skip /> + <string name="keyboard_backlight_dialog_title" msgid="8273102932345564724">"Bakgrunnslys for tastatur"</string> + <string name="keyboard_backlight_value" msgid="7336398765584393538">"Nivå %1$d av %2$d"</string> </resources> diff --git a/packages/SystemUI/res/values-ne/strings.xml b/packages/SystemUI/res/values-ne/strings.xml index b921f58ee1a3..24d7ffe5372d 100644 --- a/packages/SystemUI/res/values-ne/strings.xml +++ b/packages/SystemUI/res/values-ne/strings.xml @@ -197,6 +197,10 @@ <string name="accessibility_bluetooth_connected" msgid="4745196874551115205">"ब्लुटुथ जडान भयो।"</string> <string name="accessibility_bluetooth_device_icon" msgid="9163840051642587982">"ब्लुटुथ डिभाइस जनाउने आइकन"</string> <string name="accessibility_bluetooth_device_settings_gear" msgid="3314916468105272540">"डिभाइसको विवरण कन्फिगर गर्न क्लिक गर्नुहोस्"</string> + <!-- no translation found for accessibility_bluetooth_device_settings_see_all (9111952496905423543) --> + <skip /> + <!-- no translation found for accessibility_bluetooth_device_settings_pair_new_device (2435184865793496966) --> + <skip /> <string name="accessibility_battery_unknown" msgid="1807789554617976440">"ब्याट्रीमा कति प्रतिशत चार्ज छ भन्ने कुराको जानाकरी छैन।"</string> <string name="accessibility_bluetooth_name" msgid="7300973230214067678">"<xliff:g id="BLUETOOTH">%s</xliff:g> मा जडित।"</string> <string name="accessibility_cast_name" msgid="7344437925388773685">"<xliff:g id="CAST">%s</xliff:g> मा कनेक्ट गरियो।"</string> @@ -255,6 +259,10 @@ <string name="turn_on_bluetooth" msgid="5681370462180289071">"ब्लुटुथ प्रयोग गर्नुहोस्"</string> <string name="quick_settings_bluetooth_device_connected" msgid="7884777006729260996">"कनेक्ट गरिएको छ"</string> <string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"सेभ गरिएको छ"</string> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_disconnect (415980329093277342) --> + <skip /> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_activate (3724301751036877403) --> + <skip /> <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="4182034939479344093">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g> ब्याट्री"</string> <string name="quick_settings_bluetooth_secondary_label_audio" msgid="780333390310051161">"अडियो"</string> <string name="quick_settings_bluetooth_secondary_label_headset" msgid="2332093067553000852">"हेडसेट"</string> @@ -397,10 +405,8 @@ <string name="keyguard_indication_charging_time_slowly" msgid="301936949731705417">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • बिस्तारै चार्ज हुँदै छ • <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g> मा पूरै चार्ज हुन्छ"</string> <string name="keyguard_indication_charging_time_dock" msgid="3149328898931741271">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • चार्ज हुँदै छ • <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g> मा फुल चार्ज हुने छ"</string> <string name="communal_tutorial_indicator_text" msgid="4503010353591430123">"कम्युनल ट्युटोरियल सुरु गर्न बायाँतिर स्वाइप गर्नुहोस्"</string> - <!-- no translation found for button_to_open_widget_picker (8007261659745030810) --> - <skip /> - <!-- no translation found for button_to_remove_widget (1511255853677835341) --> - <skip /> + <string name="button_to_open_widget_picker" msgid="8007261659745030810">"विजेट पिकर खोल्नुहोस्"</string> + <string name="button_to_remove_widget" msgid="1511255853677835341">"कुनै विजेट हटाउनुहोस्"</string> <string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"प्रयोगकर्ता फेर्नुहोस्"</string> <string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"पुलडाउन मेनु"</string> <string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"यो सत्रमा भएका सबै एपहरू र डेटा मेटाइने छ।"</string> @@ -1209,8 +1215,6 @@ <string name="privacy_dialog_recent_app_usage_1" msgid="2551340497722370109">"<xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g>) ले हालसालै प्रयोग गरेको"</string> <string name="privacy_dialog_active_app_usage_2" msgid="2770926061339921767">"<xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>) ले प्रयोग गरिरहेको छ"</string> <string name="privacy_dialog_recent_app_usage_2" msgid="2874689735085367167">"<xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>) ले हालसालै प्रयोग गरेको"</string> - <!-- no translation found for keyboard_backlight_dialog_title (8273102932345564724) --> - <skip /> - <!-- no translation found for keyboard_backlight_value (7336398765584393538) --> - <skip /> + <string name="keyboard_backlight_dialog_title" msgid="8273102932345564724">"किबोर्ड ब्याकलाइट"</string> + <string name="keyboard_backlight_value" msgid="7336398765584393538">"%2$d मध्ये %1$d औँ स्तर"</string> </resources> diff --git a/packages/SystemUI/res/values-nl/strings.xml b/packages/SystemUI/res/values-nl/strings.xml index 9e070153c6d3..9a110a251aba 100644 --- a/packages/SystemUI/res/values-nl/strings.xml +++ b/packages/SystemUI/res/values-nl/strings.xml @@ -197,6 +197,10 @@ <string name="accessibility_bluetooth_connected" msgid="4745196874551115205">"Bluetooth-verbinding ingesteld."</string> <string name="accessibility_bluetooth_device_icon" msgid="9163840051642587982">"Icoon voor bluetooth-apparaat"</string> <string name="accessibility_bluetooth_device_settings_gear" msgid="3314916468105272540">"Klik om de apparaatgegevens in te stellen"</string> + <!-- no translation found for accessibility_bluetooth_device_settings_see_all (9111952496905423543) --> + <skip /> + <!-- no translation found for accessibility_bluetooth_device_settings_pair_new_device (2435184865793496966) --> + <skip /> <string name="accessibility_battery_unknown" msgid="1807789554617976440">"Batterijpercentage onbekend."</string> <string name="accessibility_bluetooth_name" msgid="7300973230214067678">"Verbonden met <xliff:g id="BLUETOOTH">%s</xliff:g>."</string> <string name="accessibility_cast_name" msgid="7344437925388773685">"Verbonden met <xliff:g id="CAST">%s</xliff:g>."</string> @@ -255,6 +259,10 @@ <string name="turn_on_bluetooth" msgid="5681370462180289071">"Bluetooth gebruiken"</string> <string name="quick_settings_bluetooth_device_connected" msgid="7884777006729260996">"Verbonden"</string> <string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Opgeslagen"</string> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_disconnect (415980329093277342) --> + <skip /> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_activate (3724301751036877403) --> + <skip /> <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="4182034939479344093">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g> batterijniveau"</string> <string name="quick_settings_bluetooth_secondary_label_audio" msgid="780333390310051161">"Audio"</string> <string name="quick_settings_bluetooth_secondary_label_headset" msgid="2332093067553000852">"Headset"</string> @@ -397,10 +405,8 @@ <string name="keyguard_indication_charging_time_slowly" msgid="301936949731705417">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Langzaam opladen • Vol over <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> <string name="keyguard_indication_charging_time_dock" msgid="3149328898931741271">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Opladen • Vol over <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> <string name="communal_tutorial_indicator_text" msgid="4503010353591430123">"Swipe naar links om de communitytutorial te starten"</string> - <!-- no translation found for button_to_open_widget_picker (8007261659745030810) --> - <skip /> - <!-- no translation found for button_to_remove_widget (1511255853677835341) --> - <skip /> + <string name="button_to_open_widget_picker" msgid="8007261659745030810">"Open de widgetkiezer"</string> + <string name="button_to_remove_widget" msgid="1511255853677835341">"Verwijder een widget"</string> <string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"Gebruiker wijzigen"</string> <string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"pull-downmenu"</string> <string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"Alle apps en gegevens in deze sessie worden verwijderd."</string> @@ -1209,8 +1215,6 @@ <string name="privacy_dialog_recent_app_usage_1" msgid="2551340497722370109">"Recent gebruikt door <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g>)"</string> <string name="privacy_dialog_active_app_usage_2" msgid="2770926061339921767">"Gebruikt door <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>)"</string> <string name="privacy_dialog_recent_app_usage_2" msgid="2874689735085367167">"Recent gebruikt door <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>)"</string> - <!-- no translation found for keyboard_backlight_dialog_title (8273102932345564724) --> - <skip /> - <!-- no translation found for keyboard_backlight_value (7336398765584393538) --> - <skip /> + <string name="keyboard_backlight_dialog_title" msgid="8273102932345564724">"Achtergrondverlichting van toetsenbord"</string> + <string name="keyboard_backlight_value" msgid="7336398765584393538">"Niveau %1$d van %2$d"</string> </resources> diff --git a/packages/SystemUI/res/values-or/strings.xml b/packages/SystemUI/res/values-or/strings.xml index 62bfdec7adda..a7726277eab9 100644 --- a/packages/SystemUI/res/values-or/strings.xml +++ b/packages/SystemUI/res/values-or/strings.xml @@ -197,6 +197,10 @@ <string name="accessibility_bluetooth_connected" msgid="4745196874551115205">"ବ୍ଲୁଟୂଥ୍ ସଂଯୋଗ କରାଯାଇଛି।"</string> <string name="accessibility_bluetooth_device_icon" msgid="9163840051642587982">"ବ୍ଲୁଟୁଥ ଡିଭାଇସ ଆଇକନ"</string> <string name="accessibility_bluetooth_device_settings_gear" msgid="3314916468105272540">"ଡିଭାଇସ ବିବରଣୀକୁ କନଫିଗର କରିବା ପାଇଁ କ୍ଲିକ କରନ୍ତୁ"</string> + <!-- no translation found for accessibility_bluetooth_device_settings_see_all (9111952496905423543) --> + <skip /> + <!-- no translation found for accessibility_bluetooth_device_settings_pair_new_device (2435184865793496966) --> + <skip /> <string name="accessibility_battery_unknown" msgid="1807789554617976440">"ବ୍ୟାଟେରୀ ଶତକଡ଼ା ଅଜଣା ଅଟେ।"</string> <string name="accessibility_bluetooth_name" msgid="7300973230214067678">"<xliff:g id="BLUETOOTH">%s</xliff:g> ସହ ସଂଯୁକ୍ତ"</string> <string name="accessibility_cast_name" msgid="7344437925388773685">"<xliff:g id="CAST">%s</xliff:g> ସହିତ ସଂଯୁକ୍ତ।"</string> @@ -255,6 +259,10 @@ <string name="turn_on_bluetooth" msgid="5681370462180289071">"ବ୍ଲୁଟୁଥ ବ୍ୟବହାର କରନ୍ତୁ"</string> <string name="quick_settings_bluetooth_device_connected" msgid="7884777006729260996">"କନେକ୍ଟ କରାଯାଇଛି"</string> <string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"ସେଭ କରାଯାଇଛି"</string> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_disconnect (415980329093277342) --> + <skip /> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_activate (3724301751036877403) --> + <skip /> <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="4182034939479344093">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g> ବ୍ୟାଟେରୀ"</string> <string name="quick_settings_bluetooth_secondary_label_audio" msgid="780333390310051161">"ଅଡିଓ"</string> <string name="quick_settings_bluetooth_secondary_label_headset" msgid="2332093067553000852">"ହେଡସେଟ୍"</string> @@ -396,12 +404,9 @@ <string name="keyguard_indication_charging_time_fast" msgid="8390311020603859480">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • ଶୀଘ୍ର ଚାର୍ଜ ହେଉଛି • <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>ରେ ସମ୍ପୂର୍ଣ୍ଣ ହେବ"</string> <string name="keyguard_indication_charging_time_slowly" msgid="301936949731705417">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • ଧୀରେ ଚାର୍ଜ ହେଉଛି • <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>ରେ ସମ୍ପୂର୍ଣ୍ଣ ହେବ"</string> <string name="keyguard_indication_charging_time_dock" msgid="3149328898931741271">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • ଚାର୍ଜ ହେଉଛି • <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>ରେ ସମ୍ପୂର୍ଣ୍ଣ ହେବ"</string> - <!-- no translation found for communal_tutorial_indicator_text (4503010353591430123) --> - <skip /> - <!-- no translation found for button_to_open_widget_picker (8007261659745030810) --> - <skip /> - <!-- no translation found for button_to_remove_widget (1511255853677835341) --> - <skip /> + <string name="communal_tutorial_indicator_text" msgid="4503010353591430123">"କମ୍ୟୁନାଲ ଟ୍ୟୁଟୋରିଆଲ ଆରମ୍ଭ କରିବା ପାଇଁ ବାମକୁ ସ୍ୱାଇପ କରନ୍ତୁ"</string> + <string name="button_to_open_widget_picker" msgid="8007261659745030810">"ୱିଜେଟ ପିକର ଖୋଲନ୍ତୁ"</string> + <string name="button_to_remove_widget" msgid="1511255853677835341">"ଏକ ୱିଜେଟକୁ କାଢ଼ି ଦିଅନ୍ତୁ"</string> <string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"ୟୁଜର୍ ବଦଳାନ୍ତୁ"</string> <string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"ପୁଲଡାଉନ ମେନୁ"</string> <string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"ଏହି ସେସନର ସମସ୍ତ ଆପ୍ ଓ ଡାଟା ଡିଲିଟ୍ ହୋଇଯିବ।"</string> @@ -413,7 +418,7 @@ <string name="guest_notification_session_active" msgid="5567273684713471450">"ଆପଣ ଅତିଥି ମୋଡରେ ଅଛନ୍ତି"</string> <string name="user_add_user_message_guest_remove" msgid="5589286604543355007">\n\n"ଜଣେ ନୂଆ ଉପଯୋଗକର୍ତ୍ତାଙ୍କୁ ଯୋଗ କରିବା ଦ୍ୱାରା ଅତିଥି ମୋଡରୁ ବାହାରି ଯିବ ଏବଂ ବର୍ତ୍ତମାନର ଅତିଥି ସେସନରୁ ସମସ୍ତ ଆପ ଓ ଡାଟା ଡିଲିଟ ହୋଇଯିବ।"</string> <string name="user_limit_reached_title" msgid="2429229448830346057">"ଉପଯୋଗକର୍ତ୍ତା ସୀମାରେ ପହଞ୍ଚିଛି"</string> - <string name="user_limit_reached_message" msgid="1070703858915935796">"{count,plural, =1{କେବଳ ଜଣେ ଉପଯୋଗକର୍ତ୍ତା ତିଆରି କରାଯାଇପାରିବ।}other{କେବଳ # ଜଣ ଉପଯୋଗକର୍ତ୍ତା ତିଆରି କରାଯାଇପାରିବ।}}"</string> + <string name="user_limit_reached_message" msgid="1070703858915935796">"{count,plural, =1{କେବଳ ଜଣେ ୟୁଜର ତିଆରି କରାଯାଇପାରିବ।}other{କେବଳ # ଜଣ ୟୁଜର ତିଆରି କରାଯାଇପାରିବ।}}"</string> <string name="user_remove_user_title" msgid="9124124694835811874">"ୟୁଜରଙ୍କୁ ବାହାର କରିବେ?"</string> <string name="user_remove_user_message" msgid="6702834122128031833">"ଏହି ୟୁଜରଙ୍କ ସମସ୍ତ ଆପ୍ ଓ ଡାଟା ଡିଲିଟ୍ ହେବ।"</string> <string name="user_remove_user_remove" msgid="8387386066949061256">"କାଢ଼ି ଦିଅନ୍ତୁ"</string> @@ -509,7 +514,7 @@ <string name="sound_settings" msgid="8874581353127418308">"ସାଉଣ୍ଡ ଓ ଭାଇବ୍ରେସନ"</string> <string name="volume_panel_dialog_settings_button" msgid="2513228491513390310">"ସେଟିଂସ"</string> <string name="csd_lowered_title" product="default" msgid="2464112924151691129">"ଭଲ୍ୟୁମକୁ ସୁରକ୍ଷିତ ଲେଭେଲକୁ କମ କରାଯାଇଛି"</string> - <string name="csd_system_lowered_text" product="default" msgid="1250251883692996888">"ସୁପାରିଶ କରାଯାଇଥିବା ଅପେକ୍ଷା ଅଧିକ ସମୟ ପାଇଁ ହେଡଫୋନର ଭଲ୍ୟୁମ ଅଧିକ ଅଛି"</string> + <string name="csd_system_lowered_text" product="default" msgid="1250251883692996888">"ସୁପାରିଶ ଭଲ୍ୟୁମ ଠାରୁ ହେଡଫୋନର ଭଲ୍ୟୁମ ଅଧିକ ଅଛି"</string> <string name="csd_500_system_lowered_text" product="default" msgid="7414943302186884124">"ଏହି ସପ୍ତାହ ପାଇଁ ହେଡଫୋନର ଭଲ୍ୟୁମ ସୁରକ୍ଷିତ ସୀମାକୁ ଅତିକ୍ରମ କରିଛି"</string> <string name="csd_button_keep_listening" product="default" msgid="4093794049149286784">"ଶୁଣିବା ଜାରି ରଖନ୍ତୁ"</string> <string name="csd_button_lower_volume" product="default" msgid="5347210412376264579">"ଭଲ୍ୟୁମ କମାନ୍ତୁ"</string> @@ -1210,8 +1215,6 @@ <string name="privacy_dialog_recent_app_usage_1" msgid="2551340497722370109">"ଏବେ <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g>) ଦ୍ୱାରା ବ୍ୟବହାର କରାଯାଉଛି"</string> <string name="privacy_dialog_active_app_usage_2" msgid="2770926061339921767">"<xliff:g id="APP_NAME">%1$s</xliff:g> ଦ୍ୱାରା ବ୍ୟବହାର କରାଯାଉଛି (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>)"</string> <string name="privacy_dialog_recent_app_usage_2" msgid="2874689735085367167">"ଏବେ <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>) ଦ୍ୱାରା ବ୍ୟବହାର କରାଯାଉଛି"</string> - <!-- no translation found for keyboard_backlight_dialog_title (8273102932345564724) --> - <skip /> - <!-- no translation found for keyboard_backlight_value (7336398765584393538) --> - <skip /> + <string name="keyboard_backlight_dialog_title" msgid="8273102932345564724">"କୀବୋର୍ଡ ବେକଲାଇଟ"</string> + <string name="keyboard_backlight_value" msgid="7336398765584393538">"%2$dରୁ %1$d ନମ୍ବର ଲେଭେଲ"</string> </resources> diff --git a/packages/SystemUI/res/values-pa/strings.xml b/packages/SystemUI/res/values-pa/strings.xml index f14962eaf0c3..bb956b6bc0a1 100644 --- a/packages/SystemUI/res/values-pa/strings.xml +++ b/packages/SystemUI/res/values-pa/strings.xml @@ -197,6 +197,10 @@ <string name="accessibility_bluetooth_connected" msgid="4745196874551115205">"Bluetooth ਕਨੈਕਟ ਕੀਤੀ।"</string> <string name="accessibility_bluetooth_device_icon" msgid="9163840051642587982">"ਬਲੂਟੁੱਥ ਡੀਵਾਈਸ ਦਾ ਪ੍ਰਤੀਕ"</string> <string name="accessibility_bluetooth_device_settings_gear" msgid="3314916468105272540">"ਡੀਵਾਈਸ ਦੇ ਵੇਰਵੇ ਦਾ ਸੰਰੂਪਣ ਕਰਨ ਲਈ ਕਲਿੱਕ ਕਰੋ"</string> + <!-- no translation found for accessibility_bluetooth_device_settings_see_all (9111952496905423543) --> + <skip /> + <!-- no translation found for accessibility_bluetooth_device_settings_pair_new_device (2435184865793496966) --> + <skip /> <string name="accessibility_battery_unknown" msgid="1807789554617976440">"ਬੈਟਰੀ ਪ੍ਰਤੀਸ਼ਤ ਅਗਿਆਤ ਹੈ।"</string> <string name="accessibility_bluetooth_name" msgid="7300973230214067678">"<xliff:g id="BLUETOOTH">%s</xliff:g> ਨਾਲ ਕਨੈਕਟ ਕੀਤਾ।"</string> <string name="accessibility_cast_name" msgid="7344437925388773685">"<xliff:g id="CAST">%s</xliff:g> ਨਾਲ ਕਨੈਕਟ ਕੀਤਾ ਗਿਆ।"</string> @@ -255,6 +259,10 @@ <string name="turn_on_bluetooth" msgid="5681370462180289071">"ਬਲੂਟੁੱਥ ਵਰਤੋ"</string> <string name="quick_settings_bluetooth_device_connected" msgid="7884777006729260996">"ਕਨੈਕਟ ਹੈ"</string> <string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"ਰੱਖਿਅਤ ਕੀਤਾ ਗਿਆ"</string> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_disconnect (415980329093277342) --> + <skip /> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_activate (3724301751036877403) --> + <skip /> <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="4182034939479344093">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g> ਬੈਟਰੀ"</string> <string name="quick_settings_bluetooth_secondary_label_audio" msgid="780333390310051161">"ਆਡੀਓ"</string> <string name="quick_settings_bluetooth_secondary_label_headset" msgid="2332093067553000852">"ਹੈੱਡਸੈੱਟ"</string> @@ -396,12 +404,9 @@ <string name="keyguard_indication_charging_time_fast" msgid="8390311020603859480">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • ਤੇਜ਼ ਚਾਰਜ ਹੋ ਰਿਹਾ ਹੈ • <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g> ਵਿੱਚ ਪੂਰਾ ਚਾਰਜ ਹੋਵੇਗਾ"</string> <string name="keyguard_indication_charging_time_slowly" msgid="301936949731705417">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • ਹੌਲੀ ਚਾਰਜ ਹੋ ਰਿਹਾ ਹੈ • <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g> ਵਿੱਚ ਪੂਰਾ ਚਾਰਜ ਹੋਵੇਗਾ"</string> <string name="keyguard_indication_charging_time_dock" msgid="3149328898931741271">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • ਚਾਰਜ ਹੋ ਰਿਹਾ ਹੈ • <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g> ਵਿੱਚ ਪੂਰਾ ਚਾਰਜ ਹੋਵੇਗਾ"</string> - <!-- no translation found for communal_tutorial_indicator_text (4503010353591430123) --> - <skip /> - <!-- no translation found for button_to_open_widget_picker (8007261659745030810) --> - <skip /> - <!-- no translation found for button_to_remove_widget (1511255853677835341) --> - <skip /> + <string name="communal_tutorial_indicator_text" msgid="4503010353591430123">"ਭਾਈਚਾਰਕ ਟਿਊਟੋਰੀਅਲ ਸ਼ੁਰੂ ਕਰਨ ਲਈ ਖੱਬੇ ਪਾਸੇ ਵੱਲ ਸਵਾਈਪ ਕਰੋ"</string> + <string name="button_to_open_widget_picker" msgid="8007261659745030810">"ਵਿਜੇਟ ਚੋਣਕਾਰ ਨੂੰ ਖੋਲ੍ਹੋ"</string> + <string name="button_to_remove_widget" msgid="1511255853677835341">"ਵਿਜੇਟ ਨੂੰ ਹਟਾਓ"</string> <string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"ਵਰਤੋਂਕਾਰ ਸਵਿੱਚ ਕਰੋ"</string> <string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"ਪੁੱਲਡਾਊਨ ਮੀਨੂ"</string> <string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"ਇਸ ਸੈਸ਼ਨ ਵਿਚਲੀਆਂ ਸਾਰੀਆਂ ਐਪਾਂ ਅਤੇ ਡਾਟਾ ਨੂੰ ਮਿਟਾ ਦਿੱਤਾ ਜਾਏਗਾ।"</string> @@ -1210,8 +1215,6 @@ <string name="privacy_dialog_recent_app_usage_1" msgid="2551340497722370109">"ਹਾਲ ਹੀ ਵਿੱਚ <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g>) ਵੱਲੋਂ ਵਰਤਿਆ ਗਿਆ"</string> <string name="privacy_dialog_active_app_usage_2" msgid="2770926061339921767">"<xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>) ਵੱਲੋਂ ਵਰਤੋਂ ਕੀਤੀ ਜਾ ਰਹੀ ਹੈ"</string> <string name="privacy_dialog_recent_app_usage_2" msgid="2874689735085367167">"ਹਾਲ ਹੀ ਵਿੱਚ <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>) ਵੱਲੋਂ ਵਰਤਿਆ ਗਿਆ"</string> - <!-- no translation found for keyboard_backlight_dialog_title (8273102932345564724) --> - <skip /> - <!-- no translation found for keyboard_backlight_value (7336398765584393538) --> - <skip /> + <string name="keyboard_backlight_dialog_title" msgid="8273102932345564724">"ਕੀ-ਬੋਰਡ ਬੈਕਲਾਈਟ"</string> + <string name="keyboard_backlight_value" msgid="7336398765584393538">"%2$d ਵਿੱਚੋਂ %1$d ਪੱਧਰ"</string> </resources> diff --git a/packages/SystemUI/res/values-pl/strings.xml b/packages/SystemUI/res/values-pl/strings.xml index 4be47d458f5e..a28329f74a14 100644 --- a/packages/SystemUI/res/values-pl/strings.xml +++ b/packages/SystemUI/res/values-pl/strings.xml @@ -197,6 +197,10 @@ <string name="accessibility_bluetooth_connected" msgid="4745196874551115205">"Bluetooth połączony."</string> <string name="accessibility_bluetooth_device_icon" msgid="9163840051642587982">"Ikona urządzenia Bluetooth"</string> <string name="accessibility_bluetooth_device_settings_gear" msgid="3314916468105272540">"Kliknij, aby skonfigurować szczegóły urządzenia"</string> + <!-- no translation found for accessibility_bluetooth_device_settings_see_all (9111952496905423543) --> + <skip /> + <!-- no translation found for accessibility_bluetooth_device_settings_pair_new_device (2435184865793496966) --> + <skip /> <string name="accessibility_battery_unknown" msgid="1807789554617976440">"Poziom naładowania baterii jest nieznany."</string> <string name="accessibility_bluetooth_name" msgid="7300973230214067678">"Połączono z <xliff:g id="BLUETOOTH">%s</xliff:g>."</string> <string name="accessibility_cast_name" msgid="7344437925388773685">"Połączono z urządzeniem <xliff:g id="CAST">%s</xliff:g>."</string> @@ -255,6 +259,10 @@ <string name="turn_on_bluetooth" msgid="5681370462180289071">"Użyj Bluetootha"</string> <string name="quick_settings_bluetooth_device_connected" msgid="7884777006729260996">"Połączone"</string> <string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Zapisane"</string> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_disconnect (415980329093277342) --> + <skip /> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_activate (3724301751036877403) --> + <skip /> <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="4182034939479344093">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g> naładowania baterii"</string> <string name="quick_settings_bluetooth_secondary_label_audio" msgid="780333390310051161">"Dźwięk"</string> <string name="quick_settings_bluetooth_secondary_label_headset" msgid="2332093067553000852">"Zestaw słuchawkowy"</string> @@ -396,8 +404,7 @@ <string name="keyguard_indication_charging_time_fast" msgid="8390311020603859480">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Szybkie ładowanie • Pełne naładowanie za <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> <string name="keyguard_indication_charging_time_slowly" msgid="301936949731705417">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Wolne ładowanie • Pełne naładowanie za <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> <string name="keyguard_indication_charging_time_dock" msgid="3149328898931741271">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Ładowanie • Pełne naładowanie za <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> - <!-- no translation found for communal_tutorial_indicator_text (4503010353591430123) --> - <skip /> + <string name="communal_tutorial_indicator_text" msgid="4503010353591430123">"Aby uruchomić wspólny samouczek, przeciągnij palcem w lewo"</string> <!-- no translation found for button_to_open_widget_picker (8007261659745030810) --> <skip /> <!-- no translation found for button_to_remove_widget (1511255853677835341) --> diff --git a/packages/SystemUI/res/values-pt-rBR/strings.xml b/packages/SystemUI/res/values-pt-rBR/strings.xml index 509a3bf807e8..0c0aafa6651e 100644 --- a/packages/SystemUI/res/values-pt-rBR/strings.xml +++ b/packages/SystemUI/res/values-pt-rBR/strings.xml @@ -197,6 +197,10 @@ <string name="accessibility_bluetooth_connected" msgid="4745196874551115205">"Bluetooth conectado."</string> <string name="accessibility_bluetooth_device_icon" msgid="9163840051642587982">"Ícone de dispositivo Bluetooth"</string> <string name="accessibility_bluetooth_device_settings_gear" msgid="3314916468105272540">"Clique para configurar os detalhes do dispositivo"</string> + <!-- no translation found for accessibility_bluetooth_device_settings_see_all (9111952496905423543) --> + <skip /> + <!-- no translation found for accessibility_bluetooth_device_settings_pair_new_device (2435184865793496966) --> + <skip /> <string name="accessibility_battery_unknown" msgid="1807789554617976440">"Porcentagem da bateria desconhecida."</string> <string name="accessibility_bluetooth_name" msgid="7300973230214067678">"Conectado a <xliff:g id="BLUETOOTH">%s</xliff:g>."</string> <string name="accessibility_cast_name" msgid="7344437925388773685">"Conectado a <xliff:g id="CAST">%s</xliff:g>."</string> @@ -255,6 +259,10 @@ <string name="turn_on_bluetooth" msgid="5681370462180289071">"Usar Bluetooth"</string> <string name="quick_settings_bluetooth_device_connected" msgid="7884777006729260996">"Conectado"</string> <string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Salvo"</string> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_disconnect (415980329093277342) --> + <skip /> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_activate (3724301751036877403) --> + <skip /> <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="4182034939479344093">"Bateria: <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g>"</string> <string name="quick_settings_bluetooth_secondary_label_audio" msgid="780333390310051161">"Áudio"</string> <string name="quick_settings_bluetooth_secondary_label_headset" msgid="2332093067553000852">"Fone de ouvido"</string> @@ -397,10 +405,8 @@ <string name="keyguard_indication_charging_time_slowly" msgid="301936949731705417">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Carga lenta • Conclusão em <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> <string name="keyguard_indication_charging_time_dock" msgid="3149328898931741271">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Carregando • Conclusão em <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> <string name="communal_tutorial_indicator_text" msgid="4503010353591430123">"Deslize para a esquerda para iniciar o tutorial compartilhado"</string> - <!-- no translation found for button_to_open_widget_picker (8007261659745030810) --> - <skip /> - <!-- no translation found for button_to_remove_widget (1511255853677835341) --> - <skip /> + <string name="button_to_open_widget_picker" msgid="8007261659745030810">"Abrir o seletor de widgets"</string> + <string name="button_to_remove_widget" msgid="1511255853677835341">"Remover um widget"</string> <string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"Trocar usuário"</string> <string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"menu suspenso"</string> <string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"Todos os apps e dados nesta sessão serão excluídos."</string> @@ -1209,8 +1215,6 @@ <string name="privacy_dialog_recent_app_usage_1" msgid="2551340497722370109">"Usado recentemente pelo app <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g>)"</string> <string name="privacy_dialog_active_app_usage_2" msgid="2770926061339921767">"Em uso pelo app <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>)"</string> <string name="privacy_dialog_recent_app_usage_2" msgid="2874689735085367167">"Usado recentemente pelo app <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>)"</string> - <!-- no translation found for keyboard_backlight_dialog_title (8273102932345564724) --> - <skip /> - <!-- no translation found for keyboard_backlight_value (7336398765584393538) --> - <skip /> + <string name="keyboard_backlight_dialog_title" msgid="8273102932345564724">"Luz de fundo do teclado"</string> + <string name="keyboard_backlight_value" msgid="7336398765584393538">"Nível %1$d de %2$d"</string> </resources> diff --git a/packages/SystemUI/res/values-pt-rPT/strings.xml b/packages/SystemUI/res/values-pt-rPT/strings.xml index 46476c096eb3..0cfc7aaecc81 100644 --- a/packages/SystemUI/res/values-pt-rPT/strings.xml +++ b/packages/SystemUI/res/values-pt-rPT/strings.xml @@ -197,6 +197,10 @@ <string name="accessibility_bluetooth_connected" msgid="4745196874551115205">"Bluetooth ligado."</string> <string name="accessibility_bluetooth_device_icon" msgid="9163840051642587982">"Ícone de dispositivo Bluetooth"</string> <string name="accessibility_bluetooth_device_settings_gear" msgid="3314916468105272540">"Clique para configurar o detalhe do dispositivo"</string> + <!-- no translation found for accessibility_bluetooth_device_settings_see_all (9111952496905423543) --> + <skip /> + <!-- no translation found for accessibility_bluetooth_device_settings_pair_new_device (2435184865793496966) --> + <skip /> <string name="accessibility_battery_unknown" msgid="1807789554617976440">"Percentagem da bateria desconhecida."</string> <string name="accessibility_bluetooth_name" msgid="7300973230214067678">"Ligado a <xliff:g id="BLUETOOTH">%s</xliff:g>."</string> <string name="accessibility_cast_name" msgid="7344437925388773685">"Ligado a <xliff:g id="CAST">%s</xliff:g>."</string> @@ -255,6 +259,10 @@ <string name="turn_on_bluetooth" msgid="5681370462180289071">"Usar Bluetooth"</string> <string name="quick_settings_bluetooth_device_connected" msgid="7884777006729260996">"Ligado"</string> <string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Guardado"</string> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_disconnect (415980329093277342) --> + <skip /> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_activate (3724301751036877403) --> + <skip /> <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="4182034939479344093">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g> de bateria"</string> <string name="quick_settings_bluetooth_secondary_label_audio" msgid="780333390310051161">"Áudio"</string> <string name="quick_settings_bluetooth_secondary_label_headset" msgid="2332093067553000852">"Ausc. c/ mic. integ."</string> @@ -397,10 +405,8 @@ <string name="keyguard_indication_charging_time_slowly" msgid="301936949731705417">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • A carregar lentamente • Carga completa em <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> <string name="keyguard_indication_charging_time_dock" msgid="3149328898931741271">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • A carregar • Carga completa em <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> <string name="communal_tutorial_indicator_text" msgid="4503010353591430123">"Deslize rapidamente para a esquerda para iniciar o tutorial coletivo"</string> - <!-- no translation found for button_to_open_widget_picker (8007261659745030810) --> - <skip /> - <!-- no translation found for button_to_remove_widget (1511255853677835341) --> - <skip /> + <string name="button_to_open_widget_picker" msgid="8007261659745030810">"Abrir seletor de widgets"</string> + <string name="button_to_remove_widget" msgid="1511255853677835341">"Remover widget"</string> <string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"Mudar utilizador"</string> <string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"menu pendente"</string> <string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"Todas as apps e dados desta sessão serão eliminados."</string> @@ -1209,8 +1215,6 @@ <string name="privacy_dialog_recent_app_usage_1" msgid="2551340497722370109">"Usado recentemente pela app <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g>)"</string> <string name="privacy_dialog_active_app_usage_2" msgid="2770926061339921767">"Em utilização pela app <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>)"</string> <string name="privacy_dialog_recent_app_usage_2" msgid="2874689735085367167">"Usado recentemente pela app <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>)"</string> - <!-- no translation found for keyboard_backlight_dialog_title (8273102932345564724) --> - <skip /> - <!-- no translation found for keyboard_backlight_value (7336398765584393538) --> - <skip /> + <string name="keyboard_backlight_dialog_title" msgid="8273102932345564724">"Luz do teclado"</string> + <string name="keyboard_backlight_value" msgid="7336398765584393538">"Nível %1$d de %2$d"</string> </resources> diff --git a/packages/SystemUI/res/values-pt/strings.xml b/packages/SystemUI/res/values-pt/strings.xml index 509a3bf807e8..0c0aafa6651e 100644 --- a/packages/SystemUI/res/values-pt/strings.xml +++ b/packages/SystemUI/res/values-pt/strings.xml @@ -197,6 +197,10 @@ <string name="accessibility_bluetooth_connected" msgid="4745196874551115205">"Bluetooth conectado."</string> <string name="accessibility_bluetooth_device_icon" msgid="9163840051642587982">"Ícone de dispositivo Bluetooth"</string> <string name="accessibility_bluetooth_device_settings_gear" msgid="3314916468105272540">"Clique para configurar os detalhes do dispositivo"</string> + <!-- no translation found for accessibility_bluetooth_device_settings_see_all (9111952496905423543) --> + <skip /> + <!-- no translation found for accessibility_bluetooth_device_settings_pair_new_device (2435184865793496966) --> + <skip /> <string name="accessibility_battery_unknown" msgid="1807789554617976440">"Porcentagem da bateria desconhecida."</string> <string name="accessibility_bluetooth_name" msgid="7300973230214067678">"Conectado a <xliff:g id="BLUETOOTH">%s</xliff:g>."</string> <string name="accessibility_cast_name" msgid="7344437925388773685">"Conectado a <xliff:g id="CAST">%s</xliff:g>."</string> @@ -255,6 +259,10 @@ <string name="turn_on_bluetooth" msgid="5681370462180289071">"Usar Bluetooth"</string> <string name="quick_settings_bluetooth_device_connected" msgid="7884777006729260996">"Conectado"</string> <string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Salvo"</string> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_disconnect (415980329093277342) --> + <skip /> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_activate (3724301751036877403) --> + <skip /> <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="4182034939479344093">"Bateria: <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g>"</string> <string name="quick_settings_bluetooth_secondary_label_audio" msgid="780333390310051161">"Áudio"</string> <string name="quick_settings_bluetooth_secondary_label_headset" msgid="2332093067553000852">"Fone de ouvido"</string> @@ -397,10 +405,8 @@ <string name="keyguard_indication_charging_time_slowly" msgid="301936949731705417">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Carga lenta • Conclusão em <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> <string name="keyguard_indication_charging_time_dock" msgid="3149328898931741271">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Carregando • Conclusão em <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> <string name="communal_tutorial_indicator_text" msgid="4503010353591430123">"Deslize para a esquerda para iniciar o tutorial compartilhado"</string> - <!-- no translation found for button_to_open_widget_picker (8007261659745030810) --> - <skip /> - <!-- no translation found for button_to_remove_widget (1511255853677835341) --> - <skip /> + <string name="button_to_open_widget_picker" msgid="8007261659745030810">"Abrir o seletor de widgets"</string> + <string name="button_to_remove_widget" msgid="1511255853677835341">"Remover um widget"</string> <string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"Trocar usuário"</string> <string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"menu suspenso"</string> <string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"Todos os apps e dados nesta sessão serão excluídos."</string> @@ -1209,8 +1215,6 @@ <string name="privacy_dialog_recent_app_usage_1" msgid="2551340497722370109">"Usado recentemente pelo app <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g>)"</string> <string name="privacy_dialog_active_app_usage_2" msgid="2770926061339921767">"Em uso pelo app <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>)"</string> <string name="privacy_dialog_recent_app_usage_2" msgid="2874689735085367167">"Usado recentemente pelo app <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>)"</string> - <!-- no translation found for keyboard_backlight_dialog_title (8273102932345564724) --> - <skip /> - <!-- no translation found for keyboard_backlight_value (7336398765584393538) --> - <skip /> + <string name="keyboard_backlight_dialog_title" msgid="8273102932345564724">"Luz de fundo do teclado"</string> + <string name="keyboard_backlight_value" msgid="7336398765584393538">"Nível %1$d de %2$d"</string> </resources> diff --git a/packages/SystemUI/res/values-ro/strings.xml b/packages/SystemUI/res/values-ro/strings.xml index c737b5da465f..4df30fa5636b 100644 --- a/packages/SystemUI/res/values-ro/strings.xml +++ b/packages/SystemUI/res/values-ro/strings.xml @@ -197,6 +197,10 @@ <string name="accessibility_bluetooth_connected" msgid="4745196874551115205">"Conectat prin Bluetooth."</string> <string name="accessibility_bluetooth_device_icon" msgid="9163840051642587982">"Pictograma de dispozitiv Bluetooth"</string> <string name="accessibility_bluetooth_device_settings_gear" msgid="3314916468105272540">"Dă clic pentru a configura detaliile dispozitivului"</string> + <!-- no translation found for accessibility_bluetooth_device_settings_see_all (9111952496905423543) --> + <skip /> + <!-- no translation found for accessibility_bluetooth_device_settings_pair_new_device (2435184865793496966) --> + <skip /> <string name="accessibility_battery_unknown" msgid="1807789554617976440">"Procentajul bateriei este necunoscut."</string> <string name="accessibility_bluetooth_name" msgid="7300973230214067678">"Conectat la <xliff:g id="BLUETOOTH">%s</xliff:g>."</string> <string name="accessibility_cast_name" msgid="7344437925388773685">"S-a stabilit conexiunea la <xliff:g id="CAST">%s</xliff:g>."</string> @@ -255,6 +259,10 @@ <string name="turn_on_bluetooth" msgid="5681370462180289071">"Folosește Bluetooth"</string> <string name="quick_settings_bluetooth_device_connected" msgid="7884777006729260996">"Conectat"</string> <string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Salvat"</string> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_disconnect (415980329093277342) --> + <skip /> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_activate (3724301751036877403) --> + <skip /> <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="4182034939479344093">"Nivelul bateriei: <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g>"</string> <string name="quick_settings_bluetooth_secondary_label_audio" msgid="780333390310051161">"Audio"</string> <string name="quick_settings_bluetooth_secondary_label_headset" msgid="2332093067553000852">"Căști"</string> @@ -396,8 +404,7 @@ <string name="keyguard_indication_charging_time_fast" msgid="8390311020603859480">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Se încarcă rapid • <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g> până la încărcarea completă"</string> <string name="keyguard_indication_charging_time_slowly" msgid="301936949731705417">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Se încarcă lent • <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g> până la încărcarea completă"</string> <string name="keyguard_indication_charging_time_dock" msgid="3149328898931741271">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Se încarcă • <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g> până la încărcarea completă"</string> - <!-- no translation found for communal_tutorial_indicator_text (4503010353591430123) --> - <skip /> + <string name="communal_tutorial_indicator_text" msgid="4503010353591430123">"Glisează spre stânga pentru a începe tutorialul pentru comunitate"</string> <!-- no translation found for button_to_open_widget_picker (8007261659745030810) --> <skip /> <!-- no translation found for button_to_remove_widget (1511255853677835341) --> diff --git a/packages/SystemUI/res/values-ru/strings.xml b/packages/SystemUI/res/values-ru/strings.xml index bfd005613a9e..c29dc11b5f5b 100644 --- a/packages/SystemUI/res/values-ru/strings.xml +++ b/packages/SystemUI/res/values-ru/strings.xml @@ -197,6 +197,10 @@ <string name="accessibility_bluetooth_connected" msgid="4745196874551115205">"Bluetooth-соединение установлено."</string> <string name="accessibility_bluetooth_device_icon" msgid="9163840051642587982">"Значок устройства Bluetooth"</string> <string name="accessibility_bluetooth_device_settings_gear" msgid="3314916468105272540">"Нажмите, чтобы изменить информацию об устройстве"</string> + <!-- no translation found for accessibility_bluetooth_device_settings_see_all (9111952496905423543) --> + <skip /> + <!-- no translation found for accessibility_bluetooth_device_settings_pair_new_device (2435184865793496966) --> + <skip /> <string name="accessibility_battery_unknown" msgid="1807789554617976440">"Уровень заряда батареи в процентах неизвестен."</string> <string name="accessibility_bluetooth_name" msgid="7300973230214067678">"<xliff:g id="BLUETOOTH">%s</xliff:g>: подключено."</string> <string name="accessibility_cast_name" msgid="7344437925388773685">"Подключено к: <xliff:g id="CAST">%s</xliff:g>."</string> @@ -255,6 +259,10 @@ <string name="turn_on_bluetooth" msgid="5681370462180289071">"Использовать"</string> <string name="quick_settings_bluetooth_device_connected" msgid="7884777006729260996">"Подключено"</string> <string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Сохранено"</string> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_disconnect (415980329093277342) --> + <skip /> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_activate (3724301751036877403) --> + <skip /> <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="4182034939479344093">"Заряд: <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g>"</string> <string name="quick_settings_bluetooth_secondary_label_audio" msgid="780333390310051161">"Аудиоустройство"</string> <string name="quick_settings_bluetooth_secondary_label_headset" msgid="2332093067553000852">"Гарнитура"</string> @@ -396,8 +404,7 @@ <string name="keyguard_indication_charging_time_fast" msgid="8390311020603859480">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Быстрая зарядка • Осталось <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> <string name="keyguard_indication_charging_time_slowly" msgid="301936949731705417">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Медленная зарядка • Осталось <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> <string name="keyguard_indication_charging_time_dock" msgid="3149328898931741271">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Зарядка • Осталось <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> - <!-- no translation found for communal_tutorial_indicator_text (4503010353591430123) --> - <skip /> + <string name="communal_tutorial_indicator_text" msgid="4503010353591430123">"Чтобы ознакомиться с руководством, проведите по экрану влево"</string> <!-- no translation found for button_to_open_widget_picker (8007261659745030810) --> <skip /> <!-- no translation found for button_to_remove_widget (1511255853677835341) --> diff --git a/packages/SystemUI/res/values-si/strings.xml b/packages/SystemUI/res/values-si/strings.xml index eb3b8e54e906..68bd1ce3413e 100644 --- a/packages/SystemUI/res/values-si/strings.xml +++ b/packages/SystemUI/res/values-si/strings.xml @@ -197,6 +197,10 @@ <string name="accessibility_bluetooth_connected" msgid="4745196874551115205">"බ්ලූටූත් සම්බන්ධිතයි."</string> <string name="accessibility_bluetooth_device_icon" msgid="9163840051642587982">"බ්ලූටූත් උපාංග නිරූපකය"</string> <string name="accessibility_bluetooth_device_settings_gear" msgid="3314916468105272540">"උපාංග විස්තර වින්යාස කිරීමට ක්ලික් කරන්න"</string> + <!-- no translation found for accessibility_bluetooth_device_settings_see_all (9111952496905423543) --> + <skip /> + <!-- no translation found for accessibility_bluetooth_device_settings_pair_new_device (2435184865793496966) --> + <skip /> <string name="accessibility_battery_unknown" msgid="1807789554617976440">"බැටරි ප්රතිශතය නොදනී."</string> <string name="accessibility_bluetooth_name" msgid="7300973230214067678">"<xliff:g id="BLUETOOTH">%s</xliff:g> වෙත සම්බන්ධ කරන ලදි."</string> <string name="accessibility_cast_name" msgid="7344437925388773685">"<xliff:g id="CAST">%s</xliff:g> වෙත සම්බන්ධ විය."</string> @@ -255,6 +259,10 @@ <string name="turn_on_bluetooth" msgid="5681370462180289071">"බ්ලූටූත් භාවිතා කරන්න"</string> <string name="quick_settings_bluetooth_device_connected" msgid="7884777006729260996">"සම්බන්ධිතයි"</string> <string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"සුරැකිණි"</string> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_disconnect (415980329093277342) --> + <skip /> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_activate (3724301751036877403) --> + <skip /> <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="4182034939479344093">"බැටරිය <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g>"</string> <string name="quick_settings_bluetooth_secondary_label_audio" msgid="780333390310051161">"ශ්රව්ය"</string> <string name="quick_settings_bluetooth_secondary_label_headset" msgid="2332093067553000852">"හෙඩ්සෙටය"</string> @@ -396,8 +404,7 @@ <string name="keyguard_indication_charging_time_fast" msgid="8390311020603859480">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • වේගයෙන් ආරෝපණය වෙමින් • <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>කින් සම්පූර්ණ වේ"</string> <string name="keyguard_indication_charging_time_slowly" msgid="301936949731705417">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • සෙමින් ආරෝපණය වෙමින් • <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>කින් සම්පූර්ණ වේ"</string> <string name="keyguard_indication_charging_time_dock" msgid="3149328898931741271">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • ආරෝපණය වෙමින් • <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>කින් සම්පූර්ණ වේ"</string> - <!-- no translation found for communal_tutorial_indicator_text (4503010353591430123) --> - <skip /> + <string name="communal_tutorial_indicator_text" msgid="4503010353591430123">"පොදු නිබන්ධනය ආරම්භ කිරීමට වමට ස්වයිප් කරන්න"</string> <!-- no translation found for button_to_open_widget_picker (8007261659745030810) --> <skip /> <!-- no translation found for button_to_remove_widget (1511255853677835341) --> diff --git a/packages/SystemUI/res/values-sk/strings.xml b/packages/SystemUI/res/values-sk/strings.xml index 6c4505b3c66b..f916bf272ba3 100644 --- a/packages/SystemUI/res/values-sk/strings.xml +++ b/packages/SystemUI/res/values-sk/strings.xml @@ -197,6 +197,10 @@ <string name="accessibility_bluetooth_connected" msgid="4745196874551115205">"Bluetooth pripojené."</string> <string name="accessibility_bluetooth_device_icon" msgid="9163840051642587982">"Ikona zariadenia s rozhraním Bluetooth"</string> <string name="accessibility_bluetooth_device_settings_gear" msgid="3314916468105272540">"Kliknutím nakonfigurujte podrobnosti o zariadení"</string> + <!-- no translation found for accessibility_bluetooth_device_settings_see_all (9111952496905423543) --> + <skip /> + <!-- no translation found for accessibility_bluetooth_device_settings_pair_new_device (2435184865793496966) --> + <skip /> <string name="accessibility_battery_unknown" msgid="1807789554617976440">"Percento batérie nie je známe."</string> <string name="accessibility_bluetooth_name" msgid="7300973230214067678">"Pripojené k zariadeniu <xliff:g id="BLUETOOTH">%s</xliff:g>."</string> <string name="accessibility_cast_name" msgid="7344437925388773685">"Pripojené k zariadeniu <xliff:g id="CAST">%s</xliff:g>."</string> @@ -255,6 +259,10 @@ <string name="turn_on_bluetooth" msgid="5681370462180289071">"Použiť Bluetooth"</string> <string name="quick_settings_bluetooth_device_connected" msgid="7884777006729260996">"Pripojené"</string> <string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Uložené"</string> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_disconnect (415980329093277342) --> + <skip /> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_activate (3724301751036877403) --> + <skip /> <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="4182034939479344093">"Batéria: <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g>"</string> <string name="quick_settings_bluetooth_secondary_label_audio" msgid="780333390310051161">"Zvuk"</string> <string name="quick_settings_bluetooth_secondary_label_headset" msgid="2332093067553000852">"Náhlavná súprava"</string> @@ -396,8 +404,7 @@ <string name="keyguard_indication_charging_time_fast" msgid="8390311020603859480">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Nabíja sa rýchlo • Do úplného nabitia zostáva <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> <string name="keyguard_indication_charging_time_slowly" msgid="301936949731705417">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Nabíja sa pomaly • Do úplného nabitia zostáva <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> <string name="keyguard_indication_charging_time_dock" msgid="3149328898931741271">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Nabíja sa • Do úplného nabitia zostáva <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> - <!-- no translation found for communal_tutorial_indicator_text (4503010353591430123) --> - <skip /> + <string name="communal_tutorial_indicator_text" msgid="4503010353591430123">"Potiahnutím doľava spustite komunitný návod"</string> <!-- no translation found for button_to_open_widget_picker (8007261659745030810) --> <skip /> <!-- no translation found for button_to_remove_widget (1511255853677835341) --> diff --git a/packages/SystemUI/res/values-sl/strings.xml b/packages/SystemUI/res/values-sl/strings.xml index eddb50c0974c..72de807d4c04 100644 --- a/packages/SystemUI/res/values-sl/strings.xml +++ b/packages/SystemUI/res/values-sl/strings.xml @@ -197,6 +197,10 @@ <string name="accessibility_bluetooth_connected" msgid="4745196874551115205">"Povezava Bluetooth vzpostavljena."</string> <string name="accessibility_bluetooth_device_icon" msgid="9163840051642587982">"Ikona naprave Bluetooth"</string> <string name="accessibility_bluetooth_device_settings_gear" msgid="3314916468105272540">"Kliknite za konfiguriranje podrobnosti o napravi"</string> + <!-- no translation found for accessibility_bluetooth_device_settings_see_all (9111952496905423543) --> + <skip /> + <!-- no translation found for accessibility_bluetooth_device_settings_pair_new_device (2435184865793496966) --> + <skip /> <string name="accessibility_battery_unknown" msgid="1807789554617976440">"Neznan odstotek napolnjenosti baterije."</string> <string name="accessibility_bluetooth_name" msgid="7300973230214067678">"Povezava vzpostavljena z: <xliff:g id="BLUETOOTH">%s</xliff:g>."</string> <string name="accessibility_cast_name" msgid="7344437925388773685">"Vzpostavljena povezava: <xliff:g id="CAST">%s</xliff:g>."</string> @@ -255,6 +259,10 @@ <string name="turn_on_bluetooth" msgid="5681370462180289071">"Uporabi Bluetooth"</string> <string name="quick_settings_bluetooth_device_connected" msgid="7884777006729260996">"Povezano"</string> <string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Shranjeno"</string> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_disconnect (415980329093277342) --> + <skip /> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_activate (3724301751036877403) --> + <skip /> <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="4182034939479344093">"Baterija na <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g>"</string> <string name="quick_settings_bluetooth_secondary_label_audio" msgid="780333390310051161">"Zvok"</string> <string name="quick_settings_bluetooth_secondary_label_headset" msgid="2332093067553000852">"Slušalke z mikrofonom"</string> @@ -396,8 +404,7 @@ <string name="keyguard_indication_charging_time_fast" msgid="8390311020603859480">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Hitro polnjenje • Napolnjeno čez <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> <string name="keyguard_indication_charging_time_slowly" msgid="301936949731705417">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Počasno polnjenje • Napolnjeno čez <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> <string name="keyguard_indication_charging_time_dock" msgid="3149328898931741271">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Polnjenje • Napolnjeno čez <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> - <!-- no translation found for communal_tutorial_indicator_text (4503010353591430123) --> - <skip /> + <string name="communal_tutorial_indicator_text" msgid="4503010353591430123">"Povlecite levo, da zaženete vadnico za skupnost"</string> <!-- no translation found for button_to_open_widget_picker (8007261659745030810) --> <skip /> <!-- no translation found for button_to_remove_widget (1511255853677835341) --> diff --git a/packages/SystemUI/res/values-sq/strings.xml b/packages/SystemUI/res/values-sq/strings.xml index 984829840e48..2c1f6ac50f66 100644 --- a/packages/SystemUI/res/values-sq/strings.xml +++ b/packages/SystemUI/res/values-sq/strings.xml @@ -197,6 +197,10 @@ <string name="accessibility_bluetooth_connected" msgid="4745196874551115205">"Pajisja është lidhur me \"bluetooth\"."</string> <string name="accessibility_bluetooth_device_icon" msgid="9163840051642587982">"Ikona e pajisjes me Bluetooth"</string> <string name="accessibility_bluetooth_device_settings_gear" msgid="3314916468105272540">"Kliko për të konfiguruar detajet e pajisjes"</string> + <!-- no translation found for accessibility_bluetooth_device_settings_see_all (9111952496905423543) --> + <skip /> + <!-- no translation found for accessibility_bluetooth_device_settings_pair_new_device (2435184865793496966) --> + <skip /> <string name="accessibility_battery_unknown" msgid="1807789554617976440">"Përqindja e baterisë e panjohur."</string> <string name="accessibility_bluetooth_name" msgid="7300973230214067678">"Lidhur me <xliff:g id="BLUETOOTH">%s</xliff:g>"</string> <string name="accessibility_cast_name" msgid="7344437925388773685">"Është lidhur me <xliff:g id="CAST">%s</xliff:g>."</string> @@ -255,6 +259,10 @@ <string name="turn_on_bluetooth" msgid="5681370462180289071">"Përdor Bluetooth-in"</string> <string name="quick_settings_bluetooth_device_connected" msgid="7884777006729260996">"Lidhur"</string> <string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Ruajtur"</string> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_disconnect (415980329093277342) --> + <skip /> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_activate (3724301751036877403) --> + <skip /> <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="4182034939479344093">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g> bateri"</string> <string name="quick_settings_bluetooth_secondary_label_audio" msgid="780333390310051161">"Audio"</string> <string name="quick_settings_bluetooth_secondary_label_headset" msgid="2332093067553000852">"Kufje me mikrofon"</string> @@ -396,8 +404,7 @@ <string name="keyguard_indication_charging_time_fast" msgid="8390311020603859480">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Po karikohet shpejt • Plot për <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> <string name="keyguard_indication_charging_time_slowly" msgid="301936949731705417">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Po karikohet ngadalë • Plot për <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> <string name="keyguard_indication_charging_time_dock" msgid="3149328898931741271">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Po karikohet • Plot për <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> - <!-- no translation found for communal_tutorial_indicator_text (4503010353591430123) --> - <skip /> + <string name="communal_tutorial_indicator_text" msgid="4503010353591430123">"Rrëshqit shpejt majtas për të filluar udhëzuesin e përbashkët"</string> <!-- no translation found for button_to_open_widget_picker (8007261659745030810) --> <skip /> <!-- no translation found for button_to_remove_widget (1511255853677835341) --> diff --git a/packages/SystemUI/res/values-sr/strings.xml b/packages/SystemUI/res/values-sr/strings.xml index 8711abd03f9d..428cc5f71d07 100644 --- a/packages/SystemUI/res/values-sr/strings.xml +++ b/packages/SystemUI/res/values-sr/strings.xml @@ -197,6 +197,10 @@ <string name="accessibility_bluetooth_connected" msgid="4745196874551115205">"Bluetooth је прикључен."</string> <string name="accessibility_bluetooth_device_icon" msgid="9163840051642587982">"Икона Bluetooth уређаја"</string> <string name="accessibility_bluetooth_device_settings_gear" msgid="3314916468105272540">"Кликните да бисте конфигурисали детаље о уређају"</string> + <!-- no translation found for accessibility_bluetooth_device_settings_see_all (9111952496905423543) --> + <skip /> + <!-- no translation found for accessibility_bluetooth_device_settings_pair_new_device (2435184865793496966) --> + <skip /> <string name="accessibility_battery_unknown" msgid="1807789554617976440">"Проценат напуњености батерије није познат."</string> <string name="accessibility_bluetooth_name" msgid="7300973230214067678">"Повезани сте са <xliff:g id="BLUETOOTH">%s</xliff:g>."</string> <string name="accessibility_cast_name" msgid="7344437925388773685">"Повезани смо са уређајем <xliff:g id="CAST">%s</xliff:g>."</string> @@ -255,6 +259,10 @@ <string name="turn_on_bluetooth" msgid="5681370462180289071">"Користи Bluetooth"</string> <string name="quick_settings_bluetooth_device_connected" msgid="7884777006729260996">"Повезано"</string> <string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Сачувано"</string> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_disconnect (415980329093277342) --> + <skip /> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_activate (3724301751036877403) --> + <skip /> <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="4182034939479344093">"Ниво батерије је <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g>"</string> <string name="quick_settings_bluetooth_secondary_label_audio" msgid="780333390310051161">"Аудио"</string> <string name="quick_settings_bluetooth_secondary_label_headset" msgid="2332093067553000852">"Слушалице"</string> @@ -396,12 +404,9 @@ <string name="keyguard_indication_charging_time_fast" msgid="8390311020603859480">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Брзо се пуни • <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g> до краја пуњења"</string> <string name="keyguard_indication_charging_time_slowly" msgid="301936949731705417">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Споро се пуни • <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g> до краја пуњења"</string> <string name="keyguard_indication_charging_time_dock" msgid="3149328898931741271">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Пуни се • <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g> до краја пуњења"</string> - <!-- no translation found for communal_tutorial_indicator_text (4503010353591430123) --> - <skip /> - <!-- no translation found for button_to_open_widget_picker (8007261659745030810) --> - <skip /> - <!-- no translation found for button_to_remove_widget (1511255853677835341) --> - <skip /> + <string name="communal_tutorial_indicator_text" msgid="4503010353591430123">"Превуците улево да бисте започели заједнички водич"</string> + <string name="button_to_open_widget_picker" msgid="8007261659745030810">"Отвори бирач виџета"</string> + <string name="button_to_remove_widget" msgid="1511255853677835341">"Уклони виџет"</string> <string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"Замени корисника"</string> <string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"падајући мени"</string> <string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"Све апликације и подаци у овој сесији ће бити избрисани."</string> @@ -1210,8 +1215,6 @@ <string name="privacy_dialog_recent_app_usage_1" msgid="2551340497722370109">"Недавно користила апликација <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g>)"</string> <string name="privacy_dialog_active_app_usage_2" msgid="2770926061339921767">"Користе <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>)"</string> <string name="privacy_dialog_recent_app_usage_2" msgid="2874689735085367167">"Недавно користила апликација <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>)"</string> - <!-- no translation found for keyboard_backlight_dialog_title (8273102932345564724) --> - <skip /> - <!-- no translation found for keyboard_backlight_value (7336398765584393538) --> - <skip /> + <string name="keyboard_backlight_dialog_title" msgid="8273102932345564724">"Позадинско осветљење тастатуре"</string> + <string name="keyboard_backlight_value" msgid="7336398765584393538">"%1$d. ниво од %2$d"</string> </resources> diff --git a/packages/SystemUI/res/values-sv/strings.xml b/packages/SystemUI/res/values-sv/strings.xml index 9568964c77ce..179ed6e77714 100644 --- a/packages/SystemUI/res/values-sv/strings.xml +++ b/packages/SystemUI/res/values-sv/strings.xml @@ -197,6 +197,10 @@ <string name="accessibility_bluetooth_connected" msgid="4745196874551115205">"Bluetooth ansluten."</string> <string name="accessibility_bluetooth_device_icon" msgid="9163840051642587982">"Enhetsikon för Bluetooth"</string> <string name="accessibility_bluetooth_device_settings_gear" msgid="3314916468105272540">"Klicka för att konfigurera enhetsinformation"</string> + <!-- no translation found for accessibility_bluetooth_device_settings_see_all (9111952496905423543) --> + <skip /> + <!-- no translation found for accessibility_bluetooth_device_settings_pair_new_device (2435184865793496966) --> + <skip /> <string name="accessibility_battery_unknown" msgid="1807789554617976440">"Okänd batterinivå."</string> <string name="accessibility_bluetooth_name" msgid="7300973230214067678">"Ansluten till <xliff:g id="BLUETOOTH">%s</xliff:g>."</string> <string name="accessibility_cast_name" msgid="7344437925388773685">"Ansluten till <xliff:g id="CAST">%s</xliff:g>."</string> @@ -255,6 +259,10 @@ <string name="turn_on_bluetooth" msgid="5681370462180289071">"Använd Bluetooth"</string> <string name="quick_settings_bluetooth_device_connected" msgid="7884777006729260996">"Ansluten"</string> <string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Sparad"</string> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_disconnect (415980329093277342) --> + <skip /> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_activate (3724301751036877403) --> + <skip /> <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="4182034939479344093">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g> batteri"</string> <string name="quick_settings_bluetooth_secondary_label_audio" msgid="780333390310051161">"Ljud"</string> <string name="quick_settings_bluetooth_secondary_label_headset" msgid="2332093067553000852">"Headset"</string> @@ -396,8 +404,7 @@ <string name="keyguard_indication_charging_time_fast" msgid="8390311020603859480">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Laddas snabbt • Fulladdat om <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> <string name="keyguard_indication_charging_time_slowly" msgid="301936949731705417">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Laddas långsamt • Fulladdat om <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> <string name="keyguard_indication_charging_time_dock" msgid="3149328898931741271">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Laddas • Fulladdat om <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> - <!-- no translation found for communal_tutorial_indicator_text (4503010353591430123) --> - <skip /> + <string name="communal_tutorial_indicator_text" msgid="4503010353591430123">"Svep åt vänster för att börja med gruppguiden"</string> <!-- no translation found for button_to_open_widget_picker (8007261659745030810) --> <skip /> <!-- no translation found for button_to_remove_widget (1511255853677835341) --> diff --git a/packages/SystemUI/res/values-sw/strings.xml b/packages/SystemUI/res/values-sw/strings.xml index 7535d6805dae..36aa7d56b767 100644 --- a/packages/SystemUI/res/values-sw/strings.xml +++ b/packages/SystemUI/res/values-sw/strings.xml @@ -197,6 +197,10 @@ <string name="accessibility_bluetooth_connected" msgid="4745196874551115205">"Bluetooth imeunganishwa."</string> <string name="accessibility_bluetooth_device_icon" msgid="9163840051642587982">"Aikoni ya Kifaa chenye Bluetooth"</string> <string name="accessibility_bluetooth_device_settings_gear" msgid="3314916468105272540">"Bofya ili uweke mipangilio ya maelezo ya kifaa"</string> + <!-- no translation found for accessibility_bluetooth_device_settings_see_all (9111952496905423543) --> + <skip /> + <!-- no translation found for accessibility_bluetooth_device_settings_pair_new_device (2435184865793496966) --> + <skip /> <string name="accessibility_battery_unknown" msgid="1807789554617976440">"Asilimia ya betri haijulikani."</string> <string name="accessibility_bluetooth_name" msgid="7300973230214067678">"Imeunganishwa kwenye <xliff:g id="BLUETOOTH">%s</xliff:g>."</string> <string name="accessibility_cast_name" msgid="7344437925388773685">"Imeunganishwa kwenye <xliff:g id="CAST">%s</xliff:g>."</string> @@ -255,6 +259,10 @@ <string name="turn_on_bluetooth" msgid="5681370462180289071">"Tumia Bluetooth"</string> <string name="quick_settings_bluetooth_device_connected" msgid="7884777006729260996">"Imeunganishwa"</string> <string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Imehifadhiwa"</string> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_disconnect (415980329093277342) --> + <skip /> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_activate (3724301751036877403) --> + <skip /> <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="4182034939479344093">"Chaji ya betri ni <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g>"</string> <string name="quick_settings_bluetooth_secondary_label_audio" msgid="780333390310051161">"Sauti"</string> <string name="quick_settings_bluetooth_secondary_label_headset" msgid="2332093067553000852">"Vifaa vya sauti"</string> @@ -396,12 +404,9 @@ <string name="keyguard_indication_charging_time_fast" msgid="8390311020603859480">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Inachaji kwa kasi • Itajaa baada ya <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> <string name="keyguard_indication_charging_time_slowly" msgid="301936949731705417">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Inachaji polepole • Itajaa baada ya <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> <string name="keyguard_indication_charging_time_dock" msgid="3149328898931741271">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Inachaji • Itajaa baada ya <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> - <!-- no translation found for communal_tutorial_indicator_text (4503010353591430123) --> - <skip /> - <!-- no translation found for button_to_open_widget_picker (8007261659745030810) --> - <skip /> - <!-- no translation found for button_to_remove_widget (1511255853677835341) --> - <skip /> + <string name="communal_tutorial_indicator_text" msgid="4503010353591430123">"Telezesha kidole kushoto ili uanze mafunzo ya pamoja"</string> + <string name="button_to_open_widget_picker" msgid="8007261659745030810">"Fungua kiteua wijeti"</string> + <string name="button_to_remove_widget" msgid="1511255853677835341">"Ondoa wijeti"</string> <string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"Badili mtumiaji"</string> <string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"menyu ya kuvuta chini"</string> <string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"Data na programu zote katika kipindi hiki zitafutwa."</string> @@ -1210,8 +1215,6 @@ <string name="privacy_dialog_recent_app_usage_1" msgid="2551340497722370109">"Ilitumiwa hivi majuzi na <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g>)"</string> <string name="privacy_dialog_active_app_usage_2" msgid="2770926061339921767">"Inatumiwa na <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>)"</string> <string name="privacy_dialog_recent_app_usage_2" msgid="2874689735085367167">"Ilitumiwa hivi majuzi na <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>)"</string> - <!-- no translation found for keyboard_backlight_dialog_title (8273102932345564724) --> - <skip /> - <!-- no translation found for keyboard_backlight_value (7336398765584393538) --> - <skip /> + <string name="keyboard_backlight_dialog_title" msgid="8273102932345564724">"Mwanga chini ya kibodi"</string> + <string name="keyboard_backlight_value" msgid="7336398765584393538">"Kiwango cha %1$d kati ya %2$d"</string> </resources> diff --git a/packages/SystemUI/res/values-ta/strings.xml b/packages/SystemUI/res/values-ta/strings.xml index 83271906c869..1f3264635589 100644 --- a/packages/SystemUI/res/values-ta/strings.xml +++ b/packages/SystemUI/res/values-ta/strings.xml @@ -197,6 +197,10 @@ <string name="accessibility_bluetooth_connected" msgid="4745196874551115205">"புளூடூத் இணைக்கப்பட்டது."</string> <string name="accessibility_bluetooth_device_icon" msgid="9163840051642587982">"புளூடூத் சாதன ஐகான்"</string> <string name="accessibility_bluetooth_device_settings_gear" msgid="3314916468105272540">"சாதன விவரத்தை உள்ளமைக்க கிளிக் செய்யலாம்"</string> + <!-- no translation found for accessibility_bluetooth_device_settings_see_all (9111952496905423543) --> + <skip /> + <!-- no translation found for accessibility_bluetooth_device_settings_pair_new_device (2435184865793496966) --> + <skip /> <string name="accessibility_battery_unknown" msgid="1807789554617976440">"பேட்டரி சதவீதம் தெரியவில்லை."</string> <string name="accessibility_bluetooth_name" msgid="7300973230214067678">"<xliff:g id="BLUETOOTH">%s</xliff:g>க்கு இணைக்கப்பட்டது."</string> <string name="accessibility_cast_name" msgid="7344437925388773685">"<xliff:g id="CAST">%s</xliff:g> உடன் இணைக்கப்பட்டுள்ளது."</string> @@ -255,6 +259,10 @@ <string name="turn_on_bluetooth" msgid="5681370462180289071">"புளூடூத்தைப் பயன்படுத்துதல்"</string> <string name="quick_settings_bluetooth_device_connected" msgid="7884777006729260996">"இணைக்கப்பட்டது"</string> <string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"சேமிக்கப்பட்டது"</string> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_disconnect (415980329093277342) --> + <skip /> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_activate (3724301751036877403) --> + <skip /> <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="4182034939479344093">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g> பேட்டரி"</string> <string name="quick_settings_bluetooth_secondary_label_audio" msgid="780333390310051161">"ஆடியோ"</string> <string name="quick_settings_bluetooth_secondary_label_headset" msgid="2332093067553000852">"ஹெட்செட்"</string> @@ -396,8 +404,7 @@ <string name="keyguard_indication_charging_time_fast" msgid="8390311020603859480">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • வேகமாகச் சார்ஜாகிறது • <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g> இல் முழுதும் சார்ஜாகும்"</string> <string name="keyguard_indication_charging_time_slowly" msgid="301936949731705417">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • மெதுவாக சார்ஜாகிறது • <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g> இல் முழுதும் சார்ஜாகும்"</string> <string name="keyguard_indication_charging_time_dock" msgid="3149328898931741271">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • சார்ஜாகிறது • <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g> இல் முழுவதும் சார்ஜாகும்"</string> - <!-- no translation found for communal_tutorial_indicator_text (4503010353591430123) --> - <skip /> + <string name="communal_tutorial_indicator_text" msgid="4503010353591430123">"சமூகப் பயிற்சியைத் தொடங்க இடதுபுறம் ஸ்வைப் செய்யுங்கள்"</string> <!-- no translation found for button_to_open_widget_picker (8007261659745030810) --> <skip /> <!-- no translation found for button_to_remove_widget (1511255853677835341) --> diff --git a/packages/SystemUI/res/values-te/strings.xml b/packages/SystemUI/res/values-te/strings.xml index bfa40e8f4f60..e7ba58349d04 100644 --- a/packages/SystemUI/res/values-te/strings.xml +++ b/packages/SystemUI/res/values-te/strings.xml @@ -197,6 +197,10 @@ <string name="accessibility_bluetooth_connected" msgid="4745196874551115205">"బ్లూటూత్ కనెక్ట్ చేయబడింది."</string> <string name="accessibility_bluetooth_device_icon" msgid="9163840051642587982">"బ్లూటూత్ పరికర చిహ్నం"</string> <string name="accessibility_bluetooth_device_settings_gear" msgid="3314916468105272540">"పరికర వివరాలను కాన్ఫిగర్ చేయడానికి క్లిక్ చేయండి"</string> + <!-- no translation found for accessibility_bluetooth_device_settings_see_all (9111952496905423543) --> + <skip /> + <!-- no translation found for accessibility_bluetooth_device_settings_pair_new_device (2435184865793496966) --> + <skip /> <string name="accessibility_battery_unknown" msgid="1807789554617976440">"బ్యాటరీ శాతం తెలియదు."</string> <string name="accessibility_bluetooth_name" msgid="7300973230214067678">"<xliff:g id="BLUETOOTH">%s</xliff:g>కి కనెక్ట్ చేయబడింది."</string> <string name="accessibility_cast_name" msgid="7344437925388773685">"<xliff:g id="CAST">%s</xliff:g>కి కనెక్ట్ చేయబడింది."</string> @@ -255,6 +259,10 @@ <string name="turn_on_bluetooth" msgid="5681370462180289071">"బ్లూటూత్ వాడండి"</string> <string name="quick_settings_bluetooth_device_connected" msgid="7884777006729260996">"కనెక్ట్ అయింది"</string> <string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"సేవ్ చేయబడింది"</string> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_disconnect (415980329093277342) --> + <skip /> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_activate (3724301751036877403) --> + <skip /> <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="4182034939479344093">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g> బ్యాటరీ"</string> <string name="quick_settings_bluetooth_secondary_label_audio" msgid="780333390310051161">"ఆడియో"</string> <string name="quick_settings_bluetooth_secondary_label_headset" msgid="2332093067553000852">"హెడ్సెట్"</string> diff --git a/packages/SystemUI/res/values-th/strings.xml b/packages/SystemUI/res/values-th/strings.xml index f9676745eb6a..1651e540f72a 100644 --- a/packages/SystemUI/res/values-th/strings.xml +++ b/packages/SystemUI/res/values-th/strings.xml @@ -197,6 +197,10 @@ <string name="accessibility_bluetooth_connected" msgid="4745196874551115205">"เชื่อมต่อบลูทูธแล้ว"</string> <string name="accessibility_bluetooth_device_icon" msgid="9163840051642587982">"ไอคอนอุปกรณ์บลูทูธ"</string> <string name="accessibility_bluetooth_device_settings_gear" msgid="3314916468105272540">"คลิกเพื่อกำหนดค่ารายละเอียดอุปกรณ์"</string> + <!-- no translation found for accessibility_bluetooth_device_settings_see_all (9111952496905423543) --> + <skip /> + <!-- no translation found for accessibility_bluetooth_device_settings_pair_new_device (2435184865793496966) --> + <skip /> <string name="accessibility_battery_unknown" msgid="1807789554617976440">"ไม่ทราบเปอร์เซ็นต์แบตเตอรี่"</string> <string name="accessibility_bluetooth_name" msgid="7300973230214067678">"เชื่อมต่อกับ <xliff:g id="BLUETOOTH">%s</xliff:g> แล้ว"</string> <string name="accessibility_cast_name" msgid="7344437925388773685">"เชื่อมต่อกับ <xliff:g id="CAST">%s</xliff:g>"</string> @@ -255,6 +259,10 @@ <string name="turn_on_bluetooth" msgid="5681370462180289071">"ใช้บลูทูธ"</string> <string name="quick_settings_bluetooth_device_connected" msgid="7884777006729260996">"เชื่อมต่อแล้ว"</string> <string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"บันทึกแล้ว"</string> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_disconnect (415980329093277342) --> + <skip /> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_activate (3724301751036877403) --> + <skip /> <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="4182034939479344093">"แบตเตอรี่ <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g>"</string> <string name="quick_settings_bluetooth_secondary_label_audio" msgid="780333390310051161">"เสียง"</string> <string name="quick_settings_bluetooth_secondary_label_headset" msgid="2332093067553000852">"ชุดหูฟัง"</string> @@ -396,12 +404,9 @@ <string name="keyguard_indication_charging_time_fast" msgid="8390311020603859480">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • กำลังชาร์จอย่างเร็ว • จะเต็มในอีก <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> <string name="keyguard_indication_charging_time_slowly" msgid="301936949731705417">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • กำลังชาร์จอย่างช้าๆ • จะเต็มในอีก <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> <string name="keyguard_indication_charging_time_dock" msgid="3149328898931741271">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • กำลังชาร์จ • จะเต็มในอีก <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> - <!-- no translation found for communal_tutorial_indicator_text (4503010353591430123) --> - <skip /> - <!-- no translation found for button_to_open_widget_picker (8007261659745030810) --> - <skip /> - <!-- no translation found for button_to_remove_widget (1511255853677835341) --> - <skip /> + <string name="communal_tutorial_indicator_text" msgid="4503010353591430123">"ปัดไปทางซ้ายเพื่อเริ่มบทแนะนำส่วนกลาง"</string> + <string name="button_to_open_widget_picker" msgid="8007261659745030810">"เปิดเครื่องมือเลือกวิดเจ็ต"</string> + <string name="button_to_remove_widget" msgid="1511255853677835341">"นำวิดเจ็ตออก"</string> <string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"สลับผู้ใช้"</string> <string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"เมนูแบบเลื่อนลง"</string> <string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"ระบบจะลบแอปและข้อมูลทั้งหมดในเซสชันนี้"</string> @@ -1210,8 +1215,6 @@ <string name="privacy_dialog_recent_app_usage_1" msgid="2551340497722370109">"ใช้ล่าสุดโดย <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g>)"</string> <string name="privacy_dialog_active_app_usage_2" msgid="2770926061339921767">"ใช้อยู่โดย <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>)"</string> <string name="privacy_dialog_recent_app_usage_2" msgid="2874689735085367167">"ใช้ล่าสุดโดย <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>)"</string> - <!-- no translation found for keyboard_backlight_dialog_title (8273102932345564724) --> - <skip /> - <!-- no translation found for keyboard_backlight_value (7336398765584393538) --> - <skip /> + <string name="keyboard_backlight_dialog_title" msgid="8273102932345564724">"ไฟแบ็กไลต์ของแป้นพิมพ์"</string> + <string name="keyboard_backlight_value" msgid="7336398765584393538">"ระดับที่ %1$d จาก %2$d"</string> </resources> diff --git a/packages/SystemUI/res/values-tl/strings.xml b/packages/SystemUI/res/values-tl/strings.xml index 56565e6ace36..085fdeed18ab 100644 --- a/packages/SystemUI/res/values-tl/strings.xml +++ b/packages/SystemUI/res/values-tl/strings.xml @@ -197,6 +197,10 @@ <string name="accessibility_bluetooth_connected" msgid="4745196874551115205">"Nakakonekta ang Bluetooth."</string> <string name="accessibility_bluetooth_device_icon" msgid="9163840051642587982">"Icon ng Bluetooth device"</string> <string name="accessibility_bluetooth_device_settings_gear" msgid="3314916468105272540">"I-click para i-configure ang detalye ng device"</string> + <!-- no translation found for accessibility_bluetooth_device_settings_see_all (9111952496905423543) --> + <skip /> + <!-- no translation found for accessibility_bluetooth_device_settings_pair_new_device (2435184865793496966) --> + <skip /> <string name="accessibility_battery_unknown" msgid="1807789554617976440">"Hindi alam ang porsyento ng baterya."</string> <string name="accessibility_bluetooth_name" msgid="7300973230214067678">"Nakakonekta sa <xliff:g id="BLUETOOTH">%s</xliff:g>."</string> <string name="accessibility_cast_name" msgid="7344437925388773685">"Nakakonekta sa <xliff:g id="CAST">%s</xliff:g>."</string> @@ -255,6 +259,10 @@ <string name="turn_on_bluetooth" msgid="5681370462180289071">"Gumamit ng Bluetooth"</string> <string name="quick_settings_bluetooth_device_connected" msgid="7884777006729260996">"Nakakonekta"</string> <string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Na-save"</string> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_disconnect (415980329093277342) --> + <skip /> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_activate (3724301751036877403) --> + <skip /> <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="4182034939479344093">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g> na baterya"</string> <string name="quick_settings_bluetooth_secondary_label_audio" msgid="780333390310051161">"Audio"</string> <string name="quick_settings_bluetooth_secondary_label_headset" msgid="2332093067553000852">"Headset"</string> @@ -396,12 +404,9 @@ <string name="keyguard_indication_charging_time_fast" msgid="8390311020603859480">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Mabilis na nagcha-charge • <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g> na lang para mapuno"</string> <string name="keyguard_indication_charging_time_slowly" msgid="301936949731705417">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Mabagal na nagcha-charge • <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g> na lang para mapuno"</string> <string name="keyguard_indication_charging_time_dock" msgid="3149328898931741271">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Nagcha-charge • <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g> na lang para mapuno"</string> - <!-- no translation found for communal_tutorial_indicator_text (4503010353591430123) --> - <skip /> - <!-- no translation found for button_to_open_widget_picker (8007261659745030810) --> - <skip /> - <!-- no translation found for button_to_remove_widget (1511255853677835341) --> - <skip /> + <string name="communal_tutorial_indicator_text" msgid="4503010353591430123">"Mag-swipe pakaliwa para simulan ang communal na tutorial"</string> + <string name="button_to_open_widget_picker" msgid="8007261659745030810">"Buksan ang picker ng widget"</string> + <string name="button_to_remove_widget" msgid="1511255853677835341">"Mag-alis ng widget"</string> <string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"Magpalit ng user"</string> <string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"pulldown menu"</string> <string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"Ide-delete ang lahat ng app at data sa session na ito."</string> @@ -1210,8 +1215,6 @@ <string name="privacy_dialog_recent_app_usage_1" msgid="2551340497722370109">"Kamakailang ginamit ng <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g>)"</string> <string name="privacy_dialog_active_app_usage_2" msgid="2770926061339921767">"Ginagamit ng <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>)"</string> <string name="privacy_dialog_recent_app_usage_2" msgid="2874689735085367167">"Kamakailang ginamit ng <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>)"</string> - <!-- no translation found for keyboard_backlight_dialog_title (8273102932345564724) --> - <skip /> - <!-- no translation found for keyboard_backlight_value (7336398765584393538) --> - <skip /> + <string name="keyboard_backlight_dialog_title" msgid="8273102932345564724">"Backlight ng keyboard"</string> + <string name="keyboard_backlight_value" msgid="7336398765584393538">"Level %1$d sa %2$d"</string> </resources> diff --git a/packages/SystemUI/res/values-tr/strings.xml b/packages/SystemUI/res/values-tr/strings.xml index 89c400122440..820ccd17f4d4 100644 --- a/packages/SystemUI/res/values-tr/strings.xml +++ b/packages/SystemUI/res/values-tr/strings.xml @@ -197,6 +197,10 @@ <string name="accessibility_bluetooth_connected" msgid="4745196874551115205">"Bluetooth bağlandı."</string> <string name="accessibility_bluetooth_device_icon" msgid="9163840051642587982">"Bluetooth cihaz simgesi"</string> <string name="accessibility_bluetooth_device_settings_gear" msgid="3314916468105272540">"Cihaz ayrıntılarını yapılandırmak için tıklayın"</string> + <!-- no translation found for accessibility_bluetooth_device_settings_see_all (9111952496905423543) --> + <skip /> + <!-- no translation found for accessibility_bluetooth_device_settings_pair_new_device (2435184865793496966) --> + <skip /> <string name="accessibility_battery_unknown" msgid="1807789554617976440">"Pil yüzdesi bilinmiyor."</string> <string name="accessibility_bluetooth_name" msgid="7300973230214067678">"<xliff:g id="BLUETOOTH">%s</xliff:g> ile bağlı."</string> <string name="accessibility_cast_name" msgid="7344437925388773685">"<xliff:g id="CAST">%s</xliff:g> bağlantısı kuruldu."</string> @@ -255,6 +259,10 @@ <string name="turn_on_bluetooth" msgid="5681370462180289071">"Bluetooth\'u kullan"</string> <string name="quick_settings_bluetooth_device_connected" msgid="7884777006729260996">"Bağlandı"</string> <string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Kaydedildi"</string> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_disconnect (415980329093277342) --> + <skip /> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_activate (3724301751036877403) --> + <skip /> <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="4182034939479344093">"Pil düzeyi <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g>"</string> <string name="quick_settings_bluetooth_secondary_label_audio" msgid="780333390310051161">"Ses"</string> <string name="quick_settings_bluetooth_secondary_label_headset" msgid="2332093067553000852">"Mikrofonlu kulaklık"</string> @@ -396,8 +404,7 @@ <string name="keyguard_indication_charging_time_fast" msgid="8390311020603859480">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Hızlı şarj oluyor • Dolmasına <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g> kaldı"</string> <string name="keyguard_indication_charging_time_slowly" msgid="301936949731705417">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Yavaş şarj oluyor • Dolmasına <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g> kaldı"</string> <string name="keyguard_indication_charging_time_dock" msgid="3149328898931741271">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Şarj oluyor • Dolmasına <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g> kaldı"</string> - <!-- no translation found for communal_tutorial_indicator_text (4503010353591430123) --> - <skip /> + <string name="communal_tutorial_indicator_text" msgid="4503010353591430123">"Ortak eğitimi başlatmak için sola kaydırın"</string> <!-- no translation found for button_to_open_widget_picker (8007261659745030810) --> <skip /> <!-- no translation found for button_to_remove_widget (1511255853677835341) --> diff --git a/packages/SystemUI/res/values-uk/strings.xml b/packages/SystemUI/res/values-uk/strings.xml index a83d8bb06b4f..ea3d0b1ed597 100644 --- a/packages/SystemUI/res/values-uk/strings.xml +++ b/packages/SystemUI/res/values-uk/strings.xml @@ -197,6 +197,10 @@ <string name="accessibility_bluetooth_connected" msgid="4745196874551115205">"Bluetooth під’єднано."</string> <string name="accessibility_bluetooth_device_icon" msgid="9163840051642587982">"Значок пристрою з Bluetooth"</string> <string name="accessibility_bluetooth_device_settings_gear" msgid="3314916468105272540">"Натисніть, щоб змінити налаштування пристрою"</string> + <!-- no translation found for accessibility_bluetooth_device_settings_see_all (9111952496905423543) --> + <skip /> + <!-- no translation found for accessibility_bluetooth_device_settings_pair_new_device (2435184865793496966) --> + <skip /> <string name="accessibility_battery_unknown" msgid="1807789554617976440">"Відсоток заряду акумулятора невідомий."</string> <string name="accessibility_bluetooth_name" msgid="7300973230214067678">"Підключено до <xliff:g id="BLUETOOTH">%s</xliff:g>."</string> <string name="accessibility_cast_name" msgid="7344437925388773685">"Під’єднано до пристрою <xliff:g id="CAST">%s</xliff:g>."</string> @@ -255,6 +259,10 @@ <string name="turn_on_bluetooth" msgid="5681370462180289071">"Увімкнути Bluetooth"</string> <string name="quick_settings_bluetooth_device_connected" msgid="7884777006729260996">"Підключено"</string> <string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Збережено"</string> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_disconnect (415980329093277342) --> + <skip /> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_activate (3724301751036877403) --> + <skip /> <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="4182034939479344093">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g> заряду акумулятора"</string> <string name="quick_settings_bluetooth_secondary_label_audio" msgid="780333390310051161">"Аудіопристрій"</string> <string name="quick_settings_bluetooth_secondary_label_headset" msgid="2332093067553000852">"Гарнітура"</string> @@ -396,8 +404,7 @@ <string name="keyguard_indication_charging_time_fast" msgid="8390311020603859480">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Швидке заряджання • <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g> до повного заряду"</string> <string name="keyguard_indication_charging_time_slowly" msgid="301936949731705417">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Повільне заряджання • <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g> до повного заряду"</string> <string name="keyguard_indication_charging_time_dock" msgid="3149328898931741271">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Заряджання • <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g> до повного заряду"</string> - <!-- no translation found for communal_tutorial_indicator_text (4503010353591430123) --> - <skip /> + <string name="communal_tutorial_indicator_text" msgid="4503010353591430123">"Проведіть пальцем уліво, щоб відкрити спільний навчальний посібник"</string> <!-- no translation found for button_to_open_widget_picker (8007261659745030810) --> <skip /> <!-- no translation found for button_to_remove_widget (1511255853677835341) --> diff --git a/packages/SystemUI/res/values-ur/strings.xml b/packages/SystemUI/res/values-ur/strings.xml index 7a41e9f6e37f..bf58d9c28fd4 100644 --- a/packages/SystemUI/res/values-ur/strings.xml +++ b/packages/SystemUI/res/values-ur/strings.xml @@ -197,6 +197,10 @@ <string name="accessibility_bluetooth_connected" msgid="4745196874551115205">"بلوٹوتھ مربوط ہے۔"</string> <string name="accessibility_bluetooth_device_icon" msgid="9163840051642587982">"بلوٹوتھ آلے کا آئیکن"</string> <string name="accessibility_bluetooth_device_settings_gear" msgid="3314916468105272540">"آلہ کی تفصیل کو کنفیگر کرنے کے لیے کلک کریں"</string> + <!-- no translation found for accessibility_bluetooth_device_settings_see_all (9111952496905423543) --> + <skip /> + <!-- no translation found for accessibility_bluetooth_device_settings_pair_new_device (2435184865793496966) --> + <skip /> <string name="accessibility_battery_unknown" msgid="1807789554617976440">"بیٹری کی فیصد نامعلوم ہے۔"</string> <string name="accessibility_bluetooth_name" msgid="7300973230214067678">"<xliff:g id="BLUETOOTH">%s</xliff:g> سے منسلک ہیں۔"</string> <string name="accessibility_cast_name" msgid="7344437925388773685">"<xliff:g id="CAST">%s</xliff:g> سے منسلک ہے۔"</string> @@ -255,6 +259,10 @@ <string name="turn_on_bluetooth" msgid="5681370462180289071">"استعمال کریں"</string> <string name="quick_settings_bluetooth_device_connected" msgid="7884777006729260996">"منسلک ہے"</string> <string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"محفوظ ہے"</string> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_disconnect (415980329093277342) --> + <skip /> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_activate (3724301751036877403) --> + <skip /> <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="4182034939479344093">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g> بیٹری"</string> <string name="quick_settings_bluetooth_secondary_label_audio" msgid="780333390310051161">"آڈیو"</string> <string name="quick_settings_bluetooth_secondary_label_headset" msgid="2332093067553000852">"ہیڈ سیٹ"</string> @@ -397,10 +405,8 @@ <string name="keyguard_indication_charging_time_slowly" msgid="301936949731705417">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • آہستہ چارج ہو رہا ہے • <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g> میں مکمل"</string> <string name="keyguard_indication_charging_time_dock" msgid="3149328898931741271">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • چارج ہو رہا ہے • <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g> میں مکمل"</string> <string name="communal_tutorial_indicator_text" msgid="4503010353591430123">"کمیونل ٹیوٹوریل شروع کرنے کے لیے بائیں سوائپ کریں"</string> - <!-- no translation found for button_to_open_widget_picker (8007261659745030810) --> - <skip /> - <!-- no translation found for button_to_remove_widget (1511255853677835341) --> - <skip /> + <string name="button_to_open_widget_picker" msgid="8007261659745030810">"ویجیٹ چنندہ کو کھولیں"</string> + <string name="button_to_remove_widget" msgid="1511255853677835341">"ویجیٹ ہٹائیں"</string> <string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"صارف سوئچ کریں"</string> <string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"پل ڈاؤن مینیو"</string> <string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"اس سیشن میں موجود سبھی ایپس اور ڈیٹا کو حذف کر دیا جائے گا۔"</string> @@ -1209,8 +1215,6 @@ <string name="privacy_dialog_recent_app_usage_1" msgid="2551340497722370109">"<xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g>) کے ذریعے حال ہی میں استعمال کیا گیا"</string> <string name="privacy_dialog_active_app_usage_2" msgid="2770926061339921767">"<xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>) کے زیر استعمال"</string> <string name="privacy_dialog_recent_app_usage_2" msgid="2874689735085367167">"<xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>) کے ذریعے حال ہی میں استعمال کیا گیا"</string> - <!-- no translation found for keyboard_backlight_dialog_title (8273102932345564724) --> - <skip /> - <!-- no translation found for keyboard_backlight_value (7336398765584393538) --> - <skip /> + <string name="keyboard_backlight_dialog_title" msgid="8273102932345564724">"کی بورڈ بیک لائٹ"</string> + <string name="keyboard_backlight_value" msgid="7336398765584393538">"%2$d میں سے %1$d کا لیول"</string> </resources> diff --git a/packages/SystemUI/res/values-uz/strings.xml b/packages/SystemUI/res/values-uz/strings.xml index d01ed196f3af..0e04cd5fd191 100644 --- a/packages/SystemUI/res/values-uz/strings.xml +++ b/packages/SystemUI/res/values-uz/strings.xml @@ -197,6 +197,10 @@ <string name="accessibility_bluetooth_connected" msgid="4745196874551115205">"Bluetooth ulandi."</string> <string name="accessibility_bluetooth_device_icon" msgid="9163840051642587982">"Bluetooth qurilma belgisi"</string> <string name="accessibility_bluetooth_device_settings_gear" msgid="3314916468105272540">"Qurilma haqida tafsilotlarni oʻzgartirish uchun bosing"</string> + <!-- no translation found for accessibility_bluetooth_device_settings_see_all (9111952496905423543) --> + <skip /> + <!-- no translation found for accessibility_bluetooth_device_settings_pair_new_device (2435184865793496966) --> + <skip /> <string name="accessibility_battery_unknown" msgid="1807789554617976440">"Batareya quvvati foizi nomaʼlum."</string> <string name="accessibility_bluetooth_name" msgid="7300973230214067678">"Ulangan: <xliff:g id="BLUETOOTH">%s</xliff:g>."</string> <string name="accessibility_cast_name" msgid="7344437925388773685">"Bunga ulangan: <xliff:g id="CAST">%s</xliff:g>."</string> @@ -255,6 +259,10 @@ <string name="turn_on_bluetooth" msgid="5681370462180289071">"Bluetooth ishlatish"</string> <string name="quick_settings_bluetooth_device_connected" msgid="7884777006729260996">"Ulandi"</string> <string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Saqlangan"</string> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_disconnect (415980329093277342) --> + <skip /> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_activate (3724301751036877403) --> + <skip /> <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="4182034939479344093">"Batareya quvvati: <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g>"</string> <string name="quick_settings_bluetooth_secondary_label_audio" msgid="780333390310051161">"Audio"</string> <string name="quick_settings_bluetooth_secondary_label_headset" msgid="2332093067553000852">"Garnitura"</string> @@ -396,12 +404,9 @@ <string name="keyguard_indication_charging_time_fast" msgid="8390311020603859480">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Tez quvvat olmoqda • <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g> qoldi"</string> <string name="keyguard_indication_charging_time_slowly" msgid="301936949731705417">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Sekin quvvat olmoqda • <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g> qoldi"</string> <string name="keyguard_indication_charging_time_dock" msgid="3149328898931741271">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Quvvat olmoqda • <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g> qoldi"</string> - <!-- no translation found for communal_tutorial_indicator_text (4503010353591430123) --> - <skip /> - <!-- no translation found for button_to_open_widget_picker (8007261659745030810) --> - <skip /> - <!-- no translation found for button_to_remove_widget (1511255853677835341) --> - <skip /> + <string name="communal_tutorial_indicator_text" msgid="4503010353591430123">"Qoʻllanma bilan tanishish uchun chapga suring"</string> + <string name="button_to_open_widget_picker" msgid="8007261659745030810">"Vidjet tanlash vositasini ochish"</string> + <string name="button_to_remove_widget" msgid="1511255853677835341">"Vidjetni olib tashlash"</string> <string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"Foydalanuvchini almashtirish"</string> <string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"tortib tushiriladigan menyu"</string> <string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"Ushbu seansdagi barcha ilovalar va ma’lumotlar o‘chirib tashlanadi."</string> @@ -1210,8 +1215,6 @@ <string name="privacy_dialog_recent_app_usage_1" msgid="2551340497722370109">"Yaqinda <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g>) ishlatgan"</string> <string name="privacy_dialog_active_app_usage_2" msgid="2770926061339921767">"<xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>) ishlatmoqda"</string> <string name="privacy_dialog_recent_app_usage_2" msgid="2874689735085367167">"Yaqinda <xliff:g id="APP_NAME">%1$s</xliff:g> (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>) ishlatgan"</string> - <!-- no translation found for keyboard_backlight_dialog_title (8273102932345564724) --> - <skip /> - <!-- no translation found for keyboard_backlight_value (7336398765584393538) --> - <skip /> + <string name="keyboard_backlight_dialog_title" msgid="8273102932345564724">"Klaviatura orqa yoritkichi"</string> + <string name="keyboard_backlight_value" msgid="7336398765584393538">"Daraja: %1$d / %2$d"</string> </resources> diff --git a/packages/SystemUI/res/values-vi/strings.xml b/packages/SystemUI/res/values-vi/strings.xml index 5a1007693a9d..31350be4091b 100644 --- a/packages/SystemUI/res/values-vi/strings.xml +++ b/packages/SystemUI/res/values-vi/strings.xml @@ -197,6 +197,10 @@ <string name="accessibility_bluetooth_connected" msgid="4745196874551115205">"Đã kết nối bluetooth."</string> <string name="accessibility_bluetooth_device_icon" msgid="9163840051642587982">"Biểu tượng thiết bị Bluetooth"</string> <string name="accessibility_bluetooth_device_settings_gear" msgid="3314916468105272540">"Nhấp để định cấu hình thông tin thiết bị"</string> + <!-- no translation found for accessibility_bluetooth_device_settings_see_all (9111952496905423543) --> + <skip /> + <!-- no translation found for accessibility_bluetooth_device_settings_pair_new_device (2435184865793496966) --> + <skip /> <string name="accessibility_battery_unknown" msgid="1807789554617976440">"Tỷ lệ phần trăm pin không xác định."</string> <string name="accessibility_bluetooth_name" msgid="7300973230214067678">"Đã kết nối với <xliff:g id="BLUETOOTH">%s</xliff:g>."</string> <string name="accessibility_cast_name" msgid="7344437925388773685">"Đã kết nối với <xliff:g id="CAST">%s</xliff:g>."</string> @@ -255,6 +259,10 @@ <string name="turn_on_bluetooth" msgid="5681370462180289071">"Bật Bluetooth"</string> <string name="quick_settings_bluetooth_device_connected" msgid="7884777006729260996">"Đã kết nối"</string> <string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Đã lưu"</string> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_disconnect (415980329093277342) --> + <skip /> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_activate (3724301751036877403) --> + <skip /> <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="4182034939479344093">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g> pin"</string> <string name="quick_settings_bluetooth_secondary_label_audio" msgid="780333390310051161">"Âm thanh"</string> <string name="quick_settings_bluetooth_secondary_label_headset" msgid="2332093067553000852">"Tai nghe"</string> @@ -396,8 +404,7 @@ <string name="keyguard_indication_charging_time_fast" msgid="8390311020603859480">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Đang sạc nhanh • Sẽ đầy sau <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> <string name="keyguard_indication_charging_time_slowly" msgid="301936949731705417">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Đang sạc chậm • Sẽ đầy sau <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> <string name="keyguard_indication_charging_time_dock" msgid="3149328898931741271">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • Đang sạc • Sẽ đầy sau <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>"</string> - <!-- no translation found for communal_tutorial_indicator_text (4503010353591430123) --> - <skip /> + <string name="communal_tutorial_indicator_text" msgid="4503010353591430123">"Vuốt sang trái để bắt đầu xem hướng dẫn chung"</string> <!-- no translation found for button_to_open_widget_picker (8007261659745030810) --> <skip /> <!-- no translation found for button_to_remove_widget (1511255853677835341) --> diff --git a/packages/SystemUI/res/values-zh-rCN/strings.xml b/packages/SystemUI/res/values-zh-rCN/strings.xml index 92dac523abe9..4db1a91b1ba7 100644 --- a/packages/SystemUI/res/values-zh-rCN/strings.xml +++ b/packages/SystemUI/res/values-zh-rCN/strings.xml @@ -197,6 +197,10 @@ <string name="accessibility_bluetooth_connected" msgid="4745196874551115205">"蓝牙已连接。"</string> <string name="accessibility_bluetooth_device_icon" msgid="9163840051642587982">"蓝牙设备图标"</string> <string name="accessibility_bluetooth_device_settings_gear" msgid="3314916468105272540">"点击以配置设备详情"</string> + <!-- no translation found for accessibility_bluetooth_device_settings_see_all (9111952496905423543) --> + <skip /> + <!-- no translation found for accessibility_bluetooth_device_settings_pair_new_device (2435184865793496966) --> + <skip /> <string name="accessibility_battery_unknown" msgid="1807789554617976440">"电池电量百分比未知。"</string> <string name="accessibility_bluetooth_name" msgid="7300973230214067678">"已连接到<xliff:g id="BLUETOOTH">%s</xliff:g>。"</string> <string name="accessibility_cast_name" msgid="7344437925388773685">"已连接到 <xliff:g id="CAST">%s</xliff:g>。"</string> @@ -255,6 +259,10 @@ <string name="turn_on_bluetooth" msgid="5681370462180289071">"使用蓝牙"</string> <string name="quick_settings_bluetooth_device_connected" msgid="7884777006729260996">"已连接"</string> <string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"已保存"</string> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_disconnect (415980329093277342) --> + <skip /> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_activate (3724301751036877403) --> + <skip /> <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="4182034939479344093">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g> 的电量"</string> <string name="quick_settings_bluetooth_secondary_label_audio" msgid="780333390310051161">"音频"</string> <string name="quick_settings_bluetooth_secondary_label_headset" msgid="2332093067553000852">"耳机"</string> @@ -396,12 +404,9 @@ <string name="keyguard_indication_charging_time_fast" msgid="8390311020603859480">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • 正在快速充电 • 将于 <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>后充满"</string> <string name="keyguard_indication_charging_time_slowly" msgid="301936949731705417">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • 正在慢速充电 • 将于 <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>后充满"</string> <string name="keyguard_indication_charging_time_dock" msgid="3149328898931741271">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • 正在充电 • 将于 <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>后充满"</string> - <!-- no translation found for communal_tutorial_indicator_text (4503010353591430123) --> - <skip /> - <!-- no translation found for button_to_open_widget_picker (8007261659745030810) --> - <skip /> - <!-- no translation found for button_to_remove_widget (1511255853677835341) --> - <skip /> + <string name="communal_tutorial_indicator_text" msgid="4503010353591430123">"向左滑动即可启动公共教程"</string> + <string name="button_to_open_widget_picker" msgid="8007261659745030810">"打开微件选择器"</string> + <string name="button_to_remove_widget" msgid="1511255853677835341">"移除微件"</string> <string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"切换用户"</string> <string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"下拉菜单"</string> <string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"此会话中的所有应用和数据都将被删除。"</string> @@ -1210,8 +1215,6 @@ <string name="privacy_dialog_recent_app_usage_1" msgid="2551340497722370109">"“<xliff:g id="APP_NAME">%1$s</xliff:g>”最近使用过(<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g>)"</string> <string name="privacy_dialog_active_app_usage_2" msgid="2770926061339921767">"“<xliff:g id="APP_NAME">%1$s</xliff:g>”正在使用(<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>)"</string> <string name="privacy_dialog_recent_app_usage_2" msgid="2874689735085367167">"“<xliff:g id="APP_NAME">%1$s</xliff:g>”最近使用过(<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>)"</string> - <!-- no translation found for keyboard_backlight_dialog_title (8273102932345564724) --> - <skip /> - <!-- no translation found for keyboard_backlight_value (7336398765584393538) --> - <skip /> + <string name="keyboard_backlight_dialog_title" msgid="8273102932345564724">"键盘背光"</string> + <string name="keyboard_backlight_value" msgid="7336398765584393538">"第 %1$d 级,共 %2$d 级"</string> </resources> diff --git a/packages/SystemUI/res/values-zh-rHK/strings.xml b/packages/SystemUI/res/values-zh-rHK/strings.xml index c94c2cb52810..125cfe15164a 100644 --- a/packages/SystemUI/res/values-zh-rHK/strings.xml +++ b/packages/SystemUI/res/values-zh-rHK/strings.xml @@ -197,6 +197,10 @@ <string name="accessibility_bluetooth_connected" msgid="4745196874551115205">"藍牙連線已建立。"</string> <string name="accessibility_bluetooth_device_icon" msgid="9163840051642587982">"藍牙裝置圖示"</string> <string name="accessibility_bluetooth_device_settings_gear" msgid="3314916468105272540">"按一下即可設定裝置詳情"</string> + <!-- no translation found for accessibility_bluetooth_device_settings_see_all (9111952496905423543) --> + <skip /> + <!-- no translation found for accessibility_bluetooth_device_settings_pair_new_device (2435184865793496966) --> + <skip /> <string name="accessibility_battery_unknown" msgid="1807789554617976440">"電量百分比不明。"</string> <string name="accessibility_bluetooth_name" msgid="7300973230214067678">"已連線至<xliff:g id="BLUETOOTH">%s</xliff:g>。"</string> <string name="accessibility_cast_name" msgid="7344437925388773685">"已連接至 <xliff:g id="CAST">%s</xliff:g>。"</string> @@ -255,6 +259,10 @@ <string name="turn_on_bluetooth" msgid="5681370462180289071">"使用藍牙"</string> <string name="quick_settings_bluetooth_device_connected" msgid="7884777006729260996">"已連接"</string> <string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"已儲存"</string> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_disconnect (415980329093277342) --> + <skip /> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_activate (3724301751036877403) --> + <skip /> <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="4182034939479344093">"電量:<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g>"</string> <string name="quick_settings_bluetooth_secondary_label_audio" msgid="780333390310051161">"音訊"</string> <string name="quick_settings_bluetooth_secondary_label_headset" msgid="2332093067553000852">"耳機"</string> @@ -396,12 +404,9 @@ <string name="keyguard_indication_charging_time_fast" msgid="8390311020603859480">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • 快速充電中 • <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>後充滿電"</string> <string name="keyguard_indication_charging_time_slowly" msgid="301936949731705417">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • 慢速充電中 • <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>後充滿電"</string> <string name="keyguard_indication_charging_time_dock" msgid="3149328898931741271">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • 充電中 • <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>後充滿電"</string> - <!-- no translation found for communal_tutorial_indicator_text (4503010353591430123) --> - <skip /> - <!-- no translation found for button_to_open_widget_picker (8007261659745030810) --> - <skip /> - <!-- no translation found for button_to_remove_widget (1511255853677835341) --> - <skip /> + <string name="communal_tutorial_indicator_text" msgid="4503010353591430123">"向左滑動即可開始共用教學課程"</string> + <string name="button_to_open_widget_picker" msgid="8007261659745030810">"開啟小工具挑選器"</string> + <string name="button_to_remove_widget" msgid="1511255853677835341">"移除小工具"</string> <string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"切換使用者"</string> <string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"下拉式選單"</string> <string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"這個工作階段中的所有應用程式和資料都會被刪除。"</string> @@ -1210,8 +1215,6 @@ <string name="privacy_dialog_recent_app_usage_1" msgid="2551340497722370109">"「<xliff:g id="APP_NAME">%1$s</xliff:g>」最近使用過此權限 (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g>)"</string> <string name="privacy_dialog_active_app_usage_2" msgid="2770926061339921767">"<xliff:g id="APP_NAME">%1$s</xliff:g> 正在使用 (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>)"</string> <string name="privacy_dialog_recent_app_usage_2" msgid="2874689735085367167">"「<xliff:g id="APP_NAME">%1$s</xliff:g>」最近使用過此權限 (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>)"</string> - <!-- no translation found for keyboard_backlight_dialog_title (8273102932345564724) --> - <skip /> - <!-- no translation found for keyboard_backlight_value (7336398765584393538) --> - <skip /> + <string name="keyboard_backlight_dialog_title" msgid="8273102932345564724">"鍵盤背光"</string> + <string name="keyboard_backlight_value" msgid="7336398765584393538">"第 %1$d 級,共 %2$d 級"</string> </resources> diff --git a/packages/SystemUI/res/values-zh-rTW/strings.xml b/packages/SystemUI/res/values-zh-rTW/strings.xml index e05d30991f36..dba68c500dc0 100644 --- a/packages/SystemUI/res/values-zh-rTW/strings.xml +++ b/packages/SystemUI/res/values-zh-rTW/strings.xml @@ -197,6 +197,10 @@ <string name="accessibility_bluetooth_connected" msgid="4745196874551115205">"藍牙連線已建立。"</string> <string name="accessibility_bluetooth_device_icon" msgid="9163840051642587982">"「藍牙裝置」圖示"</string> <string name="accessibility_bluetooth_device_settings_gear" msgid="3314916468105272540">"按一下即可設定裝置詳細資料"</string> + <!-- no translation found for accessibility_bluetooth_device_settings_see_all (9111952496905423543) --> + <skip /> + <!-- no translation found for accessibility_bluetooth_device_settings_pair_new_device (2435184865793496966) --> + <skip /> <string name="accessibility_battery_unknown" msgid="1807789554617976440">"電池電量不明。"</string> <string name="accessibility_bluetooth_name" msgid="7300973230214067678">"已連線至<xliff:g id="BLUETOOTH">%s</xliff:g>。"</string> <string name="accessibility_cast_name" msgid="7344437925388773685">"已連線至 <xliff:g id="CAST">%s</xliff:g>。"</string> @@ -255,6 +259,10 @@ <string name="turn_on_bluetooth" msgid="5681370462180289071">"使用藍牙"</string> <string name="quick_settings_bluetooth_device_connected" msgid="7884777006729260996">"已連線"</string> <string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"已儲存"</string> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_disconnect (415980329093277342) --> + <skip /> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_activate (3724301751036877403) --> + <skip /> <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="4182034939479344093">"電量:<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g>"</string> <string name="quick_settings_bluetooth_secondary_label_audio" msgid="780333390310051161">"音訊"</string> <string name="quick_settings_bluetooth_secondary_label_headset" msgid="2332093067553000852">"耳機"</string> @@ -396,12 +404,9 @@ <string name="keyguard_indication_charging_time_fast" msgid="8390311020603859480">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • 快速充電中 • 將於 <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>後充飽"</string> <string name="keyguard_indication_charging_time_slowly" msgid="301936949731705417">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • 慢速充電中 • 將於 <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>後充飽"</string> <string name="keyguard_indication_charging_time_dock" msgid="3149328898931741271">"<xliff:g id="PERCENTAGE">%2$s</xliff:g> • 充電中 • 將於 <xliff:g id="CHARGING_TIME_LEFT">%1$s</xliff:g>後充飽"</string> - <!-- no translation found for communal_tutorial_indicator_text (4503010353591430123) --> - <skip /> - <!-- no translation found for button_to_open_widget_picker (8007261659745030810) --> - <skip /> - <!-- no translation found for button_to_remove_widget (1511255853677835341) --> - <skip /> + <string name="communal_tutorial_indicator_text" msgid="4503010353591430123">"向左滑動即可啟動通用教學課程"</string> + <string name="button_to_open_widget_picker" msgid="8007261659745030810">"開啟小工具挑選器"</string> + <string name="button_to_remove_widget" msgid="1511255853677835341">"移除小工具"</string> <string name="accessibility_multi_user_switch_switcher" msgid="5330448341251092660">"切換使用者"</string> <string name="accessibility_multi_user_list_switcher" msgid="8574105376229857407">"下拉式選單"</string> <string name="guest_exit_guest_dialog_message" msgid="8183450985628495709">"這個工作階段中的所有應用程式和資料都會遭到刪除。"</string> @@ -1210,8 +1215,6 @@ <string name="privacy_dialog_recent_app_usage_1" msgid="2551340497722370109">"「<xliff:g id="APP_NAME">%1$s</xliff:g>」最近用過這項權限 (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g>)"</string> <string name="privacy_dialog_active_app_usage_2" msgid="2770926061339921767">"正由「<xliff:g id="APP_NAME">%1$s</xliff:g>」使用 (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>)"</string> <string name="privacy_dialog_recent_app_usage_2" msgid="2874689735085367167">"「<xliff:g id="APP_NAME">%1$s</xliff:g>」最近用過這項權限 (<xliff:g id="ATTRIBUTION_LABEL">%2$s</xliff:g> • <xliff:g id="PROXY_LABEL">%3$s</xliff:g>)"</string> - <!-- no translation found for keyboard_backlight_dialog_title (8273102932345564724) --> - <skip /> - <!-- no translation found for keyboard_backlight_value (7336398765584393538) --> - <skip /> + <string name="keyboard_backlight_dialog_title" msgid="8273102932345564724">"鍵盤背光"</string> + <string name="keyboard_backlight_value" msgid="7336398765584393538">"第 %1$d 級,共 %2$d 級"</string> </resources> diff --git a/packages/SystemUI/res/values-zu/strings.xml b/packages/SystemUI/res/values-zu/strings.xml index db2ba79b3e5d..982ca4a12dd8 100644 --- a/packages/SystemUI/res/values-zu/strings.xml +++ b/packages/SystemUI/res/values-zu/strings.xml @@ -197,6 +197,10 @@ <string name="accessibility_bluetooth_connected" msgid="4745196874551115205">"Bluetooth ixhunyiwe"</string> <string name="accessibility_bluetooth_device_icon" msgid="9163840051642587982">"Isithonjana sedivayisi ye-Bluetooth"</string> <string name="accessibility_bluetooth_device_settings_gear" msgid="3314916468105272540">"Chofoza ukuze ulungiselele imininingwane yedivayisi"</string> + <!-- no translation found for accessibility_bluetooth_device_settings_see_all (9111952496905423543) --> + <skip /> + <!-- no translation found for accessibility_bluetooth_device_settings_pair_new_device (2435184865793496966) --> + <skip /> <string name="accessibility_battery_unknown" msgid="1807789554617976440">"Iphesenti lebhethri alaziwa."</string> <string name="accessibility_bluetooth_name" msgid="7300973230214067678">"Xhuma ku-<xliff:g id="BLUETOOTH">%s</xliff:g>."</string> <string name="accessibility_cast_name" msgid="7344437925388773685">"Ixhumeke ku-<xliff:g id="CAST">%s</xliff:g>."</string> @@ -255,6 +259,10 @@ <string name="turn_on_bluetooth" msgid="5681370462180289071">"Sebenzisa i-Bluetooth"</string> <string name="quick_settings_bluetooth_device_connected" msgid="7884777006729260996">"Ixhunyiwe"</string> <string name="quick_settings_bluetooth_device_saved" msgid="7549938728928069477">"Ilondoloziwe"</string> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_disconnect (415980329093277342) --> + <skip /> + <!-- no translation found for accessibility_quick_settings_bluetooth_device_tap_to_activate (3724301751036877403) --> + <skip /> <string name="quick_settings_bluetooth_secondary_label_battery_level" msgid="4182034939479344093">"<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%s</xliff:g> ibhethri"</string> <string name="quick_settings_bluetooth_secondary_label_audio" msgid="780333390310051161">"Umsindo"</string> <string name="quick_settings_bluetooth_secondary_label_headset" msgid="2332093067553000852">"Ihedisethi"</string> diff --git a/packages/SystemUI/res/values/strings.xml b/packages/SystemUI/res/values/strings.xml index 3163533a3f4d..daf6cb3d683d 100644 --- a/packages/SystemUI/res/values/strings.xml +++ b/packages/SystemUI/res/values/strings.xml @@ -1056,10 +1056,12 @@ <!-- Indicator on keyguard to start the communal tutorial. [CHAR LIMIT=100] --> <string name="communal_tutorial_indicator_text">Swipe left to start the communal tutorial</string> - <!-- Description for the button that opens the widget picker on click. [CHAR LIMIT=50] --> - <string name="button_to_open_widget_picker">Open the widget picker</string> + <!-- Description for the button that opens the widget editor on click. [CHAR LIMIT=50] --> + <string name="button_to_open_widget_editor">Open the widget editor</string> <!-- Description for the button that removes a widget on click. [CHAR LIMIT=50] --> <string name="button_to_remove_widget">Remove a widget</string> + <!-- Text for the button that launches the hub mode widget picker. [CHAR LIMIT=50] --> + <string name="hub_mode_add_widget_button_text">Add Widget</string> <!-- Related to user switcher --><skip/> diff --git a/packages/SystemUI/res/values/styles.xml b/packages/SystemUI/res/values/styles.xml index 7ce530fce470..befee2b3eeb7 100644 --- a/packages/SystemUI/res/values/styles.xml +++ b/packages/SystemUI/res/values/styles.xml @@ -943,6 +943,11 @@ <item name="android:windowLightStatusBar">true</item> </style> + <style name="Theme.EditWidgetsActivity" + parent="@android:style/Theme.DeviceDefault.NoActionBar.Fullscreen"> + <item name="android:windowBackground">@android:color/white</item> + </style> + <style name="TextAppearance.Control"> <item name="android:fontFamily">@*android:string/config_bodyFontFamily</item> </style> @@ -1491,10 +1496,14 @@ <style name="ShortCutButton" parent="@android:style/Widget.Material.Button"> <item name="android:background">@drawable/shortcut_button_colored</item> - <item name="android:stateListAnimator">@null</item> <item name="android:textSize">16sp</item> - <item name="android:padding">4dp</item> - <item name="android:textColor">?androidprv:attr/textColorSecondary</item> + <item name="android:textColor">?androidprv:attr/materialColorOnSurface</item> + <item name="android:layout_marginEnd">12dp</item> + <item name="android:paddingLeft">24dp</item> + <item name="android:paddingRight">24dp</item> + <item name="android:minHeight">40dp</item> + <item name="android:stateListAnimator">@*android:anim/flat_button_state_list_anim_material</item> + <item name="android:pointerIcon">arrow</item> </style> <style name="ShortcutHorizontalDivider"> @@ -1530,4 +1539,4 @@ <style name="Theme.PrivacyDialog" parent="@style/Theme.SystemUI.Dialog"> <item name="android:colorBackground">?androidprv:attr/materialColorSurfaceContainer</item> </style> -</resources>
\ No newline at end of file +</resources> diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java b/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java index dedac5596817..1fa55f5d839b 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitchController.java @@ -39,6 +39,7 @@ import androidx.annotation.VisibleForTesting; import com.android.systemui.Dumpable; import com.android.systemui.common.ui.ConfigurationState; +import com.android.systemui.dagger.qualifiers.Background; import com.android.systemui.dagger.qualifiers.Main; import com.android.systemui.dump.DumpManager; import com.android.systemui.flags.FeatureFlagsClassic; @@ -78,6 +79,7 @@ import com.android.systemui.util.settings.SecureSettings; import java.io.PrintWriter; import java.util.Locale; +import java.util.concurrent.Executor; import java.util.function.Consumer; import javax.inject.Inject; @@ -136,6 +138,7 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS private KeyguardInteractor mKeyguardInteractor; private KeyguardClockInteractor mKeyguardClockInteractor; private final DelayableExecutor mUiExecutor; + private final Executor mBgExecutor; private boolean mCanShowDoubleLineClock = true; private DisposableHandle mAodIconsBindHandle; @Nullable private NotificationIconContainer mAodIconContainer; @@ -186,6 +189,7 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS KeyguardUnlockAnimationController keyguardUnlockAnimationController, SecureSettings secureSettings, @Main DelayableExecutor uiExecutor, + @Background Executor bgExecutor, DumpManager dumpManager, ClockEventController clockEventController, @KeyguardClockLog LogBuffer logBuffer, @@ -209,6 +213,7 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS mIconViewBindingFailureTracker = iconViewBindingFailureTracker; mSecureSettings = secureSettings; mUiExecutor = uiExecutor; + mBgExecutor = bgExecutor; mKeyguardUnlockAnimationController = keyguardUnlockAnimationController; mDumpManager = dumpManager; mClockEventController = clockEventController; @@ -328,19 +333,22 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS updateAodIcons(); mStatusArea = mView.findViewById(R.id.keyguard_status_area); - mSecureSettings.registerContentObserverForUser( - Settings.Secure.LOCKSCREEN_USE_DOUBLE_LINE_CLOCK, - false, /* notifyForDescendants */ - mDoubleLineClockObserver, - UserHandle.USER_ALL - ); - - mSecureSettings.registerContentObserverForUser( - Settings.Secure.LOCK_SCREEN_WEATHER_ENABLED, - false, /* notifyForDescendants */ - mShowWeatherObserver, - UserHandle.USER_ALL - ); + mBgExecutor.execute(() -> { + mSecureSettings.registerContentObserverForUser( + Settings.Secure.LOCKSCREEN_USE_DOUBLE_LINE_CLOCK, + false, /* notifyForDescendants */ + mDoubleLineClockObserver, + UserHandle.USER_ALL + ); + + mSecureSettings.registerContentObserverForUser( + Settings.Secure.LOCK_SCREEN_WEATHER_ENABLED, + false, /* notifyForDescendants */ + mShowWeatherObserver, + UserHandle.USER_ALL + ); + }); + updateDoubleLineClock(); mKeyguardUnlockAnimationController.addKeyguardUnlockAnimationListener( @@ -382,8 +390,10 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS mClockEventController.unregisterListeners(); setClock(null); - mSecureSettings.unregisterContentObserver(mDoubleLineClockObserver); - mSecureSettings.unregisterContentObserver(mShowWeatherObserver); + mBgExecutor.execute(() -> { + mSecureSettings.unregisterContentObserver(mDoubleLineClockObserver); + mSecureSettings.unregisterContentObserver(mShowWeatherObserver); + }); mKeyguardUnlockAnimationController.removeKeyguardUnlockAnimationListener( mKeyguardUnlockAnimationListener); diff --git a/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java b/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java index 07359d1b446c..175fcdb6e11a 100644 --- a/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java +++ b/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java @@ -26,7 +26,7 @@ import static com.android.systemui.Flags.keyguardBottomAreaRefactor; import static com.android.systemui.doze.util.BurnInHelperKt.getBurnInOffset; import static com.android.systemui.flags.Flags.DOZING_MIGRATION_1; import static com.android.systemui.flags.Flags.LOCKSCREEN_WALLPAPER_DREAM_ENABLED; -import static com.android.systemui.flags.Flags.NEW_AOD_TRANSITION; +import static com.android.systemui.Flags.newAodTransition; import static com.android.systemui.util.kotlin.JavaAdapterKt.collectFlow; import android.annotation.SuppressLint; @@ -395,7 +395,7 @@ public class LockIconViewController implements Dumpable { mView.updateIcon(ICON_LOCK, true); mView.setContentDescription(mLockedLabel); mView.setVisibility(View.VISIBLE); - } else if (mIsDozing && mFeatureFlags.isEnabled(NEW_AOD_TRANSITION)) { + } else if (mIsDozing && newAodTransition()) { mView.animate() .alpha(0f) .setDuration(FADE_OUT_DURATION_MS) diff --git a/packages/SystemUI/src/com/android/keyguard/logging/ScrimLogger.kt b/packages/SystemUI/src/com/android/keyguard/logging/ScrimLogger.kt new file mode 100644 index 000000000000..a068769cb515 --- /dev/null +++ b/packages/SystemUI/src/com/android/keyguard/logging/ScrimLogger.kt @@ -0,0 +1,63 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.keyguard.logging + +import com.android.systemui.log.LogBuffer +import com.android.systemui.log.core.LogLevel +import com.android.systemui.log.dagger.ScrimLog +import com.google.errorprone.annotations.CompileTimeConstant +import javax.inject.Inject + +/** + * A logger to log scrim state. + * + * To enable logcat echoing for this buffer use this command: + * ``` + * $ adb shell cmd statusbar echo -b ScrimLog:VERBOSE + * ``` + */ +class ScrimLogger +@Inject +constructor( + @ScrimLog val buffer: LogBuffer, +) { + companion object { + val TAG = ScrimLogger::class.simpleName!! + } + + fun d( + tag: String, + @CompileTimeConstant msg: String, + arg: Any, + ) = log("$tag::$TAG", LogLevel.DEBUG, msg, arg) + + fun log( + tag: String, + level: LogLevel, + @CompileTimeConstant msg: String, + arg: Any, + ) = + buffer.log( + tag, + level, + { + str1 = msg + str2 = arg.toString() + }, + { "$str1: $str2" } + ) +} diff --git a/packages/SystemUI/src/com/android/systemui/accessibility/WindowMagnification.java b/packages/SystemUI/src/com/android/systemui/accessibility/Magnification.java index 59b85d112753..b704f3c89330 100644 --- a/packages/SystemUI/src/com/android/systemui/accessibility/WindowMagnification.java +++ b/packages/SystemUI/src/com/android/systemui/accessibility/Magnification.java @@ -59,8 +59,8 @@ import javax.inject.Inject; * when {@code IStatusBar#requestWindowMagnificationConnection(boolean)} is called. */ @SysUISingleton -public class WindowMagnification implements CoreStartable, CommandQueue.Callbacks { - private static final String TAG = "WindowMagnification"; +public class Magnification implements CoreStartable, CommandQueue.Callbacks { + private static final String TAG = "Magnification"; private final ModeSwitchesController mModeSwitchesController; private final Context mContext; @@ -154,7 +154,7 @@ public class WindowMagnification implements CoreStartable, CommandQueue.Callback DisplayIdIndexSupplier<MagnificationSettingsController> mMagnificationSettingsSupplier; @Inject - public WindowMagnification(Context context, @Main Handler mainHandler, + public Magnification(Context context, @Main Handler mainHandler, CommandQueue commandQueue, ModeSwitchesController modeSwitchesController, SysUiState sysUiState, OverviewProxyService overviewProxyService, SecureSettings secureSettings, DisplayTracker displayTracker, @@ -366,49 +366,53 @@ public class WindowMagnification implements CoreStartable, CommandQueue.Callback @VisibleForTesting final MagnificationSettingsController.Callback mMagnificationSettingsControllerCallback = new MagnificationSettingsController.Callback() { - @Override - public void onSetMagnifierSize(int displayId, int index) { - mHandler.post(() -> onSetMagnifierSizeInternal(displayId, index)); - mA11yLogger.logWithPosition( - MagnificationSettingsEvent.MAGNIFICATION_SETTINGS_WINDOW_SIZE_SELECTED, - index - ); - } + @Override + public void onSetMagnifierSize(int displayId, int index) { + mHandler.post(() -> onSetMagnifierSizeInternal(displayId, index)); + mA11yLogger.logWithPosition( + MagnificationSettingsEvent.MAGNIFICATION_SETTINGS_WINDOW_SIZE_SELECTED, + index + ); + } - @Override - public void onSetDiagonalScrolling(int displayId, boolean enable) { - mHandler.post(() -> onSetDiagonalScrollingInternal(displayId, enable)); - } + @Override + public void onSetDiagonalScrolling(int displayId, boolean enable) { + mHandler.post(() -> onSetDiagonalScrollingInternal(displayId, enable)); + } - @Override - public void onEditMagnifierSizeMode(int displayId, boolean enable) { - mHandler.post(() -> onEditMagnifierSizeModeInternal(displayId, enable)); - mA11yLogger.log(enable - ? MagnificationSettingsEvent.MAGNIFICATION_SETTINGS_SIZE_EDITING_ACTIVATED - : MagnificationSettingsEvent.MAGNIFICATION_SETTINGS_SIZE_EDITING_DEACTIVATED); - } + @Override + public void onEditMagnifierSizeMode(int displayId, boolean enable) { + mHandler.post(() -> onEditMagnifierSizeModeInternal(displayId, enable)); + mA11yLogger.log(enable + ? + MagnificationSettingsEvent + .MAGNIFICATION_SETTINGS_SIZE_EDITING_ACTIVATED + : MagnificationSettingsEvent + .MAGNIFICATION_SETTINGS_SIZE_EDITING_DEACTIVATED); + } - @Override - public void onMagnifierScale(int displayId, float scale, boolean updatePersistence) { - if (mWindowMagnificationConnectionImpl != null) { - mWindowMagnificationConnectionImpl.onPerformScaleAction( - displayId, scale, updatePersistence); - } - mA11yLogger.logThrottled( - MagnificationSettingsEvent.MAGNIFICATION_SETTINGS_ZOOM_SLIDER_CHANGED - ); - } + @Override + public void onMagnifierScale(int displayId, float scale, + boolean updatePersistence) { + if (mWindowMagnificationConnectionImpl != null) { + mWindowMagnificationConnectionImpl.onPerformScaleAction( + displayId, scale, updatePersistence); + } + mA11yLogger.logThrottled( + MagnificationSettingsEvent.MAGNIFICATION_SETTINGS_ZOOM_SLIDER_CHANGED + ); + } - @Override - public void onModeSwitch(int displayId, int newMode) { - mHandler.post(() -> onModeSwitchInternal(displayId, newMode)); - } + @Override + public void onModeSwitch(int displayId, int newMode) { + mHandler.post(() -> onModeSwitchInternal(displayId, newMode)); + } - @Override - public void onSettingsPanelVisibilityChanged(int displayId, boolean shown) { - mHandler.post(() -> onSettingsPanelVisibilityChangedInternal(displayId, shown)); - } - }; + @Override + public void onSettingsPanelVisibilityChanged(int displayId, boolean shown) { + mHandler.post(() -> onSettingsPanelVisibilityChangedInternal(displayId, shown)); + } + }; @MainThread private void onSetMagnifierSizeInternal(int displayId, int index) { diff --git a/packages/SystemUI/src/com/android/systemui/accessibility/MagnificationSettingsController.java b/packages/SystemUI/src/com/android/systemui/accessibility/MagnificationSettingsController.java index ee7781d8af20..b4530ace68d6 100644 --- a/packages/SystemUI/src/com/android/systemui/accessibility/MagnificationSettingsController.java +++ b/packages/SystemUI/src/com/android/systemui/accessibility/MagnificationSettingsController.java @@ -34,7 +34,7 @@ import com.android.systemui.util.settings.SecureSettings; * A class to control {@link WindowMagnificationSettings} and receive settings panel callbacks by * {@link WindowMagnificationSettingsCallback}. * The settings panel callbacks will be delegated through - * {@link MagnificationSettingsController.Callback} to {@link WindowMagnification}. + * {@link MagnificationSettingsController.Callback} to {@link Magnification}. */ public class MagnificationSettingsController implements ComponentCallbacks { diff --git a/packages/SystemUI/src/com/android/systemui/accessibility/WindowMagnificationConnectionImpl.java b/packages/SystemUI/src/com/android/systemui/accessibility/WindowMagnificationConnectionImpl.java index 928445bde8ff..5666851f560f 100644 --- a/packages/SystemUI/src/com/android/systemui/accessibility/WindowMagnificationConnectionImpl.java +++ b/packages/SystemUI/src/com/android/systemui/accessibility/WindowMagnificationConnectionImpl.java @@ -37,12 +37,12 @@ class WindowMagnificationConnectionImpl extends IWindowMagnificationConnection.S private static final String TAG = "WindowMagnificationConnectionImpl"; private IWindowMagnificationConnectionCallback mConnectionCallback; - private final WindowMagnification mWindowMagnification; + private final Magnification mMagnification; private final Handler mHandler; - WindowMagnificationConnectionImpl(@NonNull WindowMagnification windowMagnification, + WindowMagnificationConnectionImpl(@NonNull Magnification magnification, @Main Handler mainHandler) { - mWindowMagnification = windowMagnification; + mMagnification = magnification; mHandler = mainHandler; } @@ -51,56 +51,56 @@ class WindowMagnificationConnectionImpl extends IWindowMagnificationConnection.S float magnificationFrameOffsetRatioX, float magnificationFrameOffsetRatioY, IRemoteMagnificationAnimationCallback callback) { mHandler.post( - () -> mWindowMagnification.enableWindowMagnification(displayId, scale, centerX, + () -> mMagnification.enableWindowMagnification(displayId, scale, centerX, centerY, magnificationFrameOffsetRatioX, magnificationFrameOffsetRatioY, callback)); } @Override public void setScale(int displayId, float scale) { - mHandler.post(() -> mWindowMagnification.setScale(displayId, scale)); + mHandler.post(() -> mMagnification.setScale(displayId, scale)); } @Override public void disableWindowMagnification(int displayId, IRemoteMagnificationAnimationCallback callback) { - mHandler.post(() -> mWindowMagnification.disableWindowMagnification(displayId, + mHandler.post(() -> mMagnification.disableWindowMagnification(displayId, callback)); } @Override public void moveWindowMagnifier(int displayId, float offsetX, float offsetY) { mHandler.post( - () -> mWindowMagnification.moveWindowMagnifier(displayId, offsetX, offsetY)); + () -> mMagnification.moveWindowMagnifier(displayId, offsetX, offsetY)); } @Override public void moveWindowMagnifierToPosition(int displayId, float positionX, float positionY, IRemoteMagnificationAnimationCallback callback) { - mHandler.post(() -> mWindowMagnification.moveWindowMagnifierToPositionInternal( + mHandler.post(() -> mMagnification.moveWindowMagnifierToPositionInternal( displayId, positionX, positionY, callback)); } @Override public void showMagnificationButton(int displayId, int magnificationMode) { mHandler.post( - () -> mWindowMagnification.showMagnificationButton(displayId, magnificationMode)); + () -> mMagnification.showMagnificationButton(displayId, magnificationMode)); } @Override public void removeMagnificationButton(int displayId) { mHandler.post( - () -> mWindowMagnification.removeMagnificationButton(displayId)); + () -> mMagnification.removeMagnificationButton(displayId)); } @Override public void removeMagnificationSettingsPanel(int display) { - mHandler.post(() -> mWindowMagnification.hideMagnificationSettingsPanel(display)); + mHandler.post(() -> mMagnification.hideMagnificationSettingsPanel(display)); } @Override public void onUserMagnificationScaleChanged(int userId, int displayId, float scale) { - mHandler.post(() -> mWindowMagnification.setUserMagnificationScale( + mHandler.post(() -> mMagnification.setUserMagnificationScale( userId, displayId, scale)); } diff --git a/packages/SystemUI/src/com/android/systemui/authentication/data/repository/AuthenticationRepository.kt b/packages/SystemUI/src/com/android/systemui/authentication/data/repository/AuthenticationRepository.kt index d5c7f93e1413..a42c0ae39c88 100644 --- a/packages/SystemUI/src/com/android/systemui/authentication/data/repository/AuthenticationRepository.kt +++ b/packages/SystemUI/src/com/android/systemui/authentication/data/repository/AuthenticationRepository.kt @@ -109,6 +109,9 @@ interface AuthenticationRepository { /** The minimal length of a pattern. */ val minPatternLength: Int + /** The minimal length of a password. */ + val minPasswordLength: Int + /** Whether the "enhanced PIN privacy" setting is enabled for the current user. */ val isPinEnhancedPrivacyEnabled: StateFlow<Boolean> @@ -220,6 +223,8 @@ constructor( override val minPatternLength: Int = LockPatternUtils.MIN_LOCK_PATTERN_SIZE + override val minPasswordLength: Int = LockPatternUtils.MIN_LOCK_PASSWORD_SIZE + override val isPinEnhancedPrivacyEnabled: StateFlow<Boolean> = refreshingFlow( initialValue = true, diff --git a/packages/SystemUI/src/com/android/systemui/authentication/domain/interactor/AuthenticationInteractor.kt b/packages/SystemUI/src/com/android/systemui/authentication/domain/interactor/AuthenticationInteractor.kt index 5eefbf5353d3..c2974862bffb 100644 --- a/packages/SystemUI/src/com/android/systemui/authentication/domain/interactor/AuthenticationInteractor.kt +++ b/packages/SystemUI/src/com/android/systemui/authentication/domain/interactor/AuthenticationInteractor.kt @@ -200,9 +200,8 @@ constructor( // We're being throttled, the UI layer should not have called this; skip the // attempt. isThrottled.value -> true - // The pattern is too short; skip the attempt. - authMethod == AuthenticationMethodModel.Pattern && - input.size < repository.minPatternLength -> true + // The input is too short; skip the attempt. + input.isTooShort(authMethod) -> true // Auto-confirm attempt when the feature is not enabled; skip the attempt. tryAutoConfirm && !isAutoConfirmEnabled.value -> true // Auto-confirm should skip the attempt if the pin entered is too short. @@ -247,6 +246,14 @@ constructor( } } + private fun List<Any>.isTooShort(authMethod: AuthenticationMethodModel): Boolean { + return when (authMethod) { + AuthenticationMethodModel.Pattern -> size < repository.minPatternLength + AuthenticationMethodModel.Password -> size < repository.minPasswordLength + else -> false + } + } + /** Starts refreshing the throttling state every second. */ private suspend fun startThrottlingCountdown() { cancelThrottlingCountdown() diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/AuthRippleController.kt b/packages/SystemUI/src/com/android/systemui/biometrics/AuthRippleController.kt index f94f8c594aa6..634531215002 100644 --- a/packages/SystemUI/src/com/android/systemui/biometrics/AuthRippleController.kt +++ b/packages/SystemUI/src/com/android/systemui/biometrics/AuthRippleController.kt @@ -31,11 +31,11 @@ import com.android.keyguard.KeyguardUpdateMonitorCallback import com.android.keyguard.logging.KeyguardLogger import com.android.settingslib.Utils import com.android.systemui.CoreStartable +import com.android.systemui.Flags.lightRevealMigration import com.android.systemui.res.R import com.android.systemui.biometrics.shared.model.UdfpsOverlayParams import com.android.systemui.dagger.SysUISingleton import com.android.systemui.flags.FeatureFlags -import com.android.systemui.flags.Flags import com.android.systemui.keyguard.WakefulnessLifecycle import com.android.systemui.log.core.LogLevel import com.android.systemui.plugins.statusbar.StatusBarStateController @@ -191,7 +191,7 @@ class AuthRippleController @Inject constructor( // This code path is not used if the KeyguardTransitionRepository is managing the light // reveal scrim. - if (!featureFlags.isEnabled(Flags.LIGHT_REVEAL_MIGRATION)) { + if (!lightRevealMigration()) { if (statusBarStateController.isDozing || biometricUnlockController.isWakeAndUnlock) { circleReveal?.let { lightRevealScrim.revealAmount = 0f @@ -210,7 +210,7 @@ class AuthRippleController @Inject constructor( } override fun onKeyguardFadingAwayChanged() { - if (featureFlags.isEnabled(Flags.LIGHT_REVEAL_MIGRATION)) { + if (lightRevealMigration()) { return } diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/SideFpsController.kt b/packages/SystemUI/src/com/android/systemui/biometrics/SideFpsController.kt index 8f61dbfbdd10..91cee9e51a93 100644 --- a/packages/SystemUI/src/com/android/systemui/biometrics/SideFpsController.kt +++ b/packages/SystemUI/src/com/android/systemui/biometrics/SideFpsController.kt @@ -62,6 +62,7 @@ import com.android.systemui.bouncer.domain.interactor.AlternateBouncerInteractor import com.android.systemui.dagger.SysUISingleton import com.android.systemui.dagger.qualifiers.Application import com.android.systemui.dagger.qualifiers.Main +import com.android.systemui.deviceentry.shared.DeviceEntryUdfpsRefactor import com.android.systemui.dump.DumpManager import com.android.systemui.res.R import com.android.systemui.util.boundsOnScreen @@ -190,7 +191,10 @@ constructor( } private fun listenForAlternateBouncerVisibility() { - alternateBouncerInteractor.setAlternateBouncerUIAvailable(true, "SideFpsController") + if (!DeviceEntryUdfpsRefactor.isEnabled) { + alternateBouncerInteractor.setAlternateBouncerUIAvailable(true, "SideFpsController") + } + scope.launch { alternateBouncerInteractor.isVisible.collect { isVisible: Boolean -> if (isVisible) { diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsController.java b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsController.java index 417593787ee9..b064391f74b5 100644 --- a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsController.java +++ b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsController.java @@ -83,6 +83,7 @@ import com.android.systemui.dump.DumpManager; import com.android.systemui.flags.FeatureFlags; import com.android.systemui.keyguard.ScreenLifecycle; import com.android.systemui.keyguard.domain.interactor.KeyguardFaceAuthInteractor; +import com.android.systemui.keyguard.domain.interactor.KeyguardTransitionInteractor; import com.android.systemui.keyguard.ui.adapter.UdfpsKeyguardViewControllerAdapter; import com.android.systemui.keyguard.ui.viewmodel.UdfpsKeyguardViewModels; import com.android.systemui.log.SessionTracker; @@ -170,6 +171,7 @@ public class UdfpsController implements DozeReceiver, Dumpable { @NonNull private final SelectedUserInteractor mSelectedUserInteractor; @NonNull private final FpsUnlockTracker mFpsUnlockTracker; private final boolean mIgnoreRefreshRate; + private final KeyguardTransitionInteractor mKeyguardTransitionInteractor; // Currently the UdfpsController supports a single UDFPS sensor. If devices have multiple // sensors, this, in addition to a lot of the code here, will be updated. @@ -283,8 +285,8 @@ public class UdfpsController implements DozeReceiver, Dumpable { mPrimaryBouncerInteractor, mAlternateBouncerInteractor, mUdfpsKeyguardAccessibilityDelegate, - mUdfpsKeyguardViewModels, - mSelectedUserInteractor + mKeyguardTransitionInteractor, + mSelectedUserInteractor ))); } @@ -649,7 +651,8 @@ public class UdfpsController implements DozeReceiver, Dumpable { @NonNull UdfpsKeyguardAccessibilityDelegate udfpsKeyguardAccessibilityDelegate, @NonNull Provider<UdfpsKeyguardViewModels> udfpsKeyguardViewModelsProvider, @NonNull SelectedUserInteractor selectedUserInteractor, - @NonNull FpsUnlockTracker fpsUnlockTracker) { + @NonNull FpsUnlockTracker fpsUnlockTracker, + @NonNull KeyguardTransitionInteractor keyguardTransitionInteractor) { mContext = context; mExecution = execution; mVibrator = vibrator; @@ -695,6 +698,7 @@ public class UdfpsController implements DozeReceiver, Dumpable { mSelectedUserInteractor = selectedUserInteractor; mFpsUnlockTracker = fpsUnlockTracker; mFpsUnlockTracker.startTracking(); + mKeyguardTransitionInteractor = keyguardTransitionInteractor; mTouchProcessor = singlePointerTouchProcessor; mSessionTracker = sessionTracker; diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsControllerOverlay.kt b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsControllerOverlay.kt index 934f9f919d5d..a5bd89a15e5a 100644 --- a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsControllerOverlay.kt +++ b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsControllerOverlay.kt @@ -48,11 +48,11 @@ import com.android.systemui.animation.ActivityLaunchAnimator import com.android.systemui.biometrics.shared.model.UdfpsOverlayParams import com.android.systemui.bouncer.domain.interactor.AlternateBouncerInteractor import com.android.systemui.bouncer.domain.interactor.PrimaryBouncerInteractor +import com.android.systemui.deviceentry.shared.DeviceEntryUdfpsRefactor import com.android.systemui.dump.DumpManager import com.android.systemui.flags.FeatureFlags -import com.android.systemui.flags.Flags.REFACTOR_UDFPS_KEYGUARD_VIEWS +import com.android.systemui.keyguard.domain.interactor.KeyguardTransitionInteractor import com.android.systemui.keyguard.ui.adapter.UdfpsKeyguardViewControllerAdapter -import com.android.systemui.keyguard.ui.viewmodel.UdfpsKeyguardViewModels import com.android.systemui.plugins.statusbar.StatusBarStateController import com.android.systemui.res.R import com.android.systemui.statusbar.LockscreenShadeTransitionController @@ -63,7 +63,6 @@ import com.android.systemui.statusbar.policy.ConfigurationController import com.android.systemui.statusbar.policy.KeyguardStateController import com.android.systemui.user.domain.interactor.SelectedUserInteractor import kotlinx.coroutines.ExperimentalCoroutinesApi -import javax.inject.Provider private const val TAG = "UdfpsControllerOverlay" @@ -102,7 +101,7 @@ class UdfpsControllerOverlay @JvmOverloads constructor( private val alternateBouncerInteractor: AlternateBouncerInteractor, private val isDebuggable: Boolean = Build.IS_DEBUGGABLE, private val udfpsKeyguardAccessibilityDelegate: UdfpsKeyguardAccessibilityDelegate, - private val udfpsKeyguardViewModels: Provider<UdfpsKeyguardViewModels>, + private val transitionInteractor: KeyguardTransitionInteractor, private val selectedUserInteractor: SelectedUserInteractor, ) { /** The view, when [isShowing], or null. */ @@ -238,7 +237,7 @@ class UdfpsControllerOverlay @JvmOverloads constructor( ) } REASON_AUTH_KEYGUARD -> { - if (featureFlags.isEnabled(REFACTOR_UDFPS_KEYGUARD_VIEWS)) { + if (DeviceEntryUdfpsRefactor.isEnabled) { // note: empty controller, currently shows no visual affordance // instead SysUI will show the fingerprint icon in its DeviceEntryIconView UdfpsBpViewController( @@ -264,11 +263,11 @@ class UdfpsControllerOverlay @JvmOverloads constructor( dialogManager, controller, activityLaunchAnimator, - featureFlags, primaryBouncerInteractor, alternateBouncerInteractor, udfpsKeyguardAccessibilityDelegate, selectedUserInteractor, + transitionInteractor, ) } } diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsKeyguardViewControllerLegacy.kt b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsKeyguardViewControllerLegacy.kt index d7df0e585dcf..35c3ded9e984 100644 --- a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsKeyguardViewControllerLegacy.kt +++ b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsKeyguardViewControllerLegacy.kt @@ -16,7 +16,6 @@ package com.android.systemui.biometrics -import android.animation.ValueAnimator import android.content.res.Configuration import android.util.MathUtils import android.view.View @@ -27,17 +26,17 @@ import com.android.app.animation.Interpolators import com.android.keyguard.BouncerPanelExpansionCalculator.aboutToShowBouncerProgress import com.android.keyguard.KeyguardUpdateMonitor import com.android.systemui.animation.ActivityLaunchAnimator +import com.android.systemui.biometrics.UdfpsKeyguardViewLegacy.ANIMATION_UNLOCKED_SCREEN_OFF import com.android.systemui.bouncer.domain.interactor.AlternateBouncerInteractor import com.android.systemui.bouncer.domain.interactor.PrimaryBouncerInteractor import com.android.systemui.dump.DumpManager -import com.android.systemui.flags.FeatureFlags +import com.android.systemui.keyguard.domain.interactor.KeyguardTransitionInteractor import com.android.systemui.keyguard.ui.adapter.UdfpsKeyguardViewControllerAdapter import com.android.systemui.lifecycle.repeatWhenAttached import com.android.systemui.plugins.statusbar.StatusBarStateController import com.android.systemui.res.R import com.android.systemui.statusbar.LockscreenShadeTransitionController import com.android.systemui.statusbar.StatusBarState -import com.android.systemui.statusbar.notification.stack.StackStateAnimator import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager.KeyguardViewManagerCallback import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager.OccludingAppBiometricUI @@ -48,10 +47,14 @@ import com.android.systemui.statusbar.policy.KeyguardStateController import com.android.systemui.user.domain.interactor.SelectedUserInteractor import java.io.PrintWriter import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.Job +import kotlinx.coroutines.flow.map +import kotlinx.coroutines.flow.merge import kotlinx.coroutines.launch /** Class that coordinates non-HBM animations during keyguard authentication. */ +@ExperimentalCoroutinesApi open class UdfpsKeyguardViewControllerLegacy( private val view: UdfpsKeyguardViewLegacy, statusBarStateController: StatusBarStateController, @@ -65,11 +68,11 @@ open class UdfpsKeyguardViewControllerLegacy( systemUIDialogManager: SystemUIDialogManager, private val udfpsController: UdfpsController, private val activityLaunchAnimator: ActivityLaunchAnimator, - featureFlags: FeatureFlags, primaryBouncerInteractor: PrimaryBouncerInteractor, private val alternateBouncerInteractor: AlternateBouncerInteractor, private val udfpsKeyguardAccessibilityDelegate: UdfpsKeyguardAccessibilityDelegate, private val selectedUserInteractor: SelectedUserInteractor, + private val transitionInteractor: KeyguardTransitionInteractor, ) : UdfpsAnimationViewController<UdfpsKeyguardViewLegacy>( view, @@ -91,44 +94,10 @@ open class UdfpsKeyguardViewControllerLegacy( private var launchTransitionFadingAway = false private var isLaunchingActivity = false private var activityLaunchProgress = 0f - private val unlockedScreenOffDozeAnimator = - ValueAnimator.ofFloat(0f, 1f).apply { - duration = StackStateAnimator.ANIMATION_DURATION_STANDARD.toLong() - interpolator = Interpolators.ALPHA_IN - addUpdateListener { animation -> - view.onDozeAmountChanged( - animation.animatedFraction, - animation.animatedValue as Float, - UdfpsKeyguardViewLegacy.ANIMATION_UNLOCKED_SCREEN_OFF - ) - } - } private var inputBouncerExpansion = 0f private val stateListener: StatusBarStateController.StateListener = object : StatusBarStateController.StateListener { - override fun onDozeAmountChanged(linear: Float, eased: Float) { - if (lastDozeAmount < linear) { - showUdfpsBouncer(false) - } - unlockedScreenOffDozeAnimator.cancel() - val animatingFromUnlockedScreenOff = - unlockedScreenOffAnimationController.isAnimationPlaying() - if (animatingFromUnlockedScreenOff && linear != 0f) { - // we manually animate the fade in of the UDFPS icon since the unlocked - // screen off animation prevents the doze amounts to be incrementally eased in - unlockedScreenOffDozeAnimator.start() - } else { - view.onDozeAmountChanged( - linear, - eased, - UdfpsKeyguardViewLegacy.ANIMATION_BETWEEN_AOD_AND_LOCKSCREEN - ) - } - lastDozeAmount = linear - updatePauseAuth() - } - override fun onStateChanged(statusBarState: Int) { this@UdfpsKeyguardViewControllerLegacy.statusBarState = statusBarState updateAlpha() @@ -215,6 +184,7 @@ open class UdfpsKeyguardViewControllerLegacy( } init { + com.android.systemui.deviceentry.shared.DeviceEntryUdfpsRefactor.assertInLegacyMode() view.repeatWhenAttached { // repeatOnLifecycle CREATED (as opposed to STARTED) because the Bouncer expansion // can make the view not visible; and we still want to listen for events @@ -222,11 +192,39 @@ open class UdfpsKeyguardViewControllerLegacy( repeatOnLifecycle(Lifecycle.State.CREATED) { listenForBouncerExpansion(this) listenForAlternateBouncerVisibility(this) + listenForGoneToAodTransition(this) + listenForLockscreenAodTransitions(this) + } + } + } + + @VisibleForTesting + suspend fun listenForGoneToAodTransition(scope: CoroutineScope): Job { + return scope.launch { + transitionInteractor.goneToAodTransition.collect { transitionStep -> + view.onDozeAmountChanged( + transitionStep.value, + transitionStep.value, + ANIMATION_UNLOCKED_SCREEN_OFF, + ) } } } @VisibleForTesting + suspend fun listenForLockscreenAodTransitions(scope: CoroutineScope): Job { + return scope.launch { + transitionInteractor.dozeAmountTransition.collect { transitionStep -> + view.onDozeAmountChanged( + transitionStep.value, + transitionStep.value, + UdfpsKeyguardViewLegacy.ANIMATION_BETWEEN_AOD_AND_LOCKSCREEN, + ) + } + } + } + + @VisibleForTesting override suspend fun listenForBouncerExpansion(scope: CoroutineScope): Job { return scope.launch { primaryBouncerInteractor.bouncerExpansion.collect { bouncerExpansion: Float -> diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsKeyguardViewLegacy.java b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsKeyguardViewLegacy.java index 95e3a76c11d8..f4ed8cef7bb8 100644 --- a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsKeyguardViewLegacy.java +++ b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsKeyguardViewLegacy.java @@ -73,9 +73,6 @@ public class UdfpsKeyguardViewLegacy extends UdfpsAnimationView { // AOD anti-burn-in offsets private final int mMaxBurnInOffsetX; private final int mMaxBurnInOffsetY; - private float mBurnInOffsetX; - private float mBurnInOffsetY; - private float mBurnInProgress; private float mInterpolatedDarkAmount; private int mAnimationType = ANIMATION_NONE; private boolean mFullyInflated; @@ -138,20 +135,22 @@ public class UdfpsKeyguardViewLegacy extends UdfpsAnimationView { // AoD-burn in location, else we need to translate the icon from LS => AoD. final float darkAmountForAnimation = mAnimationType == ANIMATION_UNLOCKED_SCREEN_OFF ? 1f : mInterpolatedDarkAmount; - mBurnInOffsetX = MathUtils.lerp(0f, + final float burnInOffsetX = MathUtils.lerp(0f, getBurnInOffset(mMaxBurnInOffsetX * 2, true /* xAxis */) - mMaxBurnInOffsetX, darkAmountForAnimation); - mBurnInOffsetY = MathUtils.lerp(0f, + final float burnInOffsetY = MathUtils.lerp(0f, getBurnInOffset(mMaxBurnInOffsetY * 2, false /* xAxis */) - mMaxBurnInOffsetY, darkAmountForAnimation); - mBurnInProgress = MathUtils.lerp(0f, getBurnInProgressOffset(), darkAmountForAnimation); + final float burnInProgress = MathUtils.lerp(0f, getBurnInProgressOffset(), + darkAmountForAnimation); if (mAnimationType == ANIMATION_BETWEEN_AOD_AND_LOCKSCREEN && !mPauseAuth) { - mLockScreenFp.setTranslationX(mBurnInOffsetX); - mLockScreenFp.setTranslationY(mBurnInOffsetY); + mLockScreenFp.setTranslationX(burnInOffsetX); + mLockScreenFp.setTranslationY(burnInOffsetY); mBgProtection.setAlpha(1f - mInterpolatedDarkAmount); mLockScreenFp.setAlpha(1f - mInterpolatedDarkAmount); } else if (darkAmountForAnimation == 0f) { + // we're on the lockscreen and should use mAlpha (changes based on shade expansion) mLockScreenFp.setTranslationX(0); mLockScreenFp.setTranslationY(0); mBgProtection.setAlpha(mAlpha / 255f); @@ -162,9 +161,9 @@ public class UdfpsKeyguardViewLegacy extends UdfpsAnimationView { } mLockScreenFp.setProgress(1f - mInterpolatedDarkAmount); - mAodFp.setTranslationX(mBurnInOffsetX); - mAodFp.setTranslationY(mBurnInOffsetY); - mAodFp.setProgress(mBurnInProgress); + mAodFp.setTranslationX(burnInOffsetX); + mAodFp.setTranslationY(burnInOffsetY); + mAodFp.setProgress(burnInProgress); mAodFp.setAlpha(mInterpolatedDarkAmount); // done animating diff --git a/packages/SystemUI/src/com/android/systemui/bouncer/data/repository/KeyguardBouncerRepository.kt b/packages/SystemUI/src/com/android/systemui/bouncer/data/repository/KeyguardBouncerRepository.kt index c0b21534c5f3..1e0e16c5472f 100644 --- a/packages/SystemUI/src/com/android/systemui/bouncer/data/repository/KeyguardBouncerRepository.kt +++ b/packages/SystemUI/src/com/android/systemui/bouncer/data/repository/KeyguardBouncerRepository.kt @@ -22,6 +22,7 @@ import com.android.systemui.bouncer.shared.constants.KeyguardBouncerConstants.EX import com.android.systemui.bouncer.shared.model.BouncerShowMessageModel import com.android.systemui.dagger.SysUISingleton import com.android.systemui.dagger.qualifiers.Application +import com.android.systemui.deviceentry.shared.DeviceEntryUdfpsRefactor import com.android.systemui.log.dagger.BouncerTableLog import com.android.systemui.log.table.TableLogBuffer import com.android.systemui.log.table.logDiffsForTable @@ -208,6 +209,7 @@ constructor( } override fun setAlternateBouncerUIAvailable(isAvailable: Boolean) { + DeviceEntryUdfpsRefactor.assertInLegacyMode() _alternateBouncerUIAvailable.value = isAvailable } diff --git a/packages/SystemUI/src/com/android/systemui/bouncer/domain/interactor/AlternateBouncerInteractor.kt b/packages/SystemUI/src/com/android/systemui/bouncer/domain/interactor/AlternateBouncerInteractor.kt index 9a7fec1daae0..a7211007e5e3 100644 --- a/packages/SystemUI/src/com/android/systemui/bouncer/domain/interactor/AlternateBouncerInteractor.kt +++ b/packages/SystemUI/src/com/android/systemui/bouncer/domain/interactor/AlternateBouncerInteractor.kt @@ -17,14 +17,23 @@ package com.android.systemui.bouncer.domain.interactor import com.android.keyguard.KeyguardUpdateMonitor +import com.android.systemui.biometrics.data.repository.FingerprintPropertyRepository +import com.android.systemui.biometrics.shared.model.FingerprintSensorType import com.android.systemui.bouncer.data.repository.KeyguardBouncerRepository import com.android.systemui.dagger.SysUISingleton +import com.android.systemui.dagger.qualifiers.Application +import com.android.systemui.deviceentry.shared.DeviceEntryUdfpsRefactor import com.android.systemui.keyguard.data.repository.BiometricSettingsRepository import com.android.systemui.plugins.statusbar.StatusBarStateController import com.android.systemui.statusbar.policy.KeyguardStateController import com.android.systemui.util.time.SystemClock import javax.inject.Inject +import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.flow.Flow +import kotlinx.coroutines.flow.SharingStarted +import kotlinx.coroutines.flow.StateFlow +import kotlinx.coroutines.flow.map +import kotlinx.coroutines.flow.stateIn /** Encapsulates business logic for interacting with the lock-screen alternate bouncer. */ @SysUISingleton @@ -34,13 +43,29 @@ constructor( private val statusBarStateController: StatusBarStateController, private val keyguardStateController: KeyguardStateController, private val bouncerRepository: KeyguardBouncerRepository, + fingerprintPropertyRepository: FingerprintPropertyRepository, private val biometricSettingsRepository: BiometricSettingsRepository, private val systemClock: SystemClock, private val keyguardUpdateMonitor: KeyguardUpdateMonitor, + @Application scope: CoroutineScope, ) { var receivedDownTouch = false val isVisible: Flow<Boolean> = bouncerRepository.alternateBouncerVisible private val alternateBouncerUiAvailableFromSource: HashSet<String> = HashSet() + private val alternateBouncerSupported: StateFlow<Boolean> = + if (DeviceEntryUdfpsRefactor.isEnabled) { + fingerprintPropertyRepository.sensorType + .map { sensorType -> + sensorType.isUdfps() || sensorType == FingerprintSensorType.POWER_BUTTON + } + .stateIn( + scope = scope, + started = SharingStarted.Eagerly, + initialValue = false, + ) + } else { + bouncerRepository.alternateBouncerUIAvailable + } /** * Sets the correct bouncer states to show the alternate bouncer if it can show. @@ -71,6 +96,7 @@ constructor( } fun setAlternateBouncerUIAvailable(isAvailable: Boolean, token: String) { + DeviceEntryUdfpsRefactor.assertInLegacyMode() if (isAvailable) { alternateBouncerUiAvailableFromSource.add(token) } else { @@ -82,7 +108,7 @@ constructor( } fun canShowAlternateBouncerForFingerprint(): Boolean { - return bouncerRepository.alternateBouncerUIAvailable.value && + return alternateBouncerSupported.value && biometricSettingsRepository.isFingerprintAuthCurrentlyAllowed.value && !keyguardUpdateMonitor.isFingerprintLockedOut && !keyguardStateController.isUnlocked && diff --git a/packages/SystemUI/src/com/android/systemui/bouncer/domain/interactor/BouncerInteractor.kt b/packages/SystemUI/src/com/android/systemui/bouncer/domain/interactor/BouncerInteractor.kt index d5ac48371ae9..b598631c3b57 100644 --- a/packages/SystemUI/src/com/android/systemui/bouncer/domain/interactor/BouncerInteractor.kt +++ b/packages/SystemUI/src/com/android/systemui/bouncer/domain/interactor/BouncerInteractor.kt @@ -26,6 +26,7 @@ import com.android.systemui.classifier.FalsingClassifier import com.android.systemui.classifier.domain.interactor.FalsingInteractor import com.android.systemui.dagger.SysUISingleton import com.android.systemui.dagger.qualifiers.Application +import com.android.systemui.keyguard.domain.interactor.KeyguardFaceAuthInteractor import com.android.systemui.power.domain.interactor.PowerInteractor import com.android.systemui.res.R import com.android.systemui.scene.shared.flag.SceneContainerFlags @@ -51,6 +52,7 @@ constructor( @Application private val applicationContext: Context, private val repository: BouncerRepository, private val authenticationInteractor: AuthenticationInteractor, + private val keyguardFaceAuthInteractor: KeyguardFaceAuthInteractor, flags: SceneContainerFlags, private val falsingInteractor: FalsingInteractor, private val powerInteractor: PowerInteractor, @@ -131,6 +133,7 @@ constructor( * user's pocket or by the user's face while holding their device up to their ear. */ fun onIntentionalUserInput() { + keyguardFaceAuthInteractor.onPrimaryBouncerUserInput() powerInteractor.onUserTouch() falsingInteractor.updateFalseConfidence(FalsingClassifier.Result.passed(0.6)) } diff --git a/packages/SystemUI/src/com/android/systemui/bouncer/ui/viewmodel/AuthMethodBouncerViewModel.kt b/packages/SystemUI/src/com/android/systemui/bouncer/ui/viewmodel/AuthMethodBouncerViewModel.kt index f46574ca5bbe..80248744c25a 100644 --- a/packages/SystemUI/src/com/android/systemui/bouncer/ui/viewmodel/AuthMethodBouncerViewModel.kt +++ b/packages/SystemUI/src/com/android/systemui/bouncer/ui/viewmodel/AuthMethodBouncerViewModel.kt @@ -62,6 +62,13 @@ sealed class AuthMethodBouncerViewModel( /** Notifies that the UI has been shown to the user. */ fun onShown() { + interactor.resetMessage() + } + + /** + * Notifies that the UI has been hidden from the user (after any transitions have completed). + */ + fun onHidden() { clearInput() interactor.resetMessage() } @@ -113,8 +120,6 @@ sealed class AuthMethodBouncerViewModel( } _animateFailure.value = authenticationResult != AuthenticationResult.SUCCEEDED - // TODO(b/291528545): On success, this should only be cleared after the view is animated - // away). clearInput() } } diff --git a/packages/SystemUI/src/com/android/systemui/common/shared/model/Icon.kt b/packages/SystemUI/src/com/android/systemui/common/shared/model/Icon.kt index 6c45af2a8729..3cdb57318e8d 100644 --- a/packages/SystemUI/src/com/android/systemui/common/shared/model/Icon.kt +++ b/packages/SystemUI/src/com/android/systemui/common/shared/model/Icon.kt @@ -36,3 +36,7 @@ sealed class Icon { override val contentDescription: ContentDescription?, ) : Icon() } + +/** Creates [Icon.Loaded] for a given drawable with an optional [contentDescription]. */ +fun Drawable.asIcon(contentDescription: ContentDescription? = null): Icon = + Icon.Loaded(this, contentDescription) diff --git a/packages/SystemUI/src/com/android/systemui/communal/dagger/CommunalModule.kt b/packages/SystemUI/src/com/android/systemui/communal/dagger/CommunalModule.kt index 273adcf83271..847b98e82d80 100644 --- a/packages/SystemUI/src/com/android/systemui/communal/dagger/CommunalModule.kt +++ b/packages/SystemUI/src/com/android/systemui/communal/dagger/CommunalModule.kt @@ -16,12 +16,17 @@ package com.android.systemui.communal.dagger +import android.content.Context import com.android.systemui.communal.data.db.CommunalDatabaseModule import com.android.systemui.communal.data.repository.CommunalMediaRepositoryModule import com.android.systemui.communal.data.repository.CommunalRepositoryModule import com.android.systemui.communal.data.repository.CommunalTutorialRepositoryModule import com.android.systemui.communal.data.repository.CommunalWidgetRepositoryModule +import com.android.systemui.communal.widgets.EditWidgetsActivityStarter +import com.android.systemui.communal.widgets.EditWidgetsActivityStarterImpl +import com.android.systemui.dagger.qualifiers.Application import dagger.Module +import dagger.Provides @Module( includes = @@ -33,4 +38,11 @@ import dagger.Module CommunalDatabaseModule::class, ] ) -class CommunalModule +class CommunalModule { + @Provides + fun provideEditWidgetsActivityStarter( + @Application context: Context + ): EditWidgetsActivityStarter { + return EditWidgetsActivityStarterImpl(context) + } +} diff --git a/packages/SystemUI/src/com/android/systemui/communal/domain/interactor/CommunalInteractor.kt b/packages/SystemUI/src/com/android/systemui/communal/domain/interactor/CommunalInteractor.kt index 771dfbcae138..7391a5e8e5fc 100644 --- a/packages/SystemUI/src/com/android/systemui/communal/domain/interactor/CommunalInteractor.kt +++ b/packages/SystemUI/src/com/android/systemui/communal/domain/interactor/CommunalInteractor.kt @@ -25,6 +25,7 @@ import com.android.systemui.communal.data.repository.CommunalWidgetRepository import com.android.systemui.communal.domain.model.CommunalContentModel import com.android.systemui.communal.shared.model.CommunalContentSize import com.android.systemui.communal.shared.model.CommunalSceneKey +import com.android.systemui.communal.widgets.EditWidgetsActivityStarter import com.android.systemui.dagger.SysUISingleton import com.android.systemui.smartspace.data.repository.SmartspaceRepository import javax.inject.Inject @@ -48,6 +49,7 @@ constructor( smartspaceRepository: SmartspaceRepository, tutorialInteractor: CommunalTutorialInteractor, private val appWidgetHost: AppWidgetHost, + private val editWidgetsActivityStarter: EditWidgetsActivityStarter ) { /** Whether communal features are enabled. */ @@ -72,6 +74,11 @@ constructor( communalRepository.setDesiredScene(newScene) } + /** Show the widget editor Activity. */ + fun showWidgetEditor() { + editWidgetsActivityStarter.startActivity() + } + /** Add a widget at the specified position. */ fun addWidget(componentName: ComponentName, priority: Int) = widgetRepository.addWidget(componentName, priority) diff --git a/packages/SystemUI/src/com/android/systemui/communal/ui/viewmodel/CommunalViewModel.kt b/packages/SystemUI/src/com/android/systemui/communal/ui/viewmodel/CommunalViewModel.kt index 5efe6ceeb65a..14edc8e0a88c 100644 --- a/packages/SystemUI/src/com/android/systemui/communal/ui/viewmodel/CommunalViewModel.kt +++ b/packages/SystemUI/src/com/android/systemui/communal/ui/viewmodel/CommunalViewModel.kt @@ -16,7 +16,6 @@ package com.android.systemui.communal.ui.viewmodel -import android.content.ComponentName import com.android.systemui.communal.domain.interactor.CommunalInteractor import com.android.systemui.communal.domain.model.CommunalContentModel import com.android.systemui.communal.shared.model.CommunalSceneKey @@ -46,19 +45,6 @@ constructor( /** Delete a widget by id. */ fun onDeleteWidget(id: Int) = communalInteractor.deleteWidget(id) - /** Open the widget picker */ - fun onOpenWidgetPicker() { - // STOPSHIP(b/306500486): refactor this when integrating with the widget picker. - // Eventually clicking on this button will bring up the widget picker and inside - // the widget picker, addWidget will be called to add the user selected widget. - // For now, a stopwatch widget will be added to the end of the grid. - communalInteractor.addWidget( - componentName = - ComponentName( - "com.google.android.deskclock", - "com.android.alarmclock.StopwatchAppWidgetProvider" - ), - priority = 0 - ) - } + /** Open the widget editor */ + fun onOpenWidgetEditor() = communalInteractor.showWidgetEditor() } diff --git a/packages/SystemUI/src/com/android/systemui/communal/widgets/EditWidgetsActivity.kt b/packages/SystemUI/src/com/android/systemui/communal/widgets/EditWidgetsActivity.kt new file mode 100644 index 000000000000..78e85db9ea05 --- /dev/null +++ b/packages/SystemUI/src/com/android/systemui/communal/widgets/EditWidgetsActivity.kt @@ -0,0 +1,78 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.systemui.communal.widgets + +import android.appwidget.AppWidgetProviderInfo +import android.content.Intent +import android.os.Bundle +import android.util.Log +import android.view.View +import androidx.activity.ComponentActivity +import androidx.activity.result.ActivityResultLauncher +import androidx.activity.result.contract.ActivityResultContracts.StartActivityForResult +import com.android.systemui.communal.domain.interactor.CommunalInteractor +import com.android.systemui.res.R +import javax.inject.Inject + +/** An Activity for editing the widgets that appear in hub mode. */ +class EditWidgetsActivity @Inject constructor(private val communalInteractor: CommunalInteractor) : + ComponentActivity() { + companion object { + /** + * Intent extra name for the {@link AppWidgetProviderInfo} of a widget to add to hub mode. + */ + const val ADD_WIDGET_INFO = "add_widget_info" + private const val TAG = "EditWidgetsActivity" + } + + private val addWidgetActivityLauncher: ActivityResultLauncher<Intent> = + registerForActivityResult(StartActivityForResult()) { result -> + when (result.resultCode) { + RESULT_OK -> { + result.data + ?.let { + it.getParcelableExtra( + ADD_WIDGET_INFO, + AppWidgetProviderInfo::class.java + ) + } + ?.let { communalInteractor.addWidget(it.provider, 0) } + ?: run { Log.w(TAG, "No AppWidgetProviderInfo found in result.") } + } + else -> + Log.w( + TAG, + "Failed to receive result from widget picker, code=${result.resultCode}" + ) + } + this@EditWidgetsActivity.finish() + } + + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + + setShowWhenLocked(true) + setContentView(R.layout.edit_widgets) + + val addWidgetsButton = findViewById<View>(R.id.add_widget) + addWidgetsButton?.setOnClickListener({ + addWidgetActivityLauncher.launch( + Intent(applicationContext, WidgetPickerActivity::class.java) + ) + }) + } +} diff --git a/packages/SystemUI/src/com/android/systemui/communal/widgets/EditWidgetsActivityStarter.kt b/packages/SystemUI/src/com/android/systemui/communal/widgets/EditWidgetsActivityStarter.kt new file mode 100644 index 000000000000..846e3000284f --- /dev/null +++ b/packages/SystemUI/src/com/android/systemui/communal/widgets/EditWidgetsActivityStarter.kt @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.systemui.communal.widgets + +import android.content.Context +import android.content.Intent +import com.android.systemui.dagger.qualifiers.Application + +interface EditWidgetsActivityStarter { + fun startActivity() +} + +class EditWidgetsActivityStarterImpl(@Application private val applicationContext: Context) : + EditWidgetsActivityStarter { + override fun startActivity() { + applicationContext.startActivity( + Intent(applicationContext, EditWidgetsActivity::class.java) + .addFlags(Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TASK) + ) + } +} diff --git a/packages/SystemUI/src/com/android/systemui/communal/widgets/WidgetPickerActivity.kt b/packages/SystemUI/src/com/android/systemui/communal/widgets/WidgetPickerActivity.kt new file mode 100644 index 000000000000..3e6dbd5a7115 --- /dev/null +++ b/packages/SystemUI/src/com/android/systemui/communal/widgets/WidgetPickerActivity.kt @@ -0,0 +1,87 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.systemui.communal.widgets + +import android.appwidget.AppWidgetManager +import android.appwidget.AppWidgetProviderInfo +import android.content.Intent +import android.os.Bundle +import android.util.DisplayMetrics +import android.util.Log +import android.view.ViewGroup +import android.widget.ImageView +import android.widget.LinearLayout +import androidx.activity.ComponentActivity +import com.android.systemui.res.R +import javax.inject.Inject + +/** + * An Activity responsible for displaying a list of widgets to add to the hub mode grid. This is + * essentially a placeholder until Launcher's widget picker can be used. + */ +class WidgetPickerActivity +@Inject +constructor( + private val appWidgetManager: AppWidgetManager, +) : ComponentActivity() { + + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + + setContentView(R.layout.widget_picker) + setShowWhenLocked(true) + + loadWidgets() + } + + private fun loadWidgets() { + val containerView: ViewGroup? = findViewById(R.id.widgets_container) + containerView?.apply { + try { + appWidgetManager + .getInstalledProviders(AppWidgetProviderInfo.WIDGET_CATEGORY_KEYGUARD) + ?.stream() + ?.limit(5) + ?.forEach { widgetInfo -> + val activity = this@WidgetPickerActivity + val widgetPreview = + widgetInfo.loadPreviewImage(activity, DisplayMetrics.DENSITY_HIGH) + val widgetView = ImageView(activity) + val lp = LinearLayout.LayoutParams(WIDGET_PREVIEW_SIZE, WIDGET_PREVIEW_SIZE) + widgetView.setLayoutParams(lp) + widgetView.setImageDrawable(widgetPreview) + widgetView.setOnClickListener({ + setResult( + RESULT_OK, + Intent().putExtra(EditWidgetsActivity.ADD_WIDGET_INFO, widgetInfo) + ) + finish() + }) + + addView(widgetView) + } + } catch (e: RuntimeException) { + Log.e(TAG, "Exception fetching widget providers", e) + } + } + } + + companion object { + private const val WIDGET_PREVIEW_SIZE = 400 + private const val TAG = "WidgetPickerActivity" + } +} diff --git a/packages/SystemUI/src/com/android/systemui/dagger/DefaultActivityBinder.java b/packages/SystemUI/src/com/android/systemui/dagger/DefaultActivityBinder.java index 32e40c99a981..4b27af1fc989 100644 --- a/packages/SystemUI/src/com/android/systemui/dagger/DefaultActivityBinder.java +++ b/packages/SystemUI/src/com/android/systemui/dagger/DefaultActivityBinder.java @@ -19,6 +19,8 @@ package com.android.systemui.dagger; import android.app.Activity; import com.android.systemui.ForegroundServicesDialog; +import com.android.systemui.communal.widgets.EditWidgetsActivity; +import com.android.systemui.communal.widgets.WidgetPickerActivity; import com.android.systemui.contrast.ContrastDialogActivity; import com.android.systemui.keyguard.WorkLockActivity; import com.android.systemui.people.PeopleSpaceActivity; @@ -150,7 +152,17 @@ public abstract class DefaultActivityBinder { @ClassKey(SensorUseStartedActivity.class) public abstract Activity bindSensorUseStartedActivity(SensorUseStartedActivity activity); + /** Inject into EditWidgetsActivity. */ + @Binds + @IntoMap + @ClassKey(EditWidgetsActivity.class) + public abstract Activity bindEditWidgetsActivity(EditWidgetsActivity activity); + /** Inject into WidgetPickerActivity. */ + @Binds + @IntoMap + @ClassKey(WidgetPickerActivity.class) + public abstract Activity bindWidgetPickerActivity(WidgetPickerActivity activity); /** Inject into SwitchToManagedProfileForCallActivity. */ @Binds diff --git a/packages/SystemUI/src/com/android/systemui/dagger/SystemUICoreStartableModule.kt b/packages/SystemUI/src/com/android/systemui/dagger/SystemUICoreStartableModule.kt index d8ff535ffd78..d041acb4601a 100644 --- a/packages/SystemUI/src/com/android/systemui/dagger/SystemUICoreStartableModule.kt +++ b/packages/SystemUI/src/com/android/systemui/dagger/SystemUICoreStartableModule.kt @@ -22,7 +22,7 @@ import com.android.systemui.LatencyTester import com.android.systemui.ScreenDecorations import com.android.systemui.SliceBroadcastRelayHandler import com.android.systemui.accessibility.SystemActions -import com.android.systemui.accessibility.WindowMagnification +import com.android.systemui.accessibility.Magnification import com.android.systemui.back.domain.interactor.BackActionInteractor import com.android.systemui.biometrics.AuthController import com.android.systemui.biometrics.BiometricNotificationService @@ -37,7 +37,6 @@ import com.android.systemui.keyboard.PhysicalKeyboardCoreStartable import com.android.systemui.keyguard.KeyguardViewConfigurator import com.android.systemui.keyguard.KeyguardViewMediator import com.android.systemui.keyguard.data.quickaffordance.MuteQuickAffordanceCoreStartable -import com.android.systemui.keyguard.ui.binder.AlternateBouncerBinder import com.android.systemui.keyguard.ui.binder.KeyguardDismissActionBinder import com.android.systemui.keyguard.ui.binder.KeyguardDismissBinder import com.android.systemui.log.SessionTracker @@ -92,11 +91,6 @@ abstract class SystemUICoreStartableModule { @ClassKey(AuthController::class) abstract fun bindAuthController(service: AuthController): CoreStartable - @Binds - @IntoMap - @ClassKey(AlternateBouncerBinder::class) - abstract fun bindAlternateBouncerBinder(impl: AlternateBouncerBinder): CoreStartable - /** Inject into BiometricNotificationService */ @Binds @IntoMap @@ -254,11 +248,11 @@ abstract class SystemUICoreStartableModule { @ClassKey(VolumeUI::class) abstract fun bindVolumeUI(sysui: VolumeUI): CoreStartable - /** Inject into WindowMagnification. */ + /** Inject into Magnification. */ @Binds @IntoMap - @ClassKey(WindowMagnification::class) - abstract fun bindWindowMagnification(sysui: WindowMagnification): CoreStartable + @ClassKey(Magnification::class) + abstract fun bindMagnification(sysui: Magnification): CoreStartable /** Inject into WMShell. */ @Binds diff --git a/packages/SystemUI/src/com/android/systemui/dagger/SystemUIModule.java b/packages/SystemUI/src/com/android/systemui/dagger/SystemUIModule.java index f93efa1debb3..5f54a98fe05d 100644 --- a/packages/SystemUI/src/com/android/systemui/dagger/SystemUIModule.java +++ b/packages/SystemUI/src/com/android/systemui/dagger/SystemUIModule.java @@ -130,6 +130,7 @@ import com.android.systemui.tuner.dagger.TunerModule; import com.android.systemui.unfold.SysUIUnfoldModule; import com.android.systemui.user.UserModule; import com.android.systemui.user.domain.UserDomainLayerModule; +import com.android.systemui.util.EventLogModule; import com.android.systemui.util.concurrency.SysUIConcurrencyModule; import com.android.systemui.util.dagger.UtilModule; import com.android.systemui.util.kotlin.CoroutinesModule; @@ -186,6 +187,7 @@ import javax.inject.Named; DisableFlagsModule.class, DisplayModule.class, DreamModule.class, + EventLogModule.class, FalsingModule.class, FlagsModule.class, FlagDependenciesModule.class, diff --git a/packages/SystemUI/src/com/android/systemui/deviceentry/shared/DeviceEntryUdfpsRefactor.kt b/packages/SystemUI/src/com/android/systemui/deviceentry/shared/DeviceEntryUdfpsRefactor.kt new file mode 100644 index 000000000000..b5d5803ca6fb --- /dev/null +++ b/packages/SystemUI/src/com/android/systemui/deviceentry/shared/DeviceEntryUdfpsRefactor.kt @@ -0,0 +1,53 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.systemui.deviceentry.shared + +import com.android.systemui.Flags +import com.android.systemui.flags.FlagToken +import com.android.systemui.flags.RefactorFlagUtils + +/** Helper for reading or using the device entry udfps refactor flag state. */ +@Suppress("NOTHING_TO_INLINE") +object DeviceEntryUdfpsRefactor { + /** The aconfig flag name */ + const val FLAG_NAME = Flags.FLAG_DEVICE_ENTRY_UDFPS_REFACTOR + + /** A token used for dependency declaration */ + val token: FlagToken + get() = FlagToken(FLAG_NAME, isEnabled) + + /** Is the refactor enabled */ + @JvmStatic + inline val isEnabled + get() = Flags.deviceEntryUdfpsRefactor() + + /** + * Called to ensure code is only run when the flag is enabled. This protects users from the + * unintended behaviors caused by accidentally running new logic, while also crashing on an eng + * build to ensure that the refactor author catches issues in testing. + */ + @JvmStatic + inline fun isUnexpectedlyInLegacyMode() = + RefactorFlagUtils.isUnexpectedlyInLegacyMode(isEnabled, FLAG_NAME) + + /** + * Called to ensure code is only run when the flag is disabled. This will throw an exception if + * the flag is enabled to ensure that the refactor author catches issues in testing. + */ + @JvmStatic + inline fun assertInLegacyMode() = RefactorFlagUtils.assertInLegacyMode(isEnabled, FLAG_NAME) +} diff --git a/packages/SystemUI/src/com/android/systemui/dreams/complication/HideComplicationTouchHandler.java b/packages/SystemUI/src/com/android/systemui/dreams/complication/HideComplicationTouchHandler.java index 410a0c53a492..ee48ee5f50fd 100644 --- a/packages/SystemUI/src/com/android/systemui/dreams/complication/HideComplicationTouchHandler.java +++ b/packages/SystemUI/src/com/android/systemui/dreams/complication/HideComplicationTouchHandler.java @@ -71,6 +71,7 @@ public class HideComplicationTouchHandler implements DreamTouchHandler { private final Runnable mRestoreComplications = new Runnable() { @Override public void run() { + Log.d(TAG, "Restoring complications..."); mVisibilityController.setVisibility(View.VISIBLE); mHidden = false; } @@ -83,6 +84,7 @@ public class HideComplicationTouchHandler implements DreamTouchHandler { // Avoid interfering with the exit animations. return; } + Log.d(TAG, "Hiding complications..."); mVisibilityController.setVisibility(View.INVISIBLE); mHidden = true; if (mHiddenCallback != null) { @@ -136,9 +138,7 @@ public class HideComplicationTouchHandler implements DreamTouchHandler { final MotionEvent motionEvent = (MotionEvent) ev; if (motionEvent.getAction() == MotionEvent.ACTION_DOWN) { - if (DEBUG) { - Log.d(TAG, "ACTION_DOWN received"); - } + Log.i(TAG, "ACTION_DOWN received"); final ListenableFuture<Boolean> touchCheck = mTouchInsetManager .checkWithinTouchRegion(Math.round(motionEvent.getX()), @@ -163,6 +163,8 @@ public class HideComplicationTouchHandler implements DreamTouchHandler { }, mExecutor); } else if (motionEvent.getAction() == MotionEvent.ACTION_CANCEL || motionEvent.getAction() == MotionEvent.ACTION_UP) { + Log.i(TAG, "ACTION_CANCEL|ACTION_UP received"); + // End session and initiate delayed reappearance of the complications. session.pop(); runAfterHidden(() -> mCancelCallbacks.add( @@ -179,8 +181,10 @@ public class HideComplicationTouchHandler implements DreamTouchHandler { private void runAfterHidden(Runnable runnable) { mExecutor.execute(() -> { if (mHidden) { + Log.i(TAG, "Executing after hidden runnable immediately..."); runnable.run(); } else { + Log.i(TAG, "Queuing after hidden runnable..."); mHiddenCallback = runnable; } }); diff --git a/packages/SystemUI/src/com/android/systemui/flags/ConditionalRestarter.kt b/packages/SystemUI/src/com/android/systemui/flags/ConditionalRestarter.kt index dd5860484a55..906896fb920e 100644 --- a/packages/SystemUI/src/com/android/systemui/flags/ConditionalRestarter.kt +++ b/packages/SystemUI/src/com/android/systemui/flags/ConditionalRestarter.kt @@ -17,9 +17,9 @@ package com.android.systemui.flags import android.util.Log +import com.android.systemui.dagger.qualifiers.Application +import com.android.systemui.dagger.qualifiers.Background import com.android.systemui.flags.ConditionalRestarter.Condition -import com.android.systemui.util.kotlin.UnflaggedApplication -import com.android.systemui.util.kotlin.UnflaggedBackground import java.util.concurrent.TimeUnit import javax.inject.Inject import javax.inject.Named @@ -39,8 +39,8 @@ constructor( private val systemExitRestarter: SystemExitRestarter, private val conditions: Set<@JvmSuppressWildcards Condition>, @Named(RESTART_DELAY) private val restartDelaySec: Long, - @UnflaggedApplication private val applicationScope: CoroutineScope, - @UnflaggedBackground private val backgroundDispatcher: CoroutineContext, + @Application private val applicationScope: CoroutineScope, + @Background private val backgroundDispatcher: CoroutineContext, ) : Restarter { private var pendingReason = "" diff --git a/packages/SystemUI/src/com/android/systemui/flags/Flags.kt b/packages/SystemUI/src/com/android/systemui/flags/Flags.kt index ad3d6d646f46..7d541070f146 100644 --- a/packages/SystemUI/src/com/android/systemui/flags/Flags.kt +++ b/packages/SystemUI/src/com/android/systemui/flags/Flags.kt @@ -135,14 +135,6 @@ object Flags { "lockscreen_custom_clocks" ) - // TODO(b/286092087): Tracking Bug - @JvmField - val ENABLE_SYSTEM_UI_DREAM_CONTROLLER = unreleasedFlag("enable_system_ui_dream_controller") - - // TODO(b/288287730): Tracking Bug - @JvmField - val ENABLE_SYSTEM_UI_DREAM_HOSTING = unreleasedFlag("enable_system_ui_dream_hosting") - /** * Whether the clock on a wide lock screen should use the new "stepping" animation for moving * the digits when the clock moves. @@ -156,18 +148,6 @@ object Flags { // TODO(b/255607168): Tracking Bug @JvmField val DOZING_MIGRATION_1 = unreleasedFlag("dozing_migration_1") - /** - * Migrates control of the LightRevealScrim's reveal effect and amount from legacy code to the - * new KeyguardTransitionRepository. - */ - // TODO(b/281655028): Tracking bug - @JvmField - val LIGHT_REVEAL_MIGRATION = unreleasedFlag("light_reveal_migration", teamfood = true) - - // TODO(b/301915812): Tracking Bug - @JvmField - val NEW_AOD_TRANSITION = unreleasedFlag("new_aod_transition", teamfood = true) - // TODO(b/305984787): @JvmField val REFACTOR_GETCURRENTUSER = unreleasedFlag("refactor_getcurrentuser", teamfood = true) @@ -232,11 +212,6 @@ object Flags { val WALLPAPER_PICKER_GRID_APPLY_BUTTON = unreleasedFlag("wallpaper_picker_grid_apply_button") - /** Whether to run the new udfps keyguard refactor code. */ - // TODO(b/279440316): Tracking bug. - @JvmField - val REFACTOR_UDFPS_KEYGUARD_VIEWS = unreleasedFlag("refactor_udfps_keyguard_views") - /** Provide new auth messages on the bouncer. */ // TODO(b/277961132): Tracking bug. @JvmField val REVAMPED_BOUNCER_MESSAGES = unreleasedFlag("revamped_bouncer_messages") @@ -293,11 +268,6 @@ object Flags { R.bool.flag_stop_pulsing_face_scanning_animation, "stop_pulsing_face_scanning_animation") - /** Flag to use a separate view for the alternate bouncer. */ - // TODO(b/300440924): Tracking bug - @JvmField - val ALTERNATE_BOUNCER_VIEW: UnreleasedFlag = unreleasedFlag("alternate_bouncer_view") - // 300 - power menu // TODO(b/254512600): Tracking Bug @JvmField val POWER_MENU_LITE = releasedFlag("power_menu_lite") @@ -356,6 +326,10 @@ object Flags { // TODO(b/301610137): Tracking bug @JvmField val NEW_NETWORK_SLICE_UI = releasedFlag("new_network_slice_ui") + // TODO(b/311222557): Tracking bug + val ROAMING_INDICATOR_VIA_DISPLAY_INFO = + releasedFlag("roaming_indicator_via_display_info") + // TODO(b/308138154): Tracking bug val FILTER_PROVISIONING_NETWORK_SUBSCRIPTIONS = releasedFlag("filter_provisioning_network_subscriptions") @@ -622,10 +596,6 @@ object Flags { val WARN_ON_BLOCKING_BINDER_TRANSACTIONS = unreleasedFlag("warn_on_blocking_binder_transactions") - @JvmField - val COROUTINE_TRACING = - unreleasedFlag("coroutine_tracing") - // TODO(b/283071711): Tracking bug @JvmField val TRIM_RESOURCES_WITH_BACKGROUND_TRIM_AT_LOCK = @@ -721,12 +691,6 @@ object Flags { @JvmField val USE_REPOS_FOR_BOUNCER_SHOWING = releasedFlag("use_repos_for_bouncer_showing") - // 3100 - Haptic interactions - - // TODO(b/290213663): Tracking Bug - @JvmField - val ONE_WAY_HAPTICS_API_MIGRATION = releasedFlag("oneway_haptics_api_migration") - /** TODO(b/296223317): Enables the new keyguard presentation containing a clock. */ @JvmField val ENABLE_CLOCK_KEYGUARD_PRESENTATION = releasedFlag("enable_clock_keyguard_presentation") diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewConfigurator.kt b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewConfigurator.kt index 1037b0eb4dfc..017dac200431 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewConfigurator.kt +++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewConfigurator.kt @@ -31,8 +31,8 @@ import com.android.systemui.Flags.keyguardBottomAreaRefactor import com.android.systemui.common.ui.ConfigurationState import com.android.systemui.dagger.SysUISingleton import com.android.systemui.deviceentry.domain.interactor.DeviceEntryHapticsInteractor +import com.android.systemui.deviceentry.shared.DeviceEntryUdfpsRefactor import com.android.systemui.flags.FeatureFlagsClassic -import com.android.systemui.flags.Flags import com.android.systemui.keyguard.ui.binder.KeyguardBlueprintViewBinder import com.android.systemui.keyguard.ui.binder.KeyguardIndicationAreaBinder import com.android.systemui.keyguard.ui.binder.KeyguardRootViewBinder @@ -134,7 +134,7 @@ constructor( val indicationArea = KeyguardIndicationArea(context, null) keyguardIndicationController.setIndicationArea(indicationArea) - if (!featureFlags.isEnabled(Flags.REFACTOR_UDFPS_KEYGUARD_VIEWS)) { + if (!DeviceEntryUdfpsRefactor.isEnabled) { lockIconViewController.get().setLockIconView(LockIconView(context, null)) } } diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/data/repository/LightRevealScrimRepository.kt b/packages/SystemUI/src/com/android/systemui/keyguard/data/repository/LightRevealScrimRepository.kt index 54031dcc9525..cb0f18630324 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/data/repository/LightRevealScrimRepository.kt +++ b/packages/SystemUI/src/com/android/systemui/keyguard/data/repository/LightRevealScrimRepository.kt @@ -22,6 +22,7 @@ import android.content.Context import android.graphics.Point import androidx.core.animation.Animator import androidx.core.animation.ValueAnimator +import com.android.keyguard.logging.ScrimLogger import com.android.systemui.dagger.SysUISingleton import com.android.systemui.keyguard.shared.model.BiometricUnlockModel import com.android.systemui.keyguard.shared.model.BiometricUnlockSource @@ -33,6 +34,8 @@ import com.android.systemui.statusbar.CircleReveal import com.android.systemui.statusbar.LiftReveal import com.android.systemui.statusbar.LightRevealEffect import com.android.systemui.statusbar.PowerButtonReveal +import javax.inject.Inject +import kotlin.math.max import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.channels.awaitClose import kotlinx.coroutines.flow.Flow @@ -42,8 +45,6 @@ import kotlinx.coroutines.flow.distinctUntilChanged import kotlinx.coroutines.flow.flatMapLatest import kotlinx.coroutines.flow.flowOf import kotlinx.coroutines.flow.map -import javax.inject.Inject -import kotlin.math.max val DEFAULT_REVEAL_EFFECT = LiftReveal @@ -72,8 +73,13 @@ constructor( keyguardRepository: KeyguardRepository, val context: Context, powerInteractor: PowerInteractor, + private val scrimLogger: ScrimLogger, ) : LightRevealScrimRepository { + companion object { + val TAG = LightRevealScrimRepository::class.simpleName!! + } + /** The reveal effect used if the device was locked/unlocked via the power button. */ private val powerButtonRevealEffect: Flow<LightRevealEffect?> = flowOf( @@ -120,25 +126,25 @@ constructor( /** The reveal effect we'll use for the next non-biometric unlock (tap, power button, etc). */ private val nonBiometricRevealEffect: Flow<LightRevealEffect?> = - powerInteractor - .detailedWakefulness - .flatMapLatest { wakefulnessModel -> - when { - wakefulnessModel.isAwakeOrAsleepFrom(WakeSleepReason.POWER_BUTTON) -> - powerButtonRevealEffect - wakefulnessModel.isAwakeFrom(TAP) -> - tapRevealEffect - else -> - flowOf(LiftReveal) - } - } + powerInteractor.detailedWakefulness.flatMapLatest { wakefulnessModel -> + when { + wakefulnessModel.isAwakeOrAsleepFrom(WakeSleepReason.POWER_BUTTON) -> + powerButtonRevealEffect + wakefulnessModel.isAwakeFrom(TAP) -> tapRevealEffect + else -> flowOf(LiftReveal) + } + } private val revealAmountAnimator = ValueAnimator.ofFloat(0f, 1f).apply { duration = 500 } override val revealAmount: Flow<Float> = callbackFlow { val updateListener = Animator.AnimatorUpdateListener { - trySend((it as ValueAnimator).animatedValue as Float) + val value = (it as ValueAnimator).animatedValue + trySend(value as Float) + if (value <= 0.0f || value >= 1.0f) { + scrimLogger.d(TAG, "revealAmount", value) + } } revealAmountAnimator.addUpdateListener(updateListener) awaitClose { revealAmountAnimator.removeUpdateListener(updateListener) } @@ -146,6 +152,7 @@ constructor( override fun startRevealAmountAnimator(reveal: Boolean) { if (reveal) revealAmountAnimator.start() else revealAmountAnimator.reverse() + scrimLogger.d(TAG, "startRevealAmountAnimator, reveal", reveal) } override val revealEffect = @@ -156,13 +163,21 @@ constructor( ) { biometricUnlockState, biometricReveal, nonBiometricReveal -> // Use the biometric reveal for any flavor of wake and unlocking. - when (biometricUnlockState) { - BiometricUnlockModel.WAKE_AND_UNLOCK, - BiometricUnlockModel.WAKE_AND_UNLOCK_PULSING, - BiometricUnlockModel.WAKE_AND_UNLOCK_FROM_DREAM -> biometricReveal - else -> nonBiometricReveal - } - ?: DEFAULT_REVEAL_EFFECT + val revealEffect = + when (biometricUnlockState) { + BiometricUnlockModel.WAKE_AND_UNLOCK, + BiometricUnlockModel.WAKE_AND_UNLOCK_PULSING, + BiometricUnlockModel.WAKE_AND_UNLOCK_FROM_DREAM -> biometricReveal + else -> nonBiometricReveal + } + ?: DEFAULT_REVEAL_EFFECT + + scrimLogger.d( + TAG, + "revealEffect", + "$revealEffect, biometricUnlockState: ${biometricUnlockState.name}" + ) + return@combine revealEffect } .distinctUntilChanged() @@ -173,8 +188,7 @@ constructor( x, y, startRadius = 0, - endRadius = - max(max(x, display.width - x), max(y, display.height - y)), + endRadius = max(max(x, display.width - x), max(y, display.height - y)), ) } } diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/FromDreamingTransitionInteractor.kt b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/FromDreamingTransitionInteractor.kt index ca882e539a1a..0b6b971f2314 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/FromDreamingTransitionInteractor.kt +++ b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/FromDreamingTransitionInteractor.kt @@ -54,7 +54,10 @@ constructor( fun startToLockscreenTransition() { scope.launch { - if (transitionInteractor.startedKeyguardState.value == KeyguardState.DREAMING) { + if ( + transitionInteractor.startedKeyguardState.replayCache.last() == + KeyguardState.DREAMING + ) { startTransitionTo(KeyguardState.LOCKSCREEN) } } diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardSurfaceBehindInteractor.kt b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardSurfaceBehindInteractor.kt index efbe2611e960..922baa3611cc 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardSurfaceBehindInteractor.kt +++ b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardSurfaceBehindInteractor.kt @@ -24,6 +24,7 @@ import javax.inject.Inject import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.combine +import kotlinx.coroutines.flow.distinctUntilChanged import kotlinx.coroutines.flow.flatMapLatest import kotlinx.coroutines.flow.flowOf import kotlinx.coroutines.flow.map @@ -40,18 +41,20 @@ constructor( @OptIn(ExperimentalCoroutinesApi::class) val viewParams: Flow<KeyguardSurfaceBehindModel> = - transitionInteractor.isInTransitionToAnyState.flatMapLatest { isInTransition -> - if (!isInTransition) { - defaultParams - } else { - combine( - transitionSpecificViewParams, - defaultParams, - ) { transitionParams, defaultParams -> - transitionParams ?: defaultParams + transitionInteractor.isInTransitionToAnyState + .flatMapLatest { isInTransition -> + if (!isInTransition) { + defaultParams + } else { + combine( + transitionSpecificViewParams, + defaultParams, + ) { transitionParams, defaultParams -> + transitionParams ?: defaultParams + } } } - } + .distinctUntilChanged() val isAnimatingSurface = repository.isAnimatingSurface diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardTransitionInteractor.kt b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardTransitionInteractor.kt index b0b857729c77..4da48f697b0f 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardTransitionInteractor.kt +++ b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardTransitionInteractor.kt @@ -37,14 +37,14 @@ import com.android.systemui.keyguard.shared.model.TransitionStep import javax.inject.Inject import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.flow.Flow +import kotlinx.coroutines.flow.SharedFlow import kotlinx.coroutines.flow.SharingStarted -import kotlinx.coroutines.flow.StateFlow import kotlinx.coroutines.flow.combine import kotlinx.coroutines.flow.distinctUntilChanged import kotlinx.coroutines.flow.filter import kotlinx.coroutines.flow.map import kotlinx.coroutines.flow.merge -import kotlinx.coroutines.flow.stateIn +import kotlinx.coroutines.flow.shareIn /** Encapsulates business-logic related to the keyguard transitions. */ @SysUISingleton @@ -171,16 +171,16 @@ constructor( repository.transitions.filter { step -> step.transitionState == TransitionState.FINISHED } /** The destination state of the last started transition. */ - val startedKeyguardState: StateFlow<KeyguardState> = + val startedKeyguardState: SharedFlow<KeyguardState> = startedKeyguardTransitionStep .map { step -> step.to } - .stateIn(scope, SharingStarted.Eagerly, OFF) + .shareIn(scope, SharingStarted.Eagerly, replay = 1) /** The last completed [KeyguardState] transition */ - val finishedKeyguardState: StateFlow<KeyguardState> = + val finishedKeyguardState: SharedFlow<KeyguardState> = finishedKeyguardTransitionStep .map { step -> step.to } - .stateIn(scope, SharingStarted.Eagerly, LOCKSCREEN) + .shareIn(scope, SharingStarted.Eagerly, replay = 1) /** * Whether we're currently in a transition to a new [KeyguardState] and haven't yet completed @@ -227,14 +227,13 @@ constructor( * state. */ fun startDismissKeyguardTransition() { - when (startedKeyguardState.value) { + when (val startedState = startedKeyguardState.replayCache.last()) { LOCKSCREEN -> fromLockscreenTransitionInteractor.get().dismissKeyguard() PRIMARY_BOUNCER -> fromPrimaryBouncerTransitionInteractor.get().dismissPrimaryBouncer() else -> Log.e( "KeyguardTransitionInteractor", - "We don't know how to dismiss keyguard from state " + - "${startedKeyguardState.value}" + "We don't know how to dismiss keyguard from state $startedState." ) } } diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/LightRevealScrimInteractor.kt b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/LightRevealScrimInteractor.kt index 6115d90430b3..2d43897c2565 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/LightRevealScrimInteractor.kt +++ b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/LightRevealScrimInteractor.kt @@ -16,6 +16,7 @@ package com.android.systemui.keyguard.domain.interactor +import com.android.keyguard.logging.ScrimLogger import com.android.systemui.dagger.SysUISingleton import com.android.systemui.dagger.qualifiers.Application import com.android.systemui.keyguard.data.repository.LightRevealScrimRepository @@ -37,6 +38,7 @@ constructor( private val transitionInteractor: KeyguardTransitionInteractor, private val lightRevealScrimRepository: LightRevealScrimRepository, @Application private val scope: CoroutineScope, + private val scrimLogger: ScrimLogger, ) { init { @@ -46,6 +48,7 @@ constructor( private fun listenForStartedKeyguardTransitionStep() { scope.launch { transitionInteractor.startedKeyguardTransitionStep.collect { + scrimLogger.d(TAG, "listenForStartedKeyguardTransitionStep", it) if (willTransitionChangeEndState(it)) { lightRevealScrimRepository.startRevealAmountAnimator( willBeRevealedInState(it.to) @@ -100,5 +103,7 @@ constructor( KeyguardState.OCCLUDED -> true } } + + val TAG = LightRevealScrimInteractor::class.simpleName!! } } diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/NaturalScrollingSettingObserver.kt b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/NaturalScrollingSettingObserver.kt new file mode 100644 index 000000000000..508fb597ef65 --- /dev/null +++ b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/NaturalScrollingSettingObserver.kt @@ -0,0 +1,67 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.systemui.keyguard.domain.interactor + +import android.content.Context +import android.database.ContentObserver +import android.os.Handler +import android.os.UserHandle +import android.provider.Settings +import android.provider.Settings.SettingNotFoundException +import com.android.systemui.dagger.SysUISingleton +import com.android.systemui.dagger.qualifiers.Main +import javax.inject.Inject + +@SysUISingleton +class NaturalScrollingSettingObserver +@Inject +constructor( + @Main private val handler: Handler, + private val context: Context, +) { + var isNaturalScrollingEnabled = true + get() { + if (!isInitialized) { + isInitialized = true + update() + } + return field + } + + private var isInitialized = false + + private val contentObserver = object : ContentObserver(handler) { + override fun onChange(selfChange: Boolean) { + update() + } + } + + init { + context.contentResolver.registerContentObserver( + Settings.System.getUriFor(Settings.System.TOUCHPAD_NATURAL_SCROLLING), false, + contentObserver) + } + + private fun update() { + isNaturalScrollingEnabled = try { + Settings.System.getIntForUser(context.contentResolver, + Settings.System.TOUCHPAD_NATURAL_SCROLLING, UserHandle.USER_CURRENT) == 1 + } catch (e: SettingNotFoundException) { + true + } + } +} diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/TransitionInteractor.kt b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/TransitionInteractor.kt index 76018080848f..d5ac2838a2f1 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/TransitionInteractor.kt +++ b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/TransitionInteractor.kt @@ -53,16 +53,16 @@ sealed class TransitionInteractor( modeOnCanceled: TransitionModeOnCanceled = TransitionModeOnCanceled.LAST_VALUE ): UUID? { if ( - fromState != transitionInteractor.startedKeyguardState.value && - fromState != transitionInteractor.finishedKeyguardState.value + fromState != transitionInteractor.startedKeyguardState.replayCache.last() && + fromState != transitionInteractor.finishedKeyguardState.replayCache.last() ) { Log.e( name, "startTransition: We were asked to transition from " + "$fromState to $toState, however we last finished a transition to " + - "${transitionInteractor.finishedKeyguardState.value}, " + + "${transitionInteractor.finishedKeyguardState.replayCache.last()}, " + "and last started a transition to " + - "${transitionInteractor.startedKeyguardState.value}. " + + "${transitionInteractor.startedKeyguardState.replayCache.last()}. " + "Ignoring startTransition, but this should never happen." ) return null diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/AlternateBouncerViewBinder.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/AlternateBouncerViewBinder.kt index 41af9e810fbf..a6383eb5f785 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/AlternateBouncerViewBinder.kt +++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/AlternateBouncerViewBinder.kt @@ -20,46 +20,15 @@ import android.view.View import android.view.ViewGroup import androidx.lifecycle.Lifecycle import androidx.lifecycle.repeatOnLifecycle -import com.android.systemui.CoreStartable -import com.android.systemui.dagger.SysUISingleton -import com.android.systemui.dagger.qualifiers.Application -import com.android.systemui.flags.FeatureFlagsClassic -import com.android.systemui.flags.Flags +import com.android.systemui.deviceentry.shared.DeviceEntryUdfpsRefactor import com.android.systemui.keyguard.ui.viewmodel.AlternateBouncerViewModel import com.android.systemui.lifecycle.repeatWhenAttached import com.android.systemui.res.R import com.android.systemui.scrim.ScrimView -import com.android.systemui.shade.NotificationShadeWindowView import com.android.systemui.statusbar.NotificationShadeWindowController import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.launch -import javax.inject.Inject - -@ExperimentalCoroutinesApi -@SysUISingleton -class AlternateBouncerBinder -@Inject -constructor( - private val notificationShadeWindowView: NotificationShadeWindowView, - private val featureFlags: FeatureFlagsClassic, - private val alternateBouncerViewModel: AlternateBouncerViewModel, - @Application private val scope: CoroutineScope, - private val notificationShadeWindowController: NotificationShadeWindowController, -) : CoreStartable { - override fun start() { - if (!featureFlags.isEnabled(Flags.ALTERNATE_BOUNCER_VIEW)) { - return - } - - AlternateBouncerViewBinder.bind( - notificationShadeWindowView.requireViewById(R.id.alternate_bouncer), - alternateBouncerViewModel, - scope, - notificationShadeWindowController, - ) - } -} /** * Binds the alternate bouncer view to its view-model. @@ -79,6 +48,7 @@ object AlternateBouncerViewBinder { scope: CoroutineScope, notificationShadeWindowController: NotificationShadeWindowController, ) { + DeviceEntryUdfpsRefactor.isUnexpectedlyInLegacyMode() scope.launch { // forcePluginOpen is necessary to show over occluded apps. // This cannot be tied to the view's lifecycle because setting this allows the view diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/DeviceEntryIconViewBinder.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/DeviceEntryIconViewBinder.kt index a8b28bcfbbc0..4b4a19ecd770 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/DeviceEntryIconViewBinder.kt +++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/DeviceEntryIconViewBinder.kt @@ -23,6 +23,7 @@ import android.view.View import androidx.lifecycle.Lifecycle import androidx.lifecycle.repeatOnLifecycle import com.android.systemui.common.ui.view.LongPressHandlingView +import com.android.systemui.deviceentry.shared.DeviceEntryUdfpsRefactor import com.android.systemui.keyguard.ui.view.DeviceEntryIconView import com.android.systemui.keyguard.ui.viewmodel.DeviceEntryBackgroundViewModel import com.android.systemui.keyguard.ui.viewmodel.DeviceEntryForegroundViewModel @@ -51,6 +52,7 @@ object DeviceEntryIconViewBinder { bgViewModel: DeviceEntryBackgroundViewModel, falsingManager: FalsingManager, ) { + DeviceEntryUdfpsRefactor.isUnexpectedlyInLegacyMode() val longPressHandlingView = view.longPressHandlingView val fgIconView = view.iconView val bgView = view.bgView diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardRootViewBinder.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardRootViewBinder.kt index 4de9fc343af1..114fd94ebeb2 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardRootViewBinder.kt +++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardRootViewBinder.kt @@ -34,13 +34,13 @@ import com.android.internal.jank.InteractionJankMonitor import com.android.internal.jank.InteractionJankMonitor.CUJ_SCREEN_OFF_SHOW_AOD import com.android.keyguard.KeyguardClockSwitch.MISSING_CLOCK_ID import com.android.systemui.Flags.keyguardBottomAreaRefactor +import com.android.systemui.Flags.newAodTransition import com.android.systemui.common.shared.model.Icon import com.android.systemui.common.shared.model.Text import com.android.systemui.common.shared.model.TintedIcon import com.android.systemui.common.ui.ConfigurationState import com.android.systemui.deviceentry.domain.interactor.DeviceEntryHapticsInteractor import com.android.systemui.flags.FeatureFlagsClassic -import com.android.systemui.flags.Flags import com.android.systemui.keyguard.shared.KeyguardShadeMigrationNssl import com.android.systemui.keyguard.shared.model.TransitionState import com.android.systemui.keyguard.ui.viewmodel.KeyguardRootViewModel @@ -384,7 +384,7 @@ object KeyguardRootViewBinder { } visibility = if (isVisible.value) View.VISIBLE else View.INVISIBLE } - featureFlags.isEnabled(Flags.NEW_AOD_TRANSITION) -> { + newAodTransition() -> { animateInIconTranslation(statusViewMigrated) if (isVisible.value) { CrossFadeHelper.fadeIn(this, animatorListener) diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/blueprints/DefaultKeyguardBlueprint.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/blueprints/DefaultKeyguardBlueprint.kt index 0cf891c3f665..27b38c71d2e7 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/blueprints/DefaultKeyguardBlueprint.kt +++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/blueprints/DefaultKeyguardBlueprint.kt @@ -33,7 +33,6 @@ import com.android.systemui.keyguard.ui.view.layout.sections.DefaultStatusBarSec import com.android.systemui.keyguard.ui.view.layout.sections.DefaultStatusViewSection import com.android.systemui.keyguard.ui.view.layout.sections.KeyguardSectionsModule.Companion.KEYGUARD_AMBIENT_INDICATION_AREA_SECTION import com.android.systemui.keyguard.ui.view.layout.sections.SmartspaceSection -import com.android.systemui.keyguard.ui.view.layout.sections.SplitShadeGuidelines import java.util.Optional import javax.inject.Inject import javax.inject.Named @@ -62,14 +61,13 @@ constructor( aodBurnInSection: AodBurnInSection, communalTutorialIndicatorSection: CommunalTutorialIndicatorSection, clockSection: ClockSection, - smartspaceSection: SmartspaceSection + smartspaceSection: SmartspaceSection, ) : KeyguardBlueprint { override val id: String = DEFAULT override val sections = listOfNotNull( defaultIndicationAreaSection, - defaultDeviceEntryIconSection, defaultShortcutsSection, defaultAmbientIndicationAreaSection.getOrNull(), defaultSettingsPopupMenuSection, @@ -80,7 +78,8 @@ constructor( aodBurnInSection, communalTutorialIndicatorSection, clockSection, - smartspaceSection + smartspaceSection, + defaultDeviceEntryIconSection, // Add LAST: Intentionally has z-order above other views. ) companion object { diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/blueprints/ShortcutsBesideUdfpsKeyguardBlueprint.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/blueprints/ShortcutsBesideUdfpsKeyguardBlueprint.kt index 14e8f892e101..190ad44845d0 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/blueprints/ShortcutsBesideUdfpsKeyguardBlueprint.kt +++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/blueprints/ShortcutsBesideUdfpsKeyguardBlueprint.kt @@ -59,7 +59,6 @@ constructor( override val sections = listOfNotNull( defaultIndicationAreaSection, - defaultDeviceEntryIconSection, defaultAmbientIndicationAreaSection.getOrNull(), defaultSettingsPopupMenuSection, alignShortcutsToUdfpsSection, @@ -69,6 +68,7 @@ constructor( splitShadeGuidelines, aodNotificationIconsSection, aodBurnInSection, + defaultDeviceEntryIconSection, // Add LAST: Intentionally has z-order above other views. ) companion object { diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/blueprints/SplitShadeKeyguardBlueprint.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/blueprints/SplitShadeKeyguardBlueprint.kt index 0d397bff72ce..acbcf273214b 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/blueprints/SplitShadeKeyguardBlueprint.kt +++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/blueprints/SplitShadeKeyguardBlueprint.kt @@ -65,7 +65,6 @@ constructor( override val sections = listOfNotNull( defaultIndicationAreaSection, - defaultDeviceEntryIconSection, defaultShortcutsSection, defaultAmbientIndicationAreaSection.getOrNull(), defaultSettingsPopupMenuSection, @@ -76,6 +75,7 @@ constructor( aodNotificationIconsSection, aodBurnInSection, communalTutorialIndicatorSection, + defaultDeviceEntryIconSection, // Add LAST: Intentionally has z-order above other views. ) companion object { diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/AlignShortcutsToUdfpsSection.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/AlignShortcutsToUdfpsSection.kt index b7a165c212fd..55df46679f6d 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/AlignShortcutsToUdfpsSection.kt +++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/AlignShortcutsToUdfpsSection.kt @@ -26,14 +26,13 @@ import androidx.constraintlayout.widget.ConstraintSet.PARENT_ID import androidx.constraintlayout.widget.ConstraintSet.RIGHT import androidx.constraintlayout.widget.ConstraintSet.TOP import com.android.systemui.Flags.keyguardBottomAreaRefactor -import com.android.systemui.res.R import com.android.systemui.dagger.qualifiers.Main -import com.android.systemui.flags.FeatureFlagsClassic -import com.android.systemui.flags.Flags +import com.android.systemui.deviceentry.shared.DeviceEntryUdfpsRefactor import com.android.systemui.keyguard.ui.binder.KeyguardQuickAffordanceViewBinder import com.android.systemui.keyguard.ui.viewmodel.KeyguardQuickAffordancesCombinedViewModel import com.android.systemui.keyguard.ui.viewmodel.KeyguardRootViewModel import com.android.systemui.plugins.FalsingManager +import com.android.systemui.res.R import com.android.systemui.statusbar.KeyguardIndicationController import com.android.systemui.statusbar.VibratorHelper import javax.inject.Inject @@ -48,7 +47,6 @@ constructor( private val falsingManager: FalsingManager, private val indicationController: KeyguardIndicationController, private val vibratorHelper: VibratorHelper, - private val featureFlags: FeatureFlagsClassic, ) : BaseShortcutSection() { override fun addViews(constraintLayout: ConstraintLayout) { if (keyguardBottomAreaRefactor()) { @@ -86,11 +84,12 @@ constructor( val width = resources.getDimensionPixelSize(R.dimen.keyguard_affordance_fixed_width) val height = resources.getDimensionPixelSize(R.dimen.keyguard_affordance_fixed_height) - val lockIconViewId = if (featureFlags.isEnabled(Flags.REFACTOR_UDFPS_KEYGUARD_VIEWS)) { - R.id.device_entry_icon_view - } else { - R.id.lock_icon_view - } + val lockIconViewId = + if (DeviceEntryUdfpsRefactor.isEnabled) { + R.id.device_entry_icon_view + } else { + R.id.lock_icon_view + } constraintSet.apply { constrainWidth(R.id.start_button, width) diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/DefaultDeviceEntryIconSection.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/DefaultDeviceEntryIconSection.kt index 13ea8ff8e388..fac84981577f 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/DefaultDeviceEntryIconSection.kt +++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/DefaultDeviceEntryIconSection.kt @@ -23,6 +23,7 @@ import android.graphics.Rect import android.util.DisplayMetrics import android.view.View import android.view.WindowManager +import android.widget.FrameLayout import androidx.annotation.VisibleForTesting import androidx.constraintlayout.widget.ConstraintLayout import androidx.constraintlayout.widget.ConstraintSet @@ -31,21 +32,28 @@ import com.android.keyguard.LockIconView import com.android.keyguard.LockIconViewController import com.android.systemui.Flags.keyguardBottomAreaRefactor import com.android.systemui.biometrics.AuthController +import com.android.systemui.dagger.qualifiers.Application +import com.android.systemui.deviceentry.shared.DeviceEntryUdfpsRefactor import com.android.systemui.flags.FeatureFlags import com.android.systemui.flags.Flags import com.android.systemui.keyguard.shared.model.KeyguardSection +import com.android.systemui.keyguard.ui.binder.AlternateBouncerViewBinder import com.android.systemui.keyguard.ui.binder.DeviceEntryIconViewBinder import com.android.systemui.keyguard.ui.view.DeviceEntryIconView +import com.android.systemui.keyguard.ui.viewmodel.AlternateBouncerViewModel import com.android.systemui.keyguard.ui.viewmodel.DeviceEntryBackgroundViewModel import com.android.systemui.keyguard.ui.viewmodel.DeviceEntryForegroundViewModel import com.android.systemui.keyguard.ui.viewmodel.DeviceEntryIconViewModel import com.android.systemui.plugins.FalsingManager import com.android.systemui.res.R import com.android.systemui.shade.NotificationPanelView +import com.android.systemui.statusbar.NotificationShadeWindowController import dagger.Lazy import javax.inject.Inject +import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.ExperimentalCoroutinesApi +/** Includes both the device entry icon and the alternate bouncer scrim. */ @ExperimentalCoroutinesApi class DefaultDeviceEntryIconSection @Inject @@ -61,23 +69,30 @@ constructor( private val deviceEntryForegroundViewModel: Lazy<DeviceEntryForegroundViewModel>, private val deviceEntryBackgroundViewModel: Lazy<DeviceEntryBackgroundViewModel>, private val falsingManager: Lazy<FalsingManager>, + private val alternateBouncerViewModel: Lazy<AlternateBouncerViewModel>, + private val notificationShadeWindowController: Lazy<NotificationShadeWindowController>, + @Application private val scope: CoroutineScope, ) : KeyguardSection() { private val deviceEntryIconViewId = R.id.device_entry_icon_view + private val alternateBouncerViewId = R.id.alternate_bouncer override fun addViews(constraintLayout: ConstraintLayout) { - if ( - !keyguardBottomAreaRefactor() && - !featureFlags.isEnabled(Flags.REFACTOR_UDFPS_KEYGUARD_VIEWS) - ) { + if (!keyguardBottomAreaRefactor() && !DeviceEntryUdfpsRefactor.isEnabled) { return } + if (DeviceEntryUdfpsRefactor.isEnabled) { + // The alternate bouncer scrim needs to be below the device entry icon view, so + // we add the view here before adding the device entry icon view. + View.inflate(context, R.layout.alternate_bouncer, constraintLayout) + } + notificationPanelView.findViewById<View>(R.id.lock_icon_view).let { notificationPanelView.removeView(it) } val view = - if (featureFlags.isEnabled(Flags.REFACTOR_UDFPS_KEYGUARD_VIEWS)) { + if (DeviceEntryUdfpsRefactor.isEnabled) { DeviceEntryIconView(context, null).apply { id = deviceEntryIconViewId } } else { // keyguardBottomAreaRefactor() @@ -87,7 +102,7 @@ constructor( } override fun bindData(constraintLayout: ConstraintLayout) { - if (featureFlags.isEnabled(Flags.REFACTOR_UDFPS_KEYGUARD_VIEWS)) { + if (DeviceEntryUdfpsRefactor.isEnabled) { constraintLayout.findViewById<DeviceEntryIconView?>(deviceEntryIconViewId)?.let { DeviceEntryIconViewBinder.bind( it, @@ -97,6 +112,14 @@ constructor( falsingManager.get(), ) } + constraintLayout.findViewById<FrameLayout?>(alternateBouncerViewId)?.let { + AlternateBouncerViewBinder.bind( + it, + alternateBouncerViewModel.get(), + scope, + notificationShadeWindowController.get(), + ) + } } else { constraintLayout.findViewById<LockIconView?>(R.id.lock_icon_view)?.let { lockIconViewController.get().setLockIconView(it) @@ -140,7 +163,7 @@ constructor( } override fun removeViews(constraintLayout: ConstraintLayout) { - if (featureFlags.isEnabled(Flags.REFACTOR_UDFPS_KEYGUARD_VIEWS)) { + if (DeviceEntryUdfpsRefactor.isEnabled) { constraintLayout.removeView(deviceEntryIconViewId) } else { constraintLayout.removeView(R.id.lock_icon_view) @@ -160,7 +183,7 @@ constructor( } val iconId = - if (featureFlags.isEnabled(Flags.REFACTOR_UDFPS_KEYGUARD_VIEWS)) { + if (DeviceEntryUdfpsRefactor.isEnabled) { deviceEntryIconViewId } else { R.id.lock_icon_view diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/DefaultNotificationStackScrollLayoutSection.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/DefaultNotificationStackScrollLayoutSection.kt index 165ee364c2c8..7512e518f03c 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/DefaultNotificationStackScrollLayoutSection.kt +++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/DefaultNotificationStackScrollLayoutSection.kt @@ -24,6 +24,7 @@ import androidx.constraintlayout.widget.ConstraintSet.END import androidx.constraintlayout.widget.ConstraintSet.PARENT_ID import androidx.constraintlayout.widget.ConstraintSet.START import androidx.constraintlayout.widget.ConstraintSet.TOP +import com.android.systemui.deviceentry.shared.DeviceEntryUdfpsRefactor import com.android.systemui.flags.FeatureFlags import com.android.systemui.flags.Flags import com.android.systemui.keyguard.shared.KeyguardShadeMigrationNssl @@ -81,7 +82,7 @@ constructor( connect(R.id.nssl_placeholder, END, PARENT_ID, END) val lockId = - if (featureFlags.isEnabled(Flags.REFACTOR_UDFPS_KEYGUARD_VIEWS)) { + if (DeviceEntryUdfpsRefactor.isEnabled) { R.id.device_entry_icon_view } else { R.id.lock_icon_view diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/KeyguardSectionsModule.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/KeyguardSectionsModule.kt index 37c00b61c4dd..a65149e6f3aa 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/KeyguardSectionsModule.kt +++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/KeyguardSectionsModule.kt @@ -25,6 +25,7 @@ import javax.inject.Named @Module abstract class KeyguardSectionsModule { + @Module companion object { const val KEYGUARD_AMBIENT_INDICATION_AREA_SECTION = "keyguard_ambient_indication_area_section" diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/SplitShadeNotificationStackScrollLayoutSection.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/SplitShadeNotificationStackScrollLayoutSection.kt index 2c45da63edb4..f2559bad92b5 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/SplitShadeNotificationStackScrollLayoutSection.kt +++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/SplitShadeNotificationStackScrollLayoutSection.kt @@ -24,6 +24,7 @@ import androidx.constraintlayout.widget.ConstraintSet.END import androidx.constraintlayout.widget.ConstraintSet.PARENT_ID import androidx.constraintlayout.widget.ConstraintSet.START import androidx.constraintlayout.widget.ConstraintSet.TOP +import com.android.systemui.deviceentry.shared.DeviceEntryUdfpsRefactor import com.android.systemui.flags.FeatureFlags import com.android.systemui.flags.Flags import com.android.systemui.keyguard.shared.KeyguardShadeMigrationNssl @@ -81,7 +82,7 @@ constructor( connect(R.id.nssl_placeholder, END, PARENT_ID, END) val lockId = - if (featureFlags.isEnabled(Flags.REFACTOR_UDFPS_KEYGUARD_VIEWS)) { + if (DeviceEntryUdfpsRefactor.isEnabled) { R.id.device_entry_icon_view } else { R.id.lock_icon_view diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardRootViewModel.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardRootViewModel.kt index 60f75f03609c..68cb5f1f272e 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardRootViewModel.kt +++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardRootViewModel.kt @@ -21,11 +21,11 @@ import android.content.Context import android.util.MathUtils import android.view.View.VISIBLE import com.android.app.animation.Interpolators +import com.android.systemui.Flags.newAodTransition import com.android.systemui.common.shared.model.SharedNotificationContainerPosition import com.android.systemui.dagger.SysUISingleton import com.android.systemui.deviceentry.domain.interactor.DeviceEntryInteractor import com.android.systemui.flags.FeatureFlagsClassic -import com.android.systemui.flags.Flags import com.android.systemui.keyguard.domain.interactor.BurnInInteractor import com.android.systemui.keyguard.domain.interactor.KeyguardInteractor import com.android.systemui.keyguard.domain.interactor.KeyguardTransitionInteractor @@ -280,7 +280,7 @@ constructor( dozeParameters.displayNeedsBlanking -> false // We only want the appear animations to happen when the notifications // get fully hidden, since otherwise the un-hide animation overlaps. - featureFlags.isEnabled(Flags.NEW_AOD_TRANSITION) -> true + newAodTransition() -> true else -> fullyHidden } AnimatableEvent(fullyHidden, animate) 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 17ff1b1ae888..0d81940cacbd 100644 --- a/packages/SystemUI/src/com/android/systemui/log/dagger/LogModule.java +++ b/packages/SystemUI/src/com/android/systemui/log/dagger/LogModule.java @@ -517,6 +517,16 @@ public class LogModule { } /** + * Provides a {@link LogBuffer} for Scrims like LightRevealScrim. + */ + @Provides + @SysUISingleton + @ScrimLog + public static LogBuffer provideScrimLogBuffer(LogBufferFactory factory) { + return factory.create("ScrimLog", 100); + } + + /** * Provides a {@link LogBuffer} for dream-related logs. */ @Provides diff --git a/packages/SystemUI/src/com/android/systemui/log/dagger/ScrimLog.kt b/packages/SystemUI/src/com/android/systemui/log/dagger/ScrimLog.kt new file mode 100644 index 000000000000..e78a162e723f --- /dev/null +++ b/packages/SystemUI/src/com/android/systemui/log/dagger/ScrimLog.kt @@ -0,0 +1,22 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.systemui.log.dagger + +import javax.inject.Qualifier + +/** A [com.android.systemui.log.LogBuffer] for Scrims like LightRevealScrim */ +@Qualifier @MustBeDocumented @Retention(AnnotationRetention.RUNTIME) annotation class ScrimLog diff --git a/packages/SystemUI/src/com/android/systemui/media/controls/ui/MediaHierarchyManager.kt b/packages/SystemUI/src/com/android/systemui/media/controls/ui/MediaHierarchyManager.kt index b1ff708d020b..9d6e9b4f3ed5 100644 --- a/packages/SystemUI/src/com/android/systemui/media/controls/ui/MediaHierarchyManager.kt +++ b/packages/SystemUI/src/com/android/systemui/media/controls/ui/MediaHierarchyManager.kt @@ -46,8 +46,7 @@ import com.android.systemui.media.controls.pipeline.MediaDataManager import com.android.systemui.media.dream.MediaDreamComplication import com.android.systemui.plugins.statusbar.StatusBarStateController import com.android.systemui.res.R -import com.android.systemui.shade.ShadeStateEvents -import com.android.systemui.shade.ShadeStateEvents.ShadeStateEventsListener +import com.android.systemui.shade.domain.interactor.ShadeInteractor import com.android.systemui.statusbar.CrossFadeHelper import com.android.systemui.statusbar.StatusBarState import com.android.systemui.statusbar.SysuiStatusBarStateController @@ -103,7 +102,7 @@ constructor( private val communalInteractor: CommunalInteractor, configurationController: ConfigurationController, wakefulnessLifecycle: WakefulnessLifecycle, - panelEventsEvents: ShadeStateEvents, + shadeInteractor: ShadeInteractor, private val secureSettings: SecureSettings, @Main private val handler: Handler, @Application private val coroutineScope: CoroutineScope, @@ -545,14 +544,12 @@ constructor( mediaHosts.forEach { it?.updateViewVisibility() } } - panelEventsEvents.addShadeStateEventsListener( - object : ShadeStateEventsListener { - override fun onExpandImmediateChanged(isExpandImmediateEnabled: Boolean) { - skipQqsOnExpansion = isExpandImmediateEnabled - updateDesiredLocation() - } + coroutineScope.launch { + shadeInteractor.isQsBypassingShade.collect { isExpandImmediateEnabled -> + skipQqsOnExpansion = isExpandImmediateEnabled + updateDesiredLocation() } - ) + } val settingsObserver: ContentObserver = object : ContentObserver(handler) { diff --git a/packages/SystemUI/src/com/android/systemui/qs/external/TileLifecycleManager.java b/packages/SystemUI/src/com/android/systemui/qs/external/TileLifecycleManager.java index 78f2da53cd43..789a1e401ae6 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/external/TileLifecycleManager.java +++ b/packages/SystemUI/src/com/android/systemui/qs/external/TileLifecycleManager.java @@ -279,6 +279,11 @@ public class TileLifecycleManager extends BroadcastReceiver implements } @Override + public void onNullBinding(ComponentName name) { + executeSetBindService(false); + } + + @Override public void onServiceDisconnected(ComponentName name) { if (DEBUG) Log.d(TAG, "onServiceDisconnected " + name); handleDeath(); diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/viewmodel/QSTileViewModelAdapter.kt b/packages/SystemUI/src/com/android/systemui/qs/tiles/viewmodel/QSTileViewModelAdapter.kt index 771d07c35cc3..3afbd7c0d4ec 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/tiles/viewmodel/QSTileViewModelAdapter.kt +++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/viewmodel/QSTileViewModelAdapter.kt @@ -234,6 +234,9 @@ constructor( disabledByPolicy = viewModelState.enabledState == QSTileState.EnabledState.DISABLED expandedAccessibilityClassName = viewModelState.expandedAccessibilityClassName + // Use LoopedAnimatable2DrawableWrapper to achieve animated tile icon + isTransient = false + when (viewModelState.sideViewIcon) { is QSTileState.SideViewIcon.Custom -> { sideViewCustomDrawable = diff --git a/packages/SystemUI/src/com/android/systemui/scrim/ScrimView.java b/packages/SystemUI/src/com/android/systemui/scrim/ScrimView.java index f4d19dc2691d..d0585d3782c2 100644 --- a/packages/SystemUI/src/com/android/systemui/scrim/ScrimView.java +++ b/packages/SystemUI/src/com/android/systemui/scrim/ScrimView.java @@ -86,6 +86,8 @@ public class ScrimView extends View { public ScrimView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) { super(context, attrs, defStyleAttr, defStyleRes); + setFocusable(false); + setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_NO); mDrawable = new ScrimDrawable(); mDrawable.setCallback(this); mColors = new ColorExtractor.GradientColors(); diff --git a/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java b/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java index 7201b3557a9b..a44b4b4f11fe 100644 --- a/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java +++ b/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java @@ -134,6 +134,7 @@ import com.android.systemui.keyguard.domain.interactor.KeyguardBottomAreaInterac import com.android.systemui.keyguard.domain.interactor.KeyguardFaceAuthInteractor; import com.android.systemui.keyguard.domain.interactor.KeyguardInteractor; import com.android.systemui.keyguard.domain.interactor.KeyguardTransitionInteractor; +import com.android.systemui.keyguard.domain.interactor.NaturalScrollingSettingObserver; import com.android.systemui.keyguard.shared.KeyguardShadeMigrationNssl; import com.android.systemui.keyguard.shared.model.TransitionState; import com.android.systemui.keyguard.shared.model.TransitionStep; @@ -355,6 +356,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump private final NotificationGutsManager mGutsManager; private final AlternateBouncerInteractor mAlternateBouncerInteractor; private final QuickSettingsController mQsController; + private final NaturalScrollingSettingObserver mNaturalScrollingSettingObserver; private final TouchHandler mTouchHandler = new TouchHandler(); private long mDownTime; @@ -407,6 +409,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump private float mOverStretchAmount; private float mDownX; private float mDownY; + private boolean mIsTrackpadReverseScroll; private int mDisplayTopInset = 0; // in pixels private int mDisplayRightInset = 0; // in pixels private int mDisplayLeftInset = 0; // in pixels @@ -775,7 +778,8 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump KeyguardFaceAuthInteractor keyguardFaceAuthInteractor, SplitShadeStateController splitShadeStateController, PowerInteractor powerInteractor, - KeyguardClockPositionAlgorithm keyguardClockPositionAlgorithm) { + KeyguardClockPositionAlgorithm keyguardClockPositionAlgorithm, + NaturalScrollingSettingObserver naturalScrollingSettingObserver) { keyguardStateController.addCallback(new KeyguardStateController.Callback() { @Override public void onKeyguardFadingAwayChanged() { @@ -804,6 +808,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump mPowerInteractor = powerInteractor; mKeyguardViewConfigurator = keyguardViewConfigurator; mClockPositionAlgorithm = keyguardClockPositionAlgorithm; + mNaturalScrollingSettingObserver = naturalScrollingSettingObserver; mView.addOnAttachStateChangeListener(new View.OnAttachStateChangeListener() { @Override public void onViewAttachedToWindow(View v) { @@ -3682,7 +3687,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump */ private boolean isDirectionUpwards(float x, float y) { float xDiff = x - mInitialExpandX; - float yDiff = y - mInitialExpandY; + float yDiff = (mIsTrackpadReverseScroll ? -1 : 1) * (y - mInitialExpandY); if (yDiff >= 0) { return false; } @@ -3719,7 +3724,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump || (!isFullyExpanded() && !isFullyCollapsed()) || event.getActionMasked() == MotionEvent.ACTION_CANCEL || forceCancel) { mVelocityTracker.computeCurrentVelocity(1000); - float vel = mVelocityTracker.getYVelocity(); + float vel = (mIsTrackpadReverseScroll ? -1 : 1) * mVelocityTracker.getYVelocity(); float vectorVel = (float) Math.hypot( mVelocityTracker.getXVelocity(), mVelocityTracker.getYVelocity()); @@ -3758,8 +3763,9 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump mLockscreenGestureLogger.write(MetricsEvent.ACTION_LS_UNLOCK, heightDp, velocityDp); mLockscreenGestureLogger.log(LockscreenUiEvent.LOCKSCREEN_UNLOCK); } + float dy = (mIsTrackpadReverseScroll ? -1 : 1) * (y - mInitialExpandY); @Classifier.InteractionType int interactionType = vel == 0 ? GENERIC - : y - mInitialExpandY > 0 ? QUICK_SETTINGS + : dy > 0 ? QUICK_SETTINGS : (mKeyguardStateController.canDismissLockScreen() ? UNLOCK : BOUNCER_UNLOCK); @@ -3786,7 +3792,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump private float getCurrentExpandVelocity() { mVelocityTracker.computeCurrentVelocity(1000); - return mVelocityTracker.getYVelocity(); + return (mIsTrackpadReverseScroll ? -1 : 1) * mVelocityTracker.getYVelocity(); } private void endClosing() { @@ -4827,6 +4833,10 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump + " mAnimatingOnDown: true, mClosing: true"); return true; } + + mIsTrackpadReverseScroll = + !mNaturalScrollingSettingObserver.isNaturalScrollingEnabled() + && isTrackpadScroll(mTrackpadGestureFeaturesEnabled, event); if (!isTracking() || isFullyCollapsed()) { mInitialExpandY = y; mInitialExpandX = x; @@ -4869,7 +4879,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump } break; case MotionEvent.ACTION_MOVE: - final float h = y - mInitialExpandY; + final float h = (mIsTrackpadReverseScroll ? -1 : 1) * (y - mInitialExpandY); addMovement(event); final boolean openShadeWithoutHun = mPanelClosedOnDown && !mCollapsedAndHeadsUpOnDown; @@ -5133,7 +5143,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump if (!isFullyCollapsed()) { maybeVibrateOnOpening(true /* openingWithTouch */); } - float h = y - mInitialExpandY; + float h = (mIsTrackpadReverseScroll ? -1 : 1) * (y - mInitialExpandY); // If the panel was collapsed when touching, we only need to check for the // y-component of the gesture, as we have no conflicting horizontal gesture. @@ -5182,6 +5192,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump mQsController.cancelJankMonitoring(); } } + mIsTrackpadReverseScroll = false; break; } return !mGestureWaitForTouchSlop || isTracking(); diff --git a/packages/SystemUI/src/com/android/systemui/shade/NotificationShadeWindowViewController.java b/packages/SystemUI/src/com/android/systemui/shade/NotificationShadeWindowViewController.java index d0f2784a98b3..cf1dfdc3f701 100644 --- a/packages/SystemUI/src/com/android/systemui/shade/NotificationShadeWindowViewController.java +++ b/packages/SystemUI/src/com/android/systemui/shade/NotificationShadeWindowViewController.java @@ -46,6 +46,7 @@ import com.android.systemui.communal.data.repository.CommunalRepository; import com.android.systemui.communal.ui.viewmodel.CommunalViewModel; import com.android.systemui.compose.ComposeFacade; import com.android.systemui.dagger.SysUISingleton; +import com.android.systemui.deviceentry.shared.DeviceEntryUdfpsRefactor; import com.android.systemui.dock.DockManager; import com.android.systemui.dump.DumpManager; import com.android.systemui.flags.FeatureFlagsClassic; @@ -448,7 +449,7 @@ public class NotificationShadeWindowViewController implements Dumpable { } boolean bouncerShowing; - if (mFeatureFlagsClassic.isEnabled(Flags.ALTERNATE_BOUNCER_VIEW)) { + if (DeviceEntryUdfpsRefactor.isEnabled()) { bouncerShowing = mPrimaryBouncerInteractor.isBouncerShowing() || mAlternateBouncerInteractor.isVisibleState(); } else { diff --git a/packages/SystemUI/src/com/android/systemui/shade/QuickSettingsController.java b/packages/SystemUI/src/com/android/systemui/shade/QuickSettingsController.java index 4ca763f9c0dd..868fbceecafc 100644 --- a/packages/SystemUI/src/com/android/systemui/shade/QuickSettingsController.java +++ b/packages/SystemUI/src/com/android/systemui/shade/QuickSettingsController.java @@ -207,12 +207,6 @@ public class QuickSettingsController implements Dumpable { /** Indicates QS is at its max height */ private boolean mFullyExpanded; - /** - * Determines if QS should be already expanded when expanding shade. - * Used for split shade, two finger gesture as well as accessibility shortcut to QS. - * It needs to be set when movement starts as it resets at the end of expansion/collapse. - */ - private boolean mExpandImmediate; private boolean mExpandedWhenExpandingStarted; private boolean mAnimatingHiddenFromCollapsed; private boolean mVisible; @@ -253,6 +247,14 @@ public class QuickSettingsController implements Dumpable { private Insets mCachedGestureInsets; /** + * The window width currently in effect -- used together with + * {@link QuickSettingsController#mCachedGestureInsets} to decide whether a back gesture should + * receive a horizontal swipe inwards from the left/right vertical edge of the screen. + * We cache this on ACTION_DOWN, and query it during both ACTION_DOWN and ACTION_MOVE events. + */ + private int mCachedWindowWidth; + + /** * The amount of progress we are currently in if we're transitioning to the full shade. * 0.0f means we're not transitioning yet, while 1 means we're all the way in the full * shade. This value can also go beyond 1.1 when we're overshooting! @@ -512,7 +514,7 @@ public class QuickSettingsController implements Dumpable { /** */ @VisibleForTesting boolean isExpandImmediate() { - return mExpandImmediate; + return mShadeRepository.getLegacyExpandImmediate().getValue(); } float getInitialTouchY() { @@ -534,6 +536,7 @@ public class QuickSettingsController implements Dumpable { WindowMetrics windowMetrics = wm.getCurrentWindowMetrics(); mCachedGestureInsets = windowMetrics.getWindowInsets().getInsets( WindowInsets.Type.systemGestures()); + mCachedWindowWidth = windowMetrics.getBounds().width(); } /** @@ -542,7 +545,7 @@ public class QuickSettingsController implements Dumpable { */ public boolean shouldBackBypassQuickSettings(float touchX) { return (touchX < mCachedGestureInsets.left) - || (touchX > mKeyguardStatusBar.getWidth() - mCachedGestureInsets.right); + || (touchX > mCachedWindowWidth - mCachedGestureInsets.right); } /** Returns whether touch is within QS area */ @@ -602,7 +605,7 @@ public class QuickSettingsController implements Dumpable { // close the whole shade with one motion. Also this will be always true when closing // split shade as there QS are always expanded so every collapsing motion is motion from // expanded QS to closed panel - return mExpandImmediate || (getExpanded() + return isExpandImmediate() || (getExpanded() && !isTracking() && !isExpansionAnimating() && !mExpansionFromOverscroll); } @@ -792,7 +795,7 @@ public class QuickSettingsController implements Dumpable { && mBarState == SHADE) { Log.wtf(TAG, "setting QS height to 0 in split shade while shade is open(ing). " - + "Value of mExpandImmediate = " + mExpandImmediate); + + "Value of isExpandImmediate() = " + isExpandImmediate()); } int maxHeight = getMaxExpansionHeight(); height = Math.min(Math.max( @@ -941,10 +944,9 @@ public class QuickSettingsController implements Dumpable { } void setExpandImmediate(boolean expandImmediate) { - if (expandImmediate != mExpandImmediate) { + if (expandImmediate != isExpandImmediate()) { mShadeLog.logQsExpandImmediateChanged(expandImmediate); - mExpandImmediate = expandImmediate; - mShadeExpansionStateManager.notifyExpandImmediateChange(expandImmediate); + mShadeRepository.setLegacyExpandImmediate(expandImmediate); } } @@ -980,6 +982,7 @@ public class QuickSettingsController implements Dumpable { void updateQsState() { boolean qsFullScreen = getExpanded() && !mSplitShadeEnabled; + mShadeRepository.setLegacyQsFullscreen(qsFullScreen); mNotificationStackScrollLayoutController.setQsFullScreen(qsFullScreen); mNotificationStackScrollLayoutController.setScrollingEnabled( mBarState != KEYGUARD && (!qsFullScreen || mExpansionFromOverscroll)); @@ -996,7 +999,7 @@ public class QuickSettingsController implements Dumpable { public void updateExpansion() { if (mQs == null) return; final float squishiness; - if ((mExpandImmediate || getExpanded()) && !mSplitShadeEnabled) { + if ((isExpandImmediate() || getExpanded()) && !mSplitShadeEnabled) { squishiness = 1; } else if (mTransitioningToFullShadeProgress > 0.0f) { squishiness = mLockscreenShadeTransitionController.getQsSquishTransitionFraction(); @@ -2077,8 +2080,8 @@ public class QuickSettingsController implements Dumpable { ipw.println(getExpanded()); ipw.print("mFullyExpanded="); ipw.println(mFullyExpanded); - ipw.print("mExpandImmediate="); - ipw.println(mExpandImmediate); + ipw.print("isExpandImmediate()="); + ipw.println(isExpandImmediate()); ipw.print("mExpandedWhenExpandingStarted="); ipw.println(mExpandedWhenExpandingStarted); ipw.print("mAnimatingHiddenFromCollapsed="); @@ -2111,6 +2114,8 @@ public class QuickSettingsController implements Dumpable { ipw.println(mAnimatorExpand); ipw.print("mCachedGestureInsets="); ipw.println(mCachedGestureInsets); + ipw.print("mCachedWindowWidth="); + ipw.println(mCachedWindowWidth); ipw.print("mTransitioningToFullShadeProgress="); ipw.println(mTransitioningToFullShadeProgress); ipw.print("mDistanceForFullShadeTransition="); diff --git a/packages/SystemUI/src/com/android/systemui/shade/ShadeEmptyImplModule.kt b/packages/SystemUI/src/com/android/systemui/shade/ShadeEmptyImplModule.kt index 7a803867d4a4..53eccfdf70d5 100644 --- a/packages/SystemUI/src/com/android/systemui/shade/ShadeEmptyImplModule.kt +++ b/packages/SystemUI/src/com/android/systemui/shade/ShadeEmptyImplModule.kt @@ -17,6 +17,8 @@ package com.android.systemui.shade import com.android.systemui.dagger.SysUISingleton +import com.android.systemui.shade.domain.interactor.ShadeInteractor +import com.android.systemui.shade.domain.interactor.ShadeInteractorEmptyImpl import dagger.Binds import dagger.Module @@ -30,4 +32,8 @@ abstract class ShadeEmptyImplModule { @Binds @SysUISingleton abstract fun bindsShadeController(sc: ShadeControllerEmptyImpl): ShadeController + + @Binds + @SysUISingleton + abstract fun bindsShadeInteractor(si: ShadeInteractorEmptyImpl): ShadeInteractor } diff --git a/packages/SystemUI/src/com/android/systemui/shade/ShadeExpansionStateManager.kt b/packages/SystemUI/src/com/android/systemui/shade/ShadeExpansionStateManager.kt index fca98f580702..e20534cc7840 100644 --- a/packages/SystemUI/src/com/android/systemui/shade/ShadeExpansionStateManager.kt +++ b/packages/SystemUI/src/com/android/systemui/shade/ShadeExpansionStateManager.kt @@ -169,12 +169,6 @@ class ShadeExpansionStateManager @Inject constructor() : ShadeStateEvents { } } - fun notifyExpandImmediateChange(expandImmediateEnabled: Boolean) { - for (cb in shadeStateEventsListeners) { - cb.onExpandImmediateChanged(expandImmediateEnabled) - } - } - private fun debugLog(msg: String) { if (!DEBUG) return Log.v(TAG, msg) diff --git a/packages/SystemUI/src/com/android/systemui/shade/ShadeModule.kt b/packages/SystemUI/src/com/android/systemui/shade/ShadeModule.kt index 89aaaafbcdf3..54467cffa401 100644 --- a/packages/SystemUI/src/com/android/systemui/shade/ShadeModule.kt +++ b/packages/SystemUI/src/com/android/systemui/shade/ShadeModule.kt @@ -17,13 +17,40 @@ package com.android.systemui.shade import com.android.systemui.dagger.SysUISingleton - +import com.android.systemui.scene.shared.flag.SceneContainerFlags +import com.android.systemui.shade.domain.interactor.BaseShadeInteractor +import com.android.systemui.shade.domain.interactor.ShadeInteractor +import com.android.systemui.shade.domain.interactor.ShadeInteractorImpl +import com.android.systemui.shade.domain.interactor.ShadeInteractorLegacyImpl +import com.android.systemui.shade.domain.interactor.ShadeInteractorSceneContainerImpl import dagger.Binds import dagger.Module +import dagger.Provides +import javax.inject.Provider /** Module for classes related to the notification shade. */ @Module(includes = [StartShadeModule::class, ShadeViewProviderModule::class]) abstract class ShadeModule { + companion object { + @Provides + @SysUISingleton + fun provideBaseShadeInteractor( + sceneContainerFlags: SceneContainerFlags, + sceneContainerOn: Provider<ShadeInteractorSceneContainerImpl>, + sceneContainerOff: Provider<ShadeInteractorLegacyImpl> + ): BaseShadeInteractor { + return if (sceneContainerFlags.isEnabled()) { + sceneContainerOn.get() + } else { + sceneContainerOff.get() + } + } + } + + @Binds + @SysUISingleton + abstract fun bindsShadeInteractor(si: ShadeInteractorImpl): ShadeInteractor + @Binds @SysUISingleton abstract fun bindsShadeViewController( diff --git a/packages/SystemUI/src/com/android/systemui/shade/ShadeStateEvents.kt b/packages/SystemUI/src/com/android/systemui/shade/ShadeStateEvents.kt index 5804040a8676..c8511d76f5f0 100644 --- a/packages/SystemUI/src/com/android/systemui/shade/ShadeStateEvents.kt +++ b/packages/SystemUI/src/com/android/systemui/shade/ShadeStateEvents.kt @@ -35,16 +35,5 @@ interface ShadeStateEvents { * Invoked when the notification panel starts or stops launching an [android.app.Activity]. */ fun onLaunchingActivityChanged(isLaunchingActivity: Boolean) {} - - /** - * Invoked when the "expand immediate" attribute changes. - * - * An example of expanding immediately is when swiping down from the top with two fingers. - * Instead of going to QQS, we immediately expand to full QS. - * - * Another example is when full QS is showing, and we swipe up from the bottom. Instead of - * going to QQS, the panel fully collapses. - */ - fun onExpandImmediateChanged(isExpandImmediateEnabled: Boolean) {} } } diff --git a/packages/SystemUI/src/com/android/systemui/shade/ShadeViewProviderModule.kt b/packages/SystemUI/src/com/android/systemui/shade/ShadeViewProviderModule.kt index 37073a6b5a50..374e8717f819 100644 --- a/packages/SystemUI/src/com/android/systemui/shade/ShadeViewProviderModule.kt +++ b/packages/SystemUI/src/com/android/systemui/shade/ShadeViewProviderModule.kt @@ -22,6 +22,7 @@ import android.os.Handler import android.view.LayoutInflater import android.view.ViewStub import androidx.constraintlayout.motion.widget.MotionLayout +import com.android.keyguard.logging.ScrimLogger import com.android.systemui.battery.BatteryMeterView import com.android.systemui.battery.BatteryMeterViewController import com.android.systemui.biometrics.AuthRippleView @@ -140,8 +141,14 @@ abstract class ShadeViewProviderModule { @SysUISingleton fun providesLightRevealScrim( notificationShadeWindowView: NotificationShadeWindowView, + scrimLogger: ScrimLogger, ): LightRevealScrim { - return notificationShadeWindowView.requireViewById(R.id.light_reveal_scrim) + val scrim = + notificationShadeWindowView.requireViewById<LightRevealScrim>( + R.id.light_reveal_scrim + ) + scrim.scrimLogger = scrimLogger + return scrim } @Provides diff --git a/packages/SystemUI/src/com/android/systemui/shade/data/repository/ShadeRepository.kt b/packages/SystemUI/src/com/android/systemui/shade/data/repository/ShadeRepository.kt index 8bab6696e2d3..47b08fe037a4 100644 --- a/packages/SystemUI/src/com/android/systemui/shade/data/repository/ShadeRepository.kt +++ b/packages/SystemUI/src/com/android/systemui/shade/data/repository/ShadeRepository.kt @@ -93,6 +93,29 @@ interface ShadeRepository { */ @Deprecated("Use ShadeInteractor instead") val legacyIsQsExpanded: StateFlow<Boolean> + /** + * QuickSettingsController.mExpandImmediate as a flow. Indicates that Quick Settings is being + * expanded without first expanding the Shade or Quick Settings is being collapsed without first + * collapsing to shade, i.e. expanding with 2-finger swipe or collapsing by flinging from the + * bottom of the screen. Replaced by ShadeInteractor.isQsBypassingShade. + */ + @Deprecated("Use ShadeInteractor.isQsBypassingShade instead") + val legacyExpandImmediate: StateFlow<Boolean> + + /** True when QS is taking up the entire screen, i.e. fully expanded on a non-unfolded phone. */ + @Deprecated("Use ShadeInteractor instead") val legacyQsFullscreen: StateFlow<Boolean> + + /** */ + @Deprecated("Use ShadeInteractor instead") + fun setLegacyQsFullscreen(legacyQsFullscreen: Boolean) + + /** + * Sets whether Quick Settings is being expanded without first expanding the Shade or Quick + * Settings is being collapsed without first collapsing to shade. + */ + @Deprecated("Use ShadeInteractor instead") + fun setLegacyExpandImmediate(legacyExpandImmediate: Boolean) + /** Sets whether QS is expanded. */ @Deprecated("Use ShadeInteractor instead") fun setLegacyIsQsExpanded(legacyIsQsExpanded: Boolean) @@ -105,12 +128,13 @@ interface ShadeRepository { fun setLegacyExpandedOrAwaitingInputTransfer(legacyExpandedOrAwaitingInputTransfer: Boolean) /** Sets whether the user is moving Quick Settings with a pointer */ - fun setLegacyQsTracking(legacyQsTracking: Boolean) + @Deprecated("Use ShadeInteractor instead") fun setLegacyQsTracking(legacyQsTracking: Boolean) /** Sets whether the user is moving the shade with a pointer */ - fun setLegacyShadeTracking(tracking: Boolean) + @Deprecated("Use ShadeInteractor instead") fun setLegacyShadeTracking(tracking: Boolean) /** Sets whether the user is moving the shade with a pointer, on lockscreen only */ + @Deprecated("Use ShadeInteractor instead") fun setLegacyLockscreenShadeTracking(tracking: Boolean) /** Amount shade has expanded with regard to the UDFPS location */ @@ -199,6 +223,22 @@ constructor(shadeExpansionStateManager: ShadeExpansionStateManager) : ShadeRepos @Deprecated("Use ShadeInteractor instead") override val legacyIsQsExpanded: StateFlow<Boolean> = _legacyIsQsExpanded.asStateFlow() + private val _legacyExpandImmediate = MutableStateFlow(false) + @Deprecated("Use ShadeInteractor instead") + override val legacyExpandImmediate: StateFlow<Boolean> = _legacyExpandImmediate.asStateFlow() + + private val _legacyQsFullscreen = MutableStateFlow(false) + @Deprecated("Use ShadeInteractor instead") + override val legacyQsFullscreen: StateFlow<Boolean> = _legacyQsFullscreen.asStateFlow() + + override fun setLegacyQsFullscreen(legacyQsFullscreen: Boolean) { + _legacyQsFullscreen.value = legacyQsFullscreen + } + + override fun setLegacyExpandImmediate(legacyExpandImmediate: Boolean) { + _legacyExpandImmediate.value = legacyExpandImmediate + } + @Deprecated("Use ShadeInteractor instead") override fun setLegacyIsQsExpanded(legacyIsQsExpanded: Boolean) { _legacyIsQsExpanded.value = legacyIsQsExpanded diff --git a/packages/SystemUI/src/com/android/systemui/shade/domain/interactor/ShadeInteractor.kt b/packages/SystemUI/src/com/android/systemui/shade/domain/interactor/ShadeInteractor.kt index d687ef64aec4..6a9757f3adfd 100644 --- a/packages/SystemUI/src/com/android/systemui/shade/domain/interactor/ShadeInteractor.kt +++ b/packages/SystemUI/src/com/android/systemui/shade/domain/interactor/ShadeInteractor.kt @@ -16,149 +16,42 @@ package com.android.systemui.shade.domain.interactor -import com.android.systemui.dagger.SysUISingleton -import com.android.systemui.dagger.qualifiers.Application -import com.android.systemui.keyguard.data.repository.KeyguardRepository -import com.android.systemui.keyguard.domain.interactor.KeyguardTransitionInteractor -import com.android.systemui.keyguard.shared.model.DozeStateModel -import com.android.systemui.keyguard.shared.model.KeyguardState -import com.android.systemui.keyguard.shared.model.StatusBarState -import com.android.systemui.power.domain.interactor.PowerInteractor -import com.android.systemui.scene.domain.interactor.SceneInteractor -import com.android.systemui.scene.shared.flag.SceneContainerFlags -import com.android.systemui.scene.shared.model.ObservableTransitionState -import com.android.systemui.scene.shared.model.SceneKey -import com.android.systemui.shade.data.repository.ShadeRepository -import com.android.systemui.statusbar.disableflags.data.repository.DisableFlagsRepository -import com.android.systemui.statusbar.notification.stack.domain.interactor.SharedNotificationContainerInteractor -import com.android.systemui.statusbar.phone.DozeParameters -import com.android.systemui.statusbar.pipeline.mobile.data.repository.UserSetupRepository -import com.android.systemui.statusbar.policy.data.repository.DeviceProvisioningRepository -import com.android.systemui.user.domain.interactor.UserSwitcherInteractor -import javax.inject.Inject -import javax.inject.Provider import kotlinx.coroutines.CoroutineScope -import kotlinx.coroutines.ExperimentalCoroutinesApi -import kotlinx.coroutines.currentCoroutineContext import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.SharingStarted import kotlinx.coroutines.flow.StateFlow import kotlinx.coroutines.flow.combine -import kotlinx.coroutines.flow.distinctUntilChanged -import kotlinx.coroutines.flow.first -import kotlinx.coroutines.flow.flatMapLatest -import kotlinx.coroutines.flow.flow -import kotlinx.coroutines.flow.flowOf -import kotlinx.coroutines.flow.map import kotlinx.coroutines.flow.stateIn -import kotlinx.coroutines.isActive /** Business logic for shade interactions. */ -@OptIn(ExperimentalCoroutinesApi::class) -@SysUISingleton -class ShadeInteractor -@Inject -constructor( - @Application scope: CoroutineScope, - deviceProvisioningRepository: DeviceProvisioningRepository, - disableFlagsRepository: DisableFlagsRepository, - dozeParams: DozeParameters, - sceneContainerFlags: SceneContainerFlags, - // TODO(b/300258424) convert to direct reference instead of provider - sceneInteractorProvider: Provider<SceneInteractor>, - keyguardRepository: KeyguardRepository, - keyguardTransitionInteractor: KeyguardTransitionInteractor, - powerInteractor: PowerInteractor, - userSetupRepository: UserSetupRepository, - userSwitcherInteractor: UserSwitcherInteractor, - sharedNotificationContainerInteractor: SharedNotificationContainerInteractor, - private val repository: ShadeRepository, -) { +interface ShadeInteractor : BaseShadeInteractor { /** Emits true if the shade is currently allowed and false otherwise. */ - val isShadeEnabled: StateFlow<Boolean> = - disableFlagsRepository.disableFlags - .map { it.isShadeEnabled() } - .stateIn(scope, SharingStarted.Eagerly, initialValue = false) + val isShadeEnabled: StateFlow<Boolean> - /** - * Whether split shade, the combined notifications and quick settings shade used for large - * screens, is enabled. - */ - val isSplitShadeEnabled: Flow<Boolean> = - sharedNotificationContainerInteractor.configurationBasedDimensions - .map { dimens -> dimens.useSplitShade } - .distinctUntilChanged() + /** Whether either the shade or QS is fully expanded. */ + val isAnyFullyExpanded: Flow<Boolean> - /** The amount [0-1] that the shade has been opened */ - val shadeExpansion: Flow<Float> = - if (sceneContainerFlags.isEnabled()) { - sceneBasedExpansion(sceneInteractorProvider.get(), SceneKey.Shade) - } else { - combine( - repository.lockscreenShadeExpansion, - keyguardRepository.statusBarState, - repository.legacyShadeExpansion, - repository.qsExpansion, - isSplitShadeEnabled - ) { - lockscreenShadeExpansion, - statusBarState, - legacyShadeExpansion, - qsExpansion, - splitShadeEnabled -> - when (statusBarState) { - // legacyShadeExpansion is 1 instead of 0 when QS is expanded - StatusBarState.SHADE -> - if (!splitShadeEnabled && qsExpansion > 0f) 0f else legacyShadeExpansion - StatusBarState.KEYGUARD -> lockscreenShadeExpansion - // dragDownAmount, which drives lockscreenShadeExpansion resets to 0f when - // the pointer is lifted and the lockscreen shade is fully expanded - StatusBarState.SHADE_LOCKED -> 1f - } - } - .distinctUntilChanged() - } + /** Whether the Shade is fully expanded. */ + val isShadeFullyExpanded: Flow<Boolean> /** - * The amount [0-1] QS has been opened. Normal shade with notifications (QQS) visible will - * report 0f. If split shade is enabled, value matches shadeExpansion. + * Whether the user is expanding or collapsing either the shade or quick settings with user + * input (i.e. dragging a pointer). This will be true even if the user's input gesture had ended + * but a transition they initiated is still animating. */ - val qsExpansion: StateFlow<Float> = - if (sceneContainerFlags.isEnabled()) { - val qsExp = sceneBasedExpansion(sceneInteractorProvider.get(), SceneKey.QuickSettings) - combine(isSplitShadeEnabled, shadeExpansion, qsExp) { - isSplitShadeEnabled, - shadeExp, - qsExp -> - if (isSplitShadeEnabled) { - shadeExp - } else { - qsExp - } - } - .stateIn(scope, SharingStarted.Eagerly, 0f) - } else { - repository.qsExpansion - } + val isUserInteracting: Flow<Boolean> - /** Whether Quick Settings is expanded a non-zero amount. */ - val isQsExpanded: StateFlow<Boolean> = - if (sceneContainerFlags.isEnabled()) { - qsExpansion - .map { it > 0 } - .distinctUntilChanged() - .stateIn(scope, SharingStarted.Eagerly, false) - } else { - repository.legacyIsQsExpanded - } + /** Are touches allowed on the notification panel? */ + val isShadeTouchable: Flow<Boolean> - /** The amount [0-1] either QS or the shade has been opened. */ - val anyExpansion: StateFlow<Float> = - combine(shadeExpansion, qsExpansion) { shadeExp, qsExp -> maxOf(shadeExp, qsExp) } - .stateIn(scope, SharingStarted.Eagerly, 0f) + /** Emits true if the shade can be expanded from QQS to QS and false otherwise. */ + val isExpandToQsEnabled: Flow<Boolean> +} - /** Whether either the shade or QS is fully expanded. */ - val isAnyFullyExpanded: Flow<Boolean> = anyExpansion.map { it >= 1f }.distinctUntilChanged() +/** ShadeInteractor methods with implementations that differ between non-empty impls. */ +interface BaseShadeInteractor { + /** The amount [0-1] either QS or the shade has been opened. */ + val anyExpansion: StateFlow<Float> /** * Whether either the shade or QS is partially or fully expanded, i.e. not fully collapsed. At @@ -169,149 +62,53 @@ constructor( * * TODO(b/300258424) remove all but the first sentence of this comment */ - val isAnyExpanded: StateFlow<Boolean> = - if (sceneContainerFlags.isEnabled()) { - anyExpansion.map { it > 0f }.distinctUntilChanged() - } else { - repository.legacyExpandedOrAwaitingInputTransfer - } - .stateIn(scope, SharingStarted.Eagerly, false) + val isAnyExpanded: StateFlow<Boolean> + + /** The amount [0-1] that the shade has been opened. */ + val shadeExpansion: Flow<Float> /** - * Whether the user is expanding or collapsing the shade with user input. This will be true even - * if the user's input gesture has ended but a transition they initiated is animating. + * The amount [0-1] QS has been opened. Normal shade with notifications (QQS) visible will + * report 0f. If split shade is enabled, value matches shadeExpansion. */ - val isUserInteractingWithShade: Flow<Boolean> = - if (sceneContainerFlags.isEnabled()) { - sceneBasedInteracting(sceneInteractorProvider.get(), SceneKey.Shade) - } else { - combine( - userInteractingFlow( - repository.legacyShadeTracking, - repository.legacyShadeExpansion - ), - repository.legacyLockscreenShadeTracking - ) { legacyShadeTracking, legacyLockscreenShadeTracking -> - legacyShadeTracking || legacyLockscreenShadeTracking - } - } + val qsExpansion: StateFlow<Float> + + /** Whether Quick Settings is expanded a non-zero amount. */ + val isQsExpanded: StateFlow<Boolean> /** - * Whether the user is expanding or collapsing quick settings with user input. This will be true - * even if the user's input gesture has ended but a transition they initiated is still - * animating. + * Emits true whenever Quick Settings is being expanded without first expanding the Shade or if + * if Quick Settings is being collapsed without first collapsing to shade, i.e. expanding with + * 2-finger swipe or collapsing by flinging from the bottom of the screen. This concept was + * previously called "expand immediate" in the legacy codebase. */ - val isUserInteractingWithQs: Flow<Boolean> = - if (sceneContainerFlags.isEnabled()) { - sceneBasedInteracting(sceneInteractorProvider.get(), SceneKey.QuickSettings) - } else { - userInteractingFlow(repository.legacyQsTracking, repository.qsExpansion) - } + val isQsBypassingShade: Flow<Boolean> /** - * Whether the user is expanding or collapsing either the shade or quick settings with user - * input (i.e. dragging a pointer). This will be true even if the user's input gesture had ended - * but a transition they initiated is still animating. + * Emits true when QS is displayed over the entire screen of the device. Currently, this only + * happens on phones that are not unfolded when QS expansion is equal to 1. */ - val isUserInteracting: Flow<Boolean> = - combine(isUserInteractingWithShade, isUserInteractingWithQs) { shade, qs -> shade || qs } - .distinctUntilChanged() - - /** Are touches allowed on the notification panel? */ - val isShadeTouchable: Flow<Boolean> = - combine( - powerInteractor.isAsleep, - keyguardTransitionInteractor.isInTransitionToStateWhere { it == KeyguardState.AOD }, - keyguardRepository.dozeTransitionModel.map { it.to == DozeStateModel.DOZE_PULSING }, - deviceProvisioningRepository.isFactoryResetProtectionActive, - ) { isAsleep, goingToSleep, isPulsing, isFrpActive -> - when { - // Touches are disabled when Factory Reset Protection is active - isFrpActive -> false - // If the device is going to sleep, only accept touches if we're still - // animating - goingToSleep -> dozeParams.shouldControlScreenOff() - // If the device is asleep, only accept touches if there's a pulse - isAsleep -> isPulsing - else -> true - } - } - - /** Emits true if the shade can be expanded from QQS to QS and false otherwise. */ - val isExpandToQsEnabled: Flow<Boolean> = - combine( - disableFlagsRepository.disableFlags, - isShadeEnabled, - keyguardRepository.isDozing, - userSetupRepository.isUserSetupFlow, - deviceProvisioningRepository.isDeviceProvisioned, - ) { disableFlags, isShadeEnabled, isDozing, isUserSetup, isDeviceProvisioned -> - isDeviceProvisioned && - // Disallow QS during setup if it's a simple user switcher. (The user intends to - // use the lock screen user switcher, QS is not needed.) - (isUserSetup || !userSwitcherInteractor.isSimpleUserSwitcher) && - isShadeEnabled && - disableFlags.isQuickSettingsEnabled() && - !isDozing - } + val isQsFullscreen: Flow<Boolean> - fun sceneBasedExpansion(sceneInteractor: SceneInteractor, sceneKey: SceneKey) = - sceneInteractor.transitionState - .flatMapLatest { state -> - when (state) { - is ObservableTransitionState.Idle -> - if (state.scene == sceneKey) { - flowOf(1f) - } else { - flowOf(0f) - } - is ObservableTransitionState.Transition -> - if (state.toScene == sceneKey) { - state.progress - } else if (state.fromScene == sceneKey) { - state.progress.map { progress -> 1 - progress } - } else { - flowOf(0f) - } - } - } - .distinctUntilChanged() - - fun sceneBasedInteracting(sceneInteractor: SceneInteractor, sceneKey: SceneKey) = - sceneInteractor.transitionState - .map { state -> - when (state) { - is ObservableTransitionState.Idle -> false - is ObservableTransitionState.Transition -> - state.isInitiatedByUserInput && - (state.toScene == sceneKey || state.fromScene == sceneKey) - } - } - .distinctUntilChanged() + /** + * Whether the user is expanding or collapsing the shade with user input. This will be true even + * if the user's input gesture has ended but a transition they initiated is animating. + */ + val isUserInteractingWithShade: Flow<Boolean> /** - * Return a flow for whether a user is interacting with an expandable shade component using - * tracking and expansion flows. NOTE: expansion must be a `StateFlow` to guarantee that - * [expansion.first] checks the current value of the flow. + * Whether the user is expanding or collapsing quick settings with user input. This will be true + * even if the user's input gesture has ended but a transition they initiated is still + * animating. */ - private fun userInteractingFlow( - tracking: Flow<Boolean>, - expansion: StateFlow<Float> - ): Flow<Boolean> { - return flow { - // initial value is false - emit(false) - while (currentCoroutineContext().isActive) { - // wait for tracking to become true - tracking.first { it } - emit(true) - // wait for tracking to become false - tracking.first { !it } - // wait for expansion to complete in either direction - expansion.first { it <= 0f || it >= 1f } - // interaction complete - emit(false) - } - } - } + val isUserInteractingWithQs: Flow<Boolean> +} + +fun createAnyExpansionFlow( + scope: CoroutineScope, + shadeExpansion: Flow<Float>, + qsExpansion: Flow<Float> +): StateFlow<Float> { + return combine(shadeExpansion, qsExpansion) { shadeExp, qsExp -> maxOf(shadeExp, qsExp) } + .stateIn(scope, SharingStarted.Eagerly, 0f) } diff --git a/packages/SystemUI/src/com/android/systemui/shade/domain/interactor/ShadeInteractorEmptyImpl.kt b/packages/SystemUI/src/com/android/systemui/shade/domain/interactor/ShadeInteractorEmptyImpl.kt new file mode 100644 index 000000000000..d41c5a66ad82 --- /dev/null +++ b/packages/SystemUI/src/com/android/systemui/shade/domain/interactor/ShadeInteractorEmptyImpl.kt @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License + */ + +package com.android.systemui.shade.domain.interactor + +import com.android.systemui.dagger.SysUISingleton +import javax.inject.Inject +import kotlinx.coroutines.flow.Flow +import kotlinx.coroutines.flow.MutableStateFlow +import kotlinx.coroutines.flow.StateFlow + +/** Empty implementation of ShadeInteractor for System UI variants with no shade. */ +@SysUISingleton +class ShadeInteractorEmptyImpl @Inject constructor() : ShadeInteractor { + private val inactiveFlowBoolean = MutableStateFlow(false) + private val inactiveFlowFloat = MutableStateFlow(0f) + override val isShadeEnabled: StateFlow<Boolean> = inactiveFlowBoolean + override val shadeExpansion: Flow<Float> = inactiveFlowFloat + override val qsExpansion: StateFlow<Float> = inactiveFlowFloat + override val isQsExpanded: StateFlow<Boolean> = inactiveFlowBoolean + override val isQsBypassingShade: Flow<Boolean> = inactiveFlowBoolean + override val isQsFullscreen: Flow<Boolean> = inactiveFlowBoolean + override val anyExpansion: StateFlow<Float> = inactiveFlowFloat + override val isAnyFullyExpanded: Flow<Boolean> = inactiveFlowBoolean + override val isShadeFullyExpanded: Flow<Boolean> = inactiveFlowBoolean + override val isAnyExpanded: StateFlow<Boolean> = inactiveFlowBoolean + override val isUserInteractingWithShade: Flow<Boolean> = inactiveFlowBoolean + override val isUserInteractingWithQs: Flow<Boolean> = inactiveFlowBoolean + override val isUserInteracting: Flow<Boolean> = inactiveFlowBoolean + override val isShadeTouchable: Flow<Boolean> = inactiveFlowBoolean + override val isExpandToQsEnabled: Flow<Boolean> = inactiveFlowBoolean +} diff --git a/packages/SystemUI/src/com/android/systemui/shade/domain/interactor/ShadeInteractorImpl.kt b/packages/SystemUI/src/com/android/systemui/shade/domain/interactor/ShadeInteractorImpl.kt new file mode 100644 index 000000000000..68600e9d6918 --- /dev/null +++ b/packages/SystemUI/src/com/android/systemui/shade/domain/interactor/ShadeInteractorImpl.kt @@ -0,0 +1,107 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License + */ + +package com.android.systemui.shade.domain.interactor + +import com.android.systemui.dagger.SysUISingleton +import com.android.systemui.dagger.qualifiers.Application +import com.android.systemui.keyguard.data.repository.KeyguardRepository +import com.android.systemui.keyguard.domain.interactor.KeyguardTransitionInteractor +import com.android.systemui.keyguard.shared.model.DozeStateModel +import com.android.systemui.keyguard.shared.model.KeyguardState +import com.android.systemui.power.domain.interactor.PowerInteractor +import com.android.systemui.statusbar.disableflags.data.repository.DisableFlagsRepository +import com.android.systemui.statusbar.phone.DozeParameters +import com.android.systemui.statusbar.pipeline.mobile.data.repository.UserSetupRepository +import com.android.systemui.statusbar.policy.data.repository.DeviceProvisioningRepository +import com.android.systemui.user.domain.interactor.UserSwitcherInteractor +import javax.inject.Inject +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.flow.Flow +import kotlinx.coroutines.flow.SharingStarted +import kotlinx.coroutines.flow.StateFlow +import kotlinx.coroutines.flow.combine +import kotlinx.coroutines.flow.distinctUntilChanged +import kotlinx.coroutines.flow.map +import kotlinx.coroutines.flow.stateIn + +/** The non-empty SceneInteractor implementation. */ +@SysUISingleton +class ShadeInteractorImpl +@Inject +constructor( + @Application val scope: CoroutineScope, + deviceProvisioningRepository: DeviceProvisioningRepository, + disableFlagsRepository: DisableFlagsRepository, + dozeParams: DozeParameters, + keyguardRepository: KeyguardRepository, + keyguardTransitionInteractor: KeyguardTransitionInteractor, + powerInteractor: PowerInteractor, + userSetupRepository: UserSetupRepository, + userSwitcherInteractor: UserSwitcherInteractor, + private val baseShadeInteractor: BaseShadeInteractor, +) : ShadeInteractor, BaseShadeInteractor by baseShadeInteractor { + override val isShadeEnabled: StateFlow<Boolean> = + disableFlagsRepository.disableFlags + .map { it.isShadeEnabled() } + .stateIn(scope, SharingStarted.Eagerly, initialValue = false) + + override val isAnyFullyExpanded: Flow<Boolean> = + anyExpansion.map { it >= 1f }.distinctUntilChanged() + + override val isShadeFullyExpanded: Flow<Boolean> = + baseShadeInteractor.shadeExpansion.map { it >= 1f }.distinctUntilChanged() + + override val isUserInteracting: Flow<Boolean> = + combine(isUserInteractingWithShade, isUserInteractingWithQs) { shade, qs -> shade || qs } + .distinctUntilChanged() + + override val isShadeTouchable: Flow<Boolean> = + combine( + powerInteractor.isAsleep, + keyguardTransitionInteractor.isInTransitionToStateWhere { it == KeyguardState.AOD }, + keyguardRepository.dozeTransitionModel.map { it.to == DozeStateModel.DOZE_PULSING }, + deviceProvisioningRepository.isFactoryResetProtectionActive, + ) { isAsleep, goingToSleep, isPulsing, isFrpActive -> + when { + // Touches are disabled when Factory Reset Protection is active + isFrpActive -> false + // If the device is going to sleep, only accept touches if we're still + // animating + goingToSleep -> dozeParams.shouldControlScreenOff() + // If the device is asleep, only accept touches if there's a pulse + isAsleep -> isPulsing + else -> true + } + } + + override val isExpandToQsEnabled: Flow<Boolean> = + combine( + disableFlagsRepository.disableFlags, + isShadeEnabled, + keyguardRepository.isDozing, + userSetupRepository.isUserSetupFlow, + deviceProvisioningRepository.isDeviceProvisioned, + ) { disableFlags, isShadeEnabled, isDozing, isUserSetup, isDeviceProvisioned -> + isDeviceProvisioned && + // Disallow QS during setup if it's a simple user switcher. (The user intends to + // use the lock screen user switcher, QS is not needed.) + (isUserSetup || !userSwitcherInteractor.isSimpleUserSwitcher) && + isShadeEnabled && + disableFlags.isQuickSettingsEnabled() && + !isDozing + } +} diff --git a/packages/SystemUI/src/com/android/systemui/shade/domain/interactor/ShadeInteractorLegacyImpl.kt b/packages/SystemUI/src/com/android/systemui/shade/domain/interactor/ShadeInteractorLegacyImpl.kt new file mode 100644 index 000000000000..2ac3193d1e8d --- /dev/null +++ b/packages/SystemUI/src/com/android/systemui/shade/domain/interactor/ShadeInteractorLegacyImpl.kt @@ -0,0 +1,127 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License + */ + +package com.android.systemui.shade.domain.interactor + +import com.android.systemui.dagger.SysUISingleton +import com.android.systemui.dagger.qualifiers.Application +import com.android.systemui.keyguard.data.repository.KeyguardRepository +import com.android.systemui.keyguard.shared.model.StatusBarState +import com.android.systemui.shade.data.repository.ShadeRepository +import com.android.systemui.statusbar.notification.stack.domain.interactor.SharedNotificationContainerInteractor +import javax.inject.Inject +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.currentCoroutineContext +import kotlinx.coroutines.flow.Flow +import kotlinx.coroutines.flow.SharingStarted +import kotlinx.coroutines.flow.StateFlow +import kotlinx.coroutines.flow.combine +import kotlinx.coroutines.flow.distinctUntilChanged +import kotlinx.coroutines.flow.first +import kotlinx.coroutines.flow.flow +import kotlinx.coroutines.flow.stateIn +import kotlinx.coroutines.isActive + +/** ShadeInteractor implementation for the legacy codebase, e.g. NPVC. */ +@SysUISingleton +class ShadeInteractorLegacyImpl +@Inject +constructor( + @Application val scope: CoroutineScope, + keyguardRepository: KeyguardRepository, + sharedNotificationContainerInteractor: SharedNotificationContainerInteractor, + repository: ShadeRepository, +) : BaseShadeInteractor { + /** The amount [0-1] that the shade has been opened */ + override val shadeExpansion: Flow<Float> = + combine( + repository.lockscreenShadeExpansion, + keyguardRepository.statusBarState, + repository.legacyShadeExpansion, + repository.qsExpansion, + sharedNotificationContainerInteractor.isSplitShadeEnabled + ) { + lockscreenShadeExpansion, + statusBarState, + legacyShadeExpansion, + qsExpansion, + splitShadeEnabled -> + when (statusBarState) { + // legacyShadeExpansion is 1 instead of 0 when QS is expanded + StatusBarState.SHADE -> + if (!splitShadeEnabled && qsExpansion > 0f) 0f else legacyShadeExpansion + StatusBarState.KEYGUARD -> lockscreenShadeExpansion + // dragDownAmount, which drives lockscreenShadeExpansion resets to 0f when + // the pointer is lifted and the lockscreen shade is fully expanded + StatusBarState.SHADE_LOCKED -> 1f + } + } + .distinctUntilChanged() + + override val qsExpansion: StateFlow<Float> = repository.qsExpansion + + override val isQsExpanded: StateFlow<Boolean> = repository.legacyIsQsExpanded + + override val isQsBypassingShade: Flow<Boolean> = repository.legacyExpandImmediate + override val isQsFullscreen: Flow<Boolean> = repository.legacyQsFullscreen + + override val anyExpansion: StateFlow<Float> = + createAnyExpansionFlow(scope, shadeExpansion, qsExpansion) + + override val isAnyExpanded = + repository.legacyExpandedOrAwaitingInputTransfer.stateIn( + scope, + SharingStarted.Eagerly, + false + ) + + override val isUserInteractingWithShade: Flow<Boolean> = + combine( + userInteractingFlow(repository.legacyShadeTracking, repository.legacyShadeExpansion), + repository.legacyLockscreenShadeTracking + ) { legacyShadeTracking, legacyLockscreenShadeTracking -> + legacyShadeTracking || legacyLockscreenShadeTracking + } + + override val isUserInteractingWithQs: Flow<Boolean> = + userInteractingFlow(repository.legacyQsTracking, repository.qsExpansion) + + /** + * Return a flow for whether a user is interacting with an expandable shade component using + * tracking and expansion flows. NOTE: expansion must be a `StateFlow` to guarantee that + * [expansion.first] checks the current value of the flow. + */ + private fun userInteractingFlow( + tracking: Flow<Boolean>, + expansion: StateFlow<Float> + ): Flow<Boolean> { + return flow { + // initial value is false + emit(false) + while (currentCoroutineContext().isActive) { + // wait for tracking to become true + tracking.first { it } + emit(true) + // wait for tracking to become false + tracking.first { !it } + // wait for expansion to complete in either direction + expansion.first { it <= 0f || it >= 1f } + // interaction complete + emit(false) + } + } + } +} diff --git a/packages/SystemUI/src/com/android/systemui/shade/domain/interactor/ShadeInteractorSceneContainerImpl.kt b/packages/SystemUI/src/com/android/systemui/shade/domain/interactor/ShadeInteractorSceneContainerImpl.kt new file mode 100644 index 000000000000..7cff8ea7abd2 --- /dev/null +++ b/packages/SystemUI/src/com/android/systemui/shade/domain/interactor/ShadeInteractorSceneContainerImpl.kt @@ -0,0 +1,152 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License + */ + +package com.android.systemui.shade.domain.interactor + +import com.android.systemui.dagger.SysUISingleton +import com.android.systemui.dagger.qualifiers.Application +import com.android.systemui.scene.domain.interactor.SceneInteractor +import com.android.systemui.scene.shared.model.ObservableTransitionState +import com.android.systemui.scene.shared.model.SceneKey +import com.android.systemui.statusbar.notification.stack.domain.interactor.SharedNotificationContainerInteractor +import javax.inject.Inject +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.ExperimentalCoroutinesApi +import kotlinx.coroutines.flow.Flow +import kotlinx.coroutines.flow.SharingStarted +import kotlinx.coroutines.flow.StateFlow +import kotlinx.coroutines.flow.combine +import kotlinx.coroutines.flow.distinctUntilChanged +import kotlinx.coroutines.flow.flatMapLatest +import kotlinx.coroutines.flow.flowOf +import kotlinx.coroutines.flow.map +import kotlinx.coroutines.flow.stateIn + +/** ShadeInteractor implementation for Scene Container. */ +@OptIn(ExperimentalCoroutinesApi::class) +@SysUISingleton +class ShadeInteractorSceneContainerImpl +@Inject +constructor( + @Application scope: CoroutineScope, + sceneInteractor: SceneInteractor, + sharedNotificationContainerInteractor: SharedNotificationContainerInteractor, +) : BaseShadeInteractor { + override val shadeExpansion: Flow<Float> = sceneBasedExpansion(sceneInteractor, SceneKey.Shade) + + private val sceneBasedQsExpansion = sceneBasedExpansion(sceneInteractor, SceneKey.QuickSettings) + + override val qsExpansion: StateFlow<Float> = + combine( + sharedNotificationContainerInteractor.isSplitShadeEnabled, + shadeExpansion, + sceneBasedQsExpansion, + ) { isSplitShadeEnabled, shadeExpansion, qsExpansion -> + if (isSplitShadeEnabled) { + shadeExpansion + } else { + qsExpansion + } + } + .stateIn(scope, SharingStarted.Eagerly, 0f) + + override val isQsExpanded: StateFlow<Boolean> = + qsExpansion + .map { it > 0 } + .distinctUntilChanged() + .stateIn(scope, SharingStarted.Eagerly, false) + + override val isQsBypassingShade: Flow<Boolean> = + sceneInteractor.transitionState + .flatMapLatest { state -> + when (state) { + is ObservableTransitionState.Idle -> flowOf(false) + is ObservableTransitionState.Transition -> + flowOf( + state.toScene == SceneKey.QuickSettings && + state.fromScene != SceneKey.Shade + ) + } + } + .distinctUntilChanged() + + override val isQsFullscreen: Flow<Boolean> = + sceneInteractor.transitionState + .map { state -> + when (state) { + is ObservableTransitionState.Idle -> state.scene == SceneKey.QuickSettings + is ObservableTransitionState.Transition -> false + } + } + .distinctUntilChanged() + + override val anyExpansion: StateFlow<Float> = + createAnyExpansionFlow(scope, shadeExpansion, qsExpansion) + + override val isAnyExpanded = + anyExpansion + .map { it > 0f } + .distinctUntilChanged() + .stateIn(scope, SharingStarted.Eagerly, false) + + override val isUserInteractingWithShade: Flow<Boolean> = + sceneBasedInteracting(sceneInteractor, SceneKey.Shade) + + override val isUserInteractingWithQs: Flow<Boolean> = + sceneBasedInteracting(sceneInteractor, SceneKey.QuickSettings) + + /** + * Returns a flow that uses scene transition progress to and from a scene that is pulled down + * from the top of the screen to a 0-1 expansion amount float. + */ + internal fun sceneBasedExpansion(sceneInteractor: SceneInteractor, sceneKey: SceneKey) = + sceneInteractor.transitionState + .flatMapLatest { state -> + when (state) { + is ObservableTransitionState.Idle -> + if (state.scene == sceneKey) { + flowOf(1f) + } else { + flowOf(0f) + } + is ObservableTransitionState.Transition -> + if (state.toScene == sceneKey) { + state.progress + } else if (state.fromScene == sceneKey) { + state.progress.map { progress -> 1 - progress } + } else { + flowOf(0f) + } + } + } + .distinctUntilChanged() + + /** + * Returns a flow that uses scene transition data to determine whether the user is interacting + * with a scene that is pulled down from the top of the screen. + */ + internal fun sceneBasedInteracting(sceneInteractor: SceneInteractor, sceneKey: SceneKey) = + sceneInteractor.transitionState + .map { state -> + when (state) { + is ObservableTransitionState.Idle -> false + is ObservableTransitionState.Transition -> + state.isInitiatedByUserInput && + (state.toScene == sceneKey || state.fromScene == sceneKey) + } + } + .distinctUntilChanged() +} diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java b/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java index c2863fb2c330..d88fab0deaa3 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java @@ -75,14 +75,14 @@ import com.android.systemui.statusbar.CommandQueue.Callbacks; import com.android.systemui.statusbar.commandline.CommandRegistry; import com.android.systemui.statusbar.policy.CallbackController; +import dagger.Lazy; + import java.io.FileDescriptor; import java.io.FileOutputStream; import java.io.OutputStream; import java.io.PrintWriter; import java.util.ArrayList; -import dagger.Lazy; - /** * This class takes the functions from IStatusBar that come in on * binder pool threads and posts messages to get them onto the main @@ -424,7 +424,7 @@ public class CommandQueue extends IStatusBar.Stub implements default void onTracingStateChanged(boolean enabled) { } /** - * Requests {@link com.android.systemui.accessibility.WindowMagnification} to invoke + * Requests {@link com.android.systemui.accessibility.Magnification} to invoke * {@code android.view.accessibility.AccessibilityManager# * setWindowMagnificationConnection(IWindowMagnificationConnection)} * diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/KeyboardShortcutListSearch.java b/packages/SystemUI/src/com/android/systemui/statusbar/KeyboardShortcutListSearch.java index 68c48b9a261f..4a5089770b05 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/KeyboardShortcutListSearch.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/KeyboardShortcutListSearch.java @@ -60,6 +60,7 @@ import android.view.accessibility.AccessibilityNodeInfo; import android.widget.Button; import android.widget.EditText; import android.widget.FrameLayout; +import android.widget.ImageButton; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.RelativeLayout; @@ -114,7 +115,6 @@ public final class KeyboardShortcutListSearch { private Button mButtonInput; private Button mButtonOpenApps; private Button mButtonSpecificApp; - private ImageView mEditTextCancel; private TextView mNoSearchResults; private final SparseArray<String> mSpecialCharacterNames = new SparseArray<>(); @@ -895,8 +895,9 @@ public final class KeyboardShortcutListSearch { // Do nothing. } }); - mEditTextCancel = keyboardShortcutsView.findViewById(R.id.keyboard_shortcuts_search_cancel); - mEditTextCancel.setOnClickListener(v -> mSearchEditText.setText(null)); + ImageButton editTextCancel = keyboardShortcutsView.findViewById( + R.id.keyboard_shortcuts_search_cancel); + editTextCancel.setOnClickListener(v -> mSearchEditText.setText(null)); } private void populateKeyboardShortcutSearchList(LinearLayout keyboardShortcutsLayout) { @@ -1276,12 +1277,12 @@ public final class KeyboardShortcutListSearch { private int getColorOfTextColorOnAccent() { return Utils.getColorAttrDefaultColor( - mContext, com.android.internal.R.attr.textColorOnAccent); + mContext, com.android.internal.R.attr.materialColorOnPrimary); } private int getColorOfTextColorSecondary() { return Utils.getColorAttrDefaultColor( - mContext, com.android.internal.R.attr.textColorSecondary); + mContext, com.android.internal.R.attr.materialColorOnSurface); } // Create the new data structure for handling the N-to-1 key mapping and other complex case. diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/LightRevealScrim.kt b/packages/SystemUI/src/com/android/systemui/statusbar/LightRevealScrim.kt index 3120128c7967..39b7930ed386 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/LightRevealScrim.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/LightRevealScrim.kt @@ -18,6 +18,7 @@ import android.view.MotionEvent import android.view.View import android.view.animation.PathInterpolator import com.android.app.animation.Interpolators +import com.android.keyguard.logging.ScrimLogger import com.android.systemui.shade.TouchLogger import com.android.systemui.statusbar.LightRevealEffect.Companion.getPercentPastThreshold import com.android.systemui.util.getColorWithAlpha @@ -89,7 +90,7 @@ object LiftReveal : LightRevealEffect { } } -class LinearLightRevealEffect(private val isVertical: Boolean) : LightRevealEffect { +data class LinearLightRevealEffect(private val isVertical: Boolean) : LightRevealEffect { // Interpolator that reveals >80% of the content at 0.5 progress, makes revealing faster private val interpolator = @@ -155,7 +156,7 @@ class LinearLightRevealEffect(private val isVertical: Boolean) : LightRevealEffe } } -class CircleReveal( +data class CircleReveal( /** X-value of the circle center of the reveal. */ val centerX: Int, /** Y-value of the circle center of the reveal. */ @@ -181,7 +182,7 @@ class CircleReveal( } } -class PowerButtonReveal( +data class PowerButtonReveal( /** Approximate Y-value of the center of the power button on the physical device. */ val powerButtonY: Float ) : LightRevealEffect { @@ -253,7 +254,9 @@ constructor( ) : View(context, attrs) { /** Listener that is called if the scrim's opaqueness changes */ - lateinit var isScrimOpaqueChangedListener: Consumer<Boolean> + var isScrimOpaqueChangedListener: Consumer<Boolean>? = null + + var scrimLogger: ScrimLogger? = null /** * How much of the underlying views are revealed, in percent. 0 means they will be completely @@ -263,7 +266,9 @@ constructor( set(value) { if (field != value) { field = value - + if (value <= 0.0f || value >= 1.0f) { + scrimLogger?.d(TAG, "revealAmount", "$value on ${logString()}") + } revealEffect.setRevealAmountOnScrim(value, this) updateScrimOpaque() Trace.traceCounter( @@ -285,6 +290,7 @@ constructor( field = value revealEffect.setRevealAmountOnScrim(revealAmount, this) + scrimLogger?.d(TAG, "revealEffect", "$value on ${logString()}") invalidate() } } @@ -301,6 +307,7 @@ constructor( */ internal var viewWidth: Int = initialWidth ?: 0 private set + internal var viewHeight: Int = initialHeight ?: 0 private set @@ -342,7 +349,8 @@ constructor( private set(value) { if (field != value) { field = value - isScrimOpaqueChangedListener.accept(field) + isScrimOpaqueChangedListener?.accept(field) + scrimLogger?.d(TAG, "isScrimOpaque", "$value on ${logString()}") } } @@ -360,11 +368,13 @@ constructor( override fun setAlpha(alpha: Float) { super.setAlpha(alpha) + scrimLogger?.d(TAG, "alpha", "$alpha on ${logString()}") updateScrimOpaque() } override fun setVisibility(visibility: Int) { super.setVisibility(visibility) + scrimLogger?.d(TAG, "visibility", "$visibility on ${logString()}") updateScrimOpaque() } @@ -424,11 +434,7 @@ constructor( } override fun onDraw(canvas: Canvas) { - if ( - revealGradientWidth <= 0 || - revealGradientHeight <= 0 || - revealAmount == 0f - ) { + if (revealGradientWidth <= 0 || revealGradientHeight <= 0 || revealAmount == 0f) { if (revealAmount < 1f) { canvas.drawColor(revealGradientEndColor) } @@ -461,4 +467,8 @@ constructor( PorterDuff.Mode.MULTIPLY ) } + + private fun logString(): String { + return this::class.simpleName!! + "@" + hashCode() + } } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/LockscreenShadeTransitionController.kt b/packages/SystemUI/src/com/android/systemui/statusbar/LockscreenShadeTransitionController.kt index 2e3f3f894687..ae765e40c790 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/LockscreenShadeTransitionController.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/LockscreenShadeTransitionController.kt @@ -21,7 +21,9 @@ import com.android.systemui.classifier.FalsingCollector import com.android.systemui.dagger.SysUISingleton import com.android.systemui.dump.DumpManager import com.android.systemui.keyguard.WakefulnessLifecycle +import com.android.systemui.keyguard.domain.interactor.NaturalScrollingSettingObserver import com.android.systemui.media.controls.ui.MediaHierarchyManager +import com.android.systemui.navigationbar.gestural.Utilities.isTrackpadScroll import com.android.systemui.plugins.ActivityStarter import com.android.systemui.plugins.ActivityStarter.OnDismissAction import com.android.systemui.plugins.FalsingManager @@ -78,7 +80,8 @@ constructor( private val shadeRepository: ShadeRepository, private val shadeInteractor: ShadeInteractor, private val powerInteractor: PowerInteractor, - private val splitShadeStateController: SplitShadeStateController + private val splitShadeStateController: SplitShadeStateController, + private val naturalScrollingSettingObserver: NaturalScrollingSettingObserver, ) : Dumpable { private var pulseHeight: Float = 0f @@ -157,7 +160,8 @@ constructor( var mUdfpsKeyguardViewControllerLegacy: UdfpsKeyguardViewControllerLegacy? = null /** The touch helper responsible for the drag down animation. */ - val touchHelper = DragDownHelper(falsingManager, falsingCollector, this, context) + val touchHelper = DragDownHelper(falsingManager, falsingCollector, this, + naturalScrollingSettingObserver, context) private val splitShadeOverScroller: SplitShadeLockScreenOverScroller by lazy { splitShadeOverScrollerFactory.create({ qS }, { nsslController }) @@ -751,6 +755,7 @@ class DragDownHelper( private val falsingManager: FalsingManager, private val falsingCollector: FalsingCollector, private val dragDownCallback: LockscreenShadeTransitionController, + private val naturalScrollingSettingObserver: NaturalScrollingSettingObserver, context: Context ) : Gefingerpoken { @@ -765,6 +770,7 @@ class DragDownHelper( private var draggedFarEnough = false private var startingChild: ExpandableView? = null private var lastHeight = 0f + private var isTrackpadReverseScroll = false var isDraggingDown = false private set @@ -802,9 +808,11 @@ class DragDownHelper( startingChild = null initialTouchY = y initialTouchX = x + isTrackpadReverseScroll = !naturalScrollingSettingObserver.isNaturalScrollingEnabled + && isTrackpadScroll(true, event) } MotionEvent.ACTION_MOVE -> { - val h = y - initialTouchY + val h = (if (isTrackpadReverseScroll) -1 else 1) * (y - initialTouchY) // Adjust the touch slop if another gesture may be being performed. val touchSlop = if (event.classification == MotionEvent.CLASSIFICATION_AMBIGUOUS_GESTURE) { @@ -834,7 +842,7 @@ class DragDownHelper( val y = event.y when (event.actionMasked) { MotionEvent.ACTION_MOVE -> { - lastHeight = y - initialTouchY + lastHeight = (if (isTrackpadReverseScroll) -1 else 1) * (y - initialTouchY) captureStartingChild(initialTouchX, initialTouchY) dragDownCallback.dragDownAmount = lastHeight + dragDownAmountOnStart if (startingChild != null) { @@ -859,12 +867,14 @@ class DragDownHelper( !isFalseTouch && dragDownCallback.canDragDown() ) { - dragDownCallback.onDraggedDown(startingChild, (y - initialTouchY).toInt()) + val dragDown = (if (isTrackpadReverseScroll) -1 else 1) * (y - initialTouchY) + dragDownCallback.onDraggedDown(startingChild, dragDown.toInt()) if (startingChild != null) { expandCallback.setUserLockedChild(startingChild, false) startingChild = null } isDraggingDown = false + isTrackpadReverseScroll = false } else { stopDragging() return false @@ -943,6 +953,7 @@ class DragDownHelper( startingChild = null } isDraggingDown = false + isTrackpadReverseScroll = false dragDownCallback.onDragDownReset() } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java index 748ad928a695..4d373353d7a3 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java @@ -229,7 +229,9 @@ public class NotificationShelf extends ActivatableNotificationView { } else { viewState.setAlpha(1f - ambientState.getHideAmount()); } - viewState.belowSpeedBump = getSpeedBumpIndex() == 0; + if (!NotificationIconContainerRefactor.isEnabled()) { + viewState.belowSpeedBump = getSpeedBumpIndex() == 0; + } viewState.hideSensitive = false; viewState.setXTranslation(getTranslationX()); viewState.hasItemsInStableShelf = lastViewState.inShelf; diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/icon/ui/viewbinder/NotificationIconContainerViewBinder.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/icon/ui/viewbinder/NotificationIconContainerViewBinder.kt index a85c440af688..b1e52afd3d8d 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/icon/ui/viewbinder/NotificationIconContainerViewBinder.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/icon/ui/viewbinder/NotificationIconContainerViewBinder.kt @@ -244,7 +244,7 @@ object NotificationIconContainerViewBinder { } // Add and bind. - val toAdd: Sequence<String> = iconsDiff.added.asSequence() + failedBindings + val toAdd: Sequence<String> = iconsDiff.added.asSequence() + failedBindings.toList() for ((idx, notifKey) in toAdd.withIndex()) { // Lookup the StatusBarIconView from the store. val sbiv = viewStore.iconView(notifKey) @@ -252,6 +252,7 @@ object NotificationIconContainerViewBinder { failedBindings.add(notifKey) continue } + failedBindings.remove(notifKey) // The view might still be transiently added if it was just removed and added // again view.removeTransientView(sbiv) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/interruption/CommonVisualInterruptionSuppressors.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/interruption/CommonVisualInterruptionSuppressors.kt index 9ff416a02ee6..9f2b0a6bfc1f 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/interruption/CommonVisualInterruptionSuppressors.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/interruption/CommonVisualInterruptionSuppressors.kt @@ -32,6 +32,7 @@ import com.android.systemui.settings.UserTracker import com.android.systemui.statusbar.StatusBarState.SHADE import com.android.systemui.statusbar.notification.collection.NotificationEntry import com.android.systemui.statusbar.notification.interruption.NotificationInterruptStateProviderImpl.MAX_HUN_WHEN_AGE_MS +import com.android.systemui.statusbar.notification.interruption.NotificationInterruptStateProviderImpl.NotificationInterruptEvent.HUN_SUPPRESSED_OLD_WHEN import com.android.systemui.statusbar.notification.interruption.VisualInterruptionType.BUBBLE import com.android.systemui.statusbar.notification.interruption.VisualInterruptionType.PEEK import com.android.systemui.statusbar.notification.interruption.VisualInterruptionType.PULSE @@ -141,7 +142,11 @@ class PeekDeviceNotInUseSuppressor( } class PeekOldWhenSuppressor(private val systemClock: SystemClock) : - VisualInterruptionFilter(types = setOf(PEEK), reason = "has old `when`") { + VisualInterruptionFilter( + types = setOf(PEEK), + reason = "has old `when`", + uiEventId = HUN_SUPPRESSED_OLD_WHEN + ) { private fun whenAge(entry: NotificationEntry) = systemClock.currentTimeMillis() - entry.sbn.notification.`when` diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/interruption/FullScreenIntentDecisionProvider.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/interruption/FullScreenIntentDecisionProvider.kt index b44a36724bdb..2707ed83b74e 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/interruption/FullScreenIntentDecisionProvider.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/interruption/FullScreenIntentDecisionProvider.kt @@ -18,6 +18,7 @@ package com.android.systemui.statusbar.notification.interruption import android.app.NotificationManager.IMPORTANCE_HIGH import android.os.PowerManager +import com.android.internal.logging.UiEventLogger.UiEventEnum import com.android.systemui.plugins.statusbar.StatusBarStateController import com.android.systemui.statusbar.StatusBarState.KEYGUARD import com.android.systemui.statusbar.notification.collection.NotificationEntry @@ -37,6 +38,10 @@ import com.android.systemui.statusbar.notification.interruption.FullScreenIntent import com.android.systemui.statusbar.notification.interruption.FullScreenIntentDecisionProvider.DecisionImpl.NO_FSI_SUPPRESSED_ONLY_BY_DND import com.android.systemui.statusbar.notification.interruption.FullScreenIntentDecisionProvider.DecisionImpl.NO_FSI_SUPPRESSIVE_BUBBLE_METADATA import com.android.systemui.statusbar.notification.interruption.FullScreenIntentDecisionProvider.DecisionImpl.NO_FSI_SUPPRESSIVE_GROUP_ALERT_BEHAVIOR +import com.android.systemui.statusbar.notification.interruption.NotificationInterruptStateProviderImpl.NotificationInterruptEvent.FSI_SUPPRESSED_NO_HUN_OR_KEYGUARD +import com.android.systemui.statusbar.notification.interruption.NotificationInterruptStateProviderImpl.NotificationInterruptEvent.FSI_SUPPRESSED_SUPPRESSIVE_BUBBLE_METADATA +import com.android.systemui.statusbar.notification.interruption.NotificationInterruptStateProviderImpl.NotificationInterruptEvent.FSI_SUPPRESSED_SUPPRESSIVE_GROUP_ALERT_BEHAVIOR +import com.android.systemui.statusbar.notification.interruption.VisualInterruptionSuppressor.EventLogData import com.android.systemui.statusbar.policy.DeviceProvisionedController import com.android.systemui.statusbar.policy.KeyguardStateController @@ -52,6 +57,8 @@ class FullScreenIntentDecisionProvider( val logReason: String val shouldLog: Boolean val isWarning: Boolean + val uiEventId: UiEventEnum? + val eventLogData: EventLogData? } private enum class DecisionImpl( @@ -60,7 +67,9 @@ class FullScreenIntentDecisionProvider( override val wouldFsiWithoutDnd: Boolean = shouldFsi, val supersedesDnd: Boolean = false, override val shouldLog: Boolean = true, - override val isWarning: Boolean = false + override val isWarning: Boolean = false, + override val uiEventId: UiEventEnum? = null, + override val eventLogData: EventLogData? = null ) : Decision { NO_FSI_NO_FULL_SCREEN_INTENT( false, @@ -73,9 +82,17 @@ class FullScreenIntentDecisionProvider( NO_FSI_SUPPRESSIVE_GROUP_ALERT_BEHAVIOR( false, "suppressive group alert behavior", - isWarning = true + isWarning = true, + uiEventId = FSI_SUPPRESSED_SUPPRESSIVE_GROUP_ALERT_BEHAVIOR, + eventLogData = EventLogData("231322873", "groupAlertBehavior") + ), + NO_FSI_SUPPRESSIVE_BUBBLE_METADATA( + false, + "suppressive bubble metadata", + isWarning = true, + uiEventId = FSI_SUPPRESSED_SUPPRESSIVE_BUBBLE_METADATA, + eventLogData = EventLogData("274759612", "bubbleMetadata") ), - NO_FSI_SUPPRESSIVE_BUBBLE_METADATA(false, "suppressive bubble metadata", isWarning = true), NO_FSI_PACKAGE_SUSPENDED(false, "package suspended"), FSI_DEVICE_NOT_INTERACTIVE(true, "device is not interactive"), FSI_DEVICE_DREAMING(true, "device is dreaming"), @@ -84,7 +101,13 @@ class FullScreenIntentDecisionProvider( FSI_KEYGUARD_OCCLUDED(true, "keyguard is occluded"), FSI_LOCKED_SHADE(true, "locked shade"), FSI_DEVICE_NOT_PROVISIONED(true, "device not provisioned"), - NO_FSI_NO_HUN_OR_KEYGUARD(false, "no HUN or keyguard", isWarning = true), + NO_FSI_NO_HUN_OR_KEYGUARD( + false, + "no HUN or keyguard", + isWarning = true, + uiEventId = FSI_SUPPRESSED_NO_HUN_OR_KEYGUARD, + eventLogData = EventLogData("231322873", "no hun or keyguard") + ), NO_FSI_SUPPRESSED_BY_DND(false, "suppressed by DND", wouldFsiWithoutDnd = false), NO_FSI_SUPPRESSED_ONLY_BY_DND(false, "suppressed only by DND", wouldFsiWithoutDnd = true) } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/interruption/NotificationInterruptStateProviderImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/interruption/NotificationInterruptStateProviderImpl.java index f2ade340fc4f..40453800d17f 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/interruption/NotificationInterruptStateProviderImpl.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/interruption/NotificationInterruptStateProviderImpl.java @@ -49,6 +49,7 @@ import com.android.systemui.statusbar.policy.BatteryController; import com.android.systemui.statusbar.policy.DeviceProvisionedController; import com.android.systemui.statusbar.policy.HeadsUpManager; import com.android.systemui.statusbar.policy.KeyguardStateController; +import com.android.systemui.util.EventLog; import com.android.systemui.util.settings.GlobalSettings; import com.android.systemui.util.time.SystemClock; @@ -81,6 +82,7 @@ public class NotificationInterruptStateProviderImpl implements NotificationInter private final DeviceProvisionedController mDeviceProvisionedController; private final SystemClock mSystemClock; private final GlobalSettings mGlobalSettings; + private final EventLog mEventLog; @VisibleForTesting protected boolean mUseHeadsUp = false; @@ -129,7 +131,8 @@ public class NotificationInterruptStateProviderImpl implements NotificationInter UserTracker userTracker, DeviceProvisionedController deviceProvisionedController, SystemClock systemClock, - GlobalSettings globalSettings) { + GlobalSettings globalSettings, + EventLog eventLog) { mPowerManager = powerManager; mBatteryController = batteryController; mAmbientDisplayConfiguration = ambientDisplayConfiguration; @@ -144,6 +147,7 @@ public class NotificationInterruptStateProviderImpl implements NotificationInter mDeviceProvisionedController = deviceProvisionedController; mSystemClock = systemClock; mGlobalSettings = globalSettings; + mEventLog = eventLog; ContentObserver headsUpObserver = new ContentObserver(mainHandler) { @Override public void onChange(boolean selfChange) { @@ -369,7 +373,7 @@ public class NotificationInterruptStateProviderImpl implements NotificationInter // explicitly prevent logging for this (frequent) case return; case NO_FSI_SUPPRESSIVE_GROUP_ALERT_BEHAVIOR: - android.util.EventLog.writeEvent(0x534e4554, "231322873", uid, + mEventLog.writeEvent(0x534e4554, "231322873", uid, "groupAlertBehavior"); mUiEventLogger.log(FSI_SUPPRESSED_SUPPRESSIVE_GROUP_ALERT_BEHAVIOR, uid, packageName); @@ -377,7 +381,7 @@ public class NotificationInterruptStateProviderImpl implements NotificationInter decision + ": GroupAlertBehavior will prevent HUN"); return; case NO_FSI_SUPPRESSIVE_BUBBLE_METADATA: - android.util.EventLog.writeEvent(0x534e4554, "274759612", uid, + mEventLog.writeEvent(0x534e4554, "274759612", uid, "bubbleMetadata"); mUiEventLogger.log(FSI_SUPPRESSED_SUPPRESSIVE_BUBBLE_METADATA, uid, packageName); @@ -385,7 +389,7 @@ public class NotificationInterruptStateProviderImpl implements NotificationInter decision + ": BubbleMetadata may prevent HUN"); return; case NO_FSI_NO_HUN_OR_KEYGUARD: - android.util.EventLog.writeEvent(0x534e4554, "231322873", uid, + mEventLog.writeEvent(0x534e4554, "231322873", uid, "no hun or keyguard"); mUiEventLogger.log(FSI_SUPPRESSED_NO_HUN_OR_KEYGUARD, uid, packageName); mLogger.logNoFullscreenWarning(entry, diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/interruption/NotificationInterruptStateProviderWrapper.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/interruption/NotificationInterruptStateProviderWrapper.kt index d7f0baf4f002..f732e8d74675 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/interruption/NotificationInterruptStateProviderWrapper.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/interruption/NotificationInterruptStateProviderWrapper.kt @@ -17,6 +17,7 @@ package com.android.systemui.statusbar.notification.interruption import com.android.internal.annotations.VisibleForTesting import com.android.systemui.dagger.SysUISingleton +import com.android.systemui.flags.RefactorFlagUtils import com.android.systemui.statusbar.notification.collection.NotificationEntry import com.android.systemui.statusbar.notification.interruption.NotificationInterruptStateProvider.FullScreenIntentDecision.NO_FSI_SUPPRESSED_ONLY_BY_DND import com.android.systemui.statusbar.notification.interruption.VisualInterruptionDecisionProvider.Decision @@ -62,6 +63,21 @@ class NotificationInterruptStateProviderWrapper( wrapped.removeSuppressor(suppressor) } + override fun addCondition(condition: VisualInterruptionCondition) = notValidInLegacyMode() + + override fun removeCondition(condition: VisualInterruptionCondition) = notValidInLegacyMode() + + override fun addFilter(filter: VisualInterruptionFilter) = notValidInLegacyMode() + + override fun removeFilter(filter: VisualInterruptionFilter) = notValidInLegacyMode() + + private fun notValidInLegacyMode() { + RefactorFlagUtils.assertOnEngBuild( + "This method is only implemented in VisualInterruptionDecisionProviderImpl, " + + "and so should only be called when FLAG_VISUAL_INTERRUPTIONS_REFACTOR is enabled." + ) + } + override fun makeUnloggedHeadsUpDecision(entry: NotificationEntry): Decision = wrapped.checkHeadsUp(entry, /* log= */ false).let { DecisionImpl.of(it) } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/interruption/VisualInterruptionDecisionProvider.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/interruption/VisualInterruptionDecisionProvider.kt index da8474e92629..de8863c64873 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/interruption/VisualInterruptionDecisionProvider.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/interruption/VisualInterruptionDecisionProvider.kt @@ -16,6 +16,7 @@ package com.android.systemui.statusbar.notification.interruption +import com.android.internal.annotations.VisibleForTesting import com.android.systemui.statusbar.notification.collection.NotificationEntry /** @@ -51,33 +52,77 @@ interface VisualInterruptionDecisionProvider { val wouldInterruptWithoutDnd: Boolean } - /** - * Initializes the provider. - * - * Must be called before any method except [addLegacySuppressor]. - */ + /** Initializes the provider. */ fun start() {} /** - * Adds a [component][suppressor] that can suppress visual interruptions. + * Adds a [NotificationInterruptSuppressor] that can suppress visual interruptions. + * + * This method may be called before [start] has been called. * - * This class may call suppressors in any order. + * This class may call suppressors, conditions, and filters in any order. * * @param[suppressor] the suppressor to add */ fun addLegacySuppressor(suppressor: NotificationInterruptSuppressor) /** - * Removes a [component][suppressor] that can suppress visual interruptions. + * Removes a previously-added suppressor. + * + * This method may be called before [start] has been called. * * @param[suppressor] the suppressor to remove */ - fun removeLegacySuppressor(suppressor: NotificationInterruptSuppressor) + @VisibleForTesting fun removeLegacySuppressor(suppressor: NotificationInterruptSuppressor) + + /** + * Adds a [VisualInterruptionCondition] that can suppress visual interruptions without examining + * individual notifications. + * + * This method may be called before [start] has been called. + * + * This class may call suppressors, conditions, and filters in any order. + * + * @param[condition] the condition to add + */ + fun addCondition(condition: VisualInterruptionCondition) + + /** + * Removes a previously-added condition. + * + * This method may be called before [start] has been called. + * + * @param[condition] the condition to remove + */ + @VisibleForTesting fun removeCondition(condition: VisualInterruptionCondition) + + /** + * Adds a [VisualInterruptionFilter] that can suppress visual interruptions based on individual + * notifications. + * + * This method may be called before [start] has been called. + * + * This class may call suppressors, conditions, and filters in any order. + * + * @param[filter] the filter to add + */ + fun addFilter(filter: VisualInterruptionFilter) + + /** + * Removes a previously-added filter. + * + * This method may be called before [start] has been called. + * + * @param[filter] the filter to remove + */ + @VisibleForTesting fun removeFilter(filter: VisualInterruptionFilter) /** * Decides whether a [notification][entry] should display as heads-up or not, but does not log * that decision. * + * [start] must be called before this method can be called. + * * @param[entry] the notification that this decision is about * @return the decision to display that notification as heads-up or not */ @@ -93,6 +138,8 @@ interface VisualInterruptionDecisionProvider { * If the device is dozing, the decision will consider whether the notification should "pulse" * (wake the screen up and display the ambient view of the notification). * + * [start] must be called before this method can be called. + * * @see[makeUnloggedHeadsUpDecision] * * @param[entry] the notification that this decision is about @@ -106,6 +153,8 @@ interface VisualInterruptionDecisionProvider { * * The returned decision can be logged by passing it to [logFullScreenIntentDecision]. * + * [start] must be called before this method can be called. + * * @see[makeAndLogHeadsUpDecision] * * @param[entry] the notification that this decision is about @@ -116,6 +165,8 @@ interface VisualInterruptionDecisionProvider { /** * Logs a previous [decision] to launch a full-screen intent or not. * + * [start] must be called before this method can be called. + * * @param[decision] the decision to log */ fun logFullScreenIntentDecision(decision: FullScreenIntentDecision) @@ -123,6 +174,8 @@ interface VisualInterruptionDecisionProvider { /** * Decides whether a [notification][entry] should display as a bubble or not. * + * [start] must be called before this method can be called. + * * @param[entry] the notification that this decision is about * @return the decision to display that notification as a bubble or not */ diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/interruption/VisualInterruptionDecisionProviderImpl.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/interruption/VisualInterruptionDecisionProviderImpl.kt index c0a1a32b1401..2b6e1a168b3c 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/interruption/VisualInterruptionDecisionProviderImpl.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/interruption/VisualInterruptionDecisionProviderImpl.kt @@ -20,12 +20,15 @@ import android.os.Handler import android.os.PowerManager import android.util.Log import com.android.internal.annotations.VisibleForTesting +import com.android.internal.logging.UiEventLogger +import com.android.internal.logging.UiEventLogger.UiEventEnum import com.android.systemui.dagger.qualifiers.Main import com.android.systemui.plugins.statusbar.StatusBarStateController import com.android.systemui.settings.UserTracker import com.android.systemui.statusbar.notification.collection.NotificationEntry import com.android.systemui.statusbar.notification.interruption.VisualInterruptionDecisionProvider.Decision import com.android.systemui.statusbar.notification.interruption.VisualInterruptionDecisionProvider.FullScreenIntentDecision +import com.android.systemui.statusbar.notification.interruption.VisualInterruptionSuppressor.EventLogData import com.android.systemui.statusbar.notification.interruption.VisualInterruptionType.BUBBLE import com.android.systemui.statusbar.notification.interruption.VisualInterruptionType.PEEK import com.android.systemui.statusbar.notification.interruption.VisualInterruptionType.PULSE @@ -33,6 +36,7 @@ import com.android.systemui.statusbar.policy.BatteryController import com.android.systemui.statusbar.policy.DeviceProvisionedController import com.android.systemui.statusbar.policy.HeadsUpManager import com.android.systemui.statusbar.policy.KeyguardStateController +import com.android.systemui.util.EventLog import com.android.systemui.util.settings.GlobalSettings import com.android.systemui.util.time.SystemClock import javax.inject.Inject @@ -43,6 +47,7 @@ constructor( private val ambientDisplayConfiguration: AmbientDisplayConfiguration, private val batteryController: BatteryController, deviceProvisionedController: DeviceProvisionedController, + private val eventLog: EventLog, private val globalSettings: GlobalSettings, private val headsUpManager: HeadsUpManager, private val keyguardNotificationVisibilityProvider: KeyguardNotificationVisibilityProvider, @@ -52,14 +57,25 @@ constructor( private val powerManager: PowerManager, private val statusBarStateController: StatusBarStateController, private val systemClock: SystemClock, + private val uiEventLogger: UiEventLogger, private val userTracker: UserTracker, ) : VisualInterruptionDecisionProvider { + interface Loggable { + val uiEventId: UiEventEnum? + val eventLogData: EventLogData? + } + private class DecisionImpl( override val shouldInterrupt: Boolean, override val logReason: String ) : Decision - private data class LoggableDecision private constructor(val decision: DecisionImpl) { + private data class LoggableDecision + private constructor( + val decision: DecisionImpl, + override val uiEventId: UiEventEnum? = null, + override val eventLogData: EventLogData? = null + ) : Loggable { companion object { val unsuppressed = LoggableDecision(DecisionImpl(shouldInterrupt = true, logReason = "not suppressed")) @@ -74,7 +90,9 @@ constructor( fun suppressed(suppressor: VisualInterruptionSuppressor) = LoggableDecision( - DecisionImpl(shouldInterrupt = false, logReason = suppressor.reason) + DecisionImpl(shouldInterrupt = false, logReason = suppressor.reason), + uiEventId = suppressor.uiEventId, + eventLogData = suppressor.eventLogData ) } } @@ -82,7 +100,7 @@ constructor( private class FullScreenIntentDecisionImpl( val entry: NotificationEntry, private val fsiDecision: FullScreenIntentDecisionProvider.Decision - ) : FullScreenIntentDecision { + ) : FullScreenIntentDecision, Loggable { var hasBeenLogged = false override val shouldInterrupt @@ -99,6 +117,12 @@ constructor( val isWarning get() = fsiDecision.isWarning + + override val uiEventId + get() = fsiDecision.uiEventId + + override val eventLogData + get() = fsiDecision.eventLogData } private val fullScreenIntentDecisionProvider = @@ -147,23 +171,23 @@ constructor( legacySuppressors.remove(suppressor) } - fun addCondition(condition: VisualInterruptionCondition) { + override fun addCondition(condition: VisualInterruptionCondition) { conditions.add(condition) condition.start() } @VisibleForTesting - fun removeCondition(condition: VisualInterruptionCondition) { + override fun removeCondition(condition: VisualInterruptionCondition) { conditions.remove(condition) } - fun addFilter(filter: VisualInterruptionFilter) { + override fun addFilter(filter: VisualInterruptionFilter) { filters.add(filter) filter.start() } @VisibleForTesting - fun removeFilter(filter: VisualInterruptionFilter) { + override fun removeFilter(filter: VisualInterruptionFilter) { filters.remove(filter) } @@ -214,9 +238,10 @@ constructor( private fun logDecision( type: VisualInterruptionType, entry: NotificationEntry, - loggable: LoggableDecision + loggableDecision: LoggableDecision ) { - logger.logDecision(type.name, entry, loggable.decision) + logger.logDecision(type.name, entry, loggableDecision.decision) + logEvents(entry, loggableDecision) } override fun makeUnloggedFullScreenIntentDecision( @@ -250,6 +275,14 @@ constructor( } logger.logFullScreenIntentDecision(decision.entry, decision, decision.isWarning) + logEvents(decision.entry, decision) + } + + private fun logEvents(entry: NotificationEntry, loggable: Loggable) { + loggable.uiEventId?.let { uiEventLogger.log(it, entry.sbn.uid, entry.sbn.packageName) } + loggable.eventLogData?.let { + eventLog.writeEvent(0x534e4554, it.number, entry.sbn.uid, it.description) + } } private fun checkSuppressInterruptions(entry: NotificationEntry) = diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/interruption/VisualInterruptionSuppressor.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/interruption/VisualInterruptionSuppressor.kt index 39199df37bd4..ee797274deac 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/interruption/VisualInterruptionSuppressor.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/interruption/VisualInterruptionSuppressor.kt @@ -18,6 +18,7 @@ package com.android.systemui.statusbar.notification.interruption import com.android.internal.logging.UiEventLogger.UiEventEnum import com.android.systemui.statusbar.notification.collection.NotificationEntry +import com.android.systemui.statusbar.notification.interruption.VisualInterruptionSuppressor.EventLogData /** * A reason why visual interruptions might be suppressed. @@ -43,6 +44,9 @@ enum class VisualInterruptionType { * @see VisualInterruptionFilter */ sealed interface VisualInterruptionSuppressor { + /** Data to be logged in the EventLog when an interruption is suppressed. */ + data class EventLogData(val number: String, val description: String) + /** The type(s) of interruption that this suppresses. */ val types: Set<VisualInterruptionType> @@ -52,6 +56,9 @@ sealed interface VisualInterruptionSuppressor { /** An optional UiEvent ID to be recorded when this suppresses an interruption. */ val uiEventId: UiEventEnum? + /** Optional data to be logged in the EventLog when this suppresses an interruption. */ + val eventLogData: EventLogData? + /** * Called after the suppressor is added to the [VisualInterruptionDecisionProvider] but before * any other methods are called on the suppressor. @@ -63,8 +70,14 @@ sealed interface VisualInterruptionSuppressor { abstract class VisualInterruptionCondition( override val types: Set<VisualInterruptionType>, override val reason: String, - override val uiEventId: UiEventEnum? = null + override val uiEventId: UiEventEnum? = null, + override val eventLogData: EventLogData? = null ) : VisualInterruptionSuppressor { + constructor( + types: Set<VisualInterruptionType>, + reason: String + ) : this(types, reason, /* uiEventId = */ null) + /** @return true if these interruptions should be suppressed right now. */ abstract fun shouldSuppress(): Boolean } @@ -73,8 +86,14 @@ abstract class VisualInterruptionCondition( abstract class VisualInterruptionFilter( override val types: Set<VisualInterruptionType>, override val reason: String, - override val uiEventId: UiEventEnum? = null + override val uiEventId: UiEventEnum? = null, + override val eventLogData: EventLogData? = null ) : VisualInterruptionSuppressor { + constructor( + types: Set<VisualInterruptionType>, + reason: String + ) : this(types, reason, /* uiEventId = */ null) + /** * @param entry the notification to consider suppressing * @return true if these interruptions should be suppressed for this notification right now diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ActivatableNotificationView.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ActivatableNotificationView.java index 8f1e59d20091..7c8d76208e5e 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ActivatableNotificationView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ActivatableNotificationView.java @@ -41,6 +41,7 @@ import com.android.systemui.statusbar.NotificationShelf; import com.android.systemui.statusbar.notification.FakeShadowView; import com.android.systemui.statusbar.notification.NotificationUtils; import com.android.systemui.statusbar.notification.SourceType; +import com.android.systemui.statusbar.notification.shared.NotificationIconContainerRefactor; import com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayout; import com.android.systemui.statusbar.notification.stack.StackStateAnimator; import com.android.systemui.util.DumpUtilsKt; @@ -229,17 +230,14 @@ public abstract class ActivatableNotificationView extends ExpandableOutlineView @Override public void setBelowSpeedBump(boolean below) { + NotificationIconContainerRefactor.assertInLegacyMode(); super.setBelowSpeedBump(below); if (below != mIsBelowSpeedBump) { mIsBelowSpeedBump = below; updateBackgroundTint(); - onBelowSpeedBumpChanged(); } } - protected void onBelowSpeedBumpChanged() { - } - /** * Sets the tint color of the background */ diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableView.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableView.java index 6edab4d26d59..49674d603509 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableView.java @@ -38,6 +38,7 @@ import com.android.systemui.res.R; import com.android.systemui.statusbar.StatusBarIconView; import com.android.systemui.statusbar.notification.Roundable; import com.android.systemui.statusbar.notification.RoundableState; +import com.android.systemui.statusbar.notification.shared.NotificationIconContainerRefactor; import com.android.systemui.statusbar.notification.stack.ExpandableViewState; import com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayout; import com.android.systemui.util.Compile; @@ -400,6 +401,7 @@ public abstract class ExpandableView extends FrameLayout implements Dumpable, Ro * @param below true if it is below. */ public void setBelowSpeedBump(boolean below) { + NotificationIconContainerRefactor.assertInLegacyMode(); } public int getPinnedHeadsUpHeight() { diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationBackgroundView.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationBackgroundView.java index b95e053ae508..8eda96f62257 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationBackgroundView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationBackgroundView.java @@ -156,7 +156,7 @@ public class NotificationBackgroundView extends View implements Dumpable { new int[]{com.android.internal.R.attr.state_hovered}, new int[]{}}, - new int[]{0, 0, tintColor} + new int[]{tintColor, tintColor, tintColor} ); mBackground.setTintMode(PorterDuff.Mode.SRC_ATOP); mBackground.setTintList(stateList); diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ExpandableViewState.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ExpandableViewState.java index 33473a6f6b0a..d0c5c82b50ee 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ExpandableViewState.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ExpandableViewState.java @@ -26,6 +26,7 @@ import com.android.app.animation.Interpolators; import com.android.systemui.res.R; import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow; import com.android.systemui.statusbar.notification.row.ExpandableView; +import com.android.systemui.statusbar.notification.shared.NotificationIconContainerRefactor; /** * A state of an expandable view @@ -162,7 +163,9 @@ public class ExpandableViewState extends ViewState { this.hideSensitive, false /* animated */, 0 /* delay */, 0 /* duration */); // apply below shelf speed bump - expandableView.setBelowSpeedBump(this.belowSpeedBump); + if (!NotificationIconContainerRefactor.isEnabled()) { + expandableView.setBelowSpeedBump(this.belowSpeedBump); + } // apply clipping final float oldClipTopAmount = expandableView.getClipTopAmount(); @@ -217,7 +220,9 @@ public class ExpandableViewState extends ViewState { expandableView.setDimmed(this.dimmed, animationFilter.animateDimmed); // apply below the speed bump - expandableView.setBelowSpeedBump(this.belowSpeedBump); + if (!NotificationIconContainerRefactor.isEnabled()) { + expandableView.setBelowSpeedBump(this.belowSpeedBump); + } // start hiding sensitive animation expandableView.setHideSensitive(this.hideSensitive, animationFilter.animateHideSensitive, diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java index 46488c60fb0f..38d782b43c16 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java @@ -20,6 +20,7 @@ import static android.os.Trace.TRACE_TAG_APP; import static com.android.internal.jank.InteractionJankMonitor.CUJ_NOTIFICATION_SHADE_SCROLL_FLING; import static com.android.internal.jank.InteractionJankMonitor.CUJ_SHADE_CLEAR_ALL; +import static com.android.systemui.Flags.newAodTransition; import static com.android.systemui.flags.Flags.UNCLEARED_TRANSIENT_HUN_FIX; import static com.android.systemui.statusbar.notification.stack.NotificationPriorityBucketKt.BUCKET_SILENT; import static com.android.systemui.statusbar.notification.stack.StackStateAnimator.ANIMATION_DURATION_SWIPE; @@ -202,9 +203,6 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable private final boolean mDebugRemoveAnimation; private final boolean mSensitiveRevealAnimEndabled; private final RefactorFlag mAnimatedInsets; - - private final boolean mNewAodTransition; - private int mContentHeight; private float mIntrinsicContentHeight; private int mPaddingBetweenElements; @@ -633,7 +631,6 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable mIsSmallLandscapeLockscreenEnabled = mFeatureFlags.isEnabled( Flags.LOCKSCREEN_ENABLE_LANDSCAPE); mDebugLines = mFeatureFlags.isEnabled(Flags.NSSL_DEBUG_LINES); - mNewAodTransition = mFeatureFlags.isEnabled(Flags.NEW_AOD_TRANSITION); mDebugRemoveAnimation = mFeatureFlags.isEnabled(Flags.NSSL_DEBUG_REMOVE_ANIMATION); mSensitiveRevealAnimEndabled = mFeatureFlags.isEnabled(Flags.SENSITIVE_REVEAL_ANIM); mAnimatedInsets = @@ -1462,7 +1459,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable @VisibleForTesting public void updateStackHeight(float endHeight, float fraction) { - if (!mNewAodTransition) { + if (!newAodTransition()) { // During the (AOD<=>LS) transition where dozeAmount is changing, // apply dozeAmount to stack height instead of expansionFraction // to unfurl notifications on AOD=>LS wakeup (and furl up on LS=>AOD sleep) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/domain/interactor/SharedNotificationContainerInteractor.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/domain/interactor/SharedNotificationContainerInteractor.kt index eb1c17aaca78..c2c5eed6f013 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/domain/interactor/SharedNotificationContainerInteractor.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/domain/interactor/SharedNotificationContainerInteractor.kt @@ -73,6 +73,11 @@ constructor( } .distinctUntilChanged() + val isSplitShadeEnabled: Flow<Boolean> = + configurationBasedDimensions + .map { dimens: ConfigurationBasedDimensions -> dimens.useSplitShade } + .distinctUntilChanged() + /** Top position (without translation) of the shared container. */ fun setTopPosition(top: Float) { _topPosition.value = top diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/BiometricUnlockController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/BiometricUnlockController.java index cbe9d4b93ead..4e77801af515 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/BiometricUnlockController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/BiometricUnlockController.java @@ -49,7 +49,6 @@ import com.android.systemui.dagger.SysUISingleton; import com.android.systemui.dagger.qualifiers.Main; import com.android.systemui.deviceentry.domain.interactor.DeviceEntryHapticsInteractor; import com.android.systemui.dump.DumpManager; -import com.android.systemui.flags.FeatureFlags; import com.android.systemui.keyguard.KeyguardViewMediator; import com.android.systemui.keyguard.WakefulnessLifecycle; import com.android.systemui.keyguard.domain.interactor.BiometricUnlockInteractor; @@ -186,8 +185,6 @@ public class BiometricUnlockController extends KeyguardUpdateMonitorCallback imp private long mLastFpFailureUptimeMillis; private int mNumConsecutiveFpFailures; - private final FeatureFlags mFeatureFlags; - private static final class PendingAuthenticated { public final int userId; public final BiometricSourceType biometricSourceType; @@ -291,7 +288,6 @@ public class BiometricUnlockController extends KeyguardUpdateMonitorCallback imp ScreenOffAnimationController screenOffAnimationController, VibratorHelper vibrator, SystemClock systemClock, - FeatureFlags featureFlags, DeviceEntryHapticsInteractor hapticsInteractor, Lazy<SelectedUserInteractor> selectedUserInteractor, BiometricUnlockInteractor biometricUnlockInteractor @@ -322,7 +318,6 @@ public class BiometricUnlockController extends KeyguardUpdateMonitorCallback imp mVibratorHelper = vibrator; mLogger = biometricUnlockLogger; mSystemClock = systemClock; - mFeatureFlags = featureFlags; mOrderUnlockAndWake = resources.getBoolean( com.android.internal.R.bool.config_orderUnlockAndWake); mHapticsInteractor = hapticsInteractor; diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java index cd7a9eacf552..4cb01e12ea8b 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java @@ -27,6 +27,7 @@ import static androidx.core.view.ViewCompat.IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_ import static androidx.lifecycle.Lifecycle.State.RESUMED; import static com.android.systemui.Dependency.TIME_TICK_HANDLER_NAME; +import static com.android.systemui.Flags.lightRevealMigration; import static com.android.systemui.charging.WirelessChargingAnimation.UNKNOWN_BATTERY_LEVEL; import static com.android.systemui.statusbar.NotificationLockscreenUserManager.PERMISSION_SELF; import static com.android.systemui.statusbar.StatusBarState.SHADE; @@ -129,6 +130,7 @@ import com.android.systemui.dagger.qualifiers.Main; import com.android.systemui.dagger.qualifiers.UiBackground; import com.android.systemui.demomode.DemoMode; import com.android.systemui.demomode.DemoModeController; +import com.android.systemui.deviceentry.shared.DeviceEntryUdfpsRefactor; import com.android.systemui.emergency.EmergencyGesture; import com.android.systemui.flags.FeatureFlags; import com.android.systemui.flags.Flags; @@ -238,6 +240,8 @@ import com.android.wm.shell.startingsurface.StartingSurface; import dalvik.annotation.optimization.NeverCompile; +import dagger.Lazy; + import java.io.PrintWriter; import java.io.StringWriter; import java.util.List; @@ -249,8 +253,6 @@ import javax.inject.Inject; import javax.inject.Named; import javax.inject.Provider; -import dagger.Lazy; - /** * A class handling initialization and coordination between some of the key central surfaces in * System UI: The notification shade, the keyguard (lockscreen), and the status bar. @@ -952,7 +954,7 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { @Override public void onKeyguardGoingAwayChanged() { - if (mFeatureFlags.isEnabled(Flags.LIGHT_REVEAL_MIGRATION)) { + if (lightRevealMigration()) { // This code path is not used if the KeyguardTransitionRepository is managing // the lightreveal scrim. return; @@ -1221,7 +1223,7 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { }); mScrimController.attachViews(scrimBehind, notificationsScrim, scrimInFront); - if (mFeatureFlags.isEnabled(Flags.LIGHT_REVEAL_MIGRATION)) { + if (lightRevealMigration()) { LightRevealScrimViewBinder.bind( mLightRevealScrim, mLightRevealScrimViewModelLazy.get()); } @@ -2354,7 +2356,7 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { return; } - if (mFeatureFlags.isEnabled(Flags.LIGHT_REVEAL_MIGRATION)) { + if (lightRevealMigration()) { return; } @@ -2777,7 +2779,7 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { mScrimController.setExpansionAffectsAlpha(!unlocking); if (mAlternateBouncerInteractor.isVisibleState()) { - if (!mFeatureFlags.isEnabled(Flags.ALTERNATE_BOUNCER_VIEW)) { + if (!DeviceEntryUdfpsRefactor.isEnabled()) { if ((!mKeyguardStateController.isOccluded() || mShadeSurface.isPanelExpanded()) && (mState == StatusBarState.SHADE || mState == StatusBarState.SHADE_LOCKED || mTransitionToFullShadeProgress > 0f)) { @@ -3000,7 +3002,7 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { return; } - if (!mFeatureFlags.isEnabled(Flags.LIGHT_REVEAL_MIGRATION)) { + if (!lightRevealMigration()) { mLightRevealScrim.setAlpha(mScrimController.getState().getMaxLightRevealScrimAlpha()); } } @@ -3155,7 +3157,7 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { @Override public void onDozeAmountChanged(float linear, float eased) { - if (!mFeatureFlags.isEnabled(Flags.LIGHT_REVEAL_MIGRATION) + if (!lightRevealMigration() && !(mLightRevealScrim.getRevealEffect() instanceof CircleReveal)) { mLightRevealScrim.setRevealAmount(1f - linear); } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/LegacyNotificationIconAreaControllerImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/LegacyNotificationIconAreaControllerImpl.java index 1f9952a8d4ec..a62a1ed9f0c0 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/LegacyNotificationIconAreaControllerImpl.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/LegacyNotificationIconAreaControllerImpl.java @@ -15,7 +15,7 @@ */ package com.android.systemui.statusbar.phone; -import static com.android.systemui.flags.Flags.NEW_AOD_TRANSITION; +import static com.android.systemui.Flags.newAodTransition; import android.content.Context; import android.content.res.Resources; @@ -106,9 +106,6 @@ public class LegacyNotificationIconAreaControllerImpl implements private NotificationIconContainer mAodIcons; private final ArrayList<Rect> mTintAreas = new ArrayList<>(); private final Context mContext; - - private final boolean mNewAodTransition; - private int mAodIconAppearTranslation; private boolean mAnimationsEnabled; @@ -145,7 +142,6 @@ public class LegacyNotificationIconAreaControllerImpl implements mContrastColorUtil = ContrastColorUtil.getInstance(context); mContext = context; mStatusBarStateController = statusBarStateController; - mNewAodTransition = featureFlags.isEnabled(NEW_AOD_TRANSITION); mStatusBarStateController.addCallback(this); mMediaManager = notificationMediaManager; mDozeParameters = dozeParameters; @@ -600,7 +596,7 @@ public class LegacyNotificationIconAreaControllerImpl implements boolean animate = true; if (!mBypassController.getBypassEnabled()) { animate = mDozeParameters.getAlwaysOn() && !mDozeParameters.getDisplayNeedsBlanking(); - if (!mNewAodTransition) { + if (!newAodTransition()) { // We only want the appear animations to happen when the notifications get fully // hidden, since otherwise the unhide animation overlaps animate &= fullyHidden; @@ -640,7 +636,7 @@ public class LegacyNotificationIconAreaControllerImpl implements mAodIconsVisible = visible; mAodIcons.animate().cancel(); if (animate) { - if (mNewAodTransition) { + if (newAodTransition()) { // Let's make sure the icon are translated to 0, since we cancelled it above animateInAodIconTranslation(); if (mAodIconsVisible) { diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java index 3e753a589a84..ae04eaf49b65 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java @@ -396,9 +396,6 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, Dump states[i].setDefaultScrimAlpha(mDefaultScrimAlpha); } - mScrimBehind.setDefaultFocusHighlightEnabled(false); - mNotificationsScrim.setDefaultFocusHighlightEnabled(false); - mScrimInFront.setDefaultFocusHighlightEnabled(false); mTransparentScrimBackground = notificationsScrim.getResources() .getBoolean(R.bool.notification_scrim_transparent); updateScrims(); @@ -509,12 +506,6 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, Dump applyState(); - // Scrim might acquire focus when user is navigating with a D-pad or a keyboard. - // We need to disable focus otherwise AOD would end up with a gray overlay. - mScrimInFront.setFocusable(!state.isLowPowerState()); - mScrimBehind.setFocusable(!state.isLowPowerState()); - mNotificationsScrim.setFocusable(!state.isLowPowerState()); - mScrimInFront.setBlendWithMainColor(state.shouldBlendWithMainColor()); // Cancel blanking transitions that were pending before we requested a new state diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java index 267b56378d82..274b50fd79fd 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java @@ -62,6 +62,7 @@ import com.android.systemui.bouncer.domain.interactor.PrimaryBouncerInteractor; import com.android.systemui.bouncer.ui.BouncerView; import com.android.systemui.dagger.SysUISingleton; import com.android.systemui.dagger.qualifiers.Main; +import com.android.systemui.deviceentry.shared.DeviceEntryUdfpsRefactor; import com.android.systemui.dock.DockManager; import com.android.systemui.dreams.DreamOverlayStateController; import com.android.systemui.flags.FeatureFlags; @@ -1573,7 +1574,7 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb * notification shade's child views. */ public boolean shouldInterceptTouchEvent(MotionEvent event) { - if (mFlags.isEnabled(Flags.ALTERNATE_BOUNCER_VIEW)) { + if (DeviceEntryUdfpsRefactor.isEnabled()) { return false; } return mAlternateBouncerInteractor.isVisibleState(); @@ -1584,7 +1585,7 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb * showing. */ public boolean onTouch(MotionEvent event) { - if (mFlags.isEnabled(Flags.ALTERNATE_BOUNCER_VIEW)) { + if (DeviceEntryUdfpsRefactor.isEnabled()) { return false; } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarNotificationPresenter.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarNotificationPresenter.java index 07e2571bcb38..8e9c0384987d 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarNotificationPresenter.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarNotificationPresenter.java @@ -14,6 +14,9 @@ package com.android.systemui.statusbar.phone; +import static com.android.systemui.statusbar.notification.interruption.VisualInterruptionType.BUBBLE; +import static com.android.systemui.statusbar.notification.interruption.VisualInterruptionType.PEEK; +import static com.android.systemui.statusbar.notification.interruption.VisualInterruptionType.PULSE; import static com.android.systemui.statusbar.phone.CentralSurfaces.CLOSE_PANEL_WHEN_EMPTIED; import static com.android.systemui.statusbar.phone.CentralSurfaces.DEBUG; @@ -29,6 +32,8 @@ import android.util.Log; import android.util.Slog; import android.view.View; +import androidx.annotation.NonNull; + import com.android.internal.statusbar.IStatusBarService; import com.android.systemui.InitController; import com.android.systemui.dagger.SysUISingleton; @@ -54,7 +59,10 @@ import com.android.systemui.statusbar.notification.collection.NotificationEntry; import com.android.systemui.statusbar.notification.collection.render.NotifShadeEventSource; import com.android.systemui.statusbar.notification.domain.interactor.NotificationAlertsInteractor; import com.android.systemui.statusbar.notification.interruption.NotificationInterruptSuppressor; +import com.android.systemui.statusbar.notification.interruption.VisualInterruptionCondition; import com.android.systemui.statusbar.notification.interruption.VisualInterruptionDecisionProvider; +import com.android.systemui.statusbar.notification.interruption.VisualInterruptionFilter; +import com.android.systemui.statusbar.notification.interruption.VisualInterruptionRefactor; import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow; import com.android.systemui.statusbar.notification.row.NotificationGutsManager; import com.android.systemui.statusbar.notification.row.NotificationGutsManager.OnSettingsClickListener; @@ -63,6 +71,8 @@ import com.android.systemui.statusbar.notification.stack.NotificationStackScroll import com.android.systemui.statusbar.policy.HeadsUpManager; import com.android.systemui.statusbar.policy.KeyguardStateController; +import java.util.Set; + import javax.inject.Inject; @SysUISingleton @@ -163,7 +173,14 @@ class StatusBarNotificationPresenter implements NotificationPresenter, CommandQu initController.addPostInitTask(() -> { mNotifShadeEventSource.setShadeEmptiedCallback(this::maybeClosePanelForShadeEmptied); mNotifShadeEventSource.setNotifRemovedByUserCallback(this::maybeEndAmbientPulse); - visualInterruptionDecisionProvider.addLegacySuppressor(mInterruptSuppressor); + if (VisualInterruptionRefactor.isEnabled()) { + visualInterruptionDecisionProvider.addCondition(mAlertsDisabledCondition); + visualInterruptionDecisionProvider.addCondition(mVrModeCondition); + visualInterruptionDecisionProvider.addFilter(mNeedsRedactionFilter); + visualInterruptionDecisionProvider.addCondition(mPanelsDisabledCondition); + } else { + visualInterruptionDecisionProvider.addLegacySuppressor(mInterruptSuppressor); + } mLockscreenUserManager.setUpWithPresenter(this); mGutsManager.setUpWithPresenter( this, mNotifListContainer, mOnSettingsClickListener); @@ -306,4 +323,54 @@ class StatusBarNotificationPresenter implements NotificationPresenter, CommandQu return !mNotificationAlertsInteractor.areNotificationAlertsEnabled(); } }; + + private final VisualInterruptionCondition mAlertsDisabledCondition = + new VisualInterruptionCondition(Set.of(PEEK, PULSE, BUBBLE), + "notification alerts disabled") { + @Override + public boolean shouldSuppress() { + return !mNotificationAlertsInteractor.areNotificationAlertsEnabled(); + } + }; + + private final VisualInterruptionCondition mVrModeCondition = + new VisualInterruptionCondition(Set.of(PEEK, BUBBLE), "device is in VR mode") { + @Override + public boolean shouldSuppress() { + return isDeviceInVrMode(); + } + }; + + private final VisualInterruptionFilter mNeedsRedactionFilter = + new VisualInterruptionFilter(Set.of(PEEK), "needs redaction on public lockscreen") { + @Override + public boolean shouldSuppress(@NonNull NotificationEntry entry) { + if (!mKeyguardStateController.isOccluded()) { + return false; + } + + if (!mLockscreenUserManager.needsRedaction(entry)) { + return false; + } + + final int currentUserId = mLockscreenUserManager.getCurrentUserId(); + final boolean currentUserPublic = mLockscreenUserManager.isLockscreenPublicMode( + currentUserId); + + final int notificationUserId = entry.getSbn().getUserId(); + final boolean notificationUserPublic = + mLockscreenUserManager.isLockscreenPublicMode(notificationUserId); + + // TODO(b/135046837): we can probably relax this with dynamic privacy + return currentUserPublic || notificationUserPublic; + } + }; + + private final VisualInterruptionCondition mPanelsDisabledCondition = + new VisualInterruptionCondition(Set.of(PEEK), "disabled panel") { + @Override + public boolean shouldSuppress() { + return !mCommandQueue.panelsEnabled(); + } + }; } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/MobileInputLogger.kt b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/MobileInputLogger.kt index 3522b9a13989..4f702d7534cb 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/MobileInputLogger.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/MobileInputLogger.kt @@ -109,8 +109,9 @@ constructor( { int1 = subId str1 = displayInfo.toString() + bool1 = displayInfo.isRoaming }, - { "onDisplayInfoChanged: subId=$int1 displayInfo=$str1" }, + { "onDisplayInfoChanged: subId=$int1 displayInfo=$str1 isRoaming=$bool1" }, ) } 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 125fd9be15c7..4fb99c24c8ca 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 @@ -46,6 +46,8 @@ import com.android.systemui.broadcast.BroadcastDispatcher import com.android.systemui.common.coroutine.ConflatedCallbackFlow.conflatedCallbackFlow import com.android.systemui.dagger.qualifiers.Application import com.android.systemui.dagger.qualifiers.Background +import com.android.systemui.flags.FeatureFlagsClassic +import com.android.systemui.flags.Flags.ROAMING_INDICATOR_VIA_DISPLAY_INFO import com.android.systemui.log.table.TableLogBuffer import com.android.systemui.statusbar.pipeline.mobile.data.MobileInputLogger import com.android.systemui.statusbar.pipeline.mobile.data.model.DataConnectionState.Disconnected @@ -105,6 +107,7 @@ class MobileConnectionRepositoryImpl( private val bgDispatcher: CoroutineDispatcher, logger: MobileInputLogger, override val tableLogBuffer: TableLogBuffer, + flags: FeatureFlagsClassic, scope: CoroutineScope, ) : MobileConnectionRepository { init { @@ -201,9 +204,15 @@ class MobileConnectionRepositoryImpl( .stateIn(scope, SharingStarted.WhileSubscribed(), false) override val isRoaming = - callbackEvents - .mapNotNull { it.onServiceStateChanged } - .map { it.serviceState.roaming } + if (flags.isEnabled(ROAMING_INDICATOR_VIA_DISPLAY_INFO)) { + callbackEvents + .mapNotNull { it.onDisplayInfoChanged } + .map { it.telephonyDisplayInfo.isRoaming } + } else { + callbackEvents + .mapNotNull { it.onServiceStateChanged } + .map { it.serviceState.roaming } + } .stateIn(scope, SharingStarted.WhileSubscribed(), false) override val operatorAlphaShort = @@ -432,6 +441,7 @@ class MobileConnectionRepositoryImpl( private val logger: MobileInputLogger, private val carrierConfigRepository: CarrierConfigRepository, private val mobileMappingsProxy: MobileMappingsProxy, + private val flags: FeatureFlagsClassic, @Background private val bgDispatcher: CoroutineDispatcher, @Application private val scope: CoroutineScope, ) { @@ -456,6 +466,7 @@ class MobileConnectionRepositoryImpl( bgDispatcher, logger, mobileLogger, + flags, scope, ) } diff --git a/packages/SystemUI/src/com/android/systemui/unfold/UnfoldLightRevealOverlayAnimation.kt b/packages/SystemUI/src/com/android/systemui/unfold/UnfoldLightRevealOverlayAnimation.kt index 2afb43515be7..36a1e8a072c9 100644 --- a/packages/SystemUI/src/com/android/systemui/unfold/UnfoldLightRevealOverlayAnimation.kt +++ b/packages/SystemUI/src/com/android/systemui/unfold/UnfoldLightRevealOverlayAnimation.kt @@ -49,6 +49,7 @@ import com.android.systemui.unfold.updates.RotationChangeProvider import com.android.systemui.unfold.util.ScaleAwareTransitionProgressProvider.Companion.areAnimationsEnabled import com.android.systemui.util.concurrency.ThreadFactory import com.android.app.tracing.traceSection +import com.android.keyguard.logging.ScrimLogger import com.android.wm.shell.displayareahelper.DisplayAreaHelper import java.util.Optional import java.util.concurrent.Executor @@ -69,7 +70,8 @@ constructor( @Main private val executor: Executor, private val threadFactory: ThreadFactory, private val rotationChangeProvider: RotationChangeProvider, - private val displayTracker: DisplayTracker + private val displayTracker: DisplayTracker, + private val scrimLogger: ScrimLogger, ) { private val transitionListener = TransitionListener() @@ -179,8 +181,8 @@ constructor( ) .apply { revealEffect = createLightRevealEffect() - isScrimOpaqueChangedListener = Consumer {} revealAmount = calculateRevealAmount() + scrimLogger = this@UnfoldLightRevealOverlayAnimation.scrimLogger } newRoot.setView(newView, params) diff --git a/packages/SystemUI/src/com/android/systemui/util/EventLog.kt b/packages/SystemUI/src/com/android/systemui/util/EventLog.kt new file mode 100644 index 000000000000..dc794cf66a8d --- /dev/null +++ b/packages/SystemUI/src/com/android/systemui/util/EventLog.kt @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.systemui.util + +/** + * Testable wrapper around {@link android.util.EventLog}. + * + * Dagger can inject this wrapper into your classes. The implementation just proxies calls to the + * real EventLog. + * + * In tests, pass an instance of FakeEventLog, which allows you to examine the values passed to the + * various methods below. + */ +interface EventLog { + /** @see android.util.EventLog.writeEvent */ + fun writeEvent(tag: Int, value: Int): Int + + /** @see android.util.EventLog.writeEvent */ + fun writeEvent(tag: Int, value: Long): Int + + /** @see android.util.EventLog.writeEvent */ + fun writeEvent(tag: Int, value: Float): Int + + /** @see android.util.EventLog.writeEvent */ + fun writeEvent(tag: Int, value: String): Int + + /** @see android.util.EventLog.writeEvent */ + fun writeEvent(tag: Int, vararg values: Any): Int +} diff --git a/packages/SystemUI/src/com/android/systemui/util/EventLogImpl.kt b/packages/SystemUI/src/com/android/systemui/util/EventLogImpl.kt new file mode 100644 index 000000000000..6fb1adc9382d --- /dev/null +++ b/packages/SystemUI/src/com/android/systemui/util/EventLogImpl.kt @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.systemui.util + +import javax.inject.Inject + +/** Default implementation of [com.android.systemui.util.EventLog]. */ +class EventLogImpl @Inject constructor() : EventLog { + override fun writeEvent(tag: Int, value: Int): Int = + android.util.EventLog.writeEvent(tag, value) + + override fun writeEvent(tag: Int, value: Long): Int = + android.util.EventLog.writeEvent(tag, value) + + override fun writeEvent(tag: Int, value: Float): Int = + android.util.EventLog.writeEvent(tag, value) + + override fun writeEvent(tag: Int, value: String): Int = + android.util.EventLog.writeEvent(tag, value) + + override fun writeEvent(tag: Int, vararg values: Any): Int = + android.util.EventLog.writeEvent(tag, *values) +} diff --git a/packages/SystemUI/src/com/android/systemui/util/EventLogModule.kt b/packages/SystemUI/src/com/android/systemui/util/EventLogModule.kt new file mode 100644 index 000000000000..ca0876ca32cc --- /dev/null +++ b/packages/SystemUI/src/com/android/systemui/util/EventLogModule.kt @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.systemui.util + +import com.android.systemui.dagger.SysUISingleton +import dagger.Binds +import dagger.Module + +@Module +interface EventLogModule { + @SysUISingleton @Binds fun bindEventLog(eventLogImpl: EventLogImpl?): EventLog? +} diff --git a/packages/SystemUI/src/com/android/systemui/util/drawable/LoopedAnimatable2DrawableWrapper.kt b/packages/SystemUI/src/com/android/systemui/util/drawable/LoopedAnimatable2DrawableWrapper.kt new file mode 100644 index 000000000000..a2a44e46919f --- /dev/null +++ b/packages/SystemUI/src/com/android/systemui/util/drawable/LoopedAnimatable2DrawableWrapper.kt @@ -0,0 +1,94 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.systemui.util.drawable + +import android.content.res.Resources +import android.graphics.drawable.Animatable2 +import android.graphics.drawable.Drawable +import androidx.appcompat.graphics.drawable.DrawableWrapperCompat + +/** + * Create a looped [Animatable2] restarting it when the animation finishes on its own. Calling + * [LoopedAnimatable2DrawableWrapper.stop] cancels further looping. + */ +class LoopedAnimatable2DrawableWrapper private constructor(private val animatable2: Animatable2) : + DrawableWrapperCompat(animatable2 as Drawable), Animatable2 { + + private val loopedCallback = LoopedCallback() + + override fun start() { + animatable2.start() + animatable2.registerAnimationCallback(loopedCallback) + } + + override fun stop() { + // stop looping if someone stops the animation + animatable2.unregisterAnimationCallback(loopedCallback) + animatable2.stop() + } + + override fun isRunning(): Boolean = animatable2.isRunning + + override fun registerAnimationCallback(callback: Animatable2.AnimationCallback) = + animatable2.registerAnimationCallback(callback) + + override fun unregisterAnimationCallback(callback: Animatable2.AnimationCallback): Boolean = + animatable2.unregisterAnimationCallback(callback) + + override fun clearAnimationCallbacks() = animatable2.clearAnimationCallbacks() + + override fun getConstantState(): ConstantState? = + drawable!!.constantState?.let(LoopedAnimatable2DrawableWrapper::LoopedDrawableState) + + companion object { + + /** + * Creates [LoopedAnimatable2DrawableWrapper] from a [drawable]. The [drawable] should + * implement [Animatable2]. + * + * It supports the following resource tags: + * - `<animated-image>` + * - `<animated-vector>` + */ + fun fromDrawable(drawable: Drawable): LoopedAnimatable2DrawableWrapper { + require(drawable is Animatable2) + return LoopedAnimatable2DrawableWrapper(drawable) + } + } + + private class LoopedCallback : Animatable2.AnimationCallback() { + + override fun onAnimationEnd(drawable: Drawable?) { + (drawable as? Animatable2)?.start() + } + } + + private class LoopedDrawableState(private val nestedState: ConstantState) : ConstantState() { + + override fun newDrawable(): Drawable = fromDrawable(nestedState.newDrawable()) + + override fun newDrawable(res: Resources?): Drawable = + fromDrawable(nestedState.newDrawable(res)) + + override fun newDrawable(res: Resources?, theme: Resources.Theme?): Drawable = + fromDrawable(nestedState.newDrawable(res, theme)) + + override fun canApplyTheme(): Boolean = nestedState.canApplyTheme() + + override fun getChangingConfigurations(): Int = nestedState.changingConfigurations + } +} diff --git a/packages/SystemUI/src/com/android/systemui/util/kotlin/CoroutinesModule.kt b/packages/SystemUI/src/com/android/systemui/util/kotlin/CoroutinesModule.kt index 81737c79905e..cc9335edfc14 100644 --- a/packages/SystemUI/src/com/android/systemui/util/kotlin/CoroutinesModule.kt +++ b/packages/SystemUI/src/com/android/systemui/util/kotlin/CoroutinesModule.kt @@ -5,8 +5,7 @@ import com.android.systemui.dagger.qualifiers.Application import com.android.systemui.dagger.qualifiers.Background import com.android.systemui.dagger.qualifiers.Main import com.android.systemui.dagger.qualifiers.Tracing -import com.android.systemui.flags.FeatureFlagsClassic -import com.android.systemui.flags.Flags +import com.android.systemui.Flags.coroutineTracing import com.android.app.tracing.TraceUtils.Companion.coroutineTracingIsEnabled import com.android.app.tracing.TraceContextElement import dagger.Module @@ -15,32 +14,9 @@ import kotlinx.coroutines.CoroutineDispatcher import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.ExperimentalCoroutinesApi -import javax.inject.Qualifier import kotlin.coroutines.CoroutineContext import kotlin.coroutines.EmptyCoroutineContext -/** Key associated with a [Boolean] flag that enables or disables the coroutine tracing feature. */ -@Qualifier -annotation class CoroutineTracingEnabledKey - -/** - * Same as [@Application], but does not make use of flags. This should only be used when early usage - * of [@Application] would introduce a circular dependency on [FeatureFlagsClassic]. - */ -@Qualifier -@MustBeDocumented -@Retention(AnnotationRetention.RUNTIME) -annotation class UnflaggedApplication - -/** - * Same as [@Background], but does not make use of flags. This should only be used when early usage - * of [@Application] would introduce a circular dependency on [FeatureFlagsClassic]. - */ -@Qualifier -@MustBeDocumented -@Retention(AnnotationRetention.RUNTIME) -annotation class UnflaggedBackground - /** Providers for various coroutines-related constructs. */ @Module class CoroutinesModule { @@ -53,11 +29,6 @@ class CoroutinesModule { @Provides @SysUISingleton - @UnflaggedApplication - fun unflaggedApplicationScope(): CoroutineScope = CoroutineScope(Dispatchers.Main.immediate) - - @Provides - @SysUISingleton @Main @Deprecated( "Use @Main CoroutineContext instead", @@ -98,28 +69,14 @@ class CoroutinesModule { return Dispatchers.IO + tracingCoroutineContext } - @Provides - @UnflaggedBackground - @SysUISingleton - fun unflaggedBackgroundCoroutineContext(): CoroutineContext { - return Dispatchers.IO - } - @OptIn(ExperimentalCoroutinesApi::class) @Provides @Tracing @SysUISingleton - fun tracingCoroutineContext( - @CoroutineTracingEnabledKey enableTracing: Boolean - ): CoroutineContext = if (enableTracing) TraceContextElement() else EmptyCoroutineContext - - companion object { - @[Provides CoroutineTracingEnabledKey] - fun provideIsCoroutineTracingEnabledKey(featureFlags: FeatureFlagsClassic): Boolean { - return if (featureFlags.isEnabled(Flags.COROUTINE_TRACING)) { - coroutineTracingIsEnabled = true - true - } else false - } + fun tracingCoroutineContext(): CoroutineContext { + return if (coroutineTracing()) { + coroutineTracingIsEnabled = true + TraceContextElement() + } else EmptyCoroutineContext } } diff --git a/packages/SystemUI/tests/src/com/android/keyguard/KeyguardClockSwitchControllerBaseTest.java b/packages/SystemUI/tests/src/com/android/keyguard/KeyguardClockSwitchControllerBaseTest.java index 6a08eeac8108..7feab9141da2 100644 --- a/packages/SystemUI/tests/src/com/android/keyguard/KeyguardClockSwitchControllerBaseTest.java +++ b/packages/SystemUI/tests/src/com/android/keyguard/KeyguardClockSwitchControllerBaseTest.java @@ -195,6 +195,7 @@ public class KeyguardClockSwitchControllerBaseTest extends SysuiTestCase { mKeyguardUnlockAnimationController, mSecureSettings, mExecutor, + mExecutor, mDumpManager, mClockEventController, mLogBuffer, diff --git a/packages/SystemUI/tests/src/com/android/keyguard/KeyguardClockSwitchControllerTest.java b/packages/SystemUI/tests/src/com/android/keyguard/KeyguardClockSwitchControllerTest.java index d84c2c0415eb..cb26e6193ae6 100644 --- a/packages/SystemUI/tests/src/com/android/keyguard/KeyguardClockSwitchControllerTest.java +++ b/packages/SystemUI/tests/src/com/android/keyguard/KeyguardClockSwitchControllerTest.java @@ -157,6 +157,7 @@ public class KeyguardClockSwitchControllerTest extends KeyguardClockSwitchContro ArgumentCaptor<ContentObserver> observerCaptor = ArgumentCaptor.forClass(ContentObserver.class); mController.init(); + mExecutor.runAllReady(); verify(mSecureSettings).registerContentObserverForUser( eq(Settings.Secure.LOCKSCREEN_USE_DOUBLE_LINE_CLOCK), anyBoolean(), observerCaptor.capture(), eq(UserHandle.USER_ALL)); @@ -212,6 +213,7 @@ public class KeyguardClockSwitchControllerTest extends KeyguardClockSwitchContro ArgumentCaptor<ContentObserver> observerCaptor = ArgumentCaptor.forClass(ContentObserver.class); mController.init(); + mExecutor.runAllReady(); verify(mSecureSettings).registerContentObserverForUser( eq(Settings.Secure.LOCK_SCREEN_WEATHER_ENABLED), anyBoolean(), observerCaptor.capture(), eq(UserHandle.USER_ALL)); diff --git a/packages/SystemUI/tests/src/com/android/systemui/accessibility/IWindowMagnificationConnectionTest.java b/packages/SystemUI/tests/src/com/android/systemui/accessibility/IWindowMagnificationConnectionTest.java index 67d6aa8e98cf..d8799e16ebdb 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/accessibility/IWindowMagnificationConnectionTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/accessibility/IWindowMagnificationConnectionTest.java @@ -54,7 +54,7 @@ import org.mockito.MockitoAnnotations; /** * Tests for {@link android.view.accessibility.IWindowMagnificationConnection} retrieved from - * {@link WindowMagnification} + * {@link Magnification} */ @SmallTest @RunWith(AndroidTestingRunner.class) @@ -86,7 +86,7 @@ public class IWindowMagnificationConnectionTest extends SysuiTestCase { private AccessibilityLogger mA11yLogger; private IWindowMagnificationConnection mIWindowMagnificationConnection; - private WindowMagnification mWindowMagnification; + private Magnification mMagnification; private FakeDisplayTracker mDisplayTracker = new FakeDisplayTracker(mContext); @Before @@ -98,16 +98,16 @@ public class IWindowMagnificationConnectionTest extends SysuiTestCase { return null; }).when(mAccessibilityManager).setWindowMagnificationConnection( any(IWindowMagnificationConnection.class)); - mWindowMagnification = new WindowMagnification(getContext(), + mMagnification = new Magnification(getContext(), getContext().getMainThreadHandler(), mCommandQueue, mModeSwitchesController, mSysUiState, mOverviewProxyService, mSecureSettings, mDisplayTracker, getContext().getSystemService(DisplayManager.class), mA11yLogger); - mWindowMagnification.mMagnificationControllerSupplier = new FakeControllerSupplier( + mMagnification.mMagnificationControllerSupplier = new FakeControllerSupplier( mContext.getSystemService(DisplayManager.class)); - mWindowMagnification.mMagnificationSettingsSupplier = new FakeSettingsSupplier( + mMagnification.mMagnificationSettingsSupplier = new FakeSettingsSupplier( mContext.getSystemService(DisplayManager.class)); - mWindowMagnification.requestWindowMagnificationConnection(true); + mMagnification.requestWindowMagnificationConnection(true); assertNotNull(mIWindowMagnificationConnection); mIWindowMagnificationConnection.setConnectionCallback(mConnectionCallback); } @@ -161,7 +161,7 @@ public class IWindowMagnificationConnectionTest extends SysuiTestCase { @Test public void showMagnificationButton() throws RemoteException { // magnification settings panel should not be showing - assertFalse(mWindowMagnification.isMagnificationSettingsPanelShowing(TEST_DISPLAY)); + assertFalse(mMagnification.isMagnificationSettingsPanelShowing(TEST_DISPLAY)); mIWindowMagnificationConnection.showMagnificationButton(TEST_DISPLAY, Settings.Secure.ACCESSIBILITY_MAGNIFICATION_MODE_FULLSCREEN); @@ -195,8 +195,8 @@ public class IWindowMagnificationConnectionTest extends SysuiTestCase { testUserId, TEST_DISPLAY, testScale); waitForIdleSync(); - assertTrue(mWindowMagnification.mUsersScales.contains(testUserId)); - assertEquals(mWindowMagnification.mUsersScales.get(testUserId).get(TEST_DISPLAY), + assertTrue(mMagnification.mUsersScales.contains(testUserId)); + assertEquals(mMagnification.mUsersScales.get(testUserId).get(TEST_DISPLAY), (Float) testScale); verify(mMagnificationSettingsController).setMagnificationScale(eq(testScale)); } diff --git a/packages/SystemUI/tests/src/com/android/systemui/accessibility/WindowMagnificationTest.java b/packages/SystemUI/tests/src/com/android/systemui/accessibility/MagnificationTest.java index d7b6602c2f5c..c972febf2c7e 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/accessibility/WindowMagnificationTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/accessibility/MagnificationTest.java @@ -65,7 +65,7 @@ import org.mockito.MockitoAnnotations; @SmallTest @RunWith(AndroidTestingRunner.class) @TestableLooper.RunWithLooper -public class WindowMagnificationTest extends SysuiTestCase { +public class MagnificationTest extends SysuiTestCase { private static final int TEST_DISPLAY = Display.DEFAULT_DISPLAY; @Mock @@ -82,7 +82,7 @@ public class WindowMagnificationTest extends SysuiTestCase { private SecureSettings mSecureSettings; private CommandQueue mCommandQueue; - private WindowMagnification mWindowMagnification; + private Magnification mMagnification; private OverviewProxyListener mOverviewProxyListener; private FakeDisplayTracker mDisplayTracker = new FakeDisplayTracker(mContext); @@ -107,12 +107,12 @@ public class WindowMagnificationTest extends SysuiTestCase { when(mSysUiState.setFlag(anyInt(), anyBoolean())).thenReturn(mSysUiState); doAnswer(invocation -> { - mWindowMagnification.mMagnificationSettingsControllerCallback + mMagnification.mMagnificationSettingsControllerCallback .onSettingsPanelVisibilityChanged(TEST_DISPLAY, /* shown= */ true); return null; }).when(mMagnificationSettingsController).toggleSettingsPanelVisibility(); doAnswer(invocation -> { - mWindowMagnification.mMagnificationSettingsControllerCallback + mMagnification.mMagnificationSettingsControllerCallback .onSettingsPanelVisibilityChanged(TEST_DISPLAY, /* shown= */ false); return null; }).when(mMagnificationSettingsController).closeMagnificationSettings(); @@ -120,15 +120,15 @@ public class WindowMagnificationTest extends SysuiTestCase { when(mWindowMagnificationController.isActivated()).thenReturn(true); mCommandQueue = new CommandQueue(getContext(), mDisplayTracker); - mWindowMagnification = new WindowMagnification(getContext(), + mMagnification = new Magnification(getContext(), getContext().getMainThreadHandler(), mCommandQueue, mModeSwitchesController, mSysUiState, mOverviewProxyService, mSecureSettings, mDisplayTracker, getContext().getSystemService(DisplayManager.class), mA11yLogger); - mWindowMagnification.mMagnificationControllerSupplier = new FakeControllerSupplier( + mMagnification.mMagnificationControllerSupplier = new FakeControllerSupplier( mContext.getSystemService(DisplayManager.class), mWindowMagnificationController); - mWindowMagnification.mMagnificationSettingsSupplier = new FakeSettingsSupplier( + mMagnification.mMagnificationSettingsSupplier = new FakeSettingsSupplier( mContext.getSystemService(DisplayManager.class), mMagnificationSettingsController); - mWindowMagnification.start(); + mMagnification.start(); final ArgumentCaptor<OverviewProxyListener> listenerArgumentCaptor = ArgumentCaptor.forClass(OverviewProxyListener.class); @@ -156,7 +156,7 @@ public class WindowMagnificationTest extends SysuiTestCase { mCommandQueue.requestWindowMagnificationConnection(true); waitForIdleSync(); - mWindowMagnification.mWindowMagnifierCallback + mMagnification.mWindowMagnifierCallback .onWindowMagnifierBoundsChanged(TEST_DISPLAY, testBounds); verify(mConnectionCallback).onWindowMagnifierBoundsChanged(TEST_DISPLAY, testBounds); @@ -169,7 +169,7 @@ public class WindowMagnificationTest extends SysuiTestCase { mCommandQueue.requestWindowMagnificationConnection(true); waitForIdleSync(); - mWindowMagnification.mWindowMagnifierCallback + mMagnification.mWindowMagnifierCallback .onPerformScaleAction(TEST_DISPLAY, newScale, updatePersistence); verify(mConnectionCallback).onPerformScaleAction( @@ -181,7 +181,7 @@ public class WindowMagnificationTest extends SysuiTestCase { mCommandQueue.requestWindowMagnificationConnection(true); waitForIdleSync(); - mWindowMagnification.mWindowMagnifierCallback + mMagnification.mWindowMagnifierCallback .onAccessibilityActionPerformed(TEST_DISPLAY); verify(mConnectionCallback).onAccessibilityActionPerformed(TEST_DISPLAY); @@ -192,14 +192,14 @@ public class WindowMagnificationTest extends SysuiTestCase { mCommandQueue.requestWindowMagnificationConnection(true); waitForIdleSync(); - mWindowMagnification.mWindowMagnifierCallback.onMove(TEST_DISPLAY); + mMagnification.mWindowMagnifierCallback.onMove(TEST_DISPLAY); verify(mConnectionCallback).onMove(TEST_DISPLAY); } @Test public void onClickSettingsButton_enabled_showPanelForWindowMode() { - mWindowMagnification.mWindowMagnifierCallback.onClickSettingsButton(TEST_DISPLAY); + mMagnification.mWindowMagnifierCallback.onClickSettingsButton(TEST_DISPLAY); waitForIdleSync(); verify(mMagnificationSettingsController).toggleSettingsPanelVisibility(); @@ -212,7 +212,7 @@ public class WindowMagnificationTest extends SysuiTestCase { @Test public void onSetMagnifierSize_delegateToMagnifier() { final @MagnificationSize int index = MagnificationSize.SMALL; - mWindowMagnification.mMagnificationSettingsControllerCallback.onSetMagnifierSize( + mMagnification.mMagnificationSettingsControllerCallback.onSetMagnifierSize( TEST_DISPLAY, index); waitForIdleSync(); @@ -225,7 +225,7 @@ public class WindowMagnificationTest extends SysuiTestCase { @Test public void onSetDiagonalScrolling_delegateToMagnifier() { - mWindowMagnification.mMagnificationSettingsControllerCallback.onSetDiagonalScrolling( + mMagnification.mMagnificationSettingsControllerCallback.onSetDiagonalScrolling( TEST_DISPLAY, /* enable= */ true); waitForIdleSync(); @@ -235,7 +235,7 @@ public class WindowMagnificationTest extends SysuiTestCase { @Test public void onEditMagnifierSizeMode_windowActivated_delegateToMagnifier() { when(mWindowMagnificationController.isActivated()).thenReturn(true); - mWindowMagnification.mMagnificationSettingsControllerCallback.onEditMagnifierSizeMode( + mMagnification.mMagnificationSettingsControllerCallback.onEditMagnifierSizeMode( TEST_DISPLAY, /* enable= */ true); waitForIdleSync(); @@ -243,7 +243,7 @@ public class WindowMagnificationTest extends SysuiTestCase { verify(mA11yLogger).log( eq(MagnificationSettingsEvent.MAGNIFICATION_SETTINGS_SIZE_EDITING_ACTIVATED)); - mWindowMagnification.mMagnificationSettingsControllerCallback.onEditMagnifierSizeMode( + mMagnification.mMagnificationSettingsControllerCallback.onEditMagnifierSizeMode( TEST_DISPLAY, /* enable= */ false); waitForIdleSync(); verify(mA11yLogger).log( @@ -258,7 +258,7 @@ public class WindowMagnificationTest extends SysuiTestCase { waitForIdleSync(); final float scale = 3.0f; final boolean updatePersistence = false; - mWindowMagnification.mMagnificationSettingsControllerCallback.onMagnifierScale( + mMagnification.mMagnificationSettingsControllerCallback.onMagnifierScale( TEST_DISPLAY, scale, updatePersistence); verify(mConnectionCallback).onPerformScaleAction( @@ -274,7 +274,7 @@ public class WindowMagnificationTest extends SysuiTestCase { mCommandQueue.requestWindowMagnificationConnection(true); waitForIdleSync(); - mWindowMagnification.mMagnificationSettingsControllerCallback.onModeSwitch( + mMagnification.mMagnificationSettingsControllerCallback.onModeSwitch( TEST_DISPLAY, ACCESSIBILITY_MAGNIFICATION_MODE_FULLSCREEN); waitForIdleSync(); @@ -292,7 +292,7 @@ public class WindowMagnificationTest extends SysuiTestCase { mCommandQueue.requestWindowMagnificationConnection(true); waitForIdleSync(); - mWindowMagnification.mMagnificationSettingsControllerCallback.onModeSwitch( + mMagnification.mMagnificationSettingsControllerCallback.onModeSwitch( TEST_DISPLAY, ACCESSIBILITY_MAGNIFICATION_MODE_WINDOW); waitForIdleSync(); @@ -305,7 +305,7 @@ public class WindowMagnificationTest extends SysuiTestCase { public void onSettingsPanelVisibilityChanged_windowActivated_delegateToMagnifier() { when(mWindowMagnificationController.isActivated()).thenReturn(true); final boolean shown = false; - mWindowMagnification.mMagnificationSettingsControllerCallback + mMagnification.mMagnificationSettingsControllerCallback .onSettingsPanelVisibilityChanged(TEST_DISPLAY, shown); waitForIdleSync(); @@ -325,9 +325,9 @@ public class WindowMagnificationTest extends SysuiTestCase { @Test public void overviewProxyIsConnected_controllerIsAvailable_updateSysUiStateFlag() { final WindowMagnificationController mController = mock(WindowMagnificationController.class); - mWindowMagnification.mMagnificationControllerSupplier = new FakeControllerSupplier( + mMagnification.mMagnificationControllerSupplier = new FakeControllerSupplier( mContext.getSystemService(DisplayManager.class), mController); - mWindowMagnification.mMagnificationControllerSupplier.get(TEST_DISPLAY); + mMagnification.mMagnificationControllerSupplier.get(TEST_DISPLAY); mOverviewProxyListener.onConnectionChanged(true); diff --git a/packages/SystemUI/tests/src/com/android/systemui/authentication/domain/interactor/AuthenticationInteractorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/authentication/domain/interactor/AuthenticationInteractorTest.kt index 7439db29b513..56d3d260d196 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/authentication/domain/interactor/AuthenticationInteractorTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/authentication/domain/interactor/AuthenticationInteractorTest.kt @@ -455,4 +455,22 @@ class AuthenticationInteractorTest : SysuiTestCase() { assertThat(hintedPinLength).isNull() } + + @Test + fun authenticate_withTooShortPassword() = + testScope.runTest { + utils.authenticationRepository.setAuthenticationMethod( + AuthenticationMethodModel.Password + ) + assertThat( + underTest.authenticate( + buildList { + repeat(utils.authenticationRepository.minPasswordLength - 1) { time -> + add("$time") + } + } + ) + ) + .isEqualTo(AuthenticationResult.SKIPPED) + } } diff --git a/packages/SystemUI/tests/src/com/android/systemui/biometrics/AuthContainerViewTest.kt b/packages/SystemUI/tests/src/com/android/systemui/biometrics/AuthContainerViewTest.kt index 2d95b09cbf0e..f4122d59cea1 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/biometrics/AuthContainerViewTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/biometrics/AuthContainerViewTest.kt @@ -50,8 +50,6 @@ import com.android.systemui.biometrics.domain.interactor.PromptSelectorInteracto import com.android.systemui.biometrics.ui.viewmodel.CredentialViewModel import com.android.systemui.biometrics.ui.viewmodel.PromptViewModel import com.android.systemui.display.data.repository.FakeDisplayRepository -import com.android.systemui.flags.FakeFeatureFlags -import com.android.systemui.flags.Flags import com.android.systemui.keyguard.WakefulnessLifecycle import com.android.systemui.statusbar.VibratorHelper import com.android.systemui.statusbar.events.ANIMATING_OUT @@ -87,8 +85,6 @@ open class AuthContainerViewTest : SysuiTestCase() { @JvmField @Rule var mockitoRule = MockitoJUnit.rule() - private val featureFlags = FakeFeatureFlags() - @Mock lateinit var callback: AuthDialogCallback @Mock @@ -135,7 +131,6 @@ open class AuthContainerViewTest : SysuiTestCase() { @Before fun setup() { displayRepository = FakeDisplayRepository() - featureFlags.set(Flags.ONE_WAY_HAPTICS_API_MIGRATION, false) displayStateInteractor = DisplayStateInteractorImpl( diff --git a/packages/SystemUI/tests/src/com/android/systemui/biometrics/AuthDialogPanelInteractionDetectorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/biometrics/AuthDialogPanelInteractionDetectorTest.kt index d2b81e06c0e5..00ea78f01fa9 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/biometrics/AuthDialogPanelInteractionDetectorTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/biometrics/AuthDialogPanelInteractionDetectorTest.kt @@ -17,14 +17,14 @@ package com.android.systemui.biometrics import androidx.test.filters.SmallTest -import com.android.SysUITestComponent -import com.android.SysUITestModule -import com.android.runCurrent -import com.android.runTest +import com.android.systemui.SysUITestComponent +import com.android.systemui.SysUITestModule import com.android.systemui.SysuiTestCase import com.android.systemui.dagger.SysUISingleton import com.android.systemui.flags.FakeFeatureFlagsClassicModule import com.android.systemui.flags.Flags +import com.android.systemui.runCurrent +import com.android.systemui.runTest import com.android.systemui.shade.data.repository.FakeShadeRepository import com.android.systemui.user.domain.UserDomainLayerModule import dagger.BindsInstance diff --git a/packages/SystemUI/tests/src/com/android/systemui/biometrics/SideFpsControllerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/biometrics/SideFpsControllerTest.kt index b4b02a2dfb93..a1b801cd3d3f 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/biometrics/SideFpsControllerTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/biometrics/SideFpsControllerTest.kt @@ -55,6 +55,7 @@ import com.android.keyguard.KeyguardUpdateMonitor import com.android.systemui.SysuiTestCase import com.android.systemui.SysuiTestableContext import com.android.systemui.biometrics.data.repository.FakeDisplayStateRepository +import com.android.systemui.biometrics.data.repository.FakeFingerprintPropertyRepository import com.android.systemui.biometrics.domain.interactor.DisplayStateInteractor import com.android.systemui.biometrics.domain.interactor.DisplayStateInteractorImpl import com.android.systemui.bouncer.data.repository.FakeKeyguardBouncerRepository @@ -151,9 +152,11 @@ class SideFpsControllerTest : SysuiTestCase() { mock(StatusBarStateController::class.java), mock(KeyguardStateController::class.java), keyguardBouncerRepository, + FakeFingerprintPropertyRepository(), FakeBiometricSettingsRepository(), FakeSystemClock(), mock(KeyguardUpdateMonitor::class.java), + testScope.backgroundScope, ) displayStateInteractor = DisplayStateInteractorImpl( diff --git a/packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsControllerOverlayTest.kt b/packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsControllerOverlayTest.kt index c5f16aa97f18..5f0d4d428322 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsControllerOverlayTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsControllerOverlayTest.kt @@ -43,7 +43,7 @@ import com.android.systemui.bouncer.domain.interactor.AlternateBouncerInteractor import com.android.systemui.bouncer.domain.interactor.PrimaryBouncerInteractor import com.android.systemui.dump.DumpManager import com.android.systemui.flags.FeatureFlags -import com.android.systemui.keyguard.ui.viewmodel.UdfpsKeyguardViewModels +import com.android.systemui.keyguard.domain.interactor.KeyguardTransitionInteractor import com.android.systemui.plugins.statusbar.StatusBarStateController import com.android.systemui.res.R import com.android.systemui.statusbar.LockscreenShadeTransitionController @@ -68,7 +68,6 @@ import org.mockito.Mock import org.mockito.Mockito.mock import org.mockito.Mockito.verify import org.mockito.junit.MockitoJUnit -import javax.inject.Provider import org.mockito.Mockito.`when` as whenever private const val REQUEST_ID = 2L @@ -111,11 +110,10 @@ class UdfpsControllerOverlayTest : SysuiTestCase() { @Mock private lateinit var featureFlags: FeatureFlags @Mock private lateinit var primaryBouncerInteractor: PrimaryBouncerInteractor @Mock private lateinit var alternateBouncerInteractor: AlternateBouncerInteractor - @Mock private lateinit var udfpsUtils: UdfpsUtils @Mock private lateinit var mSelectedUserInteractor: SelectedUserInteractor @Mock private lateinit var udfpsKeyguardAccessibilityDelegate: UdfpsKeyguardAccessibilityDelegate - @Mock private lateinit var udfpsKeyguardViewModels: Provider<UdfpsKeyguardViewModels> + @Mock private lateinit var keyguardTransitionInteractor: KeyguardTransitionInteractor @Captor private lateinit var layoutParamsCaptor: ArgumentCaptor<WindowManager.LayoutParams> private val onTouch = { _: View, _: MotionEvent, _: Boolean -> true } @@ -164,7 +162,7 @@ class UdfpsControllerOverlayTest : SysuiTestCase() { alternateBouncerInteractor, isDebuggable, udfpsKeyguardAccessibilityDelegate, - udfpsKeyguardViewModels, + keyguardTransitionInteractor, mSelectedUserInteractor, ) block() diff --git a/packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsControllerTest.java b/packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsControllerTest.java index 675ca639493e..c8c400de5740 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsControllerTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsControllerTest.java @@ -86,6 +86,7 @@ import com.android.systemui.dump.DumpManager; import com.android.systemui.flags.FeatureFlags; import com.android.systemui.keyguard.ScreenLifecycle; import com.android.systemui.keyguard.domain.interactor.KeyguardFaceAuthInteractor; +import com.android.systemui.keyguard.domain.interactor.KeyguardTransitionInteractor; import com.android.systemui.keyguard.ui.viewmodel.UdfpsKeyguardViewModels; import com.android.systemui.log.SessionTracker; import com.android.systemui.plugins.FalsingManager; @@ -237,6 +238,8 @@ public class UdfpsControllerTest extends SysuiTestCase { private ViewRootImpl mViewRootImpl; @Mock private FpsUnlockTracker mFpsUnlockTracker; + @Mock + private KeyguardTransitionInteractor mKeyguardTransitionInteractor; @Before public void setUp() { @@ -329,7 +332,8 @@ public class UdfpsControllerTest extends SysuiTestCase { mUdfpsKeyguardAccessibilityDelegate, mUdfpsKeyguardViewModels, mSelectedUserInteractor, - mFpsUnlockTracker + mFpsUnlockTracker, + mKeyguardTransitionInteractor ); verify(mFingerprintManager).setUdfpsOverlayController(mOverlayCaptor.capture()); mOverlayController = mOverlayCaptor.getValue(); diff --git a/packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsKeyguardViewLegacyControllerBaseTest.java b/packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsKeyguardViewLegacyControllerBaseTest.java index 2c4e1362bed3..2ea803c6aa8f 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsKeyguardViewLegacyControllerBaseTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsKeyguardViewLegacyControllerBaseTest.java @@ -31,6 +31,7 @@ import com.android.systemui.bouncer.domain.interactor.PrimaryBouncerInteractor; import com.android.systemui.dump.DumpManager; import com.android.systemui.flags.FakeFeatureFlags; import com.android.systemui.keyguard.KeyguardViewMediator; +import com.android.systemui.keyguard.domain.interactor.KeyguardTransitionInteractor; import com.android.systemui.plugins.statusbar.StatusBarStateController; import com.android.systemui.shade.ShadeExpansionChangeEvent; import com.android.systemui.shade.ShadeExpansionStateManager; @@ -71,6 +72,7 @@ public class UdfpsKeyguardViewLegacyControllerBaseTest extends SysuiTestCase { protected @Mock AlternateBouncerInteractor mAlternateBouncerInteractor; protected @Mock UdfpsKeyguardAccessibilityDelegate mUdfpsKeyguardAccessibilityDelegate; protected @Mock SelectedUserInteractor mSelectedUserInteractor; + protected @Mock KeyguardTransitionInteractor mKeyguardTransitionInteractor; protected FakeFeatureFlags mFeatureFlags = new FakeFeatureFlags(); @@ -141,11 +143,11 @@ public class UdfpsKeyguardViewLegacyControllerBaseTest extends SysuiTestCase { mDialogManager, mUdfpsController, mActivityLaunchAnimator, - mFeatureFlags, mPrimaryBouncerInteractor, mAlternateBouncerInteractor, mUdfpsKeyguardAccessibilityDelegate, - mSelectedUserInteractor); + mSelectedUserInteractor, + mKeyguardTransitionInteractor); return controller; } } diff --git a/packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsKeyguardViewLegacyControllerTest.java b/packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsKeyguardViewLegacyControllerTest.java index 21928cd606ed..98d8b054716c 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsKeyguardViewLegacyControllerTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsKeyguardViewLegacyControllerTest.java @@ -66,17 +66,12 @@ public class UdfpsKeyguardViewLegacyControllerTest extends public void testViewControllerQueriesSBStateOnAttached() { mController.onViewAttached(); verify(mStatusBarStateController).getState(); - verify(mStatusBarStateController).getDozeAmount(); - final float dozeAmount = .88f; when(mStatusBarStateController.getState()).thenReturn(StatusBarState.SHADE_LOCKED); - when(mStatusBarStateController.getDozeAmount()).thenReturn(dozeAmount); captureStatusBarStateListeners(); mController.onViewAttached(); verify(mView, atLeast(1)).setPauseAuth(true); - verify(mView).onDozeAmountChanged(dozeAmount, dozeAmount, - UdfpsKeyguardViewLegacy.ANIMATION_BETWEEN_AOD_AND_LOCKSCREEN); } @Test @@ -91,19 +86,6 @@ public class UdfpsKeyguardViewLegacyControllerTest extends } @Test - public void testDozeEventsSentToView() { - mController.onViewAttached(); - captureStatusBarStateListeners(); - - final float linear = .55f; - final float eased = .65f; - mStatusBarStateListener.onDozeAmountChanged(linear, eased); - - verify(mView).onDozeAmountChanged(linear, eased, - UdfpsKeyguardViewLegacy.ANIMATION_BETWEEN_AOD_AND_LOCKSCREEN); - } - - @Test public void testShouldPauseAuthUnpausedAlpha0() { mController.onViewAttached(); captureStatusBarStateListeners(); diff --git a/packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsKeyguardViewLegacyControllerWithCoroutinesTest.kt b/packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsKeyguardViewLegacyControllerWithCoroutinesTest.kt index 97dada27f8c0..9bff88bbf2dd 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsKeyguardViewLegacyControllerWithCoroutinesTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/biometrics/UdfpsKeyguardViewLegacyControllerWithCoroutinesTest.kt @@ -21,6 +21,7 @@ import android.testing.TestableLooper import androidx.test.ext.junit.runners.AndroidJUnit4 import androidx.test.filters.SmallTest import com.android.keyguard.KeyguardSecurityModel +import com.android.systemui.biometrics.data.repository.FakeFingerprintPropertyRepository import com.android.systemui.bouncer.data.repository.KeyguardBouncerRepository import com.android.systemui.bouncer.data.repository.KeyguardBouncerRepositoryImpl import com.android.systemui.bouncer.domain.interactor.AlternateBouncerInteractor @@ -31,7 +32,12 @@ import com.android.systemui.bouncer.ui.BouncerView import com.android.systemui.classifier.FalsingCollector import com.android.systemui.keyguard.DismissCallbackRegistry import com.android.systemui.keyguard.data.repository.BiometricSettingsRepository +import com.android.systemui.keyguard.data.repository.FakeKeyguardTransitionRepository import com.android.systemui.keyguard.data.repository.FakeTrustRepository +import com.android.systemui.keyguard.domain.interactor.KeyguardTransitionInteractorFactory +import com.android.systemui.keyguard.shared.model.KeyguardState +import com.android.systemui.keyguard.shared.model.TransitionState +import com.android.systemui.keyguard.shared.model.TransitionStep import com.android.systemui.log.table.TableLogBuffer import com.android.systemui.plugins.statusbar.StatusBarStateController import com.android.systemui.statusbar.StatusBarState @@ -49,6 +55,7 @@ import org.junit.Before import org.junit.Test import org.junit.runner.RunWith import org.mockito.ArgumentMatchers.any +import org.mockito.ArgumentMatchers.eq import org.mockito.Mock import org.mockito.Mockito import org.mockito.Mockito.mock @@ -65,6 +72,7 @@ class UdfpsKeyguardViewLegacyControllerWithCoroutinesTest : private val testScope = TestScope(testDispatcher) private lateinit var keyguardBouncerRepository: KeyguardBouncerRepository + private lateinit var transitionRepository: FakeKeyguardTransitionRepository @Mock private lateinit var bouncerLogger: TableLogBuffer @@ -78,6 +86,7 @@ class UdfpsKeyguardViewLegacyControllerWithCoroutinesTest : testScope.backgroundScope, bouncerLogger, ) + transitionRepository = FakeKeyguardTransitionRepository() super.setUp() } @@ -103,10 +112,18 @@ class UdfpsKeyguardViewLegacyControllerWithCoroutinesTest : mock(StatusBarStateController::class.java), mock(KeyguardStateController::class.java), keyguardBouncerRepository, + FakeFingerprintPropertyRepository(), mock(BiometricSettingsRepository::class.java), mock(SystemClock::class.java), mKeyguardUpdateMonitor, + testScope.backgroundScope, ) + mKeyguardTransitionInteractor = + KeyguardTransitionInteractorFactory.create( + scope = testScope.backgroundScope, + repository = transitionRepository, + ) + .keyguardTransitionInteractor return createUdfpsKeyguardViewController(/* useModernBouncer */ true) } @@ -258,4 +275,145 @@ class UdfpsKeyguardViewLegacyControllerWithCoroutinesTest : job.cancel() } + + @Test + fun aodToLockscreen_dozeAmountChanged() = + testScope.runTest { + // GIVEN view is attached + mController.onViewAttached() + Mockito.reset(mView) + + val job = mController.listenForLockscreenAodTransitions(this) + + // WHEN transitioning from lockscreen to aod + transitionRepository.sendTransitionStep( + TransitionStep( + from = KeyguardState.LOCKSCREEN, + to = KeyguardState.AOD, + value = .3f, + transitionState = TransitionState.RUNNING + ) + ) + runCurrent() + // THEN doze amount is updated + verify(mView) + .onDozeAmountChanged( + eq(.3f), + eq(.3f), + eq(UdfpsKeyguardViewLegacy.ANIMATION_BETWEEN_AOD_AND_LOCKSCREEN) + ) + + transitionRepository.sendTransitionStep( + TransitionStep( + from = KeyguardState.LOCKSCREEN, + to = KeyguardState.AOD, + value = 1f, + transitionState = TransitionState.FINISHED + ) + ) + runCurrent() + // THEN doze amount is updated + verify(mView) + .onDozeAmountChanged( + eq(1f), + eq(1f), + eq(UdfpsKeyguardViewLegacy.ANIMATION_BETWEEN_AOD_AND_LOCKSCREEN) + ) + + job.cancel() + } + + @Test + fun lockscreenToAod_dozeAmountChanged() = + testScope.runTest { + // GIVEN view is attached + mController.onViewAttached() + Mockito.reset(mView) + + val job = mController.listenForLockscreenAodTransitions(this) + + // WHEN transitioning from lockscreen to aod + transitionRepository.sendTransitionStep( + TransitionStep( + from = KeyguardState.LOCKSCREEN, + to = KeyguardState.AOD, + value = .3f, + transitionState = TransitionState.RUNNING + ) + ) + runCurrent() + // THEN doze amount is updated + verify(mView) + .onDozeAmountChanged( + eq(.3f), + eq(.3f), + eq(UdfpsKeyguardViewLegacy.ANIMATION_BETWEEN_AOD_AND_LOCKSCREEN) + ) + + transitionRepository.sendTransitionStep( + TransitionStep( + from = KeyguardState.LOCKSCREEN, + to = KeyguardState.AOD, + value = 1f, + transitionState = TransitionState.FINISHED + ) + ) + runCurrent() + // THEN doze amount is updated + verify(mView) + .onDozeAmountChanged( + eq(1f), + eq(1f), + eq(UdfpsKeyguardViewLegacy.ANIMATION_BETWEEN_AOD_AND_LOCKSCREEN) + ) + + job.cancel() + } + + @Test + fun goneToAod_dozeAmountChanged() = + testScope.runTest { + // GIVEN view is attached + mController.onViewAttached() + Mockito.reset(mView) + + val job = mController.listenForGoneToAodTransition(this) + + // WHEN transitioning from lockscreen to aod + transitionRepository.sendTransitionStep( + TransitionStep( + from = KeyguardState.GONE, + to = KeyguardState.AOD, + value = .3f, + transitionState = TransitionState.RUNNING + ) + ) + runCurrent() + // THEN doze amount is updated + verify(mView) + .onDozeAmountChanged( + eq(.3f), + eq(.3f), + eq(UdfpsKeyguardViewLegacy.ANIMATION_UNLOCKED_SCREEN_OFF) + ) + + transitionRepository.sendTransitionStep( + TransitionStep( + from = KeyguardState.GONE, + to = KeyguardState.AOD, + value = 1f, + transitionState = TransitionState.FINISHED + ) + ) + runCurrent() + // THEN doze amount is updated + verify(mView) + .onDozeAmountChanged( + eq(1f), + eq(1f), + eq(UdfpsKeyguardViewLegacy.ANIMATION_UNLOCKED_SCREEN_OFF) + ) + + job.cancel() + } } diff --git a/packages/SystemUI/tests/src/com/android/systemui/bouncer/domain/interactor/AlternateBouncerInteractorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/bouncer/domain/interactor/AlternateBouncerInteractorTest.kt index 2d8adca04a5e..0d44ed30431f 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/bouncer/domain/interactor/AlternateBouncerInteractorTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/bouncer/domain/interactor/AlternateBouncerInteractorTest.kt @@ -19,11 +19,13 @@ package com.android.systemui.bouncer.domain.interactor import androidx.test.ext.junit.runners.AndroidJUnit4 import androidx.test.filters.SmallTest import com.android.keyguard.KeyguardUpdateMonitor +import com.android.systemui.Flags import com.android.systemui.SysuiTestCase +import com.android.systemui.biometrics.data.repository.FakeFingerprintPropertyRepository import com.android.systemui.bouncer.data.repository.KeyguardBouncerRepository import com.android.systemui.bouncer.data.repository.KeyguardBouncerRepositoryImpl +import com.android.systemui.deviceentry.shared.DeviceEntryUdfpsRefactor import com.android.systemui.keyguard.data.repository.FakeBiometricSettingsRepository -import com.android.systemui.keyguard.data.repository.FakeDeviceEntryFingerprintAuthRepository import com.android.systemui.log.table.TableLogBuffer import com.android.systemui.plugins.statusbar.StatusBarStateController import com.android.systemui.statusbar.policy.KeyguardStateController @@ -31,7 +33,7 @@ import com.android.systemui.util.mockito.whenever import com.android.systemui.util.time.FakeSystemClock import com.android.systemui.util.time.SystemClock import kotlinx.coroutines.ExperimentalCoroutinesApi -import kotlinx.coroutines.test.TestCoroutineScope +import kotlinx.coroutines.test.TestScope import org.junit.Assert.assertFalse import org.junit.Assert.assertTrue import org.junit.Before @@ -47,8 +49,7 @@ class AlternateBouncerInteractorTest : SysuiTestCase() { private lateinit var underTest: AlternateBouncerInteractor private lateinit var bouncerRepository: KeyguardBouncerRepository private lateinit var biometricSettingsRepository: FakeBiometricSettingsRepository - private lateinit var deviceEntryFingerprintAuthRepository: - FakeDeviceEntryFingerprintAuthRepository + private lateinit var fingerprintPropertyRepository: FakeFingerprintPropertyRepository @Mock private lateinit var statusBarStateController: StatusBarStateController @Mock private lateinit var keyguardStateController: KeyguardStateController @Mock private lateinit var systemClock: SystemClock @@ -61,19 +62,21 @@ class AlternateBouncerInteractorTest : SysuiTestCase() { bouncerRepository = KeyguardBouncerRepositoryImpl( FakeSystemClock(), - TestCoroutineScope(), + TestScope().backgroundScope, bouncerLogger, ) biometricSettingsRepository = FakeBiometricSettingsRepository() - deviceEntryFingerprintAuthRepository = FakeDeviceEntryFingerprintAuthRepository() + fingerprintPropertyRepository = FakeFingerprintPropertyRepository() underTest = AlternateBouncerInteractor( statusBarStateController, keyguardStateController, bouncerRepository, + fingerprintPropertyRepository, biometricSettingsRepository, systemClock, keyguardUpdateMonitor, + TestScope().backgroundScope, ) } @@ -156,7 +159,17 @@ class AlternateBouncerInteractorTest : SysuiTestCase() { } @Test + fun canShowAlternateBouncerForFingerprint_rearFps() { + mSetFlagsRule.enableFlags(Flags.FLAG_DEVICE_ENTRY_UDFPS_REFACTOR) + givenCanShowAlternateBouncer() + fingerprintPropertyRepository.supportsRearFps() // does not support alternate bouncer + + assertFalse(underTest.canShowAlternateBouncerForFingerprint()) + } + + @Test fun alternateBouncerUiAvailable_fromMultipleSources() { + mSetFlagsRule.disableFlags(Flags.FLAG_DEVICE_ENTRY_UDFPS_REFACTOR) assertFalse(bouncerRepository.alternateBouncerUIAvailable.value) // GIVEN there are two different sources indicating the alternate bouncer is available @@ -178,7 +191,12 @@ class AlternateBouncerInteractorTest : SysuiTestCase() { } private fun givenCanShowAlternateBouncer() { - bouncerRepository.setAlternateBouncerUIAvailable(true) + if (DeviceEntryUdfpsRefactor.isEnabled) { + fingerprintPropertyRepository.supportsUdfps() + } else { + bouncerRepository.setAlternateBouncerUIAvailable(true) + } + biometricSettingsRepository.setIsFingerprintAuthEnrolledAndEnabled(true) biometricSettingsRepository.setIsFingerprintAuthCurrentlyAllowed(true) whenever(keyguardUpdateMonitor.isFingerprintLockedOut).thenReturn(false) diff --git a/packages/SystemUI/tests/src/com/android/systemui/bouncer/domain/interactor/BouncerInteractorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/bouncer/domain/interactor/BouncerInteractorTest.kt index 6e2e6377db42..1e8073246f98 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/bouncer/domain/interactor/BouncerInteractorTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/bouncer/domain/interactor/BouncerInteractorTest.kt @@ -25,6 +25,7 @@ import com.android.systemui.authentication.shared.model.AuthenticationMethodMode import com.android.systemui.authentication.shared.model.AuthenticationPatternCoordinate import com.android.systemui.authentication.shared.model.AuthenticationThrottlingModel import com.android.systemui.coroutines.collectLastValue +import com.android.systemui.keyguard.domain.interactor.KeyguardFaceAuthInteractor import com.android.systemui.res.R import com.android.systemui.scene.SceneTestUtils import com.google.common.truth.Truth.assertThat @@ -37,28 +38,38 @@ import kotlinx.coroutines.test.runTest import org.junit.Before import org.junit.Test import org.junit.runner.RunWith +import org.mockito.Mock +import org.mockito.Mockito.verify +import org.mockito.MockitoAnnotations @OptIn(ExperimentalCoroutinesApi::class) @SmallTest @RunWith(AndroidJUnit4::class) class BouncerInteractorTest : SysuiTestCase() { + @Mock private lateinit var keyguardFaceAuthInteractor: KeyguardFaceAuthInteractor + private val utils = SceneTestUtils(this) private val testScope = utils.testScope private val authenticationInteractor = utils.authenticationInteractor() - private val underTest = - utils.bouncerInteractor( - authenticationInteractor = authenticationInteractor, - ) + + private lateinit var underTest: BouncerInteractor @Before fun setUp() { + MockitoAnnotations.initMocks(this) overrideResource(R.string.keyguard_enter_your_pin, MESSAGE_ENTER_YOUR_PIN) overrideResource(R.string.keyguard_enter_your_password, MESSAGE_ENTER_YOUR_PASSWORD) overrideResource(R.string.keyguard_enter_your_pattern, MESSAGE_ENTER_YOUR_PATTERN) overrideResource(R.string.kg_wrong_pin, MESSAGE_WRONG_PIN) overrideResource(R.string.kg_wrong_password, MESSAGE_WRONG_PASSWORD) overrideResource(R.string.kg_wrong_pattern, MESSAGE_WRONG_PATTERN) + + underTest = + utils.bouncerInteractor( + authenticationInteractor = authenticationInteractor, + keyguardFaceAuthInteractor = keyguardFaceAuthInteractor, + ) } @Test @@ -172,6 +183,19 @@ class BouncerInteractorTest : SysuiTestCase() { underTest.resetMessage() assertThat(message).isEqualTo(MESSAGE_ENTER_YOUR_PASSWORD) + // Too short input. + assertThat( + underTest.authenticate( + buildList { + repeat(utils.authenticationRepository.minPasswordLength - 1) { time -> + add("$time") + } + } + ) + ) + .isEqualTo(AuthenticationResult.SKIPPED) + assertThat(message).isEqualTo(MESSAGE_WRONG_PASSWORD) + // Correct input. assertThat(underTest.authenticate("password".toList())) .isEqualTo(AuthenticationResult.SUCCEEDED) @@ -312,6 +336,13 @@ class BouncerInteractorTest : SysuiTestCase() { assertThat(utils.powerRepository.userTouchRegistered).isTrue() } + @Test + fun intentionalUserInputEvent_notifiesFaceAuthInteractor() = + testScope.runTest { + underTest.onIntentionalUserInput() + verify(keyguardFaceAuthInteractor).onPrimaryBouncerUserInput() + } + private fun assertTryAgainMessage( message: String?, time: Int, diff --git a/packages/SystemUI/tests/src/com/android/systemui/bouncer/ui/viewmodel/PasswordBouncerViewModelTest.kt b/packages/SystemUI/tests/src/com/android/systemui/bouncer/ui/viewmodel/PasswordBouncerViewModelTest.kt index c498edf0e971..9b1e9585979a 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/bouncer/ui/viewmodel/PasswordBouncerViewModelTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/bouncer/ui/viewmodel/PasswordBouncerViewModelTest.kt @@ -78,12 +78,28 @@ class PasswordBouncerViewModelTest : SysuiTestCase() { lockDeviceAndOpenPasswordBouncer() assertThat(message?.text).isEqualTo(ENTER_YOUR_PASSWORD) - assertThat(password).isEqualTo("") + assertThat(password).isEmpty() assertThat(currentScene).isEqualTo(SceneModel(SceneKey.Bouncer)) assertThat(underTest.authenticationMethod).isEqualTo(AuthenticationMethodModel.Password) } @Test + fun onHidden_resetsPasswordInputAndMessage() = + testScope.runTest { + val message by collectLastValue(bouncerViewModel.message) + val password by collectLastValue(underTest.password) + lockDeviceAndOpenPasswordBouncer() + + underTest.onPasswordInputChanged("password") + assertThat(message?.text).isNotEqualTo(ENTER_YOUR_PASSWORD) + assertThat(password).isNotEmpty() + + underTest.onHidden() + assertThat(message?.text).isEqualTo(ENTER_YOUR_PASSWORD) + assertThat(password).isEmpty() + } + + @Test fun onPasswordInputChanged() = testScope.runTest { val currentScene by collectLastValue(sceneInteractor.desiredScene) @@ -121,7 +137,7 @@ class PasswordBouncerViewModelTest : SysuiTestCase() { underTest.onPasswordInputChanged("wrong") underTest.onAuthenticateKeyPressed() - assertThat(password).isEqualTo("") + assertThat(password).isEmpty() assertThat(message?.text).isEqualTo(WRONG_PASSWORD) } @@ -134,14 +150,13 @@ class PasswordBouncerViewModelTest : SysuiTestCase() { AuthenticationMethodModel.Password ) utils.deviceEntryRepository.setUnlocked(false) - sceneInteractor.changeScene(SceneModel(SceneKey.Bouncer), "reason") - sceneInteractor.onSceneChanged(SceneModel(SceneKey.Bouncer), "reason") - underTest.onShown() - // Enter nothing. + switchToScene(SceneKey.Bouncer) + + // No input entered. underTest.onAuthenticateKeyPressed() - assertThat(password).isEqualTo("") + assertThat(password).isEmpty() assertThat(message?.text).isEqualTo(ENTER_YOUR_PASSWORD) } @@ -182,32 +197,33 @@ class PasswordBouncerViewModelTest : SysuiTestCase() { assertThat(password).isEqualTo("password") // The user doesn't confirm the password, but navigates back to the lockscreen instead. - sceneInteractor.changeScene(SceneModel(SceneKey.Lockscreen), "reason") - sceneInteractor.onSceneChanged(SceneModel(SceneKey.Lockscreen), "reason") - assertThat(currentScene).isEqualTo(SceneModel(SceneKey.Lockscreen)) + switchToScene(SceneKey.Lockscreen) // The user navigates to the bouncer again. - sceneInteractor.changeScene(SceneModel(SceneKey.Bouncer), "reason") - sceneInteractor.onSceneChanged(SceneModel(SceneKey.Bouncer), "reason") - assertThat(currentScene).isEqualTo(SceneModel(SceneKey.Bouncer)) - - underTest.onShown() + switchToScene(SceneKey.Bouncer) // Ensure the previously-entered password is not shown. assertThat(password).isEmpty() assertThat(currentScene).isEqualTo(SceneModel(SceneKey.Bouncer)) } + private fun TestScope.switchToScene(toScene: SceneKey) { + val currentScene by collectLastValue(sceneInteractor.desiredScene) + val bouncerShown = currentScene?.key != SceneKey.Bouncer && toScene == SceneKey.Bouncer + val bouncerHidden = currentScene?.key == SceneKey.Bouncer && toScene != SceneKey.Bouncer + sceneInteractor.changeScene(SceneModel(toScene), "reason") + sceneInteractor.onSceneChanged(SceneModel(toScene), "reason") + if (bouncerShown) underTest.onShown() + if (bouncerHidden) underTest.onHidden() + runCurrent() + + assertThat(currentScene).isEqualTo(SceneModel(toScene)) + } + private fun TestScope.lockDeviceAndOpenPasswordBouncer() { utils.authenticationRepository.setAuthenticationMethod(AuthenticationMethodModel.Password) utils.deviceEntryRepository.setUnlocked(false) - sceneInteractor.changeScene(SceneModel(SceneKey.Bouncer), "reason") - sceneInteractor.onSceneChanged(SceneModel(SceneKey.Bouncer), "reason") - - assertThat(collectLastValue(sceneInteractor.desiredScene).invoke()) - .isEqualTo(SceneModel(SceneKey.Bouncer)) - underTest.onShown() - runCurrent() + switchToScene(SceneKey.Bouncer) } companion object { diff --git a/packages/SystemUI/tests/src/com/android/systemui/bouncer/ui/viewmodel/PatternBouncerViewModelTest.kt b/packages/SystemUI/tests/src/com/android/systemui/bouncer/ui/viewmodel/PatternBouncerViewModelTest.kt index 3f5ddba23165..125fe680db21 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/bouncer/ui/viewmodel/PatternBouncerViewModelTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/bouncer/ui/viewmodel/PatternBouncerViewModelTest.kt @@ -373,15 +373,23 @@ class PatternBouncerViewModelTest : SysuiTestCase() { ) } + private fun TestScope.switchToScene(toScene: SceneKey) { + val currentScene by collectLastValue(sceneInteractor.desiredScene) + val bouncerShown = currentScene?.key != SceneKey.Bouncer && toScene == SceneKey.Bouncer + val bouncerHidden = currentScene?.key == SceneKey.Bouncer && toScene != SceneKey.Bouncer + sceneInteractor.changeScene(SceneModel(toScene), "reason") + sceneInteractor.onSceneChanged(SceneModel(toScene), "reason") + if (bouncerShown) underTest.onShown() + if (bouncerHidden) underTest.onHidden() + runCurrent() + + assertThat(currentScene).isEqualTo(SceneModel(toScene)) + } + private fun TestScope.lockDeviceAndOpenPatternBouncer() { utils.authenticationRepository.setAuthenticationMethod(AuthenticationMethodModel.Pattern) utils.deviceEntryRepository.setUnlocked(false) - sceneInteractor.changeScene(SceneModel(SceneKey.Bouncer), "reason") - sceneInteractor.onSceneChanged(SceneModel(SceneKey.Bouncer), "reason") - assertThat(collectLastValue(sceneInteractor.desiredScene).invoke()) - .isEqualTo(SceneModel(SceneKey.Bouncer)) - underTest.onShown() - runCurrent() + switchToScene(SceneKey.Bouncer) } companion object { diff --git a/packages/SystemUI/tests/src/com/android/systemui/bouncer/ui/viewmodel/PinBouncerViewModelTest.kt b/packages/SystemUI/tests/src/com/android/systemui/bouncer/ui/viewmodel/PinBouncerViewModelTest.kt index 52844cf7f79a..c30e405ab911 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/bouncer/ui/viewmodel/PinBouncerViewModelTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/bouncer/ui/viewmodel/PinBouncerViewModelTest.kt @@ -76,20 +76,12 @@ class PinBouncerViewModelTest : SysuiTestCase() { @Test fun onShown() = testScope.runTest { - val currentScene by collectLastValue(sceneInteractor.desiredScene) val message by collectLastValue(bouncerViewModel.message) val pin by collectLastValue(underTest.pinInput.map { it.getPin() }) - utils.deviceEntryRepository.setUnlocked(false) - sceneInteractor.changeScene(SceneModel(SceneKey.Bouncer), "reason") - sceneInteractor.onSceneChanged(SceneModel(SceneKey.Bouncer), "reason") - - assertThat(currentScene).isEqualTo(SceneModel(SceneKey.Bouncer)) - - underTest.onShown() + lockDeviceAndOpenPinBouncer() assertThat(message?.text).ignoringCase().isEqualTo(ENTER_YOUR_PIN) assertThat(pin).isEmpty() - assertThat(currentScene).isEqualTo(SceneModel(SceneKey.Bouncer)) assertThat(underTest.authenticationMethod).isEqualTo(AuthenticationMethodModel.Pin) } @@ -142,29 +134,19 @@ class PinBouncerViewModelTest : SysuiTestCase() { @Test fun onPinButtonClicked() = testScope.runTest { - val currentScene by collectLastValue(sceneInteractor.desiredScene) val message by collectLastValue(bouncerViewModel.message) val pin by collectLastValue(underTest.pinInput.map { it.getPin() }) - utils.authenticationRepository.setAuthenticationMethod(AuthenticationMethodModel.Pin) - utils.deviceEntryRepository.setUnlocked(false) - sceneInteractor.changeScene(SceneModel(SceneKey.Bouncer), "reason") - sceneInteractor.onSceneChanged(SceneModel(SceneKey.Bouncer), "reason") - - assertThat(currentScene).isEqualTo(SceneModel(SceneKey.Bouncer)) - underTest.onShown() - runCurrent() + lockDeviceAndOpenPinBouncer() underTest.onPinButtonClicked(1) assertThat(message?.text).isEmpty() assertThat(pin).containsExactly(1) - assertThat(currentScene).isEqualTo(SceneModel(SceneKey.Bouncer)) } @Test fun onBackspaceButtonClicked() = testScope.runTest { - val currentScene by collectLastValue(sceneInteractor.desiredScene) val message by collectLastValue(bouncerViewModel.message) val pin by collectLastValue(underTest.pinInput.map { it.getPin() }) lockDeviceAndOpenPinBouncer() @@ -176,7 +158,6 @@ class PinBouncerViewModelTest : SysuiTestCase() { assertThat(message?.text).isEmpty() assertThat(pin).isEmpty() - assertThat(currentScene).isEqualTo(SceneModel(SceneKey.Bouncer)) } @Test @@ -224,9 +205,7 @@ class PinBouncerViewModelTest : SysuiTestCase() { collectLastValue(authenticationInteractor.authenticationChallengeResult) lockDeviceAndOpenPinBouncer() - FakeAuthenticationRepository.DEFAULT_PIN.forEach { digit -> - underTest.onPinButtonClicked(digit) - } + FakeAuthenticationRepository.DEFAULT_PIN.forEach(underTest::onPinButtonClicked) underTest.onAuthenticateButtonClicked() @@ -274,9 +253,7 @@ class PinBouncerViewModelTest : SysuiTestCase() { assertThat(authResult).isFalse() // Enter the correct PIN: - FakeAuthenticationRepository.DEFAULT_PIN.forEach { digit -> - underTest.onPinButtonClicked(digit) - } + FakeAuthenticationRepository.DEFAULT_PIN.forEach(underTest::onPinButtonClicked) assertThat(message?.text).isEmpty() underTest.onAuthenticateButtonClicked() @@ -292,9 +269,7 @@ class PinBouncerViewModelTest : SysuiTestCase() { collectLastValue(authenticationInteractor.authenticationChallengeResult) lockDeviceAndOpenPinBouncer() - FakeAuthenticationRepository.DEFAULT_PIN.forEach { digit -> - underTest.onPinButtonClicked(digit) - } + FakeAuthenticationRepository.DEFAULT_PIN.forEach(underTest::onPinButtonClicked) assertThat(authResult).isTrue() } @@ -323,31 +298,21 @@ class PinBouncerViewModelTest : SysuiTestCase() { @Test fun onShown_againAfterSceneChange_resetsPin() = testScope.runTest { - val currentScene by collectLastValue(sceneInteractor.desiredScene) val pin by collectLastValue(underTest.pinInput.map { it.getPin() }) lockDeviceAndOpenPinBouncer() // The user types a PIN. - FakeAuthenticationRepository.DEFAULT_PIN.forEach { digit -> - underTest.onPinButtonClicked(digit) - } + FakeAuthenticationRepository.DEFAULT_PIN.forEach(underTest::onPinButtonClicked) assertThat(pin).isNotEmpty() // The user doesn't confirm the PIN, but navigates back to the lockscreen instead. - sceneInteractor.changeScene(SceneModel(SceneKey.Lockscreen), "reason") - sceneInteractor.onSceneChanged(SceneModel(SceneKey.Lockscreen), "reason") - assertThat(currentScene).isEqualTo(SceneModel(SceneKey.Lockscreen)) + switchToScene(SceneKey.Lockscreen) // The user navigates to the bouncer again. - sceneInteractor.changeScene(SceneModel(SceneKey.Bouncer), "reason") - sceneInteractor.onSceneChanged(SceneModel(SceneKey.Bouncer), "reason") - assertThat(currentScene).isEqualTo(SceneModel(SceneKey.Bouncer)) - - underTest.onShown() + switchToScene(SceneKey.Bouncer) // Ensure the previously-entered PIN is not shown. assertThat(pin).isEmpty() - assertThat(currentScene).isEqualTo(SceneModel(SceneKey.Bouncer)) } @Test @@ -414,16 +379,23 @@ class PinBouncerViewModelTest : SysuiTestCase() { assertThat(isAnimationEnabled).isTrue() } + private fun TestScope.switchToScene(toScene: SceneKey) { + val currentScene by collectLastValue(sceneInteractor.desiredScene) + val bouncerShown = currentScene?.key != SceneKey.Bouncer && toScene == SceneKey.Bouncer + val bouncerHidden = currentScene?.key == SceneKey.Bouncer && toScene != SceneKey.Bouncer + sceneInteractor.changeScene(SceneModel(toScene), "reason") + sceneInteractor.onSceneChanged(SceneModel(toScene), "reason") + if (bouncerShown) underTest.onShown() + if (bouncerHidden) underTest.onHidden() + runCurrent() + + assertThat(currentScene).isEqualTo(SceneModel(toScene)) + } + private fun TestScope.lockDeviceAndOpenPinBouncer() { utils.authenticationRepository.setAuthenticationMethod(AuthenticationMethodModel.Pin) utils.deviceEntryRepository.setUnlocked(false) - sceneInteractor.changeScene(SceneModel(SceneKey.Bouncer), "reason") - sceneInteractor.onSceneChanged(SceneModel(SceneKey.Bouncer), "reason") - - assertThat(collectLastValue(sceneInteractor.desiredScene).invoke()) - .isEqualTo(SceneModel(SceneKey.Bouncer)) - underTest.onShown() - runCurrent() + switchToScene(SceneKey.Bouncer) } companion object { diff --git a/packages/SystemUI/tests/src/com/android/systemui/communal/domain/interactor/CommunalInteractorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/communal/domain/interactor/CommunalInteractorTest.kt index af4bf367c466..e0567a4c6de5 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/communal/domain/interactor/CommunalInteractorTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/communal/domain/interactor/CommunalInteractorTest.kt @@ -31,6 +31,7 @@ import com.android.systemui.communal.data.repository.FakeCommunalWidgetRepositor import com.android.systemui.communal.domain.model.CommunalContentModel import com.android.systemui.communal.shared.model.CommunalSceneKey import com.android.systemui.communal.shared.model.CommunalWidgetContentModel +import com.android.systemui.communal.widgets.EditWidgetsActivityStarter import com.android.systemui.coroutines.collectLastValue import com.android.systemui.keyguard.data.repository.FakeKeyguardRepository import com.android.systemui.smartspace.data.repository.FakeSmartspaceRepository @@ -45,6 +46,7 @@ import org.junit.Before import org.junit.Test import org.junit.runner.RunWith import org.mockito.Mockito.mock +import org.mockito.Mockito.verify import org.mockito.MockitoAnnotations @SmallTest @@ -59,6 +61,7 @@ class CommunalInteractorTest : SysuiTestCase() { private lateinit var widgetRepository: FakeCommunalWidgetRepository private lateinit var smartspaceRepository: FakeSmartspaceRepository private lateinit var keyguardRepository: FakeKeyguardRepository + private lateinit var editWidgetsActivityStarter: EditWidgetsActivityStarter private lateinit var underTest: CommunalInteractor @@ -76,6 +79,7 @@ class CommunalInteractorTest : SysuiTestCase() { widgetRepository = withDeps.widgetRepository smartspaceRepository = withDeps.smartspaceRepository keyguardRepository = withDeps.keyguardRepository + editWidgetsActivityStarter = withDeps.editWidgetsActivityStarter underTest = withDeps.communalInteractor } @@ -322,4 +326,11 @@ class CommunalInteractorTest : SysuiTestCase() { runCurrent() assertThat(isCommunalShowing()).isEqualTo(true) } + + @Test + fun testShowWidgetEditorStartsActivity() = + testScope.runTest { + underTest.showWidgetEditor() + verify(editWidgetsActivityStarter).startActivity() + } } diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/data/repository/DeviceEntryFaceAuthRepositoryTest.kt b/packages/SystemUI/tests/src/com/android/systemui/keyguard/data/repository/DeviceEntryFaceAuthRepositoryTest.kt index 8d9bc751fbc9..0b148d14a43f 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/keyguard/data/repository/DeviceEntryFaceAuthRepositoryTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/data/repository/DeviceEntryFaceAuthRepositoryTest.kt @@ -45,6 +45,7 @@ import com.android.keyguard.KeyguardUpdateMonitor import com.android.systemui.SysuiTestCase import com.android.systemui.biometrics.data.repository.FakeDisplayStateRepository import com.android.systemui.biometrics.data.repository.FakeFacePropertyRepository +import com.android.systemui.biometrics.data.repository.FakeFingerprintPropertyRepository import com.android.systemui.biometrics.domain.interactor.DisplayStateInteractor import com.android.systemui.biometrics.domain.interactor.DisplayStateInteractorImpl import com.android.systemui.bouncer.data.repository.FakeKeyguardBouncerRepository @@ -223,11 +224,13 @@ class DeviceEntryFaceAuthRepositoryTest : SysuiTestCase() { alternateBouncerInteractor = AlternateBouncerInteractor( bouncerRepository = bouncerRepository, + fingerprintPropertyRepository = FakeFingerprintPropertyRepository(), biometricSettingsRepository = biometricSettingsRepository, systemClock = mock(SystemClock::class.java), keyguardStateController = FakeKeyguardStateController(), statusBarStateController = mock(StatusBarStateController::class.java), keyguardUpdateMonitor = keyguardUpdateMonitor, + scope = testScope.backgroundScope, ) displayRepository = FakeDisplayRepository() diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/data/repository/LightRevealScrimRepositoryTest.kt b/packages/SystemUI/tests/src/com/android/systemui/keyguard/data/repository/LightRevealScrimRepositoryTest.kt index 799bd5ac5739..7242cb20dc77 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/keyguard/data/repository/LightRevealScrimRepositoryTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/data/repository/LightRevealScrimRepositoryTest.kt @@ -31,6 +31,7 @@ import com.android.systemui.power.domain.interactor.PowerInteractor.Companion.se import com.android.systemui.power.domain.interactor.PowerInteractorFactory import com.android.systemui.statusbar.CircleReveal import com.android.systemui.statusbar.LightRevealEffect +import com.android.systemui.util.mockito.mock import junit.framework.Assert.assertEquals import junit.framework.Assert.assertFalse import kotlinx.coroutines.ExperimentalCoroutinesApi @@ -60,15 +61,11 @@ class LightRevealScrimRepositoryTest : SysuiTestCase() { MockitoAnnotations.initMocks(this) fakeKeyguardRepository = FakeKeyguardRepository() powerRepository = FakePowerRepository() - powerInteractor = PowerInteractorFactory.create( - repository = powerRepository - ).powerInteractor - - underTest = LightRevealScrimRepositoryImpl( - fakeKeyguardRepository, - context, - powerInteractor, - ) + powerInteractor = + PowerInteractorFactory.create(repository = powerRepository).powerInteractor + + underTest = + LightRevealScrimRepositoryImpl(fakeKeyguardRepository, context, powerInteractor, mock()) } @Test diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/FromLockscreenTransitionInteractorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/FromLockscreenTransitionInteractorTest.kt index b439fcf8c98a..722c11d9f34c 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/FromLockscreenTransitionInteractorTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/FromLockscreenTransitionInteractorTest.kt @@ -18,9 +18,9 @@ package com.android.systemui.keyguard.domain.interactor import androidx.test.ext.junit.runners.AndroidJUnit4 import androidx.test.filters.SmallTest -import com.android.SysUITestModule -import com.android.TestMocksModule +import com.android.systemui.SysUITestModule import com.android.systemui.SysuiTestCase +import com.android.systemui.TestMocksModule import com.android.systemui.coroutines.collectValues import com.android.systemui.dagger.SysUISingleton import com.android.systemui.keyguard.data.repository.FakeKeyguardSurfaceBehindRepository diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/InWindowLauncherUnlockAnimationInteractorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/InWindowLauncherUnlockAnimationInteractorTest.kt index 7fb0dd55eef2..49f7565517da 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/InWindowLauncherUnlockAnimationInteractorTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/InWindowLauncherUnlockAnimationInteractorTest.kt @@ -18,9 +18,9 @@ package com.android.systemui.keyguard.domain.interactor import androidx.test.ext.junit.runners.AndroidJUnit4 import androidx.test.filters.SmallTest -import com.android.SysUITestModule -import com.android.TestMocksModule +import com.android.systemui.SysUITestModule import com.android.systemui.SysuiTestCase +import com.android.systemui.TestMocksModule import com.android.systemui.coroutines.collectValues import com.android.systemui.dagger.SysUISingleton import com.android.systemui.keyguard.data.repository.FakeKeyguardSurfaceBehindRepository @@ -413,6 +413,13 @@ class InWindowLauncherUnlockAnimationInteractorTest : SysuiTestCase() { ) transitionRepository.sendTransitionStep( TransitionStep( + transitionState = TransitionState.CANCELED, + from = KeyguardState.LOCKSCREEN, + to = KeyguardState.GONE, + ) + ) + transitionRepository.sendTransitionStep( + TransitionStep( transitionState = TransitionState.STARTED, from = KeyguardState.GONE, to = KeyguardState.AOD, diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/KeyguardFaceAuthInteractorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/KeyguardFaceAuthInteractorTest.kt index e45f56a44b67..f2de8caef176 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/KeyguardFaceAuthInteractorTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/KeyguardFaceAuthInteractorTest.kt @@ -30,6 +30,7 @@ import com.android.keyguard.KeyguardUpdateMonitor import com.android.systemui.SysuiTestCase import com.android.systemui.biometrics.data.repository.FaceSensorInfo import com.android.systemui.biometrics.data.repository.FakeFacePropertyRepository +import com.android.systemui.biometrics.data.repository.FakeFingerprintPropertyRepository import com.android.systemui.biometrics.shared.model.LockoutMode import com.android.systemui.biometrics.shared.model.SensorStrength import com.android.systemui.bouncer.data.repository.FakeKeyguardBouncerRepository @@ -153,9 +154,11 @@ class KeyguardFaceAuthInteractorTest : SysuiTestCase() { mock(StatusBarStateController::class.java), mock(KeyguardStateController::class.java), bouncerRepository, + FakeFingerprintPropertyRepository(), fakeBiometricSettingsRepository, FakeSystemClock(), keyguardUpdateMonitor, + testScope.backgroundScope, ), keyguardTransitionInteractor, featureFlags, diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/KeyguardTransitionInteractorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/KeyguardTransitionInteractorTest.kt index 29b546bd49ad..4f7d9444020c 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/KeyguardTransitionInteractorTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/KeyguardTransitionInteractorTest.kt @@ -26,13 +26,14 @@ import com.android.systemui.keyguard.shared.model.KeyguardState.AOD import com.android.systemui.keyguard.shared.model.KeyguardState.DOZING import com.android.systemui.keyguard.shared.model.KeyguardState.GONE import com.android.systemui.keyguard.shared.model.KeyguardState.LOCKSCREEN -import com.android.systemui.keyguard.shared.model.KeyguardState.OFF import com.android.systemui.keyguard.shared.model.KeyguardState.PRIMARY_BOUNCER +import com.android.systemui.keyguard.shared.model.TransitionState.CANCELED import com.android.systemui.keyguard.shared.model.TransitionState.FINISHED import com.android.systemui.keyguard.shared.model.TransitionState.RUNNING import com.android.systemui.keyguard.shared.model.TransitionState.STARTED import com.android.systemui.keyguard.shared.model.TransitionStep import com.google.common.truth.Truth.assertThat +import junit.framework.Assert.assertEquals import kotlinx.coroutines.test.TestScope import kotlinx.coroutines.test.runCurrent import kotlinx.coroutines.test.runTest @@ -136,7 +137,7 @@ class KeyguardTransitionInteractorTest : SysuiTestCase() { @Test fun startedKeyguardStateTests() = testScope.runTest { - val finishedSteps by collectValues(underTest.startedKeyguardState) + val startedStates by collectValues(underTest.startedKeyguardState) runCurrent() val steps = mutableListOf<TransitionStep>() @@ -153,7 +154,7 @@ class KeyguardTransitionInteractorTest : SysuiTestCase() { runCurrent() } - assertThat(finishedSteps).isEqualTo(listOf(OFF, PRIMARY_BOUNCER, AOD, GONE)) + assertThat(startedStates).isEqualTo(listOf(LOCKSCREEN, PRIMARY_BOUNCER, AOD, GONE)) } @Test @@ -162,12 +163,12 @@ class KeyguardTransitionInteractorTest : SysuiTestCase() { val steps = mutableListOf<TransitionStep>() - steps.add(TransitionStep(AOD, LOCKSCREEN, 0f, STARTED)) - steps.add(TransitionStep(AOD, LOCKSCREEN, 0.5f, RUNNING)) - steps.add(TransitionStep(AOD, LOCKSCREEN, 1f, FINISHED)) steps.add(TransitionStep(LOCKSCREEN, AOD, 0f, STARTED)) steps.add(TransitionStep(LOCKSCREEN, AOD, 0.9f, RUNNING)) steps.add(TransitionStep(LOCKSCREEN, AOD, 1f, FINISHED)) + steps.add(TransitionStep(AOD, LOCKSCREEN, 0f, STARTED)) + steps.add(TransitionStep(AOD, LOCKSCREEN, 0.5f, RUNNING)) + steps.add(TransitionStep(AOD, LOCKSCREEN, 1f, FINISHED)) steps.add(TransitionStep(AOD, GONE, 1f, STARTED)) steps.forEach { @@ -175,7 +176,9 @@ class KeyguardTransitionInteractorTest : SysuiTestCase() { runCurrent() } - assertThat(finishedSteps).isEqualTo(listOf(steps[2], steps[5])) + // Ignore the default state. + assertThat(finishedSteps.subList(1, finishedSteps.size)) + .isEqualTo(listOf(steps[2], steps[5])) } @Test @@ -650,6 +653,81 @@ class KeyguardTransitionInteractorTest : SysuiTestCase() { )) } + @Test + fun finishedKeyguardState_emitsAgainIfCancelledAndReversed() = testScope.runTest { + val finishedStates by collectValues(underTest.finishedKeyguardState) + + // We default FINISHED in LOCKSCREEN. + assertEquals(listOf( + LOCKSCREEN + ), finishedStates) + + sendSteps( + TransitionStep(LOCKSCREEN, AOD, 0f, STARTED), + TransitionStep(LOCKSCREEN, AOD, 0.5f, RUNNING), + TransitionStep(LOCKSCREEN, AOD, 1f, FINISHED), + ) + + // We're FINISHED in AOD. + assertEquals(listOf( + LOCKSCREEN, + AOD, + ), finishedStates) + + // Transition back to LOCKSCREEN. + sendSteps( + TransitionStep(AOD, LOCKSCREEN, 0f, STARTED), + TransitionStep(AOD, LOCKSCREEN, 0.5f, RUNNING), + TransitionStep(AOD, LOCKSCREEN, 1f, FINISHED), + ) + + // We're FINISHED in LOCKSCREEN. + assertEquals(listOf( + LOCKSCREEN, + AOD, + LOCKSCREEN, + ), finishedStates) + + sendSteps( + TransitionStep(LOCKSCREEN, GONE, 0f, STARTED), + TransitionStep(LOCKSCREEN, GONE, 0.5f, RUNNING), + ) + + // We've STARTED a transition to GONE but not yet finished it so we're still FINISHED in + // LOCKSCREEN. + assertEquals(listOf( + LOCKSCREEN, + AOD, + LOCKSCREEN, + ), finishedStates) + + sendSteps( + TransitionStep(LOCKSCREEN, GONE, 0.6f, CANCELED), + ) + + // We've CANCELED a transition to GONE, we're still FINISHED in LOCKSCREEN. + assertEquals(listOf( + LOCKSCREEN, + AOD, + LOCKSCREEN, + ), finishedStates) + + sendSteps( + TransitionStep(GONE, LOCKSCREEN, 0.6f, STARTED), + TransitionStep(GONE, LOCKSCREEN, 0.9f, RUNNING), + TransitionStep(GONE, LOCKSCREEN, 1f, FINISHED), + ) + + // Expect another emission of LOCKSCREEN, as we have FINISHED a second transition to + // LOCKSCREEN after the cancellation. + assertEquals(listOf( + LOCKSCREEN, + AOD, + LOCKSCREEN, + LOCKSCREEN, + ), finishedStates) + } + private suspend fun sendSteps(vararg steps: TransitionStep) { steps.forEach { repository.sendTransitionStep(it) diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/KeyguardTransitionScenariosTest.kt b/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/KeyguardTransitionScenariosTest.kt index c29210270caf..bf23bf875ad3 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/KeyguardTransitionScenariosTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/KeyguardTransitionScenariosTest.kt @@ -618,11 +618,26 @@ class KeyguardTransitionScenariosTest : SysuiTestCase() { @Test fun dozingToLockscreenCannotBeInterruptedByDreaming() = testScope.runTest { + transitionRepository.sendTransitionSteps( + KeyguardState.LOCKSCREEN, + KeyguardState.DOZING, + testScheduler + ) // GIVEN a prior transition has started to LOCKSCREEN transitionRepository.sendTransitionStep( TransitionStep( from = KeyguardState.DOZING, to = KeyguardState.LOCKSCREEN, + value = 0f, + transitionState = TransitionState.STARTED, + ownerName = "KeyguardTransitionScenariosTest", + ) + ) + runCurrent() + transitionRepository.sendTransitionStep( + TransitionStep( + from = KeyguardState.DOZING, + to = KeyguardState.LOCKSCREEN, value = 0.5f, transitionState = TransitionState.RUNNING, ownerName = "KeyguardTransitionScenariosTest", diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/LightRevealScrimInteractorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/LightRevealScrimInteractorTest.kt index c02add1d0ecb..b483085cf1e5 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/LightRevealScrimInteractorTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/LightRevealScrimInteractorTest.kt @@ -26,6 +26,7 @@ import com.android.systemui.keyguard.shared.model.TransitionState import com.android.systemui.keyguard.shared.model.TransitionStep import com.android.systemui.statusbar.LightRevealEffect import com.android.systemui.statusbar.LightRevealScrim +import com.android.systemui.util.mockito.mock import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.flow.launchIn import kotlinx.coroutines.flow.onEach @@ -39,6 +40,7 @@ import org.junit.Test import org.junit.runner.RunWith import org.mockito.Mockito.anyBoolean import org.mockito.Mockito.never +import org.mockito.Mockito.reset import org.mockito.Mockito.verify import org.mockito.MockitoAnnotations import org.mockito.Spy @@ -79,7 +81,8 @@ class LightRevealScrimInteractorTest : SysuiTestCase() { LightRevealScrimInteractor( keyguardTransitionInteractor, fakeLightRevealScrimRepository, - testScope.backgroundScope + testScope.backgroundScope, + mock() ) } @@ -120,6 +123,9 @@ class LightRevealScrimInteractorTest : SysuiTestCase() { @Test fun lightRevealEffect_startsAnimationOnlyForDifferentStateTargets() = testScope.runTest { + runCurrent() + reset(fakeLightRevealScrimRepository) + fakeKeyguardTransitionRepository.sendTransitionStep( TransitionStep( transitionState = TransitionState.STARTED, diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/OccludingAppDeviceEntryInteractorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/OccludingAppDeviceEntryInteractorTest.kt index f9362a773fc5..91e17059bb3d 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/OccludingAppDeviceEntryInteractorTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/OccludingAppDeviceEntryInteractorTest.kt @@ -153,9 +153,11 @@ class OccludingAppDeviceEntryInteractorTest : SysuiTestCase() { statusBarStateController = mock(), keyguardStateController = mock(), bouncerRepository, + FakeFingerprintPropertyRepository(), biometricSettingsRepository, FakeSystemClock(), keyguardUpdateMonitor, + scope = testScope.backgroundScope, ), testScope.backgroundScope, mockedContext, diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/UdfpsKeyguardInteractorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/UdfpsKeyguardInteractorTest.kt index 2dfc13258d63..16d072e99964 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/UdfpsKeyguardInteractorTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/UdfpsKeyguardInteractorTest.kt @@ -80,11 +80,7 @@ class UdfpsKeyguardInteractorTest : SysuiTestCase() { MockitoAnnotations.initMocks(this) testScope = TestScope() configRepository = FakeConfigurationRepository() - featureFlags = - FakeFeatureFlags().apply { - set(Flags.REFACTOR_UDFPS_KEYGUARD_VIEWS, true) - set(Flags.FACE_AUTH_REFACTOR, false) - } + featureFlags = FakeFeatureFlags().apply { set(Flags.FACE_AUTH_REFACTOR, false) } KeyguardInteractorFactory.create(featureFlags = featureFlags).let { keyguardInteractor = it.keyguardInteractor keyguardRepository = it.repository diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/binder/InWindowLauncherUnlockAnimationManagerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/binder/InWindowLauncherUnlockAnimationManagerTest.kt index 570dfb3f0a9e..e9399cc17158 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/binder/InWindowLauncherUnlockAnimationManagerTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/binder/InWindowLauncherUnlockAnimationManagerTest.kt @@ -18,7 +18,7 @@ package com.android.systemui.keyguard.ui.binder import androidx.test.ext.junit.runners.AndroidJUnit4 import androidx.test.filters.SmallTest -import com.android.SysUITestModule +import com.android.systemui.SysUITestModule import com.android.systemui.SysuiTestCase import com.android.systemui.dagger.SysUISingleton import com.android.systemui.keyguard.ui.view.InWindowLauncherUnlockAnimationManager diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/view/layout/blueprints/DefaultKeyguardBlueprintTest.kt b/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/view/layout/blueprints/DefaultKeyguardBlueprintTest.kt index 76c258935727..15a17827a603 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/view/layout/blueprints/DefaultKeyguardBlueprintTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/view/layout/blueprints/DefaultKeyguardBlueprintTest.kt @@ -40,6 +40,7 @@ import com.android.systemui.keyguard.ui.view.layout.sections.DefaultStatusViewSe import com.android.systemui.keyguard.ui.view.layout.sections.SmartspaceSection import com.android.systemui.keyguard.ui.view.layout.sections.SplitShadeGuidelines import com.android.systemui.util.mockito.whenever +import java.util.Optional import org.junit.Before import org.junit.Test import org.junit.runner.RunWith @@ -48,7 +49,6 @@ import org.mockito.Mockito.mock import org.mockito.Mockito.never import org.mockito.Mockito.verify import org.mockito.MockitoAnnotations -import java.util.Optional @RunWith(AndroidTestingRunner::class) @RunWithLooper(setAsMainLooper = true) @@ -59,8 +59,7 @@ class DefaultKeyguardBlueprintTest : SysuiTestCase() { @Mock private lateinit var defaultIndicationAreaSection: DefaultIndicationAreaSection @Mock private lateinit var mDefaultDeviceEntryIconSection: DefaultDeviceEntryIconSection @Mock private lateinit var defaultShortcutsSection: DefaultShortcutsSection - @Mock - private lateinit var defaultAmbientIndicationAreaSection: Optional<KeyguardSection> + @Mock private lateinit var defaultAmbientIndicationAreaSection: Optional<KeyguardSection> @Mock private lateinit var defaultSettingsPopupMenuSection: DefaultSettingsPopupMenuSection @Mock private lateinit var defaultStatusViewSection: DefaultStatusViewSection @Mock private lateinit var defaultStatusBarViewSection: DefaultStatusBarSection @@ -118,6 +117,13 @@ class DefaultKeyguardBlueprintTest : SysuiTestCase() { } @Test + fun deviceEntryIconIsOnTop() { + val constraintLayout = ConstraintLayout(context, null) + underTest.replaceViews(null, constraintLayout) + underTest.sections.forEach { verify(it)?.addViews(constraintLayout) } + } + + @Test fun applyConstraints() { val cs = ConstraintSet() underTest.applyConstraints(cs) diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/view/layout/sections/DefaultDeviceEntryIconSectionTest.kt b/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/view/layout/sections/DefaultDeviceEntryIconSectionTest.kt index 75bdcddf516b..d9760456bcef 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/view/layout/sections/DefaultDeviceEntryIconSectionTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/view/layout/sections/DefaultDeviceEntryIconSectionTest.kt @@ -30,14 +30,17 @@ import com.android.systemui.biometrics.AuthController import com.android.systemui.flags.FakeFeatureFlags import com.android.systemui.flags.FakeFeatureFlagsClassic import com.android.systemui.flags.Flags +import com.android.systemui.keyguard.ui.viewmodel.AlternateBouncerViewModel import com.android.systemui.keyguard.ui.viewmodel.DeviceEntryBackgroundViewModel import com.android.systemui.keyguard.ui.viewmodel.DeviceEntryForegroundViewModel import com.android.systemui.keyguard.ui.viewmodel.DeviceEntryIconViewModel import com.android.systemui.plugins.FalsingManager import com.android.systemui.res.R import com.android.systemui.shade.NotificationPanelView +import com.android.systemui.statusbar.NotificationShadeWindowController import com.google.common.truth.Truth.assertThat import kotlinx.coroutines.ExperimentalCoroutinesApi +import kotlinx.coroutines.test.TestScope import org.junit.Before import org.junit.Test import org.junit.runner.RunWith @@ -67,10 +70,7 @@ class DefaultDeviceEntryIconSectionTest : SysuiTestCase() { mSetFlagsRule.enableFlags(AConfigFlags.FLAG_KEYGUARD_BOTTOM_AREA_REFACTOR) featureFlags = - FakeFeatureFlagsClassic().apply { - set(Flags.REFACTOR_UDFPS_KEYGUARD_VIEWS, false) - set(Flags.LOCKSCREEN_ENABLE_LANDSCAPE, false) - } + FakeFeatureFlagsClassic().apply { set(Flags.LOCKSCREEN_ENABLE_LANDSCAPE, false) } underTest = DefaultDeviceEntryIconSection( keyguardUpdateMonitor, @@ -84,6 +84,9 @@ class DefaultDeviceEntryIconSectionTest : SysuiTestCase() { { mock(DeviceEntryForegroundViewModel::class.java) }, { mock(DeviceEntryBackgroundViewModel::class.java) }, { falsingManager }, + { mock(AlternateBouncerViewModel::class.java) }, + { mock(NotificationShadeWindowController::class.java) }, + TestScope().backgroundScope, ) } @@ -98,7 +101,7 @@ class DefaultDeviceEntryIconSectionTest : SysuiTestCase() { @Test fun addViewsConditionally_migrateAndRefactorFlagsOn() { mSetFlagsRule.enableFlags(AConfigFlags.FLAG_KEYGUARD_BOTTOM_AREA_REFACTOR) - featureFlags.set(Flags.REFACTOR_UDFPS_KEYGUARD_VIEWS, true) + mSetFlagsRule.enableFlags(AConfigFlags.FLAG_DEVICE_ENTRY_UDFPS_REFACTOR) val constraintLayout = ConstraintLayout(context, null) underTest.addViews(constraintLayout) assertThat(constraintLayout.childCount).isGreaterThan(0) @@ -107,7 +110,7 @@ class DefaultDeviceEntryIconSectionTest : SysuiTestCase() { @Test fun addViewsConditionally_migrateFlagOff() { mSetFlagsRule.disableFlags(AConfigFlags.FLAG_KEYGUARD_BOTTOM_AREA_REFACTOR) - featureFlags.set(Flags.REFACTOR_UDFPS_KEYGUARD_VIEWS, false) + mSetFlagsRule.disableFlags(AConfigFlags.FLAG_DEVICE_ENTRY_UDFPS_REFACTOR) val constraintLayout = ConstraintLayout(context, null) underTest.addViews(constraintLayout) assertThat(constraintLayout.childCount).isEqualTo(0) @@ -115,7 +118,7 @@ class DefaultDeviceEntryIconSectionTest : SysuiTestCase() { @Test fun applyConstraints_udfps_refactor_off() { - featureFlags.set(Flags.REFACTOR_UDFPS_KEYGUARD_VIEWS, false) + mSetFlagsRule.disableFlags(AConfigFlags.FLAG_DEVICE_ENTRY_UDFPS_REFACTOR) val cs = ConstraintSet() underTest.applyConstraints(cs) @@ -127,7 +130,7 @@ class DefaultDeviceEntryIconSectionTest : SysuiTestCase() { @Test fun applyConstraints_udfps_refactor_on() { - featureFlags.set(Flags.REFACTOR_UDFPS_KEYGUARD_VIEWS, true) + mSetFlagsRule.enableFlags(AConfigFlags.FLAG_DEVICE_ENTRY_UDFPS_REFACTOR) val cs = ConstraintSet() underTest.applyConstraints(cs) @@ -139,7 +142,7 @@ class DefaultDeviceEntryIconSectionTest : SysuiTestCase() { @Test fun testCenterIcon_udfps_refactor_off() { - featureFlags.set(Flags.REFACTOR_UDFPS_KEYGUARD_VIEWS, false) + mSetFlagsRule.disableFlags(AConfigFlags.FLAG_DEVICE_ENTRY_UDFPS_REFACTOR) val cs = ConstraintSet() underTest.centerIcon(Point(5, 6), 1F, cs) @@ -155,7 +158,7 @@ class DefaultDeviceEntryIconSectionTest : SysuiTestCase() { @Test fun testCenterIcon_udfps_refactor_on() { - featureFlags.set(Flags.REFACTOR_UDFPS_KEYGUARD_VIEWS, true) + mSetFlagsRule.enableFlags(AConfigFlags.FLAG_DEVICE_ENTRY_UDFPS_REFACTOR) val cs = ConstraintSet() underTest.centerIcon(Point(5, 6), 1F, cs) @@ -168,4 +171,21 @@ class DefaultDeviceEntryIconSectionTest : SysuiTestCase() { assertThat(constraint.layout.topMargin).isEqualTo(5) assertThat(constraint.layout.startMargin).isEqualTo(4) } + + @Test + fun deviceEntryIconViewIsAboveAlternateBouncerView() { + mSetFlagsRule.enableFlags(AConfigFlags.FLAG_DEVICE_ENTRY_UDFPS_REFACTOR) + + val constraintLayout = ConstraintLayout(context, null) + underTest.addViews(constraintLayout) + assertThat(constraintLayout.childCount).isGreaterThan(0) + val deviceEntryIconView = constraintLayout.getViewById(R.id.device_entry_icon_view) + val alternateBouncerView = constraintLayout.getViewById(R.id.alternate_bouncer) + assertThat(deviceEntryIconView).isNotNull() + assertThat(alternateBouncerView).isNotNull() + + // device entry icon is above the alternate bouncer + assertThat(constraintLayout.indexOfChild(deviceEntryIconView)) + .isGreaterThan(constraintLayout.indexOfChild(alternateBouncerView)) + } } diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardRootViewModelTest.kt b/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardRootViewModelTest.kt index 259c74ff25fa..a838684a4f41 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardRootViewModelTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardRootViewModelTest.kt @@ -21,18 +21,17 @@ package com.android.systemui.keyguard.ui.viewmodel import android.view.View import androidx.test.filters.SmallTest -import com.android.SysUITestComponent -import com.android.SysUITestModule -import com.android.TestMocksModule -import com.android.collectLastValue -import com.android.runCurrent -import com.android.runTest +import com.android.systemui.Flags as AConfigFlags +import com.android.systemui.Flags.FLAG_NEW_AOD_TRANSITION +import com.android.systemui.SysUITestComponent +import com.android.systemui.SysUITestModule import com.android.systemui.SysuiTestCase +import com.android.systemui.TestMocksModule +import com.android.systemui.collectLastValue import com.android.systemui.common.ui.data.repository.FakeConfigurationRepository import com.android.systemui.coroutines.collectLastValue import com.android.systemui.dagger.SysUISingleton import com.android.systemui.deviceentry.data.repository.FakeDeviceEntryRepository -import com.android.systemui.Flags as AConfigFlags import com.android.systemui.flags.FakeFeatureFlagsClassic import com.android.systemui.flags.FakeFeatureFlagsClassicModule import com.android.systemui.flags.Flags @@ -46,6 +45,8 @@ import com.android.systemui.keyguard.shared.model.BurnInModel import com.android.systemui.keyguard.shared.model.KeyguardState import com.android.systemui.keyguard.shared.model.TransitionStep import com.android.systemui.plugins.ClockController +import com.android.systemui.runCurrent +import com.android.systemui.runTest import com.android.systemui.statusbar.notification.data.repository.FakeNotificationsKeyguardViewStateRepository import com.android.systemui.statusbar.phone.DozeParameters import com.android.systemui.statusbar.phone.ScreenOffAnimationController @@ -64,7 +65,6 @@ import kotlinx.coroutines.flow.MutableStateFlow import kotlinx.coroutines.flow.emptyFlow import kotlinx.coroutines.test.StandardTestDispatcher import kotlinx.coroutines.test.TestScope -import kotlinx.coroutines.test.runCurrent import kotlinx.coroutines.test.runTest import org.junit.Before import org.junit.Test @@ -109,10 +109,7 @@ class KeyguardRootViewModelTest : SysuiTestCase() { mSetFlagsRule.enableFlags(AConfigFlags.FLAG_KEYGUARD_BOTTOM_AREA_REFACTOR) - val featureFlags = - FakeFeatureFlagsClassic().apply { - set(Flags.FACE_AUTH_REFACTOR, true) - } + val featureFlags = FakeFeatureFlagsClassic().apply { set(Flags.FACE_AUTH_REFACTOR, true) } val withDeps = KeyguardInteractorFactory.create(featureFlags = featureFlags) keyguardInteractor = withDeps.keyguardInteractor @@ -351,10 +348,7 @@ class KeyguardRootViewModelTestWithFakes : SysuiTestCase() { .create( test = this, featureFlags = - FakeFeatureFlagsClassicModule { - setDefault(Flags.NEW_AOD_TRANSITION) - set(Flags.FACE_AUTH_REFACTOR, true) - }, + FakeFeatureFlagsClassicModule { set(Flags.FACE_AUTH_REFACTOR, true) }, mocks = TestMocksModule( dozeParameters = dozeParams, @@ -367,6 +361,11 @@ class KeyguardRootViewModelTestWithFakes : SysuiTestCase() { block() } + @Before + fun before() { + mSetFlagsRule.enableFlags(FLAG_NEW_AOD_TRANSITION) + } + @Test fun iconContainer_isNotVisible_notOnKeyguard_dontShowAodIconsWhenShade() = runTest { val isVisible by collectLastValue(underTest.isNotifIconContainerVisible) diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/viewmodel/LockscreenToAodTransitionViewModelTest.kt b/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/viewmodel/LockscreenToAodTransitionViewModelTest.kt index 4074851490ab..c50be04e8a9c 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/viewmodel/LockscreenToAodTransitionViewModelTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/viewmodel/LockscreenToAodTransitionViewModelTest.kt @@ -18,15 +18,13 @@ package com.android.systemui.keyguard.ui.viewmodel import androidx.test.ext.junit.runners.AndroidJUnit4 import androidx.test.filters.SmallTest -import com.android.SysUITestComponent -import com.android.SysUITestModule -import com.android.TestMocksModule -import com.android.collectLastValue -import com.android.collectValues -import com.android.runCurrent -import com.android.runTest +import com.android.systemui.SysUITestComponent +import com.android.systemui.SysUITestModule import com.android.systemui.SysuiTestCase +import com.android.systemui.TestMocksModule import com.android.systemui.biometrics.data.repository.FakeFingerprintPropertyRepository +import com.android.systemui.collectLastValue +import com.android.systemui.collectValues import com.android.systemui.dagger.SysUISingleton import com.android.systemui.deviceentry.data.repository.FakeDeviceEntryRepository import com.android.systemui.flags.FakeFeatureFlagsClassicModule @@ -39,6 +37,8 @@ import com.android.systemui.keyguard.shared.model.KeyguardState import com.android.systemui.keyguard.shared.model.StatusBarState import com.android.systemui.keyguard.shared.model.TransitionState import com.android.systemui.keyguard.shared.model.TransitionStep +import com.android.systemui.runCurrent +import com.android.systemui.runTest import com.android.systemui.shade.data.repository.FakeShadeRepository import com.android.systemui.user.domain.UserDomainLayerModule import com.google.common.collect.Range @@ -77,15 +77,15 @@ class LockscreenToAodTransitionViewModelTest : SysuiTestCase() { mocks: TestMocksModule, ): TestComponent } + } - fun shadeExpanded(expanded: Boolean) { - if (expanded) { - shadeRepository.setQsExpansion(1f) - } else { - keyguardRepository.setStatusBarState(StatusBarState.KEYGUARD) - shadeRepository.setQsExpansion(0f) - shadeRepository.setLockscreenShadeExpansion(0f) - } + private fun TestComponent.shadeExpanded(expanded: Boolean) { + if (expanded) { + shadeRepository.setQsExpansion(1f) + } else { + keyguardRepository.setStatusBarState(StatusBarState.KEYGUARD) + shadeRepository.setQsExpansion(0f) + shadeRepository.setLockscreenShadeExpansion(0f) } } diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/viewmodel/LockscreenToDreamingTransitionViewModelTest.kt b/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/viewmodel/LockscreenToDreamingTransitionViewModelTest.kt index 5c85357a37a8..26704da1496f 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/viewmodel/LockscreenToDreamingTransitionViewModelTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/viewmodel/LockscreenToDreamingTransitionViewModelTest.kt @@ -18,14 +18,12 @@ package com.android.systemui.keyguard.ui.viewmodel import androidx.test.ext.junit.runners.AndroidJUnit4 import androidx.test.filters.SmallTest -import com.android.SysUITestComponent -import com.android.SysUITestModule -import com.android.TestMocksModule -import com.android.collectLastValue -import com.android.collectValues -import com.android.runCurrent -import com.android.runTest +import com.android.systemui.SysUITestComponent +import com.android.systemui.SysUITestModule import com.android.systemui.SysuiTestCase +import com.android.systemui.TestMocksModule +import com.android.systemui.collectLastValue +import com.android.systemui.collectValues import com.android.systemui.dagger.SysUISingleton import com.android.systemui.flags.FakeFeatureFlagsClassicModule import com.android.systemui.flags.Flags @@ -35,13 +33,14 @@ import com.android.systemui.keyguard.shared.model.KeyguardState import com.android.systemui.keyguard.shared.model.StatusBarState import com.android.systemui.keyguard.shared.model.TransitionState import com.android.systemui.keyguard.shared.model.TransitionStep +import com.android.systemui.runCurrent +import com.android.systemui.runTest import com.android.systemui.shade.data.repository.FakeShadeRepository import com.android.systemui.user.domain.UserDomainLayerModule import com.google.common.collect.Range import com.google.common.truth.Truth.assertThat import dagger.BindsInstance import dagger.Component -import kotlinx.coroutines.test.runTest import org.junit.Test import org.junit.runner.RunWith @@ -69,15 +68,15 @@ class LockscreenToDreamingTransitionViewModelTest : SysuiTestCase() { mocks: TestMocksModule, ): TestComponent } + } - fun shadeExpanded(expanded: Boolean) { - if (expanded) { - shadeRepository.setQsExpansion(1f) - } else { - keyguardRepository.setStatusBarState(StatusBarState.KEYGUARD) - shadeRepository.setQsExpansion(0f) - shadeRepository.setLockscreenShadeExpansion(0f) - } + private fun TestComponent.shadeExpanded(expanded: Boolean) { + if (expanded) { + shadeRepository.setQsExpansion(1f) + } else { + keyguardRepository.setStatusBarState(StatusBarState.KEYGUARD) + shadeRepository.setQsExpansion(0f) + shadeRepository.setLockscreenShadeExpansion(0f) } } diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/viewmodel/LockscreenToOccludedTransitionViewModelTest.kt b/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/viewmodel/LockscreenToOccludedTransitionViewModelTest.kt index 4cbefa3d12ee..ff3135a6ad98 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/viewmodel/LockscreenToOccludedTransitionViewModelTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/viewmodel/LockscreenToOccludedTransitionViewModelTest.kt @@ -18,14 +18,12 @@ package com.android.systemui.keyguard.ui.viewmodel import androidx.test.ext.junit.runners.AndroidJUnit4 import androidx.test.filters.SmallTest -import com.android.SysUITestComponent -import com.android.SysUITestModule -import com.android.TestMocksModule -import com.android.collectLastValue -import com.android.collectValues -import com.android.runCurrent -import com.android.runTest +import com.android.systemui.SysUITestComponent +import com.android.systemui.SysUITestModule import com.android.systemui.SysuiTestCase +import com.android.systemui.TestMocksModule +import com.android.systemui.collectLastValue +import com.android.systemui.collectValues import com.android.systemui.dagger.SysUISingleton import com.android.systemui.flags.FakeFeatureFlagsClassicModule import com.android.systemui.flags.Flags @@ -35,6 +33,8 @@ import com.android.systemui.keyguard.shared.model.KeyguardState import com.android.systemui.keyguard.shared.model.StatusBarState import com.android.systemui.keyguard.shared.model.TransitionState import com.android.systemui.keyguard.shared.model.TransitionStep +import com.android.systemui.runCurrent +import com.android.systemui.runTest import com.android.systemui.shade.data.repository.FakeShadeRepository import com.android.systemui.user.domain.UserDomainLayerModule import com.google.common.collect.Range @@ -68,15 +68,15 @@ class LockscreenToOccludedTransitionViewModelTest : SysuiTestCase() { mocks: TestMocksModule, ): TestComponent } + } - fun shadeExpanded(expanded: Boolean) { - if (expanded) { - shadeRepository.setQsExpansion(1f) - } else { - keyguardRepository.setStatusBarState(StatusBarState.KEYGUARD) - shadeRepository.setQsExpansion(0f) - shadeRepository.setLockscreenShadeExpansion(0f) - } + private fun TestComponent.shadeExpanded(expanded: Boolean) { + if (expanded) { + shadeRepository.setQsExpansion(1f) + } else { + keyguardRepository.setStatusBarState(StatusBarState.KEYGUARD) + shadeRepository.setQsExpansion(0f) + shadeRepository.setLockscreenShadeExpansion(0f) } } diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/viewmodel/LockscreenToPrimaryBouncerTransitionViewModelTest.kt b/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/viewmodel/LockscreenToPrimaryBouncerTransitionViewModelTest.kt index 4f564350741d..8afd8e4fd425 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/viewmodel/LockscreenToPrimaryBouncerTransitionViewModelTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/viewmodel/LockscreenToPrimaryBouncerTransitionViewModelTest.kt @@ -18,13 +18,11 @@ package com.android.systemui.keyguard.ui.viewmodel import androidx.test.ext.junit.runners.AndroidJUnit4 import androidx.test.filters.SmallTest -import com.android.SysUITestComponent -import com.android.SysUITestModule -import com.android.TestMocksModule -import com.android.collectLastValue -import com.android.runCurrent -import com.android.runTest +import com.android.systemui.SysUITestComponent +import com.android.systemui.SysUITestModule import com.android.systemui.SysuiTestCase +import com.android.systemui.TestMocksModule +import com.android.systemui.collectLastValue import com.android.systemui.dagger.SysUISingleton import com.android.systemui.flags.FakeFeatureFlagsClassicModule import com.android.systemui.flags.Flags @@ -34,6 +32,8 @@ import com.android.systemui.keyguard.shared.model.KeyguardState import com.android.systemui.keyguard.shared.model.StatusBarState import com.android.systemui.keyguard.shared.model.TransitionState import com.android.systemui.keyguard.shared.model.TransitionStep +import com.android.systemui.runCurrent +import com.android.systemui.runTest import com.android.systemui.shade.data.repository.FakeShadeRepository import com.android.systemui.user.domain.UserDomainLayerModule import com.google.common.collect.Range @@ -69,15 +69,15 @@ class LockscreenToPrimaryBouncerTransitionViewModelTest : SysuiTestCase() { mocks: TestMocksModule, ): TestComponent } + } - fun shadeExpanded(expanded: Boolean) { - if (expanded) { - shadeRepository.setQsExpansion(1f) - } else { - keyguardRepository.setStatusBarState(StatusBarState.KEYGUARD) - shadeRepository.setQsExpansion(0f) - shadeRepository.setLockscreenShadeExpansion(0f) - } + private fun TestComponent.shadeExpanded(expanded: Boolean) { + if (expanded) { + shadeRepository.setQsExpansion(1f) + } else { + keyguardRepository.setStatusBarState(StatusBarState.KEYGUARD) + shadeRepository.setQsExpansion(0f) + shadeRepository.setLockscreenShadeExpansion(0f) } } diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/viewmodel/UdfpsAodViewModelTest.kt b/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/viewmodel/UdfpsAodViewModelTest.kt index 32acefebfa68..5058b1686781 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/viewmodel/UdfpsAodViewModelTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/viewmodel/UdfpsAodViewModelTest.kt @@ -67,11 +67,7 @@ class UdfpsAodViewModelTest : SysuiTestCase() { overrideResource(com.android.systemui.res.R.dimen.lock_icon_padding, defaultPadding) testScope = TestScope() shadeRepository = FakeShadeRepository() - featureFlags = - FakeFeatureFlags().apply { - set(Flags.REFACTOR_UDFPS_KEYGUARD_VIEWS, true) - set(Flags.FACE_AUTH_REFACTOR, false) - } + featureFlags = FakeFeatureFlags().apply { set(Flags.FACE_AUTH_REFACTOR, false) } KeyguardInteractorFactory.create( featureFlags = featureFlags, ) diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/viewmodel/UdfpsFingerprintViewModelTest.kt b/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/viewmodel/UdfpsFingerprintViewModelTest.kt index 4f970d708425..f039f5302a3f 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/viewmodel/UdfpsFingerprintViewModelTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/viewmodel/UdfpsFingerprintViewModelTest.kt @@ -75,11 +75,7 @@ class UdfpsFingerprintViewModelTest : SysuiTestCase() { keyguardRepository = FakeKeyguardRepository() bouncerRepository = FakeKeyguardBouncerRepository() fakeCommandQueue = FakeCommandQueue() - featureFlags = - FakeFeatureFlags().apply { - set(Flags.REFACTOR_UDFPS_KEYGUARD_VIEWS, true) - set(Flags.FACE_AUTH_REFACTOR, false) - } + featureFlags = FakeFeatureFlags().apply { set(Flags.FACE_AUTH_REFACTOR, false) } bouncerRepository = FakeKeyguardBouncerRepository() transitionRepository = FakeKeyguardTransitionRepository() shadeRepository = FakeShadeRepository() diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/viewmodel/UdfpsLockscreenViewModelTest.kt b/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/viewmodel/UdfpsLockscreenViewModelTest.kt index 30e48669205f..c1805dbf26ad 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/viewmodel/UdfpsLockscreenViewModelTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/viewmodel/UdfpsLockscreenViewModelTest.kt @@ -83,11 +83,7 @@ class UdfpsLockscreenViewModelTest : SysuiTestCase() { testScope = TestScope() transitionRepository = FakeKeyguardTransitionRepository() shadeRepository = FakeShadeRepository() - featureFlags = - FakeFeatureFlags().apply { - set(Flags.REFACTOR_UDFPS_KEYGUARD_VIEWS, true) - set(Flags.FACE_AUTH_REFACTOR, false) - } + featureFlags = FakeFeatureFlags().apply { set(Flags.FACE_AUTH_REFACTOR, false) } KeyguardInteractorFactory.create( featureFlags = featureFlags, ) diff --git a/packages/SystemUI/tests/src/com/android/systemui/media/controls/ui/MediaHierarchyManagerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/media/controls/ui/MediaHierarchyManagerTest.kt index a2eb5ef9e463..db7c9876f21b 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/media/controls/ui/MediaHierarchyManagerTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/media/controls/ui/MediaHierarchyManagerTest.kt @@ -35,7 +35,7 @@ import com.android.systemui.media.controls.pipeline.MediaDataManager import com.android.systemui.media.dream.MediaDreamComplication import com.android.systemui.plugins.statusbar.StatusBarStateController import com.android.systemui.res.R -import com.android.systemui.shade.ShadeExpansionStateManager +import com.android.systemui.shade.domain.interactor.ShadeInteractor import com.android.systemui.statusbar.StatusBarState import com.android.systemui.statusbar.SysuiStatusBarStateController import com.android.systemui.statusbar.phone.KeyguardBypassController @@ -50,6 +50,7 @@ import com.android.systemui.util.settings.FakeSettings import com.android.systemui.utils.os.FakeHandler import com.google.common.truth.Truth.assertThat import kotlinx.coroutines.ExperimentalCoroutinesApi +import kotlinx.coroutines.flow.MutableStateFlow import kotlinx.coroutines.test.StandardTestDispatcher import kotlinx.coroutines.test.TestScope import kotlinx.coroutines.test.runCurrent @@ -74,7 +75,7 @@ import org.mockito.junit.MockitoJUnit @OptIn(ExperimentalCoroutinesApi::class) @SmallTest @RunWith(AndroidTestingRunner::class) -@TestableLooper.RunWithLooper +@TestableLooper.RunWithLooper(setAsMainLooper = true) class MediaHierarchyManagerTest : SysuiTestCase() { @Mock private lateinit var lockHost: MediaHost @@ -91,6 +92,7 @@ class MediaHierarchyManagerTest : SysuiTestCase() { @Mock private lateinit var mediaDataManager: MediaDataManager @Mock private lateinit var uniqueObjectHostView: UniqueObjectHostView @Mock private lateinit var dreamOverlayStateController: DreamOverlayStateController + @Mock private lateinit var shadeInteractor: ShadeInteractor @Mock lateinit var logger: MediaViewLogger @Captor private lateinit var wakefullnessObserver: ArgumentCaptor<(WakefulnessLifecycle.Observer)> @@ -101,12 +103,12 @@ class MediaHierarchyManagerTest : SysuiTestCase() { ArgumentCaptor<(DreamOverlayStateController.Callback)> @JvmField @Rule val mockito = MockitoJUnit.rule() private lateinit var mediaHierarchyManager: MediaHierarchyManager + private lateinit var isQsBypassingShade: MutableStateFlow<Boolean> private lateinit var mediaFrame: ViewGroup private val configurationController = FakeConfigurationController() private val communalRepository = FakeCommunalRepository(isCommunalEnabled = true) private val communalInteractor = CommunalInteractorFactory.create(communalRepository = communalRepository).communalInteractor - private val notifPanelEvents = ShadeExpansionStateManager() private val settings = FakeSettings() private lateinit var testableLooper: TestableLooper private lateinit var fakeHandler: FakeHandler @@ -122,6 +124,8 @@ class MediaHierarchyManagerTest : SysuiTestCase() { testableLooper = TestableLooper.get(this) fakeHandler = FakeHandler(testableLooper.looper) whenever(mediaCarouselController.mediaFrame).thenReturn(mediaFrame) + isQsBypassingShade = MutableStateFlow(false) + whenever(shadeInteractor.isQsBypassingShade).thenReturn(isQsBypassingShade) mediaHierarchyManager = MediaHierarchyManager( context, @@ -135,7 +139,7 @@ class MediaHierarchyManagerTest : SysuiTestCase() { communalInteractor, configurationController, wakefulnessLifecycle, - notifPanelEvents, + shadeInteractor, settings, fakeHandler, testScope.backgroundScope, @@ -430,17 +434,21 @@ class MediaHierarchyManagerTest : SysuiTestCase() { assertThat(mediaHierarchyManager.isCurrentlyInGuidedTransformation()).isTrue() } + @OptIn(ExperimentalCoroutinesApi::class) @Test - fun isCurrentlyInGuidedTransformation_hostsVisible_expandImmediateEnabled_returnsFalse() { - notifPanelEvents.notifyExpandImmediateChange(true) - goToLockscreen() - enterGuidedTransformation() - whenever(lockHost.visible).thenReturn(true) - whenever(qsHost.visible).thenReturn(true) - whenever(qqsHost.visible).thenReturn(true) + fun isCurrentlyInGuidedTransformation_hostsVisible_expandImmediateEnabled_returnsFalse() = + testScope.runTest { + runCurrent() + isQsBypassingShade.value = true + runCurrent() + goToLockscreen() + enterGuidedTransformation() + whenever(lockHost.visible).thenReturn(true) + whenever(qsHost.visible).thenReturn(true) + whenever(qqsHost.visible).thenReturn(true) - assertThat(mediaHierarchyManager.isCurrentlyInGuidedTransformation()).isFalse() - } + assertThat(mediaHierarchyManager.isCurrentlyInGuidedTransformation()).isFalse() + } @Test fun isCurrentlyInGuidedTransformation_hostNotVisible_returnsFalse_with_active() { diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/QSTileHostTest.java b/packages/SystemUI/tests/src/com/android/systemui/qs/QSTileHostTest.java index 3b07913de7c5..5245b224fa5b 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/qs/QSTileHostTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/qs/QSTileHostTest.java @@ -27,7 +27,6 @@ import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.anyInt; import static org.mockito.ArgumentMatchers.anyString; import static org.mockito.ArgumentMatchers.isNull; -import static org.mockito.Mockito.clearInvocations; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.never; import static org.mockito.Mockito.verify; @@ -41,7 +40,6 @@ import android.database.ContentObserver; import android.os.Handler; import android.os.Looper; import android.os.UserHandle; -import android.platform.test.flag.junit.SetFlagsRule; import android.testing.AndroidTestingRunner; import android.util.SparseArray; import android.view.View; @@ -82,7 +80,6 @@ import com.android.systemui.util.settings.SecureSettings; import com.android.systemui.util.time.FakeSystemClock; import org.junit.Before; -import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; @@ -107,10 +104,6 @@ public class QSTileHostTest extends SysuiTestCase { ComponentName.unflattenFromString("TEST_PKG/.TEST_CLS"); private static final String CUSTOM_TILE_SPEC = CustomTile.toSpec(CUSTOM_TILE); private static final String SETTING = QSHost.TILES_SETTING; - - @Rule - public final SetFlagsRule mSetFlagsRule = new SetFlagsRule(); - @Mock private PluginManager mPluginManager; @Mock diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/external/TileLifecycleManagerTest.java b/packages/SystemUI/tests/src/com/android/systemui/qs/external/TileLifecycleManagerTest.java index 6cc52d70611a..fbd63c6bbdae 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/qs/external/TileLifecycleManagerTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/qs/external/TileLifecycleManagerTest.java @@ -403,6 +403,31 @@ public class TileLifecycleManagerTest extends SysuiTestCase { verify(falseContext).bindServiceAsUser(any(), any(), eq(flags), any()); } + @Test + public void testNullBindingCallsUnbind() { + Context mockContext = mock(Context.class); + // Binding has to succeed + when(mockContext.bindServiceAsUser(any(), any(), anyInt(), any())).thenReturn(true); + TileLifecycleManager manager = new TileLifecycleManager(mHandler, mockContext, + mock(IQSService.class), + mMockPackageManagerAdapter, + mMockBroadcastDispatcher, + mTileServiceIntent, + mUser, + mActivityManager, + mExecutor); + + manager.executeSetBindService(true); + mExecutor.runAllReady(); + + ArgumentCaptor<ServiceConnection> captor = ArgumentCaptor.forClass(ServiceConnection.class); + verify(mockContext).bindServiceAsUser(any(), captor.capture(), anyInt(), any()); + + captor.getValue().onNullBinding(mTileServiceComponentName); + mExecutor.runAllReady(); + verify(mockContext).unbindService(captor.getValue()); + } + private void mockChangeEnabled(long changeId, boolean enabled) { doReturn(enabled).when(() -> CompatChanges.isChangeEnabled(eq(changeId), anyString(), any(UserHandle.class))); diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/interactor/CurrentTilesInteractorImplTest.kt b/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/interactor/CurrentTilesInteractorImplTest.kt index 355ca816e789..8c896a6a1709 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/interactor/CurrentTilesInteractorImplTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/domain/interactor/CurrentTilesInteractorImplTest.kt @@ -21,7 +21,6 @@ import android.content.Context import android.content.Intent import android.content.pm.UserInfo import android.os.UserHandle -import android.platform.test.flag.junit.SetFlagsRule import android.service.quicksettings.Tile import androidx.test.ext.junit.runners.AndroidJUnit4 import androidx.test.filters.SmallTest @@ -62,7 +61,6 @@ import kotlinx.coroutines.test.TestScope import kotlinx.coroutines.test.runCurrent import kotlinx.coroutines.test.runTest import org.junit.Before -import org.junit.Rule import org.junit.Test import org.junit.runner.RunWith import org.mockito.ArgumentMatchers.anyString @@ -77,8 +75,6 @@ import org.mockito.MockitoAnnotations @OptIn(ExperimentalCoroutinesApi::class) class CurrentTilesInteractorImplTest : SysuiTestCase() { - @Rule @JvmField val setFlagsRule = SetFlagsRule() - private val tileSpecRepository: TileSpecRepository = FakeTileSpecRepository() private val userRepository = FakeUserRepository() private val installedTilesPackageRepository = FakeInstalledTilesComponentRepository() @@ -109,7 +105,7 @@ class CurrentTilesInteractorImplTest : SysuiTestCase() { fun setup() { MockitoAnnotations.initMocks(this) - setFlagsRule.enableFlags(FLAG_QS_NEW_PIPELINE) + mSetFlagsRule.enableFlags(FLAG_QS_NEW_PIPELINE) // TODO(b/299909337): Add test checking the new factory is used when the flag is on featureFlags.set(Flags.QS_PIPELINE_NEW_TILES, true) diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/shared/QSPipelineFlagsRepositoryTest.kt b/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/shared/QSPipelineFlagsRepositoryTest.kt index 62ca965a81dd..2e637084e6dc 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/shared/QSPipelineFlagsRepositoryTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/shared/QSPipelineFlagsRepositoryTest.kt @@ -1,13 +1,11 @@ package com.android.systemui.qs.pipeline.shared -import android.platform.test.flag.junit.SetFlagsRule import androidx.test.ext.junit.runners.AndroidJUnit4 import androidx.test.filters.SmallTest import com.android.systemui.Flags import com.android.systemui.SysuiTestCase import com.android.systemui.flags.FakeFeatureFlagsClassic import com.google.common.truth.Truth.assertThat -import org.junit.Rule import org.junit.Test import org.junit.runner.RunWith @@ -15,22 +13,20 @@ import org.junit.runner.RunWith @RunWith(AndroidJUnit4::class) class QSPipelineFlagsRepositoryTest : SysuiTestCase() { - @Rule @JvmField val setFlagsRule = SetFlagsRule() - private val fakeFeatureFlagsClassic = FakeFeatureFlagsClassic() private val underTest = QSPipelineFlagsRepository(fakeFeatureFlagsClassic) @Test fun pipelineFlagDisabled() { - setFlagsRule.disableFlags(Flags.FLAG_QS_NEW_PIPELINE) + mSetFlagsRule.disableFlags(Flags.FLAG_QS_NEW_PIPELINE) assertThat(underTest.pipelineEnabled).isFalse() } @Test fun pipelineFlagEnabled() { - setFlagsRule.enableFlags(Flags.FLAG_QS_NEW_PIPELINE) + mSetFlagsRule.enableFlags(Flags.FLAG_QS_NEW_PIPELINE) assertThat(underTest.pipelineEnabled).isTrue() } diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/tiles/viewmodel/QSTileViewModelUserInputTest.kt b/packages/SystemUI/tests/src/com/android/systemui/qs/tiles/viewmodel/QSTileViewModelUserInputTest.kt index ea8acc714f3a..22fb152aee44 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/qs/tiles/viewmodel/QSTileViewModelUserInputTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/qs/tiles/viewmodel/QSTileViewModelUserInputTest.kt @@ -16,6 +16,7 @@ package com.android.systemui.qs.tiles.viewmodel +import androidx.test.ext.junit.runners.AndroidJUnit4 import androidx.test.filters.MediumTest import com.android.settingslib.RestrictedLockUtils import com.android.systemui.SysuiTestCase @@ -45,8 +46,6 @@ import kotlinx.coroutines.test.runTest import org.junit.Before import org.junit.Test import org.junit.runner.RunWith -import org.junit.runners.Parameterized -import org.junit.runners.Parameterized.Parameter import org.mockito.Mock import org.mockito.Mockito.never import org.mockito.Mockito.verify @@ -54,14 +53,15 @@ import org.mockito.MockitoAnnotations /** Tests all possible [QSTileUserAction]s. If you need */ @MediumTest -@RunWith(Parameterized::class) +@RunWith(AndroidJUnit4::class) @OptIn(ExperimentalCoroutinesApi::class) class QSTileViewModelUserInputTest : SysuiTestCase() { @Mock private lateinit var qsTileLogger: QSTileLogger @Mock private lateinit var qsTileAnalytics: QSTileAnalytics - @Parameter lateinit var userAction: QSTileUserAction + // TODO(b/299909989): this should be parametrised. b/299096521 blocks this. + private val userAction: QSTileUserAction = QSTileUserAction.Click(null) private val tileConfig = QSTileConfigTestBuilder.build { policy = QSTilePolicy.Restricted("test_restriction") } @@ -180,15 +180,4 @@ class QSTileViewModelUserInputTest : SysuiTestCase() { testCoroutineDispatcher, scope.backgroundScope, ) - - companion object { - - @JvmStatic - @Parameterized.Parameters - fun data(): Iterable<QSTileUserAction> = - listOf( - QSTileUserAction.Click(null), - QSTileUserAction.LongClick(null), - ) - } } diff --git a/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationPanelViewControllerBaseTest.java b/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationPanelViewControllerBaseTest.java index f1429b5dd7b3..ba8a66637e8a 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationPanelViewControllerBaseTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationPanelViewControllerBaseTest.java @@ -100,6 +100,7 @@ import com.android.systemui.keyguard.domain.interactor.KeyguardFaceAuthInteracto import com.android.systemui.keyguard.domain.interactor.KeyguardInteractor; import com.android.systemui.keyguard.domain.interactor.KeyguardInteractorFactory; import com.android.systemui.keyguard.domain.interactor.KeyguardTransitionInteractor; +import com.android.systemui.keyguard.domain.interactor.NaturalScrollingSettingObserver; import com.android.systemui.keyguard.shared.KeyguardShadeMigrationNssl; import com.android.systemui.keyguard.ui.viewmodel.DreamingToLockscreenTransitionViewModel; import com.android.systemui.keyguard.ui.viewmodel.GoneToDreamingLockscreenHostedTransitionViewModel; @@ -123,11 +124,12 @@ import com.android.systemui.power.domain.interactor.PowerInteractor; import com.android.systemui.qs.QSFragmentLegacy; import com.android.systemui.res.R; import com.android.systemui.scene.SceneTestUtils; -import com.android.systemui.scene.shared.flag.FakeSceneContainerFlags; import com.android.systemui.screenrecord.RecordingController; import com.android.systemui.shade.data.repository.FakeShadeRepository; import com.android.systemui.shade.data.repository.ShadeRepository; import com.android.systemui.shade.domain.interactor.ShadeInteractor; +import com.android.systemui.shade.domain.interactor.ShadeInteractorImpl; +import com.android.systemui.shade.domain.interactor.ShadeInteractorLegacyImpl; import com.android.systemui.shade.transition.ShadeTransitionController; import com.android.systemui.statusbar.CommandQueue; import com.android.systemui.statusbar.KeyguardIndicationController; @@ -334,6 +336,7 @@ public class NotificationPanelViewControllerBaseTest extends SysuiTestCase { @Mock private CastController mCastController; @Mock private SharedNotificationContainerInteractor mSharedNotificationContainerInteractor; @Mock private KeyguardClockPositionAlgorithm mKeyguardClockPositionAlgorithm; + @Mock private NaturalScrollingSettingObserver mNaturalScrollingSettingObserver; protected final int mMaxUdfpsBurnInOffsetY = 5; protected FakeFeatureFlagsClassic mFeatureFlags = new FakeFeatureFlagsClassic(); @@ -389,26 +392,27 @@ public class NotificationPanelViewControllerBaseTest extends SysuiTestCase { mPowerInteractor = keyguardInteractorDeps.getPowerInteractor(); when(mKeyguardTransitionInteractor.isInTransitionToStateWhere(any())).thenReturn( StateFlowKt.MutableStateFlow(false)); - mShadeInteractor = new ShadeInteractor( + mShadeInteractor = new ShadeInteractorImpl( mTestScope.getBackgroundScope(), new FakeDeviceProvisioningRepository(), new FakeDisableFlagsRepository(), mDozeParameters, - new FakeSceneContainerFlags(), - mUtils::sceneInteractor, mFakeKeyguardRepository, mKeyguardTransitionInteractor, mPowerInteractor, new FakeUserSetupRepository(), mock(UserSwitcherInteractor.class), - new SharedNotificationContainerInteractor( - new FakeConfigurationRepository(), - mContext, - new ResourcesSplitShadeStateController() - ), - mShadeRepository + new ShadeInteractorLegacyImpl( + mTestScope.getBackgroundScope(), + mFakeKeyguardRepository, + new SharedNotificationContainerInteractor( + new FakeConfigurationRepository(), + mContext, + new ResourcesSplitShadeStateController() + ), + mShadeRepository + ) ); - SystemClock systemClock = new FakeSystemClock(); mStatusBarStateController = new StatusBarStateControllerImpl(mUiEventLogger, mInteractionJankMonitor, mJavaAdapter, () -> mShadeInteractor); @@ -498,6 +502,7 @@ public class NotificationPanelViewControllerBaseTest extends SysuiTestCase { when(mScreenOffAnimationController.shouldAnimateClockChange()).thenReturn(true); when(mQs.getView()).thenReturn(mView); when(mQSFragment.getView()).thenReturn(mView); + when(mNaturalScrollingSettingObserver.isNaturalScrollingEnabled()).thenReturn(true); doAnswer(invocation -> { mFragmentListener = invocation.getArgument(1); return null; @@ -708,7 +713,8 @@ public class NotificationPanelViewControllerBaseTest extends SysuiTestCase { mKeyguardFaceAuthInteractor, new ResourcesSplitShadeStateController(), mPowerInteractor, - mKeyguardClockPositionAlgorithm); + mKeyguardClockPositionAlgorithm, + mNaturalScrollingSettingObserver); mNotificationPanelViewController.initDependencies( mCentralSurfaces, null, 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 6aaa0a135b66..8403ac59d2f5 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationShadeWindowControllerImplTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationShadeWindowControllerImplTest.java @@ -78,6 +78,8 @@ import com.android.systemui.scene.shared.logger.SceneLogger; import com.android.systemui.settings.UserTracker; import com.android.systemui.shade.data.repository.FakeShadeRepository; import com.android.systemui.shade.domain.interactor.ShadeInteractor; +import com.android.systemui.shade.domain.interactor.ShadeInteractorImpl; +import com.android.systemui.shade.domain.interactor.ShadeInteractorLegacyImpl; import com.android.systemui.shared.system.ActivityManagerWrapper; import com.android.systemui.statusbar.StatusBarState; import com.android.systemui.statusbar.SysuiStatusBarStateController; @@ -231,25 +233,26 @@ public class NotificationShadeWindowControllerImplTest extends SysuiTestCase { mKeyguardSecurityModel, mSelectedUserInteractor, powerInteractor); - - mShadeInteractor = - new ShadeInteractor( + mShadeInteractor = new ShadeInteractorImpl( + mTestScope.getBackgroundScope(), + new FakeDeviceProvisioningRepository(), + new FakeDisableFlagsRepository(), + mock(DozeParameters.class), + keyguardRepository, + keyguardTransitionInteractor, + powerInteractor, + new FakeUserSetupRepository(), + mock(UserSwitcherInteractor.class), + new ShadeInteractorLegacyImpl( mTestScope.getBackgroundScope(), - new FakeDeviceProvisioningRepository(), - new FakeDisableFlagsRepository(), - mock(DozeParameters.class), - sceneContainerFlags, - () -> sceneInteractor, keyguardRepository, - keyguardTransitionInteractor, - powerInteractor, - new FakeUserSetupRepository(), - mock(UserSwitcherInteractor.class), new SharedNotificationContainerInteractor( configurationRepository, mContext, new ResourcesSplitShadeStateController()), - shadeRepository); + shadeRepository + ) + ); mNotificationShadeWindowController = new NotificationShadeWindowControllerImpl( mContext, diff --git a/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationShadeWindowViewControllerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationShadeWindowViewControllerTest.kt index 2dd0af78cf17..d89491c7b442 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationShadeWindowViewControllerTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationShadeWindowViewControllerTest.kt @@ -30,6 +30,7 @@ import com.android.keyguard.KeyguardSecurityModel import com.android.keyguard.KeyguardUpdateMonitor import com.android.keyguard.LockIconViewController import com.android.keyguard.dagger.KeyguardBouncerComponent +import com.android.systemui.Flags import com.android.systemui.SysuiTestCase import com.android.systemui.back.domain.interactor.BackActionInteractor import com.android.systemui.biometrics.data.repository.FakeFacePropertyRepository @@ -51,7 +52,6 @@ import com.android.systemui.dock.DockManager import com.android.systemui.dump.DumpManager import com.android.systemui.dump.logcatLogBuffer import com.android.systemui.flags.FakeFeatureFlagsClassic -import com.android.systemui.flags.Flags.ALTERNATE_BOUNCER_VIEW import com.android.systemui.flags.Flags.LOCKSCREEN_WALLPAPER_DREAM_ENABLED import com.android.systemui.flags.Flags.REVAMPED_BOUNCER_MESSAGES import com.android.systemui.flags.Flags.SPLIT_SHADE_SUBPIXEL_OPTIMIZATION @@ -97,7 +97,6 @@ import com.android.systemui.util.mockito.any import com.android.systemui.util.mockito.eq import com.android.systemui.util.time.FakeSystemClock import com.google.common.truth.Truth.assertThat -import java.util.Optional import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.flow.emptyFlow import kotlinx.coroutines.test.TestScope @@ -112,8 +111,9 @@ import org.mockito.Mockito.mock import org.mockito.Mockito.never import org.mockito.Mockito.times import org.mockito.Mockito.verify -import org.mockito.Mockito.`when` as whenever import org.mockito.MockitoAnnotations +import java.util.Optional +import org.mockito.Mockito.`when` as whenever @OptIn(ExperimentalCoroutinesApi::class) @SmallTest @@ -198,7 +198,7 @@ class NotificationShadeWindowViewControllerTest : SysuiTestCase() { featureFlagsClassic.set(SPLIT_SHADE_SUBPIXEL_OPTIMIZATION, true) featureFlagsClassic.set(REVAMPED_BOUNCER_MESSAGES, true) featureFlagsClassic.set(LOCKSCREEN_WALLPAPER_DREAM_ENABLED, false) - featureFlagsClassic.set(ALTERNATE_BOUNCER_VIEW, false) + mSetFlagsRule.disableFlags(Flags.FLAG_DEVICE_ENTRY_UDFPS_REFACTOR) mCommunalRepository = FakeCommunalRepository() diff --git a/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationShadeWindowViewTest.kt b/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationShadeWindowViewTest.kt index 4b6290619192..9c8816c72fae 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationShadeWindowViewTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationShadeWindowViewTest.kt @@ -29,7 +29,6 @@ import com.android.keyguard.KeyguardUpdateMonitor import com.android.keyguard.LockIconViewController import com.android.keyguard.dagger.KeyguardBouncerComponent import com.android.systemui.SysuiTestCase -import com.android.systemui.back.domain.interactor.BackActionInteractor import com.android.systemui.biometrics.data.repository.FakeFacePropertyRepository import com.android.systemui.bouncer.data.repository.BouncerMessageRepositoryImpl import com.android.systemui.bouncer.data.repository.FakeKeyguardBouncerRepository @@ -60,7 +59,6 @@ import com.android.systemui.keyguard.data.repository.FakeTrustRepository import com.android.systemui.keyguard.domain.interactor.KeyguardTransitionInteractor import com.android.systemui.keyguard.ui.viewmodel.PrimaryBouncerToGoneTransitionViewModel import com.android.systemui.log.BouncerLogger -import com.android.systemui.power.domain.interactor.PowerInteractor import com.android.systemui.res.R import com.android.systemui.shade.NotificationShadeWindowView.InteractionEventHandler import com.android.systemui.statusbar.DragDownHelper @@ -114,8 +112,6 @@ class NotificationShadeWindowViewTest : SysuiTestCase() { @Mock private lateinit var centralSurfaces: CentralSurfaces @Mock private lateinit var dozeServiceHost: DozeServiceHost @Mock private lateinit var dozeScrimController: DozeScrimController - @Mock private lateinit var backActionInteractor: BackActionInteractor - @Mock private lateinit var powerInteractor: PowerInteractor @Mock private lateinit var dockManager: DockManager @Mock private lateinit var notificationPanelViewController: NotificationPanelViewController @Mock private lateinit var notificationStackScrollLayout: NotificationStackScrollLayout @@ -192,7 +188,7 @@ class NotificationShadeWindowViewTest : SysuiTestCase() { featureFlags.set(Flags.SPLIT_SHADE_SUBPIXEL_OPTIMIZATION, true) featureFlags.set(Flags.REVAMPED_BOUNCER_MESSAGES, true) featureFlags.set(Flags.LOCKSCREEN_WALLPAPER_DREAM_ENABLED, false) - featureFlags.set(Flags.ALTERNATE_BOUNCER_VIEW, false) + mSetFlagsRule.disableFlags(com.android.systemui.Flags.FLAG_DEVICE_ENTRY_UDFPS_REFACTOR) testScope = TestScope() controller = NotificationShadeWindowViewController( diff --git a/packages/SystemUI/tests/src/com/android/systemui/shade/QuickSettingsControllerBaseTest.java b/packages/SystemUI/tests/src/com/android/systemui/shade/QuickSettingsControllerBaseTest.java index ff110c5437a2..26b84e372d5c 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/shade/QuickSettingsControllerBaseTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/shade/QuickSettingsControllerBaseTest.java @@ -68,6 +68,8 @@ import com.android.systemui.scene.shared.logger.SceneLogger; import com.android.systemui.screenrecord.RecordingController; import com.android.systemui.shade.data.repository.FakeShadeRepository; import com.android.systemui.shade.domain.interactor.ShadeInteractor; +import com.android.systemui.shade.domain.interactor.ShadeInteractorImpl; +import com.android.systemui.shade.domain.interactor.ShadeInteractorLegacyImpl; import com.android.systemui.shade.transition.ShadeTransitionController; import com.android.systemui.shared.system.ActivityManagerWrapper; import com.android.systemui.statusbar.LockscreenShadeTransitionController; @@ -267,25 +269,26 @@ public class QuickSettingsControllerBaseTest extends SysuiTestCase { ResourcesSplitShadeStateController splitShadeStateController = new ResourcesSplitShadeStateController(); - mShadeInteractor = - new ShadeInteractor( + mShadeInteractor = new ShadeInteractorImpl( + mTestScope.getBackgroundScope(), + deviceProvisioningRepository, + mDisableFlagsRepository, + mDozeParameters, + mKeyguardRepository, + keyguardTransitionInteractor, + powerInteractor, + new FakeUserSetupRepository(), + mUserSwitcherInteractor, + new ShadeInteractorLegacyImpl( mTestScope.getBackgroundScope(), - deviceProvisioningRepository, - mDisableFlagsRepository, - mDozeParameters, - sceneContainerFlags, - () -> sceneInteractor, mKeyguardRepository, - keyguardTransitionInteractor, - powerInteractor, - new FakeUserSetupRepository(), - mUserSwitcherInteractor, new SharedNotificationContainerInteractor( configurationRepository, mContext, splitShadeStateController), mShadeRepository - ); + ) + ); KeyguardStatusView keyguardStatusView = new KeyguardStatusView(mContext); keyguardStatusView.setId(R.id.keyguard_status_view); diff --git a/packages/SystemUI/tests/src/com/android/systemui/shade/QuickSettingsControllerTest.java b/packages/SystemUI/tests/src/com/android/systemui/shade/QuickSettingsControllerTest.java index 7cb6d931ea8b..997e0e27ef9c 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/shade/QuickSettingsControllerTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/shade/QuickSettingsControllerTest.java @@ -285,6 +285,20 @@ public class QuickSettingsControllerTest extends QuickSettingsControllerBaseTest } @Test + public void updateQsState_fullscreenTrue() { + mQsController.setExpanded(true); + mQsController.updateQsState(); + assertThat(mShadeRepository.getLegacyQsFullscreen().getValue()).isTrue(); + } + + @Test + public void updateQsState_fullscreenFalse() { + mQsController.setExpanded(false); + mQsController.updateQsState(); + assertThat(mShadeRepository.getLegacyQsFullscreen().getValue()).isFalse(); + } + + @Test public void shadeExpanded_onKeyguard() { mStatusBarStateController.setState(KEYGUARD); // set maxQsExpansion in NPVC diff --git a/packages/SystemUI/tests/src/com/android/systemui/shade/data/repository/ShadeRepositoryImplTest.kt b/packages/SystemUI/tests/src/com/android/systemui/shade/data/repository/ShadeRepositoryImplTest.kt index 20b19fd16f4f..5f8777ddcbb6 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/shade/data/repository/ShadeRepositoryImplTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/shade/data/repository/ShadeRepositoryImplTest.kt @@ -207,4 +207,22 @@ class ShadeRepositoryImplTest : SysuiTestCase() { underTest.setLegacyIsQsExpanded(true) assertThat(underTest.legacyIsQsExpanded.value).isEqualTo(true) } + + @Test + fun updateLegacyExpandImmediate() = + testScope.runTest { + assertThat(underTest.legacyExpandImmediate.value).isEqualTo(false) + + underTest.setLegacyExpandImmediate(true) + assertThat(underTest.legacyExpandImmediate.value).isEqualTo(true) + } + + @Test + fun updateLegacyQsFullscreen() = + testScope.runTest { + assertThat(underTest.legacyQsFullscreen.value).isEqualTo(false) + + underTest.setLegacyQsFullscreen(true) + assertThat(underTest.legacyQsFullscreen.value).isEqualTo(true) + } } diff --git a/packages/SystemUI/tests/src/com/android/systemui/shade/data/repository/ShadeInteractorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/shade/domain/interactor/ShadeInteractorImplTest.kt index ff7443f10bf3..61e4370949ca 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/shade/data/repository/ShadeInteractorTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/shade/domain/interactor/ShadeInteractorImplTest.kt @@ -14,7 +14,7 @@ * limitations under the License */ -package com.android.systemui.shade.data.repository +package com.android.systemui.shade.domain.interactor import android.app.StatusBarManager.DISABLE2_NONE import android.app.StatusBarManager.DISABLE2_NOTIFICATION_SHADE @@ -22,13 +22,11 @@ import android.app.StatusBarManager.DISABLE2_QUICK_SETTINGS import android.content.pm.UserInfo import android.os.UserManager import androidx.test.filters.SmallTest -import com.android.SysUITestComponent -import com.android.SysUITestModule -import com.android.TestMocksModule -import com.android.collectLastValue -import com.android.runCurrent -import com.android.runTest +import com.android.systemui.SysUITestComponent +import com.android.systemui.SysUITestModule import com.android.systemui.SysuiTestCase +import com.android.systemui.TestMocksModule +import com.android.systemui.collectLastValue import com.android.systemui.common.ui.data.repository.FakeConfigurationRepository import com.android.systemui.dagger.SysUISingleton import com.android.systemui.flags.FakeFeatureFlagsClassicModule @@ -45,10 +43,10 @@ import com.android.systemui.power.data.repository.FakePowerRepository import com.android.systemui.power.shared.model.WakeSleepReason import com.android.systemui.power.shared.model.WakefulnessState import com.android.systemui.res.R +import com.android.systemui.runCurrent +import com.android.systemui.runTest import com.android.systemui.scene.domain.interactor.SceneInteractor -import com.android.systemui.scene.shared.model.ObservableTransitionState -import com.android.systemui.scene.shared.model.SceneKey -import com.android.systemui.shade.domain.interactor.ShadeInteractor +import com.android.systemui.shade.data.repository.FakeShadeRepository import com.android.systemui.statusbar.disableflags.data.model.DisableFlagsModel import com.android.systemui.statusbar.disableflags.data.repository.FakeDisableFlagsRepository import com.android.systemui.statusbar.phone.DozeParameters @@ -62,14 +60,12 @@ import com.android.systemui.util.mockito.whenever import com.google.common.truth.Truth.assertThat import dagger.BindsInstance import dagger.Component -import kotlinx.coroutines.flow.MutableStateFlow -import kotlinx.coroutines.flow.flowOf import kotlinx.coroutines.runBlocking import org.junit.Before import org.junit.Test @SmallTest -class ShadeInteractorTest : SysuiTestCase() { +class ShadeInteractorImplTest : SysuiTestCase() { @SysUISingleton @Component( @@ -79,7 +75,7 @@ class ShadeInteractorTest : SysuiTestCase() { UserDomainLayerModule::class, ] ) - interface TestComponent : SysUITestComponent<ShadeInteractor> { + interface TestComponent : SysUITestComponent<ShadeInteractorImpl> { val configurationRepository: FakeConfigurationRepository val deviceProvisioningRepository: FakeDeviceProvisioningRepository @@ -105,7 +101,7 @@ class ShadeInteractorTest : SysuiTestCase() { private val dozeParameters: DozeParameters = mock() private val testComponent: TestComponent = - DaggerShadeInteractorTest_TestComponent.factory() + DaggerShadeInteractorImplTest_TestComponent.factory() .create( test = this, featureFlags = @@ -446,154 +442,6 @@ class ShadeInteractorTest : SysuiTestCase() { } @Test - fun lockscreenShadeExpansion_idle_onScene() = - testComponent.runTest() { - // GIVEN an expansion flow based on transitions to and from a scene - val key = SceneKey.Shade - val expansion = underTest.sceneBasedExpansion(sceneInteractor, key) - val expansionAmount by collectLastValue(expansion) - - // WHEN transition state is idle on the scene - val transitionState = - MutableStateFlow<ObservableTransitionState>(ObservableTransitionState.Idle(key)) - sceneInteractor.setTransitionState(transitionState) - - // THEN expansion is 1 - assertThat(expansionAmount).isEqualTo(1f) - } - - @Test - fun lockscreenShadeExpansion_idle_onDifferentScene() = - testComponent.runTest() { - // GIVEN an expansion flow based on transitions to and from a scene - val expansion = underTest.sceneBasedExpansion(sceneInteractor, SceneKey.Shade) - val expansionAmount by collectLastValue(expansion) - - // WHEN transition state is idle on a different scene - val transitionState = - MutableStateFlow<ObservableTransitionState>( - ObservableTransitionState.Idle(SceneKey.Lockscreen) - ) - sceneInteractor.setTransitionState(transitionState) - - // THEN expansion is 0 - assertThat(expansionAmount).isEqualTo(0f) - } - - @Test - fun lockscreenShadeExpansion_transitioning_toScene() = - testComponent.runTest() { - // GIVEN an expansion flow based on transitions to and from a scene - val key = SceneKey.QuickSettings - val expansion = underTest.sceneBasedExpansion(sceneInteractor, key) - val expansionAmount by collectLastValue(expansion) - - // WHEN transition state is starting to move to the scene - val progress = MutableStateFlow(0f) - val transitionState = - MutableStateFlow<ObservableTransitionState>( - ObservableTransitionState.Transition( - fromScene = SceneKey.Lockscreen, - toScene = key, - progress = progress, - isInitiatedByUserInput = false, - isUserInputOngoing = flowOf(false), - ) - ) - sceneInteractor.setTransitionState(transitionState) - - // THEN expansion is 0 - assertThat(expansionAmount).isEqualTo(0f) - - // WHEN transition state is partially to the scene - progress.value = .4f - - // THEN expansion matches the progress - assertThat(expansionAmount).isEqualTo(.4f) - - // WHEN transition completes - progress.value = 1f - - // THEN expansion is 1 - assertThat(expansionAmount).isEqualTo(1f) - } - - @Test - fun lockscreenShadeExpansion_transitioning_fromScene() = - testComponent.runTest() { - // GIVEN an expansion flow based on transitions to and from a scene - val key = SceneKey.QuickSettings - val expansion = underTest.sceneBasedExpansion(sceneInteractor, key) - val expansionAmount by collectLastValue(expansion) - - // WHEN transition state is starting to move to the scene - val progress = MutableStateFlow(0f) - val transitionState = - MutableStateFlow<ObservableTransitionState>( - ObservableTransitionState.Transition( - fromScene = key, - toScene = SceneKey.Lockscreen, - progress = progress, - isInitiatedByUserInput = false, - isUserInputOngoing = flowOf(false), - ) - ) - sceneInteractor.setTransitionState(transitionState) - - // THEN expansion is 1 - assertThat(expansionAmount).isEqualTo(1f) - - // WHEN transition state is partially to the scene - progress.value = .4f - - // THEN expansion reflects the progress - assertThat(expansionAmount).isEqualTo(.6f) - - // WHEN transition completes - progress.value = 1f - - // THEN expansion is 0 - assertThat(expansionAmount).isEqualTo(0f) - } - - @Test - fun lockscreenShadeExpansion_transitioning_toAndFromDifferentScenes() = - testComponent.runTest() { - // GIVEN an expansion flow based on transitions to and from a scene - val expansion = underTest.sceneBasedExpansion(sceneInteractor, SceneKey.QuickSettings) - val expansionAmount by collectLastValue(expansion) - - // WHEN transition state is starting to between different scenes - val progress = MutableStateFlow(0f) - val transitionState = - MutableStateFlow<ObservableTransitionState>( - ObservableTransitionState.Transition( - fromScene = SceneKey.Lockscreen, - toScene = SceneKey.Shade, - progress = progress, - isInitiatedByUserInput = false, - isUserInputOngoing = flowOf(false), - ) - ) - sceneInteractor.setTransitionState(transitionState) - - // THEN expansion is 0 - assertThat(expansionAmount).isEqualTo(0f) - - // WHEN transition state is partially complete - progress.value = .4f - - // THEN expansion is still 0 - assertThat(expansionAmount).isEqualTo(0f) - - // WHEN transition completes - progress.value = 1f - - // THEN expansion is still 0 - assertThat(expansionAmount).isEqualTo(0f) - } - - @Test fun userInteractingWithShade_shadeDraggedUpAndDown() = testComponent.runTest() { val actual by collectLastValue(underTest.isUserInteractingWithShade) @@ -815,199 +663,6 @@ class ShadeInteractorTest : SysuiTestCase() { // THEN user is not interacting assertThat(actual).isFalse() } - @Test - fun userInteracting_idle() = - testComponent.runTest() { - // GIVEN an interacting flow based on transitions to and from a scene - val key = SceneKey.Shade - val interactingFlow = underTest.sceneBasedInteracting(sceneInteractor, key) - val interacting by collectLastValue(interactingFlow) - - // WHEN transition state is idle - val transitionState = - MutableStateFlow<ObservableTransitionState>(ObservableTransitionState.Idle(key)) - sceneInteractor.setTransitionState(transitionState) - - // THEN interacting is false - assertThat(interacting).isFalse() - } - - @Test - fun userInteracting_transitioning_toScene_programmatic() = - testComponent.runTest() { - // GIVEN an interacting flow based on transitions to and from a scene - val key = SceneKey.QuickSettings - val interactingFlow = underTest.sceneBasedInteracting(sceneInteractor, key) - val interacting by collectLastValue(interactingFlow) - - // WHEN transition state is starting to move to the scene - val progress = MutableStateFlow(0f) - val transitionState = - MutableStateFlow<ObservableTransitionState>( - ObservableTransitionState.Transition( - fromScene = SceneKey.Lockscreen, - toScene = key, - progress = progress, - isInitiatedByUserInput = false, - isUserInputOngoing = flowOf(false), - ) - ) - sceneInteractor.setTransitionState(transitionState) - - // THEN interacting is false - assertThat(interacting).isFalse() - - // WHEN transition state is partially to the scene - progress.value = .4f - - // THEN interacting is false - assertThat(interacting).isFalse() - - // WHEN transition completes - progress.value = 1f - - // THEN interacting is false - assertThat(interacting).isFalse() - } - - @Test - fun userInteracting_transitioning_toScene_userInputDriven() = - testComponent.runTest() { - // GIVEN an interacting flow based on transitions to and from a scene - val key = SceneKey.QuickSettings - val interactingFlow = underTest.sceneBasedInteracting(sceneInteractor, key) - val interacting by collectLastValue(interactingFlow) - - // WHEN transition state is starting to move to the scene - val progress = MutableStateFlow(0f) - val transitionState = - MutableStateFlow<ObservableTransitionState>( - ObservableTransitionState.Transition( - fromScene = SceneKey.Lockscreen, - toScene = key, - progress = progress, - isInitiatedByUserInput = true, - isUserInputOngoing = flowOf(false), - ) - ) - sceneInteractor.setTransitionState(transitionState) - - // THEN interacting is true - assertThat(interacting).isTrue() - - // WHEN transition state is partially to the scene - progress.value = .4f - - // THEN interacting is true - assertThat(interacting).isTrue() - - // WHEN transition completes - progress.value = 1f - - // THEN interacting is true - assertThat(interacting).isTrue() - } - - @Test - fun userInteracting_transitioning_fromScene_programmatic() = - testComponent.runTest() { - // GIVEN an interacting flow based on transitions to and from a scene - val key = SceneKey.QuickSettings - val interactingFlow = underTest.sceneBasedInteracting(sceneInteractor, key) - val interacting by collectLastValue(interactingFlow) - - // WHEN transition state is starting to move to the scene - val progress = MutableStateFlow(0f) - val transitionState = - MutableStateFlow<ObservableTransitionState>( - ObservableTransitionState.Transition( - fromScene = key, - toScene = SceneKey.Lockscreen, - progress = progress, - isInitiatedByUserInput = false, - isUserInputOngoing = flowOf(false), - ) - ) - sceneInteractor.setTransitionState(transitionState) - - // THEN interacting is false - assertThat(interacting).isFalse() - - // WHEN transition state is partially to the scene - progress.value = .4f - - // THEN interacting is false - assertThat(interacting).isFalse() - - // WHEN transition completes - progress.value = 1f - - // THEN interacting is false - assertThat(interacting).isFalse() - } - - @Test - fun userInteracting_transitioning_fromScene_userInputDriven() = - testComponent.runTest() { - // GIVEN an interacting flow based on transitions to and from a scene - val key = SceneKey.QuickSettings - val interactingFlow = underTest.sceneBasedInteracting(sceneInteractor, key) - val interacting by collectLastValue(interactingFlow) - - // WHEN transition state is starting to move to the scene - val progress = MutableStateFlow(0f) - val transitionState = - MutableStateFlow<ObservableTransitionState>( - ObservableTransitionState.Transition( - fromScene = key, - toScene = SceneKey.Lockscreen, - progress = progress, - isInitiatedByUserInput = true, - isUserInputOngoing = flowOf(false), - ) - ) - sceneInteractor.setTransitionState(transitionState) - - // THEN interacting is true - assertThat(interacting).isTrue() - - // WHEN transition state is partially to the scene - progress.value = .4f - - // THEN interacting is true - assertThat(interacting).isTrue() - - // WHEN transition completes - progress.value = 1f - - // THEN interacting is true - assertThat(interacting).isTrue() - } - - @Test - fun userInteracting_transitioning_toAndFromDifferentScenes() = - testComponent.runTest() { - // GIVEN an interacting flow based on transitions to and from a scene - val interactingFlow = underTest.sceneBasedInteracting(sceneInteractor, SceneKey.Shade) - val interacting by collectLastValue(interactingFlow) - - // WHEN transition state is starting to between different scenes - val progress = MutableStateFlow(0f) - val transitionState = - MutableStateFlow<ObservableTransitionState>( - ObservableTransitionState.Transition( - fromScene = SceneKey.Lockscreen, - toScene = SceneKey.QuickSettings, - progress = MutableStateFlow(0f), - isInitiatedByUserInput = true, - isUserInputOngoing = flowOf(false), - ) - ) - sceneInteractor.setTransitionState(transitionState) - - // THEN interacting is false - assertThat(interacting).isFalse() - } @Test fun isShadeTouchable_isFalse_whenFrpIsActive() = diff --git a/packages/SystemUI/tests/src/com/android/systemui/shade/domain/interactor/ShadeInteractorLegacyImplTest.kt b/packages/SystemUI/tests/src/com/android/systemui/shade/domain/interactor/ShadeInteractorLegacyImplTest.kt new file mode 100644 index 000000000000..92eb6ed52c14 --- /dev/null +++ b/packages/SystemUI/tests/src/com/android/systemui/shade/domain/interactor/ShadeInteractorLegacyImplTest.kt @@ -0,0 +1,415 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License + */ + +package com.android.systemui.shade.domain.interactor + +import android.content.pm.UserInfo +import android.os.UserManager +import androidx.test.filters.SmallTest +import com.android.systemui.SysUITestComponent +import com.android.systemui.SysUITestModule +import com.android.systemui.SysuiTestCase +import com.android.systemui.TestMocksModule +import com.android.systemui.collectLastValue +import com.android.systemui.common.ui.data.repository.FakeConfigurationRepository +import com.android.systemui.dagger.SysUISingleton +import com.android.systemui.flags.FakeFeatureFlagsClassicModule +import com.android.systemui.flags.Flags +import com.android.systemui.keyguard.data.repository.FakeKeyguardRepository +import com.android.systemui.keyguard.data.repository.FakeKeyguardTransitionRepository +import com.android.systemui.keyguard.shared.model.StatusBarState +import com.android.systemui.power.data.repository.FakePowerRepository +import com.android.systemui.res.R +import com.android.systemui.runCurrent +import com.android.systemui.runTest +import com.android.systemui.scene.domain.interactor.SceneInteractor +import com.android.systemui.shade.data.repository.FakeShadeRepository +import com.android.systemui.statusbar.phone.DozeParameters +import com.android.systemui.user.data.repository.FakeUserRepository +import com.android.systemui.user.domain.UserDomainLayerModule +import com.android.systemui.util.mockito.mock +import com.google.common.truth.Truth.assertThat +import dagger.BindsInstance +import dagger.Component +import kotlinx.coroutines.runBlocking +import org.junit.Before +import org.junit.Test + +@SmallTest +class ShadeInteractorLegacyImplTest : SysuiTestCase() { + + @SysUISingleton + @Component( + modules = + [ + SysUITestModule::class, + UserDomainLayerModule::class, + ] + ) + interface TestComponent : SysUITestComponent<ShadeInteractorLegacyImpl> { + + val configurationRepository: FakeConfigurationRepository + val keyguardRepository: FakeKeyguardRepository + val keyguardTransitionRepository: FakeKeyguardTransitionRepository + val powerRepository: FakePowerRepository + val sceneInteractor: SceneInteractor + val shadeRepository: FakeShadeRepository + val userRepository: FakeUserRepository + + @Component.Factory + interface Factory { + fun create( + @BindsInstance test: SysuiTestCase, + featureFlags: FakeFeatureFlagsClassicModule, + mocks: TestMocksModule, + ): TestComponent + } + } + + private val dozeParameters: DozeParameters = mock() + + private val testComponent: TestComponent = + DaggerShadeInteractorLegacyImplTest_TestComponent.factory() + .create( + test = this, + featureFlags = + FakeFeatureFlagsClassicModule { + set(Flags.FACE_AUTH_REFACTOR, false) + set(Flags.FULL_SCREEN_USER_SWITCHER, true) + }, + mocks = + TestMocksModule( + dozeParameters = dozeParameters, + ), + ) + + @Before + fun setUp() { + runBlocking { + val userInfos = + listOf( + UserInfo( + /* id= */ 0, + /* name= */ "zero", + /* iconPath= */ "", + /* flags= */ UserInfo.FLAG_PRIMARY or + UserInfo.FLAG_ADMIN or + UserInfo.FLAG_FULL, + UserManager.USER_TYPE_FULL_SYSTEM, + ), + ) + testComponent.apply { + userRepository.setUserInfos(userInfos) + userRepository.setSelectedUserInfo(userInfos[0]) + } + } + } + + @Test + fun fullShadeExpansionWhenShadeLocked() = + testComponent.runTest() { + val actual by collectLastValue(underTest.shadeExpansion) + + keyguardRepository.setStatusBarState(StatusBarState.SHADE_LOCKED) + shadeRepository.setLockscreenShadeExpansion(0.5f) + + assertThat(actual).isEqualTo(1f) + } + + @Test + fun fullShadeExpansionWhenStatusBarStateIsNotShadeLocked() = + testComponent.runTest() { + val actual by collectLastValue(underTest.shadeExpansion) + + keyguardRepository.setStatusBarState(StatusBarState.KEYGUARD) + + shadeRepository.setLockscreenShadeExpansion(0.5f) + assertThat(actual).isEqualTo(0.5f) + + shadeRepository.setLockscreenShadeExpansion(0.8f) + assertThat(actual).isEqualTo(0.8f) + } + + @Test + fun shadeExpansionWhenInSplitShadeAndQsExpanded() = + testComponent.runTest() { + val actual by collectLastValue(underTest.shadeExpansion) + + // WHEN split shade is enabled and QS is expanded + keyguardRepository.setStatusBarState(StatusBarState.SHADE) + overrideResource(R.bool.config_use_split_notification_shade, true) + configurationRepository.onAnyConfigurationChange() + shadeRepository.setQsExpansion(.5f) + shadeRepository.setLegacyShadeExpansion(.7f) + runCurrent() + + // THEN legacy shade expansion is passed through + assertThat(actual).isEqualTo(.7f) + } + + @Test + fun shadeExpansionWhenNotInSplitShadeAndQsExpanded() = + testComponent.runTest() { + val actual by collectLastValue(underTest.shadeExpansion) + + // WHEN split shade is not enabled and QS is expanded + keyguardRepository.setStatusBarState(StatusBarState.SHADE) + overrideResource(R.bool.config_use_split_notification_shade, false) + shadeRepository.setQsExpansion(.5f) + shadeRepository.setLegacyShadeExpansion(1f) + runCurrent() + + // THEN shade expansion is zero + assertThat(actual).isEqualTo(0f) + } + + @Test + fun shadeExpansionWhenNotInSplitShadeAndQsCollapsed() = + testComponent.runTest() { + val actual by collectLastValue(underTest.shadeExpansion) + + // WHEN split shade is not enabled and QS is expanded + keyguardRepository.setStatusBarState(StatusBarState.SHADE) + shadeRepository.setQsExpansion(0f) + shadeRepository.setLegacyShadeExpansion(.6f) + + // THEN shade expansion is zero + assertThat(actual).isEqualTo(.6f) + } + + @Test + fun userInteractingWithShade_shadeDraggedUpAndDown() = + testComponent.runTest() { + val actual by collectLastValue(underTest.isUserInteractingWithShade) + // GIVEN shade collapsed and not tracking input + shadeRepository.setLegacyShadeExpansion(0f) + shadeRepository.setLegacyShadeTracking(false) + runCurrent() + + // THEN user is not interacting + assertThat(actual).isFalse() + + // WHEN shade tracking starts + shadeRepository.setLegacyShadeTracking(true) + runCurrent() + + // THEN user is interacting + assertThat(actual).isTrue() + + // WHEN shade dragged down halfway + shadeRepository.setLegacyShadeExpansion(.5f) + runCurrent() + + // THEN user is interacting + assertThat(actual).isTrue() + + // WHEN shade fully expanded but tracking is not stopped + shadeRepository.setLegacyShadeExpansion(1f) + runCurrent() + + // THEN user is interacting + assertThat(actual).isTrue() + + // WHEN shade fully collapsed but tracking is not stopped + shadeRepository.setLegacyShadeExpansion(0f) + runCurrent() + + // THEN user is interacting + assertThat(actual).isTrue() + + // WHEN shade dragged halfway and tracking is stopped + shadeRepository.setLegacyShadeExpansion(.6f) + shadeRepository.setLegacyShadeTracking(false) + runCurrent() + + // THEN user is interacting + assertThat(actual).isTrue() + + // WHEN shade completes expansion stopped + shadeRepository.setLegacyShadeExpansion(1f) + runCurrent() + + // THEN user is not interacting + assertThat(actual).isFalse() + } + + @Test + fun userInteractingWithShade_shadeExpanded() = + testComponent.runTest() { + val actual by collectLastValue(underTest.isUserInteractingWithShade) + // GIVEN shade collapsed and not tracking input + shadeRepository.setLegacyShadeExpansion(0f) + shadeRepository.setLegacyShadeTracking(false) + runCurrent() + + // THEN user is not interacting + assertThat(actual).isFalse() + + // WHEN shade tracking starts + shadeRepository.setLegacyShadeTracking(true) + runCurrent() + + // THEN user is interacting + assertThat(actual).isTrue() + + // WHEN shade dragged down halfway + shadeRepository.setLegacyShadeExpansion(.5f) + runCurrent() + + // THEN user is interacting + assertThat(actual).isTrue() + + // WHEN shade fully expanded and tracking is stopped + shadeRepository.setLegacyShadeExpansion(1f) + shadeRepository.setLegacyShadeTracking(false) + runCurrent() + + // THEN user is not interacting + assertThat(actual).isFalse() + } + + @Test + fun userInteractingWithShade_shadePartiallyExpanded() = + testComponent.runTest() { + val actual by collectLastValue(underTest.isUserInteractingWithShade) + // GIVEN shade collapsed and not tracking input + shadeRepository.setLegacyShadeExpansion(0f) + shadeRepository.setLegacyShadeTracking(false) + runCurrent() + + // THEN user is not interacting + assertThat(actual).isFalse() + + // WHEN shade tracking starts + shadeRepository.setLegacyShadeTracking(true) + runCurrent() + + // THEN user is interacting + assertThat(actual).isTrue() + + // WHEN shade partially expanded + shadeRepository.setLegacyShadeExpansion(.4f) + runCurrent() + + // THEN user is interacting + assertThat(actual).isTrue() + + // WHEN tracking is stopped + shadeRepository.setLegacyShadeTracking(false) + runCurrent() + + // THEN user is interacting + assertThat(actual).isTrue() + + // WHEN shade goes back to collapsed + shadeRepository.setLegacyShadeExpansion(0f) + runCurrent() + + // THEN user is not interacting + assertThat(actual).isFalse() + } + + @Test + fun userInteractingWithShade_shadeCollapsed() = + testComponent.runTest() { + val actual by collectLastValue(underTest.isUserInteractingWithShade) + // GIVEN shade expanded and not tracking input + shadeRepository.setLegacyShadeExpansion(1f) + shadeRepository.setLegacyShadeTracking(false) + runCurrent() + + // THEN user is not interacting + assertThat(actual).isFalse() + + // WHEN shade tracking starts + shadeRepository.setLegacyShadeTracking(true) + runCurrent() + + // THEN user is interacting + assertThat(actual).isTrue() + + // WHEN shade dragged up halfway + shadeRepository.setLegacyShadeExpansion(.5f) + runCurrent() + + // THEN user is interacting + assertThat(actual).isTrue() + + // WHEN shade fully collapsed and tracking is stopped + shadeRepository.setLegacyShadeExpansion(0f) + shadeRepository.setLegacyShadeTracking(false) + runCurrent() + + // THEN user is not interacting + assertThat(actual).isFalse() + } + + @Test + fun userInteractingWithQs_qsDraggedUpAndDown() = + testComponent.runTest() { + val actual by collectLastValue(underTest.isUserInteractingWithQs) + // GIVEN qs collapsed and not tracking input + shadeRepository.setQsExpansion(0f) + shadeRepository.setLegacyQsTracking(false) + runCurrent() + + // THEN user is not interacting + assertThat(actual).isFalse() + + // WHEN qs tracking starts + shadeRepository.setLegacyQsTracking(true) + runCurrent() + + // THEN user is interacting + assertThat(actual).isTrue() + + // WHEN qs dragged down halfway + shadeRepository.setQsExpansion(.5f) + runCurrent() + + // THEN user is interacting + assertThat(actual).isTrue() + + // WHEN qs fully expanded but tracking is not stopped + shadeRepository.setQsExpansion(1f) + runCurrent() + + // THEN user is interacting + assertThat(actual).isTrue() + + // WHEN qs fully collapsed but tracking is not stopped + shadeRepository.setQsExpansion(0f) + runCurrent() + + // THEN user is interacting + assertThat(actual).isTrue() + + // WHEN qs dragged halfway and tracking is stopped + shadeRepository.setQsExpansion(.6f) + shadeRepository.setLegacyQsTracking(false) + runCurrent() + + // THEN user is interacting + assertThat(actual).isTrue() + + // WHEN qs completes expansion stopped + shadeRepository.setQsExpansion(1f) + runCurrent() + + // THEN user is not interacting + assertThat(actual).isFalse() + } +} diff --git a/packages/SystemUI/tests/src/com/android/systemui/shade/domain/interactor/ShadeInteractorSceneContainerImplTest.kt b/packages/SystemUI/tests/src/com/android/systemui/shade/domain/interactor/ShadeInteractorSceneContainerImplTest.kt new file mode 100644 index 000000000000..729f3f840e1a --- /dev/null +++ b/packages/SystemUI/tests/src/com/android/systemui/shade/domain/interactor/ShadeInteractorSceneContainerImplTest.kt @@ -0,0 +1,583 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.systemui.shade.domain.interactor + +import android.content.pm.UserInfo +import android.os.UserManager +import androidx.test.filters.SmallTest +import com.android.systemui.SysUITestComponent +import com.android.systemui.SysUITestModule +import com.android.systemui.SysuiTestCase +import com.android.systemui.TestMocksModule +import com.android.systemui.collectLastValue +import com.android.systemui.common.ui.data.repository.FakeConfigurationRepository +import com.android.systemui.dagger.SysUISingleton +import com.android.systemui.flags.FakeFeatureFlagsClassicModule +import com.android.systemui.flags.Flags +import com.android.systemui.keyguard.data.repository.FakeKeyguardRepository +import com.android.systemui.keyguard.data.repository.FakeKeyguardTransitionRepository +import com.android.systemui.keyguard.shared.model.StatusBarState +import com.android.systemui.power.data.repository.FakePowerRepository +import com.android.systemui.res.R +import com.android.systemui.runCurrent +import com.android.systemui.runTest +import com.android.systemui.scene.domain.interactor.SceneInteractor +import com.android.systemui.scene.shared.model.ObservableTransitionState +import com.android.systemui.scene.shared.model.SceneKey +import com.android.systemui.shade.data.repository.FakeShadeRepository +import com.android.systemui.statusbar.phone.DozeParameters +import com.android.systemui.user.data.repository.FakeUserRepository +import com.android.systemui.user.domain.UserDomainLayerModule +import com.android.systemui.util.mockito.mock +import com.google.common.truth.Truth +import dagger.BindsInstance +import dagger.Component +import kotlinx.coroutines.flow.MutableStateFlow +import kotlinx.coroutines.flow.flowOf +import kotlinx.coroutines.runBlocking +import org.junit.Before +import org.junit.Ignore +import org.junit.Test + +@SmallTest +class ShadeInteractorSceneContainerImplTest : SysuiTestCase() { + + @SysUISingleton + @Component( + modules = + [ + SysUITestModule::class, + UserDomainLayerModule::class, + ] + ) + interface TestComponent : SysUITestComponent<ShadeInteractorSceneContainerImpl> { + + val configurationRepository: FakeConfigurationRepository + val keyguardRepository: FakeKeyguardRepository + val keyguardTransitionRepository: FakeKeyguardTransitionRepository + val powerRepository: FakePowerRepository + val sceneInteractor: SceneInteractor + val shadeRepository: FakeShadeRepository + val userRepository: FakeUserRepository + + @Component.Factory + interface Factory { + fun create( + @BindsInstance test: SysuiTestCase, + featureFlags: FakeFeatureFlagsClassicModule, + mocks: TestMocksModule, + ): TestComponent + } + } + + private val dozeParameters: DozeParameters = mock() + + private val testComponent: TestComponent = + DaggerShadeInteractorSceneContainerImplTest_TestComponent.factory() + .create( + test = this, + featureFlags = + FakeFeatureFlagsClassicModule { + set(Flags.FACE_AUTH_REFACTOR, false) + set(Flags.FULL_SCREEN_USER_SWITCHER, true) + }, + mocks = + TestMocksModule( + dozeParameters = dozeParameters, + ), + ) + + @Before + fun setUp() { + runBlocking { + val userInfos = + listOf( + UserInfo( + /* id= */ 0, + /* name= */ "zero", + /* iconPath= */ "", + /* flags= */ UserInfo.FLAG_PRIMARY or + UserInfo.FLAG_ADMIN or + UserInfo.FLAG_FULL, + UserManager.USER_TYPE_FULL_SYSTEM, + ), + ) + testComponent.apply { + userRepository.setUserInfos(userInfos) + userRepository.setSelectedUserInfo(userInfos[0]) + } + } + } + + @Ignore("b/309825977") + @Test + fun qsExpansionWhenInSplitShadeAndQsExpanded() = + testComponent.runTest() { + val actual by collectLastValue(underTest.qsExpansion) + + // WHEN split shade is enabled and QS is expanded + keyguardRepository.setStatusBarState(StatusBarState.SHADE) + overrideResource(R.bool.config_use_split_notification_shade, true) + configurationRepository.onAnyConfigurationChange() + val progress = MutableStateFlow(.3f) + val transitionState = + MutableStateFlow<ObservableTransitionState>( + ObservableTransitionState.Transition( + fromScene = SceneKey.QuickSettings, + toScene = SceneKey.Shade, + progress = progress, + isInitiatedByUserInput = false, + isUserInputOngoing = flowOf(false), + ) + ) + sceneInteractor.setTransitionState(transitionState) + runCurrent() + + // THEN legacy shade expansion is passed through + Truth.assertThat(actual).isEqualTo(.3f) + } + + @Ignore("b/309825977") + @Test + fun qsExpansionWhenNotInSplitShadeAndQsExpanded() = + testComponent.runTest() { + val actual by collectLastValue(underTest.qsExpansion) + + // WHEN split shade is not enabled and QS is expanded + keyguardRepository.setStatusBarState(StatusBarState.SHADE) + overrideResource(R.bool.config_use_split_notification_shade, false) + val progress = MutableStateFlow(.3f) + val transitionState = + MutableStateFlow<ObservableTransitionState>( + ObservableTransitionState.Transition( + fromScene = SceneKey.QuickSettings, + toScene = SceneKey.Shade, + progress = progress, + isInitiatedByUserInput = false, + isUserInputOngoing = flowOf(false), + ) + ) + sceneInteractor.setTransitionState(transitionState) + runCurrent() + + // THEN shade expansion is zero + Truth.assertThat(actual).isEqualTo(.7f) + } + + @Test + fun qsFullscreen_falseWhenTransitioning() = + testComponent.runTest() { + val actual by collectLastValue(underTest.isQsFullscreen) + + // WHEN scene transition active + keyguardRepository.setStatusBarState(StatusBarState.SHADE) + val progress = MutableStateFlow(.3f) + val transitionState = + MutableStateFlow<ObservableTransitionState>( + ObservableTransitionState.Transition( + fromScene = SceneKey.QuickSettings, + toScene = SceneKey.Shade, + progress = progress, + isInitiatedByUserInput = false, + isUserInputOngoing = flowOf(false), + ) + ) + sceneInteractor.setTransitionState(transitionState) + runCurrent() + + // THEN QS is not fullscreen + Truth.assertThat(actual).isFalse() + } + + @Test + fun qsFullscreen_falseWhenIdleNotQS() = + testComponent.runTest() { + val actual by collectLastValue(underTest.isQsFullscreen) + + // WHEN Idle but not on QuickSettings scene + keyguardRepository.setStatusBarState(StatusBarState.SHADE) + val transitionState = + MutableStateFlow<ObservableTransitionState>( + ObservableTransitionState.Idle(SceneKey.Shade) + ) + sceneInteractor.setTransitionState(transitionState) + runCurrent() + + // THEN QS is not fullscreen + Truth.assertThat(actual).isFalse() + } + + @Test + fun qsFullscreen_trueWhenIdleQS() = + testComponent.runTest() { + val actual by collectLastValue(underTest.isQsFullscreen) + + // WHEN Idle on QuickSettings scene + keyguardRepository.setStatusBarState(StatusBarState.SHADE) + val transitionState = + MutableStateFlow<ObservableTransitionState>( + ObservableTransitionState.Idle(SceneKey.QuickSettings) + ) + sceneInteractor.setTransitionState(transitionState) + runCurrent() + + // THEN QS is fullscreen + Truth.assertThat(actual).isTrue() + } + + @Test + fun lockscreenShadeExpansion_idle_onScene() = + testComponent.runTest() { + // GIVEN an expansion flow based on transitions to and from a scene + val key = SceneKey.Shade + val expansion = underTest.sceneBasedExpansion(sceneInteractor, key) + val expansionAmount by collectLastValue(expansion) + + // WHEN transition state is idle on the scene + val transitionState = + MutableStateFlow<ObservableTransitionState>(ObservableTransitionState.Idle(key)) + sceneInteractor.setTransitionState(transitionState) + + // THEN expansion is 1 + Truth.assertThat(expansionAmount).isEqualTo(1f) + } + + @Test + fun lockscreenShadeExpansion_idle_onDifferentScene() = + testComponent.runTest() { + // GIVEN an expansion flow based on transitions to and from a scene + val expansion = underTest.sceneBasedExpansion(sceneInteractor, SceneKey.Shade) + val expansionAmount by collectLastValue(expansion) + + // WHEN transition state is idle on a different scene + val transitionState = + MutableStateFlow<ObservableTransitionState>( + ObservableTransitionState.Idle(SceneKey.Lockscreen) + ) + sceneInteractor.setTransitionState(transitionState) + + // THEN expansion is 0 + Truth.assertThat(expansionAmount).isEqualTo(0f) + } + + @Test + fun lockscreenShadeExpansion_transitioning_toScene() = + testComponent.runTest() { + // GIVEN an expansion flow based on transitions to and from a scene + val key = SceneKey.QuickSettings + val expansion = underTest.sceneBasedExpansion(sceneInteractor, key) + val expansionAmount by collectLastValue(expansion) + + // WHEN transition state is starting to move to the scene + val progress = MutableStateFlow(0f) + val transitionState = + MutableStateFlow<ObservableTransitionState>( + ObservableTransitionState.Transition( + fromScene = SceneKey.Lockscreen, + toScene = key, + progress = progress, + isInitiatedByUserInput = false, + isUserInputOngoing = flowOf(false), + ) + ) + sceneInteractor.setTransitionState(transitionState) + + // THEN expansion is 0 + Truth.assertThat(expansionAmount).isEqualTo(0f) + + // WHEN transition state is partially to the scene + progress.value = .4f + + // THEN expansion matches the progress + Truth.assertThat(expansionAmount).isEqualTo(.4f) + + // WHEN transition completes + progress.value = 1f + + // THEN expansion is 1 + Truth.assertThat(expansionAmount).isEqualTo(1f) + } + + @Test + fun lockscreenShadeExpansion_transitioning_fromScene() = + testComponent.runTest() { + // GIVEN an expansion flow based on transitions to and from a scene + val key = SceneKey.QuickSettings + val expansion = underTest.sceneBasedExpansion(sceneInteractor, key) + val expansionAmount by collectLastValue(expansion) + + // WHEN transition state is starting to move to the scene + val progress = MutableStateFlow(0f) + val transitionState = + MutableStateFlow<ObservableTransitionState>( + ObservableTransitionState.Transition( + fromScene = key, + toScene = SceneKey.Lockscreen, + progress = progress, + isInitiatedByUserInput = false, + isUserInputOngoing = flowOf(false), + ) + ) + sceneInteractor.setTransitionState(transitionState) + + // THEN expansion is 1 + Truth.assertThat(expansionAmount).isEqualTo(1f) + + // WHEN transition state is partially to the scene + progress.value = .4f + + // THEN expansion reflects the progress + Truth.assertThat(expansionAmount).isEqualTo(.6f) + + // WHEN transition completes + progress.value = 1f + + // THEN expansion is 0 + Truth.assertThat(expansionAmount).isEqualTo(0f) + } + + @Test + fun lockscreenShadeExpansion_transitioning_toAndFromDifferentScenes() = + testComponent.runTest() { + // GIVEN an expansion flow based on transitions to and from a scene + val expansion = underTest.sceneBasedExpansion(sceneInteractor, SceneKey.QuickSettings) + val expansionAmount by collectLastValue(expansion) + + // WHEN transition state is starting to between different scenes + val progress = MutableStateFlow(0f) + val transitionState = + MutableStateFlow<ObservableTransitionState>( + ObservableTransitionState.Transition( + fromScene = SceneKey.Lockscreen, + toScene = SceneKey.Shade, + progress = progress, + isInitiatedByUserInput = false, + isUserInputOngoing = flowOf(false), + ) + ) + sceneInteractor.setTransitionState(transitionState) + + // THEN expansion is 0 + Truth.assertThat(expansionAmount).isEqualTo(0f) + + // WHEN transition state is partially complete + progress.value = .4f + + // THEN expansion is still 0 + Truth.assertThat(expansionAmount).isEqualTo(0f) + + // WHEN transition completes + progress.value = 1f + + // THEN expansion is still 0 + Truth.assertThat(expansionAmount).isEqualTo(0f) + } + + @Test + fun userInteracting_idle() = + testComponent.runTest() { + // GIVEN an interacting flow based on transitions to and from a scene + val key = SceneKey.Shade + val interactingFlow = underTest.sceneBasedInteracting(sceneInteractor, key) + val interacting by collectLastValue(interactingFlow) + + // WHEN transition state is idle + val transitionState = + MutableStateFlow<ObservableTransitionState>(ObservableTransitionState.Idle(key)) + sceneInteractor.setTransitionState(transitionState) + + // THEN interacting is false + Truth.assertThat(interacting).isFalse() + } + + @Test + fun userInteracting_transitioning_toScene_programmatic() = + testComponent.runTest() { + // GIVEN an interacting flow based on transitions to and from a scene + val key = SceneKey.QuickSettings + val interactingFlow = underTest.sceneBasedInteracting(sceneInteractor, key) + val interacting by collectLastValue(interactingFlow) + + // WHEN transition state is starting to move to the scene + val progress = MutableStateFlow(0f) + val transitionState = + MutableStateFlow<ObservableTransitionState>( + ObservableTransitionState.Transition( + fromScene = SceneKey.Lockscreen, + toScene = key, + progress = progress, + isInitiatedByUserInput = false, + isUserInputOngoing = flowOf(false), + ) + ) + sceneInteractor.setTransitionState(transitionState) + + // THEN interacting is false + Truth.assertThat(interacting).isFalse() + + // WHEN transition state is partially to the scene + progress.value = .4f + + // THEN interacting is false + Truth.assertThat(interacting).isFalse() + + // WHEN transition completes + progress.value = 1f + + // THEN interacting is false + Truth.assertThat(interacting).isFalse() + } + + @Test + fun userInteracting_transitioning_toScene_userInputDriven() = + testComponent.runTest() { + // GIVEN an interacting flow based on transitions to and from a scene + val key = SceneKey.QuickSettings + val interactingFlow = underTest.sceneBasedInteracting(sceneInteractor, key) + val interacting by collectLastValue(interactingFlow) + + // WHEN transition state is starting to move to the scene + val progress = MutableStateFlow(0f) + val transitionState = + MutableStateFlow<ObservableTransitionState>( + ObservableTransitionState.Transition( + fromScene = SceneKey.Lockscreen, + toScene = key, + progress = progress, + isInitiatedByUserInput = true, + isUserInputOngoing = flowOf(false), + ) + ) + sceneInteractor.setTransitionState(transitionState) + + // THEN interacting is true + Truth.assertThat(interacting).isTrue() + + // WHEN transition state is partially to the scene + progress.value = .4f + + // THEN interacting is true + Truth.assertThat(interacting).isTrue() + + // WHEN transition completes + progress.value = 1f + + // THEN interacting is true + Truth.assertThat(interacting).isTrue() + } + + @Test + fun userInteracting_transitioning_fromScene_programmatic() = + testComponent.runTest() { + // GIVEN an interacting flow based on transitions to and from a scene + val key = SceneKey.QuickSettings + val interactingFlow = underTest.sceneBasedInteracting(sceneInteractor, key) + val interacting by collectLastValue(interactingFlow) + + // WHEN transition state is starting to move to the scene + val progress = MutableStateFlow(0f) + val transitionState = + MutableStateFlow<ObservableTransitionState>( + ObservableTransitionState.Transition( + fromScene = key, + toScene = SceneKey.Lockscreen, + progress = progress, + isInitiatedByUserInput = false, + isUserInputOngoing = flowOf(false), + ) + ) + sceneInteractor.setTransitionState(transitionState) + + // THEN interacting is false + Truth.assertThat(interacting).isFalse() + + // WHEN transition state is partially to the scene + progress.value = .4f + + // THEN interacting is false + Truth.assertThat(interacting).isFalse() + + // WHEN transition completes + progress.value = 1f + + // THEN interacting is false + Truth.assertThat(interacting).isFalse() + } + + @Test + fun userInteracting_transitioning_fromScene_userInputDriven() = + testComponent.runTest() { + // GIVEN an interacting flow based on transitions to and from a scene + val key = SceneKey.QuickSettings + val interactingFlow = underTest.sceneBasedInteracting(sceneInteractor, key) + val interacting by collectLastValue(interactingFlow) + + // WHEN transition state is starting to move to the scene + val progress = MutableStateFlow(0f) + val transitionState = + MutableStateFlow<ObservableTransitionState>( + ObservableTransitionState.Transition( + fromScene = key, + toScene = SceneKey.Lockscreen, + progress = progress, + isInitiatedByUserInput = true, + isUserInputOngoing = flowOf(false), + ) + ) + sceneInteractor.setTransitionState(transitionState) + + // THEN interacting is true + Truth.assertThat(interacting).isTrue() + + // WHEN transition state is partially to the scene + progress.value = .4f + + // THEN interacting is true + Truth.assertThat(interacting).isTrue() + + // WHEN transition completes + progress.value = 1f + + // THEN interacting is true + Truth.assertThat(interacting).isTrue() + } + + @Test + fun userInteracting_transitioning_toAndFromDifferentScenes() = + testComponent.runTest() { + // GIVEN an interacting flow based on transitions to and from a scene + val interactingFlow = underTest.sceneBasedInteracting(sceneInteractor, SceneKey.Shade) + val interacting by collectLastValue(interactingFlow) + + // WHEN transition state is starting to between different scenes + val progress = MutableStateFlow(0f) + val transitionState = + MutableStateFlow<ObservableTransitionState>( + ObservableTransitionState.Transition( + fromScene = SceneKey.Lockscreen, + toScene = SceneKey.QuickSettings, + progress = MutableStateFlow(0f), + isInitiatedByUserInput = true, + isUserInputOngoing = flowOf(false), + ) + ) + sceneInteractor.setTransitionState(transitionState) + + // THEN interacting is false + Truth.assertThat(interacting).isFalse() + } +} diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/DragDownHelperTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/DragDownHelperTest.kt index d925d0acd8d8..ea7c06865001 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/DragDownHelperTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/DragDownHelperTest.kt @@ -23,6 +23,7 @@ import androidx.test.filters.SmallTest import com.android.systemui.ExpandHelper import com.android.systemui.SysuiTestCase import com.android.systemui.classifier.FalsingCollector +import com.android.systemui.keyguard.domain.interactor.NaturalScrollingSettingObserver import com.android.systemui.plugins.FalsingManager import com.android.systemui.statusbar.notification.row.ExpandableView import com.android.systemui.util.mockito.mock @@ -48,16 +49,19 @@ class DragDownHelperTest : SysuiTestCase() { private val dragDownloadCallback: LockscreenShadeTransitionController = mock() private val expandableView: ExpandableView = mock() private val expandCallback: ExpandHelper.Callback = mock() + private val naturalScrollingSettingObserver: NaturalScrollingSettingObserver = mock() @Before fun setUp() { whenever(expandableView.collapsedHeight).thenReturn(collapsedHeight) + whenever(naturalScrollingSettingObserver.isNaturalScrollingEnabled).thenReturn(true) dragDownHelper = DragDownHelper( falsingManager, falsingCollector, dragDownloadCallback, - mContext + naturalScrollingSettingObserver, + mContext, ).also { it.expandCallback = expandCallback } diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/LockscreenShadeTransitionControllerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/LockscreenShadeTransitionControllerTest.kt index 970a0f7a3605..3efcf7b7c26b 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/LockscreenShadeTransitionControllerTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/LockscreenShadeTransitionControllerTest.kt @@ -5,8 +5,8 @@ import android.testing.AndroidTestingRunner import android.testing.TestableLooper import android.testing.TestableLooper.RunWithLooper import androidx.test.filters.SmallTest -import com.android.SysUITestModule -import com.android.TestMocksModule +import com.android.systemui.SysUITestModule +import com.android.systemui.TestMocksModule import com.android.systemui.ExpandHelper import com.android.systemui.SysuiTestCase import com.android.systemui.classifier.FalsingCollectorFake @@ -14,6 +14,7 @@ import com.android.systemui.classifier.FalsingManagerFake import com.android.systemui.dagger.SysUISingleton import com.android.systemui.flags.FakeFeatureFlagsClassicModule import com.android.systemui.flags.Flags +import com.android.systemui.keyguard.domain.interactor.NaturalScrollingSettingObserver import com.android.systemui.media.controls.ui.MediaHierarchyManager import com.android.systemui.plugins.qs.QS import com.android.systemui.power.domain.interactor.PowerInteractor @@ -99,6 +100,7 @@ class LockscreenShadeTransitionControllerTest : SysuiTestCase() { @Mock lateinit var stackscroller: NotificationStackScrollLayout @Mock lateinit var statusbarStateController: SysuiStatusBarStateController @Mock lateinit var transitionControllerCallback: LockscreenShadeTransitionController.Callback + @Mock lateinit var naturalScrollingSettingObserver: NaturalScrollingSettingObserver @JvmField @Rule val mockito = MockitoJUnit.rule() @@ -123,6 +125,7 @@ class LockscreenShadeTransitionControllerTest : SysuiTestCase() { whenever(lockScreenUserManager.shouldShowLockscreenNotifications()).thenReturn(true) whenever(lockScreenUserManager.isLockscreenPublicMode(anyInt())).thenReturn(true) whenever(keyguardBypassController.bypassEnabled).thenReturn(false) + whenever(naturalScrollingSettingObserver.isNaturalScrollingEnabled).thenReturn(true) testComponent = DaggerLockscreenShadeTransitionControllerTest_TestComponent.factory() @@ -185,6 +188,7 @@ class LockscreenShadeTransitionControllerTest : SysuiTestCase() { shadeInteractor = testComponent.shadeInteractor, powerInteractor = testComponent.powerInteractor, splitShadeStateController = ResourcesSplitShadeStateController(), + naturalScrollingSettingObserver = naturalScrollingSettingObserver, ) transitionController.addCallback(transitionControllerCallback) @@ -607,9 +611,9 @@ class LockscreenShadeTransitionControllerTest : SysuiTestCase() { @Component.Factory interface Factory { fun create( - @BindsInstance test: SysuiTestCase, - featureFlags: FakeFeatureFlagsClassicModule, - mocks: TestMocksModule, + @BindsInstance test: SysuiTestCase, + featureFlags: FakeFeatureFlagsClassicModule, + mocks: TestMocksModule, ): TestComponent } } diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/StatusBarStateControllerImplTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/StatusBarStateControllerImplTest.kt index 4b79a499bf90..8fa7cd291851 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/StatusBarStateControllerImplTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/StatusBarStateControllerImplTest.kt @@ -44,6 +44,8 @@ import com.android.systemui.scene.SceneTestUtils import com.android.systemui.scene.shared.flag.FakeSceneContainerFlags import com.android.systemui.shade.data.repository.FakeShadeRepository import com.android.systemui.shade.domain.interactor.ShadeInteractor +import com.android.systemui.shade.domain.interactor.ShadeInteractorImpl +import com.android.systemui.shade.domain.interactor.ShadeInteractorLegacyImpl import com.android.systemui.statusbar.disableflags.data.repository.FakeDisableFlagsRepository import com.android.systemui.statusbar.notification.stack.domain.interactor.SharedNotificationContainerInteractor import com.android.systemui.statusbar.pipeline.mobile.data.repository.FakeUserSetupRepository @@ -153,23 +155,25 @@ class StatusBarStateControllerImplTest : SysuiTestCase() { mock(), mock(), powerInteractor) - shadeInteractor = ShadeInteractor( + shadeInteractor = ShadeInteractorImpl( testScope.backgroundScope, FakeDeviceProvisioningRepository(), FakeDisableFlagsRepository(), mock(), - sceneContainerFlags, - utils::sceneInteractor, keyguardRepository, keyguardTransitionInteractor, powerInteractor, FakeUserSetupRepository(), mock(), - SharedNotificationContainerInteractor( - configurationRepository, - mContext, - ResourcesSplitShadeStateController()), - shadeRepository, + ShadeInteractorLegacyImpl( + testScope.backgroundScope, + keyguardRepository, + SharedNotificationContainerInteractor( + configurationRepository, + mContext, + ResourcesSplitShadeStateController()), + shadeRepository, + ) ) } diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/data/repository/NotificationsKeyguardViewStateRepositoryTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/data/repository/NotificationsKeyguardViewStateRepositoryTest.kt index d47993793fc0..f3094cdd4faf 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/data/repository/NotificationsKeyguardViewStateRepositoryTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/data/repository/NotificationsKeyguardViewStateRepositoryTest.kt @@ -17,13 +17,13 @@ package com.android.systemui.statusbar.notification.data.repository import androidx.test.filters.SmallTest -import com.android.SysUITestComponent -import com.android.SysUITestModule -import com.android.collectLastValue -import com.android.runCurrent -import com.android.runTest +import com.android.systemui.SysUITestComponent +import com.android.systemui.SysUITestModule import com.android.systemui.SysuiTestCase +import com.android.systemui.collectLastValue import com.android.systemui.dagger.SysUISingleton +import com.android.systemui.runCurrent +import com.android.systemui.runTest import com.android.systemui.statusbar.notification.NotificationWakeUpCoordinator import com.android.systemui.util.mockito.whenever import com.android.systemui.util.mockito.withArgCaptor diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/domain/interactor/NotificationAlertsInteractorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/domain/interactor/NotificationAlertsInteractorTest.kt index 707026e42009..b7750795fe71 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/domain/interactor/NotificationAlertsInteractorTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/domain/interactor/NotificationAlertsInteractorTest.kt @@ -16,8 +16,8 @@ package com.android.systemui.statusbar.notification.domain.interactor import android.app.StatusBarManager import androidx.test.filters.SmallTest -import com.android.SysUITestComponent -import com.android.SysUITestModule +import com.android.systemui.SysUITestComponent +import com.android.systemui.SysUITestModule import com.android.systemui.SysuiTestCase import com.android.systemui.dagger.SysUISingleton import com.android.systemui.statusbar.disableflags.data.model.DisableFlagsModel diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/domain/interactor/NotificationsKeyguardInteractorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/domain/interactor/NotificationsKeyguardInteractorTest.kt index bb6f1b6a2850..bb3113a72e92 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/domain/interactor/NotificationsKeyguardInteractorTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/domain/interactor/NotificationsKeyguardInteractorTest.kt @@ -14,20 +14,17 @@ package com.android.systemui.statusbar.notification.domain.interactor import androidx.test.filters.SmallTest -import com.android.SysUITestComponent -import com.android.SysUITestModule -import com.android.collectLastValue -import com.android.runCurrent -import com.android.runTest +import com.android.systemui.SysUITestComponent +import com.android.systemui.SysUITestModule import com.android.systemui.SysuiTestCase -import com.android.systemui.coroutines.collectLastValue +import com.android.systemui.collectLastValue import com.android.systemui.dagger.SysUISingleton +import com.android.systemui.runCurrent +import com.android.systemui.runTest import com.android.systemui.statusbar.notification.data.repository.FakeNotificationsKeyguardViewStateRepository import com.google.common.truth.Truth.assertThat import dagger.BindsInstance import dagger.Component -import kotlinx.coroutines.test.runCurrent -import kotlinx.coroutines.test.runTest import org.junit.Test @SmallTest diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/icon/domain/interactor/NotificationIconsInteractorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/icon/domain/interactor/NotificationIconsInteractorTest.kt index 05deb1cc75c7..034103598bb0 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/icon/domain/interactor/NotificationIconsInteractorTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/icon/domain/interactor/NotificationIconsInteractorTest.kt @@ -17,14 +17,14 @@ package com.android.systemui.statusbar.notification.icon.domain.interactor import android.testing.AndroidTestingRunner import androidx.test.filters.SmallTest -import com.android.SysUITestComponent -import com.android.SysUITestModule -import com.android.TestMocksModule -import com.android.collectLastValue -import com.android.runTest +import com.android.systemui.SysUITestComponent +import com.android.systemui.SysUITestModule import com.android.systemui.SysuiTestCase +import com.android.systemui.TestMocksModule +import com.android.systemui.collectLastValue import com.android.systemui.dagger.SysUISingleton import com.android.systemui.deviceentry.data.repository.FakeDeviceEntryRepository +import com.android.systemui.runTest import com.android.systemui.statusbar.data.repository.NotificationListenerSettingsRepository import com.android.systemui.statusbar.notification.data.repository.ActiveNotificationListRepository import com.android.systemui.statusbar.notification.data.repository.ActiveNotificationsStore diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/icon/ui/viewmodel/NotificationIconContainerAlwaysOnDisplayViewModelTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/icon/ui/viewmodel/NotificationIconContainerAlwaysOnDisplayViewModelTest.kt index c2c33de015ef..10d4c627bc4a 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/icon/ui/viewmodel/NotificationIconContainerAlwaysOnDisplayViewModelTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/icon/ui/viewmodel/NotificationIconContainerAlwaysOnDisplayViewModelTest.kt @@ -18,14 +18,13 @@ package com.android.systemui.statusbar.notification.icon.ui.viewmodel import androidx.test.ext.junit.runners.AndroidJUnit4 import androidx.test.filters.SmallTest -import com.android.SysUITestComponent -import com.android.SysUITestModule -import com.android.TestMocksModule -import com.android.collectLastValue -import com.android.runCurrent -import com.android.runTest +import com.android.systemui.Flags.FLAG_NEW_AOD_TRANSITION +import com.android.systemui.SysUITestComponent +import com.android.systemui.SysUITestModule import com.android.systemui.SysuiTestCase +import com.android.systemui.TestMocksModule import com.android.systemui.biometrics.domain.BiometricsDomainLayerModule +import com.android.systemui.collectLastValue import com.android.systemui.dagger.SysUISingleton import com.android.systemui.flags.FakeFeatureFlagsClassicModule import com.android.systemui.flags.Flags @@ -39,6 +38,8 @@ import com.android.systemui.keyguard.shared.model.TransitionStep import com.android.systemui.power.data.repository.FakePowerRepository import com.android.systemui.power.shared.model.WakeSleepReason import com.android.systemui.power.shared.model.WakefulnessState +import com.android.systemui.runCurrent +import com.android.systemui.runTest import com.android.systemui.statusbar.phone.DozeParameters import com.android.systemui.statusbar.phone.ScreenOffAnimationController import com.android.systemui.statusbar.policy.data.repository.FakeDeviceProvisioningRepository @@ -94,7 +95,6 @@ class NotificationIconContainerAlwaysOnDisplayViewModelTest : SysuiTestCase() { FakeFeatureFlagsClassicModule { setDefault(Flags.FACE_AUTH_REFACTOR) set(Flags.FULL_SCREEN_USER_SWITCHER, value = false) - setDefault(Flags.NEW_AOD_TRANSITION) }, mocks = TestMocksModule( @@ -115,6 +115,7 @@ class NotificationIconContainerAlwaysOnDisplayViewModelTest : SysuiTestCase() { lastSleepReason = WakeSleepReason.OTHER, ) } + mSetFlagsRule.enableFlags(FLAG_NEW_AOD_TRANSITION) } @Test diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/icon/ui/viewmodel/NotificationIconContainerStatusBarViewModelTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/icon/ui/viewmodel/NotificationIconContainerStatusBarViewModelTest.kt index 87e9735394f0..c2a1519f85dd 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/icon/ui/viewmodel/NotificationIconContainerStatusBarViewModelTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/icon/ui/viewmodel/NotificationIconContainerStatusBarViewModelTest.kt @@ -20,14 +20,12 @@ import android.graphics.Rect import android.graphics.drawable.Icon import androidx.test.ext.junit.runners.AndroidJUnit4 import androidx.test.filters.SmallTest -import com.android.SysUITestComponent -import com.android.SysUITestModule -import com.android.TestMocksModule -import com.android.collectLastValue -import com.android.runCurrent -import com.android.runTest +import com.android.systemui.SysUITestComponent +import com.android.systemui.SysUITestModule import com.android.systemui.SysuiTestCase +import com.android.systemui.TestMocksModule import com.android.systemui.biometrics.domain.BiometricsDomainLayerModule +import com.android.systemui.collectLastValue import com.android.systemui.dagger.SysUISingleton import com.android.systemui.flags.FakeFeatureFlagsClassicModule import com.android.systemui.flags.Flags @@ -42,6 +40,8 @@ import com.android.systemui.plugins.DarkIconDispatcher import com.android.systemui.power.data.repository.FakePowerRepository import com.android.systemui.power.shared.model.WakeSleepReason import com.android.systemui.power.shared.model.WakefulnessState +import com.android.systemui.runCurrent +import com.android.systemui.runTest import com.android.systemui.shade.data.repository.FakeShadeRepository import com.android.systemui.statusbar.notification.data.repository.ActiveNotificationListRepository import com.android.systemui.statusbar.notification.data.repository.ActiveNotificationsStore diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/interruption/NotificationInterruptStateProviderImplTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/interruption/NotificationInterruptStateProviderImplTest.java index 1c621613c403..3e331a6cff2a 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/interruption/NotificationInterruptStateProviderImplTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/interruption/NotificationInterruptStateProviderImplTest.java @@ -76,6 +76,7 @@ import com.android.systemui.statusbar.policy.BatteryController; import com.android.systemui.statusbar.policy.DeviceProvisionedController; import com.android.systemui.statusbar.policy.HeadsUpManager; import com.android.systemui.statusbar.policy.KeyguardStateController; +import com.android.systemui.util.FakeEventLog; import com.android.systemui.util.settings.FakeGlobalSettings; import com.android.systemui.util.time.FakeSystemClock; @@ -126,6 +127,7 @@ public class NotificationInterruptStateProviderImplTest extends SysuiTestCase { DeviceProvisionedController mDeviceProvisionedController; FakeSystemClock mSystemClock; FakeGlobalSettings mGlobalSettings; + FakeEventLog mEventLog; private NotificationInterruptStateProviderImpl mNotifInterruptionStateProvider; @@ -138,6 +140,7 @@ public class NotificationInterruptStateProviderImplTest extends SysuiTestCase { mSystemClock = new FakeSystemClock(); mGlobalSettings = new FakeGlobalSettings(); mGlobalSettings.putInt(HEADS_UP_NOTIFICATIONS_ENABLED, HEADS_UP_ON); + mEventLog = new FakeEventLog(); mNotifInterruptionStateProvider = new NotificationInterruptStateProviderImpl( @@ -155,7 +158,8 @@ public class NotificationInterruptStateProviderImplTest extends SysuiTestCase { mUserTracker, mDeviceProvisionedController, mSystemClock, - mGlobalSettings); + mGlobalSettings, + mEventLog); mNotifInterruptionStateProvider.mUseHeadsUp = true; } diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/interruption/NotificationInterruptStateProviderWrapperTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/interruption/NotificationInterruptStateProviderWrapperTest.kt index e1581eade4ca..acc5cea0c8f9 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/interruption/NotificationInterruptStateProviderWrapperTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/interruption/NotificationInterruptStateProviderWrapperTest.kt @@ -53,6 +53,7 @@ class NotificationInterruptStateProviderWrapperTest : VisualInterruptionDecision deviceProvisionedController, systemClock, globalSettings, + eventLog ) ) } diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/interruption/VisualInterruptionDecisionProviderImplTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/interruption/VisualInterruptionDecisionProviderImplTest.kt index 1064475c744c..9e7df5f4a9f5 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/interruption/VisualInterruptionDecisionProviderImplTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/interruption/VisualInterruptionDecisionProviderImplTest.kt @@ -33,6 +33,7 @@ class VisualInterruptionDecisionProviderImplTest : VisualInterruptionDecisionPro ambientDisplayConfiguration, batteryController, deviceProvisionedController, + eventLog, globalSettings, headsUpManager, keyguardNotificationVisibilityProvider, @@ -42,6 +43,7 @@ class VisualInterruptionDecisionProviderImplTest : VisualInterruptionDecisionPro powerManager, statusBarStateController, systemClock, + uiEventLogger, userTracker, ) } diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/interruption/VisualInterruptionDecisionProviderTestBase.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/interruption/VisualInterruptionDecisionProviderTestBase.kt index 5e811561682e..5dcb6c9e9527 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/interruption/VisualInterruptionDecisionProviderTestBase.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/interruption/VisualInterruptionDecisionProviderTestBase.kt @@ -47,6 +47,7 @@ import android.os.PowerManager import android.provider.Settings.Global.HEADS_UP_NOTIFICATIONS_ENABLED import android.provider.Settings.Global.HEADS_UP_OFF import android.provider.Settings.Global.HEADS_UP_ON +import com.android.internal.logging.UiEventLogger.UiEventEnum import com.android.internal.logging.testing.UiEventLoggerFake import com.android.systemui.SysuiTestCase import com.android.systemui.log.LogBuffer @@ -63,8 +64,13 @@ import com.android.systemui.statusbar.notification.NotifPipelineFlags import com.android.systemui.statusbar.notification.collection.NotificationEntry import com.android.systemui.statusbar.notification.collection.NotificationEntryBuilder import com.android.systemui.statusbar.notification.interruption.NotificationInterruptStateProviderImpl.MAX_HUN_WHEN_AGE_MS +import com.android.systemui.statusbar.notification.interruption.NotificationInterruptStateProviderImpl.NotificationInterruptEvent.FSI_SUPPRESSED_NO_HUN_OR_KEYGUARD +import com.android.systemui.statusbar.notification.interruption.NotificationInterruptStateProviderImpl.NotificationInterruptEvent.FSI_SUPPRESSED_SUPPRESSIVE_BUBBLE_METADATA +import com.android.systemui.statusbar.notification.interruption.NotificationInterruptStateProviderImpl.NotificationInterruptEvent.FSI_SUPPRESSED_SUPPRESSIVE_GROUP_ALERT_BEHAVIOR +import com.android.systemui.statusbar.notification.interruption.NotificationInterruptStateProviderImpl.NotificationInterruptEvent.HUN_SUPPRESSED_OLD_WHEN import com.android.systemui.statusbar.policy.FakeDeviceProvisionedController import com.android.systemui.statusbar.policy.HeadsUpManager +import com.android.systemui.util.FakeEventLog import com.android.systemui.util.mockito.any import com.android.systemui.util.mockito.mock import com.android.systemui.util.settings.FakeGlobalSettings @@ -100,6 +106,7 @@ abstract class VisualInterruptionDecisionProviderTestBase : SysuiTestCase() { protected val ambientDisplayConfiguration = FakeAmbientDisplayConfiguration(context) protected val batteryController = FakeBatteryController(leakCheck) protected val deviceProvisionedController = FakeDeviceProvisionedController() + protected val eventLog = FakeEventLog() protected val flags: NotifPipelineFlags = mock() protected val globalSettings = FakeGlobalSettings().also { it.putInt(HEADS_UP_NOTIFICATIONS_ENABLED, HEADS_UP_ON) } @@ -147,18 +154,21 @@ abstract class VisualInterruptionDecisionProviderTestBase : SysuiTestCase() { fun testShouldPeek() { ensurePeekState() assertShouldHeadsUp(buildPeekEntry()) + assertNoEventsLogged() } @Test fun testShouldNotPeek_settingDisabled() { ensurePeekState { hunSettingEnabled = false } assertShouldNotHeadsUp(buildPeekEntry()) + assertNoEventsLogged() } @Test fun testShouldNotPeek_packageSnoozed_withoutFsi() { ensurePeekState { hunSnoozed = true } assertShouldNotHeadsUp(buildPeekEntry()) + assertNoEventsLogged() } @Test @@ -167,6 +177,13 @@ abstract class VisualInterruptionDecisionProviderTestBase : SysuiTestCase() { forEachPeekableFsiState { ensurePeekState { hunSnoozed = true } assertShouldHeadsUp(entry) + + // The old code logs a UiEvent when a HUN snooze is bypassed because the notification + // has an FSI, but that doesn't fit into the new code's suppressor-based logic, so we're + // not reimplementing it. + if (provider !is NotificationInterruptStateProviderWrapper) { + assertNoEventsLogged() + } } } @@ -174,42 +191,49 @@ abstract class VisualInterruptionDecisionProviderTestBase : SysuiTestCase() { fun testShouldNotPeek_alreadyBubbled() { ensurePeekState { statusBarState = SHADE } assertShouldNotHeadsUp(buildPeekEntry { isBubble = true }) + assertNoEventsLogged() } @Test fun testShouldPeek_isBubble_shadeLocked() { ensurePeekState { statusBarState = SHADE_LOCKED } assertShouldHeadsUp(buildPeekEntry { isBubble = true }) + assertNoEventsLogged() } @Test fun testShouldPeek_isBubble_keyguard() { ensurePeekState { statusBarState = KEYGUARD } assertShouldHeadsUp(buildPeekEntry { isBubble = true }) + assertNoEventsLogged() } @Test fun testShouldNotPeek_dnd() { ensurePeekState() assertShouldNotHeadsUp(buildPeekEntry { suppressedVisualEffects = SUPPRESSED_EFFECT_PEEK }) + assertNoEventsLogged() } @Test fun testShouldNotPeek_notImportant() { ensurePeekState() assertShouldNotHeadsUp(buildPeekEntry { importance = IMPORTANCE_DEFAULT }) + assertNoEventsLogged() } @Test fun testShouldNotPeek_screenOff() { ensurePeekState { isScreenOn = false } assertShouldNotHeadsUp(buildPeekEntry()) + assertNoEventsLogged() } @Test fun testShouldNotPeek_dreaming() { ensurePeekState { isDreaming = true } assertShouldNotHeadsUp(buildPeekEntry()) + assertNoEventsLogged() } @Test @@ -219,33 +243,56 @@ abstract class VisualInterruptionDecisionProviderTestBase : SysuiTestCase() { } @Test + fun testLogsHunOldWhen() { + assertNoEventsLogged() + + ensurePeekState() + val entry = buildPeekEntry { whenMs = whenAgo(MAX_HUN_WHEN_AGE_MS) } + + // The old code logs the "old when" UiEvent unconditionally, so don't expect that it hasn't. + if (provider !is NotificationInterruptStateProviderWrapper) { + provider.makeUnloggedHeadsUpDecision(entry) + assertNoEventsLogged() + } + + provider.makeAndLogHeadsUpDecision(entry) + assertUiEventLogged(HUN_SUPPRESSED_OLD_WHEN, entry.sbn.uid, entry.sbn.packageName) + assertNoSystemEventLogged() + } + + @Test fun testShouldPeek_oldWhen_now() { ensurePeekState() assertShouldHeadsUp(buildPeekEntry { whenMs = whenAgo(0) }) + assertNoEventsLogged() } @Test fun testShouldPeek_oldWhen_notOldEnough() { ensurePeekState() assertShouldHeadsUp(buildPeekEntry { whenMs = whenAgo(MAX_HUN_WHEN_AGE_MS - 1) }) + assertNoEventsLogged() } @Test fun testShouldPeek_oldWhen_zeroWhen() { ensurePeekState() assertShouldHeadsUp(buildPeekEntry { whenMs = 0L }) + assertNoEventsLogged() } @Test fun testShouldPeek_oldWhen_negativeWhen() { ensurePeekState() assertShouldHeadsUp(buildPeekEntry { whenMs = -1L }) + assertNoEventsLogged() } @Test fun testShouldPeek_oldWhen_fullScreenIntent() { ensurePeekState() assertShouldHeadsUp(buildFsiEntry { whenMs = whenAgo(MAX_HUN_WHEN_AGE_MS) }) + assertNoEventsLogged() } @Test @@ -257,6 +304,7 @@ abstract class VisualInterruptionDecisionProviderTestBase : SysuiTestCase() { isForegroundService = true } ) + assertNoEventsLogged() } @Test @@ -268,18 +316,21 @@ abstract class VisualInterruptionDecisionProviderTestBase : SysuiTestCase() { isUserInitiatedJob = true } ) + assertNoEventsLogged() } @Test fun testShouldNotPeek_hiddenOnKeyguard() { ensurePeekState({ keyguardShouldHideNotification = true }) assertShouldNotHeadsUp(buildPeekEntry()) + assertNoEventsLogged() } @Test fun testShouldPeek_defaultLegacySuppressor() { ensurePeekState() withLegacySuppressor(neverSuppresses) { assertShouldHeadsUp(buildPeekEntry()) } + assertNoEventsLogged() } @Test @@ -288,6 +339,7 @@ abstract class VisualInterruptionDecisionProviderTestBase : SysuiTestCase() { withLegacySuppressor(alwaysSuppressesInterruptions) { assertShouldNotHeadsUp(buildPeekEntry()) } + assertNoEventsLogged() } @Test @@ -296,6 +348,7 @@ abstract class VisualInterruptionDecisionProviderTestBase : SysuiTestCase() { withLegacySuppressor(alwaysSuppressesAwakeInterruptions) { assertShouldNotHeadsUp(buildPeekEntry()) } + assertNoEventsLogged() } @Test @@ -304,24 +357,28 @@ abstract class VisualInterruptionDecisionProviderTestBase : SysuiTestCase() { withLegacySuppressor(alwaysSuppressesAwakeHeadsUp) { assertShouldNotHeadsUp(buildPeekEntry()) } + assertNoEventsLogged() } @Test fun testShouldPulse() { ensurePulseState() assertShouldHeadsUp(buildPulseEntry()) + assertNoEventsLogged() } @Test fun testShouldNotPulse_disabled() { ensurePulseState { pulseOnNotificationsEnabled = false } assertShouldNotHeadsUp(buildPulseEntry()) + assertNoEventsLogged() } @Test fun testShouldNotPulse_batterySaver() { ensurePulseState { isAodPowerSave = true } assertShouldNotHeadsUp(buildPulseEntry()) + assertNoEventsLogged() } @Test @@ -330,30 +387,35 @@ abstract class VisualInterruptionDecisionProviderTestBase : SysuiTestCase() { assertShouldNotHeadsUp( buildPulseEntry { suppressedVisualEffects = SUPPRESSED_EFFECT_AMBIENT } ) + assertNoEventsLogged() } @Test fun testShouldNotPulse_visibilityOverridePrivate() { ensurePulseState() assertShouldNotHeadsUp(buildPulseEntry { visibilityOverride = VISIBILITY_PRIVATE }) + assertNoEventsLogged() } @Test fun testShouldNotPulse_importanceLow() { ensurePulseState() assertShouldNotHeadsUp(buildPulseEntry { importance = IMPORTANCE_LOW }) + assertNoEventsLogged() } @Test fun testShouldNotPulse_hiddenOnKeyguard() { ensurePulseState({ keyguardShouldHideNotification = true }) assertShouldNotHeadsUp(buildPulseEntry()) + assertNoEventsLogged() } @Test fun testShouldPulse_defaultLegacySuppressor() { ensurePulseState() withLegacySuppressor(neverSuppresses) { assertShouldHeadsUp(buildPulseEntry()) } + assertNoEventsLogged() } @Test @@ -362,6 +424,7 @@ abstract class VisualInterruptionDecisionProviderTestBase : SysuiTestCase() { withLegacySuppressor(alwaysSuppressesInterruptions) { assertShouldNotHeadsUp(buildPulseEntry()) } + assertNoEventsLogged() } @Test @@ -370,6 +433,7 @@ abstract class VisualInterruptionDecisionProviderTestBase : SysuiTestCase() { withLegacySuppressor(alwaysSuppressesAwakeInterruptions) { assertShouldHeadsUp(buildPulseEntry()) } + assertNoEventsLogged() } @Test @@ -378,6 +442,7 @@ abstract class VisualInterruptionDecisionProviderTestBase : SysuiTestCase() { withLegacySuppressor(alwaysSuppressesAwakeHeadsUp) { assertShouldHeadsUp(buildPulseEntry()) } + assertNoEventsLogged() } private fun withPeekAndPulseEntry( @@ -399,6 +464,7 @@ abstract class VisualInterruptionDecisionProviderTestBase : SysuiTestCase() { groupAlertBehavior = GROUP_ALERT_SUMMARY }) { assertShouldNotHeadsUp(it) + assertNoEventsLogged() } } @@ -410,6 +476,7 @@ abstract class VisualInterruptionDecisionProviderTestBase : SysuiTestCase() { groupAlertBehavior = GROUP_ALERT_CHILDREN }) { assertShouldHeadsUp(it) + assertNoEventsLogged() } } @@ -421,24 +488,30 @@ abstract class VisualInterruptionDecisionProviderTestBase : SysuiTestCase() { groupAlertBehavior = GROUP_ALERT_SUMMARY }) { assertShouldHeadsUp(it) + assertNoEventsLogged() } } @Test fun testShouldNotHeadsUp_justLaunchedFsi() { - withPeekAndPulseEntry({ hasJustLaunchedFsi = true }) { assertShouldNotHeadsUp(it) } + withPeekAndPulseEntry({ hasJustLaunchedFsi = true }) { + assertShouldNotHeadsUp(it) + assertNoEventsLogged() + } } @Test fun testShouldBubble_withIntentAndIcon() { ensureBubbleState() assertShouldBubble(buildBubbleEntry { bubbleIsShortcut = false }) + assertNoEventsLogged() } @Test fun testShouldBubble_withShortcut() { ensureBubbleState() assertShouldBubble(buildBubbleEntry { bubbleIsShortcut = true }) + assertNoEventsLogged() } @Test @@ -451,6 +524,7 @@ abstract class VisualInterruptionDecisionProviderTestBase : SysuiTestCase() { groupAlertBehavior = GROUP_ALERT_SUMMARY } ) + assertNoEventsLogged() } @Test @@ -462,24 +536,28 @@ abstract class VisualInterruptionDecisionProviderTestBase : SysuiTestCase() { hasBubbleMetadata = false } ) + assertNoEventsLogged() } @Test fun testShouldNotBubble_missingBubbleMetadata() { ensureBubbleState() assertShouldNotBubble(buildBubbleEntry { hasBubbleMetadata = false }) + assertNoEventsLogged() } @Test fun testShouldNotBubble_notAllowedToBubble() { ensureBubbleState() assertShouldNotBubble(buildBubbleEntry { canBubble = false }) + assertNoEventsLogged() } @Test fun testShouldBubble_defaultLegacySuppressor() { ensureBubbleState() withLegacySuppressor(neverSuppresses) { assertShouldBubble(buildBubbleEntry()) } + assertNoEventsLogged() } @Test @@ -488,6 +566,7 @@ abstract class VisualInterruptionDecisionProviderTestBase : SysuiTestCase() { withLegacySuppressor(alwaysSuppressesInterruptions) { assertShouldNotBubble(buildBubbleEntry()) } + assertNoEventsLogged() } @Test @@ -496,6 +575,7 @@ abstract class VisualInterruptionDecisionProviderTestBase : SysuiTestCase() { withLegacySuppressor(alwaysSuppressesAwakeInterruptions) { assertShouldNotBubble(buildBubbleEntry()) } + assertNoEventsLogged() } @Test @@ -504,17 +584,22 @@ abstract class VisualInterruptionDecisionProviderTestBase : SysuiTestCase() { withLegacySuppressor(alwaysSuppressesAwakeHeadsUp) { assertShouldBubble(buildBubbleEntry()) } + assertNoEventsLogged() } @Test fun testShouldNotBubble_hiddenOnKeyguard() { ensureBubbleState({ keyguardShouldHideNotification = true }) assertShouldNotBubble(buildBubbleEntry()) + assertNoEventsLogged() } @Test fun testShouldNotFsi_noFullScreenIntent() { - forEachFsiState { assertShouldNotFsi(buildFsiEntry { hasFsi = false }) } + forEachFsiState { + assertShouldNotFsi(buildFsiEntry { hasFsi = false }) + assertNoEventsLogged() + } } @Test @@ -526,6 +611,7 @@ abstract class VisualInterruptionDecisionProviderTestBase : SysuiTestCase() { isStickyAndNotDemoted = true } ) + assertNoEventsLogged() } } @@ -536,12 +622,16 @@ abstract class VisualInterruptionDecisionProviderTestBase : SysuiTestCase() { buildFsiEntry { suppressedVisualEffects = SUPPRESSED_EFFECT_FULL_SCREEN_INTENT }, expectWouldInterruptWithoutDnd = true ) + assertNoEventsLogged() } } @Test fun testShouldNotFsi_notImportantEnough() { - forEachFsiState { assertShouldNotFsi(buildFsiEntry { importance = IMPORTANCE_DEFAULT }) } + forEachFsiState { + assertShouldNotFsi(buildFsiEntry { importance = IMPORTANCE_DEFAULT }) + assertNoEventsLogged() + } } @Test @@ -554,6 +644,7 @@ abstract class VisualInterruptionDecisionProviderTestBase : SysuiTestCase() { }, expectWouldInterruptWithoutDnd = false ) + assertNoEventsLogged() } } @@ -571,6 +662,27 @@ abstract class VisualInterruptionDecisionProviderTestBase : SysuiTestCase() { } @Test + fun testLogsFsiSuppressiveGroupAlertBehavior() { + ensureNotInteractiveFsiState() + val entry = buildFsiEntry { + isGrouped = true + isGroupSummary = true + groupAlertBehavior = GROUP_ALERT_CHILDREN + } + + val decision = provider.makeUnloggedFullScreenIntentDecision(entry) + assertNoEventsLogged() + + provider.logFullScreenIntentDecision(decision) + assertUiEventLogged( + FSI_SUPPRESSED_SUPPRESSIVE_GROUP_ALERT_BEHAVIOR, + entry.sbn.uid, + entry.sbn.packageName + ) + assertSystemEventLogged("231322873", entry.sbn.uid, "groupAlertBehavior") + } + + @Test fun testShouldFsi_suppressiveGroupAlertBehavior_notGrouped() { forEachFsiState { assertShouldFsi( @@ -580,6 +692,7 @@ abstract class VisualInterruptionDecisionProviderTestBase : SysuiTestCase() { groupAlertBehavior = GROUP_ALERT_CHILDREN } ) + assertNoEventsLogged() } } @@ -609,26 +722,52 @@ abstract class VisualInterruptionDecisionProviderTestBase : SysuiTestCase() { } @Test + fun testLogsFsiSuppressiveBubbleMetadata() { + ensureNotInteractiveFsiState() + val entry = buildFsiEntry { + hasBubbleMetadata = true + bubbleSuppressesNotification = true + } + + val decision = provider.makeUnloggedFullScreenIntentDecision(entry) + assertNoEventsLogged() + + provider.logFullScreenIntentDecision(decision) + assertUiEventLogged( + FSI_SUPPRESSED_SUPPRESSIVE_BUBBLE_METADATA, + entry.sbn.uid, + entry.sbn.packageName + ) + assertSystemEventLogged("274759612", entry.sbn.uid, "bubbleMetadata") + } + + @Test fun testShouldNotFsi_packageSuspended() { - forEachFsiState { assertShouldNotFsi(buildFsiEntry { packageSuspended = true }) } + forEachFsiState { + assertShouldNotFsi(buildFsiEntry { packageSuspended = true }) + assertNoEventsLogged() + } } @Test fun testShouldFsi_notInteractive() { ensureNotInteractiveFsiState() assertShouldFsi(buildFsiEntry()) + assertNoEventsLogged() } @Test fun testShouldFsi_dreaming() { ensureDreamingFsiState() assertShouldFsi(buildFsiEntry()) + assertNoEventsLogged() } @Test fun testShouldFsi_keyguard() { ensureKeyguardFsiState() assertShouldFsi(buildFsiEntry()) + assertNoEventsLogged() } @Test @@ -636,6 +775,7 @@ abstract class VisualInterruptionDecisionProviderTestBase : SysuiTestCase() { forEachPeekableFsiState { ensurePeekState() assertShouldNotFsi(buildFsiEntry()) + assertNoEventsLogged() } } @@ -644,6 +784,7 @@ abstract class VisualInterruptionDecisionProviderTestBase : SysuiTestCase() { forEachPeekableFsiState { ensurePeekState { hunSnoozed = true } assertShouldNotFsi(buildFsiEntry()) + assertNoEventsLogged() } } @@ -651,18 +792,21 @@ abstract class VisualInterruptionDecisionProviderTestBase : SysuiTestCase() { fun testShouldFsi_lockedShade() { ensureLockedShadeFsiState() assertShouldFsi(buildFsiEntry()) + assertNoEventsLogged() } @Test fun testShouldFsi_keyguardOccluded() { ensureKeyguardOccludedFsiState() assertShouldFsi(buildFsiEntry()) + assertNoEventsLogged() } @Test fun testShouldFsi_deviceNotProvisioned() { ensureDeviceNotProvisionedFsiState() assertShouldFsi(buildFsiEntry()) + assertNoEventsLogged() } @Test @@ -672,9 +816,23 @@ abstract class VisualInterruptionDecisionProviderTestBase : SysuiTestCase() { } @Test + fun testLogsFsiNoHunOrKeyguard() { + ensureNoHunOrKeyguardFsiState() + val entry = buildFsiEntry() + + val decision = provider.makeUnloggedFullScreenIntentDecision(entry) + assertNoEventsLogged() + + provider.logFullScreenIntentDecision(decision) + assertUiEventLogged(FSI_SUPPRESSED_NO_HUN_OR_KEYGUARD, entry.sbn.uid, entry.sbn.packageName) + assertSystemEventLogged("231322873", entry.sbn.uid, "no hun or keyguard") + } + + @Test fun testShouldFsi_defaultLegacySuppressor() { forEachFsiState { withLegacySuppressor(neverSuppresses) { assertShouldFsi(buildFsiEntry()) } + assertNoEventsLogged() } } @@ -682,6 +840,7 @@ abstract class VisualInterruptionDecisionProviderTestBase : SysuiTestCase() { fun testShouldFsi_suppressInterruptions() { forEachFsiState { withLegacySuppressor(alwaysSuppressesInterruptions) { assertShouldFsi(buildFsiEntry()) } + assertNoEventsLogged() } } @@ -691,6 +850,7 @@ abstract class VisualInterruptionDecisionProviderTestBase : SysuiTestCase() { withLegacySuppressor(alwaysSuppressesAwakeInterruptions) { assertShouldFsi(buildFsiEntry()) } + assertNoEventsLogged() } } @@ -698,6 +858,7 @@ abstract class VisualInterruptionDecisionProviderTestBase : SysuiTestCase() { fun testShouldFsi_suppressAwakeHeadsUp() { forEachFsiState { withLegacySuppressor(alwaysSuppressesAwakeHeadsUp) { assertShouldFsi(buildFsiEntry()) } + assertNoEventsLogged() } } @@ -1080,6 +1241,45 @@ abstract class VisualInterruptionDecisionProviderTestBase : SysuiTestCase() { run(block) } + private fun assertNoEventsLogged() { + assertNoUiEventLogged() + assertNoSystemEventLogged() + } + + private fun assertNoUiEventLogged() { + assertEquals(0, uiEventLogger.numLogs()) + } + + private fun assertUiEventLogged(uiEventId: UiEventEnum, uid: Int, packageName: String) { + assertEquals(1, uiEventLogger.numLogs()) + + val event = uiEventLogger.get(0) + assertEquals(uiEventId.id, event.eventId) + assertEquals(uid, event.uid) + assertEquals(packageName, event.packageName) + } + + private fun assertNoSystemEventLogged() { + assertEquals(0, eventLog.events.size) + } + + private fun assertSystemEventLogged(number: String, uid: Int, description: String) { + assertEquals(1, eventLog.events.size) + + val event = eventLog.events[0] + assertEquals(0x534e4554, event.tag) + + val value = event.value + assertTrue(value is Array<*>) + + if (value is Array<*>) { + assertEquals(3, value.size) + assertEquals(number, value[0]) + assertEquals(uid, value[1]) + assertEquals(description, value[2]) + } + } + private fun whenAgo(whenAgeMs: Long) = systemClock.currentTimeMillis() - whenAgeMs } diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/shelf/ui/viewmodel/NotificationShelfViewModelTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/shelf/ui/viewmodel/NotificationShelfViewModelTest.kt index 7423c2decaec..917569ca787b 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/shelf/ui/viewmodel/NotificationShelfViewModelTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/shelf/ui/viewmodel/NotificationShelfViewModelTest.kt @@ -19,16 +19,16 @@ package com.android.systemui.statusbar.notification.shelf.ui.viewmodel import android.os.PowerManager import android.testing.AndroidTestingRunner import androidx.test.filters.SmallTest -import com.android.SysUITestComponent -import com.android.SysUITestModule -import com.android.TestMocksModule -import com.android.collectLastValue -import com.android.runTest +import com.android.systemui.SysUITestComponent +import com.android.systemui.SysUITestModule import com.android.systemui.SysuiTestCase +import com.android.systemui.TestMocksModule +import com.android.systemui.collectLastValue import com.android.systemui.dagger.SysUISingleton import com.android.systemui.keyguard.data.repository.FakeDeviceEntryFaceAuthRepository import com.android.systemui.keyguard.data.repository.FakeKeyguardRepository import com.android.systemui.power.data.repository.FakePowerRepository +import com.android.systemui.runTest import com.android.systemui.statusbar.LockscreenShadeTransitionController import com.android.systemui.statusbar.SysuiStatusBarStateController import com.android.systemui.statusbar.notification.row.ui.viewmodel.ActivatableNotificationViewModelModule diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutTest.java index e91d6d724a73..ba5ba2c31a42 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutTest.java @@ -19,6 +19,7 @@ package com.android.systemui.statusbar.notification.stack; import static android.view.View.GONE; import static android.view.WindowInsets.Type.ime; +import static com.android.systemui.Flags.FLAG_NEW_AOD_TRANSITION; import static com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayout.ROWS_ALL; import static com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayout.ROWS_GENTLE; import static com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayout.RUBBER_BAND_FACTOR_NORMAL; @@ -162,7 +163,7 @@ public class NotificationStackScrollLayoutTest extends SysuiTestCase { // in the constructor. mFeatureFlags.setDefault(Flags.SENSITIVE_REVEAL_ANIM); mFeatureFlags.setDefault(Flags.ANIMATED_NOTIFICATION_SHADE_INSETS); - mFeatureFlags.setDefault(Flags.NEW_AOD_TRANSITION); + mSetFlagsRule.enableFlags(FLAG_NEW_AOD_TRANSITION); mFeatureFlags.setDefault(Flags.UNCLEARED_TRANSIENT_HUN_FIX); // Inject dependencies before initializing the layout diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/SharedNotificationContainerViewModelTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/SharedNotificationContainerViewModelTest.kt index db8f21714964..9c70c82cfa26 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/SharedNotificationContainerViewModelTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/SharedNotificationContainerViewModelTest.kt @@ -19,13 +19,11 @@ package com.android.systemui.statusbar.notification.stack.ui.viewmodel import androidx.test.ext.junit.runners.AndroidJUnit4 import androidx.test.filters.SmallTest -import com.android.SysUITestComponent -import com.android.SysUITestModule -import com.android.TestMocksModule -import com.android.collectLastValue -import com.android.runCurrent -import com.android.runTest +import com.android.systemui.SysUITestComponent +import com.android.systemui.SysUITestModule import com.android.systemui.SysuiTestCase +import com.android.systemui.TestMocksModule +import com.android.systemui.collectLastValue import com.android.systemui.common.shared.model.SharedNotificationContainerPosition import com.android.systemui.common.ui.data.repository.FakeConfigurationRepository import com.android.systemui.dagger.SysUISingleton @@ -39,6 +37,8 @@ import com.android.systemui.keyguard.shared.model.StatusBarState import com.android.systemui.keyguard.shared.model.TransitionState import com.android.systemui.keyguard.shared.model.TransitionStep import com.android.systemui.res.R +import com.android.systemui.runCurrent +import com.android.systemui.runTest import com.android.systemui.shade.data.repository.FakeShadeRepository import com.android.systemui.statusbar.notification.stack.domain.interactor.SharedNotificationContainerInteractor import com.android.systemui.user.domain.UserDomainLayerModule diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/AutoTileManagerTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/AutoTileManagerTest.java index 1d8a3461e546..84cd518cf85a 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/AutoTileManagerTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/AutoTileManagerTest.java @@ -16,6 +16,7 @@ package com.android.systemui.statusbar.phone; +import static com.android.systemui.Flags.FLAG_QS_NEW_PIPELINE; import static com.android.systemui.qs.dagger.QSFlagsModule.RBC_AVAILABLE; import static com.android.systemui.statusbar.phone.AutoTileManager.DEVICE_CONTROLS; @@ -135,6 +136,8 @@ public class AutoTileManagerTest extends SysuiTestCase { MockitoAnnotations.initMocks(this); mSecureSettings = new FakeSettings(); + mSetFlagsRule.disableFlags(FLAG_QS_NEW_PIPELINE); + mContext.getOrCreateTestableResources().addOverride( R.array.config_quickSettingsAutoAdd, new String[] { diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/BiometricsUnlockControllerTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/BiometricsUnlockControllerTest.java index 164325a431a5..e61b4f81aaee 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/BiometricsUnlockControllerTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/BiometricsUnlockControllerTest.java @@ -16,7 +16,6 @@ package com.android.systemui.statusbar.phone; -import static com.android.systemui.flags.Flags.ONE_WAY_HAPTICS_API_MIGRATION; import static com.android.systemui.statusbar.phone.BiometricUnlockController.MODE_WAKE_AND_UNLOCK; import static com.google.common.truth.Truth.assertThat; @@ -50,7 +49,6 @@ import com.android.systemui.SysuiTestCase; import com.android.systemui.biometrics.AuthController; import com.android.systemui.deviceentry.domain.interactor.DeviceEntryHapticsInteractor; import com.android.systemui.dump.DumpManager; -import com.android.systemui.flags.FakeFeatureFlags; import com.android.systemui.keyguard.KeyguardViewMediator; import com.android.systemui.keyguard.WakefulnessLifecycle; import com.android.systemui.keyguard.domain.interactor.BiometricUnlockInteractor; @@ -130,14 +128,11 @@ public class BiometricsUnlockControllerTest extends SysuiTestCase { @Mock private BiometricUnlockInteractor mBiometricUnlockInteractor; private final FakeSystemClock mSystemClock = new FakeSystemClock(); - private FakeFeatureFlags mFeatureFlags; private BiometricUnlockController mBiometricUnlockController; @Before public void setUp() { MockitoAnnotations.initMocks(this); - mFeatureFlags = new FakeFeatureFlags(); - mFeatureFlags.set(ONE_WAY_HAPTICS_API_MIGRATION, false); when(mKeyguardStateController.isShowing()).thenReturn(true); when(mUpdateMonitor.isDeviceInteractive()).thenReturn(true); when(mKeyguardStateController.isFaceEnrolled()).thenReturn(true); @@ -165,7 +160,6 @@ public class BiometricsUnlockControllerTest extends SysuiTestCase { mAuthController, mStatusBarStateController, mSessionTracker, mLatencyTracker, mScreenOffAnimationController, mVibratorHelper, mSystemClock, - mFeatureFlags, mDeviceEntryHapticsInteractor, () -> mSelectedUserInteractor, mBiometricUnlockInteractor diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/CentralSurfacesImplTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/CentralSurfacesImplTest.java index 027c11c040fa..ebdff082b7b3 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/CentralSurfacesImplTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/CentralSurfacesImplTest.java @@ -23,6 +23,7 @@ import static android.app.StatusBarManager.WINDOW_STATE_SHOWING; import static android.provider.Settings.Global.HEADS_UP_NOTIFICATIONS_ENABLED; import static android.provider.Settings.Global.HEADS_UP_ON; +import static com.android.systemui.Flags.FLAG_LIGHT_REVEAL_MIGRATION; import static com.android.systemui.statusbar.StatusBarState.KEYGUARD; import static com.android.systemui.statusbar.StatusBarState.SHADE; @@ -178,6 +179,8 @@ import com.android.systemui.statusbar.policy.UserInfoControllerImpl; import com.android.systemui.statusbar.policy.UserSwitcherController; import com.android.systemui.statusbar.window.StatusBarWindowController; import com.android.systemui.statusbar.window.StatusBarWindowStateController; +import com.android.systemui.util.EventLog; +import com.android.systemui.util.FakeEventLog; import com.android.systemui.util.WallpaperController; import com.android.systemui.util.concurrency.FakeExecutor; import com.android.systemui.util.concurrency.MessageRouterImpl; @@ -324,6 +327,7 @@ public class CentralSurfacesImplTest extends SysuiTestCase { private ShadeController mShadeController; private final FakeSystemClock mFakeSystemClock = new FakeSystemClock(); private final FakeGlobalSettings mFakeGlobalSettings = new FakeGlobalSettings(); + private final FakeEventLog mFakeEventLog = new FakeEventLog(); private final FakeExecutor mMainExecutor = new FakeExecutor(mFakeSystemClock); private final FakeExecutor mUiBgExecutor = new FakeExecutor(mFakeSystemClock); private final FakeFeatureFlags mFeatureFlags = new FakeFeatureFlags(); @@ -346,11 +350,11 @@ public class CentralSurfacesImplTest extends SysuiTestCase { mFeatureFlags.set(Flags.WM_SHADE_ALLOW_BACK_GESTURE, true); // For the Shade to animate during the Back gesture, we must enable the animation flag. mFeatureFlags.set(Flags.WM_SHADE_ANIMATE_BACK_GESTURE, true); - mFeatureFlags.set(Flags.LIGHT_REVEAL_MIGRATION, true); + mSetFlagsRule.enableFlags(FLAG_LIGHT_REVEAL_MIGRATION); // Turn AOD on and toggle feature flag for jank fixes mFeatureFlags.set(Flags.ZJ_285570694_LOCKSCREEN_TRANSITION_FROM_AOD, true); - mFeatureFlags.set(Flags.ALTERNATE_BOUNCER_VIEW, false); when(mDozeParameters.getAlwaysOn()).thenReturn(true); + mSetFlagsRule.disableFlags(com.android.systemui.Flags.FLAG_DEVICE_ENTRY_UDFPS_REFACTOR); IThermalService thermalService = mock(IThermalService.class); mPowerManager = new PowerManager(mContext, mPowerManagerService, thermalService, @@ -374,7 +378,8 @@ public class CentralSurfacesImplTest extends SysuiTestCase { mUserTracker, mDeviceProvisionedController, mFakeSystemClock, - mFakeGlobalSettings); + mFakeGlobalSettings, + mFakeEventLog); mContext.addMockSystemService(TrustManager.class, mock(TrustManager.class)); mContext.addMockSystemService(FingerprintManager.class, mock(FingerprintManager.class)); @@ -1187,7 +1192,8 @@ public class CentralSurfacesImplTest extends SysuiTestCase { UserTracker userTracker, DeviceProvisionedController deviceProvisionedController, SystemClock systemClock, - GlobalSettings globalSettings) { + GlobalSettings globalSettings, + EventLog eventLog) { super( powerManager, ambientDisplayConfiguration, @@ -1203,7 +1209,8 @@ public class CentralSurfacesImplTest extends SysuiTestCase { userTracker, deviceProvisionedController, systemClock, - globalSettings + globalSettings, + eventLog ); mUseHeadsUp = true; } diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/ScrimControllerTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/ScrimControllerTest.java index 15c09b53938f..4827c92ce452 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/ScrimControllerTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/ScrimControllerTest.java @@ -1185,14 +1185,11 @@ public class ScrimControllerTest extends SysuiTestCase { } @Test - public void testScrimFocus() { - mScrimController.transitionTo(ScrimState.AOD); - assertFalse("Should not be focusable on AOD", mScrimBehind.isFocusable()); - assertFalse("Should not be focusable on AOD", mScrimInFront.isFocusable()); - - mScrimController.transitionTo(ScrimState.KEYGUARD); - Assert.assertTrue("Should be focusable on keyguard", mScrimBehind.isFocusable()); - Assert.assertTrue("Should be focusable on keyguard", mScrimInFront.isFocusable()); + public void testScrimsAreNotFocusable() { + assertFalse("Behind scrim should not be focusable", mScrimBehind.isFocusable()); + assertFalse("Front scrim should not be focusable", mScrimInFront.isFocusable()); + assertFalse("Notifications scrim should not be focusable", + mNotificationsScrim.isFocusable()); } @Test @@ -1263,14 +1260,6 @@ public class ScrimControllerTest extends SysuiTestCase { } @Test - public void testViewsDontHaveFocusHighlight() { - assertFalse("Scrim shouldn't have focus highlight", - mScrimInFront.getDefaultFocusHighlightEnabled()); - assertFalse("Scrim shouldn't have focus highlight", - mScrimBehind.getDefaultFocusHighlightEnabled()); - } - - @Test public void testIsLowPowerMode() { HashSet<ScrimState> lowPowerModeStates = new HashSet<>(Arrays.asList( ScrimState.OFF, ScrimState.AOD, ScrimState.PULSING)); diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManagerTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManagerTest.java index 46b3996c4337..225ddb6110c2 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManagerTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManagerTest.java @@ -178,7 +178,7 @@ public class StatusBarKeyguardViewManagerTest extends SysuiTestCase { mFeatureFlags.set(Flags.WM_ENABLE_PREDICTIVE_BACK_BOUNCER_ANIM, true); mFeatureFlags.set(Flags.REFACTOR_KEYGUARD_DISMISS_INTENT, false); mFeatureFlags.set(Flags.KEYGUARD_WM_STATE_REFACTOR, false); - mFeatureFlags.set(Flags.ALTERNATE_BOUNCER_VIEW, false); + mSetFlagsRule.disableFlags(com.android.systemui.Flags.FLAG_DEVICE_ENTRY_UDFPS_REFACTOR); when(mNotificationShadeWindowController.getWindowRootView()) .thenReturn(mNotificationShadeWindowView); @@ -771,7 +771,7 @@ public class StatusBarKeyguardViewManagerTest extends SysuiTestCase { mStatusBarKeyguardViewManager.addCallback(mCallback); // GIVEN alternate bouncer view flag enabled & the alternate bouncer is visible - mFeatureFlags.set(Flags.ALTERNATE_BOUNCER_VIEW, true); + mSetFlagsRule.enableFlags(com.android.systemui.Flags.FLAG_DEVICE_ENTRY_UDFPS_REFACTOR); when(mAlternateBouncerInteractor.isVisibleState()).thenReturn(true); // THEN the touch is not acted upon @@ -781,7 +781,7 @@ public class StatusBarKeyguardViewManagerTest extends SysuiTestCase { @Test public void onInterceptTouch_alternateBouncerViewFlagEnabled() { // GIVEN alternate bouncer view flag enabled & the alternate bouncer is visible - mFeatureFlags.set(Flags.ALTERNATE_BOUNCER_VIEW, true); + mSetFlagsRule.enableFlags(com.android.systemui.Flags.FLAG_DEVICE_ENTRY_UDFPS_REFACTOR); when(mAlternateBouncerInteractor.isVisibleState()).thenReturn(true); // THEN the touch is not intercepted diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarNotificationPresenterTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarNotificationPresenterTest.java index 53c621d24601..bbdc9ced57ee 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarNotificationPresenterTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarNotificationPresenterTest.java @@ -16,22 +16,28 @@ package com.android.systemui.statusbar.phone; import static android.view.Display.DEFAULT_DISPLAY; +import static com.android.systemui.statusbar.notification.interruption.VisualInterruptionType.BUBBLE; +import static com.android.systemui.statusbar.notification.interruption.VisualInterruptionType.PEEK; +import static com.android.systemui.statusbar.notification.interruption.VisualInterruptionType.PULSE; + import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; import android.app.Notification; import android.app.PendingIntent; import android.app.StatusBarManager; +import android.platform.test.flag.junit.SetFlagsRule; import android.testing.AndroidTestingRunner; import android.testing.TestableLooper; import android.testing.TestableLooper.RunWithLooper; import androidx.test.filters.SmallTest; -import com.android.internal.logging.testing.FakeMetricsLogger; +import com.android.systemui.Flags; import com.android.systemui.InitController; import com.android.systemui.SysuiTestCase; import com.android.systemui.plugins.ActivityStarter; @@ -55,7 +61,10 @@ import com.android.systemui.statusbar.notification.collection.NotificationEntryB import com.android.systemui.statusbar.notification.collection.render.NotifShadeEventSource; import com.android.systemui.statusbar.notification.domain.interactor.NotificationAlertsInteractor; import com.android.systemui.statusbar.notification.interruption.NotificationInterruptSuppressor; +import com.android.systemui.statusbar.notification.interruption.VisualInterruptionCondition; import com.android.systemui.statusbar.notification.interruption.VisualInterruptionDecisionProvider; +import com.android.systemui.statusbar.notification.interruption.VisualInterruptionFilter; +import com.android.systemui.statusbar.notification.interruption.VisualInterruptionType; import com.android.systemui.statusbar.notification.row.NotificationGutsManager; import com.android.systemui.statusbar.notification.stack.NotificationListContainer; import com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayout; @@ -64,10 +73,14 @@ import com.android.systemui.statusbar.policy.HeadsUpManager; import com.android.systemui.statusbar.policy.KeyguardStateController; import org.junit.Before; +import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.ArgumentCaptor; +import java.util.List; +import java.util.Set; + @SmallTest @RunWith(AndroidTestingRunner.class) @RunWithLooper() @@ -76,18 +89,23 @@ public class StatusBarNotificationPresenterTest extends SysuiTestCase { private final VisualInterruptionDecisionProvider mVisualInterruptionDecisionProvider = mock(VisualInterruptionDecisionProvider.class); private NotificationInterruptSuppressor mInterruptSuppressor; + private VisualInterruptionCondition mAlertsDisabledCondition; + private VisualInterruptionCondition mVrModeCondition; + private VisualInterruptionFilter mNeedsRedactionFilter; + private VisualInterruptionCondition mPanelsDisabledCondition; private CommandQueue mCommandQueue; - private FakeMetricsLogger mMetricsLogger; private final ShadeController mShadeController = mock(ShadeController.class); private final NotificationAlertsInteractor mNotificationAlertsInteractor = mock(NotificationAlertsInteractor.class); private final KeyguardStateController mKeyguardStateController = mock(KeyguardStateController.class); - private final InitController mInitController = new InitController(); + + @Rule + public final SetFlagsRule mSetFlagsRule = new SetFlagsRule( + SetFlagsRule.DefaultInitValueType.DEVICE_DEFAULT); @Before public void setup() { - mMetricsLogger = new FakeMetricsLogger(); mCommandQueue = new CommandQueue(mContext, new FakeDisplayTracker(mContext)); mDependency.injectTestDependency(StatusBarStateController.class, mock(SysuiStatusBarStateController.class)); @@ -95,15 +113,182 @@ public class StatusBarNotificationPresenterTest extends SysuiTestCase { mDependency.injectMockDependency(NotificationRemoteInputManager.Callback.class); mDependency.injectMockDependency(NotificationShadeWindowController.class); - NotificationShadeWindowView notificationShadeWindowView = + when(mNotificationAlertsInteractor.areNotificationAlertsEnabled()).thenReturn(true); + } + + @Test + public void testInit_refactorDisabled() { + ensureRefactorDisabledState(); + } + + @Test + public void testInit_refactorEnabled() { + ensureRefactorEnabledState(); + } + + @Test + public void testNoSuppressHeadsUp_default_refactorDisabled() { + ensureRefactorDisabledState(); + + assertFalse(mInterruptSuppressor.suppressAwakeHeadsUp(createNotificationEntry())); + } + + @Test + public void testNoSuppressHeadsUp_default_refactorEnabled() { + ensureRefactorEnabledState(); + + assertFalse(mAlertsDisabledCondition.shouldSuppress()); + assertFalse(mVrModeCondition.shouldSuppress()); + assertFalse(mNeedsRedactionFilter.shouldSuppress(createNotificationEntry())); + assertFalse(mAlertsDisabledCondition.shouldSuppress()); + } + + @Test + public void testSuppressHeadsUp_disabledStatusBar_refactorDisabled() { + ensureRefactorDisabledState(); + + mCommandQueue.disable(DEFAULT_DISPLAY, StatusBarManager.DISABLE_EXPAND, 0, + false /* animate */); + TestableLooper.get(this).processAllMessages(); + + assertTrue("The panel should suppress heads up while disabled", + mInterruptSuppressor.suppressAwakeHeadsUp(createNotificationEntry())); + } + + @Test + public void testSuppressHeadsUp_disabledStatusBar_refactorEnabled() { + ensureRefactorEnabledState(); + + mCommandQueue.disable(DEFAULT_DISPLAY, StatusBarManager.DISABLE_EXPAND, 0, + false /* animate */); + TestableLooper.get(this).processAllMessages(); + + assertTrue("The panel should suppress heads up while disabled", + mPanelsDisabledCondition.shouldSuppress()); + } + + @Test + public void testSuppressHeadsUp_disabledNotificationShade_refactorDisabled() { + ensureRefactorDisabledState(); + + mCommandQueue.disable(DEFAULT_DISPLAY, 0, StatusBarManager.DISABLE2_NOTIFICATION_SHADE, + false /* animate */); + TestableLooper.get(this).processAllMessages(); + + assertTrue("The panel should suppress interruptions while notification shade disabled", + mInterruptSuppressor.suppressAwakeHeadsUp(createNotificationEntry())); + } + + @Test + public void testSuppressHeadsUp_disabledNotificationShade_refactorEnabled() { + ensureRefactorEnabledState(); + + mCommandQueue.disable(DEFAULT_DISPLAY, 0, StatusBarManager.DISABLE2_NOTIFICATION_SHADE, + false /* animate */); + TestableLooper.get(this).processAllMessages(); + + assertTrue("The panel should suppress interruptions while notification shade disabled", + mPanelsDisabledCondition.shouldSuppress()); + } + + @Test + public void testPanelsDisabledConditionSuppressesPeek() { + ensureRefactorEnabledState(); + + final Set<VisualInterruptionType> types = mPanelsDisabledCondition.getTypes(); + assertTrue(types.contains(PEEK)); + assertFalse(types.contains(PULSE)); + assertFalse(types.contains(BUBBLE)); + } + + @Test + public void testNoSuppressHeadsUp_FSI_nonOccludedKeyguard_refactorDisabled() { + ensureRefactorDisabledState(); + + when(mKeyguardStateController.isShowing()).thenReturn(true); + when(mKeyguardStateController.isOccluded()).thenReturn(false); + + assertFalse(mInterruptSuppressor.suppressAwakeHeadsUp(createFsiNotificationEntry())); + } + + @Test + public void testNoSuppressHeadsUp_FSI_nonOccludedKeyguard_refactorEnabled() { + ensureRefactorEnabledState(); + + when(mKeyguardStateController.isShowing()).thenReturn(true); + when(mKeyguardStateController.isOccluded()).thenReturn(false); + + assertFalse(mNeedsRedactionFilter.shouldSuppress(createFsiNotificationEntry())); + + final Set<VisualInterruptionType> types = mNeedsRedactionFilter.getTypes(); + assertTrue(types.contains(PEEK)); + assertFalse(types.contains(PULSE)); + assertFalse(types.contains(BUBBLE)); + } + + @Test + public void testSuppressInterruptions_vrMode_refactorDisabled() { + ensureRefactorDisabledState(); + + mStatusBarNotificationPresenter.mVrMode = true; + + assertTrue("Vr mode should suppress interruptions", + mInterruptSuppressor.suppressAwakeInterruptions(createNotificationEntry())); + } + + @Test + public void testSuppressInterruptions_vrMode_refactorEnabled() { + ensureRefactorEnabledState(); + + mStatusBarNotificationPresenter.mVrMode = true; + + assertTrue("Vr mode should suppress interruptions", mVrModeCondition.shouldSuppress()); + + final Set<VisualInterruptionType> types = mVrModeCondition.getTypes(); + assertTrue(types.contains(PEEK)); + assertFalse(types.contains(PULSE)); + assertTrue(types.contains(BUBBLE)); + } + + @Test + public void testSuppressInterruptions_statusBarAlertsDisabled_refactorDisabled() { + ensureRefactorDisabledState(); + + when(mNotificationAlertsInteractor.areNotificationAlertsEnabled()).thenReturn(false); + + assertTrue("When alerts aren't enabled, interruptions are suppressed", + mInterruptSuppressor.suppressInterruptions(createNotificationEntry())); + } + + @Test + public void testSuppressInterruptions_statusBarAlertsDisabled_refactorEnabled() { + ensureRefactorEnabledState(); + + when(mNotificationAlertsInteractor.areNotificationAlertsEnabled()).thenReturn(false); + + assertTrue("When alerts aren't enabled, interruptions are suppressed", + mAlertsDisabledCondition.shouldSuppress()); + + final Set<VisualInterruptionType> types = mAlertsDisabledCondition.getTypes(); + assertTrue(types.contains(PEEK)); + assertTrue(types.contains(PULSE)); + assertTrue(types.contains(BUBBLE)); + } + + private void createPresenter() { + final ShadeViewController shadeViewController = mock(ShadeViewController.class); + + final NotificationShadeWindowView notificationShadeWindowView = mock(NotificationShadeWindowView.class); + when(notificationShadeWindowView.getResources()).thenReturn(mContext.getResources()); + NotificationStackScrollLayoutController stackScrollLayoutController = mock(NotificationStackScrollLayoutController.class); when(stackScrollLayoutController.getView()).thenReturn( mock(NotificationStackScrollLayout.class)); - when(notificationShadeWindowView.getResources()).thenReturn(mContext.getResources()); - ShadeViewController shadeViewController = mock(ShadeViewController.class); + final InitController initController = new InitController(); + mStatusBarNotificationPresenter = new StatusBarNotificationPresenter( mContext, shadeViewController, @@ -125,110 +310,76 @@ public class StatusBarNotificationPresenterTest extends SysuiTestCase { mock(NotifShadeEventSource.class), mock(NotificationMediaManager.class), mock(NotificationGutsManager.class), - mInitController, + initController, mVisualInterruptionDecisionProvider, mock(NotificationRemoteInputManager.class), mock(NotificationRemoteInputManager.Callback.class), mock(NotificationListContainer.class)); - mInitController.executePostInitTasks(); - ArgumentCaptor<NotificationInterruptSuppressor> suppressorCaptor = - ArgumentCaptor.forClass(NotificationInterruptSuppressor.class); - verify(mVisualInterruptionDecisionProvider).addLegacySuppressor(suppressorCaptor.capture()); - mInterruptSuppressor = suppressorCaptor.getValue(); + + initController.executePostInitTasks(); } - @Test - public void testNoSuppressHeadsUp_default() { - Notification n = new Notification.Builder(getContext(), "a").build(); - NotificationEntry entry = new NotificationEntryBuilder() - .setPkg("a") - .setOpPkg("a") - .setTag("a") - .setNotification(n) - .build(); + private void verifyAndCaptureSuppressors() { + mInterruptSuppressor = null; - assertFalse(mInterruptSuppressor.suppressAwakeHeadsUp(entry)); + final ArgumentCaptor<VisualInterruptionCondition> conditionCaptor = + ArgumentCaptor.forClass(VisualInterruptionCondition.class); + verify(mVisualInterruptionDecisionProvider, times(3)).addCondition( + conditionCaptor.capture()); + final List<VisualInterruptionCondition> conditions = conditionCaptor.getAllValues(); + mAlertsDisabledCondition = conditions.get(0); + mVrModeCondition = conditions.get(1); + mPanelsDisabledCondition = conditions.get(2); + + final ArgumentCaptor<VisualInterruptionFilter> needsRedactionFilterCaptor = + ArgumentCaptor.forClass(VisualInterruptionFilter.class); + verify(mVisualInterruptionDecisionProvider).addFilter(needsRedactionFilterCaptor.capture()); + mNeedsRedactionFilter = needsRedactionFilterCaptor.getValue(); } - @Test - public void testSuppressHeadsUp_disabledStatusBar() { - Notification n = new Notification.Builder(getContext(), "a").build(); - NotificationEntry entry = new NotificationEntryBuilder() - .setPkg("a") - .setOpPkg("a") - .setTag("a") - .setNotification(n) - .build(); - mCommandQueue.disable(DEFAULT_DISPLAY, StatusBarManager.DISABLE_EXPAND, 0, - false /* animate */); - TestableLooper.get(this).processAllMessages(); + private void verifyAndCaptureLegacySuppressor() { + mAlertsDisabledCondition = null; + mVrModeCondition = null; + mNeedsRedactionFilter = null; + mPanelsDisabledCondition = null; - assertTrue("The panel should suppress heads up while disabled", - mInterruptSuppressor.suppressAwakeHeadsUp(entry)); + final ArgumentCaptor<NotificationInterruptSuppressor> suppressorCaptor = + ArgumentCaptor.forClass(NotificationInterruptSuppressor.class); + verify(mVisualInterruptionDecisionProvider).addLegacySuppressor(suppressorCaptor.capture()); + mInterruptSuppressor = suppressorCaptor.getValue(); } - @Test - public void testSuppressHeadsUp_disabledNotificationShade() { - Notification n = new Notification.Builder(getContext(), "a").build(); - NotificationEntry entry = new NotificationEntryBuilder() - .setPkg("a") - .setOpPkg("a") - .setTag("a") - .setNotification(n) - .build(); - mCommandQueue.disable(DEFAULT_DISPLAY, 0, StatusBarManager.DISABLE2_NOTIFICATION_SHADE, - false /* animate */); - TestableLooper.get(this).processAllMessages(); + private void ensureRefactorDisabledState() { + mSetFlagsRule.disableFlags(Flags.FLAG_VISUAL_INTERRUPTIONS_REFACTOR); + createPresenter(); + verifyAndCaptureLegacySuppressor(); + } - assertTrue("The panel should suppress interruptions while notification shade " - + "disabled", - mInterruptSuppressor.suppressAwakeHeadsUp(entry)); + private void ensureRefactorEnabledState() { + mSetFlagsRule.enableFlags(Flags.FLAG_VISUAL_INTERRUPTIONS_REFACTOR); + createPresenter(); + verifyAndCaptureSuppressors(); } - @Test - public void testNoSuppressHeadsUp_FSI_nonOccludedKeyguard() { - Notification n = new Notification.Builder(getContext(), "a") - .setFullScreenIntent(mock(PendingIntent.class), true) - .build(); - NotificationEntry entry = new NotificationEntryBuilder() + private NotificationEntry createNotificationEntry() { + return new NotificationEntryBuilder() .setPkg("a") .setOpPkg("a") .setTag("a") - .setNotification(n) + .setNotification(new Notification.Builder(getContext(), "a").build()) .build(); - - when(mKeyguardStateController.isShowing()).thenReturn(true); - when(mKeyguardStateController.isOccluded()).thenReturn(false); - assertFalse(mInterruptSuppressor.suppressAwakeHeadsUp(entry)); } - @Test - public void testSuppressInterruptions_vrMode() { - Notification n = new Notification.Builder(getContext(), "a").build(); - NotificationEntry entry = new NotificationEntryBuilder() - .setPkg("a") - .setOpPkg("a") - .setTag("a") - .setNotification(n) + private NotificationEntry createFsiNotificationEntry() { + final Notification notification = new Notification.Builder(getContext(), "a") + .setFullScreenIntent(mock(PendingIntent.class), true) .build(); - mStatusBarNotificationPresenter.mVrMode = true; - - assertTrue("Vr mode should suppress interruptions", - mInterruptSuppressor.suppressAwakeInterruptions(entry)); - } - @Test - public void testSuppressInterruptions_statusBarAlertsDisabled() { - Notification n = new Notification.Builder(getContext(), "a").build(); - NotificationEntry entry = new NotificationEntryBuilder() + return new NotificationEntryBuilder() .setPkg("a") .setOpPkg("a") .setTag("a") - .setNotification(n) + .setNotification(notification) .build(); - when(mNotificationAlertsInteractor.areNotificationAlertsEnabled()).thenReturn(false); - - assertTrue("When alerts aren't enabled, interruptions are suppressed", - mInterruptSuppressor.suppressInterruptions(entry)); } } diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/FullMobileConnectionRepositoryTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/FullMobileConnectionRepositoryTest.kt index e91b0c1a9a6d..1fb6e2c7a232 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/FullMobileConnectionRepositoryTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/FullMobileConnectionRepositoryTest.kt @@ -25,6 +25,8 @@ import android.telephony.TelephonyManager import androidx.test.filters.SmallTest import com.android.systemui.SysuiTestCase import com.android.systemui.coroutines.collectLastValue +import com.android.systemui.flags.FakeFeatureFlagsClassic +import com.android.systemui.flags.Flags.ROAMING_INDICATOR_VIA_DISPLAY_INFO import com.android.systemui.log.table.TableLogBuffer import com.android.systemui.log.table.TableLogBufferFactory import com.android.systemui.statusbar.pipeline.mobile.data.model.NetworkNameModel @@ -68,6 +70,9 @@ import org.mockito.Mockito.verify class FullMobileConnectionRepositoryTest : SysuiTestCase() { private lateinit var underTest: FullMobileConnectionRepository + private val flags = + FakeFeatureFlagsClassic().also { it.set(ROAMING_INDICATOR_VIA_DISPLAY_INFO, true) } + private val systemClock = FakeSystemClock() private val testDispatcher = UnconfinedTestDispatcher() private val testScope = TestScope(testDispatcher) @@ -690,6 +695,7 @@ class FullMobileConnectionRepositoryTest : SysuiTestCase() { testDispatcher, logger = mock(), tableLogBuffer, + flags, testScope.backgroundScope, ) whenever( 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 a90bd48a5bce..9d6f3156f83e 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 @@ -35,7 +35,9 @@ import android.telephony.SubscriptionManager.EXTRA_SUBSCRIPTION_INDEX import android.telephony.SubscriptionManager.PROFILE_CLASS_UNSET import android.telephony.TelephonyCallback import android.telephony.TelephonyCallback.DataActivityListener +import android.telephony.TelephonyCallback.DisplayInfoListener import android.telephony.TelephonyCallback.ServiceStateListener +import android.telephony.TelephonyDisplayInfo import android.telephony.TelephonyDisplayInfo.OVERRIDE_NETWORK_TYPE_LTE_CA import android.telephony.TelephonyDisplayInfo.OVERRIDE_NETWORK_TYPE_NONE import android.telephony.TelephonyManager @@ -65,6 +67,8 @@ import androidx.test.filters.SmallTest import com.android.settingslib.mobile.MobileMappings import com.android.systemui.SysuiTestCase import com.android.systemui.coroutines.collectLastValue +import com.android.systemui.flags.FakeFeatureFlagsClassic +import com.android.systemui.flags.Flags.ROAMING_INDICATOR_VIA_DISPLAY_INFO import com.android.systemui.log.table.TableLogBuffer import com.android.systemui.statusbar.pipeline.mobile.data.MobileInputLogger import com.android.systemui.statusbar.pipeline.mobile.data.model.DataConnectionState @@ -111,6 +115,9 @@ class MobileConnectionRepositoryTest : SysuiTestCase() { private lateinit var underTest: MobileConnectionRepositoryImpl private lateinit var connectionsRepo: FakeMobileConnectionsRepository + private val flags = + FakeFeatureFlagsClassic().also { it.set(ROAMING_INDICATOR_VIA_DISPLAY_INFO, true) } + @Mock private lateinit var connectivityManager: ConnectivityManager @Mock private lateinit var telephonyManager: TelephonyManager @Mock private lateinit var logger: MobileInputLogger @@ -158,6 +165,7 @@ class MobileConnectionRepositoryTest : SysuiTestCase() { testDispatcher, logger, tableLogger, + flags, testScope.backgroundScope, ) } @@ -610,8 +618,80 @@ class MobileConnectionRepositoryTest : SysuiTestCase() { } @Test - fun roaming_gsm_queriesServiceState() = + fun roaming_gsm_queriesDisplayInfo_viaDisplayInfo() = testScope.runTest { + // GIVEN flag is true + flags.set(ROAMING_INDICATOR_VIA_DISPLAY_INFO, true) + + // Re-create the repository, because the flag is read at init + underTest = + MobileConnectionRepositoryImpl( + SUB_1_ID, + context, + subscriptionModel, + DEFAULT_NAME_MODEL, + SEP, + connectivityManager, + telephonyManager, + systemUiCarrierConfig, + fakeBroadcastDispatcher, + mobileMappings, + testDispatcher, + logger, + tableLogger, + flags, + testScope.backgroundScope, + ) + + var latest: Boolean? = null + val job = underTest.isRoaming.onEach { latest = it }.launchIn(this) + + val cb = getTelephonyCallbackForType<DisplayInfoListener>() + + // CDMA roaming is off, GSM roaming is off + whenever(telephonyManager.cdmaEnhancedRoamingIndicatorDisplayNumber).thenReturn(ERI_OFF) + cb.onDisplayInfoChanged( + TelephonyDisplayInfo(NETWORK_TYPE_LTE, NETWORK_TYPE_UNKNOWN, false) + ) + + assertThat(latest).isFalse() + + // CDMA roaming is off, GSM roaming is on + cb.onDisplayInfoChanged( + TelephonyDisplayInfo(NETWORK_TYPE_LTE, NETWORK_TYPE_UNKNOWN, true) + ) + + assertThat(latest).isTrue() + + job.cancel() + } + + @Test + fun roaming_gsm_queriesDisplayInfo_viaServiceState() = + testScope.runTest { + // GIVEN flag is false + flags.set(ROAMING_INDICATOR_VIA_DISPLAY_INFO, false) + + // Re-create the repository, because the flag is read at init + underTest = + MobileConnectionRepositoryImpl( + SUB_1_ID, + context, + subscriptionModel, + DEFAULT_NAME_MODEL, + SEP, + connectivityManager, + telephonyManager, + systemUiCarrierConfig, + fakeBroadcastDispatcher, + mobileMappings, + testDispatcher, + logger, + tableLogger, + flags, + testScope.backgroundScope, + ) + var latest: Boolean? = null val job = underTest.isRoaming.onEach { latest = it }.launchIn(this) diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/MobileConnectionTelephonySmokeTests.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/MobileConnectionTelephonySmokeTests.kt index 889f60a08766..2ab8c0a07e21 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/MobileConnectionTelephonySmokeTests.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/MobileConnectionTelephonySmokeTests.kt @@ -32,6 +32,8 @@ import android.telephony.TelephonyManager.NETWORK_TYPE_LTE import android.telephony.TelephonyManager.NETWORK_TYPE_UNKNOWN import androidx.test.filters.SmallTest import com.android.systemui.SysuiTestCase +import com.android.systemui.flags.FakeFeatureFlagsClassic +import com.android.systemui.flags.Flags import com.android.systemui.log.table.TableLogBuffer import com.android.systemui.statusbar.pipeline.mobile.data.MobileInputLogger import com.android.systemui.statusbar.pipeline.mobile.data.model.DataConnectionState @@ -97,6 +99,9 @@ class MobileConnectionTelephonySmokeTests : SysuiTestCase() { private lateinit var underTest: MobileConnectionRepositoryImpl private lateinit var connectionsRepo: FakeMobileConnectionsRepository + private val flags = + FakeFeatureFlagsClassic().also { it.set(Flags.ROAMING_INDICATOR_VIA_DISPLAY_INFO, true) } + @Mock private lateinit var connectivityManager: ConnectivityManager @Mock private lateinit var telephonyManager: TelephonyManager @Mock private lateinit var logger: MobileInputLogger @@ -139,6 +144,7 @@ class MobileConnectionTelephonySmokeTests : SysuiTestCase() { testDispatcher, logger, tableLogger, + flags, testScope.backgroundScope, ) } 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 03f300542a6f..07abd275d1ce 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 @@ -44,6 +44,8 @@ import com.android.settingslib.R import com.android.settingslib.mobile.MobileMappings import com.android.systemui.SysuiTestCase import com.android.systemui.coroutines.collectLastValue +import com.android.systemui.flags.FakeFeatureFlagsClassic +import com.android.systemui.flags.Flags import com.android.systemui.log.table.TableLogBuffer import com.android.systemui.log.table.TableLogBufferFactory import com.android.systemui.statusbar.pipeline.airplane.data.repository.FakeAirplaneModeRepository @@ -93,6 +95,9 @@ import org.mockito.MockitoAnnotations @TestableLooper.RunWithLooper class MobileConnectionsRepositoryTest : SysuiTestCase() { + private val flags = + FakeFeatureFlagsClassic().also { it.set(Flags.ROAMING_INDICATOR_VIA_DISPLAY_INFO, true) } + private lateinit var connectionFactory: MobileConnectionRepositoryImpl.Factory private lateinit var carrierMergedFactory: CarrierMergedConnectionRepository.Factory private lateinit var fullConnectionFactory: FullMobileConnectionRepository.Factory @@ -189,6 +194,7 @@ class MobileConnectionsRepositoryTest : SysuiTestCase() { logger = logger, mobileMappingsProxy = mobileMappings, scope = testScope.backgroundScope, + flags = flags, carrierConfigRepository = carrierConfigRepository, ) carrierMergedFactory = diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/MobileTelephonyHelpers.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/MobileTelephonyHelpers.kt index cf815c27a0bf..ec04da7030b7 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/MobileTelephonyHelpers.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/MobileTelephonyHelpers.kt @@ -50,10 +50,7 @@ object MobileTelephonyHelpers { } fun telephonyDisplayInfo(networkType: Int, overrideNetworkType: Int) = - mock<TelephonyDisplayInfo>().also { - whenever(it.networkType).thenReturn(networkType) - whenever(it.overrideNetworkType).thenReturn(overrideNetworkType) - } + TelephonyDisplayInfo(networkType, overrideNetworkType) inline fun <reified T> getTelephonyCallbackForType(mockTelephonyManager: TelephonyManager): T { val cbs = getTelephonyCallbacks(mockTelephonyManager).filterIsInstance<T>() diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/domain/interactor/ZenModeInteractorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/domain/interactor/ZenModeInteractorTest.kt index 78e79718e166..99e62eec890c 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/domain/interactor/ZenModeInteractorTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/domain/interactor/ZenModeInteractorTest.kt @@ -19,13 +19,13 @@ package com.android.systemui.statusbar.policy.domain.interactor import android.app.NotificationManager.Policy import android.provider.Settings import androidx.test.filters.SmallTest -import com.android.SysUITestComponent -import com.android.SysUITestModule -import com.android.collectLastValue -import com.android.runCurrent -import com.android.runTest +import com.android.systemui.SysUITestComponent +import com.android.systemui.SysUITestModule import com.android.systemui.SysuiTestCase +import com.android.systemui.collectLastValue import com.android.systemui.dagger.SysUISingleton +import com.android.systemui.runCurrent +import com.android.systemui.runTest import com.android.systemui.statusbar.policy.data.repository.FakeZenModeRepository import com.android.systemui.user.domain.UserDomainLayerModule import com.google.common.truth.Truth.assertThat diff --git a/packages/SystemUI/tests/src/com/android/systemui/util/drawable/LoopedAnimatable2DrawableWrapperTest.kt b/packages/SystemUI/tests/src/com/android/systemui/util/drawable/LoopedAnimatable2DrawableWrapperTest.kt new file mode 100644 index 000000000000..6d2f00d50d78 --- /dev/null +++ b/packages/SystemUI/tests/src/com/android/systemui/util/drawable/LoopedAnimatable2DrawableWrapperTest.kt @@ -0,0 +1,80 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.systemui.util.drawable + +import android.graphics.drawable.Animatable2 +import android.graphics.drawable.Drawable +import android.testing.TestableLooper +import androidx.test.ext.junit.runners.AndroidJUnit4 +import androidx.test.filters.MediumTest +import com.android.systemui.SysuiTestCase +import com.android.systemui.util.mockito.any +import com.android.systemui.util.mockito.capture +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.times +import org.mockito.Mockito.verify +import org.mockito.MockitoAnnotations + +@MediumTest +@RunWith(AndroidJUnit4::class) +@TestableLooper.RunWithLooper(setAsMainLooper = true) +class LoopedAnimatable2DrawableWrapperTest : SysuiTestCase() { + + @Mock private lateinit var drawable: AnimatedDrawable + @Captor private lateinit var callbackCaptor: ArgumentCaptor<Animatable2.AnimationCallback> + + private lateinit var underTest: LoopedAnimatable2DrawableWrapper + + @Before + fun setup() { + MockitoAnnotations.initMocks(this) + + underTest = LoopedAnimatable2DrawableWrapper.fromDrawable(drawable) + } + + @Test + fun startAddsTheCallback() { + underTest.start() + + verify(drawable).registerAnimationCallback(any()) + } + + @Test + fun stopRemovesTheCallback() { + underTest.stop() + + verify(drawable).unregisterAnimationCallback(any()) + } + + @Test + fun animationLooped() { + underTest.start() + verify(drawable).registerAnimationCallback(capture(callbackCaptor)) + + callbackCaptor.value.onAnimationEnd(drawable) + + // underTest.start() + looped start() + verify(drawable, times(2)).start() + } + + private abstract class AnimatedDrawable : Drawable(), Animatable2 +} 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 102c3fc76a61..aa5f987b22a8 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/wmshell/BubblesTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/wmshell/BubblesTest.java @@ -126,6 +126,8 @@ import com.android.systemui.shade.ShadeController; import com.android.systemui.shade.ShadeWindowLogger; import com.android.systemui.shade.data.repository.FakeShadeRepository; import com.android.systemui.shade.domain.interactor.ShadeInteractor; +import com.android.systemui.shade.domain.interactor.ShadeInteractorImpl; +import com.android.systemui.shade.domain.interactor.ShadeInteractorLegacyImpl; import com.android.systemui.shared.system.ActivityManagerWrapper; import com.android.systemui.shared.system.QuickStepContract; import com.android.systemui.statusbar.NotificationEntryHelper; @@ -160,6 +162,7 @@ import com.android.systemui.statusbar.policy.ZenModeController; import com.android.systemui.statusbar.policy.data.repository.FakeDeviceProvisioningRepository; import com.android.systemui.user.domain.interactor.SelectedUserInteractor; import com.android.systemui.user.domain.interactor.UserSwitcherInteractor; +import com.android.systemui.util.FakeEventLog; import com.android.systemui.util.settings.FakeGlobalSettings; import com.android.systemui.util.time.SystemClock; import com.android.wm.shell.ShellTaskOrganizer; @@ -454,23 +457,24 @@ public class BubblesTest extends SysuiTestCase { new ResourcesSplitShadeStateController(); mShadeInteractor = - new ShadeInteractor( + new ShadeInteractorImpl( mTestScope.getBackgroundScope(), deviceProvisioningRepository, new FakeDisableFlagsRepository(), mDozeParameters, - sceneContainerFlags, - () -> sceneInteractor, keyguardRepository, keyguardTransitionInteractor, powerInteractor, new FakeUserSetupRepository(), mock(UserSwitcherInteractor.class), - new SharedNotificationContainerInteractor( - configurationRepository, - mContext, - splitShadeStateController), - new FakeShadeRepository() + new ShadeInteractorLegacyImpl( + mTestScope.getBackgroundScope(), keyguardRepository, + new SharedNotificationContainerInteractor( + configurationRepository, + mContext, + splitShadeStateController), + shadeRepository + ) ); mNotificationShadeWindowController = new NotificationShadeWindowControllerImpl( @@ -540,7 +544,8 @@ public class BubblesTest extends SysuiTestCase { mock(UserTracker.class), mock(DeviceProvisionedController.class), mock(SystemClock.class), - fakeGlobalSettings + fakeGlobalSettings, + new FakeEventLog() ); mShellTaskOrganizer = new ShellTaskOrganizer(mock(ShellInit.class), diff --git a/packages/SystemUI/tests/src/com/android/systemui/wmshell/TestableNotificationInterruptStateProviderImpl.java b/packages/SystemUI/tests/src/com/android/systemui/wmshell/TestableNotificationInterruptStateProviderImpl.java index 975555c1a46b..c9964c233d44 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/wmshell/TestableNotificationInterruptStateProviderImpl.java +++ b/packages/SystemUI/tests/src/com/android/systemui/wmshell/TestableNotificationInterruptStateProviderImpl.java @@ -31,6 +31,7 @@ import com.android.systemui.statusbar.policy.BatteryController; import com.android.systemui.statusbar.policy.DeviceProvisionedController; import com.android.systemui.statusbar.policy.HeadsUpManager; import com.android.systemui.statusbar.policy.KeyguardStateController; +import com.android.systemui.util.EventLog; import com.android.systemui.util.settings.GlobalSettings; import com.android.systemui.util.time.SystemClock; @@ -52,7 +53,8 @@ public class TestableNotificationInterruptStateProviderImpl UserTracker userTracker, DeviceProvisionedController deviceProvisionedController, SystemClock systemClock, - GlobalSettings globalSettings) { + GlobalSettings globalSettings, + EventLog eventLog) { super( powerManager, ambientDisplayConfiguration, @@ -68,7 +70,8 @@ public class TestableNotificationInterruptStateProviderImpl userTracker, deviceProvisionedController, systemClock, - globalSettings); + globalSettings, + eventLog); mUseHeadsUp = true; } } diff --git a/packages/SystemUI/tests/src/com/android/CoroutineTestScopeModule.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/CoroutineTestScopeModule.kt index 360aa0f89a46..de310b49b8cc 100644 --- a/packages/SystemUI/tests/src/com/android/CoroutineTestScopeModule.kt +++ b/packages/SystemUI/tests/utils/src/com/android/systemui/CoroutineTestScopeModule.kt @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.android +package com.android.systemui import com.android.systemui.dagger.qualifiers.Application import com.android.systemui.dagger.qualifiers.Background diff --git a/packages/SystemUI/tests/src/com/android/SysUITestModule.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/SysUITestModule.kt index 97e43ad91f53..d0c1267c9af0 100644 --- a/packages/SystemUI/tests/src/com/android/SysUITestModule.kt +++ b/packages/SystemUI/tests/utils/src/com/android/systemui/SysUITestModule.kt @@ -13,24 +13,29 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.android +package com.android.systemui import android.content.Context import android.content.res.Resources import android.testing.TestableContext import android.testing.TestableResources -import com.android.systemui.FakeSystemUiModule -import com.android.systemui.SysuiTestCase -import com.android.systemui.SysuiTestableContext import com.android.systemui.broadcast.BroadcastDispatcher import com.android.systemui.broadcast.FakeBroadcastDispatcher import com.android.systemui.coroutines.collectLastValue import com.android.systemui.coroutines.collectValues +import com.android.systemui.dagger.SysUISingleton import com.android.systemui.dagger.qualifiers.Application import com.android.systemui.dagger.qualifiers.Main +import com.android.systemui.scene.shared.flag.SceneContainerFlags +import com.android.systemui.shade.domain.interactor.BaseShadeInteractor +import com.android.systemui.shade.domain.interactor.ShadeInteractor +import com.android.systemui.shade.domain.interactor.ShadeInteractorImpl +import com.android.systemui.shade.domain.interactor.ShadeInteractorLegacyImpl +import com.android.systemui.shade.domain.interactor.ShadeInteractorSceneContainerImpl import dagger.Binds import dagger.Module import dagger.Provides +import javax.inject.Provider import kotlin.coroutines.CoroutineContext import kotlin.coroutines.EmptyCoroutineContext import kotlinx.coroutines.CoroutineStart @@ -56,6 +61,7 @@ interface SysUITestModule { @Binds @Application fun bindAppResources(resources: Resources): Resources @Binds @Main fun bindMainResources(resources: Resources): Resources @Binds fun bindBroadcastDispatcher(fake: FakeBroadcastDispatcher): BroadcastDispatcher + @Binds @SysUISingleton fun bindsShadeInteractor(sii: ShadeInteractorImpl): ShadeInteractor companion object { @Provides @@ -72,6 +78,19 @@ interface SysUITestModule { @Provides fun provideFakeBroadcastDispatcher(test: SysuiTestCase): FakeBroadcastDispatcher = test.fakeBroadcastDispatcher + + @Provides + fun provideBaseShadeInteractor( + sceneContainerFlags: SceneContainerFlags, + sceneContainerOn: Provider<ShadeInteractorSceneContainerImpl>, + sceneContainerOff: Provider<ShadeInteractorLegacyImpl> + ): BaseShadeInteractor { + return if (sceneContainerFlags.isEnabled()) { + sceneContainerOn.get() + } else { + sceneContainerOff.get() + } + } } } diff --git a/packages/SystemUI/tests/src/com/android/TestMocksModule.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/TestMocksModule.kt index fd50f15dc5fc..37a4f6181921 100644 --- a/packages/SystemUI/tests/src/com/android/TestMocksModule.kt +++ b/packages/SystemUI/tests/utils/src/com/android/systemui/TestMocksModule.kt @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.android +package com.android.systemui import android.app.ActivityManager import android.app.admin.DevicePolicyManager @@ -24,7 +24,6 @@ import com.android.internal.logging.MetricsLogger import com.android.keyguard.KeyguardSecurityModel import com.android.keyguard.KeyguardUpdateMonitor import com.android.keyguard.KeyguardViewController -import com.android.systemui.GuestResumeSessionReceiver import com.android.systemui.animation.DialogLaunchAnimator import com.android.systemui.demomode.DemoModeController import com.android.systemui.dump.DumpManager diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/authentication/data/repository/FakeAuthenticationRepository.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/authentication/data/repository/FakeAuthenticationRepository.kt index c0dbeca423ac..45ded7ffcc8c 100644 --- a/packages/SystemUI/tests/utils/src/com/android/systemui/authentication/data/repository/FakeAuthenticationRepository.kt +++ b/packages/SystemUI/tests/utils/src/com/android/systemui/authentication/data/repository/FakeAuthenticationRepository.kt @@ -60,6 +60,8 @@ class FakeAuthenticationRepository( override val minPatternLength: Int = 4 + override val minPasswordLength: Int = 4 + private val _isPinEnhancedPrivacyEnabled = MutableStateFlow(false) override val isPinEnhancedPrivacyEnabled: StateFlow<Boolean> = _isPinEnhancedPrivacyEnabled.asStateFlow() diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/broadcast/BroadcastDispatcherKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/broadcast/BroadcastDispatcherKosmos.kt new file mode 100644 index 000000000000..7207948412b4 --- /dev/null +++ b/packages/SystemUI/tests/utils/src/com/android/systemui/broadcast/BroadcastDispatcherKosmos.kt @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.systemui.broadcast + +import com.android.systemui.kosmos.Kosmos +import com.android.systemui.util.mockito.mock + +val Kosmos.broadcastDispatcher by + Kosmos.Fixture { + FakeBroadcastDispatcher( + context = mock(), + mainExecutor = mock(), + broadcastRunningLooper = mock(), + broadcastRunningExecutor = mock(), + dumpManager = mock(), + logger = mock(), + userTracker = mock(), + shouldFailOnLeakedReceiver = false + ) + } diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/communal/domain/interactor/CommunalInteractorFactory.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/communal/domain/interactor/CommunalInteractorFactory.kt index 0c821eab65e0..3aee889d55f4 100644 --- a/packages/SystemUI/tests/utils/src/com/android/systemui/communal/domain/interactor/CommunalInteractorFactory.kt +++ b/packages/SystemUI/tests/utils/src/com/android/systemui/communal/domain/interactor/CommunalInteractorFactory.kt @@ -22,6 +22,7 @@ import com.android.systemui.communal.data.repository.FakeCommunalMediaRepository import com.android.systemui.communal.data.repository.FakeCommunalRepository import com.android.systemui.communal.data.repository.FakeCommunalTutorialRepository import com.android.systemui.communal.data.repository.FakeCommunalWidgetRepository +import com.android.systemui.communal.widgets.EditWidgetsActivityStarter import com.android.systemui.keyguard.data.repository.FakeKeyguardRepository import com.android.systemui.keyguard.domain.interactor.KeyguardInteractor import com.android.systemui.smartspace.data.repository.FakeSmartspaceRepository @@ -40,6 +41,7 @@ object CommunalInteractorFactory { smartspaceRepository: FakeSmartspaceRepository = FakeSmartspaceRepository(), tutorialRepository: FakeCommunalTutorialRepository = FakeCommunalTutorialRepository(), appWidgetHost: AppWidgetHost = mock(), + editWidgetsActivityStarter: EditWidgetsActivityStarter = mock(), ): WithDependencies { val withDeps = CommunalTutorialInteractorFactory.create( @@ -57,6 +59,7 @@ object CommunalInteractorFactory { withDeps.keyguardInteractor, withDeps.communalTutorialInteractor, appWidgetHost, + editWidgetsActivityStarter, CommunalInteractor( communalRepository, widgetRepository, @@ -64,6 +67,7 @@ object CommunalInteractorFactory { smartspaceRepository, withDeps.communalTutorialInteractor, appWidgetHost, + editWidgetsActivityStarter, ), ) } @@ -78,6 +82,7 @@ object CommunalInteractorFactory { val keyguardInteractor: KeyguardInteractor, val tutorialInteractor: CommunalTutorialInteractor, val appWidgetHost: AppWidgetHost, + val editWidgetsActivityStarter: EditWidgetsActivityStarter, val communalInteractor: CommunalInteractor, ) } diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/flags/FeatureFlagsKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/flags/FeatureFlagsKosmos.kt new file mode 100644 index 000000000000..a78076338c79 --- /dev/null +++ b/packages/SystemUI/tests/utils/src/com/android/systemui/flags/FeatureFlagsKosmos.kt @@ -0,0 +1,21 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.systemui.flags + +import com.android.systemui.kosmos.Kosmos + +val Kosmos.featureFlags by Kosmos.Fixture { FakeFeatureFlagsClassic() } diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/data/repository/FakeKeyguardTransitionRepository.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/data/repository/FakeKeyguardTransitionRepository.kt index 3674244926e8..a94ca291298d 100644 --- a/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/data/repository/FakeKeyguardTransitionRepository.kt +++ b/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/data/repository/FakeKeyguardTransitionRepository.kt @@ -40,7 +40,7 @@ import kotlinx.coroutines.test.runCurrent class FakeKeyguardTransitionRepository @Inject constructor() : KeyguardTransitionRepository { private val _transitions = - MutableSharedFlow<TransitionStep>(replay = 1, onBufferOverflow = BufferOverflow.DROP_OLDEST) + MutableSharedFlow<TransitionStep>(replay = 2, onBufferOverflow = BufferOverflow.DROP_OLDEST) override val transitions: SharedFlow<TransitionStep> = _transitions init { @@ -130,7 +130,7 @@ class FakeKeyguardTransitionRepository @Inject constructor() : KeyguardTransitio * only a FINISHED step, override [validateStep]. */ suspend fun sendTransitionStep(step: TransitionStep, validateStep: Boolean = true) { - _transitions.replayCache.getOrNull(0)?.let { lastStep -> + _transitions.replayCache.last().let { lastStep -> if ( validateStep && step.transitionState == TransitionState.FINISHED && diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/domain/interactor/KeyguardDismissInteractorFactory.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/domain/interactor/KeyguardDismissInteractorFactory.kt index fc34903e8a1d..6c2ce7139375 100644 --- a/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/domain/interactor/KeyguardDismissInteractorFactory.kt +++ b/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/domain/interactor/KeyguardDismissInteractorFactory.kt @@ -20,6 +20,7 @@ import android.content.Context import android.os.Handler import com.android.keyguard.KeyguardSecurityModel import com.android.keyguard.KeyguardUpdateMonitor +import com.android.systemui.biometrics.data.repository.FakeFingerprintPropertyRepository import com.android.systemui.bouncer.data.repository.FakeKeyguardBouncerRepository import com.android.systemui.bouncer.domain.interactor.AlternateBouncerInteractor import com.android.systemui.bouncer.domain.interactor.PrimaryBouncerCallbackInteractor @@ -86,9 +87,11 @@ object KeyguardDismissInteractorFactory { mock(StatusBarStateController::class.java), mock(KeyguardStateController::class.java), bouncerRepository, + FakeFingerprintPropertyRepository(), FakeBiometricSettingsRepository(), FakeSystemClock(), keyguardUpdateMonitor, + testScope.backgroundScope, ) val powerInteractorWithDeps = PowerInteractorFactory.create( diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/kosmos/GeneralKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/kosmos/GeneralKosmos.kt index cc843b536756..b05915c4f678 100644 --- a/packages/SystemUI/tests/utils/src/com/android/systemui/kosmos/GeneralKosmos.kt +++ b/packages/SystemUI/tests/utils/src/com/android/systemui/kosmos/GeneralKosmos.kt @@ -1,8 +1,16 @@ package com.android.systemui.kosmos +import android.content.Context +import android.os.UserManager import com.android.systemui.kosmos.Kosmos.Fixture +import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.test.StandardTestDispatcher import kotlinx.coroutines.test.TestScope +import org.mockito.Mockito -val Kosmos.testDispatcher by Fixture { StandardTestDispatcher() } -val Kosmos.testScope by Fixture { TestScope(testDispatcher) } +var Kosmos.testDispatcher by Fixture { StandardTestDispatcher() } +var Kosmos.testScope by Fixture { TestScope(testDispatcher) } +var Kosmos.context by Fixture<Context>() +var Kosmos.lifecycleScope by Fixture<CoroutineScope>() + +val Kosmos.userManager by Fixture { Mockito.mock(UserManager::class.java) } diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/scene/SceneTestUtils.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/scene/SceneTestUtils.kt index 29e73b548b0b..da6ba7bcfd7f 100644 --- a/packages/SystemUI/tests/utils/src/com/android/systemui/scene/SceneTestUtils.kt +++ b/packages/SystemUI/tests/utils/src/com/android/systemui/scene/SceneTestUtils.kt @@ -63,6 +63,7 @@ import com.android.systemui.keyguard.data.repository.FakeKeyguardRepository import com.android.systemui.keyguard.data.repository.FakeTrustRepository import com.android.systemui.keyguard.data.repository.KeyguardRepository import com.android.systemui.keyguard.data.repository.TrustRepository +import com.android.systemui.keyguard.domain.interactor.KeyguardFaceAuthInteractor import com.android.systemui.keyguard.domain.interactor.KeyguardInteractor import com.android.systemui.kosmos.Kosmos import com.android.systemui.kosmos.testDispatcher @@ -258,12 +259,14 @@ class SceneTestUtils( fun bouncerInteractor( authenticationInteractor: AuthenticationInteractor, + keyguardFaceAuthInteractor: KeyguardFaceAuthInteractor = mock(), ): BouncerInteractor { return BouncerInteractor( applicationScope = applicationScope(), applicationContext = context, repository = bouncerRepository, authenticationInteractor = authenticationInteractor, + keyguardFaceAuthInteractor = keyguardFaceAuthInteractor, flags = sceneContainerFlags, falsingInteractor = falsingInteractor(), powerInteractor = powerInteractor(), diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/shade/data/repository/FakeShadeRepository.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/shade/data/repository/FakeShadeRepository.kt index 02318abe8488..92ec4f22001b 100644 --- a/packages/SystemUI/tests/utils/src/com/android/systemui/shade/data/repository/FakeShadeRepository.kt +++ b/packages/SystemUI/tests/utils/src/com/android/systemui/shade/data/repository/FakeShadeRepository.kt @@ -66,6 +66,15 @@ class FakeShadeRepository @Inject constructor() : ShadeRepository { _legacyIsQsExpanded.value = legacyIsQsExpanded } + private val _legacyExpandImmediate = MutableStateFlow(false) + @Deprecated("Use ShadeInteractor instead") + override val legacyExpandImmediate = _legacyExpandImmediate + + @Deprecated("Use ShadeInteractor instead") + override fun setLegacyExpandImmediate(legacyExpandImmediate: Boolean) { + _legacyExpandImmediate.value = legacyExpandImmediate + } + @Deprecated("Use ShadeInteractor instead") override fun setLegacyExpandedOrAwaitingInputTransfer( legacyExpandedOrAwaitingInputTransfer: Boolean @@ -88,6 +97,14 @@ class FakeShadeRepository @Inject constructor() : ShadeRepository { legacyLockscreenShadeTracking.value = tracking } + private val _legacyQsFullscreen = MutableStateFlow(false) + @Deprecated("Use ShadeInteractor instead") override val legacyQsFullscreen = _legacyQsFullscreen + + @Deprecated("Use ShadeInteractor instead") + override fun setLegacyQsFullscreen(legacyQsFullscreen: Boolean) { + _legacyQsFullscreen.value = legacyQsFullscreen + } + fun setShadeModel(model: ShadeModel) { _shadeModel.value = model } diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/user/data/repository/UserRepositoryKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/user/data/repository/UserRepositoryKosmos.kt new file mode 100644 index 000000000000..8bce9b6d461d --- /dev/null +++ b/packages/SystemUI/tests/utils/src/com/android/systemui/user/data/repository/UserRepositoryKosmos.kt @@ -0,0 +1,21 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.systemui.user.data.repository + +import com.android.systemui.kosmos.Kosmos + +val Kosmos.userRepository by Kosmos.Fixture { FakeUserRepository() } diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/user/domain/interactor/GuestUserInteractorKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/user/domain/interactor/GuestUserInteractorKosmos.kt new file mode 100644 index 000000000000..e69570433d43 --- /dev/null +++ b/packages/SystemUI/tests/utils/src/com/android/systemui/user/domain/interactor/GuestUserInteractorKosmos.kt @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.systemui.user.domain.interactor + +import com.android.systemui.kosmos.Kosmos +import com.android.systemui.kosmos.context +import com.android.systemui.kosmos.lifecycleScope +import com.android.systemui.kosmos.testDispatcher +import com.android.systemui.kosmos.userManager +import com.android.systemui.user.data.repository.userRepository +import com.android.systemui.util.mockito.mock + +val Kosmos.guestUserInteractor by + Kosmos.Fixture { + GuestUserInteractor( + applicationContext = context, + applicationScope = lifecycleScope, + mainDispatcher = testDispatcher, + backgroundDispatcher = testDispatcher, + manager = userManager, + deviceProvisionedController = mock(), + repository = userRepository, + devicePolicyManager = mock(), + refreshUsersScheduler = refreshUsersScheduler, + uiEventLogger = mock(), + resumeSessionReceiver = mock(), + resetOrExitSessionReceiver = mock(), + ) + } diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/user/domain/interactor/RefreshUsersSchedulerKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/user/domain/interactor/RefreshUsersSchedulerKosmos.kt new file mode 100644 index 000000000000..87a2fe0249e3 --- /dev/null +++ b/packages/SystemUI/tests/utils/src/com/android/systemui/user/domain/interactor/RefreshUsersSchedulerKosmos.kt @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.systemui.user.domain.interactor + +import com.android.systemui.kosmos.Kosmos +import com.android.systemui.kosmos.lifecycleScope +import com.android.systemui.kosmos.testDispatcher +import com.android.systemui.user.data.repository.userRepository + +val Kosmos.refreshUsersScheduler by + Kosmos.Fixture { + RefreshUsersScheduler( + applicationScope = lifecycleScope, + mainDispatcher = testDispatcher, + repository = userRepository, + ) + } diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/user/domain/interactor/UserSwitcherInteractorKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/user/domain/interactor/UserSwitcherInteractorKosmos.kt new file mode 100644 index 000000000000..6d6b2683a7ea --- /dev/null +++ b/packages/SystemUI/tests/utils/src/com/android/systemui/user/domain/interactor/UserSwitcherInteractorKosmos.kt @@ -0,0 +1,57 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.systemui.user.domain.interactor + +import com.android.systemui.broadcast.broadcastDispatcher +import com.android.systemui.flags.featureFlags +import com.android.systemui.keyguard.domain.interactor.KeyguardInteractorFactory +import com.android.systemui.kosmos.Kosmos +import com.android.systemui.kosmos.context +import com.android.systemui.kosmos.lifecycleScope +import com.android.systemui.kosmos.testDispatcher +import com.android.systemui.kosmos.userManager +import com.android.systemui.telephony.data.repository.FakeTelephonyRepository +import com.android.systemui.telephony.domain.interactor.TelephonyInteractor +import com.android.systemui.user.data.repository.userRepository +import com.android.systemui.util.mockito.mock + +val Kosmos.userSwitcherInteractor by + Kosmos.Fixture { + UserSwitcherInteractor( + applicationContext = context, + repository = userRepository, + activityStarter = mock(), + keyguardInteractor = + KeyguardInteractorFactory.create(featureFlags = featureFlags).keyguardInteractor, + featureFlags = featureFlags, + manager = userManager, + headlessSystemUserMode = mock(), + applicationScope = lifecycleScope, + telephonyInteractor = + TelephonyInteractor( + repository = FakeTelephonyRepository(), + ), + broadcastDispatcher = broadcastDispatcher, + keyguardUpdateMonitor = mock(), + backgroundDispatcher = testDispatcher, + activityManager = mock(), + refreshUsersScheduler = refreshUsersScheduler, + guestUserInteractor = guestUserInteractor, + uiEventLogger = mock(), + userRestrictionChecker = mock() + ) + } diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/util/FakeEventLog.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/util/FakeEventLog.kt new file mode 100644 index 000000000000..ea2eeabf72eb --- /dev/null +++ b/packages/SystemUI/tests/utils/src/com/android/systemui/util/FakeEventLog.kt @@ -0,0 +1,55 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.systemui.util + +/** A fake [com.android.systemui.util.EventLog] for tests. */ +class FakeEventLog : EventLog { + data class Event(val tag: Int, val value: Any) + + private val _events: MutableList<Event> = mutableListOf() + val events: List<Event> + get() = _events + + fun clear() { + _events.clear() + } + + override fun writeEvent(tag: Int, value: Int): Int { + _events.add(Event(tag, value)) + return 1 + } + + override fun writeEvent(tag: Int, value: Long): Int { + _events.add(Event(tag, value)) + return 1 + } + + override fun writeEvent(tag: Int, value: Float): Int { + _events.add(Event(tag, value)) + return 1 + } + + override fun writeEvent(tag: Int, value: String): Int { + _events.add(Event(tag, value)) + return 1 + } + + override fun writeEvent(tag: Int, vararg values: Any): Int { + _events.add(Event(tag, values)) + return 1 + } +} diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/util/settings/FakeGlobalSettings.java b/packages/SystemUI/tests/utils/src/com/android/systemui/util/settings/FakeGlobalSettings.java index db5eaffee76b..beabaf5f5954 100644 --- a/packages/SystemUI/tests/utils/src/com/android/systemui/util/settings/FakeGlobalSettings.java +++ b/packages/SystemUI/tests/utils/src/com/android/systemui/util/settings/FakeGlobalSettings.java @@ -38,7 +38,9 @@ public class FakeGlobalSettings implements GlobalSettings { @Override public ContentResolver getContentResolver() { - return null; + throw new UnsupportedOperationException( + "GlobalSettings.getContentResolver is not implemented, but you may find " + + "GlobalSettings.registerContentObserver helpful instead."); } @Override diff --git a/ravenwood/Android.bp b/ravenwood/Android.bp index fc4ed1d4d527..b9e34ee97f21 100644 --- a/ravenwood/Android.bp +++ b/ravenwood/Android.bp @@ -33,3 +33,10 @@ java_library { ], visibility: ["//visibility:public"], } + +java_host_for_device { + name: "core-xml-for-device", + libs: [ + "core-xml-for-host", + ], +} diff --git a/ravenwood/framework-minus-apex-ravenwood-policies.txt b/ravenwood/framework-minus-apex-ravenwood-policies.txt index 692d598ac2bb..aa2d470d7d9c 100644 --- a/ravenwood/framework-minus-apex-ravenwood-policies.txt +++ b/ravenwood/framework-minus-apex-ravenwood-policies.txt @@ -103,7 +103,33 @@ class android.os.TransactionTooLargeException stubclass # Containers class android.os.BaseBundle stubclass class android.os.Bundle stubclass +class android.os.PersistableBundle stubclass # Misc class android.os.PatternMatcher stubclass class android.os.ParcelUuid stubclass + +# XML +class com.android.internal.util.XmlPullParserWrapper stubclass +class com.android.internal.util.XmlSerializerWrapper stubclass +class com.android.internal.util.XmlUtils stubclass + +class com.android.modules.utils.BinaryXmlPullParser stubclass +class com.android.modules.utils.BinaryXmlSerializer stubclass +class com.android.modules.utils.FastDataInput stubclass +class com.android.modules.utils.FastDataOutput stubclass +class com.android.modules.utils.ModifiedUtf8 stubclass +class com.android.modules.utils.TypedXmlPullParser stubclass +class com.android.modules.utils.TypedXmlSerializer stubclass + +# Uri +class android.net.Uri stubclass +class android.net.UriCodec stubclass + +# Context: just enough to support wrapper, no further functionality +class android.content.Context stub + method <init> ()V stub + +# Text +class android.text.TextUtils stub + method isEmpty (Ljava/lang/CharSequence;)Z stub diff --git a/ravenwood/junit-src/android/platform/test/annotations/IgnoreUnderRavenwood.java b/ravenwood/junit-src/android/platform/test/annotations/IgnoreUnderRavenwood.java index 0aac084dd4ce..edb0442e7b29 100644 --- a/ravenwood/junit-src/android/platform/test/annotations/IgnoreUnderRavenwood.java +++ b/ravenwood/junit-src/android/platform/test/annotations/IgnoreUnderRavenwood.java @@ -22,12 +22,30 @@ import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** - * THIS ANNOTATION IS EXPERIMENTAL. REACH OUT TO g/ravenwood BEFORE USING IT, OR YOU HAVE ANY - * QUESTIONS ABOUT IT. + * Test methods marked with this annotation are quietly ignored when running under a Ravenwood test + * environment. The test continues to execute normally under all other non-Ravenwood test + * environments. + * + * This annotation only takes effect when the containing class has a {@code + * RavenwoodRule} configured. Ignoring is accomplished by throwing an {@code org.junit + * .AssumptionViolatedException} which test infrastructure treats as being ignored. + * + * Developers are encouraged to use either the {@code blockedBy} and/or {@code reason} arguments + * to document why a test is being ignored, to aid in future audits of tests that are candidates + * to be enabled. * * @hide */ @Target(ElementType.METHOD) @Retention(RetentionPolicy.RUNTIME) public @interface IgnoreUnderRavenwood { + /** + * One or more classes that aren't yet supported by Ravenwood, which this test depends on. + */ + Class<?>[] blockedBy() default {}; + + /** + * General free-form description of why this test is being ignored. + */ + String reason() default ""; } diff --git a/ravenwood/ravenwood-annotation-allowed-classes.txt b/ravenwood/ravenwood-annotation-allowed-classes.txt index 776a19a68a31..128155cc63df 100644 --- a/ravenwood/ravenwood-annotation-allowed-classes.txt +++ b/ravenwood/ravenwood-annotation-allowed-classes.txt @@ -2,8 +2,36 @@ com.android.internal.util.ArrayUtils +android.util.Xml + android.os.Binder android.os.Binder$IdentitySupplier android.os.IBinder android.os.Process android.os.SystemClock +android.os.UserHandle + +android.content.ClipData +android.content.ClipData$Item +android.content.ClipDescription +android.content.ComponentName +android.content.ContentUris +android.content.ContentValues +android.content.Intent +android.content.IntentFilter +android.content.UriMatcher + +android.database.AbstractCursor +android.database.CharArrayBuffer +android.database.ContentObservable +android.database.ContentObserver +android.database.Cursor +android.database.CursorIndexOutOfBoundsException +android.database.CursorJoiner +android.database.CursorWrapper +android.database.DataSetObservable +android.database.DataSetObserver +android.database.MatrixCursor +android.database.MatrixCursor$RowBuilder +android.database.MergeCursor +android.database.Observable diff --git a/services/accessibility/java/com/android/server/accessibility/magnification/WindowMagnificationConnectionWrapper.java b/services/accessibility/java/com/android/server/accessibility/magnification/MagnificationConnectionWrapper.java index 6c6394faa09c..f0c44d64f5ec 100644 --- a/services/accessibility/java/com/android/server/accessibility/magnification/WindowMagnificationConnectionWrapper.java +++ b/services/accessibility/java/com/android/server/accessibility/magnification/MagnificationConnectionWrapper.java @@ -35,15 +35,15 @@ import com.android.server.accessibility.AccessibilityTraceManager; /** * A wrapper of {@link IWindowMagnificationConnection}. */ -class WindowMagnificationConnectionWrapper { +class MagnificationConnectionWrapper { private static final boolean DBG = false; - private static final String TAG = "WindowMagnificationConnectionWrapper"; + private static final String TAG = "MagnificationConnectionWrapper"; private final @NonNull IWindowMagnificationConnection mConnection; private final @NonNull AccessibilityTraceManager mTrace; - WindowMagnificationConnectionWrapper(@NonNull IWindowMagnificationConnection connection, + MagnificationConnectionWrapper(@NonNull IWindowMagnificationConnection connection, @NonNull AccessibilityTraceManager trace) { mConnection = connection; mTrace = trace; diff --git a/services/accessibility/java/com/android/server/accessibility/magnification/WindowMagnificationManager.java b/services/accessibility/java/com/android/server/accessibility/magnification/WindowMagnificationManager.java index 816f22f8c7b0..3ea805bbb4a6 100644 --- a/services/accessibility/java/com/android/server/accessibility/magnification/WindowMagnificationManager.java +++ b/services/accessibility/java/com/android/server/accessibility/magnification/WindowMagnificationManager.java @@ -60,7 +60,7 @@ import java.lang.annotation.RetentionPolicy; import java.util.concurrent.atomic.AtomicLongFieldUpdater; /** - * A class to manipulate window magnification through {@link WindowMagnificationConnectionWrapper} + * A class to manipulate window magnification through {@link MagnificationConnectionWrapper} * create by {@link #setConnection(IWindowMagnificationConnection)}. To set the connection with * SysUI, call {@code StatusBarManagerInternal#requestWindowMagnificationConnection(boolean)}. * The applied magnification scale is constrained by @@ -133,7 +133,7 @@ public class WindowMagnificationManager implements @VisibleForTesting @GuardedBy("mLock") @Nullable - WindowMagnificationConnectionWrapper mConnectionWrapper; + MagnificationConnectionWrapper mConnectionWrapper; @GuardedBy("mLock") private ConnectionCallback mConnectionCallback; @GuardedBy("mLock") @@ -245,7 +245,7 @@ public class WindowMagnificationManager implements } } if (connection != null) { - mConnectionWrapper = new WindowMagnificationConnectionWrapper(connection, mTrace); + mConnectionWrapper = new MagnificationConnectionWrapper(connection, mTrace); } if (mConnectionWrapper != null) { diff --git a/services/backup/Android.bp b/services/backup/Android.bp index b086406a2ad5..acb5911c8868 100644 --- a/services/backup/Android.bp +++ b/services/backup/Android.bp @@ -19,5 +19,16 @@ java_library_static { defaults: ["platform_service_defaults"], srcs: [":services.backup-sources"], libs: ["services.core"], - static_libs: ["app-compat-annotations"], + static_libs: ["app-compat-annotations", "backup_flags_lib"], +} + +aconfig_declarations { + name: "backup_flags", + package: "com.android.server.backup", + srcs: ["flags.aconfig"], +} + +java_aconfig_library { + name: "backup_flags_lib", + aconfig_declarations: "backup_flags", } diff --git a/services/backup/flags.aconfig b/services/backup/flags.aconfig new file mode 100644 index 000000000000..d695d36db0ea --- /dev/null +++ b/services/backup/flags.aconfig @@ -0,0 +1,10 @@ +package: "com.android.server.backup" + +flag { + name: "enable_skipping_restore_launched_apps" + namespace: "onboarding" + description: "Enforce behavior determined by BackupTransport implementation on whether to skip " + "restore for apps that have been launched." + bug: "308401499" + is_fixed_read_only: true +}
\ No newline at end of file diff --git a/services/backup/java/com/android/server/backup/restore/ActiveRestoreSession.java b/services/backup/java/com/android/server/backup/restore/ActiveRestoreSession.java index 70d7fac09a4f..9f7b62763ed3 100644 --- a/services/backup/java/com/android/server/backup/restore/ActiveRestoreSession.java +++ b/services/backup/java/com/android/server/backup/restore/ActiveRestoreSession.java @@ -24,6 +24,7 @@ import static com.android.server.backup.internal.BackupHandler.MSG_RUN_RESTORE; import android.annotation.NonNull; import android.annotation.Nullable; +import android.app.backup.BackupAgent; import android.app.backup.BackupAnnotations.BackupDestination; import android.app.backup.IBackupManagerMonitor; import android.app.backup.IRestoreObserver; @@ -32,11 +33,15 @@ import android.app.backup.RestoreSet; import android.content.pm.PackageInfo; import android.content.pm.PackageManager; import android.content.pm.PackageManager.NameNotFoundException; +import android.content.pm.PackageManagerInternal; import android.os.Binder; import android.os.Handler; import android.os.Message; import android.util.Slog; +import com.android.internal.annotations.VisibleForTesting; +import com.android.server.LocalServices; +import com.android.server.backup.Flags; import com.android.server.backup.TransportManager; import com.android.server.backup.UserBackupManagerService; import com.android.server.backup.internal.OnTaskFinishedListener; @@ -296,12 +301,26 @@ public class ActiveRestoreSession extends IRestoreSession.Stub { return -1; } - private BackupEligibilityRules getBackupEligibilityRules(RestoreSet restoreSet) { + @VisibleForTesting + BackupEligibilityRules getBackupEligibilityRules(RestoreSet restoreSet) { // TODO(b/182986784): Remove device name comparison once a designated field for operation // type is added to RestoreSet object. int backupDestination = DEVICE_NAME_FOR_D2D_SET.equals(restoreSet.device) ? BackupDestination.DEVICE_TRANSFER : BackupDestination.CLOUD; - return mBackupManagerService.getEligibilityRulesForOperation(backupDestination); + + if (!Flags.enableSkippingRestoreLaunchedApps()) { + return mBackupManagerService.getEligibilityRulesForOperation(backupDestination); + } + + boolean skipRestoreForLaunchedApps = (restoreSet.backupTransportFlags + & BackupAgent.FLAG_SKIP_RESTORE_FOR_LAUNCHED_APPS) != 0; + + return new BackupEligibilityRules(mBackupManagerService.getPackageManager(), + LocalServices.getService(PackageManagerInternal.class), + mUserId, + mBackupManagerService.getContext(), + backupDestination, + skipRestoreForLaunchedApps); } public synchronized int restorePackage(String packageName, IRestoreObserver observer, diff --git a/services/backup/java/com/android/server/backup/restore/PerformUnifiedRestoreTask.java b/services/backup/java/com/android/server/backup/restore/PerformUnifiedRestoreTask.java index bbec79d6cd47..96a873ecc217 100644 --- a/services/backup/java/com/android/server/backup/restore/PerformUnifiedRestoreTask.java +++ b/services/backup/java/com/android/server/backup/restore/PerformUnifiedRestoreTask.java @@ -63,6 +63,7 @@ import com.android.server.backup.BackupAgentTimeoutParameters; import com.android.server.backup.BackupAndRestoreFeatureFlags; import com.android.server.backup.BackupRestoreTask; import com.android.server.backup.BackupUtils; +import com.android.server.backup.Flags; import com.android.server.backup.OperationStorage; import com.android.server.backup.OperationStorage.OpType; import com.android.server.backup.PackageManagerBackupAgent; @@ -263,7 +264,14 @@ public class PerformUnifiedRestoreTask implements BackupRestoreTask { continue; } - if (backupEligibilityRules.appIsEligibleForBackup(info.applicationInfo)) { + + ApplicationInfo applicationInfo = info.applicationInfo; + if (backupEligibilityRules.appIsEligibleForBackup(applicationInfo)) { + if (Flags.enableSkippingRestoreLaunchedApps() + && !backupEligibilityRules.isAppEligibleForRestore(applicationInfo)) { + continue; + } + mAcceptSet.add(info); } } catch (NameNotFoundException e) { diff --git a/services/backup/java/com/android/server/backup/utils/BackupEligibilityRules.java b/services/backup/java/com/android/server/backup/utils/BackupEligibilityRules.java index 7c47f1e477b6..f24a3c1afc86 100644 --- a/services/backup/java/com/android/server/backup/utils/BackupEligibilityRules.java +++ b/services/backup/java/com/android/server/backup/utils/BackupEligibilityRules.java @@ -80,6 +80,7 @@ public class BackupEligibilityRules { private final int mUserId; private boolean mIsProfileUser = false; @BackupDestination private final int mBackupDestination; + private final boolean mSkipRestoreForLaunchedApps; /** * When this change is enabled, {@code adb backup} is automatically turned on for apps @@ -112,12 +113,23 @@ public class BackupEligibilityRules { int userId, Context context, @BackupDestination int backupDestination) { + this(packageManager, packageManagerInternal, userId, context, backupDestination, + /* skipRestoreForLaunchedApps */ false); + } + + public BackupEligibilityRules(PackageManager packageManager, + PackageManagerInternal packageManagerInternal, + int userId, + Context context, + @BackupDestination int backupDestination, + boolean skipRestoreForLaunchedApps) { mPackageManager = packageManager; mPackageManagerInternal = packageManagerInternal; mUserId = userId; mBackupDestination = backupDestination; UserManager userManager = context.getSystemService(UserManager.class); mIsProfileUser = userManager.isProfile(); + mSkipRestoreForLaunchedApps = skipRestoreForLaunchedApps; } /** @@ -132,6 +144,9 @@ public class BackupEligibilityRules { * <li>it is the special shared-storage backup package used for 'adb backup' * </ol> * + * These eligibility conditions are also checked before restore, in case the backup happened on + * a device / from the version of the app where these rules were not enforced. + * * However, the above eligibility rules are ignored for non-system apps in in case of * device-to-device migration, see {@link BackupDestination}. */ @@ -283,6 +298,27 @@ public class BackupEligibilityRules { } } + /** + * Determine if data restore should be run for the given package. + * + * <p>This is used in combination with {@link #appIsEligibleForBackup(ApplicationInfo)} that + * checks whether the backup being restored should have happened in the first place.</p> + */ + public boolean isAppEligibleForRestore(ApplicationInfo app) { + if (!mSkipRestoreForLaunchedApps) { + return true; + } + + // If an app implemented a BackupAgent, they are expected to handle being restored even + // after first launch and avoid conflicts between existing app data and restored data. + if (app.backupAgentName != null) { + return true; + } + + // Otherwise only restore an app if it hasn't been launched before. + return !mPackageManagerInternal.wasPackageEverLaunched(app.packageName, mUserId); + } + /** Avoid backups of 'disabled' apps. */ @VisibleForTesting boolean appIsDisabled( diff --git a/services/core/Android.bp b/services/core/Android.bp index 22693ab328c8..49457fbb94f5 100644 --- a/services/core/Android.bp +++ b/services/core/Android.bp @@ -199,7 +199,7 @@ java_library_static { "biometrics_flags_lib", "am_flags_lib", "com_android_wm_shell_flags_lib", - "android.app.flags-aconfig-java" + "service-jobscheduler-deviceidle.flags-aconfig-java", ], javac_shard_size: 50, javacflags: [ diff --git a/services/core/java/android/content/pm/PackageManagerInternal.java b/services/core/java/android/content/pm/PackageManagerInternal.java index 4b004340f923..7e4cf4f35132 100644 --- a/services/core/java/android/content/pm/PackageManagerInternal.java +++ b/services/core/java/android/content/pm/PackageManagerInternal.java @@ -1421,6 +1421,11 @@ public abstract class PackageManagerInternal { @UserIdInt int userId); /** + * Checks if package is stopped for a specific user. + */ + public abstract boolean isPackageStopped(@NonNull String packageName, @UserIdInt int userId); + + /** * Sends the PACKAGE_RESTARTED broadcast. */ public abstract void sendPackageRestartedBroadcast(@NonNull String packageName, diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java index f92af6780883..b2a794865a48 100644 --- a/services/core/java/com/android/server/am/ActivityManagerService.java +++ b/services/core/java/com/android/server/am/ActivityManagerService.java @@ -9367,6 +9367,8 @@ public class ActivityManagerService extends IActivityManager.Stub */ void appendDropBoxProcessHeaders(ProcessRecord process, String processName, final VolatileDropboxEntryStates volatileStates, final StringBuilder sb) { + sb.append("SystemUptimeMs: ").append(SystemClock.uptimeMillis()).append("\n"); + // Watchdog thread ends up invoking this function (with // a null ProcessRecord) to add the stack file to dropbox. // Do not acquire a lock on this (am) in such cases, as it diff --git a/services/core/java/com/android/server/am/ActivityManagerShellCommand.java b/services/core/java/com/android/server/am/ActivityManagerShellCommand.java index a95ddf38e659..9d8f979e883c 100644 --- a/services/core/java/com/android/server/am/ActivityManagerShellCommand.java +++ b/services/core/java/com/android/server/am/ActivityManagerShellCommand.java @@ -4157,7 +4157,7 @@ final class ActivityManagerShellCommand extends ShellCommand { pw.println(" -D: enable debugging"); pw.println(" --suspend: debugged app suspend threads at startup (only with -D)"); pw.println(" -N: enable native debugging"); - pw.println(" -W: wait for launch to complete"); + pw.println(" -W: wait for launch to complete (initial display)"); pw.println(" --start-profiler <FILE>: start profiler and send results to <FILE>"); pw.println(" --sampling INTERVAL: use sample profiling with INTERVAL microseconds"); pw.println(" between samples (use with --start-profiler)"); diff --git a/services/core/java/com/android/server/am/BatteryStatsService.java b/services/core/java/com/android/server/am/BatteryStatsService.java index f9fc4d4f27fa..36356bd95128 100644 --- a/services/core/java/com/android/server/am/BatteryStatsService.java +++ b/services/core/java/com/android/server/am/BatteryStatsService.java @@ -111,6 +111,7 @@ import com.android.internal.util.DumpUtils; import com.android.internal.util.FrameworkStatsLog; import com.android.internal.util.ParseUtils; import com.android.internal.util.function.pooled.PooledLambda; +import com.android.modules.utils.build.SdkLevel; import com.android.net.module.util.NetworkCapabilitiesUtils; import com.android.server.LocalServices; import com.android.server.Watchdog; @@ -475,7 +476,12 @@ public final class BatteryStatsService extends IBatteryStats.Stub ServiceManager.getService(Context.NETWORKMANAGEMENT_SERVICE)); final ConnectivityManager cm = mContext.getSystemService(ConnectivityManager.class); try { - nms.registerObserver(mActivityChangeObserver); + if (!SdkLevel.isAtLeastV()) { + // On V+ devices, ConnectivityService calls BatteryStats API to update + // RadioPowerState change. So BatteryStatsService registers the callback only on + // pre V devices. + nms.registerObserver(mActivityChangeObserver); + } cm.registerDefaultNetworkCallback(mNetworkCallback); } catch (RemoteException e) { Slog.e(TAG, "Could not register INetworkManagement event observer " + e); diff --git a/services/core/java/com/android/server/am/OomAdjuster.java b/services/core/java/com/android/server/am/OomAdjuster.java index ddccce5963b3..b30334632b55 100644 --- a/services/core/java/com/android/server/am/OomAdjuster.java +++ b/services/core/java/com/android/server/am/OomAdjuster.java @@ -1829,7 +1829,7 @@ public class OomAdjuster { // screen on or animating, promote UI state.setCurProcState(ActivityManager.PROCESS_STATE_PERSISTENT_UI); state.setCurrentSchedulingGroup(SCHED_GROUP_TOP_APP); - } else { + } else if (!app.getWindowProcessController().isShowingUiWhileDozing()) { // screen off, restrict UI scheduling state.setCurProcState(PROCESS_STATE_BOUND_FOREGROUND_SERVICE); state.setCurrentSchedulingGroup(SCHED_GROUP_RESTRICTED); diff --git a/services/core/java/com/android/server/am/SettingsToPropertiesMapper.java b/services/core/java/com/android/server/am/SettingsToPropertiesMapper.java index 599d99854b26..028be88fd3ac 100644 --- a/services/core/java/com/android/server/am/SettingsToPropertiesMapper.java +++ b/services/core/java/com/android/server/am/SettingsToPropertiesMapper.java @@ -144,6 +144,7 @@ public class SettingsToPropertiesMapper { "haptics", "hardware_backed_security_mainline", "input", + "lse_desktop_experience", "machine_learning", "mainline_modularization", "mainline_sdk", diff --git a/services/core/java/com/android/server/appop/AppOpsCheckingServiceImpl.java b/services/core/java/com/android/server/appop/AppOpsCheckingServiceImpl.java index 108f53ff4485..0ee7d9cdd3d4 100644 --- a/services/core/java/com/android/server/appop/AppOpsCheckingServiceImpl.java +++ b/services/core/java/com/android/server/appop/AppOpsCheckingServiceImpl.java @@ -305,26 +305,6 @@ public class AppOpsCheckingServiceImpl implements AppOpsCheckingServiceInterface } @Override - public boolean areUidModesDefault(int uid) { - synchronized (mLock) { - SparseIntArray opModes = mUidModes.get(uid); - return (opModes == null || opModes.size() <= 0); - } - } - - @Override - public boolean arePackageModesDefault(@NonNull String packageName, @UserIdInt int userId) { - synchronized (mLock) { - ArrayMap<String, SparseIntArray> packageModes = mUserPackageModes.get(userId, null); - if (packageModes == null) { - return true; - } - SparseIntArray opModes = packageModes.get(packageName); - return (opModes == null || opModes.size() <= 0); - } - } - - @Override public boolean removePackage(String packageName, @UserIdInt int userId) { synchronized (mLock) { ArrayMap<String, SparseIntArray> packageModes = mUserPackageModes.get(userId, null); diff --git a/services/core/java/com/android/server/appop/AppOpsCheckingServiceInterface.java b/services/core/java/com/android/server/appop/AppOpsCheckingServiceInterface.java index 60d17cd388f6..f6e6bc0be8fa 100644 --- a/services/core/java/com/android/server/appop/AppOpsCheckingServiceInterface.java +++ b/services/core/java/com/android/server/appop/AppOpsCheckingServiceInterface.java @@ -124,21 +124,6 @@ public interface AppOpsCheckingServiceInterface { void removeUid(int uid); /** - * Returns true if all uid modes for this uid are - * in default state. - * @param uid user id - */ - boolean areUidModesDefault(int uid); - - /** - * Returns true if all package modes for this package name are - * in default state. - * @param packageName package name. - * @param userId user id associated with the package. - */ - boolean arePackageModesDefault(String packageName, @UserIdInt int userId); - - /** * Stop tracking app-op modes for all uid and packages. */ void clearAllModes(); diff --git a/services/core/java/com/android/server/appop/AppOpsCheckingServiceLoggingDecorator.java b/services/core/java/com/android/server/appop/AppOpsCheckingServiceLoggingDecorator.java index 3fee59bd1c2f..ccdf3a5baa7b 100644 --- a/services/core/java/com/android/server/appop/AppOpsCheckingServiceLoggingDecorator.java +++ b/services/core/java/com/android/server/appop/AppOpsCheckingServiceLoggingDecorator.java @@ -111,19 +111,6 @@ public class AppOpsCheckingServiceLoggingDecorator implements AppOpsCheckingServ } @Override - public boolean areUidModesDefault(int uid) { - Log.i(LOG_TAG, "areUidModesDefault(uid = " + uid + ")"); - return mService.areUidModesDefault(uid); - } - - @Override - public boolean arePackageModesDefault(String packageName, int userId) { - Log.i(LOG_TAG, "arePackageModesDefault(packageName = " + packageName + ", userId = " - + userId + ")"); - return mService.arePackageModesDefault(packageName, userId); - } - - @Override public void clearAllModes() { Log.i(LOG_TAG, "clearAllModes()"); mService.clearAllModes(); diff --git a/services/core/java/com/android/server/appop/AppOpsCheckingServiceTracingDecorator.java b/services/core/java/com/android/server/appop/AppOpsCheckingServiceTracingDecorator.java index c0cc8b176613..c3a02a84a277 100644 --- a/services/core/java/com/android/server/appop/AppOpsCheckingServiceTracingDecorator.java +++ b/services/core/java/com/android/server/appop/AppOpsCheckingServiceTracingDecorator.java @@ -168,28 +168,6 @@ public class AppOpsCheckingServiceTracingDecorator implements AppOpsCheckingServ } @Override - public boolean areUidModesDefault(int uid) { - Trace.traceBegin(TRACE_TAG, - "TaggedTracingAppOpsCheckingServiceInterfaceImpl#areUidModesDefault"); - try { - return mService.areUidModesDefault(uid); - } finally { - Trace.traceEnd(TRACE_TAG); - } - } - - @Override - public boolean arePackageModesDefault(String packageName, @UserIdInt int userId) { - Trace.traceBegin(TRACE_TAG, - "TaggedTracingAppOpsCheckingServiceInterfaceImpl#arePackageModesDefault"); - try { - return mService.arePackageModesDefault(packageName, userId); - } finally { - Trace.traceEnd(TRACE_TAG); - } - } - - @Override public void clearAllModes() { Trace.traceBegin(TRACE_TAG, "TaggedTracingAppOpsCheckingServiceInterfaceImpl#clearAllModes"); diff --git a/services/core/java/com/android/server/appop/AppOpsService.java b/services/core/java/com/android/server/appop/AppOpsService.java index 7292ea6b19cb..613416c0bbad 100644 --- a/services/core/java/com/android/server/appop/AppOpsService.java +++ b/services/core/java/com/android/server/appop/AppOpsService.java @@ -223,6 +223,12 @@ public class AppOpsService extends IAppOpsService.Stub { // Constant meaning that any UID should be matched when dispatching callbacks private static final int UID_ANY = -2; + private static final int[] ADB_NON_SETTABLE_APP_IDS = { + Process.ROOT_UID, + Process.SYSTEM_UID, + Process.SHELL_UID, + }; + private static final int[] OPS_RESTRICTED_ON_SUSPEND = { OP_PLAY_AUDIO, OP_RECORD_AUDIO, @@ -531,19 +537,6 @@ public class AppOpsService extends IAppOpsService.Stub { } } - // Functions for uid mode access and manipulation. - public SparseIntArray getNonDefaultUidModes() { - return mAppOpsCheckingService.getNonDefaultUidModes(uid); - } - - public int getUidMode(int op) { - return mAppOpsCheckingService.getUidMode(uid, op); - } - - public boolean setUidMode(int op, int mode) { - return mAppOpsCheckingService.setUidMode(uid, op, mode); - } - @SuppressWarnings("GuardedBy") int evalMode(int op, int mode) { return getUidStateTracker().evalMode(uid, op, mode); @@ -613,15 +606,6 @@ public class AppOpsService extends IAppOpsService.Stub { this.packageName = packageName; } - @Mode int getMode() { - return mAppOpsCheckingService.getPackageMode(packageName, this.op, - UserHandle.getUserId(this.uid)); - } - void setMode(@Mode int mode) { - mAppOpsCheckingService.setPackageMode(packageName, this.op, mode, - UserHandle.getUserId(this.uid)); - } - void removeAttributionsWithNoTime() { for (int i = mAttributions.size() - 1; i >= 0; i--) { if (!mAttributions.valueAt(i).hasAnyTime()) { @@ -653,7 +637,11 @@ public class AppOpsService extends IAppOpsService.Stub { mAttributions.valueAt(i).createAttributedOpEntryLocked()); } - return new OpEntry(op, getMode(), attributionEntries); + return new OpEntry( + op, + mAppOpsCheckingService.getPackageMode( + this.packageName, this.op, UserHandle.getUserId(this.uid)), + attributionEntries); } @NonNull OpEntry createSingleAttributionEntryLocked(@Nullable String attributionTag) { @@ -668,7 +656,11 @@ public class AppOpsService extends IAppOpsService.Stub { } } - return new OpEntry(op, getMode(), attributionEntries); + return new OpEntry( + op, + mAppOpsCheckingService.getPackageMode( + this.packageName, this.op, UserHandle.getUserId(this.uid)), + attributionEntries); } boolean isRunning() { @@ -1384,8 +1376,10 @@ public class AppOpsService extends IAppOpsService.Stub { } final int code = foregroundOps.keyAt(fgi); - if (uidState.getUidMode(code) != AppOpsManager.opToDefaultMode(code) - && uidState.getUidMode(code) == AppOpsManager.MODE_FOREGROUND) { + if (mAppOpsCheckingService.getUidMode(uidState.uid, code) + != AppOpsManager.opToDefaultMode(code) + && mAppOpsCheckingService.getUidMode(uidState.uid, code) + == AppOpsManager.MODE_FOREGROUND) { mHandler.sendMessage(PooledLambda.obtainMessage( AppOpsService::notifyOpChangedForAllPkgsInUid, this, code, uidState.uid, true)); @@ -1405,7 +1399,11 @@ public class AppOpsService extends IAppOpsService.Stub { if (op == null) { continue; } - if (op.getMode() == AppOpsManager.MODE_FOREGROUND) { + if (mAppOpsCheckingService.getPackageMode( + op.packageName, + op.op, + UserHandle.getUserId(op.uid)) + == AppOpsManager.MODE_FOREGROUND) { mHandler.sendMessage(PooledLambda.obtainMessage( AppOpsService::notifyOpChanged, this, listenerSet.valueAt(cbi), code, uidState.uid, @@ -1497,7 +1495,7 @@ public class AppOpsService extends IAppOpsService.Stub { @Nullable private ArrayList<AppOpsManager.OpEntry> collectUidOps(@NonNull UidState uidState, @Nullable int[] ops) { - final SparseIntArray opModes = uidState.getNonDefaultUidModes(); + final SparseIntArray opModes = mAppOpsCheckingService.getNonDefaultUidModes(uidState.uid); if (opModes == null) { return null; } @@ -1778,7 +1776,11 @@ public class AppOpsService extends IAppOpsService.Stub { Ops ops = getOpsLocked(uid, packageName, null, false, null, /* edit */ false); if (ops != null) { ops.remove(op.op); - op.setMode(AppOpsManager.opToDefaultMode(op.op)); + mAppOpsCheckingService.setPackageMode( + packageName, + op.op, + AppOpsManager.opToDefaultMode(op.op), + UserHandle.getUserId(op.uid)); if (ops.size() <= 0) { UidState uidState = ops.uidState; ArrayMap<String, Ops> pkgOps = uidState.pkgOps; @@ -1848,15 +1850,16 @@ public class AppOpsService extends IAppOpsService.Stub { uidState = new UidState(uid); mUidStates.put(uid, uidState); } - if (uidState.getUidMode(code) != AppOpsManager.opToDefaultMode(code)) { - previousMode = uidState.getUidMode(code); + if (mAppOpsCheckingService.getUidMode(uidState.uid, code) + != AppOpsManager.opToDefaultMode(code)) { + previousMode = mAppOpsCheckingService.getUidMode(uidState.uid, code); } else { // doesn't look right but is legacy behavior. previousMode = MODE_DEFAULT; } mIgnoredCallback = permissionPolicyCallback; - if (!uidState.setUidMode(code, mode)) { + if (!mAppOpsCheckingService.setUidMode(uidState.uid, code, mode)) { return; } if (mode != MODE_ERRORED && mode != previousMode) { @@ -2133,10 +2136,15 @@ public class AppOpsService extends IAppOpsService.Stub { synchronized (this) { Op op = getOpLocked(code, uid, packageName, null, false, pvr.bypass, /* edit */ true); if (op != null) { - if (op.getMode() != mode) { - previousMode = op.getMode(); + if (mAppOpsCheckingService.getPackageMode( + op.packageName, op.op, UserHandle.getUserId(op.uid)) + != mode) { + previousMode = + mAppOpsCheckingService.getPackageMode( + op.packageName, op.op, UserHandle.getUserId(op.uid)); mIgnoredCallback = permissionPolicyCallback; - op.setMode(mode); + mAppOpsCheckingService.setPackageMode(op.packageName, op.op, mode, + UserHandle.getUserId(op.uid)); } } } @@ -2274,7 +2282,7 @@ public class AppOpsService extends IAppOpsService.Stub { for (int i = mUidStates.size() - 1; i >= 0; i--) { UidState uidState = mUidStates.valueAt(i); - SparseIntArray opModes = uidState.getNonDefaultUidModes(); + SparseIntArray opModes = mAppOpsCheckingService.getNonDefaultUidModes(uidState.uid); if (opModes != null && (uidState.uid == reqUid || reqUid == -1)) { final int uidOpCount = opModes.size(); for (int j = uidOpCount - 1; j >= 0; j--) { @@ -2283,7 +2291,7 @@ public class AppOpsService extends IAppOpsService.Stub { int previousMode = opModes.valueAt(j); int newMode = isUidOpGrantedByRole(uidState.uid, code) ? MODE_ALLOWED : AppOpsManager.opToDefaultMode(code); - uidState.setUidMode(code, newMode); + mAppOpsCheckingService.setUidMode(uidState.uid, code, newMode); for (String packageName : getPackagesForUid(uidState.uid)) { callbacks = addCallbacks(callbacks, code, uidState.uid, packageName, previousMode, mOpModeWatchers.get(code)); @@ -2325,14 +2333,22 @@ public class AppOpsService extends IAppOpsService.Stub { continue; } if (AppOpsManager.opAllowsReset(curOp.op)) { - int previousMode = curOp.getMode(); + int previousMode = + mAppOpsCheckingService.getPackageMode( + curOp.packageName, + curOp.op, + UserHandle.getUserId(curOp.uid)); int newMode = isPackageOpGrantedByRole(packageName, uidState.uid, curOp.op) ? MODE_ALLOWED : AppOpsManager.opToDefaultMode( curOp.op); if (previousMode == newMode) { continue; } - curOp.setMode(newMode); + mAppOpsCheckingService.setPackageMode( + curOp.packageName, + curOp.op, + newMode, + UserHandle.getUserId(curOp.uid)); changed = true; uidChanged = true; final int uid = curOp.uidState.uid; @@ -2592,15 +2608,22 @@ public class AppOpsService extends IAppOpsService.Stub { code = AppOpsManager.opToSwitch(code); UidState uidState = getUidStateLocked(uid, false); if (uidState != null - && uidState.getUidMode(code) != AppOpsManager.opToDefaultMode(code)) { - final int rawMode = uidState.getUidMode(code); + && mAppOpsCheckingService.getUidMode(uidState.uid, code) + != AppOpsManager.opToDefaultMode(code)) { + final int rawMode = mAppOpsCheckingService.getUidMode(uidState.uid, code); return raw ? rawMode : uidState.evalMode(code, rawMode); } Op op = getOpLocked(code, uid, packageName, null, false, pvr.bypass, /* edit */ false); if (op == null) { return AppOpsManager.opToDefaultMode(code); } - return raw ? op.getMode() : op.uidState.evalMode(op.op, op.getMode()); + return raw + ? mAppOpsCheckingService.getPackageMode( + op.packageName, op.op, UserHandle.getUserId(op.uid)) + : op.uidState.evalMode( + op.op, + mAppOpsCheckingService.getPackageMode( + op.packageName, op.op, UserHandle.getUserId(op.uid))); } } @@ -2836,8 +2859,11 @@ public class AppOpsService extends IAppOpsService.Stub { } // If there is a non-default per UID policy (we set UID op mode only if // non-default) it takes over, otherwise use the per package policy. - if (uidState.getUidMode(switchCode) != AppOpsManager.opToDefaultMode(switchCode)) { - final int uidMode = uidState.evalMode(code, uidState.getUidMode(switchCode)); + if (mAppOpsCheckingService.getUidMode(uidState.uid, switchCode) + != AppOpsManager.opToDefaultMode(switchCode)) { + final int uidMode = + uidState.evalMode( + code, mAppOpsCheckingService.getUidMode(uidState.uid, switchCode)); if (uidMode != AppOpsManager.MODE_ALLOWED) { if (DEBUG) Slog.d(TAG, "noteOperation: uid reject #" + uidMode + " for code " + switchCode + " (" + code + ") uid " + uid + " package " @@ -2850,7 +2876,13 @@ public class AppOpsService extends IAppOpsService.Stub { } else { final Op switchOp = switchCode != code ? getOpLocked(ops, switchCode, uid, true) : op; - final int mode = switchOp.uidState.evalMode(switchOp.op, switchOp.getMode()); + final int mode = + switchOp.uidState.evalMode( + switchOp.op, + mAppOpsCheckingService.getPackageMode( + switchOp.packageName, + switchOp.op, + UserHandle.getUserId(switchOp.uid))); if (mode != AppOpsManager.MODE_ALLOWED) { if (DEBUG) Slog.d(TAG, "noteOperation: reject #" + mode + " for code " + switchCode + " (" + code + ") uid " + uid + " package " @@ -3372,8 +3404,11 @@ public class AppOpsService extends IAppOpsService.Stub { final int switchCode = AppOpsManager.opToSwitch(code); // If there is a non-default per UID policy (we set UID op mode only if // non-default) it takes over, otherwise use the per package policy. - if (uidState.getUidMode(switchCode) != AppOpsManager.opToDefaultMode(switchCode)) { - final int uidMode = uidState.evalMode(code, uidState.getUidMode(switchCode)); + if (mAppOpsCheckingService.getUidMode(uidState.uid, switchCode) + != AppOpsManager.opToDefaultMode(switchCode)) { + final int uidMode = + uidState.evalMode( + code, mAppOpsCheckingService.getUidMode(uidState.uid, switchCode)); if (!shouldStartForMode(uidMode, startIfModeDefault)) { if (DEBUG) { Slog.d(TAG, "startOperation: uid reject #" + uidMode + " for code " @@ -3388,7 +3423,13 @@ public class AppOpsService extends IAppOpsService.Stub { } else { final Op switchOp = switchCode != code ? getOpLocked(ops, switchCode, uid, true) : op; - final int mode = switchOp.uidState.evalMode(switchOp.op, switchOp.getMode()); + final int mode = + switchOp.uidState.evalMode( + switchOp.op, + mAppOpsCheckingService.getPackageMode( + switchOp.packageName, + switchOp.op, + UserHandle.getUserId(switchOp.uid))); if (mode != AppOpsManager.MODE_ALLOWED && (!startIfModeDefault || mode != MODE_DEFAULT)) { if (DEBUG) Slog.d(TAG, "startOperation: reject #" + mode + " for code " @@ -3478,8 +3519,11 @@ public class AppOpsService extends IAppOpsService.Stub { final int switchCode = AppOpsManager.opToSwitch(code); // If there is a non-default mode per UID policy (we set UID op mode only if // non-default) it takes over, otherwise use the per package policy. - if (uidState.getUidMode(switchCode) != AppOpsManager.opToDefaultMode(switchCode)) { - final int uidMode = uidState.evalMode(code, uidState.getUidMode(switchCode)); + if (mAppOpsCheckingService.getUidMode(uidState.uid, switchCode) + != AppOpsManager.opToDefaultMode(switchCode)) { + final int uidMode = + uidState.evalMode( + code, mAppOpsCheckingService.getUidMode(uidState.uid, switchCode)); if (!shouldStartForMode(uidMode, startIfModeDefault)) { if (DEBUG) { Slog.d(TAG, "startOperation: uid reject #" + uidMode + " for code " @@ -3491,7 +3535,13 @@ public class AppOpsService extends IAppOpsService.Stub { } else { final Op switchOp = switchCode != code ? getOpLocked(ops, switchCode, uid, true) : op; - final int mode = switchOp.uidState.evalMode(switchOp.op, switchOp.getMode()); + final int mode = + switchOp.uidState.evalMode( + switchOp.op, + mAppOpsCheckingService.getPackageMode( + switchOp.packageName, + switchOp.op, + UserHandle.getUserId(switchOp.uid))); if (mode != AppOpsManager.MODE_ALLOWED && (!startIfModeDefault || mode != MODE_DEFAULT)) { if (DEBUG) { @@ -4891,17 +4941,32 @@ public class AppOpsService extends IAppOpsService.Stub { } if (!shell.targetsUid && shell.packageName != null) { + if (ArrayUtils.contains(ADB_NON_SETTABLE_APP_IDS, + UserHandle.getAppId(shell.packageUid))) { + err.println("Error: Cannot set app ops for uid " + shell.packageUid); + return -1; + } shell.mInterface.setMode(shell.op, shell.packageUid, shell.packageName, mode); } else if (shell.targetsUid && shell.packageName != null) { try { final int uid = shell.mInternal.mContext.getPackageManager() .getPackageUidAsUser(shell.packageName, shell.userId); + if (ArrayUtils.contains(ADB_NON_SETTABLE_APP_IDS, + UserHandle.getAppId(uid))) { + err.println("Error: Cannot set app ops for uid " + uid); + return -1; + } shell.mInterface.setUidMode(shell.op, uid, mode); } catch (PackageManager.NameNotFoundException e) { return -1; } } else { + if (ArrayUtils.contains(ADB_NON_SETTABLE_APP_IDS, + UserHandle.getAppId(shell.nonpackageUid))) { + err.println("Error: Cannot set app ops for uid " + shell.nonpackageUid); + return -1; + } shell.mInterface.setUidMode(shell.op, shell.nonpackageUid, mode); } return 0; @@ -5620,7 +5685,8 @@ public class AppOpsService extends IAppOpsService.Stub { } for (int i=0; i<mUidStates.size(); i++) { UidState uidState = mUidStates.valueAt(i); - final SparseIntArray opModes = uidState.getNonDefaultUidModes(); + final SparseIntArray opModes = + mAppOpsCheckingService.getNonDefaultUidModes(uidState.uid); final ArrayMap<String, Ops> pkgOps = uidState.pkgOps; if (dumpWatchers || dumpHistory) { @@ -5648,7 +5714,12 @@ public class AppOpsService extends IAppOpsService.Stub { } if (!hasMode) { for (int opi = 0; !hasMode && opi < ops.size(); opi++) { - if (ops.valueAt(opi).getMode() == dumpMode) { + final Op op = ops.valueAt(opi); + if (mAppOpsCheckingService.getPackageMode( + op.packageName, + op.op, + UserHandle.getUserId(op.uid)) + == dumpMode) { hasMode = true; } } @@ -5699,7 +5770,12 @@ public class AppOpsService extends IAppOpsService.Stub { if (dumpOp >= 0 && dumpOp != opCode) { continue; } - if (dumpMode >= 0 && dumpMode != op.getMode()) { + if (dumpMode >= 0 + && dumpMode + != mAppOpsCheckingService.getPackageMode( + op.packageName, + op.op, + UserHandle.getUserId(op.uid))) { continue; } if (!printedPackage) { @@ -5707,14 +5783,25 @@ public class AppOpsService extends IAppOpsService.Stub { printedPackage = true; } pw.print(" "); pw.print(AppOpsManager.opToName(opCode)); - pw.print(" ("); pw.print(AppOpsManager.modeToName(op.getMode())); + pw.print(" ("); + pw.print( + AppOpsManager.modeToName( + mAppOpsCheckingService.getPackageMode( + op.packageName, + op.op, + UserHandle.getUserId(op.uid)))); final int switchOp = AppOpsManager.opToSwitch(opCode); if (switchOp != opCode) { pw.print(" / switch "); pw.print(AppOpsManager.opToName(switchOp)); final Op switchObj = ops.get(switchOp); - int mode = switchObj == null - ? AppOpsManager.opToDefaultMode(switchOp) : switchObj.getMode(); + int mode = + switchObj == null + ? AppOpsManager.opToDefaultMode(switchOp) + : mAppOpsCheckingService.getPackageMode( + switchObj.packageName, + switchObj.op, + UserHandle.getUserId(switchObj.uid)); pw.print("="); pw.print(AppOpsManager.modeToName(mode)); } pw.println("): "); @@ -5848,7 +5935,13 @@ public class AppOpsService extends IAppOpsService.Stub { for (int pkgNum = 0; pkgNum < numPkgOps; pkgNum++) { Ops ops = uidState.pkgOps.valueAt(pkgNum); Op op = ops != null ? ops.get(code) : null; - if (op == null || (op.getMode() != MODE_ALLOWED && op.getMode() != MODE_FOREGROUND)) { + if (op == null) { + continue; + } + final int mode = + mAppOpsCheckingService.getPackageMode( + op.packageName, op.op, UserHandle.getUserId(op.uid)); + if (mode != MODE_ALLOWED && mode != MODE_FOREGROUND) { continue; } int numAttrTags = op.mAttributions.size(); diff --git a/services/core/java/com/android/server/appop/AppOpsServiceTestingShim.java b/services/core/java/com/android/server/appop/AppOpsServiceTestingShim.java index de73a5514792..98e6476e9707 100644 --- a/services/core/java/com/android/server/appop/AppOpsServiceTestingShim.java +++ b/services/core/java/com/android/server/appop/AppOpsServiceTestingShim.java @@ -149,30 +149,6 @@ public class AppOpsServiceTestingShim implements AppOpsCheckingServiceInterface } @Override - public boolean areUidModesDefault(int uid) { - boolean oldVal = mOldImplementation.areUidModesDefault(uid); - boolean newVal = mNewImplementation.areUidModesDefault(uid); - - if (oldVal != newVal) { - signalImplDifference("areUidModesDefault"); - } - - return newVal; - } - - @Override - public boolean arePackageModesDefault(String packageName, int userId) { - boolean oldVal = mOldImplementation.arePackageModesDefault(packageName, userId); - boolean newVal = mNewImplementation.arePackageModesDefault(packageName, userId); - - if (oldVal != newVal) { - signalImplDifference("arePackageModesDefault"); - } - - return newVal; - } - - @Override public void clearAllModes() { mOldImplementation.clearAllModes(); mNewImplementation.clearAllModes(); diff --git a/services/core/java/com/android/server/connectivity/Vpn.java b/services/core/java/com/android/server/connectivity/Vpn.java index a12243b8e4fa..b0abf94ba525 100644 --- a/services/core/java/com/android/server/connectivity/Vpn.java +++ b/services/core/java/com/android/server/connectivity/Vpn.java @@ -2621,8 +2621,9 @@ public class Vpn { * * Callers are responsible for checking permissions if needed. */ - public void startLegacyVpnPrivileged(VpnProfile profile, + public void startLegacyVpnPrivileged(VpnProfile profileToStart, @Nullable Network underlying, @NonNull LinkProperties egress) { + final VpnProfile profile = profileToStart.clone(); UserInfo user = mUserManager.getUserInfo(mUserId); if (user.isRestricted() || mUserManager.hasUserRestriction(UserManager.DISALLOW_CONFIG_VPN, new UserHandle(mUserId))) { @@ -3385,6 +3386,13 @@ public class Vpn { * given network to start a new IKE session. */ private void startOrMigrateIkeSession(@Nullable Network underlyingNetwork) { + synchronized (Vpn.this) { + // Ignore stale runner. + if (mVpnRunner != this) return; + setVpnNetworkPreference(mSessionKey, + createUserAndRestrictedProfilesRanges(mUserId, + mConfig.allowedApplications, mConfig.disallowedApplications)); + } if (underlyingNetwork == null) { // For null underlyingNetwork case, there will not be a NetworkAgent available so // no underlying network update is necessary here. Note that updating @@ -3905,6 +3913,7 @@ public class Vpn { updateState(DetailedState.FAILED, exception.getMessage()); } + clearVpnNetworkPreference(mSessionKey); disconnectVpnRunner(); } @@ -4039,6 +4048,13 @@ public class Vpn { } resetIkeState(); + if (errorCode != VpnManager.ERROR_CODE_NETWORK_LOST + // Clear the VPN network preference when the retry delay is higher than 5s. + // mRetryCount was increased when scheduleRetryNewIkeSession() is called, + // therefore use mRetryCount - 1 here. + && mDeps.getNextRetryDelayMs(mRetryCount - 1) > 5_000L) { + clearVpnNetworkPreference(mSessionKey); + } } /** @@ -4085,13 +4101,17 @@ public class Vpn { mCarrierConfigManager.unregisterCarrierConfigChangeListener( mCarrierConfigChangeListener); mConnectivityManager.unregisterNetworkCallback(mNetworkCallback); - clearVpnNetworkPreference(mSessionKey); mExecutor.shutdown(); } @Override public void exitVpnRunner() { + // mSessionKey won't be changed since the Ikev2VpnRunner is created, so it's ok to use + // it outside the mExecutor. And clearing the VPN network preference here can prevent + // the case that the VPN network preference isn't cleared when Ikev2VpnRunner became + // stale. + clearVpnNetworkPreference(mSessionKey); try { mExecutor.execute(() -> { disconnectVpnRunner(); diff --git a/services/core/java/com/android/server/content/ContentService.java b/services/core/java/com/android/server/content/ContentService.java index 1b48e3ce5946..9f4b3d256b1e 100644 --- a/services/core/java/com/android/server/content/ContentService.java +++ b/services/core/java/com/android/server/content/ContentService.java @@ -1058,7 +1058,8 @@ public final class ContentService extends IContentService.Stub { final long identityToken = clearCallingIdentity(); try { - return getSyncManager().computeSyncable(account, userId, providerName, false); + return getSyncManager().computeSyncable(account, userId, providerName, false, + /*checkStoppedState=*/ false); } finally { restoreCallingIdentity(identityToken); } diff --git a/services/core/java/com/android/server/content/SyncJobService.java b/services/core/java/com/android/server/content/SyncJobService.java index 1da7f0c059b0..cd3f0f0ca5b2 100644 --- a/services/core/java/com/android/server/content/SyncJobService.java +++ b/services/core/java/com/android/server/content/SyncJobService.java @@ -19,6 +19,7 @@ package com.android.server.content; import android.annotation.Nullable; import android.app.job.JobParameters; import android.app.job.JobService; +import android.content.pm.PackageManagerInternal; import android.os.Message; import android.os.SystemClock; import android.util.Log; @@ -28,6 +29,7 @@ import android.util.SparseBooleanArray; import android.util.SparseLongArray; import com.android.internal.annotations.GuardedBy; +import com.android.server.LocalServices; public class SyncJobService extends JobService { private static final String TAG = "SyncManager"; @@ -97,6 +99,20 @@ public class SyncJobService extends JobService { return true; } + // TODO(b/209852664): remove this logic from here once it's added within JobScheduler. + // JobScheduler should not call onStartJob for syncs whose source packages are stopped. + // Until JS adds the relevant logic, this is a temporary solution to keep deferring syncs + // for packages in the stopped state. + if (android.content.pm.Flags.stayStopped()) { + if (LocalServices.getService(PackageManagerInternal.class) + .isPackageStopped(op.owningPackage, op.target.userId)) { + if (Log.isLoggable(TAG, Log.DEBUG)) { + Slog.d(TAG, "Skipping sync for force-stopped package: " + op.owningPackage); + } + return false; + } + } + boolean isLoggable = Log.isLoggable(TAG, Log.VERBOSE); synchronized (sLock) { final int jobId = params.getJobId(); diff --git a/services/core/java/com/android/server/content/SyncManager.java b/services/core/java/com/android/server/content/SyncManager.java index ac7d9c171247..575b30946fce 100644 --- a/services/core/java/com/android/server/content/SyncManager.java +++ b/services/core/java/com/android/server/content/SyncManager.java @@ -438,6 +438,23 @@ public class SyncManager { } }; + private final BroadcastReceiver mForceStoppedReceiver = new BroadcastReceiver() { + @Override + public void onReceive(Context context, Intent intent) { + final boolean isLoggable = Log.isLoggable(TAG, Log.DEBUG); + // For now, just log when packages were force-stopped and unstopped for debugging. + if (isLoggable) { + if (Intent.ACTION_PACKAGE_RESTARTED.equals(intent.getAction())) { + Log.d(TAG, "Package force-stopped: " + + intent.getData().getSchemeSpecificPart()); + } else if (Intent.ACTION_PACKAGE_UNSTOPPED.equals(intent.getAction())) { + Log.d(TAG, "Package unstopped: " + + intent.getData().getSchemeSpecificPart()); + } + } + } + }; + private final HandlerThread mThread; private final SyncHandler mSyncHandler; private final SyncManagerConstants mConstants; @@ -701,6 +718,12 @@ public class SyncManager { mContext.registerReceiverAsUser( mUserIntentReceiver, UserHandle.ALL, intentFilter, null, null); + intentFilter = new IntentFilter(); + intentFilter.addAction(Intent.ACTION_PACKAGE_RESTARTED); + intentFilter.addAction(Intent.ACTION_PACKAGE_UNSTOPPED); + intentFilter.addDataScheme("package"); + context.registerReceiver(mForceStoppedReceiver, intentFilter); + intentFilter = new IntentFilter(Intent.ACTION_TIME_CHANGED); context.registerReceiver(mOtherIntentsReceiver, intentFilter); @@ -1108,7 +1131,7 @@ public class SyncManager { for (String authority : syncableAuthorities) { int isSyncable = computeSyncable(account.account, account.userId, authority, - !checkIfAccountReady); + !checkIfAccountReady, /*checkStoppedState=*/ true); if (isSyncable == AuthorityInfo.NOT_SYNCABLE) { continue; @@ -1228,7 +1251,7 @@ public class SyncManager { } public int computeSyncable(Account account, int userId, String authority, - boolean checkAccountAccess) { + boolean checkAccountAccess, boolean checkStoppedState) { final int status = getIsSyncable(account, userId, authority); if (status == AuthorityInfo.NOT_SYNCABLE) { return AuthorityInfo.NOT_SYNCABLE; @@ -1241,6 +1264,9 @@ public class SyncManager { } final int owningUid = syncAdapterInfo.uid; final String owningPackage = syncAdapterInfo.componentName.getPackageName(); + if (checkStoppedState && isPackageStopped(owningPackage, userId)) { + return AuthorityInfo.NOT_SYNCABLE; + } if (mAmi.isAppStartModeDisabled(owningUid, owningPackage)) { Slog.w(TAG, "Not scheduling job " + syncAdapterInfo.uid + ":" + syncAdapterInfo.componentName @@ -1256,6 +1282,17 @@ public class SyncManager { return status; } + /** + * Returns whether the package is in a stopped state or not. + * Always returns {@code false} if the {@code android.content.pm.stay_stopped} flag is not set. + */ + private boolean isPackageStopped(String packageName, int userId) { + if (android.content.pm.Flags.stayStopped()) { + return mPackageManagerInternal.isPackageStopped(packageName, userId); + } + return false; + } + private boolean canAccessAccount(Account account, String packageName, int uid) { if (mAccountManager.hasAccountAccess(account, packageName, UserHandle.getUserHandleForUid(uid))) { @@ -3496,6 +3533,9 @@ public class SyncManager { for (SyncOperation op: ops) { if (op.isPeriodic && op.target.matchesSpec(target) && op.areExtrasEqual(extras, /*includeSyncSettings=*/ true)) { + if (isPackageStopped(op.owningPackage, target.userId)) { + continue; // skip stopped package + } maybeUpdateSyncPeriodH(op, pollFrequencyMillis, flexMillis); return; } @@ -3627,7 +3667,8 @@ public class SyncManager { } } // Drop this sync request if it isn't syncable. - state = computeSyncable(target.account, target.userId, target.provider, true); + state = computeSyncable(target.account, target.userId, target.provider, true, + /*checkStoppedState=*/ true); if (state == AuthorityInfo.SYNCABLE_NO_ACCOUNT_ACCESS) { if (isLoggable) { Slog.v(TAG, " Dropping sync operation: " diff --git a/services/core/java/com/android/server/display/ColorFade.java b/services/core/java/com/android/server/display/ColorFade.java index 3de188f08fb1..93d9b8d30a2e 100644 --- a/services/core/java/com/android/server/display/ColorFade.java +++ b/services/core/java/com/android/server/display/ColorFade.java @@ -411,6 +411,33 @@ final class ColorFade { } /** + * Destroys ColorFade animation and its resources + * + * This method should be called when the ColorFade is no longer in use; i.e. when + * the {@link #mDisplayId display} has been removed. + */ + public void destroy() { + if (DEBUG) { + Slog.d(TAG, "destroy"); + } + if (mPrepared) { + if (mCreatedResources) { + attachEglContext(); + try { + destroyScreenshotTexture(); + destroyGLShaders(); + destroyGLBuffers(); + destroyEglSurface(); + } finally { + detachEglContext(); + } + } + destroyEglContext(); + destroySurface(); + } + } + + /** * Draws an animation frame showing the color fade activated at the * specified level. * @@ -793,6 +820,12 @@ final class ColorFade { } } + private void destroyEglContext() { + if (mEglDisplay != null && mEglContext != null) { + EGL14.eglDestroyContext(mEglDisplay, mEglContext); + } + } + private static FloatBuffer createNativeFloatBuffer(int size) { ByteBuffer bb = ByteBuffer.allocateDirect(size * 4); bb.order(ByteOrder.nativeOrder()); diff --git a/services/core/java/com/android/server/display/DisplayDeviceConfig.java b/services/core/java/com/android/server/display/DisplayDeviceConfig.java index a0beedb1aa64..b99de5cc0c7b 100644 --- a/services/core/java/com/android/server/display/DisplayDeviceConfig.java +++ b/services/core/java/com/android/server/display/DisplayDeviceConfig.java @@ -71,7 +71,7 @@ import com.android.server.display.config.RefreshRateThrottlingPoint; import com.android.server.display.config.RefreshRateZone; import com.android.server.display.config.SdrHdrRatioMap; import com.android.server.display.config.SdrHdrRatioPoint; -import com.android.server.display.config.SensorDetails; +import com.android.server.display.config.SensorData; import com.android.server.display.config.ThermalStatus; import com.android.server.display.config.ThermalThrottling; import com.android.server.display.config.ThresholdPoint; @@ -349,6 +349,20 @@ import javax.xml.datatype.DatatypeConfigurationException; * <proxSensor> * <type>android.sensor.proximity</type> * <name>1234 Proximity Sensor</name> + * <refreshRate> + * <minimum>60</minimum> + * <maximum>60</maximum> + * </refreshRate> + * <supportedModes> + * <point> + * <first>60</first> // refreshRate + * <second>60</second> //vsyncRate + * </point> + * <point> + * <first>120</first> // refreshRate + * <second>120</second> //vsyncRate + * </point> + * </supportedModes> * </proxSensor> * * <ambientLightHorizonLong>10001</ambientLightHorizonLong> @@ -581,15 +595,15 @@ public class DisplayDeviceConfig { private final Context mContext; // The details of the ambient light sensor associated with this display. - private final SensorData mAmbientLightSensor = new SensorData(); + private SensorData mAmbientLightSensor; // The details of the doze brightness sensor associated with this display. - private final SensorData mScreenOffBrightnessSensor = new SensorData(); + private SensorData mScreenOffBrightnessSensor; // The details of the proximity sensor associated with this display. // Is null when no sensor should be used for that display @Nullable - private SensorData mProximitySensor = new SensorData(); + private SensorData mProximitySensor; private final List<RefreshRateLimitation> mRefreshRateLimitations = new ArrayList<>(2 /*initialCapacity*/); @@ -1913,9 +1927,10 @@ public class DisplayDeviceConfig { loadLuxThrottling(config); loadQuirks(config); loadBrightnessRamps(config); - loadAmbientLightSensorFromDdc(config); - loadScreenOffBrightnessSensorFromDdc(config); - loadProxSensorFromDdc(config); + mAmbientLightSensor = SensorData.loadAmbientLightSensorConfig(config, + mContext.getResources()); + mScreenOffBrightnessSensor = SensorData.loadScreenOffBrightnessSensorConfig(config); + mProximitySensor = SensorData.loadProxSensorConfig(config); loadAmbientHorizonFromDdc(config); loadBrightnessChangeThresholds(config); loadAutoBrightnessConfigValues(config); @@ -1940,9 +1955,9 @@ public class DisplayDeviceConfig { loadBrightnessConstraintsFromConfigXml(); loadBrightnessMapFromConfigXml(); loadBrightnessRampsFromConfigXml(); - loadAmbientLightSensorFromConfigXml(); + mAmbientLightSensor = SensorData.loadAmbientLightSensorConfig(mContext.getResources()); + mProximitySensor = SensorData.loadSensorUnspecifiedConfig(); loadBrightnessChangeThresholdsFromXml(); - setProxSensorUnspecified(); loadAutoBrightnessConfigsFromConfigXml(); loadAutoBrightnessAvailableFromConfigXml(); loadRefreshRateSetting(null); @@ -1966,8 +1981,8 @@ public class DisplayDeviceConfig { mBrightnessRampDecreaseMaxIdleMillis = 0; mBrightnessRampIncreaseMaxIdleMillis = 0; setSimpleMappingStrategyValues(); - loadAmbientLightSensorFromConfigXml(); - setProxSensorUnspecified(); + mAmbientLightSensor = SensorData.loadAmbientLightSensorConfig(mContext.getResources()); + mProximitySensor = SensorData.loadSensorUnspecifiedConfig(); loadAutoBrightnessAvailableFromConfigXml(); } @@ -2919,64 +2934,10 @@ public class DisplayDeviceConfig { mBrightnessRampSlowDecrease = mBrightnessRampSlowIncrease; } - private void loadAmbientLightSensorFromConfigXml() { - mAmbientLightSensor.name = ""; - mAmbientLightSensor.type = mContext.getResources().getString( - com.android.internal.R.string.config_displayLightSensorType); - } - private void loadAutoBrightnessConfigsFromConfigXml() { loadAutoBrightnessDisplayBrightnessMapping(null /*AutoBrightnessConfig*/); } - private void loadAmbientLightSensorFromDdc(DisplayConfiguration config) { - final SensorDetails sensorDetails = config.getLightSensor(); - if (sensorDetails != null) { - loadSensorData(sensorDetails, mAmbientLightSensor); - } else { - loadAmbientLightSensorFromConfigXml(); - } - } - - private void setProxSensorUnspecified() { - mProximitySensor = new SensorData(); - } - - private void loadScreenOffBrightnessSensorFromDdc(DisplayConfiguration config) { - final SensorDetails sensorDetails = config.getScreenOffBrightnessSensor(); - if (sensorDetails != null) { - loadSensorData(sensorDetails, mScreenOffBrightnessSensor); - } - } - - private void loadProxSensorFromDdc(DisplayConfiguration config) { - SensorDetails sensorDetails = config.getProxSensor(); - if (sensorDetails != null) { - String name = sensorDetails.getName(); - String type = sensorDetails.getType(); - if ("".equals(name) && "".equals(type)) { - // <proxSensor> with empty values to the config means no sensor should be used - mProximitySensor = null; - } else { - mProximitySensor = new SensorData(); - loadSensorData(sensorDetails, mProximitySensor); - } - } else { - setProxSensorUnspecified(); - } - } - - private void loadSensorData(@NonNull SensorDetails sensorDetails, - @NonNull SensorData sensorData) { - sensorData.name = sensorDetails.getName(); - sensorData.type = sensorDetails.getType(); - final RefreshRateRange rr = sensorDetails.getRefreshRate(); - if (rr != null) { - sensorData.minRefreshRate = rr.getMinimum().floatValue(); - sensorData.maxRefreshRate = rr.getMaximum().floatValue(); - } - } - private void loadBrightnessChangeThresholdsFromXml() { loadBrightnessChangeThresholds(/* config= */ null); } @@ -3390,37 +3351,6 @@ public class DisplayDeviceConfig { } /** - * Uniquely identifies a Sensor, with the combination of Type and Name. - */ - public static class SensorData { - public String type; - public String name; - public float minRefreshRate = 0.0f; - public float maxRefreshRate = Float.POSITIVE_INFINITY; - - @Override - public String toString() { - return "Sensor{" - + "type: " + type - + ", name: " + name - + ", refreshRateRange: [" + minRefreshRate + ", " + maxRefreshRate + "]" - + "} "; - } - - /** - * @return True if the sensor matches both the specified name and type, or one if only one - * is specified (not-empty). Always returns false if both parameters are null or empty. - */ - public boolean matches(String sensorName, String sensorType) { - final boolean isNameSpecified = !TextUtils.isEmpty(sensorName); - final boolean isTypeSpecified = !TextUtils.isEmpty(sensorType); - return (isNameSpecified || isTypeSpecified) - && (!isNameSpecified || sensorName.equals(name)) - && (!isTypeSpecified || sensorType.equals(type)); - } - } - - /** * Container for high brightness mode configuration data. */ static class HighBrightnessModeData { diff --git a/services/core/java/com/android/server/display/DisplayManagerService.java b/services/core/java/com/android/server/display/DisplayManagerService.java index eae153cb8aeb..11f4e5f75b11 100644 --- a/services/core/java/com/android/server/display/DisplayManagerService.java +++ b/services/core/java/com/android/server/display/DisplayManagerService.java @@ -158,7 +158,7 @@ import com.android.server.LocalServices; import com.android.server.SystemService; import com.android.server.UiThread; import com.android.server.companion.virtual.VirtualDeviceManagerInternal; -import com.android.server.display.DisplayDeviceConfig.SensorData; +import com.android.server.display.config.SensorData; import com.android.server.display.feature.DeviceConfigParameterProvider; import com.android.server.display.feature.DisplayManagerFlags; import com.android.server.display.layout.Layout; @@ -1607,6 +1607,19 @@ public final class DisplayManagerService extends SystemService { final long secondToken = Binder.clearCallingIdentity(); try { final int displayId; + final String displayUniqueId = VirtualDisplayAdapter.generateDisplayUniqueId( + packageName, callingUid, virtualDisplayConfig); + + if (virtualDisplayConfig.isHomeSupported()) { + if ((flags & VIRTUAL_DISPLAY_FLAG_TRUSTED) == 0) { + Slog.w(TAG, "Display created with home support but lacks " + + "VIRTUAL_DISPLAY_FLAG_TRUSTED, ignoring the home support request."); + } else { + mWindowManagerInternal.setHomeSupportedOnDisplay(displayUniqueId, + Display.TYPE_VIRTUAL, true); + } + } + synchronized (mSyncRoot) { displayId = createVirtualDisplayLocked( @@ -1614,6 +1627,7 @@ public final class DisplayManagerService extends SystemService { projection, callingUid, packageName, + displayUniqueId, virtualDevice, surface, flags, @@ -1625,6 +1639,13 @@ public final class DisplayManagerService extends SystemService { } } + if (displayId == Display.INVALID_DISPLAY && virtualDisplayConfig.isHomeSupported() + && (flags & VIRTUAL_DISPLAY_FLAG_TRUSTED) != 0) { + // Failed to create the virtual display, so we should clean up the WM settings + // because it won't receive the onDisplayRemoved callback. + mWindowManagerInternal.clearDisplaySettings(displayUniqueId, Display.TYPE_VIRTUAL); + } + // Build a session describing the MediaProjection instance, if there is one. A session // for a VirtualDisplay or physical display mirroring is handled in DisplayContent. ContentRecordingSession session = null; @@ -1698,6 +1719,7 @@ public final class DisplayManagerService extends SystemService { IMediaProjection projection, int callingUid, String packageName, + String uniqueId, IVirtualDevice virtualDevice, Surface surface, int flags, @@ -1710,10 +1732,9 @@ public final class DisplayManagerService extends SystemService { return -1; } - Slog.d(TAG, "Virtual Display: creating DisplayDevice with VirtualDisplayAdapter"); DisplayDevice device = mVirtualDisplayAdapter.createVirtualDisplayLocked( - callback, projection, callingUid, packageName, surface, flags, + callback, projection, callingUid, packageName, uniqueId, surface, flags, virtualDisplayConfig); if (device == null) { Slog.w(TAG, "Virtual Display: VirtualDisplayAdapter failed to create DisplayDevice"); diff --git a/services/core/java/com/android/server/display/DisplayPowerController.java b/services/core/java/com/android/server/display/DisplayPowerController.java index d8ac52eb8c79..5761c31b29bf 100644 --- a/services/core/java/com/android/server/display/DisplayPowerController.java +++ b/services/core/java/com/android/server/display/DisplayPowerController.java @@ -1540,12 +1540,13 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call performScreenOffTransition = true; break; case DisplayPowerRequest.POLICY_DOZE: - if (mPowerRequest.dozeScreenState != Display.STATE_UNKNOWN) { + if (mDozeStateOverride != Display.STATE_UNKNOWN) { + state = mDozeStateOverride; + } else if (mPowerRequest.dozeScreenState != Display.STATE_UNKNOWN) { state = mPowerRequest.dozeScreenState; } else { state = Display.STATE_DOZE; } - state = mDozeStateOverride == Display.STATE_UNKNOWN ? state : mDozeStateOverride; if (!mAllowAutoBrightnessWhileDozingConfig) { brightnessState = mPowerRequest.dozeScreenBrightness; mBrightnessReasonTemp.setReason(BrightnessReason.REASON_DOZE); diff --git a/services/core/java/com/android/server/display/DisplayPowerState.java b/services/core/java/com/android/server/display/DisplayPowerState.java index be03a808e166..f994c0556c82 100644 --- a/services/core/java/com/android/server/display/DisplayPowerState.java +++ b/services/core/java/com/android/server/display/DisplayPowerState.java @@ -320,7 +320,9 @@ final class DisplayPowerState { public void stop() { mStopped = true; mPhotonicModulator.interrupt(); - dismissColorFade(); + if (mColorFade != null) { + mColorFade.destroy(); + } mCleanListener = null; mHandler.removeCallbacksAndMessages(null); } diff --git a/services/core/java/com/android/server/display/VirtualDisplayAdapter.java b/services/core/java/com/android/server/display/VirtualDisplayAdapter.java index b0025872aa3d..90e32a685a34 100644 --- a/services/core/java/com/android/server/display/VirtualDisplayAdapter.java +++ b/services/core/java/com/android/server/display/VirtualDisplayAdapter.java @@ -64,7 +64,7 @@ import android.view.SurfaceControl; import com.android.internal.annotations.VisibleForTesting; import java.io.PrintWriter; -import java.util.Iterator; +import java.util.concurrent.atomic.AtomicInteger; /** * A display adapter that provides virtual displays on behalf of applications. @@ -72,15 +72,17 @@ import java.util.Iterator; * Display adapters are guarded by the {@link DisplayManagerService.SyncRoot} lock. * </p> */ -@VisibleForTesting +@VisibleForTesting(visibility = VisibleForTesting.Visibility.PACKAGE) public class VirtualDisplayAdapter extends DisplayAdapter { static final String TAG = "VirtualDisplayAdapter"; - static final boolean DEBUG = false; // Unique id prefix for virtual displays @VisibleForTesting static final String UNIQUE_ID_PREFIX = "virtual:"; + // Unique id suffix for virtual displays + private static final AtomicInteger sNextUniqueIndex = new AtomicInteger(0); + private final ArrayMap<IBinder, VirtualDisplayDevice> mVirtualDisplayDevices = new ArrayMap<>(); private final Handler mHandler; private final SurfaceControlDisplayFactory mSurfaceControlDisplayFactory; @@ -111,8 +113,8 @@ public class VirtualDisplayAdapter extends DisplayAdapter { } public DisplayDevice createVirtualDisplayLocked(IVirtualDisplayCallback callback, - IMediaProjection projection, int ownerUid, String ownerPackageName, Surface surface, - int flags, VirtualDisplayConfig virtualDisplayConfig) { + IMediaProjection projection, int ownerUid, String ownerPackageName, String uniqueId, + Surface surface, int flags, VirtualDisplayConfig virtualDisplayConfig) { IBinder appToken = callback.asBinder(); if (mVirtualDisplayDevices.containsKey(appToken)) { Slog.wtfStack(TAG, @@ -125,23 +127,13 @@ public class VirtualDisplayAdapter extends DisplayAdapter { IBinder displayToken = mSurfaceControlDisplayFactory.createDisplay(name, secure, virtualDisplayConfig.getRequestedRefreshRate()); - final String baseUniqueId = - UNIQUE_ID_PREFIX + ownerPackageName + "," + ownerUid + "," + name + ","; - final int uniqueIndex = getNextUniqueIndex(baseUniqueId); - String uniqueId = virtualDisplayConfig.getUniqueId(); - if (uniqueId == null) { - uniqueId = baseUniqueId + uniqueIndex; - } else { - uniqueId = UNIQUE_ID_PREFIX + ownerPackageName + ":" + uniqueId; - } MediaProjectionCallback mediaProjectionCallback = null; if (projection != null) { mediaProjectionCallback = new MediaProjectionCallback(appToken); } VirtualDisplayDevice device = new VirtualDisplayDevice(displayToken, appToken, - ownerUid, ownerPackageName, surface, flags, - new Callback(callback, mHandler), projection, mediaProjectionCallback, - uniqueId, uniqueIndex, virtualDisplayConfig); + ownerUid, ownerPackageName, surface, flags, new Callback(callback, mHandler), + projection, mediaProjectionCallback, uniqueId, virtualDisplayConfig); mVirtualDisplayDevices.put(appToken, device); @@ -219,26 +211,20 @@ public class VirtualDisplayAdapter extends DisplayAdapter { } /** - * Returns the next unique index for the uniqueIdPrefix + * Generates a virtual display's unique identifier. + * + * <p>It is always prefixed with "virtual:package-name". If the provided config explicitly + * specifies a unique ID, then it's simply appended. Otherwise, the UID, display name and a + * unique index are appended.</p> + * + * <p>The unique index is incremented for every virtual display unique ID generation and serves + * for differentiating between displays with the same name created by the same owner.</p> */ - private int getNextUniqueIndex(String uniqueIdPrefix) { - if (mVirtualDisplayDevices.isEmpty()) { - return 0; - } - - int nextUniqueIndex = 0; - Iterator<VirtualDisplayDevice> it = mVirtualDisplayDevices.values().iterator(); - while (it.hasNext()) { - VirtualDisplayDevice device = it.next(); - if (device.getUniqueId().startsWith(uniqueIdPrefix) - && device.mUniqueIndex >= nextUniqueIndex) { - // Increment the next unique index to be greater than ones we have already ran - // across for displays that have the same unique Id prefix. - nextUniqueIndex = device.mUniqueIndex + 1; - } - } - - return nextUniqueIndex; + static String generateDisplayUniqueId(String packageName, int uid, + VirtualDisplayConfig config) { + return UNIQUE_ID_PREFIX + packageName + ((config.getUniqueId() != null) + ? (":" + config.getUniqueId()) + : ("," + uid + "," + config.getName() + "," + sNextUniqueIndex.getAndIncrement())); } private void handleBinderDiedLocked(IBinder appToken) { @@ -278,7 +264,6 @@ public class VirtualDisplayAdapter extends DisplayAdapter { private int mDisplayState; private boolean mStopped; private int mPendingChanges; - private int mUniqueIndex; private Display.Mode mMode; private boolean mIsDisplayOn; private int mDisplayIdToMirror; @@ -287,7 +272,7 @@ public class VirtualDisplayAdapter extends DisplayAdapter { public VirtualDisplayDevice(IBinder displayToken, IBinder appToken, int ownerUid, String ownerPackageName, Surface surface, int flags, Callback callback, IMediaProjection projection, - IMediaProjectionCallback mediaProjectionCallback, String uniqueId, int uniqueIndex, + IMediaProjectionCallback mediaProjectionCallback, String uniqueId, VirtualDisplayConfig virtualDisplayConfig) { super(VirtualDisplayAdapter.this, displayToken, uniqueId, getContext()); mAppToken = appToken; @@ -306,7 +291,6 @@ public class VirtualDisplayAdapter extends DisplayAdapter { mMediaProjectionCallback = mediaProjectionCallback; mDisplayState = Display.STATE_UNKNOWN; mPendingChanges |= PENDING_SURFACE_CHANGE; - mUniqueIndex = uniqueIndex; mIsDisplayOn = surface != null; mDisplayIdToMirror = virtualDisplayConfig.getDisplayIdToMirror(); mIsWindowManagerMirroring = virtualDisplayConfig.isWindowManagerMirroringEnabled(); diff --git a/services/core/java/com/android/server/display/config/SensorData.java b/services/core/java/com/android/server/display/config/SensorData.java new file mode 100644 index 000000000000..3bb35bf7c49f --- /dev/null +++ b/services/core/java/com/android/server/display/config/SensorData.java @@ -0,0 +1,184 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.server.display.config; + +import android.annotation.NonNull; +import android.annotation.Nullable; +import android.content.res.Resources; +import android.text.TextUtils; + +import com.android.internal.annotations.VisibleForTesting; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +/** + * Uniquely identifies a Sensor, with the combination of Type and Name. + */ +public class SensorData { + + @Nullable + public final String type; + @Nullable + public final String name; + public final float minRefreshRate; + public final float maxRefreshRate; + public final List<SupportedMode> supportedModes; + + @VisibleForTesting + public SensorData() { + this(/* type= */ null, /* name= */ null); + } + + @VisibleForTesting + public SensorData(String type, String name) { + this(type, name, /* minRefreshRate= */ 0f, /* maxRefreshRate= */ Float.POSITIVE_INFINITY); + } + + @VisibleForTesting + public SensorData(String type, String name, float minRefreshRate, float maxRefreshRate) { + this(type, name, minRefreshRate, maxRefreshRate, /* supportedModes= */ List.of()); + } + + @VisibleForTesting + public SensorData(String type, String name, float minRefreshRate, float maxRefreshRate, + List<SupportedMode> supportedModes) { + this.type = type; + this.name = name; + this.minRefreshRate = minRefreshRate; + this.maxRefreshRate = maxRefreshRate; + this.supportedModes = Collections.unmodifiableList(supportedModes); + } + + /** + * @return True if the sensor matches both the specified name and type, or one if only one + * is specified (not-empty). Always returns false if both parameters are null or empty. + */ + public boolean matches(String sensorName, String sensorType) { + final boolean isNameSpecified = !TextUtils.isEmpty(sensorName); + final boolean isTypeSpecified = !TextUtils.isEmpty(sensorType); + return (isNameSpecified || isTypeSpecified) + && (!isNameSpecified || sensorName.equals(name)) + && (!isTypeSpecified || sensorType.equals(type)); + } + + @Override + public String toString() { + return "SensorData{" + + "type= " + type + + ", name= " + name + + ", refreshRateRange: [" + minRefreshRate + ", " + maxRefreshRate + "]" + + ", supportedModes=" + supportedModes + + '}'; + } + + /** + * Loads ambient light sensor data from DisplayConfiguration and if missing from resources xml + */ + public static SensorData loadAmbientLightSensorConfig(DisplayConfiguration config, + Resources resources) { + SensorDetails sensorDetails = config.getLightSensor(); + if (sensorDetails != null) { + return loadSensorData(sensorDetails); + } else { + return loadAmbientLightSensorConfig(resources); + } + } + + /** + * Loads ambient light sensor data from resources xml + */ + public static SensorData loadAmbientLightSensorConfig(Resources resources) { + return new SensorData( + resources.getString(com.android.internal.R.string.config_displayLightSensorType), + /* name= */ ""); + } + + /** + * Loads screen off brightness sensor data from DisplayConfiguration + */ + public static SensorData loadScreenOffBrightnessSensorConfig(DisplayConfiguration config) { + SensorDetails sensorDetails = config.getScreenOffBrightnessSensor(); + if (sensorDetails != null) { + return loadSensorData(sensorDetails); + } else { + return new SensorData(); + } + } + + /** + * Loads proximity sensor data from DisplayConfiguration + */ + @Nullable + public static SensorData loadProxSensorConfig(DisplayConfiguration config) { + SensorDetails sensorDetails = config.getProxSensor(); + if (sensorDetails != null) { + String name = sensorDetails.getName(); + String type = sensorDetails.getType(); + if ("".equals(name) && "".equals(type)) { + // <proxSensor> with empty values to the config means no sensor should be used. + // See also {@link com.android.server.display.utils.SensorUtils} + return null; + } else { + return loadSensorData(sensorDetails); + } + } else { + return new SensorData(); + } + } + + /** + * Loads sensor unspecified config, this means system should use default sensor. + * See also {@link com.android.server.display.utils.SensorUtils} + */ + @NonNull + public static SensorData loadSensorUnspecifiedConfig() { + return new SensorData(); + } + + private static SensorData loadSensorData(@NonNull SensorDetails sensorDetails) { + float minRefreshRate = 0f; + float maxRefreshRate = Float.POSITIVE_INFINITY; + RefreshRateRange rr = sensorDetails.getRefreshRate(); + if (rr != null) { + minRefreshRate = rr.getMinimum().floatValue(); + maxRefreshRate = rr.getMaximum().floatValue(); + } + ArrayList<SupportedMode> supportedModes = new ArrayList<>(); + NonNegativeFloatToFloatMap configSupportedModes = sensorDetails.getSupportedModes(); + if (configSupportedModes != null) { + for (NonNegativeFloatToFloatPoint supportedMode : configSupportedModes.getPoint()) { + supportedModes.add(new SupportedMode(supportedMode.getFirst().floatValue(), + supportedMode.getSecond().floatValue())); + } + } + + return new SensorData(sensorDetails.getType(), sensorDetails.getName(), minRefreshRate, + maxRefreshRate, supportedModes); + } + + public static class SupportedMode { + public final float refreshRate; + public final float vsyncRate; + + public SupportedMode(float refreshRate, float vsyncRate) { + this.refreshRate = refreshRate; + this.vsyncRate = vsyncRate; + } + } +} diff --git a/services/core/java/com/android/server/display/state/DisplayStateController.java b/services/core/java/com/android/server/display/state/DisplayStateController.java index 5d6e65071479..5f289349751f 100644 --- a/services/core/java/com/android/server/display/state/DisplayStateController.java +++ b/services/core/java/com/android/server/display/state/DisplayStateController.java @@ -61,12 +61,13 @@ public class DisplayStateController { mPerformScreenOffTransition = true; break; case DisplayManagerInternal.DisplayPowerRequest.POLICY_DOZE: - if (displayPowerRequest.dozeScreenState != Display.STATE_UNKNOWN) { + if (mDozeStateOverride != Display.STATE_UNKNOWN) { + state = mDozeStateOverride; + } else if (displayPowerRequest.dozeScreenState != Display.STATE_UNKNOWN) { state = displayPowerRequest.dozeScreenState; } else { state = Display.STATE_DOZE; } - state = mDozeStateOverride == Display.STATE_UNKNOWN ? state : mDozeStateOverride; break; case DisplayManagerInternal.DisplayPowerRequest.POLICY_DIM: case DisplayManagerInternal.DisplayPowerRequest.POLICY_BRIGHT: diff --git a/services/core/java/com/android/server/display/utils/SensorUtils.java b/services/core/java/com/android/server/display/utils/SensorUtils.java index 56321cd01e20..8b9fe1083187 100644 --- a/services/core/java/com/android/server/display/utils/SensorUtils.java +++ b/services/core/java/com/android/server/display/utils/SensorUtils.java @@ -21,7 +21,7 @@ import android.hardware.Sensor; import android.hardware.SensorManager; import android.text.TextUtils; -import com.android.server.display.DisplayDeviceConfig; +import com.android.server.display.config.SensorData; import java.util.List; @@ -36,7 +36,7 @@ public class SensorUtils { */ @Nullable public static Sensor findSensor(@Nullable SensorManager sensorManager, - @Nullable DisplayDeviceConfig.SensorData sensorData, int fallbackType) { + @Nullable SensorData sensorData, int fallbackType) { if (sensorData == null) { return null; } else { diff --git a/services/core/java/com/android/server/locksettings/LockSettingsService.java b/services/core/java/com/android/server/locksettings/LockSettingsService.java index 568618e0a065..57e424d944f5 100644 --- a/services/core/java/com/android/server/locksettings/LockSettingsService.java +++ b/services/core/java/com/android/server/locksettings/LockSettingsService.java @@ -243,6 +243,10 @@ public class LockSettingsService extends ILockSettings.Stub { private static final String MIGRATED_FRP2 = "migrated_frp2"; private static final String MIGRATED_KEYSTORE_NS = "migrated_keystore_namespace"; private static final String MIGRATED_SP_CE_ONLY = "migrated_all_users_to_sp_and_bound_ce"; + private static final String MIGRATED_SP_FULL = "migrated_all_users_to_sp_and_bound_keys"; + + private static final boolean FIX_UNLOCKED_DEVICE_REQUIRED_KEYS = + android.security.Flags.fixUnlockedDeviceRequiredKeys(); // Duration that LockSettingsService will store the gatekeeper password for. This allows // multiple biometric enrollments without prompting the user to enter their password via @@ -856,9 +860,11 @@ public class LockSettingsService extends ILockSettings.Stub { @Override public void onReceive(Context context, Intent intent) { if (Intent.ACTION_USER_ADDED.equals(intent.getAction())) { - // Notify keystore that a new user was added. - final int userHandle = intent.getIntExtra(Intent.EXTRA_USER_HANDLE, 0); - AndroidKeyStoreMaintenance.onUserAdded(userHandle); + if (!FIX_UNLOCKED_DEVICE_REQUIRED_KEYS) { + // Notify keystore that a new user was added. + final int userHandle = intent.getIntExtra(Intent.EXTRA_USER_HANDLE, 0); + AndroidKeyStoreMaintenance.onUserAdded(userHandle); + } } else if (Intent.ACTION_USER_STARTING.equals(intent.getAction())) { final int userHandle = intent.getIntExtra(Intent.EXTRA_USER_HANDLE, 0); mStorage.prefetchUser(userHandle); @@ -1022,24 +1028,53 @@ public class LockSettingsService extends ILockSettings.Stub { } mEarlyCreatedUsers = null; // no longer needed - // Also do a one-time migration of all users to SP-based credentials with the CE key - // encrypted by the SP. This is needed for the system user on the first boot of a - // device, as the system user is special and never goes through the user creation flow - // that other users do. It is also needed for existing users on a device upgraded from - // Android 13 or earlier, where users with no LSKF didn't necessarily have an SP, and if - // they did have an SP then their CE key wasn't encrypted by it. + // Do a one-time migration for any unsecured users: create the user's synthetic password + // if not already done, encrypt the user's CE key with the synthetic password if not + // already done, and create the user's Keystore super keys if not already done. + // + // This is needed for the following cases: + // + // - Finalizing the creation of the system user on the first boot of a device, as the + // system user is special and doesn't go through the normal user creation flow. + // + // - Upgrading from Android 13 or earlier, where unsecured users didn't necessarily have + // a synthetic password, and if they did have a synthetic password their CE key wasn't + // encrypted by it. Also, unsecured users didn't have Keystore super keys. // - // If this gets interrupted (e.g. by the device powering off), there shouldn't be a - // problem since this will run again on the next boot, and setCeStorageProtection() is - // okay with the CE key being already protected by the given secret. - if (getString(MIGRATED_SP_CE_ONLY, null, 0) == null) { - for (UserInfo user : mUserManager.getAliveUsers()) { - removeStateForReusedUserIdIfNecessary(user.id, user.serialNumber); - synchronized (mSpManager) { - migrateUserToSpWithBoundCeKeyLocked(user.id); + // - Upgrading from Android 14, where unsecured users didn't have Keystore super keys. + // + // The end result is that all users, regardless of whether they are secured or not, have + // a synthetic password with all keys initialized and protected by it. + // + // Note: if this migration gets interrupted (e.g. by the device powering off), there + // shouldn't be a problem since this will run again on the next boot, and + // setCeStorageProtection() and initKeystoreSuperKeys(..., true) are idempotent. + if (FIX_UNLOCKED_DEVICE_REQUIRED_KEYS) { + if (!getBoolean(MIGRATED_SP_FULL, false, 0)) { + for (UserInfo user : mUserManager.getAliveUsers()) { + removeStateForReusedUserIdIfNecessary(user.id, user.serialNumber); + synchronized (mSpManager) { + migrateUserToSpWithBoundKeysLocked(user.id); + } + } + setBoolean(MIGRATED_SP_FULL, true, 0); + } + } else { + if (getString(MIGRATED_SP_CE_ONLY, null, 0) == null) { + for (UserInfo user : mUserManager.getAliveUsers()) { + removeStateForReusedUserIdIfNecessary(user.id, user.serialNumber); + synchronized (mSpManager) { + migrateUserToSpWithBoundCeKeyLocked(user.id); + } } + setString(MIGRATED_SP_CE_ONLY, "true", 0); + } + + if (getBoolean(MIGRATED_SP_FULL, false, 0)) { + // The FIX_UNLOCKED_DEVICE_REQUIRED_KEYS flag was enabled but then got disabled. + // Ensure the full migration runs again the next time the flag is enabled... + setBoolean(MIGRATED_SP_FULL, false, 0); } - setString(MIGRATED_SP_CE_ONLY, "true", 0); } mThirdPartyAppsStarted = true; @@ -1070,6 +1105,37 @@ public class LockSettingsService extends ILockSettings.Stub { } } + @GuardedBy("mSpManager") + private void migrateUserToSpWithBoundKeysLocked(@UserIdInt int userId) { + if (isUserSecure(userId)) { + Slogf.d(TAG, "User %d is secured; no migration needed", userId); + return; + } + long protectorId = getCurrentLskfBasedProtectorId(userId); + if (protectorId == SyntheticPasswordManager.NULL_PROTECTOR_ID) { + Slogf.i(TAG, "Migrating unsecured user %d to SP-based credential", userId); + initializeSyntheticPassword(userId); + return; + } + Slogf.i(TAG, "Existing unsecured user %d has a synthetic password", userId); + AuthenticationResult result = mSpManager.unlockLskfBasedProtector( + getGateKeeperService(), protectorId, LockscreenCredential.createNone(), userId, + null); + SyntheticPassword sp = result.syntheticPassword; + if (sp == null) { + Slogf.wtf(TAG, "Failed to unwrap synthetic password for unsecured user %d", userId); + return; + } + // While setCeStorageProtection() is idempotent, it does log some error messages when called + // again. Skip it if we know it was already handled by an earlier upgrade to Android 14. + if (getString(MIGRATED_SP_CE_ONLY, null, 0) == null) { + Slogf.i(TAG, "Encrypting CE key of user %d with synthetic password", userId); + setCeStorageProtection(userId, sp); + } + Slogf.i(TAG, "Initializing Keystore super keys for user %d", userId); + initKeystoreSuperKeys(userId, sp, /* allowExisting= */ true); + } + /** * Returns the lowest password quality that still presents the same UI for entering it. * @@ -1351,6 +1417,20 @@ public class LockSettingsService extends ILockSettings.Stub { AndroidKeyStoreMaintenance.onUserPasswordChanged(userHandle, password); } + @VisibleForTesting /** Note: this method is overridden in unit tests */ + void initKeystoreSuperKeys(@UserIdInt int userId, SyntheticPassword sp, boolean allowExisting) { + final byte[] password = sp.deriveKeyStorePassword(); + try { + int res = AndroidKeyStoreMaintenance.initUserSuperKeys(userId, password, allowExisting); + if (res != 0) { + throw new IllegalStateException("Failed to initialize Keystore super keys for user " + + userId); + } + } finally { + Arrays.fill(password, (byte) 0); + } + } + private void unlockKeystore(int userId, SyntheticPassword sp) { Authorization.onLockScreenEvent(false, userId, sp.deriveKeyStorePassword(), null); } @@ -2074,6 +2154,9 @@ public class LockSettingsService extends ILockSettings.Stub { return; } onSyntheticPasswordUnlocked(userId, result.syntheticPassword); + if (FIX_UNLOCKED_DEVICE_REQUIRED_KEYS) { + unlockKeystore(userId, result.syntheticPassword); + } unlockCeStorage(userId, result.syntheticPassword); } } @@ -2353,6 +2436,16 @@ public class LockSettingsService extends ILockSettings.Stub { } private void createNewUser(@UserIdInt int userId, int userSerialNumber) { + + // Delete all Keystore keys for userId, just in case any were left around from a removed + // user with the same userId. This should be unnecessary, but we've been doing this for a + // long time, so for now we keep doing it just in case it's ever important. Don't wait + // until initKeystoreSuperKeys() to do this; that can be delayed if the user is being + // created during early boot, and maybe something will use Keystore before then. + if (FIX_UNLOCKED_DEVICE_REQUIRED_KEYS) { + AndroidKeyStoreMaintenance.onUserAdded(userId); + } + synchronized (mUserCreationAndRemovalLock) { // During early boot, don't actually create the synthetic password yet, but rather // automatically delay it to later. We do this because protecting the synthetic @@ -2759,7 +2852,7 @@ public class LockSettingsService extends ILockSettings.Stub { /** * Creates the synthetic password (SP) for the given user, protects it with an empty LSKF, and - * protects the user's CE key with a key derived from the SP. + * protects the user's CE storage key and Keystore super keys with keys derived from the SP. * * <p>This is called just once in the lifetime of the user: at user creation time (possibly * delayed until the time when Weaver is guaranteed to be available), or when upgrading from @@ -2778,6 +2871,9 @@ public class LockSettingsService extends ILockSettings.Stub { LockscreenCredential.createNone(), sp, userId); setCurrentLskfBasedProtectorId(protectorId, userId); setCeStorageProtection(userId, sp); + if (FIX_UNLOCKED_DEVICE_REQUIRED_KEYS) { + initKeystoreSuperKeys(userId, sp, /* allowExisting= */ false); + } onSyntheticPasswordCreated(userId, sp); Slogf.i(TAG, "Successfully initialized synthetic password for user %d", userId); return sp; @@ -2870,11 +2966,10 @@ public class LockSettingsService extends ILockSettings.Stub { /** * Changes the user's LSKF by creating an LSKF-based protector that uses the new LSKF (which may * be empty) and replacing the old LSKF-based protector with it. The SP itself is not changed. - * - * Also maintains the invariants described in {@link SyntheticPasswordManager} by - * setting/clearing the protection (by the SP) on the user's auth-bound Keystore keys when the - * LSKF is added/removed, respectively. If an LSKF is being added, then the Gatekeeper auth - * token is also refreshed. + * <p> + * Also maintains the invariants described in {@link SyntheticPasswordManager} by enrolling / + * deleting the synthetic password into Gatekeeper as the LSKF is set / cleared, and asking + * Keystore to delete the user's auth-bound keys when the LSKF is cleared. */ @GuardedBy("mSpManager") private long setLockCredentialWithSpLocked(LockscreenCredential credential, @@ -2893,7 +2988,9 @@ public class LockSettingsService extends ILockSettings.Stub { if (!mSpManager.hasSidForUser(userId)) { mSpManager.newSidForUser(getGateKeeperService(), sp, userId); mSpManager.verifyChallenge(getGateKeeperService(), sp, 0L, userId); - setKeystorePassword(sp.deriveKeyStorePassword(), userId); + if (!FIX_UNLOCKED_DEVICE_REQUIRED_KEYS) { + setKeystorePassword(sp.deriveKeyStorePassword(), userId); + } } } else { // Cache all profile password if they use unified work challenge. This will later be @@ -2904,7 +3001,11 @@ public class LockSettingsService extends ILockSettings.Stub { gateKeeperClearSecureUserId(userId); unlockCeStorage(userId, sp); unlockKeystore(userId, sp); - setKeystorePassword(null, userId); + if (FIX_UNLOCKED_DEVICE_REQUIRED_KEYS) { + AndroidKeyStoreMaintenance.onUserLskfRemoved(userId); + } else { + setKeystorePassword(null, userId); + } removeBiometricsForUser(userId); } setCurrentLskfBasedProtectorId(newProtectorId, userId); diff --git a/services/core/java/com/android/server/locksettings/SyntheticPasswordManager.java b/services/core/java/com/android/server/locksettings/SyntheticPasswordManager.java index 8e9c21f5f35f..cc205d4a53bd 100644 --- a/services/core/java/com/android/server/locksettings/SyntheticPasswordManager.java +++ b/services/core/java/com/android/server/locksettings/SyntheticPasswordManager.java @@ -90,10 +90,15 @@ import java.util.Set; * * - The user's credential-encrypted storage is always protected by the SP. * - * - The user's auth-bound Keystore keys are protected by the SP, but only while an LSKF is set. - * This works by setting the user's Keystore and Gatekeeper passwords to SP-derived secrets, but - * only while an LSKF is set. When the LSKF is removed, these passwords are cleared, - * invalidating the user's auth-bound keys. + * - The user's Keystore superencryption keys are always protected by the SP. These in turn + * protect the Keystore keys that require user authentication, an unlocked device, or both. + * + * - A secret derived from the synthetic password is enrolled in Gatekeeper for the user, but only + * while the user has a (nonempty) LSKF. This enrollment has an associated ID called the Secure + * user ID or SID. This use of Gatekeeper, which is separate from the use of GateKeeper that may + * be used in the LSKF-based protector, makes it so that unlocking the synthetic password + * generates a HardwareAuthToken (but only when the user has LSKF). That HardwareAuthToken can + * be provided to KeyMint to authorize the use of the user's authentication-bound Keystore keys. * * Files stored on disk for each user: * For the SP itself, stored under NULL_PROTECTOR_ID: diff --git a/services/core/java/com/android/server/net/NetworkManagementService.java b/services/core/java/com/android/server/net/NetworkManagementService.java index 550ad5d610da..681d1a0ee10a 100644 --- a/services/core/java/com/android/server/net/NetworkManagementService.java +++ b/services/core/java/com/android/server/net/NetworkManagementService.java @@ -74,7 +74,6 @@ import com.android.internal.app.IBatteryStats; import com.android.internal.util.DumpUtils; import com.android.internal.util.HexDump; import com.android.modules.utils.build.SdkLevel; -import com.android.net.flags.Flags; import com.android.net.module.util.NetdUtils; import com.android.net.module.util.PermissionUtils; import com.android.server.FgThread; @@ -328,10 +327,10 @@ public class NetworkManagementService extends INetworkManagementService.Stub { /** * Notify our observers of a change in the data activity state of the interface */ - private void notifyInterfaceClassActivity(int type, boolean isActive, long tsNanos, + private void notifyInterfaceClassActivity(int label, boolean isActive, long tsNanos, int uid) { invokeForAllObservers(o -> o.interfaceClassDataActivityChanged( - type, isActive, tsNanos, uid)); + label, isActive, tsNanos, uid)); } // Sync the state of the given chain with the native daemon. @@ -1062,7 +1061,7 @@ public class NetworkManagementService extends INetworkManagementService.Stub { } Trace.traceBegin(Trace.TRACE_TAG_NETWORK, "setDataSaverModeEnabled"); try { - if (Flags.setDataSaverViaCm()) { + if (SdkLevel.isAtLeastV()) { // setDataSaverEnabled throws if it fails to set data saver. mContext.getSystemService(ConnectivityManager.class) .setDataSaverEnabled(enable); diff --git a/services/core/java/com/android/server/notification/NotificationManagerService.java b/services/core/java/com/android/server/notification/NotificationManagerService.java index 8c753671d77d..bae06347d8a2 100755 --- a/services/core/java/com/android/server/notification/NotificationManagerService.java +++ b/services/core/java/com/android/server/notification/NotificationManagerService.java @@ -7042,9 +7042,8 @@ public class NotificationManagerService extends SystemService { channelId = (new Notification.TvExtender(notification)).getChannelId(); } String shortcutId = n.getShortcutId(); - final NotificationChannel channel = mPreferencesHelper.getConversationNotificationChannel( - pkg, notificationUid, channelId, shortcutId, - true /* parent ok */, false /* includeDeleted */); + final NotificationChannel channel = getNotificationChannelRestoreDeleted(pkg, + callingUid, notificationUid, channelId, shortcutId); if (channel == null) { final String noChannelStr = "No Channel found for " + "pkg=" + pkg @@ -7162,6 +7161,35 @@ public class NotificationManagerService extends SystemService { return true; } + /** + * Returns a channel, if exists, and restores deleted conversation channels. + */ + @Nullable + private NotificationChannel getNotificationChannelRestoreDeleted(String pkg, + int callingUid, int notificationUid, String channelId, String conversationId) { + // Restore a deleted conversation channel, if exists. Otherwise use the parent channel. + NotificationChannel channel = mPreferencesHelper.getConversationNotificationChannel( + pkg, notificationUid, channelId, conversationId, + true /* parent ok */, !TextUtils.isEmpty(conversationId) /* includeDeleted */); + // Restore deleted conversation channel + if (channel != null && channel.isDeleted()) { + if (Objects.equals(conversationId, channel.getConversationId())) { + boolean needsPolicyFileChange = mPreferencesHelper.createNotificationChannel( + pkg, notificationUid, channel, true /* fromTargetApp */, + mConditionProviders.isPackageOrComponentAllowed(pkg, + UserHandle.getUserId(notificationUid)), callingUid, true); + // Update policy file if the conversation channel was restored + if (needsPolicyFileChange) { + handleSavePolicyFile(); + } + } else { + // Do not restore parent channel + channel = null; + } + } + return channel; + } + private void onConversationRemovedInternal(String pkg, int uid, Set<String> shortcuts) { checkCallerIsSystem(); Preconditions.checkStringNotEmpty(pkg); diff --git a/services/core/java/com/android/server/pm/ApkChecksums.java b/services/core/java/com/android/server/pm/ApkChecksums.java index 50ed3b1859df..af6a002e66c4 100644 --- a/services/core/java/com/android/server/pm/ApkChecksums.java +++ b/services/core/java/com/android/server/pm/ApkChecksums.java @@ -111,6 +111,11 @@ public class ApkChecksums { private static final Certificate[] EMPTY_CERTIFICATE_ARRAY = {}; /** + * Arbitrary size restriction for the signature, used to sign the checksums. + */ + private static final int MAX_SIGNATURE_SIZE_BYTES = 35 * 1024; + + /** * Check back in 1 second after we detected we needed to wait for the APK to be fully available. */ private static final long PROCESS_REQUIRED_CHECKSUMS_DELAY_MILLIS = 1000; @@ -260,6 +265,10 @@ public class ApkChecksums { */ public static @NonNull Certificate[] verifySignature(Checksum[] checksums, byte[] signature) throws NoSuchAlgorithmException, IOException, SignatureException { + if (signature == null || signature.length > MAX_SIGNATURE_SIZE_BYTES) { + throw new SignatureException("Invalid signature"); + } + final byte[] blob; try (ByteArrayOutputStream os = new ByteArrayOutputStream()) { writeChecksums(os, checksums); diff --git a/services/core/java/com/android/server/pm/DeletePackageHelper.java b/services/core/java/com/android/server/pm/DeletePackageHelper.java index 8bf903ae0b13..f45571ab28e4 100644 --- a/services/core/java/com/android/server/pm/DeletePackageHelper.java +++ b/services/core/java/com/android/server/pm/DeletePackageHelper.java @@ -578,6 +578,12 @@ final class DeletePackageHelper { ? null : ps.getUserStateOrDefault(nextUserId).getArchiveState(); + // Preserve firstInstallTime in case of DELETE_KEEP_DATA + // For full uninstalls, reset firstInstallTime to 0 as if it has never been installed + final long firstInstallTime = (flags & DELETE_KEEP_DATA) == 0 + ? 0 + : ps.getUserStateOrDefault(nextUserId).getFirstInstallTimeMillis(); + ps.setUserState(nextUserId, ps.getCeDataInode(nextUserId), ps.getDeDataInode(nextUserId), @@ -597,7 +603,7 @@ final class DeletePackageHelper { PackageManager.UNINSTALL_REASON_UNKNOWN, null /*harmfulAppWarning*/, null /*splashScreenTheme*/, - 0 /*firstInstallTime*/, + firstInstallTime, PackageManager.USER_MIN_ASPECT_RATIO_UNSET, archiveState); } diff --git a/services/core/java/com/android/server/pm/PackageInstallerSession.java b/services/core/java/com/android/server/pm/PackageInstallerSession.java index 4b466be8476b..c677ff964f9e 100644 --- a/services/core/java/com/android/server/pm/PackageInstallerSession.java +++ b/services/core/java/com/android/server/pm/PackageInstallerSession.java @@ -1612,7 +1612,14 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub { try { Certificate[] ignored = ApkChecksums.verifySignature(checksums, signature); } catch (IOException | NoSuchAlgorithmException | SignatureException e) { - throw new IllegalArgumentException("Can't verify signature", e); + throw new IllegalArgumentException("Can't verify signature: " + e.getMessage(), e); + } + } + + for (Checksum checksum : checksums) { + if (checksum.getValue() == null + || checksum.getValue().length > Checksum.MAX_CHECKSUM_SIZE_BYTES) { + throw new IllegalArgumentException("Invalid checksum."); } } diff --git a/services/core/java/com/android/server/pm/PackageManagerInternalBase.java b/services/core/java/com/android/server/pm/PackageManagerInternalBase.java index ea783b88cf64..b281808e89b6 100644 --- a/services/core/java/com/android/server/pm/PackageManagerInternalBase.java +++ b/services/core/java/com/android/server/pm/PackageManagerInternalBase.java @@ -758,6 +758,11 @@ abstract class PackageManagerInternalBase extends PackageManagerInternal { return snapshot().isPackageQuarantinedForUser(packageName, userId); } + @Override + public boolean isPackageStopped(@NonNull String packageName, @UserIdInt int userId) { + return snapshot().isPackageStoppedForUser(packageName, userId); + } + @NonNull @Override @Deprecated diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java index 7d3d85d33dcb..ec3823f365b6 100644 --- a/services/core/java/com/android/server/pm/PackageManagerService.java +++ b/services/core/java/com/android/server/pm/PackageManagerService.java @@ -3105,7 +3105,8 @@ public class PackageManagerService implements PackageSender, TestUtilityService } private void enforceCanSetPackagesSuspendedAsUser(@NonNull Computer snapshot, - String callingPackage, int callingUid, int userId, String callingMethod) { + boolean quarantined, String callingPackage, int callingUid, int userId, + String callingMethod) { if (callingUid == Process.ROOT_UID // Need to compare app-id to allow system dialogs access on secondary users || UserHandle.getAppId(callingUid) == Process.SYSTEM_UID) { @@ -3120,8 +3121,20 @@ public class PackageManagerService implements PackageSender, TestUtilityService } } - mContext.enforceCallingOrSelfPermission(android.Manifest.permission.SUSPEND_APPS, - callingMethod); + if (quarantined) { + final boolean hasQuarantineAppsPerm = mContext.checkCallingOrSelfPermission( + android.Manifest.permission.QUARANTINE_APPS) == PERMISSION_GRANTED; + // TODO: b/305256093 - In order to facilitate testing, temporarily allowing apps + // with SUSPEND_APPS permission to quarantine apps. Remove this once the testing + // is done and this is no longer needed. + if (!hasQuarantineAppsPerm) { + mContext.enforceCallingOrSelfPermission(android.Manifest.permission.SUSPEND_APPS, + callingMethod); + } + } else { + mContext.enforceCallingOrSelfPermission(android.Manifest.permission.SUSPEND_APPS, + callingMethod); + } final int packageUid = snapshot.getPackageUid(callingPackage, 0, userId); final boolean allowedPackageUid = packageUid == callingUid; @@ -6136,9 +6149,6 @@ public class PackageManagerService implements PackageSender, TestUtilityService PersistableBundle appExtras, PersistableBundle launcherExtras, SuspendDialogInfo dialogInfo, int flags, String callingPackage, int userId) { final int callingUid = Binder.getCallingUid(); - final Computer snapshot = snapshotComputer(); - enforceCanSetPackagesSuspendedAsUser(snapshot, callingPackage, callingUid, userId, - "setPackagesSuspendedAsUser"); boolean quarantined = false; if (Flags.quarantinedEnabled()) { if ((flags & PackageManager.FLAG_SUSPEND_QUARANTINED) != 0) { @@ -6149,6 +6159,9 @@ public class PackageManagerService implements PackageSender, TestUtilityService quarantined = callingPackage.equals(wellbeingPkg); } } + final Computer snapshot = snapshotComputer(); + enforceCanSetPackagesSuspendedAsUser(snapshot, quarantined, callingPackage, callingUid, + userId, "setPackagesSuspendedAsUser"); return mSuspendPackageHelper.setPackagesSuspended(snapshot, packageNames, suspended, appExtras, launcherExtras, dialogInfo, callingPackage, userId, callingUid, quarantined); diff --git a/services/core/java/com/android/server/pm/UserJourneyLogger.java b/services/core/java/com/android/server/pm/UserJourneyLogger.java index 651578dc5deb..f120763a9e1a 100644 --- a/services/core/java/com/android/server/pm/UserJourneyLogger.java +++ b/services/core/java/com/android/server/pm/UserJourneyLogger.java @@ -23,6 +23,7 @@ import static android.os.UserManager.USER_TYPE_FULL_SECONDARY; import static android.os.UserManager.USER_TYPE_FULL_SYSTEM; import static android.os.UserManager.USER_TYPE_PROFILE_CLONE; import static android.os.UserManager.USER_TYPE_PROFILE_MANAGED; +import static android.os.UserManager.USER_TYPE_PROFILE_PRIVATE; import static android.os.UserManager.USER_TYPE_SYSTEM_HEADLESS; import static com.android.internal.util.FrameworkStatsLog.USER_LIFECYCLE_EVENT_OCCURRED__EVENT__UNKNOWN; @@ -245,6 +246,9 @@ public class UserJourneyLogger { .USER_LIFECYCLE_JOURNEY_REPORTED__USER_TYPE__SYSTEM_HEADLESS; case USER_TYPE_PROFILE_CLONE: return FrameworkStatsLog.USER_LIFECYCLE_JOURNEY_REPORTED__USER_TYPE__PROFILE_CLONE; + case USER_TYPE_PROFILE_PRIVATE: + return FrameworkStatsLog + .USER_LIFECYCLE_JOURNEY_REPORTED__USER_TYPE__PROFILE_PRIVATE; default: return FrameworkStatsLog.USER_LIFECYCLE_JOURNEY_REPORTED__USER_TYPE__TYPE_UNKNOWN; } diff --git a/services/core/java/com/android/server/pm/UserManagerService.java b/services/core/java/com/android/server/pm/UserManagerService.java index 81a570f0e7a5..4e14c908b01b 100644 --- a/services/core/java/com/android/server/pm/UserManagerService.java +++ b/services/core/java/com/android/server/pm/UserManagerService.java @@ -1388,10 +1388,32 @@ public class UserManagerService extends IUserManager.Stub { final long identity = Binder.clearCallingIdentity(); try { + // QUIET_MODE_DISABLE_DONT_ASK_CREDENTIAL is only allowed for managed-profiles + if (dontAskCredential) { + UserInfo userInfo; + synchronized (mUsersLock) { + userInfo = getUserInfo(userId); + } + if (!userInfo.isManagedProfile()) { + throw new IllegalArgumentException("Invalid flags: " + flags + + ". Can't skip credential check for the user"); + } + } if (enableQuietMode) { setQuietModeEnabled(userId, true /* enableQuietMode */, target, callingPackage); return true; } + if (android.os.Flags.allowPrivateProfile()) { + final UserProperties userProperties = getUserPropertiesInternal(userId); + if (userProperties != null + && userProperties.isAuthAlwaysRequiredToDisableQuietMode()) { + if (onlyIfCredentialNotRequired) { + return false; + } + showConfirmCredentialToDisableQuietMode(userId, target); + return false; + } + } final boolean hasUnifiedChallenge = mLockPatternUtils.isManagedProfileWithUnifiedChallenge(userId); if (hasUnifiedChallenge) { diff --git a/services/core/java/com/android/server/pm/UserTypeFactory.java b/services/core/java/com/android/server/pm/UserTypeFactory.java index 29e0c35d88bd..7da76c18216e 100644 --- a/services/core/java/com/android/server/pm/UserTypeFactory.java +++ b/services/core/java/com/android/server/pm/UserTypeFactory.java @@ -193,6 +193,7 @@ public final class UserTypeFactory { .setStartWithParent(true) .setShowInLauncher(UserProperties.SHOW_IN_LAUNCHER_SEPARATE) .setShowInSettings(UserProperties.SHOW_IN_SETTINGS_SEPARATE) + .setAuthAlwaysRequiredToDisableQuietMode(false) .setCredentialShareableWithParent(true)); } @@ -292,7 +293,8 @@ public final class UserTypeFactory { .setDefaultSecureSettings(getDefaultNonManagedProfileSecureSettings()) .setDefaultUserProperties(new UserProperties.Builder() .setStartWithParent(true) - .setCredentialShareableWithParent(false) + .setCredentialShareableWithParent(true) + .setAuthAlwaysRequiredToDisableQuietMode(true) .setMediaSharedWithParent(false) .setShowInLauncher(UserProperties.SHOW_IN_LAUNCHER_SEPARATE) .setShowInSettings(UserProperties.SHOW_IN_SETTINGS_SEPARATE) diff --git a/services/core/java/com/android/server/policy/PhoneWindowManager.java b/services/core/java/com/android/server/policy/PhoneWindowManager.java index cf1036c03c83..72c10cc9a5e8 100644 --- a/services/core/java/com/android/server/policy/PhoneWindowManager.java +++ b/services/core/java/com/android/server/policy/PhoneWindowManager.java @@ -32,7 +32,6 @@ import static android.os.Build.VERSION_CODES.M; import static android.os.Build.VERSION_CODES.O; import static android.os.IInputConstants.INVALID_INPUT_DEVICE_ID; import static android.provider.Settings.Secure.VOLUME_HUSH_OFF; -import static android.view.contentprotection.flags.Flags.createAccessibilityOverlayAppOpEnabled; import static android.view.Display.DEFAULT_DISPLAY; import static android.view.Display.INVALID_DISPLAY; import static android.view.Display.STATE_OFF; @@ -69,6 +68,7 @@ import static android.view.WindowManager.ScreenshotSource.SCREENSHOT_KEY_OTHER; import static android.view.WindowManager.TAKE_SCREENSHOT_FULLSCREEN; import static android.view.WindowManagerGlobal.ADD_OKAY; import static android.view.WindowManagerGlobal.ADD_PERMISSION_DENIED; +import static android.view.contentprotection.flags.Flags.createAccessibilityOverlayAppOpEnabled; import static com.android.internal.config.sysui.SystemUiDeviceConfigFlags.SCREENSHOT_KEYCHORD_DELAY; import static com.android.internal.util.FrameworkStatsLog.ACCESSIBILITY_SHORTCUT_REPORTED__SHORTCUT_TYPE__A11Y_WEAR_TRIPLE_PRESS_GESTURE; @@ -101,6 +101,7 @@ import android.app.ActivityManager.RecentTaskInfo; import android.app.ActivityManagerInternal; import android.app.ActivityTaskManager; import android.app.AppOpsManager; +import android.app.IActivityManager; import android.app.IUiModeManager; import android.app.NotificationManager; import android.app.ProgressDialog; @@ -427,6 +428,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { WindowManagerInternal mWindowManagerInternal; PowerManager mPowerManager; ActivityManagerInternal mActivityManagerInternal; + IActivityManager mActivityManagerService; ActivityTaskManagerInternal mActivityTaskManagerInternal; AutofillManagerInternal mAutofillManagerInternal; InputManager mInputManager; @@ -549,7 +551,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { int mLidNavigationAccessibility; int mShortPressOnPowerBehavior; private boolean mShouldEarlyShortPressOnPower; - private boolean mShouldEarlyShortPressOnStemPrimary; + boolean mShouldEarlyShortPressOnStemPrimary; int mLongPressOnPowerBehavior; long mLongPressOnPowerAssistantTimeoutMs; int mVeryLongPressOnPowerBehavior; @@ -578,6 +580,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { private int mDoublePressOnStemPrimaryBehavior; private int mTriplePressOnStemPrimaryBehavior; private int mLongPressOnStemPrimaryBehavior; + private RecentTaskInfo mBackgroundRecentTaskInfoOnStemPrimarySingleKeyUp; private boolean mHandleVolumeKeysInWM; @@ -1563,7 +1566,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { ? false : mKeyguardDelegate.isShowing(); if (!keyguardActive) { - switchRecentTask(); + performStemPrimaryDoublePressSwitchToRecentTask(); } break; } @@ -1672,11 +1675,11 @@ public class PhoneWindowManager implements WindowManagerPolicy { /** * Load most recent task (expect current task) and bring it to the front. */ - private void switchRecentTask() { - RecentTaskInfo targetTask = mActivityTaskManagerInternal.getMostRecentTaskFromBackground(); + void performStemPrimaryDoublePressSwitchToRecentTask() { + RecentTaskInfo targetTask = mBackgroundRecentTaskInfoOnStemPrimarySingleKeyUp; if (targetTask == null) { if (DEBUG_INPUT) { - Slog.w(TAG, "No recent task available! Show watch face."); + Slog.w(TAG, "No recent task available! Show wallpaper."); } goHome(); return; @@ -1695,7 +1698,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { + targetTask.baseIntent); } try { - ActivityManager.getService().startActivityFromRecents(targetTask.persistentId, null); + mActivityManagerService.startActivityFromRecents(targetTask.persistentId, null); } catch (RemoteException | IllegalArgumentException e) { Slog.e(TAG, "Failed to start task " + targetTask.persistentId + " from recents", e); } @@ -2219,6 +2222,10 @@ public class PhoneWindowManager implements WindowManagerPolicy { } }); } + + IActivityManager getActivityManagerService() { + return ActivityManager.getService(); + } } /** {@inheritDoc} */ @@ -2233,6 +2240,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { mWindowManagerFuncs = injector.getWindowManagerFuncs(); mWindowManagerInternal = LocalServices.getService(WindowManagerInternal.class); mActivityManagerInternal = LocalServices.getService(ActivityManagerInternal.class); + mActivityManagerService = injector.getActivityManagerService(); mActivityTaskManagerInternal = LocalServices.getService(ActivityTaskManagerInternal.class); mInputManager = mContext.getSystemService(InputManager.class); mInputManagerInternal = LocalServices.getService(InputManagerInternal.class); @@ -2767,8 +2775,17 @@ public class PhoneWindowManager implements WindowManagerPolicy { @Override void onKeyUp(long eventTime, int count) { - if (mShouldEarlyShortPressOnStemPrimary && count == 1) { - stemPrimaryPress(1 /*pressCount*/); + if (count == 1) { + // Save info about the most recent task on the first press of the stem key. This + // may be used later to switch to the most recent app using double press gesture. + // It is possible that we may navigate away from this task before the double + // press is detected, as a result of the first press, so we save the current + // most recent task before that happens. + mBackgroundRecentTaskInfoOnStemPrimarySingleKeyUp = + mActivityTaskManagerInternal.getMostRecentTaskFromBackground(); + if (mShouldEarlyShortPressOnStemPrimary) { + stemPrimaryPress(1 /*pressCount*/); + } } } } diff --git a/services/core/java/com/android/server/power/ThermalManagerService.java b/services/core/java/com/android/server/power/ThermalManagerService.java index 99064bc1884d..d17207b8f261 100644 --- a/services/core/java/com/android/server/power/ThermalManagerService.java +++ b/services/core/java/com/android/server/power/ThermalManagerService.java @@ -28,6 +28,7 @@ import android.hardware.thermal.V1_0.ThermalStatusCode; import android.hardware.thermal.V1_1.IThermalCallback; import android.os.Binder; import android.os.CoolingDevice; +import android.os.Flags; import android.os.Handler; import android.os.HwBinder; import android.os.IBinder; @@ -181,7 +182,7 @@ public class ThermalManagerService extends SystemService { onTemperatureChanged(temperatures.get(i), false); } onTemperatureMapChangedLocked(); - mTemperatureWatcher.updateSevereThresholds(); + mTemperatureWatcher.updateThresholds(); mHalReady.set(true); } } @@ -506,6 +507,20 @@ public class ThermalManagerService extends SystemService { } @Override + public float[] getThermalHeadroomThresholds() { + if (!mHalReady.get()) { + throw new IllegalStateException("Thermal HAL connection is not initialized"); + } + if (!Flags.allowThermalHeadroomThresholds()) { + throw new UnsupportedOperationException("Thermal headroom thresholds not enabled"); + } + synchronized (mTemperatureWatcher.mSamples) { + return Arrays.copyOf(mTemperatureWatcher.mHeadroomThresholds, + mTemperatureWatcher.mHeadroomThresholds.length); + } + } + + @Override protected void dump(FileDescriptor fd, PrintWriter pw, String[] args) { dumpInternal(fd, pw, args); } @@ -580,6 +595,12 @@ public class ThermalManagerService extends SystemService { mHalWrapper.getTemperatureThresholds(false, 0)); } } + if (Flags.allowThermalHeadroomThresholds()) { + synchronized (mTemperatureWatcher.mSamples) { + pw.println("Temperature headroom thresholds:"); + pw.println(Arrays.toString(mTemperatureWatcher.mHeadroomThresholds)); + } + } } finally { Binder.restoreCallingIdentity(token); } @@ -964,7 +985,14 @@ public class ThermalManagerService extends SystemService { connectToHal(); } if (mInstance != null) { - Slog.i(TAG, "Thermal HAL AIDL service connected."); + try { + Slog.i(TAG, "Thermal HAL AIDL service connected with version " + + mInstance.getInterfaceVersion()); + } catch (RemoteException e) { + Slog.e(TAG, "Unable to read interface version from Thermal HAL", e); + connectToHal(); + return; + } registerThermalChangedCallback(); } } @@ -1440,26 +1468,55 @@ public class ThermalManagerService extends SystemService { ArrayMap<String, Float> mSevereThresholds = new ArrayMap<>(); @GuardedBy("mSamples") + float[] mHeadroomThresholds = new float[ThrottlingSeverity.SHUTDOWN + 1]; + @GuardedBy("mSamples") private long mLastForecastCallTimeMillis = 0; private static final int INACTIVITY_THRESHOLD_MILLIS = 10000; @VisibleForTesting long mInactivityThresholdMillis = INACTIVITY_THRESHOLD_MILLIS; - void updateSevereThresholds() { + void updateThresholds() { synchronized (mSamples) { List<TemperatureThreshold> thresholds = mHalWrapper.getTemperatureThresholds(true, Temperature.TYPE_SKIN); + if (Flags.allowThermalHeadroomThresholds()) { + Arrays.fill(mHeadroomThresholds, Float.NaN); + } for (int t = 0; t < thresholds.size(); ++t) { TemperatureThreshold threshold = thresholds.get(t); if (threshold.hotThrottlingThresholds.length <= ThrottlingSeverity.SEVERE) { continue; } - float temperature = + float severeThreshold = threshold.hotThrottlingThresholds[ThrottlingSeverity.SEVERE]; - if (!Float.isNaN(temperature)) { - mSevereThresholds.put(threshold.name, - threshold.hotThrottlingThresholds[ThrottlingSeverity.SEVERE]); + if (!Float.isNaN(severeThreshold)) { + mSevereThresholds.put(threshold.name, severeThreshold); + for (int severity = ThrottlingSeverity.LIGHT; + severity <= ThrottlingSeverity.SHUTDOWN; severity++) { + if (Flags.allowThermalHeadroomThresholds() + && threshold.hotThrottlingThresholds.length > severity) { + updateHeadroomThreshold(severity, + threshold.hotThrottlingThresholds[severity], + severeThreshold); + } + } + } + } + } + } + + // For a older device with multiple SKIN sensors, we will set a severity's headroom + // threshold based on the minimum value of all as a workaround. + void updateHeadroomThreshold(int severity, float threshold, float severeThreshold) { + if (!Float.isNaN(threshold)) { + synchronized (mSamples) { + float headroom = normalizeTemperature(threshold, severeThreshold); + if (Float.isNaN(mHeadroomThresholds[severity])) { + mHeadroomThresholds[severity] = headroom; + } else { + float lastHeadroom = mHeadroomThresholds[severity]; + mHeadroomThresholds[severity] = Math.min(lastHeadroom, headroom); } } } @@ -1541,15 +1598,13 @@ public class ThermalManagerService extends SystemService { private static final float DEGREES_BETWEEN_ZERO_AND_ONE = 30.0f; @VisibleForTesting - float normalizeTemperature(float temperature, float severeThreshold) { - synchronized (mSamples) { - float zeroNormalized = severeThreshold - DEGREES_BETWEEN_ZERO_AND_ONE; - if (temperature <= zeroNormalized) { - return 0.0f; - } - float delta = temperature - zeroNormalized; - return delta / DEGREES_BETWEEN_ZERO_AND_ONE; + static float normalizeTemperature(float temperature, float severeThreshold) { + float zeroNormalized = severeThreshold - DEGREES_BETWEEN_ZERO_AND_ONE; + if (temperature <= zeroNormalized) { + return 0.0f; } + float delta = temperature - zeroNormalized; + return delta / DEGREES_BETWEEN_ZERO_AND_ONE; } private static final int MINIMUM_SAMPLE_COUNT = 3; diff --git a/services/core/java/com/android/server/wallpaper/WallpaperDisplayHelper.java b/services/core/java/com/android/server/wallpaper/WallpaperDisplayHelper.java index 3f0226663cff..f48178c5b9f7 100644 --- a/services/core/java/com/android/server/wallpaper/WallpaperDisplayHelper.java +++ b/services/core/java/com/android/server/wallpaper/WallpaperDisplayHelper.java @@ -124,7 +124,7 @@ class WallpaperDisplayHelper { final long ident = Binder.clearCallingIdentity(); try { - return mWindowManagerInternal.shouldShowSystemDecorOnDisplay(displayId); + return mWindowManagerInternal.isHomeSupportedOnDisplay(displayId); } finally { Binder.restoreCallingIdentity(ident); } diff --git a/services/core/java/com/android/server/wm/AccessibilityController.java b/services/core/java/com/android/server/wm/AccessibilityController.java index b3ae2ee30f22..b1abe2a567e8 100644 --- a/services/core/java/com/android/server/wm/AccessibilityController.java +++ b/services/core/java/com/android/server/wm/AccessibilityController.java @@ -558,7 +558,7 @@ final class AccessibilityController { } if (newTarget != null) { int displayId = newTarget.getDisplayId(); - IBinder clientBinder = newTarget.getIWindow().asBinder(); + IBinder clientBinder = newTarget.getWindowToken(); mFocusedWindow.put(displayId, clientBinder); } } diff --git a/services/core/java/com/android/server/wm/AccessibilityWindowsPopulator.java b/services/core/java/com/android/server/wm/AccessibilityWindowsPopulator.java index cdd1a2699e5b..3cf19ddbd89d 100644 --- a/services/core/java/com/android/server/wm/AccessibilityWindowsPopulator.java +++ b/services/core/java/com/android/server/wm/AccessibilityWindowsPopulator.java @@ -34,7 +34,6 @@ import android.os.Message; import android.util.Pair; import android.util.Slog; import android.util.SparseArray; -import android.view.IWindow; import android.view.InputWindowHandle; import android.view.MagnificationSpec; import android.view.WindowInfo; @@ -197,14 +196,14 @@ public final class AccessibilityWindowsPopulator extends WindowInfosListener { final HashMap<IBinder, Matrix> windowsTransformMatrixMap = new HashMap<>(); for (InputWindowHandle inputWindowHandle : windows) { - final IWindow iWindow = inputWindowHandle.getWindow(); - final WindowState windowState = iWindow != null ? mService.mWindowMap.get( - iWindow.asBinder()) : null; + final IBinder iWindow = inputWindowHandle.getWindowToken(); + final WindowState windowState = iWindow != null ? mService.mWindowMap.get(iWindow) + : null; if (windowState != null && windowState.shouldMagnify()) { final Matrix transformMatrix = new Matrix(); windowState.getTransformationMatrix(sTempFloats, transformMatrix); - windowsTransformMatrixMap.put(iWindow.asBinder(), transformMatrix); + windowsTransformMatrixMap.put(iWindow, transformMatrix); } } @@ -330,8 +329,8 @@ public final class AccessibilityWindowsPopulator extends WindowInfosListener { // the old and new windows at the same index should be the // same, otherwise something changed. for (int i = 0; i < windowsCount; i++) { - final IWindow newWindowToken = newWindows.get(i).getWindow(); - final IWindow oldWindowToken = oldWindows.get(i).getWindow(); + final IBinder newWindowToken = newWindows.get(i).getWindowToken(); + final IBinder oldWindowToken = oldWindows.get(i).getWindowToken(); final boolean hasNewWindowToken = newWindowToken != null; final boolean hasOldWindowToken = oldWindowToken != null; @@ -342,8 +341,7 @@ public final class AccessibilityWindowsPopulator extends WindowInfosListener { // If both old and new windows had window tokens, but those tokens differ, // then the windows have changed. - if (hasNewWindowToken && hasOldWindowToken - && !newWindowToken.asBinder().equals(oldWindowToken.asBinder())) { + if (hasNewWindowToken && hasOldWindowToken && !newWindowToken.equals(oldWindowToken)) { return true; } } @@ -393,9 +391,7 @@ public final class AccessibilityWindowsPopulator extends WindowInfosListener { for (int index = inputWindowHandles.size() - 1; index >= 0; index--) { final Matrix windowTransformMatrix = mTempMatrix2; final InputWindowHandle windowHandle = inputWindowHandles.get(index); - final IBinder iBinder = - windowHandle.getWindow() != null ? windowHandle.getWindow().asBinder() : null; - + final IBinder iBinder = windowHandle.getWindowToken(); if (getWindowTransformMatrix(iBinder, windowTransformMatrix)) { generateMagnificationSpecInverseMatrix(windowHandle, currentMagnificationSpec, previousMagnificationSpec, windowTransformMatrix); @@ -645,7 +641,7 @@ public final class AccessibilityWindowsPopulator extends WindowInfosListener { */ public static class AccessibilityWindow { // Data - private IWindow mWindow; + private IBinder mWindow; private int mDisplayId; @WindowManager.LayoutParams.WindowType private int mType; @@ -670,9 +666,8 @@ public final class AccessibilityWindowsPopulator extends WindowInfosListener { public static AccessibilityWindow initializeData(WindowManagerService service, InputWindowHandle inputWindowHandle, Matrix magnificationInverseMatrix, IBinder pipIBinder, Matrix displayMatrix) { - final IWindow window = inputWindowHandle.getWindow(); - final WindowState windowState = window != null ? service.mWindowMap.get( - window.asBinder()) : null; + final IBinder window = inputWindowHandle.getWindowToken(); + final WindowState windowState = window != null ? service.mWindowMap.get(window) : null; final AccessibilityWindow instance = new AccessibilityWindow(); @@ -680,7 +675,7 @@ public final class AccessibilityWindowsPopulator extends WindowInfosListener { instance.mDisplayId = inputWindowHandle.displayId; instance.mInputConfig = inputWindowHandle.inputConfig; instance.mType = inputWindowHandle.layoutParamsType; - instance.mIsPIPMenu = window != null && window.asBinder().equals(pipIBinder); + instance.mIsPIPMenu = window != null && window.equals(pipIBinder); // TODO (b/199357848): gets the private flag of the window from other way. instance.mPrivateFlags = windowState != null ? windowState.mAttrs.privateFlags : 0; @@ -867,7 +862,7 @@ public final class AccessibilityWindowsPopulator extends WindowInfosListener { WindowInfo windowInfo = WindowInfo.obtain(); windowInfo.displayId = window.mDisplayId; windowInfo.type = window.mType; - windowInfo.token = window.mWindow != null ? window.mWindow.asBinder() : null; + windowInfo.token = window.mWindow; windowInfo.hasFlagWatchOutsideTouch = (window.mInputConfig & InputConfig.WATCH_OUTSIDE_TOUCH) != 0; // Set it to true to be consistent with the legacy implementation. @@ -878,7 +873,7 @@ public final class AccessibilityWindowsPopulator extends WindowInfosListener { @Override public String toString() { String windowToken = - mWindow != null ? mWindow.asBinder().toString() : "(no window token)"; + mWindow != null ? mWindow.toString() : "(no window token)"; return "A11yWindow=[" + windowToken + ", displayId=" + mDisplayId + ", inputConfig=0x" + Integer.toHexString(mInputConfig) diff --git a/services/core/java/com/android/server/wm/ActivityTaskManagerService.java b/services/core/java/com/android/server/wm/ActivityTaskManagerService.java index 3c56a4e5eb04..3ec58f05ac96 100644 --- a/services/core/java/com/android/server/wm/ActivityTaskManagerService.java +++ b/services/core/java/com/android/server/wm/ActivityTaskManagerService.java @@ -414,6 +414,8 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub { boolean mHasCompanionDeviceSetupFeature; /** The process of the top most activity. */ volatile WindowProcessController mTopApp; + /** The process showing UI while the device is dozing. */ + volatile WindowProcessController mVisibleDozeUiProcess; /** * This is the process holding the activity the user last visited that is in a different process * from the one they are currently in. diff --git a/services/core/java/com/android/server/wm/BackNavigationController.java b/services/core/java/com/android/server/wm/BackNavigationController.java index 87ae045d4f12..43f32096b6c0 100644 --- a/services/core/java/com/android/server/wm/BackNavigationController.java +++ b/services/core/java/com/android/server/wm/BackNavigationController.java @@ -39,7 +39,6 @@ import android.content.res.ResourceId; import android.graphics.Point; import android.graphics.Rect; import android.os.Bundle; -import android.os.IBinder; import android.os.RemoteCallback; import android.os.RemoteException; import android.os.SystemProperties; @@ -60,7 +59,6 @@ import android.window.TaskSnapshot; import com.android.internal.annotations.VisibleForTesting; import com.android.internal.policy.TransitionAnimation; import com.android.internal.protolog.common.ProtoLog; -import com.android.server.LocalServices; import com.android.server.wm.utils.InsetUtils; import java.io.PrintWriter; @@ -151,97 +149,77 @@ class BackNavigationController { // Don't start any animation for it. return null; } - WindowManagerInternal windowManagerInternal = - LocalServices.getService(WindowManagerInternal.class); - IBinder focusedWindowToken = windowManagerInternal.getFocusedWindowToken(); window = wmService.getFocusedWindowLocked(); if (window == null) { - EmbeddedWindowController.EmbeddedWindow embeddedWindow = - wmService.mEmbeddedWindowController.getByInputTransferToken( - focusedWindowToken); - if (embeddedWindow != null) { - ProtoLog.d(WM_DEBUG_BACK_PREVIEW, - "Current focused window is embeddedWindow. Dispatch KEYCODE_BACK."); - return null; - } - } - - // Lets first gather the states of things - // - What is our current window ? - // - Does it has an Activity and a Task ? - // TODO Temp workaround for Sysui until b/221071505 is fixed - if (window != null) { - ProtoLog.d(WM_DEBUG_BACK_PREVIEW, - "Focused window found using getFocusedWindowToken"); - } - - if (window != null) { - // This is needed to bridge the old and new back behavior with recents. While in - // Overview with live tile enabled, the previous app is technically focused but we - // add an input consumer to capture all input that would otherwise go to the apps - // being controlled by the animation. This means that the window resolved is not - // the right window to consume back while in overview, so we need to route it to - // launcher and use the legacy behavior of injecting KEYCODE_BACK since the existing - // compat callback in VRI only works when the window is focused. - // This symptom also happen while shell transition enabled, we can check that by - // isTransientLaunch to know whether the focus window is point to live tile. - final RecentsAnimationController recentsAnimationController = - wmService.getRecentsAnimationController(); - final ActivityRecord ar = window.mActivityRecord; - if ((ar != null && ar.isActivityTypeHomeOrRecents() - && ar.mTransitionController.isTransientLaunch(ar)) - || (recentsAnimationController != null - && recentsAnimationController.shouldApplyInputConsumer(ar))) { - ProtoLog.d(WM_DEBUG_BACK_PREVIEW, "Current focused window being animated by " - + "recents. Overriding back callback to recents controller callback."); - return null; - } - - if (!window.isDrawn()) { - ProtoLog.d(WM_DEBUG_BACK_PREVIEW, - "Focused window didn't have a valid surface drawn."); - return null; - } - } - - if (window == null) { // We don't have any focused window, fallback ont the top currentTask of the focused // display. ProtoLog.w(WM_DEBUG_BACK_PREVIEW, "No focused window, defaulting to top current task's window"); currentTask = wmService.mAtmService.getTopDisplayFocusedRootTask(); - window = currentTask.getWindow(WindowState::isFocused); + window = currentTask != null + ? currentTask.getWindow(WindowState::isFocused) : null; + } + + if (window == null) { + Slog.e(TAG, "Window is null, returning null."); + return null; } + // This is needed to bridge the old and new back behavior with recents. While in + // Overview with live tile enabled, the previous app is technically focused but we + // add an input consumer to capture all input that would otherwise go to the apps + // being controlled by the animation. This means that the window resolved is not + // the right window to consume back while in overview, so we need to route it to + // launcher and use the legacy behavior of injecting KEYCODE_BACK since the existing + // compat callback in VRI only works when the window is focused. + // This symptom also happen while shell transition enabled, we can check that by + // isTransientLaunch to know whether the focus window is point to live tile. + final RecentsAnimationController recentsAnimationController = + wmService.getRecentsAnimationController(); + final ActivityRecord tmpAR = window.mActivityRecord; + if ((tmpAR != null && tmpAR.isActivityTypeHomeOrRecents() + && tmpAR.mTransitionController.isTransientLaunch(tmpAR)) + || (recentsAnimationController != null + && recentsAnimationController.shouldApplyInputConsumer(tmpAR))) { + ProtoLog.d(WM_DEBUG_BACK_PREVIEW, "Current focused window being animated by " + + "recents. Overriding back callback to recents controller callback."); + return null; + } + + if (!window.isDrawn()) { + ProtoLog.d(WM_DEBUG_BACK_PREVIEW, + "Focused window didn't have a valid surface drawn."); + return null; + } + + currentActivity = window.mActivityRecord; + currentTask = window.getTask(); + if ((currentTask != null && !currentTask.isVisibleRequested()) + || (currentActivity != null && !currentActivity.isVisibleRequested())) { + // Closing transition is happening on focus window and should be update soon, + // don't drive back navigation with it. + ProtoLog.d(WM_DEBUG_BACK_PREVIEW, "Focus window is closing."); + return null; + } // Now let's find if this window has a callback from the client side. - OnBackInvokedCallbackInfo callbackInfo = null; - if (window != null) { - currentActivity = window.mActivityRecord; - currentTask = window.getTask(); - callbackInfo = window.getOnBackInvokedCallbackInfo(); - if (callbackInfo == null) { - Slog.e(TAG, "No callback registered, returning null."); - return null; - } - if (!callbackInfo.isSystemCallback()) { - backType = BackNavigationInfo.TYPE_CALLBACK; - } - infoBuilder.setOnBackInvokedCallback(callbackInfo.getCallback()); - infoBuilder.setAnimationCallback(callbackInfo.isAnimationCallback()); - mNavigationMonitor.startMonitor(window, navigationObserver); + final OnBackInvokedCallbackInfo callbackInfo = window.getOnBackInvokedCallbackInfo(); + if (callbackInfo == null) { + Slog.e(TAG, "No callback registered, returning null."); + return null; } + if (!callbackInfo.isSystemCallback()) { + backType = BackNavigationInfo.TYPE_CALLBACK; + } + infoBuilder.setOnBackInvokedCallback(callbackInfo.getCallback()); + infoBuilder.setAnimationCallback(callbackInfo.isAnimationCallback()); + mNavigationMonitor.startMonitor(window, navigationObserver); ProtoLog.d(WM_DEBUG_BACK_PREVIEW, "startBackNavigation currentTask=%s, " + "topRunningActivity=%s, callbackInfo=%s, currentFocus=%s", currentTask, currentActivity, callbackInfo, window); - if (window == null) { - Slog.e(TAG, "Window is null, returning null."); - return null; - } - // If we don't need to set up the animation, we return early. This is the case when // - We have an application callback. // - We don't have any ActivityRecord or Task to animate. @@ -322,12 +300,13 @@ class BackNavigationController { } return false; }, currentTask, false /*includeBoundary*/, true /*traverseTopToBottom*/); - final ActivityRecord tmpPre = prevTask.getTopNonFinishingActivity(); + final ActivityRecord tmpPre = prevTask != null + ? prevTask.getTopNonFinishingActivity() : null; if (tmpPre != null) { prevActivities.add(tmpPre); findAdjacentActivityIfExist(tmpPre, prevActivities); } - if (prevActivities.isEmpty() + if (prevTask == null || prevActivities.isEmpty() || (isOccluded && !prevActivities.get(0).canShowWhenLocked())) { backType = BackNavigationInfo.TYPE_CALLBACK; } else if (prevTask.isActivityTypeHome()) { diff --git a/services/core/java/com/android/server/wm/BackgroundActivityStartController.java b/services/core/java/com/android/server/wm/BackgroundActivityStartController.java index c2b5f88d0b4f..a3e1c8c90d32 100644 --- a/services/core/java/com/android/server/wm/BackgroundActivityStartController.java +++ b/services/core/java/com/android/server/wm/BackgroundActivityStartController.java @@ -29,6 +29,7 @@ import static com.android.server.wm.ActivityTaskManagerDebugConfig.TAG_WITH_CLAS import static com.android.server.wm.ActivityTaskManagerService.APP_SWITCH_ALLOW; import static com.android.server.wm.ActivityTaskManagerService.APP_SWITCH_FG_ONLY; import static com.android.server.wm.ActivityTaskSupervisor.getApplicationLabel; +import static com.android.window.flags.Flags.balRequireOptInByPendingIntentCreator; import static com.android.window.flags.Flags.balShowToasts; import static com.android.window.flags.Flags.balShowToastsBlocked; import static com.android.server.wm.PendingRemoteAnimationRegistry.TIMEOUT_MS; @@ -42,9 +43,14 @@ import android.app.ActivityManager; import android.app.ActivityOptions; import android.app.AppOpsManager; import android.app.BackgroundStartPrivileges; +import android.app.compat.CompatChanges; +import android.compat.annotation.ChangeId; +import android.compat.annotation.EnabledAfter; +import android.compat.annotation.Overridable; import android.content.ComponentName; import android.content.Intent; import android.content.pm.PackageManager; +import android.os.Build; import android.os.Process; import android.os.UserHandle; import android.provider.DeviceConfig; @@ -79,6 +85,12 @@ public class BackgroundActivityStartController { private static final long ASM_GRACEPERIOD_TIMEOUT_MS = TIMEOUT_MS; private static final int ASM_GRACEPERIOD_MAX_REPEATS = 5; private static final int NO_PROCESS_UID = -1; + /** If enabled the creator will not allow BAL on its behalf by default. */ + @ChangeId + @EnabledAfter(targetSdkVersion = Build.VERSION_CODES.UPSIDE_DOWN_CAKE) + @Overridable + private static final long DEFAULT_RESCIND_BAL_PRIVILEGES_FROM_PENDING_INTENT_CREATOR = + 296478951; public static final ActivityOptions ACTIVITY_OPTIONS_SYSTEM_DEFINED = ActivityOptions.makeBasic() .setPendingIntentBackgroundActivityStartMode( @@ -264,12 +276,9 @@ public class BackgroundActivityStartController { ? BackgroundStartPrivileges.NONE : BackgroundStartPrivileges.ALLOW_BAL; } else { - // for PendingIntents we restrict creator BAL based on target_sdk - mBalAllowedByPiCreator = - checkedOptions.getPendingIntentCreatorBackgroundActivityStartMode() - == ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_DENIED - ? BackgroundStartPrivileges.NONE - : BackgroundStartPrivileges.ALLOW_BAL; + // for PendingIntents we restrict BAL based on target_sdk + mBalAllowedByPiCreator = getBackgroundStartPrivilegesAllowedByCreator( + callingUid, callingPackage, checkedOptions); } mBalAllowedByPiSender = PendingIntentRecord.getBackgroundStartPrivilegesAllowedByCaller( @@ -303,6 +312,45 @@ public class BackgroundActivityStartController { } } + private BackgroundStartPrivileges getBackgroundStartPrivilegesAllowedByCreator( + int callingUid, String callingPackage, ActivityOptions checkedOptions) { + switch (checkedOptions.getPendingIntentCreatorBackgroundActivityStartMode()) { + case ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_ALLOWED: + return BackgroundStartPrivileges.ALLOW_BAL; + case ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_DENIED: + return BackgroundStartPrivileges.NONE; + case ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_SYSTEM_DEFINED: + // no explicit choice by the app - let us decide what to do + Slog.i(TAG, "balRequireOptInByPendingIntentCreator = " + + balRequireOptInByPendingIntentCreator()); + if (!balRequireOptInByPendingIntentCreator()) { + // if feature is disabled allow + return BackgroundStartPrivileges.ALLOW_BAL; + } + if (callingPackage != null) { + // determine based on the calling/creating package + boolean changeEnabled = CompatChanges.isChangeEnabled( + DEFAULT_RESCIND_BAL_PRIVILEGES_FROM_PENDING_INTENT_CREATOR, + callingPackage, + UserHandle.getUserHandleForUid(callingUid)); + Slog.i(TAG, "changeEnabled = " + changeEnabled); + return changeEnabled ? BackgroundStartPrivileges.NONE + : BackgroundStartPrivileges.ALLOW_BAL; + } + // determine based on the calling/creating uid if we cannot determine the + // actual package name (e.g. shared uid) + boolean changeEnabled = CompatChanges.isChangeEnabled( + DEFAULT_RESCIND_BAL_PRIVILEGES_FROM_PENDING_INTENT_CREATOR, + callingUid); + Slog.i(TAG, "changeEnabled = " + changeEnabled); + return changeEnabled ? BackgroundStartPrivileges.NONE + : BackgroundStartPrivileges.ALLOW_BAL; + default: + throw new IllegalStateException("unsupported BackgroundActivityStartMode: " + + checkedOptions.getPendingIntentCreatorBackgroundActivityStartMode()); + } + } + private String getDebugPackageName(String packageName, int uid) { if (packageName != null) { return packageName; // use actual package @@ -322,7 +370,7 @@ public class BackgroundActivityStartController { } private boolean isPendingIntent() { - return mOriginatingPendingIntent != null; + return mOriginatingPendingIntent != null && hasRealCaller(); } private String dump(BalVerdict resultIfPiCreatorAllowsBal) { @@ -341,18 +389,23 @@ public class BackgroundActivityStartController { .append(getDebugPackageName(mCallingPackage, mCallingUid)); sb.append("; callingUid: ").append(mCallingUid); sb.append("; callingPid: ").append(mCallingPid); - sb.append("; isPendingIntent: ").append(isPendingIntent()); sb.append("; appSwitchState: ").append(mAppSwitchState); sb.append("; callingUidHasAnyVisibleWindow: ").append(mCallingUidHasAnyVisibleWindow); sb.append("; callingUidProcState: ").append(DebugUtils.valueToString( ActivityManager.class, "PROCESS_STATE_", mCallingUidProcState)); sb.append("; isCallingUidPersistentSystemProcess: ") .append(mIsCallingUidPersistentSystemProcess); + sb.append("; forcedBalByPiSender: ").append(mForcedBalByPiSender); + sb.append("; intent: ").append(mIntent); + sb.append("; callerApp: ").append(mCallerApp); + if (mCallerApp != null) { + sb.append("; inVisibleTask: ").append(mCallerApp.hasActivityInVisibleTask()); + } sb.append("; balAllowedByPiCreator: ").append(mBalAllowedByPiCreator); + sb.append("; resultIfPiCreatorAllowsBal: ").append(resultIfPiCreatorAllowsBal); sb.append("; hasRealCaller: ").append(hasRealCaller()); sb.append("; isPendingIntent: ").append(isPendingIntent()); if (hasRealCaller()) { - sb.append("; balAllowedByPiSender: ").append(mBalAllowedByPiSender); sb.append("; realCallingPackage: ") .append(getDebugPackageName(mRealCallingPackage, mRealCallingUid)); sb.append("; realCallingUid: ").append(mRealCallingUid); @@ -364,24 +417,14 @@ public class BackgroundActivityStartController { sb.append("; isRealCallingUidPersistentSystemProcess: ") .append(mIsRealCallingUidPersistentSystemProcess); sb.append("; originatingPendingIntent: ").append(mOriginatingPendingIntent); - } - sb.append("; mForcedBalByPiSender: ").append(mForcedBalByPiSender); - sb.append("; intent: ").append(mIntent); - sb.append("; callerApp: ").append(mCallerApp); - if (hasRealCaller()) { sb.append("; realCallerApp: ").append(mRealCallerApp); - } - if (mCallerApp != null) { - sb.append("; inVisibleTask: ").append(mCallerApp.hasActivityInVisibleTask()); - } - if (hasRealCaller()) { if (mRealCallerApp != null) { sb.append("; realInVisibleTask: ") .append(mRealCallerApp.hasActivityInVisibleTask()); } + sb.append("; balAllowedByPiSender: ").append(mBalAllowedByPiSender); sb.append("; resultIfPiSenderAllowsBal: ").append(resultIfPiSenderAllowsBal); } - sb.append("; resultIfPiCreatorAllowsBal: ").append(resultIfPiCreatorAllowsBal); sb.append("]"); return sb.toString(); } @@ -416,10 +459,9 @@ public class BackgroundActivityStartController { public String toString() { StringBuilder builder = new StringBuilder(); - builder.append(". BAL Code: "); builder.append(balCodeToString(mCode)); if (DEBUG_ACTIVITY_STARTS) { - builder.append(" "); + builder.append(" ("); if (mBackground) { builder.append("Background "); } @@ -433,6 +475,7 @@ public class BackgroundActivityStartController { builder.append(" "); builder.append(mProcessInfo); } + builder.append(")"); } return builder.toString(); } @@ -551,29 +594,40 @@ public class BackgroundActivityStartController { && checkedOptions.getPendingIntentBackgroundActivityStartMode() == ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_SYSTEM_DEFINED) { // Both caller and real caller allow with system defined behavior + if (state.mBalAllowedByPiCreator.allowsBackgroundActivityStarts()) { + Slog.wtf(TAG, + "With Android 15 BAL hardening this activity start may be blocked" + + " if the PI creator upgrades target_sdk to 35+" + + " AND the PI sender upgrades target_sdk to 34+! " + + state.dump(resultForCaller, resultForRealCaller)); + showBalRiskToast("BAL would be blocked", state); + // return the realCaller result for backwards compatibility + return statsLog(resultForRealCaller, state); + } Slog.wtf(TAG, - "With Android 15 BAL hardening this activity start may be blocked" - + " if the PI creator upgrades target_sdk to 35+" - + " AND the PI sender upgrades target_sdk to 34+! " - + " (missing opt in by PI creator)! " + "Without Android 15 BAL hardening this activity start would be allowed" + + " (missing opt in by PI creator or sender)! " + state.dump(resultForCaller, resultForRealCaller)); - showBalRiskToast("BAL would be blocked", state); - // return the realCaller result for backwards compatibility - return statsLog(resultForRealCaller, state); - } - if (resultForCaller.allows() + // fall through to abort + } else if (resultForCaller.allows() && checkedOptions.getPendingIntentCreatorBackgroundActivityStartMode() == ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_SYSTEM_DEFINED) { // Allowed before V by creator + if (state.mBalAllowedByPiCreator.allowsBackgroundActivityStarts()) { + Slog.wtf(TAG, + "With Android 15 BAL hardening this activity start may be blocked" + + " if the PI creator upgrades target_sdk to 35+! " + + " (missing opt in by PI creator)! " + + state.dump(resultForCaller, resultForRealCaller)); + showBalRiskToast("BAL would be blocked", state); + return statsLog(resultForCaller, state); + } Slog.wtf(TAG, - "With Android 15 BAL hardening this activity start may be blocked" - + " if the PI creator upgrades target_sdk to 35+! " + "Without Android 15 BAL hardening this activity start would be allowed" + " (missing opt in by PI creator)! " + state.dump(resultForCaller, resultForRealCaller)); - showBalRiskToast("BAL would be blocked", state); - return statsLog(resultForCaller, state); - } - if (resultForRealCaller.allows() + // fall through to abort + } else if (resultForRealCaller.allows() && checkedOptions.getPendingIntentBackgroundActivityStartMode() == ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_SYSTEM_DEFINED) { // Allowed before U by sender @@ -589,7 +643,7 @@ public class BackgroundActivityStartController { Slog.wtf(TAG, "Without Android 14 BAL hardening this activity start would be allowed" + " (missing opt in by PI sender)! " + state.dump(resultForCaller, resultForRealCaller)); - // fall through + // fall through to abort } // anything that has fallen through would currently be aborted Slog.w(TAG, "Background activity launch blocked! " diff --git a/services/core/java/com/android/server/wm/DisplayContent.java b/services/core/java/com/android/server/wm/DisplayContent.java index 7f80807e137b..49248107a004 100644 --- a/services/core/java/com/android/server/wm/DisplayContent.java +++ b/services/core/java/com/android/server/wm/DisplayContent.java @@ -184,6 +184,7 @@ import android.graphics.Region; import android.graphics.Region.Op; import android.hardware.HardwareBuffer; import android.hardware.display.DisplayManagerInternal; +import android.hardware.display.VirtualDisplayConfig; import android.metrics.LogMaker; import android.os.Bundle; import android.os.Debug; @@ -2191,7 +2192,7 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp * @see DisplayWindowPolicyController#getCustomHomeComponent() () */ @Nullable ComponentName getCustomHomeComponent() { - if (!supportsSystemDecorations() || mDwpcHelper == null) { + if (!isHomeSupported() || mDwpcHelper == null) { return null; } return mDwpcHelper.getCustomHomeComponent(); @@ -5772,6 +5773,17 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp && isTrusted(); } + /** + * Checks if this display is configured and allowed to show home activity and wallpaper. + * + * <p>This is implied for displays that have {@link Display#FLAG_SHOULD_SHOW_SYSTEM_DECORATIONS} + * and can also be set via {@link VirtualDisplayConfig.Builder#setHomeSupported}.</p> + */ + boolean isHomeSupported() { + return (mWmService.mDisplayWindowSettings.isHomeSupportedLocked(this) && isTrusted()) + || supportsSystemDecorations(); + } + SurfaceControl getWindowingLayer() { return mWindowingLayer; } diff --git a/services/core/java/com/android/server/wm/DisplayPolicy.java b/services/core/java/com/android/server/wm/DisplayPolicy.java index 8a7cc67c3660..708ee7f59726 100644 --- a/services/core/java/com/android/server/wm/DisplayPolicy.java +++ b/services/core/java/com/android/server/wm/DisplayPolicy.java @@ -99,6 +99,7 @@ import android.os.Looper; import android.os.Message; import android.os.SystemClock; import android.os.SystemProperties; +import android.os.Trace; import android.os.UserHandle; import android.util.ArraySet; import android.util.PrintWriterPrinter; @@ -781,6 +782,12 @@ public class DisplayPolicy { if (!mDisplayContent.isDefaultDisplay) { return; } + if (awake) { + mService.mAtmService.mVisibleDozeUiProcess = null; + } else if (mScreenOnFully && mNotificationShade != null) { + // Screen is still on, so it may be showing an always-on UI. + mService.mAtmService.mVisibleDozeUiProcess = mNotificationShade.getProcess(); + } mService.mAtmService.mKeyguardController.updateDeferTransitionForAod( mAwake /* waiting */); } @@ -826,12 +833,24 @@ public class DisplayPolicy { } public void screenTurnedOn(ScreenOnListener screenOnListener) { + WindowProcessController visibleDozeUiProcess = null; synchronized (mLock) { mScreenOnEarly = true; mScreenOnFully = false; mKeyguardDrawComplete = false; mWindowManagerDrawComplete = false; mScreenOnListener = screenOnListener; + if (!mAwake && mNotificationShade != null) { + // The screen is turned on without awake state. It is usually triggered by an + // adding notification, so make the UI process have a higher priority. + visibleDozeUiProcess = mNotificationShade.getProcess(); + mService.mAtmService.mVisibleDozeUiProcess = visibleDozeUiProcess; + } + } + // The method calls AM directly, so invoke it outside the lock. + if (visibleDozeUiProcess != null) { + Trace.instant(Trace.TRACE_TAG_WINDOW_MANAGER, "screenTurnedOnWhileDozing"); + mService.mAtmService.setProcessAnimatingWhileDozing(visibleDozeUiProcess); } } @@ -842,6 +861,7 @@ public class DisplayPolicy { mKeyguardDrawComplete = false; mWindowManagerDrawComplete = false; mScreenOnListener = null; + mService.mAtmService.mVisibleDozeUiProcess = null; } } @@ -1877,15 +1897,12 @@ public class DisplayPolicy { final InsetsState insetsState = df.mInsetsState; final Rect displayFrame = insetsState.getDisplayFrame(); final Insets decor = insetsState.calculateInsets(displayFrame, - dc.mWmService.mDecorTypes, - true /* ignoreVisibility */); - final Insets statusBar = insetsState.calculateInsets(displayFrame, - Type.statusBars(), true /* ignoreVisibility */); + dc.mWmService.mDecorTypes, true /* ignoreVisibility */); + final Insets configInsets = insetsState.calculateInsets(displayFrame, + dc.mWmService.mConfigTypes, true /* ignoreVisibility */); mNonDecorInsets.set(decor.left, decor.top, decor.right, decor.bottom); - mConfigInsets.set(Math.max(statusBar.left, decor.left), - Math.max(statusBar.top, decor.top), - Math.max(statusBar.right, decor.right), - Math.max(statusBar.bottom, decor.bottom)); + mConfigInsets.set(configInsets.left, configInsets.top, configInsets.right, + configInsets.bottom); mNonDecorFrame.set(displayFrame); mNonDecorFrame.inset(mNonDecorInsets); mConfigFrame.set(displayFrame); diff --git a/services/core/java/com/android/server/wm/DisplayWindowSettings.java b/services/core/java/com/android/server/wm/DisplayWindowSettings.java index e1753d7d6257..7a95c2d6d934 100644 --- a/services/core/java/com/android/server/wm/DisplayWindowSettings.java +++ b/services/core/java/com/android/server/wm/DisplayWindowSettings.java @@ -237,6 +237,37 @@ class DisplayWindowSettings { mSettingsProvider.updateOverrideSettings(displayInfo, overrideSettings); } + boolean isHomeSupportedLocked(@NonNull DisplayContent dc) { + if (dc.getDisplayId() == Display.DEFAULT_DISPLAY) { + // Default display should show home. + return true; + } + + final DisplayInfo displayInfo = dc.getDisplayInfo(); + final SettingsProvider.SettingsEntry settings = mSettingsProvider.getSettings(displayInfo); + return settings.mIsHomeSupported != null + ? settings.mIsHomeSupported + : shouldShowSystemDecorsLocked(dc); + } + + void setHomeSupportedOnDisplayLocked(@NonNull String displayUniqueId, int displayType, + boolean supported) { + final DisplayInfo displayInfo = new DisplayInfo(); + displayInfo.uniqueId = displayUniqueId; + displayInfo.type = displayType; + final SettingsProvider.SettingsEntry overrideSettings = + mSettingsProvider.getOverrideSettings(displayInfo); + overrideSettings.mIsHomeSupported = supported; + mSettingsProvider.updateOverrideSettings(displayInfo, overrideSettings); + } + + void clearDisplaySettings(@NonNull String displayUniqueId, int displayType) { + final DisplayInfo displayInfo = new DisplayInfo(); + displayInfo.uniqueId = displayUniqueId; + displayInfo.type = displayType; + mSettingsProvider.clearDisplaySettings(displayInfo); + } + @DisplayImePolicy int getImePolicyLocked(@NonNull DisplayContent dc) { if (dc.getDisplayId() == Display.DEFAULT_DISPLAY) { @@ -382,11 +413,18 @@ class DisplayWindowSettings { void updateOverrideSettings(@NonNull DisplayInfo info, @NonNull SettingsEntry overrides); /** - * Called when a display is removed to cleanup. + * Called when a display is removed to cleanup. Note that for non-virtual displays the + * relevant settings entry will be kept, if non-empty. */ void onDisplayRemoved(@NonNull DisplayInfo info); /** + * Explicitly removes all settings entory for the given {@link DisplayInfo}, even if it is + * not empty. + */ + void clearDisplaySettings(@NonNull DisplayInfo info); + + /** * Settings for a display. */ class SettingsEntry { @@ -411,6 +449,8 @@ class DisplayWindowSettings { @Nullable Boolean mShouldShowSystemDecors; @Nullable + Boolean mIsHomeSupported; + @Nullable Integer mImePolicy; @Nullable Integer mFixedToUserRotation; @@ -479,6 +519,10 @@ class DisplayWindowSettings { mShouldShowSystemDecors = other.mShouldShowSystemDecors; changed = true; } + if (!Objects.equals(other.mIsHomeSupported, mIsHomeSupported)) { + mIsHomeSupported = other.mIsHomeSupported; + changed = true; + } if (!Objects.equals(other.mImePolicy, mImePolicy)) { mImePolicy = other.mImePolicy; changed = true; @@ -561,6 +605,11 @@ class DisplayWindowSettings { mShouldShowSystemDecors = delta.mShouldShowSystemDecors; changed = true; } + if (delta.mIsHomeSupported != null && !Objects.equals( + delta.mIsHomeSupported, mIsHomeSupported)) { + mIsHomeSupported = delta.mIsHomeSupported; + changed = true; + } if (delta.mImePolicy != null && !Objects.equals(delta.mImePolicy, mImePolicy)) { mImePolicy = delta.mImePolicy; @@ -599,6 +648,7 @@ class DisplayWindowSettings { && mRemoveContentMode == REMOVE_CONTENT_MODE_UNDEFINED && mShouldShowWithInsecureKeyguard == null && mShouldShowSystemDecors == null + && mIsHomeSupported == null && mImePolicy == null && mFixedToUserRotation == null && mIgnoreOrientationRequest == null @@ -622,6 +672,7 @@ class DisplayWindowSettings { && Objects.equals(mShouldShowWithInsecureKeyguard, that.mShouldShowWithInsecureKeyguard) && Objects.equals(mShouldShowSystemDecors, that.mShouldShowSystemDecors) + && Objects.equals(mIsHomeSupported, that.mIsHomeSupported) && Objects.equals(mImePolicy, that.mImePolicy) && Objects.equals(mFixedToUserRotation, that.mFixedToUserRotation) && Objects.equals(mIgnoreOrientationRequest, that.mIgnoreOrientationRequest) @@ -633,9 +684,9 @@ class DisplayWindowSettings { public int hashCode() { return Objects.hash(mWindowingMode, mUserRotationMode, mUserRotation, mForcedWidth, mForcedHeight, mForcedDensity, mForcedScalingMode, mRemoveContentMode, - mShouldShowWithInsecureKeyguard, mShouldShowSystemDecors, mImePolicy, - mFixedToUserRotation, mIgnoreOrientationRequest, mIgnoreDisplayCutout, - mDontMoveToTop); + mShouldShowWithInsecureKeyguard, mShouldShowSystemDecors, mIsHomeSupported, + mImePolicy, mFixedToUserRotation, mIgnoreOrientationRequest, + mIgnoreDisplayCutout, mDontMoveToTop); } @Override @@ -651,6 +702,7 @@ class DisplayWindowSettings { + ", mRemoveContentMode=" + mRemoveContentMode + ", mShouldShowWithInsecureKeyguard=" + mShouldShowWithInsecureKeyguard + ", mShouldShowSystemDecors=" + mShouldShowSystemDecors + + ", mIsHomeSupported=" + mIsHomeSupported + ", mShouldShowIme=" + mImePolicy + ", mFixedToUserRotation=" + mFixedToUserRotation + ", mIgnoreOrientationRequest=" + mIgnoreOrientationRequest diff --git a/services/core/java/com/android/server/wm/DisplayWindowSettingsProvider.java b/services/core/java/com/android/server/wm/DisplayWindowSettingsProvider.java index ea668faddc37..c79565ae79fa 100644 --- a/services/core/java/com/android/server/wm/DisplayWindowSettingsProvider.java +++ b/services/core/java/com/android/server/wm/DisplayWindowSettingsProvider.java @@ -164,6 +164,11 @@ class DisplayWindowSettingsProvider implements SettingsProvider { mOverrideSettings.onDisplayRemoved(info); } + @Override + public void clearDisplaySettings(@NonNull DisplayInfo info) { + mOverrideSettings.clearDisplaySettings(info); + } + @VisibleForTesting int getOverrideSettingsSize() { return mOverrideSettings.mSettings.size(); @@ -291,6 +296,12 @@ class DisplayWindowSettingsProvider implements SettingsProvider { } } + void clearDisplaySettings(@NonNull DisplayInfo info) { + final String identifier = getIdentifier(info); + mSettings.remove(identifier); + mVirtualDisplayIdentifiers.remove(identifier); + } + private void writeSettings() { final FileData fileData = new FileData(); fileData.mIdentifierType = mIdentifierType; diff --git a/services/core/java/com/android/server/wm/EmbeddedWindowController.java b/services/core/java/com/android/server/wm/EmbeddedWindowController.java index 14628782eac7..b7eab085f5e3 100644 --- a/services/core/java/com/android/server/wm/EmbeddedWindowController.java +++ b/services/core/java/com/android/server/wm/EmbeddedWindowController.java @@ -30,7 +30,6 @@ import android.os.RemoteException; import android.util.ArrayMap; import android.util.Slog; import android.util.proto.ProtoOutputStream; -import android.view.IWindow; import android.view.InputApplicationHandle; import android.view.InputChannel; @@ -71,7 +70,7 @@ class EmbeddedWindowController { mWindowsByInputTransferToken.put(inputTransferToken, window); mWindowsByWindowToken.put(window.getWindowToken(), window); updateProcessController(window); - window.mClient.asBinder().linkToDeath(()-> { + window.mClient.linkToDeath(()-> { synchronized (mGlobalLock) { mWindows.remove(inputToken); mWindowsByInputTransferToken.remove(inputTransferToken); @@ -100,10 +99,10 @@ class EmbeddedWindowController { } } - void remove(IWindow client) { + void remove(IBinder client) { for (int i = mWindows.size() - 1; i >= 0; i--) { EmbeddedWindow ew = mWindows.valueAt(i); - if (ew.mClient.asBinder() == client.asBinder()) { + if (ew.mClient == client) { mWindows.removeAt(i).onRemoved(); mWindowsByInputTransferToken.remove(ew.getInputTransferToken()); mWindowsByWindowToken.remove(ew.getWindowToken()); @@ -136,7 +135,7 @@ class EmbeddedWindowController { } static class EmbeddedWindow implements InputTarget { - final IWindow mClient; + final IBinder mClient; @Nullable final WindowState mHostWindowState; @Nullable final ActivityRecord mHostActivityRecord; final String mName; @@ -169,7 +168,7 @@ class EmbeddedWindowController { * @param windowType to forward to input * @param displayId used for focus requests */ - EmbeddedWindow(Session session, WindowManagerService service, IWindow clientToken, + EmbeddedWindow(Session session, WindowManagerService service, IBinder clientToken, WindowState hostWindowState, int ownerUid, int ownerPid, int windowType, int displayId, IBinder inputTransferToken, String inputHandleName, boolean isFocusable) { @@ -241,13 +240,8 @@ class EmbeddedWindowController { return mWmService.mRoot.getDisplayContent(getDisplayId()); } - @Override - public IWindow getIWindow() { - return mClient; - } - public IBinder getWindowToken() { - return mClient.asBinder(); + return mClient; } @Override diff --git a/services/core/java/com/android/server/wm/InputMonitor.java b/services/core/java/com/android/server/wm/InputMonitor.java index 61fea4d9212d..997b6084f6e2 100644 --- a/services/core/java/com/android/server/wm/InputMonitor.java +++ b/services/core/java/com/android/server/wm/InputMonitor.java @@ -57,7 +57,6 @@ import android.os.InputConfig; import android.os.SystemClock; import android.os.Trace; import android.os.UserHandle; -import android.util.ArrayMap; import android.util.EventLog; import android.util.Slog; import android.view.InputChannel; @@ -74,7 +73,6 @@ import com.android.server.inputmethod.InputMethodManagerInternal; import java.io.PrintWriter; import java.lang.ref.WeakReference; import java.util.ArrayList; -import java.util.Set; import java.util.function.Consumer; final class InputMonitor { @@ -258,7 +256,7 @@ final class InputMonitor { inputWindowHandle.setDispatchingTimeoutMillis(w.getInputDispatchingTimeoutMillis()); inputWindowHandle.setTouchOcclusionMode(w.getTouchOcclusionMode()); inputWindowHandle.setPaused(w.mActivityRecord != null && w.mActivityRecord.paused); - inputWindowHandle.setWindowToken(w.mClient); + inputWindowHandle.setWindowToken(w.mClient.asBinder()); inputWindowHandle.setName(w.getName()); @@ -395,8 +393,12 @@ final class InputMonitor { */ void setActiveRecents(@Nullable ActivityRecord activity, @Nullable ActivityRecord layer) { final boolean clear = activity == null; + final boolean wasActive = mActiveRecentsActivity != null && mActiveRecentsLayerRef != null; mActiveRecentsActivity = clear ? null : new WeakReference<>(activity); mActiveRecentsLayerRef = clear ? null : new WeakReference<>(layer); + if (clear && wasActive) { + setUpdateInputWindowsNeededLw(); + } } private static <T> T getWeak(WeakReference<T> ref) { diff --git a/services/core/java/com/android/server/wm/InputTarget.java b/services/core/java/com/android/server/wm/InputTarget.java index 653f5f5a74e9..baf0db2e0b7e 100644 --- a/services/core/java/com/android/server/wm/InputTarget.java +++ b/services/core/java/com/android/server/wm/InputTarget.java @@ -16,8 +16,8 @@ package com.android.server.wm; +import android.os.IBinder; import android.util.proto.ProtoOutputStream; -import android.view.IWindow; /** * Common interface between focusable objects. @@ -33,7 +33,7 @@ interface InputTarget { int getDisplayId(); /* Client IWindow for the target. */ - IWindow getIWindow(); + IBinder getWindowToken(); /* Owning pid of the target. */ int getPid(); diff --git a/services/core/java/com/android/server/wm/InputWindowHandleWrapper.java b/services/core/java/com/android/server/wm/InputWindowHandleWrapper.java index 90d81bd82087..b74805313d11 100644 --- a/services/core/java/com/android/server/wm/InputWindowHandleWrapper.java +++ b/services/core/java/com/android/server/wm/InputWindowHandleWrapper.java @@ -21,7 +21,6 @@ import android.annotation.Nullable; import android.graphics.Region; import android.os.IBinder; import android.os.InputConfig; -import android.view.IWindow; import android.view.InputApplicationHandle; import android.view.InputWindowHandle; import android.view.InputWindowHandle.InputConfigFlags; @@ -264,8 +263,8 @@ class InputWindowHandleWrapper { mChanged = true; } - void setWindowToken(IWindow windowToken) { - if (mHandle.getWindow() == windowToken) { + void setWindowToken(IBinder windowToken) { + if (mHandle.getWindowToken() == windowToken) { return; } mHandle.setWindowToken(windowToken); diff --git a/services/core/java/com/android/server/wm/RootWindowContainer.java b/services/core/java/com/android/server/wm/RootWindowContainer.java index 5227a52545f4..fe2c2504abd9 100644 --- a/services/core/java/com/android/server/wm/RootWindowContainer.java +++ b/services/core/java/com/android/server/wm/RootWindowContainer.java @@ -1696,8 +1696,8 @@ class RootWindowContainer extends WindowContainer<DisplayContent> } final DisplayContent display = taskDisplayArea.getDisplayContent(); - if (display == null || display.isRemoved() || !display.supportsSystemDecorations()) { - // Can't launch home on display that doesn't support system decorations. + if (display == null || display.isRemoved() || !display.isHomeSupported()) { + // Can't launch home on display that doesn't support home. return false; } @@ -3126,10 +3126,11 @@ class RootWindowContainer extends WindowContainer<DisplayContent> if (preferredFocusableRootTask != null) { return preferredFocusableRootTask; } - if (preferredDisplayArea.mDisplayContent.supportsSystemDecorations()) { + + if (preferredDisplayArea.mDisplayContent.isHomeSupported()) { // Stop looking for focusable root task on other displays because the preferred display - // supports system decorations. Home activity would be launched on the same display if - // no focusable root task found. + // supports home. Home activity would be launched on the same display if no focusable + // root task found. return null; } diff --git a/services/core/java/com/android/server/wm/Session.java b/services/core/java/com/android/server/wm/Session.java index 0c55d8a85df1..56f9aa4c6361 100644 --- a/services/core/java/com/android/server/wm/Session.java +++ b/services/core/java/com/android/server/wm/Session.java @@ -253,8 +253,8 @@ class Session extends IWindowSession.Stub implements IBinder.DeathRecipient { } @Override - public void remove(IWindow window) { - mService.removeWindow(this, window); + public void remove(IBinder clientToken) { + mService.removeClientToken(this, clientToken); } @Override @@ -894,7 +894,7 @@ class Session extends IWindowSession.Stub implements IBinder.DeathRecipient { @Override public void grantInputChannel(int displayId, SurfaceControl surface, - IWindow window, IBinder hostInputToken, int flags, int privateFlags, int type, + IBinder clientToken, IBinder hostInputToken, int flags, int privateFlags, int type, int inputFeatures, IBinder windowToken, IBinder inputTransferToken, String inputHandleName, InputChannel outInputChannel) { if (hostInputToken == null && !mCanAddInternalSystemWindow) { @@ -905,8 +905,8 @@ class Session extends IWindowSession.Stub implements IBinder.DeathRecipient { final long identity = Binder.clearCallingIdentity(); try { - mService.grantInputChannel(this, mUid, mPid, displayId, surface, window, hostInputToken, - flags, mCanAddInternalSystemWindow ? privateFlags : 0, + mService.grantInputChannel(this, mUid, mPid, displayId, surface, clientToken, + hostInputToken, flags, mCanAddInternalSystemWindow ? privateFlags : 0, type, inputFeatures, windowToken, inputTransferToken, inputHandleName, outInputChannel); } finally { diff --git a/services/core/java/com/android/server/wm/Task.java b/services/core/java/com/android/server/wm/Task.java index c9703dbe6311..267d148b1ce8 100644 --- a/services/core/java/com/android/server/wm/Task.java +++ b/services/core/java/com/android/server/wm/Task.java @@ -3513,7 +3513,8 @@ class Task extends TaskFragment { } appCompatTaskInfo.topActivityEligibleForUserAspectRatioButton = top != null && !appCompatTaskInfo.topActivityInSizeCompat - && top.mLetterboxUiController.shouldEnableUserAspectRatioSettings(); + && top.mLetterboxUiController.shouldEnableUserAspectRatioSettings() + && !info.isTopActivityTransparent; appCompatTaskInfo.topActivityBoundsLetterboxed = top != null && top.areBoundsLetterboxed(); } diff --git a/services/core/java/com/android/server/wm/TaskDisplayArea.java b/services/core/java/com/android/server/wm/TaskDisplayArea.java index f0a66540061d..c57983c53d37 100644 --- a/services/core/java/com/android/server/wm/TaskDisplayArea.java +++ b/services/core/java/com/android/server/wm/TaskDisplayArea.java @@ -1767,7 +1767,7 @@ final class TaskDisplayArea extends DisplayArea<WindowContainer> { * Exposes the home task capability of the TaskDisplayArea */ boolean canHostHomeTask() { - return mDisplayContent.supportsSystemDecorations() && mCanHostHomeTask; + return mDisplayContent.isHomeSupported() && mCanHostHomeTask; } /** diff --git a/services/core/java/com/android/server/wm/Transition.java b/services/core/java/com/android/server/wm/Transition.java index f70094450abb..caa57bb032ca 100644 --- a/services/core/java/com/android/server/wm/Transition.java +++ b/services/core/java/com/android/server/wm/Transition.java @@ -1344,6 +1344,7 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener { final DisplayContent dc = mController.mAtm.mRootWindowContainer.getDisplayContent(mRecentsDisplayId); dc.getInputMonitor().setActiveRecents(null /* activity */, null /* layer */); + dc.getInputMonitor().updateInputWindowsLw(false /* force */); } if (mTransientLaunches != null) { for (int i = mTransientLaunches.size() - 1; i >= 0; --i) { diff --git a/services/core/java/com/android/server/wm/WindowManagerInternal.java b/services/core/java/com/android/server/wm/WindowManagerInternal.java index 9f1bccb9a27a..92bd00e0a175 100644 --- a/services/core/java/com/android/server/wm/WindowManagerInternal.java +++ b/services/core/java/com/android/server/wm/WindowManagerInternal.java @@ -28,6 +28,7 @@ import android.graphics.Matrix; import android.graphics.Rect; import android.graphics.Region; import android.hardware.display.DisplayManagerInternal; +import android.hardware.display.VirtualDisplayConfig; import android.os.Bundle; import android.os.IBinder; import android.os.Message; @@ -752,9 +753,31 @@ public abstract class WindowManagerInternal { public abstract Context getTopFocusedDisplayUiContext(); /** - * Checks if this display is configured and allowed to show system decorations. + * Sets whether the relevant display content can host the relevant home activity and wallpaper. + * + * @param displayUniqueId The unique ID of the display. Note that the display may not yet be + * created, but whenever it is, this property will be applied. + * @param displayType The type of the display, e.g. {@link Display#TYPE_VIRTUAL}. + * @param supported Whether home and wallpaper are supported on this display. + */ + public abstract void setHomeSupportedOnDisplay( + @NonNull String displayUniqueId, int displayType, boolean supported); + + /** + * Checks if this display is configured and allowed to show home activity and wallpaper. + * + * <p>This is implied for displays that have {@link Display#FLAG_SHOULD_SHOW_SYSTEM_DECORATIONS} + * and can also be set via {@link VirtualDisplayConfig.Builder#setHomeSupported}.</p> + */ + public abstract boolean isHomeSupportedOnDisplay(int displayId); + + /** + * Removes any settings relevant to the given display. + * + * <p>This may be used when a property is set for a display unique ID before the display + * creation but the actual display creation failed for some reason.</p> */ - public abstract boolean shouldShowSystemDecorOnDisplay(int displayId); + public abstract void clearDisplaySettings(@NonNull String displayUniqueId, int displayType); /** * Indicates the policy for how the display should show IME. diff --git a/services/core/java/com/android/server/wm/WindowManagerService.java b/services/core/java/com/android/server/wm/WindowManagerService.java index 0e1391470dd3..d4d7c2c92eb0 100644 --- a/services/core/java/com/android/server/wm/WindowManagerService.java +++ b/services/core/java/com/android/server/wm/WindowManagerService.java @@ -1191,7 +1191,8 @@ public class WindowManagerService extends IWindowManager.Stub && mFlags.mAllowsScreenSizeDecoupledFromStatusBarAndCutout; if (!isScreenSizeDecoupledFromStatusBarAndCutout) { mDecorTypes = WindowInsets.Type.displayCutout() | WindowInsets.Type.navigationBars(); - mConfigTypes = WindowInsets.Type.statusBars() | WindowInsets.Type.navigationBars(); + mConfigTypes = WindowInsets.Type.displayCutout() | WindowInsets.Type.statusBars() + | WindowInsets.Type.navigationBars(); } else { mDecorTypes = WindowInsets.Type.navigationBars(); mConfigTypes = WindowInsets.Type.navigationBars(); @@ -1971,7 +1972,7 @@ public class WindowManagerService extends IWindowManager.Stub } } - void removeWindow(Session session, IWindow client) { + void removeClientToken(Session session, IBinder client) { synchronized (mGlobalLock) { WindowState win = windowForClientLocked(session, client, false); if (win != null) { @@ -8268,9 +8269,41 @@ public class WindowManagerService extends IWindowManager.Stub } @Override - public boolean shouldShowSystemDecorOnDisplay(int displayId) { + public void setHomeSupportedOnDisplay(String displayUniqueId, int displayType, + boolean supported) { + final long origId = Binder.clearCallingIdentity(); + try { + synchronized (mGlobalLock) { + mDisplayWindowSettings.setHomeSupportedOnDisplayLocked( + displayUniqueId, displayType, supported); + } + } finally { + Binder.restoreCallingIdentity(origId); + } + } + + @Override + public boolean isHomeSupportedOnDisplay(int displayId) { synchronized (mGlobalLock) { - return WindowManagerService.this.shouldShowSystemDecors(displayId); + final DisplayContent displayContent = mRoot.getDisplayContent(displayId); + if (displayContent == null) { + ProtoLog.w(WM_ERROR, "Attempted to get home support flag of a display that " + + "does not exist: %d", displayId); + return false; + } + return displayContent.isHomeSupported(); + } + } + + @Override + public void clearDisplaySettings(String displayUniqueId, int displayType) { + final long origId = Binder.clearCallingIdentity(); + try { + synchronized (mGlobalLock) { + mDisplayWindowSettings.clearDisplaySettings(displayUniqueId, displayType); + } + } finally { + Binder.restoreCallingIdentity(origId); } } @@ -8899,7 +8932,7 @@ public class WindowManagerService extends IWindowManager.Stub * views. */ void grantInputChannel(Session session, int callingUid, int callingPid, int displayId, - SurfaceControl surface, IWindow window, IBinder hostInputToken, + SurfaceControl surface, IBinder clientToken, IBinder hostInputToken, int flags, int privateFlags, int inputFeatures, int type, IBinder windowToken, IBinder inputTransferToken, String inputHandleName, InputChannel outInputChannel) { final int sanitizedType = sanitizeWindowType(session, displayId, windowToken, type); @@ -8908,7 +8941,7 @@ public class WindowManagerService extends IWindowManager.Stub Objects.requireNonNull(outInputChannel); synchronized (mGlobalLock) { EmbeddedWindowController.EmbeddedWindow win = - new EmbeddedWindowController.EmbeddedWindow(session, this, window, + new EmbeddedWindowController.EmbeddedWindow(session, this, clientToken, mInputToWindowMap.get(hostInputToken), callingUid, callingPid, sanitizedType, displayId, inputTransferToken, inputHandleName, (flags & FLAG_NOT_FOCUSABLE) == 0); @@ -8920,7 +8953,7 @@ public class WindowManagerService extends IWindowManager.Stub updateInputChannel(outInputChannel.getToken(), callingUid, callingPid, displayId, surface, name, applicationHandle, flags, privateFlags, inputFeatures, sanitizedType, - null /* region */, window); + null /* region */, clientToken); } boolean transferEmbeddedTouchFocusToHost(IWindow embeddedWindow) { @@ -8995,10 +9028,10 @@ public class WindowManagerService extends IWindowManager.Stub private void updateInputChannel(IBinder channelToken, int callingUid, int callingPid, int displayId, SurfaceControl surface, String name, InputApplicationHandle applicationHandle, int flags, - int privateFlags, int inputFeatures, int type, Region region, IWindow window) { + int privateFlags, int inputFeatures, int type, Region region, IBinder clientToken) { final InputWindowHandle h = new InputWindowHandle(applicationHandle, displayId); h.token = channelToken; - h.setWindowToken(window); + h.setWindowToken(clientToken); h.name = name; flags = sanitizeFlagSlippery(flags, name, callingUid, callingPid); diff --git a/services/core/java/com/android/server/wm/WindowOrganizerController.java b/services/core/java/com/android/server/wm/WindowOrganizerController.java index 89d47bcf41d5..208df6c768bf 100644 --- a/services/core/java/com/android/server/wm/WindowOrganizerController.java +++ b/services/core/java/com/android/server/wm/WindowOrganizerController.java @@ -63,6 +63,7 @@ import static android.window.WindowContainerTransaction.HierarchyOp.HIERARCHY_OP import static com.android.internal.protolog.ProtoLogGroup.WM_DEBUG_WINDOW_ORGANIZER; import static com.android.server.wm.ActivityTaskManagerService.enforceTaskPermission; import static com.android.server.wm.ActivityTaskSupervisor.PRESERVE_WINDOWS; +import static com.android.server.wm.ActivityTaskSupervisor.REMOVE_FROM_RECENTS; import static com.android.server.wm.Task.FLAG_FORCE_HIDDEN_FOR_PINNED_TASK; import static com.android.server.wm.Task.FLAG_FORCE_HIDDEN_FOR_TASK_ORG; import static com.android.server.wm.TaskFragment.EMBEDDING_ALLOWED; @@ -938,7 +939,14 @@ class WindowOrganizerController extends IWindowOrganizerController.Stub break; } final Task task = wc.asTask(); - task.remove(true, "Applying remove task Hierarchy Op"); + + if (task.isLeafTask()) { + mService.mTaskSupervisor + .removeTask(task, true, REMOVE_FROM_RECENTS, "remove-task" + + "-through-hierarchyOp"); + } else { + mService.mTaskSupervisor.removeRootTask(task); + } break; } case HIERARCHY_OP_TYPE_SET_LAUNCH_ROOT: { diff --git a/services/core/java/com/android/server/wm/WindowProcessController.java b/services/core/java/com/android/server/wm/WindowProcessController.java index a74a707d5ef9..e9d803888e9a 100644 --- a/services/core/java/com/android/server/wm/WindowProcessController.java +++ b/services/core/java/com/android/server/wm/WindowProcessController.java @@ -1864,6 +1864,11 @@ public class WindowProcessController extends ConfigurationContainer<Configuratio } @HotPath(caller = HotPath.OOM_ADJUSTMENT) + public boolean isShowingUiWhileDozing() { + return this == mAtm.mVisibleDozeUiProcess; + } + + @HotPath(caller = HotPath.OOM_ADJUSTMENT) public boolean isPreviousProcess() { return this == mAtm.mPreviousProcess; } diff --git a/services/core/java/com/android/server/wm/WindowState.java b/services/core/java/com/android/server/wm/WindowState.java index 8ded38b7901e..5293292d74b9 100644 --- a/services/core/java/com/android/server/wm/WindowState.java +++ b/services/core/java/com/android/server/wm/WindowState.java @@ -1693,8 +1693,8 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP } @Override - public IWindow getIWindow() { - return mClient; + public IBinder getWindowToken() { + return mClient.asBinder(); } @Override diff --git a/services/core/jni/com_android_server_input_InputManagerService.cpp b/services/core/jni/com_android_server_input_InputManagerService.cpp index 21820939ba03..f1cddc643422 100644 --- a/services/core/jni/com_android_server_input_InputManagerService.cpp +++ b/services/core/jni/com_android_server_input_InputManagerService.cpp @@ -2557,11 +2557,10 @@ static void nativeSetMotionClassifierEnabled(JNIEnv* env, jobject nativeImplObj, static void nativeSetKeyRepeatConfiguration(JNIEnv* env, jobject nativeImplObj, jint timeoutMs, jint delayMs) { NativeInputManager* im = getNativeInputManager(env, nativeImplObj); - im->getInputManager()->getDispatcher().setKeyRepeatConfiguration(static_cast<nsecs_t>( - timeoutMs) * - 1000000, - static_cast<nsecs_t>(delayMs) * - 1000000); + im->getInputManager()->getDispatcher().setKeyRepeatConfiguration(std::chrono::milliseconds( + timeoutMs), + std::chrono::milliseconds( + delayMs)); } static jobject createInputSensorInfo(JNIEnv* env, jstring name, jstring vendor, jint version, diff --git a/services/core/xsd/display-device-config/display-device-config.xsd b/services/core/xsd/display-device-config/display-device-config.xsd index 215934f4dc09..cca4261795ab 100644 --- a/services/core/xsd/display-device-config/display-device-config.xsd +++ b/services/core/xsd/display-device-config/display-device-config.xsd @@ -455,6 +455,20 @@ <xs:annotation name="nullable"/> <xs:annotation name="final"/> </xs:element> + <!-- list of supported modes when sensor is ON. Each point corresponds to one mode. + Mode format is : first = refreshRate, second = vsyncRate. E.g. : + <supportedModes> + <point> + <first>60</first> // refreshRate + <second>60</second> //vsyncRate + </point> + .... + </supportedModes> + --> + <xs:element type="nonNegativeFloatToFloatMap" name="supportedModes" minOccurs="0"> + <xs:annotation name="nullable"/> + <xs:annotation name="final"/> + </xs:element> </xs:sequence> </xs:complexType> diff --git a/services/core/xsd/display-device-config/schema/current.txt b/services/core/xsd/display-device-config/schema/current.txt index f7e004375071..f767291b4953 100644 --- a/services/core/xsd/display-device-config/schema/current.txt +++ b/services/core/xsd/display-device-config/schema/current.txt @@ -349,9 +349,11 @@ package com.android.server.display.config { ctor public SensorDetails(); method @Nullable public final String getName(); method @Nullable public final com.android.server.display.config.RefreshRateRange getRefreshRate(); + method @Nullable public final com.android.server.display.config.NonNegativeFloatToFloatMap getSupportedModes(); method @Nullable public final String getType(); method public final void setName(@Nullable String); method public final void setRefreshRate(@Nullable com.android.server.display.config.RefreshRateRange); + method public final void setSupportedModes(@Nullable com.android.server.display.config.NonNegativeFloatToFloatMap); method public final void setType(@Nullable String); } diff --git a/services/permission/java/com/android/server/permission/access/appop/AppOpService.kt b/services/permission/java/com/android/server/permission/access/appop/AppOpService.kt index 26ea9d24f918..f94a0d664a69 100644 --- a/services/permission/java/com/android/server/permission/access/appop/AppOpService.kt +++ b/services/permission/java/com/android/server/permission/access/appop/AppOpService.kt @@ -145,16 +145,6 @@ class AppOpService(private val service: AccessCheckingService) : AppOpsCheckingS opSparseArray } - override fun areUidModesDefault(uid: Int): Boolean { - val modes = getUidModes(uid) - return modes == null || modes.isEmpty() - } - - override fun arePackageModesDefault(packageName: String, userId: Int): Boolean { - val modes = service.getState { getPackageModes(packageName, userId) } - return modes == null || modes.isEmpty() - } - override fun clearAllModes() { // We don't need to implement this because it's only called in AppOpsService#readState // and we have our own persistence. diff --git a/services/proguard.flags b/services/proguard.flags index 407505d6eda0..88561b460b05 100644 --- a/services/proguard.flags +++ b/services/proguard.flags @@ -45,10 +45,6 @@ public static void write(...); } -# Binder interfaces --keep,allowoptimization,allowaccessmodification class * extends android.os.IInterface --keep,allowoptimization,allowaccessmodification class * extends android.os.IHwInterface - # Various classes subclassed in or referenced via JNI in ethernet-service -keep public class android.net.** { *; } -keep,allowoptimization,allowaccessmodification class com.android.net.module.util.* { *; } diff --git a/services/tests/displayservicetests/Android.bp b/services/tests/displayservicetests/Android.bp index 6e4069fbe4bd..3bafe7296fff 100644 --- a/services/tests/displayservicetests/Android.bp +++ b/services/tests/displayservicetests/Android.bp @@ -7,19 +7,12 @@ package { default_applicable_licenses: ["frameworks_base_license"], } -// Include all test java files. -filegroup { - name: "displayservicetests-sources", - srcs: [ - "src/**/*.java", - ], -} - android_test { name: "DisplayServiceTests", srcs: [ "src/**/*.java", + "src/**/*.kt", ], libs: [ @@ -33,6 +26,8 @@ android_test { "frameworks-base-testutils", "junit", "junit-params", + "kotlin-test", + "mockito-kotlin2", "mockingservicestests-utils-mockito", "platform-compat-test-rules", "platform-test-annotations", diff --git a/services/tests/displayservicetests/src/com/android/server/display/DisplayDeviceConfigTest.java b/services/tests/displayservicetests/src/com/android/server/display/DisplayDeviceConfigTest.java index 179a9d5f748e..0bcbeb9b8a85 100644 --- a/services/tests/displayservicetests/src/com/android/server/display/DisplayDeviceConfigTest.java +++ b/services/tests/displayservicetests/src/com/android/server/display/DisplayDeviceConfigTest.java @@ -17,9 +17,12 @@ package com.android.server.display; +import static com.android.server.display.config.SensorData.SupportedMode; import static com.android.server.display.utils.DeviceConfigParsingUtils.ambientBrightnessThresholdsIntToFloat; import static com.android.server.display.utils.DeviceConfigParsingUtils.displayBrightnessThresholdsIntToFloat; +import static com.google.common.truth.Truth.assertThat; + import static org.junit.Assert.assertArrayEquals; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; @@ -526,6 +529,26 @@ public final class DisplayDeviceConfigTest { } @Test + public void testProximitySensorWithRefreshRatesFromDisplayConfig() throws IOException { + setupDisplayDeviceConfigFromDisplayConfigFile( + getContent(getValidLuxThrottling(), getValidProxSensorWithRefreshRateAndVsyncRate(), + /* includeIdleMode= */ true)); + assertEquals("test_proximity_sensor", + mDisplayDeviceConfig.getProximitySensor().type); + assertEquals("Test Proximity Sensor", + mDisplayDeviceConfig.getProximitySensor().name); + assertEquals(mDisplayDeviceConfig.getProximitySensor().minRefreshRate, 60, SMALL_DELTA); + assertEquals(mDisplayDeviceConfig.getProximitySensor().maxRefreshRate, 90, SMALL_DELTA); + assertThat(mDisplayDeviceConfig.getProximitySensor().supportedModes).hasSize(2); + SupportedMode mode = mDisplayDeviceConfig.getProximitySensor().supportedModes.get(0); + assertEquals(mode.refreshRate, 60, SMALL_DELTA); + assertEquals(mode.vsyncRate, 65, SMALL_DELTA); + mode = mDisplayDeviceConfig.getProximitySensor().supportedModes.get(1); + assertEquals(mode.refreshRate, 120, SMALL_DELTA); + assertEquals(mode.vsyncRate, 125, SMALL_DELTA); + } + + @Test public void testBlockingZoneThresholdsFromDisplayConfig() throws IOException { setupDisplayDeviceConfigFromDisplayConfigFile(); @@ -821,6 +844,27 @@ public final class DisplayDeviceConfigTest { + "</proxSensor>\n"; } + private String getValidProxSensorWithRefreshRateAndVsyncRate() { + return "<proxSensor>\n" + + "<type>test_proximity_sensor</type>\n" + + "<name>Test Proximity Sensor</name>\n" + + "<refreshRate>\n" + + "<minimum>60</minimum>\n" + + "<maximum>90</maximum>\n" + + "</refreshRate>\n" + + "<supportedModes>\n" + + "<point>\n" + + "<first>60</first>\n" // refreshRate + + "<second>65</second>\n" //vsyncRate + + "</point>\n" + + "<point>\n" + + "<first>120</first>\n" // refreshRate + + "<second>125</second>\n" //vsyncRate + + "</point>\n" + + "</supportedModes>" + + "</proxSensor>\n"; + } + private String getProxSensorWithEmptyValues() { return "<proxSensor>\n" + "<type></type>\n" diff --git a/services/tests/displayservicetests/src/com/android/server/display/DisplayManagerServiceTest.java b/services/tests/displayservicetests/src/com/android/server/display/DisplayManagerServiceTest.java index 9684f427adb3..0bf46547ce1e 100644 --- a/services/tests/displayservicetests/src/com/android/server/display/DisplayManagerServiceTest.java +++ b/services/tests/displayservicetests/src/com/android/server/display/DisplayManagerServiceTest.java @@ -123,6 +123,7 @@ import com.android.server.SystemService; import com.android.server.companion.virtual.VirtualDeviceManagerInternal; import com.android.server.display.DisplayManagerService.DeviceStateListener; import com.android.server.display.DisplayManagerService.SyncRoot; +import com.android.server.display.config.SensorData; import com.android.server.display.feature.DisplayManagerFlags; import com.android.server.display.notifications.DisplayNotificationManager; import com.android.server.input.InputManagerInternal; @@ -195,7 +196,8 @@ public class DisplayManagerServiceTest { @Rule(order = 1) public Expect expect = Expect.create(); @Rule - public SetFlagsRule mSetFlagsRule = new SetFlagsRule(); + public SetFlagsRule mSetFlagsRule = + new SetFlagsRule(SetFlagsRule.DefaultInitValueType.DEVICE_DEFAULT); private Context mContext; @@ -2317,11 +2319,8 @@ public class DisplayManagerServiceTest { String testSensorType = "testType"; Sensor testSensor = TestUtils.createSensor(testSensorType, testSensorName); - DisplayDeviceConfig.SensorData sensorData = new DisplayDeviceConfig.SensorData(); - sensorData.type = testSensorType; - sensorData.name = testSensorName; - sensorData.minRefreshRate = 10f; - sensorData.maxRefreshRate = 100f; + SensorData sensorData = new SensorData(testSensorType, testSensorName, + /* minRefreshRate= */ 10f, /* maxRefreshRate= */ 100f); when(mMockDisplayDeviceConfig.getProximitySensor()).thenReturn(sensorData); when(mSensorManager.getSensorList(Sensor.TYPE_ALL)).thenReturn(Collections.singletonList( @@ -2352,12 +2351,6 @@ public class DisplayManagerServiceTest { String testSensorType = "testType"; Sensor testSensor = TestUtils.createSensor(testSensorType, testSensorName); - DisplayDeviceConfig.SensorData sensorData = new DisplayDeviceConfig.SensorData(); - sensorData.type = testSensorType; - sensorData.name = testSensorName; - sensorData.minRefreshRate = 10f; - sensorData.maxRefreshRate = 100f; - when(mMockDisplayDeviceConfig.getProximitySensor()).thenReturn(null); when(mSensorManager.getSensorList(Sensor.TYPE_ALL)).thenReturn(Collections.singletonList( testSensor)); diff --git a/services/tests/displayservicetests/src/com/android/server/display/DisplayPowerController2Test.java b/services/tests/displayservicetests/src/com/android/server/display/DisplayPowerController2Test.java index 47521d13e49c..57f392a5887f 100644 --- a/services/tests/displayservicetests/src/com/android/server/display/DisplayPowerController2Test.java +++ b/services/tests/displayservicetests/src/com/android/server/display/DisplayPowerController2Test.java @@ -77,6 +77,7 @@ import com.android.server.display.brightness.BrightnessEvent; import com.android.server.display.brightness.clamper.BrightnessClamperController; import com.android.server.display.brightness.clamper.HdrClamper; import com.android.server.display.color.ColorDisplayService; +import com.android.server.display.config.SensorData; import com.android.server.display.feature.DisplayManagerFlags; import com.android.server.display.feature.flags.Flags; import com.android.server.display.layout.Layout; @@ -1618,23 +1619,13 @@ public final class DisplayPowerController2Test { when(displayDeviceMock.getUniqueId()).thenReturn(uniqueId); when(displayDeviceMock.getDisplayDeviceConfig()).thenReturn(displayDeviceConfigMock); when(displayDeviceConfigMock.getProximitySensor()).thenReturn( - new DisplayDeviceConfig.SensorData() { - { - type = Sensor.STRING_TYPE_PROXIMITY; - name = null; - } - }); + new SensorData(Sensor.STRING_TYPE_PROXIMITY, null)); when(displayDeviceConfigMock.getNits()).thenReturn(new float[]{2, 500}); when(displayDeviceConfigMock.isAutoBrightnessAvailable()).thenReturn(true); when(displayDeviceConfigMock.getAmbientLightSensor()).thenReturn( - new DisplayDeviceConfig.SensorData()); + new SensorData()); when(displayDeviceConfigMock.getScreenOffBrightnessSensor()).thenReturn( - new DisplayDeviceConfig.SensorData() { - { - type = Sensor.STRING_TYPE_LIGHT; - name = null; - } - }); + new SensorData(Sensor.STRING_TYPE_LIGHT, null)); when(displayDeviceConfigMock.getScreenOffBrightnessSensorValueToLux()) .thenReturn(new int[0]); diff --git a/services/tests/displayservicetests/src/com/android/server/display/DisplayPowerControllerTest.java b/services/tests/displayservicetests/src/com/android/server/display/DisplayPowerControllerTest.java index 37ee23f38b14..9617bd08fd93 100644 --- a/services/tests/displayservicetests/src/com/android/server/display/DisplayPowerControllerTest.java +++ b/services/tests/displayservicetests/src/com/android/server/display/DisplayPowerControllerTest.java @@ -76,6 +76,7 @@ import com.android.server.am.BatteryStatsService; import com.android.server.display.RampAnimator.DualRampAnimator; import com.android.server.display.brightness.BrightnessEvent; import com.android.server.display.color.ColorDisplayService; +import com.android.server.display.config.SensorData; import com.android.server.display.feature.DisplayManagerFlags; import com.android.server.display.feature.flags.Flags; import com.android.server.display.layout.Layout; @@ -1515,23 +1516,13 @@ public final class DisplayPowerControllerTest { when(displayDeviceMock.getUniqueId()).thenReturn(uniqueId); when(displayDeviceMock.getDisplayDeviceConfig()).thenReturn(displayDeviceConfigMock); when(displayDeviceConfigMock.getProximitySensor()).thenReturn( - new DisplayDeviceConfig.SensorData() { - { - type = Sensor.STRING_TYPE_PROXIMITY; - name = null; - } - }); + new SensorData(Sensor.STRING_TYPE_PROXIMITY, null)); when(displayDeviceConfigMock.getNits()).thenReturn(new float[]{2, 500}); when(displayDeviceConfigMock.isAutoBrightnessAvailable()).thenReturn(true); when(displayDeviceConfigMock.getAmbientLightSensor()).thenReturn( - new DisplayDeviceConfig.SensorData()); + new SensorData()); when(displayDeviceConfigMock.getScreenOffBrightnessSensor()).thenReturn( - new DisplayDeviceConfig.SensorData() { - { - type = Sensor.STRING_TYPE_LIGHT; - name = null; - } - }); + new SensorData(Sensor.STRING_TYPE_LIGHT, null)); when(displayDeviceConfigMock.getScreenOffBrightnessSensorValueToLux()) .thenReturn(new int[0]); diff --git a/services/tests/displayservicetests/src/com/android/server/display/DisplayPowerProximityStateControllerTest.java b/services/tests/displayservicetests/src/com/android/server/display/DisplayPowerProximityStateControllerTest.java index 534a708af3c7..ebd6614aba14 100644 --- a/services/tests/displayservicetests/src/com/android/server/display/DisplayPowerProximityStateControllerTest.java +++ b/services/tests/displayservicetests/src/com/android/server/display/DisplayPowerProximityStateControllerTest.java @@ -37,6 +37,7 @@ import android.view.Display; import androidx.test.ext.junit.runners.AndroidJUnit4; import androidx.test.filters.SmallTest; +import com.android.server.display.config.SensorData; import com.android.server.testutils.OffsettableClock; import org.junit.Before; @@ -74,14 +75,7 @@ public final class DisplayPowerProximityStateControllerTest { mClock = new OffsettableClock.Stopped(); mTestLooper = new TestLooper(mClock::now); when(mDisplayDeviceConfig.getProximitySensor()).thenReturn( - new DisplayDeviceConfig.SensorData() { - { - type = Sensor.STRING_TYPE_PROXIMITY; - // This is kept null because currently there is no way to define a sensor - // name in TestUtils - name = null; - } - }); + new SensorData(Sensor.STRING_TYPE_PROXIMITY, null)); setUpProxSensor(); DisplayPowerProximityStateController.Injector injector = new DisplayPowerProximityStateController.Injector() { @@ -171,13 +165,7 @@ public final class DisplayPowerProximityStateControllerTest { @Test public void isProximitySensorAvailableReturnsFalseWhenNotAvailableAndNoDefault() { - when(mDisplayDeviceConfig.getProximitySensor()).thenReturn( - new DisplayDeviceConfig.SensorData() { - { - type = null; - name = null; - } - }); + when(mDisplayDeviceConfig.getProximitySensor()).thenReturn(new SensorData()); mDisplayPowerProximityStateController = new DisplayPowerProximityStateController( mWakelockController, mDisplayDeviceConfig, mTestLooper.getLooper(), mNudgeUpdatePowerState, Display.DEFAULT_DISPLAY, @@ -188,13 +176,7 @@ public final class DisplayPowerProximityStateControllerTest { @Test public void isProximitySensorAvailableReturnsTrueWhenNotAvailableAndHasDefault() throws Exception { - when(mDisplayDeviceConfig.getProximitySensor()).thenReturn( - new DisplayDeviceConfig.SensorData() { - { - type = null; - name = null; - } - }); + when(mDisplayDeviceConfig.getProximitySensor()).thenReturn(new SensorData()); when(mSensorManager.getDefaultSensor(Sensor.TYPE_PROXIMITY)).thenReturn( TestUtils.createSensor(Sensor.TYPE_PROXIMITY, "proximity")); mDisplayPowerProximityStateController = new DisplayPowerProximityStateController( @@ -207,13 +189,7 @@ public final class DisplayPowerProximityStateControllerTest { @Test public void isProximitySensorAvailableReturnsFalseWhenNotAvailableHasDefaultNonDefaultDisplay() throws Exception { - when(mDisplayDeviceConfig.getProximitySensor()).thenReturn( - new DisplayDeviceConfig.SensorData() { - { - type = null; - name = null; - } - }); + when(mDisplayDeviceConfig.getProximitySensor()).thenReturn(new SensorData()); when(mSensorManager.getDefaultSensor(Sensor.TYPE_PROXIMITY)).thenReturn( TestUtils.createSensor(Sensor.TYPE_PROXIMITY, "proximity")); mDisplayPowerProximityStateController = new DisplayPowerProximityStateController( @@ -240,12 +216,7 @@ public final class DisplayPowerProximityStateControllerTest { public void notifyDisplayDeviceChangedReloadsTheProximitySensor() throws Exception { DisplayDeviceConfig updatedDisplayDeviceConfig = mock(DisplayDeviceConfig.class); when(updatedDisplayDeviceConfig.getProximitySensor()).thenReturn( - new DisplayDeviceConfig.SensorData() { - { - type = Sensor.STRING_TYPE_PROXIMITY; - name = null; - } - }); + new SensorData(Sensor.STRING_TYPE_PROXIMITY, null)); Sensor newProxSensor = TestUtils.createSensor( Sensor.TYPE_PROXIMITY, Sensor.STRING_TYPE_PROXIMITY, 4.0f); when(mSensorManager.getSensorList(eq(Sensor.TYPE_ALL))) diff --git a/services/tests/displayservicetests/src/com/android/server/display/DisplayPowerStateTest.kt b/services/tests/displayservicetests/src/com/android/server/display/DisplayPowerStateTest.kt new file mode 100644 index 000000000000..49fa2545e001 --- /dev/null +++ b/services/tests/displayservicetests/src/com/android/server/display/DisplayPowerStateTest.kt @@ -0,0 +1,51 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.server.display + +import android.view.Display +import androidx.test.filters.SmallTest +import org.junit.Before +import org.junit.Rule +import org.junit.Test +import org.mockito.junit.MockitoJUnit + +import org.mockito.kotlin.mock +import org.mockito.kotlin.verify + +@SmallTest +class DisplayPowerStateTest { + + private lateinit var displayPowerState: DisplayPowerState + + @get:Rule + val mockitoRule = MockitoJUnit.rule() + + private val mockBlanker = mock<DisplayBlanker>() + private val mockColorFade = mock<ColorFade>() + + @Before + fun setUp() { + displayPowerState = DisplayPowerState(mockBlanker, mockColorFade, 123, Display.STATE_ON) + } + + @Test + fun `destroys ColorFade on stop`() { + displayPowerState.stop() + + verify(mockColorFade).destroy() + } +}
\ No newline at end of file diff --git a/services/tests/displayservicetests/src/com/android/server/display/VirtualDisplayAdapterTest.java b/services/tests/displayservicetests/src/com/android/server/display/VirtualDisplayAdapterTest.java index 8bbacc494efd..73e7ba0750e0 100644 --- a/services/tests/displayservicetests/src/com/android/server/display/VirtualDisplayAdapterTest.java +++ b/services/tests/displayservicetests/src/com/android/server/display/VirtualDisplayAdapterTest.java @@ -77,7 +77,7 @@ public class VirtualDisplayAdapterTest { DisplayDevice result = mVirtualDisplayAdapter.createVirtualDisplayLocked(mMockCallback, /* projection= */ null, /* ownerUid= */ 10, /* packageName= */ "testpackage", - /* surface= */ null, /* flags= */ 0, config); + /* uniqueId= */ "uniqueId", /* surface= */ null, /* flags= */ 0, config); assertNotNull(result); } @@ -89,12 +89,12 @@ public class VirtualDisplayAdapterTest { VirtualDisplayConfig config2 = new VirtualDisplayConfig.Builder("test2", /* width= */ 1, /* height= */ 1, /* densityDpi= */ 1).build(); mVirtualDisplayAdapter.createVirtualDisplayLocked(mMockCallback, /* projection= */ null, - /* ownerUid= */ 10, /* packageName= */ "testpackage", /* surface= */ null, - /* flags= */ 0, config1); + /* ownerUid= */ 10, /* packageName= */ "testpackage", /* uniqueId= */ "uniqueId1", + /* surface= */ null, /* flags= */ 0, config1); DisplayDevice result = mVirtualDisplayAdapter.createVirtualDisplayLocked(mMockCallback, /* projection= */ null, /* ownerUid= */ 10, /* packageName= */ "testpackage", - /* surface= */ null, /* flags= */ 0, config2); + /* uniqueId= */ "uniqueId2", /* surface= */ null, /* flags= */ 0, config2); assertNull(result); } diff --git a/services/tests/displayservicetests/src/com/android/server/display/utils/SensorUtilsTest.java b/services/tests/displayservicetests/src/com/android/server/display/utils/SensorUtilsTest.java index 4494b0c412dc..6e2d954c05a8 100644 --- a/services/tests/displayservicetests/src/com/android/server/display/utils/SensorUtilsTest.java +++ b/services/tests/displayservicetests/src/com/android/server/display/utils/SensorUtilsTest.java @@ -28,7 +28,7 @@ import android.hardware.input.InputSensorInfo; import androidx.test.filters.SmallTest; import com.android.internal.annotations.Keep; -import com.android.server.display.DisplayDeviceConfig.SensorData; +import com.android.server.display.config.SensorData; import org.junit.Before; import org.junit.Test; @@ -123,9 +123,7 @@ public class SensorUtilsTest { when(mSensorManager.getSensorList(Sensor.TYPE_ALL)).thenReturn(allSensors); when(mSensorManager.getDefaultSensor(fallbackType)).thenReturn(defaultSensor); - SensorData sensorData = new SensorData(); - sensorData.name = sensorName; - sensorData.type = sensorType; + SensorData sensorData = new SensorData(sensorType, sensorName); Sensor result = SensorUtils.findSensor(mSensorManager, sensorData, fallbackType); diff --git a/services/tests/mockingservicestests/Android.bp b/services/tests/mockingservicestests/Android.bp index 063af573e1f3..113511ef8197 100644 --- a/services/tests/mockingservicestests/Android.bp +++ b/services/tests/mockingservicestests/Android.bp @@ -46,6 +46,7 @@ android_test { "androidx.test.espresso.core", "androidx.test.espresso.contrib", "androidx.test.ext.truth", + "backup_flags_lib", "flag-junit", "frameworks-base-testutils", "hamcrest-library", diff --git a/services/tests/mockingservicestests/src/com/android/server/am/MockingOomAdjusterTests.java b/services/tests/mockingservicestests/src/com/android/server/am/MockingOomAdjusterTests.java index 37fe8d1d7fff..f45dd391fbc7 100644 --- a/services/tests/mockingservicestests/src/com/android/server/am/MockingOomAdjusterTests.java +++ b/services/tests/mockingservicestests/src/com/android/server/am/MockingOomAdjusterTests.java @@ -2625,7 +2625,7 @@ public class MockingOomAdjusterTests { doReturn(PROCESS_STATE_TOP).when(sService.mAtmInternal).getTopProcessState(); doReturn(app).when(sService).getTopApp(); sService.mWakefulness.set(PowerManagerInternal.WAKEFULNESS_AWAKE); - sService.mOomAdjuster.updateOomAdjLocked(app, OOM_ADJ_REASON_NONE); + updateOomAdj(app); assertEquals(FOREGROUND_APP_ADJ, app.mState.getSetAdj()); @@ -2637,7 +2637,7 @@ public class MockingOomAdjusterTests { // Since sr.app is null, this service cannot be in the same process as the // client so we expect the BIND_ABOVE_CLIENT adjustment to take effect. app.mServices.updateHasAboveClientLocked(); - sService.mOomAdjuster.updateOomAdjLocked(app, OOM_ADJ_REASON_NONE); + updateOomAdj(app); assertTrue(app.mServices.hasAboveClient()); assertNotEquals(FOREGROUND_APP_ADJ, app.mState.getSetAdj()); } diff --git a/services/tests/mockingservicestests/src/com/android/server/backup/restore/ActiveRestoreSessionTest.java b/services/tests/mockingservicestests/src/com/android/server/backup/restore/ActiveRestoreSessionTest.java new file mode 100644 index 000000000000..0006d0ac92aa --- /dev/null +++ b/services/tests/mockingservicestests/src/com/android/server/backup/restore/ActiveRestoreSessionTest.java @@ -0,0 +1,134 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.server.backup.restore; + +import static com.google.common.truth.Truth.assertThat; + +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.ArgumentMatchers.anyInt; +import static org.mockito.ArgumentMatchers.eq; +import static org.mockito.Mockito.when; + +import android.app.backup.BackupAgent; +import android.app.backup.RestoreSet; +import android.content.Context; +import android.content.pm.ApplicationInfo; +import android.content.pm.PackageManagerInternal; +import android.os.UserManager; +import android.platform.test.annotations.Presubmit; +import android.platform.test.flag.junit.SetFlagsRule; + +import androidx.test.runner.AndroidJUnit4; + +import com.android.modules.utils.testing.ExtendedMockitoRule; +import com.android.server.LocalServices; +import com.android.server.backup.Flags; +import com.android.server.backup.TransportManager; +import com.android.server.backup.UserBackupManagerService; +import com.android.server.backup.utils.BackupEligibilityRules; + +import org.junit.Before; +import org.junit.Rule; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.mockito.Mock; +import org.mockito.MockitoAnnotations; + +@Presubmit +@RunWith(AndroidJUnit4.class) +public class ActiveRestoreSessionTest { + private static final String TEST_APP_NAME = "test_app"; + + private ActiveRestoreSession mRestoreSession; + private ApplicationInfo mTestApp; + + @Mock + private UserBackupManagerService mBackupManagerService; + @Mock + private BackupEligibilityRules mBackupEligibilityRules; + @Mock + private Context mContext; + @Mock + private PackageManagerInternal mPackageManagerInternal; + @Mock + private TransportManager mTransportManager; + @Mock private UserManager mUserManager; + + @Rule + public final SetFlagsRule mFlagsRule = new SetFlagsRule(); + @Rule + public final ExtendedMockitoRule mExtendedMockitoRule = new ExtendedMockitoRule + .Builder(/* testClassInstance */ this) + .mockStatic(LocalServices.class) + .afterSessionFinished( + () -> LocalServices.removeServiceForTest(PackageManagerInternal.class) + ).build(); + + @Before + public void setUp() { + MockitoAnnotations.initMocks(/* testClass */ this); + when(mBackupEligibilityRules.isAppEligibleForRestore(any())).thenReturn(true); + when(mBackupManagerService.getEligibilityRulesForOperation(anyInt())).thenReturn( + mBackupEligibilityRules); + when(mBackupManagerService.getTransportManager()).thenReturn(mTransportManager); + when(mBackupManagerService.getContext()).thenReturn(mContext); + when(mContext.getSystemService(eq(UserManager.class))).thenReturn(mUserManager); + when(LocalServices.getService(PackageManagerInternal.class)).thenReturn( + mPackageManagerInternal); + + mRestoreSession = new ActiveRestoreSession(mBackupManagerService, + /* packageName */ null, + /* transportName */ "", + mBackupEligibilityRules); + mTestApp = new ApplicationInfo(); + mTestApp.packageName = TEST_APP_NAME; + } + + @Test + public void testGetBackupEligibilityRules_skipRestoreFlagOn_skipsLaunchedAppRestore() { + mFlagsRule.enableFlags(Flags.FLAG_ENABLE_SKIPPING_RESTORE_LAUNCHED_APPS); + RestoreSet restoreSet = new RestoreSet( + /* name */ null, + /* device */ null, + /* token */ 0, + /* backupTransportFlags */ BackupAgent.FLAG_SKIP_RESTORE_FOR_LAUNCHED_APPS); + when(mPackageManagerInternal.wasPackageEverLaunched(eq(TEST_APP_NAME), anyInt())) + .thenReturn(true); + + BackupEligibilityRules eligibilityRules = mRestoreSession.getBackupEligibilityRules( + restoreSet); + + assertThat(eligibilityRules.isAppEligibleForRestore(mTestApp)).isFalse(); + } + + @Test + public void testGetBackupEligibilityRules_skipRestoreFlagOff_allowsAppRestore() { + mFlagsRule.disableFlags(Flags.FLAG_ENABLE_SKIPPING_RESTORE_LAUNCHED_APPS); + RestoreSet restoreSet = new RestoreSet( + /* name */ null, + /* device */ null, + /* token */ 0, + /* backupTransportFlags */ BackupAgent.FLAG_SKIP_RESTORE_FOR_LAUNCHED_APPS); + when(mPackageManagerInternal.wasPackageEverLaunched(eq(TEST_APP_NAME), anyInt())) + .thenReturn(true); + + BackupEligibilityRules eligibilityRules = mRestoreSession.getBackupEligibilityRules( + restoreSet); + + assertThat(eligibilityRules.isAppEligibleForRestore(mTestApp)).isTrue(); + } +} diff --git a/services/tests/mockingservicestests/src/com/android/server/backup/utils/BackupEligibilityRulesTest.java b/services/tests/mockingservicestests/src/com/android/server/backup/utils/BackupEligibilityRulesTest.java index 030665537c38..290b26027340 100644 --- a/services/tests/mockingservicestests/src/com/android/server/backup/utils/BackupEligibilityRulesTest.java +++ b/services/tests/mockingservicestests/src/com/android/server/backup/utils/BackupEligibilityRulesTest.java @@ -860,6 +860,66 @@ public class BackupEligibilityRulesTest { assertThat(result).isFalse(); } + @Test + public void isAppEligibleForRestore_hasBeenLaunched_returnsFalse() { + when(mMockPackageManagerInternal.wasPackageEverLaunched(eq(TEST_PACKAGE_NAME), eq(mUserId))) + .thenReturn(true); + ApplicationInfo applicationInfo = getApplicationInfo(/* appUid */ 0, /* flags */ 0, + /* backupAgentName */ null); + BackupEligibilityRules backupEligibilityRules = new BackupEligibilityRules(mPackageManager, + mMockPackageManagerInternal, mUserId, mContext, BackupDestination.CLOUD, + /* skipRestoreForLaunchedApps */ true); + + boolean isEligible = backupEligibilityRules.isAppEligibleForRestore(applicationInfo); + + assertThat(isEligible).isFalse(); + } + + @Test + public void isAppEligibleForRestore_hasNotBeenLaunched_returnsTrue() { + when(mMockPackageManagerInternal.wasPackageEverLaunched(eq(TEST_PACKAGE_NAME), eq(mUserId))) + .thenReturn(false); + ApplicationInfo applicationInfo = getApplicationInfo(/* appUid */ 0, /* flags */ 0, + /* backupAgentName */ null); + BackupEligibilityRules backupEligibilityRules = new BackupEligibilityRules(mPackageManager, + mMockPackageManagerInternal, mUserId, mContext, BackupDestination.CLOUD, + /* skipRestoreForLaunchedApps */ false); + + boolean isEligible = backupEligibilityRules.isAppEligibleForRestore(applicationInfo); + + assertThat(isEligible).isTrue(); + } + + @Test + public void isAppEligibleForRestore_launchedButHasBackupAgent_returnsTrue() { + when(mMockPackageManagerInternal.wasPackageEverLaunched(eq(TEST_PACKAGE_NAME), eq(mUserId))) + .thenReturn(true); + ApplicationInfo applicationInfo = getApplicationInfo(/* appUid */ 0, /* flags */ 0, + /* backupAgentName */ "BackupAgent"); + BackupEligibilityRules backupEligibilityRules = new BackupEligibilityRules(mPackageManager, + mMockPackageManagerInternal, mUserId, mContext, BackupDestination.CLOUD, + /* skipRestoreForLaunchedApps */ false); + + boolean isEligible = backupEligibilityRules.isAppEligibleForRestore(applicationInfo); + + assertThat(isEligible).isTrue(); + } + + @Test + public void isAppEligibleForRestore_doNotSkipRestoreForLaunched_returnsTrue() { + when(mMockPackageManagerInternal.wasPackageEverLaunched(eq(TEST_PACKAGE_NAME), eq(mUserId))) + .thenReturn(true); + ApplicationInfo applicationInfo = getApplicationInfo(/* appUid */ 0, /* flags */ 0, + /* backupAgentName */ null); + BackupEligibilityRules backupEligibilityRules = new BackupEligibilityRules(mPackageManager, + mMockPackageManagerInternal, mUserId, mContext, BackupDestination.CLOUD, + /* skipRestoreForLaunchedApps */ false); + + boolean isEligible = backupEligibilityRules.isAppEligibleForRestore(applicationInfo); + + assertThat(isEligible).isTrue(); + } + private BackupEligibilityRules getBackupEligibilityRules( @BackupDestination int backupDestination) { return new BackupEligibilityRules(mPackageManager, mMockPackageManagerInternal, mUserId, diff --git a/services/tests/servicestests/res/xml/usertypes_test_profile.xml b/services/tests/servicestests/res/xml/usertypes_test_profile.xml index ef19ba11fb6d..e89199dc9278 100644 --- a/services/tests/servicestests/res/xml/usertypes_test_profile.xml +++ b/services/tests/servicestests/res/xml/usertypes_test_profile.xml @@ -39,6 +39,7 @@ crossProfileIntentResolutionStrategy='0' mediaSharedWithParent='true' credentialShareableWithParent='false' + authAlwaysRequiredToDisableQuietMode='true' showInSettings='23' hideInSettingsInQuietMode='true' inheritDevicePolicy='450' diff --git a/services/tests/servicestests/src/com/android/server/accessibility/magnification/WindowMagnificationConnectionWrapperTest.java b/services/tests/servicestests/src/com/android/server/accessibility/magnification/MagnificationConnectionWrapperTest.java index 860819911173..cfd0289e5650 100644 --- a/services/tests/servicestests/src/com/android/server/accessibility/magnification/WindowMagnificationConnectionWrapperTest.java +++ b/services/tests/servicestests/src/com/android/server/accessibility/magnification/MagnificationConnectionWrapperTest.java @@ -37,11 +37,11 @@ import org.mockito.Mock; import org.mockito.MockitoAnnotations; /** - * Tests for WindowMagnificationConnectionWrapper. We don't test {@code - * WindowMagnificationConnectionWrapper#linkToDeath(IBinder.DeathRecipient)} since it's tested in + * Tests for MagnificationConnectionWrapper. We don't test {@code + * MagnificationConnectionWrapper#linkToDeath(IBinder.DeathRecipient)} since it's tested in * {@link WindowMagnificationManagerTest}. */ -public class WindowMagnificationConnectionWrapperTest { +public class MagnificationConnectionWrapperTest { private static final int TEST_DISPLAY = Display.DEFAULT_DISPLAY; @@ -54,14 +54,14 @@ public class WindowMagnificationConnectionWrapperTest { private MagnificationAnimationCallback mAnimationCallback; private MockWindowMagnificationConnection mMockWindowMagnificationConnection; - private WindowMagnificationConnectionWrapper mConnectionWrapper; + private MagnificationConnectionWrapper mConnectionWrapper; @Before public void setUp() throws RemoteException { MockitoAnnotations.initMocks(this); mMockWindowMagnificationConnection = new MockWindowMagnificationConnection(); mConnection = mMockWindowMagnificationConnection.getConnection(); - mConnectionWrapper = new WindowMagnificationConnectionWrapper(mConnection, mTrace); + mConnectionWrapper = new MagnificationConnectionWrapper(mConnection, mTrace); } @Test diff --git a/services/tests/servicestests/src/com/android/server/locksettings/LockSettingsServiceTestable.java b/services/tests/servicestests/src/com/android/server/locksettings/LockSettingsServiceTestable.java index 1c33d0de4568..18961c0feef9 100644 --- a/services/tests/servicestests/src/com/android/server/locksettings/LockSettingsServiceTestable.java +++ b/services/tests/servicestests/src/com/android/server/locksettings/LockSettingsServiceTestable.java @@ -34,6 +34,7 @@ import android.service.gatekeeper.IGateKeeperService; import com.android.internal.widget.LockscreenCredential; import com.android.server.ServiceThread; +import com.android.server.locksettings.SyntheticPasswordManager.SyntheticPassword; import com.android.server.locksettings.recoverablekeystore.RecoverableKeyStoreManager; import com.android.server.pm.UserManagerInternal; @@ -203,6 +204,10 @@ public class LockSettingsServiceTestable extends LockSettingsService { } @Override + void initKeystoreSuperKeys(int userId, SyntheticPassword sp, boolean allowExisting) { + } + + @Override protected boolean isCredentialSharableWithParent(int userId) { UserInfo userInfo = mUserManager.getUserInfo(userId); return userInfo.isCloneProfile() || userInfo.isManagedProfile(); diff --git a/services/tests/servicestests/src/com/android/server/net/NetworkManagementServiceTest.java b/services/tests/servicestests/src/com/android/server/net/NetworkManagementServiceTest.java index 2cdfbffda407..13dc12032e7d 100644 --- a/services/tests/servicestests/src/com/android/server/net/NetworkManagementServiceTest.java +++ b/services/tests/servicestests/src/com/android/server/net/NetworkManagementServiceTest.java @@ -57,7 +57,7 @@ import android.util.ArrayMap; import androidx.test.runner.AndroidJUnit4; import com.android.internal.app.IBatteryStats; -import com.android.net.flags.Flags; +import com.android.modules.utils.build.SdkLevel; import org.junit.After; import org.junit.Before; @@ -264,7 +264,7 @@ public class NetworkManagementServiceTest { verify(mCm).addUidToMeteredNetworkDenyList(TEST_UID); mNMService.setDataSaverModeEnabled(true); - if (Flags.setDataSaverViaCm()) { + if (SdkLevel.isAtLeastV()) { verify(mCm).setDataSaverEnabled(true); } else { verify(mNetdService).bandwidthEnableDataSaver(true); @@ -284,7 +284,7 @@ public class NetworkManagementServiceTest { mNMService.setUidOnMeteredNetworkAllowlist(TEST_UID, false); verify(mCm).removeUidFromMeteredNetworkAllowList(TEST_UID); mNMService.setDataSaverModeEnabled(false); - if (Flags.setDataSaverViaCm()) { + if (SdkLevel.isAtLeastV()) { verify(mCm).setDataSaverEnabled(false); } else { verify(mNetdService).bandwidthEnableDataSaver(false); diff --git a/services/tests/servicestests/src/com/android/server/pm/UserJourneyLoggerTest.java b/services/tests/servicestests/src/com/android/server/pm/UserJourneyLoggerTest.java index bfd407216c3b..186a27ccdc26 100644 --- a/services/tests/servicestests/src/com/android/server/pm/UserJourneyLoggerTest.java +++ b/services/tests/servicestests/src/com/android/server/pm/UserJourneyLoggerTest.java @@ -45,6 +45,7 @@ import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; import android.content.pm.UserInfo; +import android.os.UserManager; import android.platform.test.annotations.Presubmit; import androidx.test.runner.AndroidJUnit4; @@ -135,6 +136,53 @@ public class UserJourneyLoggerTest { } @Test + public void testCreatePrivateProfileUserJourney() { + final UserLifecycleEventOccurredCaptor report1 = new UserLifecycleEventOccurredCaptor(); + final UserJourneyLogger.UserJourneySession session = + mUserJourneyLogger.logUserJourneyBegin(-1, USER_JOURNEY_USER_CREATE); + + report1.captureAndAssert( + mUserJourneyLogger, + session.mSessionId, + -1, + USER_LIFECYCLE_EVENT_CREATE_USER, + EVENT_STATE_BEGIN, + ERROR_CODE_UNSPECIFIED, + 1); + + final UserLifecycleJourneyReportedCaptor report2 = new UserLifecycleJourneyReportedCaptor(); + final int profileUserId = 10; + UserInfo targetUser = + new UserInfo( + profileUserId, + "test private target user", + /* iconPath= */ null, + UserInfo.FLAG_PROFILE, + UserManager.USER_TYPE_PROFILE_PRIVATE); + mUserJourneyLogger.logUserCreateJourneyFinish(0, targetUser); + + report1.captureAndAssert( + mUserJourneyLogger, + session.mSessionId, + profileUserId, + USER_LIFECYCLE_EVENT_CREATE_USER, + EVENT_STATE_FINISH, + ERROR_CODE_UNSPECIFIED, + 2); + + report2.captureAndAssert( + mUserJourneyLogger, + session.mSessionId, + USER_JOURNEY_USER_CREATE, + 0, + profileUserId, + FrameworkStatsLog.USER_LIFECYCLE_JOURNEY_REPORTED__USER_TYPE__PROFILE_PRIVATE, + UserInfo.FLAG_PROFILE, + ERROR_CODE_UNSPECIFIED, + 1); + } + + @Test public void testRemoveUserJourney() { final UserLifecycleEventOccurredCaptor report1 = new UserLifecycleEventOccurredCaptor(); final UserJourneyLogger.UserJourneySession session = mUserJourneyLogger @@ -161,6 +209,54 @@ public class UserJourneyLoggerTest { } @Test + public void testRemovePrivateProfileUserJourneyWithError() { + final UserLifecycleEventOccurredCaptor report1 = new UserLifecycleEventOccurredCaptor(); + final int profileUserId = 10; + final UserJourneyLogger.UserJourneySession session = + mUserJourneyLogger.logUserJourneyBegin(profileUserId, USER_JOURNEY_USER_REMOVE); + + report1.captureAndAssert( + mUserJourneyLogger, + session.mSessionId, + profileUserId, + USER_LIFECYCLE_EVENT_REMOVE_USER, + EVENT_STATE_BEGIN, + ERROR_CODE_UNSPECIFIED, + 1); + + final UserLifecycleJourneyReportedCaptor report2 = new UserLifecycleJourneyReportedCaptor(); + final UserInfo targetUser = + new UserInfo( + profileUserId, + "test private target user", + /* iconPath= */ null, + UserInfo.FLAG_PROFILE, + UserManager.USER_TYPE_PROFILE_PRIVATE); + mUserJourneyLogger.logUserJourneyFinishWithError( + 0, targetUser, USER_JOURNEY_USER_REMOVE, ERROR_CODE_INCOMPLETE_OR_TIMEOUT); + + report1.captureAndAssert( + mUserJourneyLogger, + session.mSessionId, + profileUserId, + USER_LIFECYCLE_EVENT_REMOVE_USER, + EVENT_STATE_ERROR, + ERROR_CODE_INCOMPLETE_OR_TIMEOUT, + 2); + + report2.captureAndAssert( + mUserJourneyLogger, + session.mSessionId, + USER_JOURNEY_USER_REMOVE, + 0, + profileUserId, + FrameworkStatsLog.USER_LIFECYCLE_JOURNEY_REPORTED__USER_TYPE__PROFILE_PRIVATE, + UserInfo.FLAG_PROFILE, + ERROR_CODE_INCOMPLETE_OR_TIMEOUT, + 1); + } + + @Test public void testStartUserJourney() { final UserLifecycleEventOccurredCaptor report1 = new UserLifecycleEventOccurredCaptor(); final UserJourneyLogger.UserJourneySession session = mUserJourneyLogger diff --git a/services/tests/servicestests/src/com/android/server/pm/UserManagerServiceUserPropertiesTest.java b/services/tests/servicestests/src/com/android/server/pm/UserManagerServiceUserPropertiesTest.java index c684a7bbf884..57b12251c207 100644 --- a/services/tests/servicestests/src/com/android/server/pm/UserManagerServiceUserPropertiesTest.java +++ b/services/tests/servicestests/src/com/android/server/pm/UserManagerServiceUserPropertiesTest.java @@ -67,6 +67,7 @@ public class UserManagerServiceUserPropertiesTest { .setCrossProfileIntentResolutionStrategy(0) .setMediaSharedWithParent(false) .setCredentialShareableWithParent(true) + .setAuthAlwaysRequiredToDisableQuietMode(false) .setDeleteAppWithParent(false) .setAlwaysVisible(false) .build(); @@ -80,6 +81,7 @@ public class UserManagerServiceUserPropertiesTest { actualProps.setCrossProfileIntentResolutionStrategy(1); actualProps.setMediaSharedWithParent(true); actualProps.setCredentialShareableWithParent(false); + actualProps.setAuthAlwaysRequiredToDisableQuietMode(true); actualProps.setDeleteAppWithParent(true); actualProps.setAlwaysVisible(true); @@ -123,6 +125,7 @@ public class UserManagerServiceUserPropertiesTest { .setInheritDevicePolicy(1732) .setMediaSharedWithParent(true) .setDeleteAppWithParent(true) + .setAuthAlwaysRequiredToDisableQuietMode(false) .setAlwaysVisible(true) .build(); final UserProperties orig = new UserProperties(defaultProps); @@ -131,6 +134,7 @@ public class UserManagerServiceUserPropertiesTest { orig.setShowInSettings(1437); orig.setInheritDevicePolicy(9456); orig.setDeleteAppWithParent(false); + orig.setAuthAlwaysRequiredToDisableQuietMode(true); orig.setAlwaysVisible(false); // Test every permission level. (Currently, it's linear so it's easy.) @@ -182,6 +186,8 @@ public class UserManagerServiceUserPropertiesTest { hasManagePermission); assertEqualGetterOrThrows(orig::getUseParentsContacts, copy::getUseParentsContacts, hasManagePermission); + assertEqualGetterOrThrows(orig::isAuthAlwaysRequiredToDisableQuietMode, + copy::isAuthAlwaysRequiredToDisableQuietMode, hasManagePermission); // Items requiring hasQueryPermission - put them here using hasQueryPermission. @@ -242,6 +248,8 @@ public class UserManagerServiceUserPropertiesTest { .isEqualTo(actual.isMediaSharedWithParent()); assertThat(expected.isCredentialShareableWithParent()) .isEqualTo(actual.isCredentialShareableWithParent()); + assertThat(expected.isAuthAlwaysRequiredToDisableQuietMode()) + .isEqualTo(actual.isAuthAlwaysRequiredToDisableQuietMode()); assertThat(expected.getDeleteAppWithParent()).isEqualTo(actual.getDeleteAppWithParent()); assertThat(expected.getAlwaysVisible()).isEqualTo(actual.getAlwaysVisible()); } diff --git a/services/tests/servicestests/src/com/android/server/pm/UserManagerServiceUserTypeTest.java b/services/tests/servicestests/src/com/android/server/pm/UserManagerServiceUserTypeTest.java index 20270a817831..48eb5c64f3d1 100644 --- a/services/tests/servicestests/src/com/android/server/pm/UserManagerServiceUserTypeTest.java +++ b/services/tests/servicestests/src/com/android/server/pm/UserManagerServiceUserTypeTest.java @@ -89,6 +89,7 @@ public class UserManagerServiceUserTypeTest { .setCrossProfileIntentResolutionStrategy(1) .setMediaSharedWithParent(true) .setCredentialShareableWithParent(false) + .setAuthAlwaysRequiredToDisableQuietMode(true) .setShowInSettings(900) .setHideInSettingsInQuietMode(true) .setInheritDevicePolicy(340) @@ -160,6 +161,8 @@ public class UserManagerServiceUserTypeTest { .getCrossProfileIntentResolutionStrategy()); assertTrue(type.getDefaultUserPropertiesReference().isMediaSharedWithParent()); assertFalse(type.getDefaultUserPropertiesReference().isCredentialShareableWithParent()); + assertTrue(type.getDefaultUserPropertiesReference() + .isAuthAlwaysRequiredToDisableQuietMode()); assertEquals(900, type.getDefaultUserPropertiesReference().getShowInSettings()); assertTrue(type.getDefaultUserPropertiesReference().getHideInSettingsInQuietMode()); assertEquals(340, type.getDefaultUserPropertiesReference() @@ -306,6 +309,7 @@ public class UserManagerServiceUserTypeTest { .setCrossProfileIntentResolutionStrategy(1) .setMediaSharedWithParent(false) .setCredentialShareableWithParent(true) + .setAuthAlwaysRequiredToDisableQuietMode(false) .setShowInSettings(20) .setHideInSettingsInQuietMode(false) .setInheritDevicePolicy(21) @@ -347,6 +351,8 @@ public class UserManagerServiceUserTypeTest { assertFalse(aospType.getDefaultUserPropertiesReference().isMediaSharedWithParent()); assertTrue(aospType.getDefaultUserPropertiesReference() .isCredentialShareableWithParent()); + assertFalse(aospType.getDefaultUserPropertiesReference() + .isAuthAlwaysRequiredToDisableQuietMode()); assertEquals(20, aospType.getDefaultUserPropertiesReference().getShowInSettings()); assertFalse(aospType.getDefaultUserPropertiesReference().getHideInSettingsInQuietMode()); assertEquals(21, aospType.getDefaultUserPropertiesReference() @@ -394,6 +400,8 @@ public class UserManagerServiceUserTypeTest { assertTrue(aospType.getDefaultUserPropertiesReference().isMediaSharedWithParent()); assertFalse(aospType.getDefaultUserPropertiesReference() .isCredentialShareableWithParent()); + assertTrue(aospType.getDefaultUserPropertiesReference() + .isAuthAlwaysRequiredToDisableQuietMode()); assertEquals(23, aospType.getDefaultUserPropertiesReference().getShowInSettings()); assertTrue(aospType.getDefaultUserPropertiesReference().getHideInSettingsInQuietMode()); assertEquals(450, aospType.getDefaultUserPropertiesReference() diff --git a/services/tests/servicestests/src/com/android/server/pm/UserManagerTest.java b/services/tests/servicestests/src/com/android/server/pm/UserManagerTest.java index 775d42a4df5f..2b6d8eda6bb0 100644 --- a/services/tests/servicestests/src/com/android/server/pm/UserManagerTest.java +++ b/services/tests/servicestests/src/com/android/server/pm/UserManagerTest.java @@ -331,6 +331,9 @@ public final class UserManagerTest { .isEqualTo(privateProfileUserProperties.isMediaSharedWithParent()); assertThat(typeProps.isCredentialShareableWithParent()) .isEqualTo(privateProfileUserProperties.isCredentialShareableWithParent()); + assertThat(typeProps.isAuthAlwaysRequiredToDisableQuietMode()) + .isEqualTo(privateProfileUserProperties + .isAuthAlwaysRequiredToDisableQuietMode()); assertThrows(SecurityException.class, privateProfileUserProperties::getDeleteAppWithParent); // Verify private profile parent diff --git a/services/tests/servicestests/src/com/android/server/pm/parsing/AndroidPackageParsingValidationTest.kt b/services/tests/servicestests/src/com/android/server/pm/parsing/AndroidPackageParsingValidationTest.kt index cf2b748f7752..ee23a00f27d7 100644 --- a/services/tests/servicestests/src/com/android/server/pm/parsing/AndroidPackageParsingValidationTest.kt +++ b/services/tests/servicestests/src/com/android/server/pm/parsing/AndroidPackageParsingValidationTest.kt @@ -492,6 +492,40 @@ class AndroidPackageParsingValidationTest { validateTagAttr(tag, "name", R.styleable.AndroidManifestUsesPermission_name, 1024) } + @Test + fun totalMetadataValuesExceedMax_shouldFail() { + val value = "x".repeat(8192) + var tags = "" + repeat(32) { index -> + tags += "<meta-data name=\"name$index\" value=\"$value\" />" + } + var xml = "<application>$tags</application>" + try { + parseXmlForMetadata(xml) + } catch (e: SecurityException) { + fail( + "Failed to parse component meta-data when values have not exceeded max allowed" + ) + } + try { + parseXmlForMetadataRes(xml) + } catch (e: SecurityException) { + fail( + "Failed to parse component meta-data when values have not exceeded max allowed" + ) + } + tags += "<meta-data name=\"last\" value=\"x\" />" + xml = "<application>$tags</application>" + var e = assertThrows(SecurityException::class.java) { + parseXmlForMetadata(xml) + } + assertEquals("Max total meta data size limit exceeded for application", e.message) + e = assertThrows(SecurityException::class.java) { + parseXmlForMetadataRes(xml) + } + assertEquals("Max total meta data size limit exceeded for application", e.message) + } + private fun validateTagAttrComponentName(tag: String, attr: String, index: Int) { val passNames = arrayOf("com.android.TestClass", "TestClass", "_", "$", ".TestClass", "上") for (name in passNames) { @@ -664,6 +698,38 @@ class AndroidPackageParsingValidationTest { } while (type != XmlPullParser.END_DOCUMENT) } + fun parseXmlForMetadata(manifestStr: String) { + pullParser.setInput(ByteArrayInputStream(manifestStr.toByteArray()), null) + val validator = Validator() + do { + val type = pullParser.next() + validator.validate(pullParser) + if (type == XmlPullParser.START_TAG && pullParser.getName().equals("meta-data")) { + val name = "value" + val value = pullParser.getAttributeValue("", name) + validator.validateStrAttr(pullParser, "value", value) + } + } while (type != XmlPullParser.END_DOCUMENT) + } + + fun parseXmlForMetadataRes(manifestStr: String) { + pullParser.setInput(ByteArrayInputStream(manifestStr.toByteArray()), null) + val validator = Validator() + do { + val type = pullParser.next() + validator.validate(pullParser) + if (type == XmlPullParser.START_TAG && pullParser.getName().equals("meta-data")) { + val name = "value" + val value = pullParser.getAttributeValue("", name) + validator.validateResStrAttr( + pullParser, + R.styleable.AndroidManifestMetaData_value, + value + ) + } + } while (type != XmlPullParser.END_DOCUMENT) + } + fun expectedCountErrorMsg(tag: String, parentTag: String) = "The number of child $tag elements exceeded the max allowed in $parentTag" diff --git a/services/tests/servicestests/src/com/android/server/power/ThermalManagerServiceTest.java b/services/tests/servicestests/src/com/android/server/power/ThermalManagerServiceTest.java index 13c011ad2f68..44dad593810a 100644 --- a/services/tests/servicestests/src/com/android/server/power/ThermalManagerServiceTest.java +++ b/services/tests/servicestests/src/com/android/server/power/ThermalManagerServiceTest.java @@ -18,9 +18,11 @@ package com.android.server.power; import static com.google.common.truth.Truth.assertThat; +import static org.junit.Assert.assertArrayEquals; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNotSame; import static org.junit.Assert.assertTrue; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.anyInt; @@ -28,6 +30,7 @@ import static org.mockito.Mockito.doReturn; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.reset; import static org.mockito.Mockito.timeout; +import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; @@ -49,6 +52,7 @@ import androidx.test.filters.SmallTest; import androidx.test.runner.AndroidJUnit4; import com.android.server.SystemService; +import com.android.server.power.ThermalManagerService.TemperatureWatcher; import com.android.server.power.ThermalManagerService.ThermalHalWrapper; import org.junit.Before; @@ -65,6 +69,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.HashSet; import java.util.List; +import java.util.Map; /** * atest $ANDROID_BUILD_TOP/frameworks/base/services/tests/servicestests/src/com/android/server @@ -415,9 +420,9 @@ public class ThermalManagerServiceTest { @Test public void testTemperatureWatcherUpdateSevereThresholds() throws RemoteException { - ThermalManagerService.TemperatureWatcher watcher = mService.mTemperatureWatcher; + TemperatureWatcher watcher = mService.mTemperatureWatcher; watcher.mSevereThresholds.erase(); - watcher.updateSevereThresholds(); + watcher.updateThresholds(); assertEquals(1, watcher.mSevereThresholds.size()); assertEquals("skin1", watcher.mSevereThresholds.keyAt(0)); Float threshold = watcher.mSevereThresholds.get("skin1"); @@ -426,9 +431,60 @@ public class ThermalManagerServiceTest { } @Test + public void testTemperatureWatcherUpdateHeadroomThreshold() { + TemperatureWatcher watcher = mService.mTemperatureWatcher; + synchronized (watcher.mSamples) { + Arrays.fill(watcher.mHeadroomThresholds, Float.NaN); + } + watcher.updateHeadroomThreshold(ThrottlingSeverity.LIGHT, 40, 49); + watcher.updateHeadroomThreshold(ThrottlingSeverity.MODERATE, 46, 49); + watcher.updateHeadroomThreshold(ThrottlingSeverity.SEVERE, 49, 49); + watcher.updateHeadroomThreshold(ThrottlingSeverity.CRITICAL, 64, 49); + watcher.updateHeadroomThreshold(ThrottlingSeverity.EMERGENCY, 70, 49); + watcher.updateHeadroomThreshold(ThrottlingSeverity.SHUTDOWN, 79, 49); + synchronized (watcher.mSamples) { + assertArrayEquals(new float[]{Float.NaN, 0.7f, 0.9f, 1.0f, 1.5f, 1.7f, 2.0f}, + watcher.mHeadroomThresholds, 0.01f); + } + + // when another sensor reports different threshold, we expect to see smaller one to be used + watcher.updateHeadroomThreshold(ThrottlingSeverity.LIGHT, 37, 52); + watcher.updateHeadroomThreshold(ThrottlingSeverity.MODERATE, 46, 52); + watcher.updateHeadroomThreshold(ThrottlingSeverity.SEVERE, 52, 52); + watcher.updateHeadroomThreshold(ThrottlingSeverity.CRITICAL, 64, 52); + watcher.updateHeadroomThreshold(ThrottlingSeverity.EMERGENCY, 100, 52); + watcher.updateHeadroomThreshold(ThrottlingSeverity.SHUTDOWN, 200, 52); + synchronized (watcher.mSamples) { + assertArrayEquals(new float[]{Float.NaN, 0.5f, 0.8f, 1.0f, 1.4f, 1.7f, 2.0f}, + watcher.mHeadroomThresholds, 0.01f); + } + } + + @Test + public void testGetThermalHeadroomThresholdsOnlyReadOnce() throws Exception { + float[] expected = new float[]{Float.NaN, 0.1f, 0.2f, 0.3f, 0.4f, Float.NaN, 0.6f}; + when(mIThermalServiceMock.getThermalHeadroomThresholds()).thenReturn(expected); + Map<Integer, Float> thresholds1 = mPowerManager.getThermalHeadroomThresholds(); + verify(mIThermalServiceMock, times(1)).getThermalHeadroomThresholds(); + for (int status = PowerManager.THERMAL_STATUS_LIGHT; + status <= PowerManager.THERMAL_STATUS_SHUTDOWN; status++) { + if (Float.isNaN(expected[status])) { + assertFalse(thresholds1.containsKey(status)); + } else { + assertEquals(expected[status], thresholds1.get(status), 0.01f); + } + } + reset(mIThermalServiceMock); + Map<Integer, Float> thresholds2 = mPowerManager.getThermalHeadroomThresholds(); + verify(mIThermalServiceMock, times(0)).getThermalHeadroomThresholds(); + assertNotSame(thresholds1, thresholds2); + assertEquals(thresholds1, thresholds2); + } + + @Test public void testTemperatureWatcherGetSlopeOf() throws RemoteException { - ThermalManagerService.TemperatureWatcher watcher = mService.mTemperatureWatcher; - List<ThermalManagerService.TemperatureWatcher.Sample> samples = new ArrayList<>(); + TemperatureWatcher watcher = mService.mTemperatureWatcher; + List<TemperatureWatcher.Sample> samples = new ArrayList<>(); for (int i = 0; i < 30; ++i) { samples.add(watcher.createSampleForTesting(i, (float) (i / 2 * 2))); } @@ -437,21 +493,23 @@ public class ThermalManagerServiceTest { @Test public void testTemperatureWatcherNormalizeTemperature() throws RemoteException { - ThermalManagerService.TemperatureWatcher watcher = mService.mTemperatureWatcher; - assertEquals(0.5f, watcher.normalizeTemperature(25.0f, 40.0f), 0.0f); + assertEquals(0.5f, + TemperatureWatcher.normalizeTemperature(25.0f, 40.0f), 0.0f); // Temperatures more than 30 degrees below the SEVERE threshold should be clamped to 0.0f - assertEquals(0.0f, watcher.normalizeTemperature(0.0f, 40.0f), 0.0f); + assertEquals(0.0f, + TemperatureWatcher.normalizeTemperature(0.0f, 40.0f), 0.0f); // Temperatures above the SEVERE threshold should not be clamped - assertEquals(2.0f, watcher.normalizeTemperature(70.0f, 40.0f), 0.0f); + assertEquals(2.0f, + TemperatureWatcher.normalizeTemperature(70.0f, 40.0f), 0.0f); } @Test public void testTemperatureWatcherGetForecast() throws RemoteException { - ThermalManagerService.TemperatureWatcher watcher = mService.mTemperatureWatcher; + TemperatureWatcher watcher = mService.mTemperatureWatcher; - ArrayList<ThermalManagerService.TemperatureWatcher.Sample> samples = new ArrayList<>(); + ArrayList<TemperatureWatcher.Sample> samples = new ArrayList<>(); // Add a single sample samples.add(watcher.createSampleForTesting(0, 25.0f)); @@ -478,7 +536,7 @@ public class ThermalManagerServiceTest { @Test public void testTemperatureWatcherGetForecastUpdate() throws Exception { - ThermalManagerService.TemperatureWatcher watcher = mService.mTemperatureWatcher; + TemperatureWatcher watcher = mService.mTemperatureWatcher; // Reduce the inactivity threshold to speed up testing watcher.mInactivityThresholdMillis = 2000; @@ -499,7 +557,7 @@ public class ThermalManagerServiceTest { } // Helper function to hold mSamples lock, avoid GuardedBy lint errors - private boolean isWatcherSamplesEmpty(ThermalManagerService.TemperatureWatcher watcher) { + private boolean isWatcherSamplesEmpty(TemperatureWatcher watcher) { synchronized (watcher.mSamples) { return watcher.mSamples.isEmpty(); } diff --git a/services/tests/timetests/TEST_MAPPING b/services/tests/timetests/TEST_MAPPING index b24010ce447a..e549229d000f 100644 --- a/services/tests/timetests/TEST_MAPPING +++ b/services/tests/timetests/TEST_MAPPING @@ -1,6 +1,5 @@ { - // TODO(b/182461754): Change to "presubmit" when go/test-mapping-slo-guide allows. - "postsubmit": [ + "presubmit": [ { "name": "FrameworksTimeServicesTests" } diff --git a/services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java b/services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java index 3803244c7012..7fb8b30dea06 100755 --- a/services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java +++ b/services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java @@ -3239,7 +3239,7 @@ public class NotificationManagerServiceTest extends UiServiceTestCase { mService.setPreferencesHelper(mPreferencesHelper); when(mPreferencesHelper.getNotificationChannel( anyString(), anyInt(), eq("foo"), anyBoolean())).thenReturn( - new NotificationChannel("foo", "foo", IMPORTANCE_HIGH)); + new NotificationChannel("foo", "foo", IMPORTANCE_HIGH)); Notification.TvExtender tv = new Notification.TvExtender().setChannelId("foo"); mBinderService.enqueueNotificationWithTag(PKG, PKG, "testTvExtenderChannelOverride_onTv", 0, @@ -9927,6 +9927,174 @@ public class NotificationManagerServiceTest extends UiServiceTestCase { } @Test + public void testRestoreConversationChannel_deleted() throws Exception { + // Create parent channel + when(mPackageManager.isPackageSuspendedForUser(anyString(), anyInt())).thenReturn(false); + final NotificationChannel originalChannel = new NotificationChannel("id", "name", + IMPORTANCE_DEFAULT); + NotificationChannel parentChannel = parcelAndUnparcel(originalChannel, + NotificationChannel.CREATOR); + assertEquals(originalChannel, parentChannel); + mBinderService.createNotificationChannels(PKG, + new ParceledListSlice(Arrays.asList(parentChannel))); + + //Create deleted conversation channel + mBinderService.createConversationNotificationChannelForPackage( + PKG, mUid, parentChannel, VALID_CONVO_SHORTCUT_ID); + final NotificationChannel conversationChannel = + mBinderService.getConversationNotificationChannel( + PKG, mUserId, PKG, originalChannel.getId(), false, VALID_CONVO_SHORTCUT_ID); + conversationChannel.setDeleted(true); + + //Create notification record + Notification.Builder nb = getMessageStyleNotifBuilder(false /* addDefaultMetadata */, + null /* groupKey */, false /* isSummary */); + nb.setShortcutId(VALID_CONVO_SHORTCUT_ID); + nb.setChannelId(originalChannel.getId()); + StatusBarNotification sbn = new StatusBarNotification(PKG, PKG, 1, + "tag", mUid, 0, nb.build(), UserHandle.getUserHandleForUid(mUid), null, 0); + NotificationRecord nr = new NotificationRecord(mContext, sbn, originalChannel); + assertThat(nr.getChannel()).isEqualTo(originalChannel); + + mBinderService.enqueueNotificationWithTag(PKG, PKG, nr.getSbn().getTag(), + nr.getSbn().getId(), nr.getSbn().getNotification(), nr.getSbn().getUserId()); + waitForIdle(); + + // Verify that the channel was changed to the conversation channel and restored + assertThat(mService.getNotificationRecord(nr.getKey()).isConversation()).isTrue(); + assertThat(mService.getNotificationRecord(nr.getKey()).getChannel()).isEqualTo( + conversationChannel); + assertThat(mService.getNotificationRecord(nr.getKey()).getChannel().isDeleted()).isFalse(); + assertThat(mService.getNotificationRecord(nr.getKey()).getChannel().getDeletedTimeMs()) + .isEqualTo(-1); + } + + @Test + public void testDoNotRestoreParentChannel_deleted() throws Exception { + // Create parent channel and set as deleted + when(mPackageManager.isPackageSuspendedForUser(anyString(), anyInt())).thenReturn(false); + final NotificationChannel originalChannel = new NotificationChannel("id", "name", + IMPORTANCE_DEFAULT); + NotificationChannel parentChannel = parcelAndUnparcel(originalChannel, + NotificationChannel.CREATOR); + assertEquals(originalChannel, parentChannel); + mBinderService.createNotificationChannels(PKG, + new ParceledListSlice(Arrays.asList(parentChannel))); + parentChannel.setDeleted(true); + + //Create notification record + Notification.Builder nb = getMessageStyleNotifBuilder(false /* addDefaultMetadata */, + null /* groupKey */, false /* isSummary */); + nb.setShortcutId(VALID_CONVO_SHORTCUT_ID); + nb.setChannelId(originalChannel.getId()); + StatusBarNotification sbn = new StatusBarNotification(PKG, PKG, 1, + "tag", mUid, 0, nb.build(), UserHandle.getUserHandleForUid(mUid), null, 0); + NotificationRecord nr = new NotificationRecord(mContext, sbn, originalChannel); + assertThat(nr.getChannel()).isEqualTo(originalChannel); + + when(mPermissionHelper.hasPermission(mUid)).thenReturn(true); + + mBinderService.enqueueNotificationWithTag(PKG, PKG, nr.getSbn().getTag(), + nr.getSbn().getId(), nr.getSbn().getNotification(), nr.getSbn().getUserId()); + waitForIdle(); + + // Verify that the channel was not restored and the notification was not posted + assertThat(mService.mChannelToastsSent).contains(mUid); + assertThat(mService.getNotificationRecord(nr.getKey())).isNull(); + assertThat(parentChannel.isDeleted()).isTrue(); + } + + @Test + public void testEnqueueToConversationChannel_notDeleted_doesNotRestore() throws Exception { + TestableNotificationManagerService service = spy(mService); + PreferencesHelper preferencesHelper = spy(mService.mPreferencesHelper); + service.setPreferencesHelper(preferencesHelper); + // Create parent channel + when(mPackageManager.isPackageSuspendedForUser(anyString(), anyInt())).thenReturn(false); + final NotificationChannel originalChannel = new NotificationChannel("id", "name", + IMPORTANCE_DEFAULT); + NotificationChannel parentChannel = parcelAndUnparcel(originalChannel, + NotificationChannel.CREATOR); + assertEquals(originalChannel, parentChannel); + mBinderService.createNotificationChannels(PKG, + new ParceledListSlice(Arrays.asList(parentChannel))); + + //Create conversation channel + mBinderService.createConversationNotificationChannelForPackage( + PKG, mUid, parentChannel, VALID_CONVO_SHORTCUT_ID); + final NotificationChannel conversationChannel = + mBinderService.getConversationNotificationChannel( + PKG, mUserId, PKG, originalChannel.getId(), false, VALID_CONVO_SHORTCUT_ID); + + //Create notification record + Notification.Builder nb = getMessageStyleNotifBuilder(false /* addDefaultMetadata */, + null /* groupKey */, false /* isSummary */); + nb.setShortcutId(VALID_CONVO_SHORTCUT_ID); + nb.setChannelId(originalChannel.getId()); + StatusBarNotification sbn = new StatusBarNotification(PKG, PKG, 1, + "tag", mUid, 0, nb.build(), UserHandle.getUserHandleForUid(mUid), null, 0); + NotificationRecord nr = new NotificationRecord(mContext, sbn, originalChannel); + assertThat(nr.getChannel()).isEqualTo(originalChannel); + + mBinderService.enqueueNotificationWithTag(PKG, PKG, nr.getSbn().getTag(), + nr.getSbn().getId(), nr.getSbn().getNotification(), nr.getSbn().getUserId()); + waitForIdle(); + + // Verify that the channel was changed to the conversation channel and not restored + assertThat(service.getNotificationRecord(nr.getKey()).isConversation()).isTrue(); + assertThat(service.getNotificationRecord(nr.getKey()).getChannel()).isEqualTo( + conversationChannel); + verify(service, never()).handleSavePolicyFile(); + verify(preferencesHelper, never()).createNotificationChannel(anyString(), + anyInt(), any(), anyBoolean(), anyBoolean(), anyInt(), anyBoolean()); + } + + @Test + public void testEnqueueToParentChannel_notDeleted_doesNotRestore() throws Exception { + TestableNotificationManagerService service = spy(mService); + PreferencesHelper preferencesHelper = spy(mService.mPreferencesHelper); + service.setPreferencesHelper(preferencesHelper); + // Create parent channel + when(mPackageManager.isPackageSuspendedForUser(anyString(), anyInt())).thenReturn(false); + final NotificationChannel originalChannel = new NotificationChannel("id", "name", + IMPORTANCE_DEFAULT); + NotificationChannel parentChannel = parcelAndUnparcel(originalChannel, + NotificationChannel.CREATOR); + assertEquals(originalChannel, parentChannel); + mBinderService.createNotificationChannels(PKG, + new ParceledListSlice(Arrays.asList(parentChannel))); + + //Create deleted conversation channel + mBinderService.createConversationNotificationChannelForPackage( + PKG, mUid, parentChannel, VALID_CONVO_SHORTCUT_ID); + final NotificationChannel conversationChannel = + mBinderService.getConversationNotificationChannel( + PKG, mUserId, PKG, originalChannel.getId(), false, VALID_CONVO_SHORTCUT_ID); + + //Create notification record without a shortcutId + Notification.Builder nb = getMessageStyleNotifBuilder(false /* addDefaultMetadata */, + null /* groupKey */, false /* isSummary */); + nb.setShortcutId(null); + nb.setChannelId(originalChannel.getId()); + StatusBarNotification sbn = new StatusBarNotification(PKG, PKG, 1, + "tag", mUid, 0, nb.build(), UserHandle.getUserHandleForUid(mUid), null, 0); + NotificationRecord nr = new NotificationRecord(mContext, sbn, originalChannel); + assertThat(nr.getChannel()).isEqualTo(originalChannel); + + mBinderService.enqueueNotificationWithTag(PKG, PKG, nr.getSbn().getTag(), + nr.getSbn().getId(), nr.getSbn().getNotification(), nr.getSbn().getUserId()); + waitForIdle(); + + // Verify that the channel is the parent channel and no channel was restored + //assertThat(service.getNotificationRecord(nr.getKey()).isConversation()).isFalse(); + assertThat(service.getNotificationRecord(nr.getKey()).getChannel()).isEqualTo( + parentChannel); + verify(service, never()).handleSavePolicyFile(); + verify(preferencesHelper, never()).createNotificationChannel(anyString(), + anyInt(), any(), anyBoolean(), anyBoolean(), anyInt(), anyBoolean()); + } + + @Test public void testGetConversationsForPackage_hasShortcut() throws Exception { mService.setPreferencesHelper(mPreferencesHelper); ArrayList<ConversationChannelWrapper> convos = new ArrayList<>(); diff --git a/services/tests/wmtests/src/com/android/server/policy/ShortcutKeyTestBase.java b/services/tests/wmtests/src/com/android/server/policy/ShortcutKeyTestBase.java index 270d5df5e702..ab35da69da7c 100644 --- a/services/tests/wmtests/src/com/android/server/policy/ShortcutKeyTestBase.java +++ b/services/tests/wmtests/src/com/android/server/policy/ShortcutKeyTestBase.java @@ -46,7 +46,6 @@ import static com.android.server.policy.WindowManagerPolicy.ACTION_PASS_TO_USER; import static java.util.Collections.unmodifiableMap; import android.content.Context; -import android.os.SystemClock; import android.util.ArrayMap; import android.view.InputDevice; import android.view.KeyCharacterMap; @@ -110,8 +109,8 @@ class ShortcutKeyTestBase { } } - void sendKeyCombination(int[] keyCodes, long duration, boolean longPress) { - final long downTime = SystemClock.uptimeMillis(); + void sendKeyCombination(int[] keyCodes, long durationMillis, boolean longPress) { + final long downTime = mPhoneWindowManager.getCurrentTime(); final int count = keyCodes.length; int metaState = 0; @@ -126,14 +125,12 @@ class ShortcutKeyTestBase { metaState |= MODIFIER.getOrDefault(keyCode, 0); } - try { - Thread.sleep(duration); - } catch (InterruptedException e) { - throw new RuntimeException(e); + if (durationMillis > 0) { + mPhoneWindowManager.moveTimeForward(durationMillis); } if (longPress) { - final long nextDownTime = SystemClock.uptimeMillis(); + final long nextDownTime = mPhoneWindowManager.getCurrentTime(); for (int i = 0; i < count; i++) { final int keyCode = keyCodes[i]; final KeyEvent nextDownEvent = new KeyEvent(downTime, nextDownTime, @@ -145,7 +142,7 @@ class ShortcutKeyTestBase { } } - final long eventTime = SystemClock.uptimeMillis(); + final long eventTime = mPhoneWindowManager.getCurrentTime(); for (int i = count - 1; i >= 0; i--) { final int keyCode = keyCodes[i]; final KeyEvent upEvent = new KeyEvent(downTime, eventTime, KeyEvent.ACTION_UP, keyCode, @@ -157,8 +154,8 @@ class ShortcutKeyTestBase { } } - void sendKeyCombination(int[] keyCodes, long duration) { - sendKeyCombination(keyCodes, duration, false /* longPress */); + void sendKeyCombination(int[] keyCodes, long durationMillis) { + sendKeyCombination(keyCodes, durationMillis, false /* longPress */); } void sendLongPressKeyCombination(int[] keyCodes) { @@ -170,30 +167,7 @@ class ShortcutKeyTestBase { } void sendKey(int keyCode, boolean longPress) { - final long downTime = SystemClock.uptimeMillis(); - final KeyEvent event = new KeyEvent(downTime, downTime, KeyEvent.ACTION_DOWN, keyCode, - 0 /*repeat*/, 0 /*metaState*/, KeyCharacterMap.VIRTUAL_KEYBOARD, 0 /*scancode*/, - 0 /*flags*/, InputDevice.SOURCE_KEYBOARD); - event.setDisplayId(DEFAULT_DISPLAY); - interceptKey(event); - - if (longPress) { - final long nextDownTime = downTime + ViewConfiguration.getLongPressTimeout(); - final KeyEvent nextDownevent = new KeyEvent(downTime, nextDownTime, - KeyEvent.ACTION_DOWN, keyCode, 1 /*repeat*/, 0 /*metaState*/, - KeyCharacterMap.VIRTUAL_KEYBOARD, 0 /*scancode*/, - KeyEvent.FLAG_LONG_PRESS /*flags*/, InputDevice.SOURCE_KEYBOARD); - interceptKey(nextDownevent); - } - - final long eventTime = longPress - ? SystemClock.uptimeMillis() + ViewConfiguration.getLongPressTimeout() - : SystemClock.uptimeMillis(); - final KeyEvent upEvent = new KeyEvent(downTime, eventTime, KeyEvent.ACTION_UP, keyCode, - 0 /*repeat*/, 0 /*metaState*/, KeyCharacterMap.VIRTUAL_KEYBOARD, 0 /*scancode*/, - 0 /*flags*/, InputDevice.SOURCE_KEYBOARD); - upEvent.setDisplayId(DEFAULT_DISPLAY); - interceptKey(upEvent); + sendKeyCombination(new int[]{keyCode}, 0 /*durationMillis*/, longPress); } private void interceptKey(KeyEvent keyEvent) { diff --git a/services/tests/wmtests/src/com/android/server/policy/StemKeyGestureTests.java b/services/tests/wmtests/src/com/android/server/policy/StemKeyGestureTests.java index eab8757b7331..912e1d3df945 100644 --- a/services/tests/wmtests/src/com/android/server/policy/StemKeyGestureTests.java +++ b/services/tests/wmtests/src/com/android/server/policy/StemKeyGestureTests.java @@ -16,15 +16,19 @@ package com.android.server.policy; +import static android.provider.Settings.Global.STEM_PRIMARY_BUTTON_DOUBLE_PRESS; import static android.provider.Settings.Global.STEM_PRIMARY_BUTTON_LONG_PRESS; import static android.provider.Settings.Global.STEM_PRIMARY_BUTTON_SHORT_PRESS; import static android.view.KeyEvent.KEYCODE_STEM_PRIMARY; +import static com.android.dx.mockito.inline.extended.ExtendedMockito.doReturn; import static com.android.server.policy.PhoneWindowManager.LONG_PRESS_PRIMARY_LAUNCH_VOICE_ASSISTANT; import static com.android.server.policy.PhoneWindowManager.SHORT_PRESS_PRIMARY_LAUNCH_ALL_APPS; import static com.android.server.policy.PhoneWindowManager.SHORT_PRESS_PRIMARY_LAUNCH_TARGET_ACTIVITY; +import android.app.ActivityManager.RecentTaskInfo; import android.content.ComponentName; +import android.os.RemoteException; import android.provider.Settings; import org.junit.Test; @@ -120,6 +124,46 @@ public class StemKeyGestureTests extends ShortcutKeyTestBase { mPhoneWindowManager.assertStatusBarStartAssist(); } + @Test + public void stemDoubleKey_EarlyShortPress_AllAppsThenSwitchToMostRecent() + throws RemoteException { + overrideBehavior(STEM_PRIMARY_BUTTON_DOUBLE_PRESS, SHORT_PRESS_PRIMARY_LAUNCH_ALL_APPS); + setUpPhoneWindowManager(/* supportSettingsUpdate= */ true); + mPhoneWindowManager.overrideShouldEarlyShortPressOnStemPrimary(true); + mPhoneWindowManager.setKeyguardServiceDelegateIsShowing(false); + mPhoneWindowManager.overrideIsUserSetupComplete(true); + RecentTaskInfo recentTaskInfo = new RecentTaskInfo(); + int referenceId = 666; + recentTaskInfo.persistentId = referenceId; + doReturn(recentTaskInfo).when( + mPhoneWindowManager.mActivityTaskManagerInternal).getMostRecentTaskFromBackground(); + + sendKey(KEYCODE_STEM_PRIMARY); + sendKey(KEYCODE_STEM_PRIMARY); + + mPhoneWindowManager.assertOpenAllAppView(); + mPhoneWindowManager.assertSwitchToRecent(referenceId); + } + + @Test + public void stemDoubleKey_NoEarlyShortPress_SwitchToMostRecent() throws RemoteException { + overrideBehavior(STEM_PRIMARY_BUTTON_DOUBLE_PRESS, SHORT_PRESS_PRIMARY_LAUNCH_ALL_APPS); + setUpPhoneWindowManager(/* supportSettingsUpdate= */ true); + mPhoneWindowManager.overrideShouldEarlyShortPressOnStemPrimary(false); + mPhoneWindowManager.setKeyguardServiceDelegateIsShowing(false); + mPhoneWindowManager.overrideIsUserSetupComplete(true); + RecentTaskInfo recentTaskInfo = new RecentTaskInfo(); + int referenceId = 666; + recentTaskInfo.persistentId = referenceId; + doReturn(recentTaskInfo).when( + mPhoneWindowManager.mActivityTaskManagerInternal).getMostRecentTaskFromBackground(); + + sendKey(KEYCODE_STEM_PRIMARY); + sendKey(KEYCODE_STEM_PRIMARY); + + mPhoneWindowManager.assertNotOpenAllAppView(); + mPhoneWindowManager.assertSwitchToRecent(referenceId); + } private void overrideBehavior(String key, int expectedBehavior) { Settings.Global.putLong(mContext.getContentResolver(), key, expectedBehavior); diff --git a/services/tests/wmtests/src/com/android/server/policy/TestPhoneWindowManager.java b/services/tests/wmtests/src/com/android/server/policy/TestPhoneWindowManager.java index e26260a6836c..7788b339738b 100644 --- a/services/tests/wmtests/src/com/android/server/policy/TestPhoneWindowManager.java +++ b/services/tests/wmtests/src/com/android/server/policy/TestPhoneWindowManager.java @@ -57,6 +57,7 @@ import static org.mockito.Mockito.withSettings; import android.app.ActivityManagerInternal; import android.app.AppOpsManager; +import android.app.IActivityManager; import android.app.NotificationManager; import android.app.SearchManager; import android.content.ComponentName; @@ -98,6 +99,7 @@ import com.android.server.inputmethod.InputMethodManagerInternal; import com.android.server.pm.UserManagerInternal; import com.android.server.policy.keyguard.KeyguardServiceDelegate; import com.android.server.statusbar.StatusBarManagerInternal; +import com.android.server.testutils.OffsettableClock; import com.android.server.vr.VrManagerInternal; import com.android.server.wm.ActivityTaskManagerInternal; import com.android.server.wm.DisplayPolicy; @@ -126,7 +128,8 @@ class TestPhoneWindowManager { @Mock private WindowManagerInternal mWindowManagerInternal; @Mock private ActivityManagerInternal mActivityManagerInternal; - @Mock private ActivityTaskManagerInternal mActivityTaskManagerInternal; + @Mock ActivityTaskManagerInternal mActivityTaskManagerInternal; + @Mock IActivityManager mActivityManagerService; @Mock private InputManagerInternal mInputManagerInternal; @Mock private InputManager mInputManager; @Mock private SensorPrivacyManager mSensorPrivacyManager; @@ -160,7 +163,8 @@ class TestPhoneWindowManager { @Mock private KeyguardServiceDelegate mKeyguardServiceDelegate; private StaticMockitoSession mMockitoSession; - private TestLooper mTestLooper = new TestLooper(); + private OffsettableClock mClock = new OffsettableClock(); + private TestLooper mTestLooper = new TestLooper(() -> mClock.now()); private HandlerThread mHandlerThread; private Handler mHandler; @@ -181,6 +185,10 @@ class TestPhoneWindowManager { KeyguardServiceDelegate getKeyguardServiceDelegate() { return mKeyguardServiceDelegate; } + + IActivityManager getActivityManagerService() { + return mActivityManagerService; + } } TestPhoneWindowManager(Context context, boolean supportSettingsUpdate) { @@ -329,6 +337,15 @@ class TestPhoneWindowManager { mPhoneWindowManager.dispatchUnhandledKey(null /*focusedToken*/, event, FLAG_INTERACTIVE); } + long getCurrentTime() { + return mClock.now(); + } + + void moveTimeForward(long timeMs) { + mClock.fastForward(timeMs); + mTestLooper.dispatchAll(); + } + /** * Below functions will override the setting or the policy behavior. */ @@ -347,6 +364,10 @@ class TestPhoneWindowManager { mPhoneWindowManager.mShortPressOnPowerBehavior = behavior; } + void overrideShouldEarlyShortPressOnStemPrimary(boolean shouldEarlyShortPress) { + mPhoneWindowManager.mShouldEarlyShortPressOnStemPrimary = shouldEarlyShortPress; + } + // Override assist perform function. void overrideLongPressOnPower(int behavior) { mPhoneWindowManager.mLongPressOnPowerBehavior = behavior; @@ -667,4 +688,11 @@ class TestPhoneWindowManager { vendorId, productId, logEvent.getIntValue(), new int[]{expectedKey}, expectedModifierState), description(errorMsg)); } + + void assertSwitchToRecent(int persistentId) throws RemoteException { + mTestLooper.dispatchAll(); + verify(mActivityManagerService, + timeout(TEST_SINGLE_KEY_DELAY_MILLIS)).startActivityFromRecents(eq(persistentId), + isNull()); + } } diff --git a/services/tests/wmtests/src/com/android/server/wm/BackNavigationControllerTests.java b/services/tests/wmtests/src/com/android/server/wm/BackNavigationControllerTests.java index 6790dc2e8733..afea8114d508 100644 --- a/services/tests/wmtests/src/com/android/server/wm/BackNavigationControllerTests.java +++ b/services/tests/wmtests/src/com/android/server/wm/BackNavigationControllerTests.java @@ -117,6 +117,20 @@ public class BackNavigationControllerTests extends WindowTestsBase { } @Test + public void noBackWhenMoveTaskToBack() { + Task taskA = createTask(mDefaultDisplay); + ActivityRecord recordA = createActivityRecord(taskA); + Mockito.doNothing().when(recordA).reparentSurfaceControl(any(), any()); + + final Task topTask = createTopTaskWithActivity(); + withSystemCallback(topTask); + // simulate moveTaskToBack + topTask.setVisibleRequested(false); + BackNavigationInfo backNavigationInfo = startBackNavigation(); + assertWithMessage("BackNavigationInfo").that(backNavigationInfo).isNull(); + } + + @Test public void backTypeCrossTaskWhenBackToPreviousTask() { Task taskA = createTask(mDefaultDisplay); ActivityRecord recordA = createActivityRecord(taskA); diff --git a/services/tests/wmtests/src/com/android/server/wm/DisplayAreaPolicyTests.java b/services/tests/wmtests/src/com/android/server/wm/DisplayAreaPolicyTests.java index 147a44f1d297..fafc03555680 100644 --- a/services/tests/wmtests/src/com/android/server/wm/DisplayAreaPolicyTests.java +++ b/services/tests/wmtests/src/com/android/server/wm/DisplayAreaPolicyTests.java @@ -190,7 +190,7 @@ public class DisplayAreaPolicyTests extends WindowTestsBase { final WindowManagerService wms = mWm; final DisplayContent displayContent = mock(DisplayContent.class); doReturn(true).when(displayContent).isTrusted(); - doReturn(true).when(displayContent).supportsSystemDecorations(); + doReturn(true).when(displayContent).isHomeSupported(); final RootDisplayArea root = new SurfacelessDisplayAreaRoot(wms); final TaskDisplayArea taskDisplayAreaWithHome = new TaskDisplayArea(displayContent, wms, "Tasks1", FEATURE_DEFAULT_TASK_CONTAINER); diff --git a/services/tests/wmtests/src/com/android/server/wm/DisplayPolicyTests.java b/services/tests/wmtests/src/com/android/server/wm/DisplayPolicyTests.java index c782d3e90e96..be96e60917a3 100644 --- a/services/tests/wmtests/src/com/android/server/wm/DisplayPolicyTests.java +++ b/services/tests/wmtests/src/com/android/server/wm/DisplayPolicyTests.java @@ -274,6 +274,26 @@ public class DisplayPolicyTests extends WindowTestsBase { assertEquals(mAppWindow, policy.getTopFullscreenOpaqueWindow()); } + @SetupWindows(addWindows = W_NOTIFICATION_SHADE) + @Test + public void testVisibleProcessWhileDozing() { + final WindowProcessController wpc = mNotificationShadeWindow.getProcess(); + final DisplayPolicy policy = mDisplayContent.getDisplayPolicy(); + policy.addWindowLw(mNotificationShadeWindow, mNotificationShadeWindow.mAttrs); + + policy.screenTurnedOff(); + policy.setAwake(false); + policy.screenTurnedOn(null /* screenOnListener */); + assertTrue(wpc.isShowingUiWhileDozing()); + policy.screenTurnedOff(); + assertFalse(wpc.isShowingUiWhileDozing()); + + policy.screenTurnedOn(null /* screenOnListener */); + assertTrue(wpc.isShowingUiWhileDozing()); + policy.setAwake(true); + assertFalse(wpc.isShowingUiWhileDozing()); + } + @Test(expected = IllegalArgumentException.class) public void testMainAppWindowDisallowFitSystemWindowTypes() { final DisplayPolicy policy = mDisplayContent.getDisplayPolicy(); diff --git a/services/tests/wmtests/src/com/android/server/wm/DisplayWindowSettingsTests.java b/services/tests/wmtests/src/com/android/server/wm/DisplayWindowSettingsTests.java index e54b8e52a4da..e2524a289b7d 100644 --- a/services/tests/wmtests/src/com/android/server/wm/DisplayWindowSettingsTests.java +++ b/services/tests/wmtests/src/com/android/server/wm/DisplayWindowSettingsTests.java @@ -496,6 +496,19 @@ public class DisplayWindowSettingsTests extends WindowTestsBase { mPrivateDisplay.getDisplayInfo()); } + @Test + public void testClearDisplaySettings() { + spyOn(mWm.mDisplayWindowSettings); + spyOn(mWm.mDisplayWindowSettingsProvider); + + WindowManagerInternal wmInternal = LocalServices.getService(WindowManagerInternal.class); + DisplayInfo info = mPrivateDisplay.getDisplayInfo(); + wmInternal.clearDisplaySettings(info.uniqueId, info.type); + + verify(mWm.mDisplayWindowSettings).clearDisplaySettings(info.uniqueId, info.type); + verify(mWm.mDisplayWindowSettingsProvider).clearDisplaySettings(info); + } + public final class TestSettingsProvider implements DisplayWindowSettings.SettingsProvider { Map<DisplayInfo, SettingsEntry> mOverrideSettingsCache = new HashMap<>(); @@ -530,5 +543,10 @@ public class DisplayWindowSettingsTests extends WindowTestsBase { public void onDisplayRemoved(@NonNull DisplayInfo info) { mOverrideSettingsCache.remove(info); } + + @Override + public void clearDisplaySettings(@NonNull DisplayInfo info) { + mOverrideSettingsCache.remove(info); + } } } diff --git a/services/tests/wmtests/src/com/android/server/wm/TaskTests.java b/services/tests/wmtests/src/com/android/server/wm/TaskTests.java index 013be2587d76..5e531b4cbc4f 100644 --- a/services/tests/wmtests/src/com/android/server/wm/TaskTests.java +++ b/services/tests/wmtests/src/com/android/server/wm/TaskTests.java @@ -574,6 +574,7 @@ public class TaskTests extends WindowTestsBase { spyOn(root); spyOn(root.mLetterboxUiController); + doReturn(true).when(root).fillsParent(); doReturn(true).when(root.mLetterboxUiController) .shouldEnableUserAspectRatioSettings(); doReturn(false).when(root).inSizeCompatMode(); @@ -596,6 +597,12 @@ public class TaskTests extends WindowTestsBase { assertFalse(task.getTaskInfo() .appCompatTaskInfo.topActivityEligibleForUserAspectRatioButton); doReturn(false).when(root).inSizeCompatMode(); + + // When the top activity is transparent, the button is not enabled + doReturn(false).when(root).fillsParent(); + assertFalse(task.getTaskInfo() + .appCompatTaskInfo.topActivityEligibleForUserAspectRatioButton); + doReturn(true).when(root).fillsParent(); } /** diff --git a/services/tests/wmtests/src/com/android/server/wm/WindowManagerServiceTests.java b/services/tests/wmtests/src/com/android/server/wm/WindowManagerServiceTests.java index eaeb8049b81a..d08ab51c9146 100644 --- a/services/tests/wmtests/src/com/android/server/wm/WindowManagerServiceTests.java +++ b/services/tests/wmtests/src/com/android/server/wm/WindowManagerServiceTests.java @@ -859,9 +859,7 @@ public class WindowManagerServiceTests extends WindowTestsBase { final int callingUid = Process.FIRST_APPLICATION_UID; final int callingPid = 1234; final SurfaceControl surfaceControl = mock(SurfaceControl.class); - final IWindow window = mock(IWindow.class); - final IBinder windowToken = mock(IBinder.class); - when(window.asBinder()).thenReturn(windowToken); + final IBinder window = new Binder(); final IBinder focusGrantToken = mock(IBinder.class); final InputChannel inputChannel = new InputChannel(); @@ -879,9 +877,7 @@ public class WindowManagerServiceTests extends WindowTestsBase { final int callingUid = Process.SYSTEM_UID; final int callingPid = 1234; final SurfaceControl surfaceControl = mock(SurfaceControl.class); - final IWindow window = mock(IWindow.class); - final IBinder windowToken = mock(IBinder.class); - when(window.asBinder()).thenReturn(windowToken); + final IBinder window = new Binder(); final IBinder focusGrantToken = mock(IBinder.class); final InputChannel inputChannel = new InputChannel(); @@ -901,9 +897,7 @@ public class WindowManagerServiceTests extends WindowTestsBase { final int callingUid = Process.FIRST_APPLICATION_UID; final int callingPid = 1234; final SurfaceControl surfaceControl = mock(SurfaceControl.class); - final IWindow window = mock(IWindow.class); - final IBinder windowToken = mock(IBinder.class); - when(window.asBinder()).thenReturn(windowToken); + final IBinder window = new Binder(); final IBinder focusGrantToken = mock(IBinder.class); final InputChannel inputChannel = new InputChannel(); @@ -927,9 +921,7 @@ public class WindowManagerServiceTests extends WindowTestsBase { final int callingUid = Process.SYSTEM_UID; final int callingPid = 1234; final SurfaceControl surfaceControl = mock(SurfaceControl.class); - final IWindow window = mock(IWindow.class); - final IBinder windowToken = mock(IBinder.class); - when(window.asBinder()).thenReturn(windowToken); + final IBinder window = new Binder(); final IBinder focusGrantToken = mock(IBinder.class); final InputChannel inputChannel = new InputChannel(); diff --git a/services/tests/wmtests/src/com/android/server/wm/WindowStateTests.java b/services/tests/wmtests/src/com/android/server/wm/WindowStateTests.java index 67384b2d9e18..d8a9a282a622 100644 --- a/services/tests/wmtests/src/com/android/server/wm/WindowStateTests.java +++ b/services/tests/wmtests/src/com/android/server/wm/WindowStateTests.java @@ -1369,7 +1369,7 @@ public class WindowStateTests extends WindowTestsBase { assertThat(listener.mIsVisibleForImeTargetOverlay).isFalse(); // Scenario 3: test removeWindow to remove the Ime layering target overlay window. - mWm.removeWindow(session, client); + mWm.removeClientToken(session, client.asBinder()); waitHandlerIdle(mWm.mH); assertThat(listener.mImeTargetToken).isEqualTo(client.asBinder()); diff --git a/services/usb/java/com/android/server/usb/UsbPortManager.java b/services/usb/java/com/android/server/usb/UsbPortManager.java index 2975e1e050f5..fc7c6a6d0258 100644 --- a/services/usb/java/com/android/server/usb/UsbPortManager.java +++ b/services/usb/java/com/android/server/usb/UsbPortManager.java @@ -1231,6 +1231,26 @@ public class UsbPortManager implements IBinder.DeathRecipient { complianceWarningsProto.add(FrameworkStatsLog .USB_COMPLIANCE_WARNINGS_REPORTED__COMPLIANCE_WARNINGS__COMPLIANCE_WARNING_MISSING_RP); continue; + case UsbPortStatus.COMPLIANCE_WARNING_INPUT_POWER_LIMITED: + complianceWarningsProto.add(FrameworkStatsLog + .USB_COMPLIANCE_WARNINGS_REPORTED__COMPLIANCE_WARNINGS__COMPLIANCE_WARNING_INPUT_POWER_LIMITED); + continue; + case UsbPortStatus.COMPLIANCE_WARNING_MISSING_DATA_LINES: + complianceWarningsProto.add(FrameworkStatsLog + .USB_COMPLIANCE_WARNINGS_REPORTED__COMPLIANCE_WARNINGS__COMPLIANCE_WARNING_MISSING_DATA_LINES); + continue; + case UsbPortStatus.COMPLIANCE_WARNING_ENUMERATION_FAIL: + complianceWarningsProto.add(FrameworkStatsLog + .USB_COMPLIANCE_WARNINGS_REPORTED__COMPLIANCE_WARNINGS__COMPLIANCE_WARNING_ENUMERATION_FAIL); + continue; + case UsbPortStatus.COMPLIANCE_WARNING_FLAKY_CONNECTION: + complianceWarningsProto.add(FrameworkStatsLog + .USB_COMPLIANCE_WARNINGS_REPORTED__COMPLIANCE_WARNINGS__COMPLIANCE_WARNING_FLAKY_CONNECTION); + continue; + case UsbPortStatus.COMPLIANCE_WARNING_UNRELIABLE_IO: + complianceWarningsProto.add(FrameworkStatsLog + .USB_COMPLIANCE_WARNINGS_REPORTED__COMPLIANCE_WARNINGS__COMPLIANCE_WARNING_UNRELIABLE_IO); + continue; } } return complianceWarningsProto.toArray(); diff --git a/telephony/java/android/telephony/PreciseDataConnectionState.java b/telephony/java/android/telephony/PreciseDataConnectionState.java index 7f1c14b877d2..b568f07135b8 100644 --- a/telephony/java/android/telephony/PreciseDataConnectionState.java +++ b/telephony/java/android/telephony/PreciseDataConnectionState.java @@ -16,6 +16,8 @@ package android.telephony; +import android.annotation.FlaggedApi; +import android.annotation.IntDef; import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.SystemApi; @@ -37,8 +39,11 @@ import android.telephony.data.ApnSetting; import android.telephony.data.DataCallResponse; import android.telephony.data.Qos; +import com.android.internal.telephony.flags.Flags; import com.android.internal.telephony.util.TelephonyUtils; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; import java.util.Objects; @@ -66,6 +71,53 @@ public final class PreciseDataConnectionState implements Parcelable { private final LinkProperties mLinkProperties; private final ApnSetting mApnSetting; private final Qos mDefaultQos; + private final @NetworkValidationStatus int mNetworkValidationStatus; + + /** @hide */ + @IntDef(prefix = "NETWORK_VALIDATION_", value = { + NETWORK_VALIDATION_UNSUPPORTED, + NETWORK_VALIDATION_NOT_REQUESTED, + NETWORK_VALIDATION_IN_PROGRESS, + NETWORK_VALIDATION_SUCCESS, + NETWORK_VALIDATION_FAILURE, + }) + @Retention(RetentionPolicy.SOURCE) + public @interface NetworkValidationStatus {} + + /** + * Unsupported. The unsupported state is used when the data network cannot support the network + * validation function for the current data connection state. + */ + @FlaggedApi(Flags.FLAG_NETWORK_VALIDATION) + public static final int NETWORK_VALIDATION_UNSUPPORTED = 0; + + /** + * Not Requested. The not requested status is used when the data network supports the network + * validation function, but no network validation is being performed yet. + */ + @FlaggedApi(Flags.FLAG_NETWORK_VALIDATION) + public static final int NETWORK_VALIDATION_NOT_REQUESTED = 1; + + /** + * In progress. The in progress state is used when the network validation process for the data + * network is in progress. This state is followed by either success or failure. + */ + @FlaggedApi(Flags.FLAG_NETWORK_VALIDATION) + public static final int NETWORK_VALIDATION_IN_PROGRESS = 2; + + /** + * Success. The Success status is used when network validation has been completed for the data + * network and the result is successful. + */ + @FlaggedApi(Flags.FLAG_NETWORK_VALIDATION) + public static final int NETWORK_VALIDATION_SUCCESS = 3; + + /** + * Failure. The Failure status is used when network validation has been completed for the data + * network and the result is failure. + */ + @FlaggedApi(Flags.FLAG_NETWORK_VALIDATION) + public static final int NETWORK_VALIDATION_FAILURE = 4; /** * Constructor @@ -87,7 +139,7 @@ public final class PreciseDataConnectionState implements Parcelable { .setApnTypeBitmask(apnTypes) .setApnName(apn) .setEntryName(apn) - .build(), null); + .build(), null, NETWORK_VALIDATION_UNSUPPORTED); } @@ -109,7 +161,8 @@ public final class PreciseDataConnectionState implements Parcelable { private PreciseDataConnectionState(@TransportType int transportType, int id, @DataState int state, @NetworkType int networkType, @Nullable LinkProperties linkProperties, @DataFailureCause int failCause, - @Nullable ApnSetting apnSetting, @Nullable Qos defaultQos) { + @Nullable ApnSetting apnSetting, @Nullable Qos defaultQos, + @NetworkValidationStatus int networkValidationStatus) { mTransportType = transportType; mId = id; mState = state; @@ -118,6 +171,7 @@ public final class PreciseDataConnectionState implements Parcelable { mFailCause = failCause; mApnSetting = apnSetting; mDefaultQos = defaultQos; + mNetworkValidationStatus = networkValidationStatus; } /** @@ -140,6 +194,7 @@ public final class PreciseDataConnectionState implements Parcelable { mDefaultQos = in.readParcelable( Qos.class.getClassLoader(), android.telephony.data.Qos.class); + mNetworkValidationStatus = in.readInt(); } /** @@ -289,6 +344,16 @@ public final class PreciseDataConnectionState implements Parcelable { return mDefaultQos; } + /** + * Returns the network validation state. + * + * @return the network validation status of the data call + */ + @FlaggedApi(Flags.FLAG_NETWORK_VALIDATION) + public @NetworkValidationStatus int getNetworkValidationStatus() { + return mNetworkValidationStatus; + } + @Override public int describeContents() { return 0; @@ -304,6 +369,7 @@ public final class PreciseDataConnectionState implements Parcelable { out.writeInt(mFailCause); out.writeParcelable(mApnSetting, flags); out.writeParcelable(mDefaultQos, flags); + out.writeInt(mNetworkValidationStatus); } public static final @NonNull Parcelable.Creator<PreciseDataConnectionState> CREATOR @@ -321,7 +387,7 @@ public final class PreciseDataConnectionState implements Parcelable { @Override public int hashCode() { return Objects.hash(mTransportType, mId, mState, mNetworkType, mFailCause, - mLinkProperties, mApnSetting, mDefaultQos); + mLinkProperties, mApnSetting, mDefaultQos, mNetworkValidationStatus); } @@ -337,7 +403,8 @@ public final class PreciseDataConnectionState implements Parcelable { && mFailCause == that.mFailCause && Objects.equals(mLinkProperties, that.mLinkProperties) && Objects.equals(mApnSetting, that.mApnSetting) - && Objects.equals(mDefaultQos, that.mDefaultQos); + && Objects.equals(mDefaultQos, that.mDefaultQos) + && mNetworkValidationStatus == that.mNetworkValidationStatus; } @NonNull @@ -354,11 +421,34 @@ public final class PreciseDataConnectionState implements Parcelable { sb.append(", link properties: " + mLinkProperties); sb.append(", default QoS: " + mDefaultQos); sb.append(", fail cause: " + DataFailCause.toString(mFailCause)); + sb.append(", network validation status: " + + networkValidationStatusToString(mNetworkValidationStatus)); return sb.toString(); } /** + * Convert a network validation status to string. + * + * @param networkValidationStatus network validation status. + * @return string of validation status. + * + * @hide + */ + @NonNull + public static String networkValidationStatusToString( + @NetworkValidationStatus int networkValidationStatus) { + switch (networkValidationStatus) { + case NETWORK_VALIDATION_UNSUPPORTED: return "unsupported"; + case NETWORK_VALIDATION_NOT_REQUESTED: return "not requested"; + case NETWORK_VALIDATION_IN_PROGRESS: return "in progress"; + case NETWORK_VALIDATION_SUCCESS: return "success"; + case NETWORK_VALIDATION_FAILURE: return "failure"; + default: return Integer.toString(networkValidationStatus); + } + } + + /** * {@link PreciseDataConnectionState} builder * * @hide @@ -394,6 +484,10 @@ public final class PreciseDataConnectionState implements Parcelable { /** The Default QoS for this EPS/5GS bearer or null otherwise */ private @Nullable Qos mDefaultQos; + /** The network validation status for the data connection. */ + private @NetworkValidationStatus int mNetworkValidationStatus = + NETWORK_VALIDATION_UNSUPPORTED; + /** * Set the transport type of the data connection. * @@ -486,13 +580,27 @@ public final class PreciseDataConnectionState implements Parcelable { } /** + * Set the network validation state for the data connection. + * + * @param networkValidationStatus the network validation status of the data call + * @return The builder + */ + @FlaggedApi(Flags.FLAG_NETWORK_VALIDATION) + public @NonNull Builder setNetworkValidationStatus( + @NetworkValidationStatus int networkValidationStatus) { + mNetworkValidationStatus = networkValidationStatus; + return this; + } + + /** * Build the {@link PreciseDataConnectionState} instance. * * @return The {@link PreciseDataConnectionState} instance */ public PreciseDataConnectionState build() { return new PreciseDataConnectionState(mTransportType, mId, mState, mNetworkType, - mLinkProperties, mFailCause, mApnSetting, mDefaultQos); + mLinkProperties, mFailCause, mApnSetting, mDefaultQos, + mNetworkValidationStatus); } } } diff --git a/telephony/java/android/telephony/data/DataCallResponse.java b/telephony/java/android/telephony/data/DataCallResponse.java index c7f0c5f753db..9dd83d1438e2 100644 --- a/telephony/java/android/telephony/data/DataCallResponse.java +++ b/telephony/java/android/telephony/data/DataCallResponse.java @@ -17,6 +17,7 @@ package android.telephony.data; +import android.annotation.FlaggedApi; import android.annotation.IntDef; import android.annotation.IntRange; import android.annotation.NonNull; @@ -27,9 +28,11 @@ import android.os.Parcel; import android.os.Parcelable; import android.telephony.Annotation.DataFailureCause; import android.telephony.DataFailCause; +import android.telephony.PreciseDataConnectionState; import android.telephony.data.ApnSetting.ProtocolType; import com.android.internal.annotations.VisibleForTesting; +import com.android.internal.telephony.flags.Flags; import com.android.internal.util.Preconditions; import java.lang.annotation.Retention; @@ -123,7 +126,6 @@ public final class DataCallResponse implements Parcelable { * Indicates that the pdu session id is not set. */ public static final int PDU_SESSION_ID_NOT_SET = 0; - private final @DataFailureCause int mCause; private final long mSuggestedRetryTime; private final int mId; @@ -143,6 +145,7 @@ public final class DataCallResponse implements Parcelable { private final List<QosBearerSession> mQosBearerSessions; private final NetworkSliceInfo mSliceInfo; private final List<TrafficDescriptor> mTrafficDescriptors; + private final @PreciseDataConnectionState.NetworkValidationStatus int mNetworkValidationStatus; /** * @param cause Data call fail cause. {@link DataFailCause#NONE} indicates no error. @@ -185,7 +188,8 @@ public final class DataCallResponse implements Parcelable { HANDOVER_FAILURE_MODE_LEGACY, PDU_SESSION_ID_NOT_SET, null /* defaultQos */, Collections.emptyList() /* qosBearerSessions */, null /* sliceInfo */, - Collections.emptyList() /* trafficDescriptors */); + Collections.emptyList(), /* trafficDescriptors */ + PreciseDataConnectionState.NETWORK_VALIDATION_UNSUPPORTED); } private DataCallResponse(@DataFailureCause int cause, long suggestedRetryTime, int id, @@ -196,7 +200,8 @@ public final class DataCallResponse implements Parcelable { @HandoverFailureMode int handoverFailureMode, int pduSessionId, @Nullable Qos defaultQos, @NonNull List<QosBearerSession> qosBearerSessions, @Nullable NetworkSliceInfo sliceInfo, - @NonNull List<TrafficDescriptor> trafficDescriptors) { + @NonNull List<TrafficDescriptor> trafficDescriptors, + @PreciseDataConnectionState.NetworkValidationStatus int networkValidationStatus) { mCause = cause; mSuggestedRetryTime = suggestedRetryTime; mId = id; @@ -216,6 +221,7 @@ public final class DataCallResponse implements Parcelable { mQosBearerSessions = new ArrayList<>(qosBearerSessions); mSliceInfo = sliceInfo; mTrafficDescriptors = new ArrayList<>(trafficDescriptors); + mNetworkValidationStatus = networkValidationStatus; if (mLinkStatus == LINK_STATUS_ACTIVE || mLinkStatus == LINK_STATUS_DORMANT) { @@ -270,6 +276,7 @@ public final class DataCallResponse implements Parcelable { source.readList(mTrafficDescriptors, TrafficDescriptor.class.getClassLoader(), android.telephony.data.TrafficDescriptor.class); + mNetworkValidationStatus = source.readInt(); } /** @@ -442,6 +449,17 @@ public final class DataCallResponse implements Parcelable { return Collections.unmodifiableList(mTrafficDescriptors); } + /** + * Return the network validation status that was initiated by {@link + * DataService.DataServiceProvider#requestValidation} + * + * @return The network validation status of data connection. + */ + @FlaggedApi(Flags.FLAG_NETWORK_VALIDATION) + public @PreciseDataConnectionState.NetworkValidationStatus int getNetworkValidationStatus() { + return mNetworkValidationStatus; + } + @NonNull @Override public String toString() { @@ -466,6 +484,8 @@ public final class DataCallResponse implements Parcelable { .append(" qosBearerSessions=").append(mQosBearerSessions) .append(" sliceInfo=").append(mSliceInfo) .append(" trafficDescriptors=").append(mTrafficDescriptors) + .append(" networkValidationStatus=").append(PreciseDataConnectionState + .networkValidationStatusToString(mNetworkValidationStatus)) .append("}"); return sb.toString(); } @@ -504,7 +524,8 @@ public final class DataCallResponse implements Parcelable { && mQosBearerSessions.containsAll(other.mQosBearerSessions) // non-null && Objects.equals(mSliceInfo, other.mSliceInfo) && mTrafficDescriptors.size() == other.mTrafficDescriptors.size() // non-null - && mTrafficDescriptors.containsAll(other.mTrafficDescriptors); // non-null + && mTrafficDescriptors.containsAll(other.mTrafficDescriptors) // non-null + && mNetworkValidationStatus == other.mNetworkValidationStatus; } @Override @@ -513,7 +534,7 @@ public final class DataCallResponse implements Parcelable { mInterfaceName, Set.copyOf(mAddresses), Set.copyOf(mDnsAddresses), Set.copyOf(mGatewayAddresses), Set.copyOf(mPcscfAddresses), mMtu, mMtuV4, mMtuV6, mHandoverFailureMode, mPduSessionId, mDefaultQos, Set.copyOf(mQosBearerSessions), - mSliceInfo, Set.copyOf(mTrafficDescriptors)); + mSliceInfo, Set.copyOf(mTrafficDescriptors), mNetworkValidationStatus); } @Override @@ -542,6 +563,7 @@ public final class DataCallResponse implements Parcelable { dest.writeList(mQosBearerSessions); dest.writeParcelable(mSliceInfo, flags); dest.writeList(mTrafficDescriptors); + dest.writeInt(mNetworkValidationStatus); } public static final @android.annotation.NonNull Parcelable.Creator<DataCallResponse> CREATOR = @@ -629,6 +651,9 @@ public final class DataCallResponse implements Parcelable { private List<TrafficDescriptor> mTrafficDescriptors = new ArrayList<>(); + private @PreciseDataConnectionState.NetworkValidationStatus int mNetworkValidationStatus = + PreciseDataConnectionState.NETWORK_VALIDATION_UNSUPPORTED; + /** * Default constructor for Builder. */ @@ -905,6 +930,20 @@ public final class DataCallResponse implements Parcelable { } /** + * Set the network validation status that corresponds to the state of the network validation + * request started by {@link DataService.DataServiceProvider#requestValidation} + * + * @param status The network validation status. + * @return The same instance of the builder. + */ + @FlaggedApi(Flags.FLAG_NETWORK_VALIDATION) + public @NonNull Builder setNetworkValidationStatus( + @PreciseDataConnectionState.NetworkValidationStatus int status) { + mNetworkValidationStatus = status; + return this; + } + + /** * Build the DataCallResponse. * * @return the DataCallResponse object. @@ -913,7 +952,8 @@ public final class DataCallResponse implements Parcelable { return new DataCallResponse(mCause, mSuggestedRetryTime, mId, mLinkStatus, mProtocolType, mInterfaceName, mAddresses, mDnsAddresses, mGatewayAddresses, mPcscfAddresses, mMtu, mMtuV4, mMtuV6, mHandoverFailureMode, mPduSessionId, - mDefaultQos, mQosBearerSessions, mSliceInfo, mTrafficDescriptors); + mDefaultQos, mQosBearerSessions, mSliceInfo, mTrafficDescriptors, + mNetworkValidationStatus); } } } diff --git a/telephony/java/android/telephony/data/DataService.java b/telephony/java/android/telephony/data/DataService.java index d8b2cbebdf28..80e91a330185 100644 --- a/telephony/java/android/telephony/data/DataService.java +++ b/telephony/java/android/telephony/data/DataService.java @@ -16,6 +16,8 @@ package android.telephony.data; +import android.annotation.CallbackExecutor; +import android.annotation.FlaggedApi; import android.annotation.IntDef; import android.annotation.IntRange; import android.annotation.NonNull; @@ -26,6 +28,7 @@ import android.app.Service; import android.content.Intent; import android.net.LinkProperties; import android.os.Handler; +import android.os.HandlerExecutor; import android.os.HandlerThread; import android.os.IBinder; import android.os.Looper; @@ -36,6 +39,9 @@ import android.util.Log; import android.util.SparseArray; import com.android.internal.annotations.VisibleForTesting; +import com.android.internal.telephony.IIntegerConsumer; +import com.android.internal.telephony.flags.Flags; +import com.android.internal.util.FunctionalUtils; import com.android.telephony.Rlog; import java.lang.annotation.Retention; @@ -44,6 +50,8 @@ import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Objects; +import java.util.concurrent.Executor; +import java.util.function.Consumer; /** * Base class of data service. Services that extend DataService must register the service in @@ -113,11 +121,14 @@ public abstract class DataService extends Service { private static final int DATA_SERVICE_REQUEST_REGISTER_APN_UNTHROTTLED = 14; private static final int DATA_SERVICE_REQUEST_UNREGISTER_APN_UNTHROTTLED = 15; private static final int DATA_SERVICE_INDICATION_APN_UNTHROTTLED = 16; + private static final int DATA_SERVICE_REQUEST_VALIDATION = 17; private final HandlerThread mHandlerThread; private final DataServiceHandler mHandler; + private final Executor mHandlerExecutor; + private final SparseArray<DataServiceProvider> mServiceMap = new SparseArray<>(); /** @hide */ @@ -379,6 +390,43 @@ public abstract class DataService extends Service { } } + /** + * Request validation check to see if the network is working properly for a given data call. + * + * <p>This request is completed immediately after submitting the request to the data service + * provider and receiving {@link DataServiceCallback.ResultCode}, and progress status or + * validation results are notified through {@link + * DataCallResponse#getNetworkValidationStatus}. + * + * <p> If the network validation request is submitted successfully, {@link + * DataServiceCallback#RESULT_SUCCESS} is passed to {@code resultCodeCallback}. If the + * network validation feature is not supported by the data service provider itself, {@link + * DataServiceCallback#RESULT_ERROR_UNSUPPORTED} is passed to {@code resultCodeCallback}. + * See {@link DataServiceCallback.ResultCode} for the type of response that indicates + * whether the request was successfully submitted or had an error. + * + * <p>In response to this network validation request, providers can validate the data call + * in their own way. For example, in IWLAN, the DPD (Dead Peer Detection) can be used as a + * tool to check whether a data call is alive. + * + * @param cid The identifier of the data call which is provided in {@link DataCallResponse} + * @param executor The callback executor for the response. + * @param resultCodeCallback Listener for the {@link DataServiceCallback.ResultCode} that + * request validation to the DataService and checks if the request has been submitted. + */ + @FlaggedApi(Flags.FLAG_NETWORK_VALIDATION) + public void requestValidation(int cid, + @NonNull @CallbackExecutor Executor executor, + @NonNull @DataServiceCallback.ResultCode Consumer<Integer> resultCodeCallback) { + Objects.requireNonNull(executor, "executor cannot be null"); + Objects.requireNonNull(resultCodeCallback, "resultCodeCallback cannot be null"); + + Log.d(TAG, "requestValidation: " + cid); + + // The default implementation is to return unsupported. + executor.execute(() -> resultCodeCallback + .accept(DataServiceCallback.RESULT_ERROR_UNSUPPORTED)); + } /** * Notify the system that current data call list changed. Data service must invoke this @@ -537,6 +585,17 @@ public abstract class DataService extends Service { } } + private static final class ValidationRequest { + public final int cid; + public final Executor executor; + public final IIntegerConsumer callback; + ValidationRequest(int cid, Executor executor, IIntegerConsumer callback) { + this.cid = cid; + this.executor = executor; + this.callback = callback; + } + } + private class DataServiceHandler extends Handler { DataServiceHandler(Looper looper) { @@ -679,6 +738,15 @@ public abstract class DataService extends Service { loge("Failed to call onApnUnthrottled. " + e); } break; + case DATA_SERVICE_REQUEST_VALIDATION: + if (serviceProvider == null) break; + ValidationRequest validationRequest = (ValidationRequest) message.obj; + serviceProvider.requestValidation( + validationRequest.cid, + validationRequest.executor, + FunctionalUtils + .ignoreRemoteException(validationRequest.callback::accept)); + break; } } } @@ -691,6 +759,7 @@ public abstract class DataService extends Service { mHandlerThread.start(); mHandler = new DataServiceHandler(mHandlerThread.getLooper()); + mHandlerExecutor = new HandlerExecutor(mHandler); log("Data service created"); } @@ -853,6 +922,18 @@ public abstract class DataService extends Service { mHandler.obtainMessage(DATA_SERVICE_REQUEST_UNREGISTER_APN_UNTHROTTLED, slotIndex, 0, callback).sendToTarget(); } + + @Override + public void requestValidation(int slotIndex, int cid, IIntegerConsumer resultCodeCallback) { + if (resultCodeCallback == null) { + loge("requestValidation: resultCodeCallback is null"); + return; + } + ValidationRequest validationRequest = + new ValidationRequest(cid, mHandlerExecutor, resultCodeCallback); + mHandler.obtainMessage(DATA_SERVICE_REQUEST_VALIDATION, + slotIndex, 0, validationRequest).sendToTarget(); + } } private void log(String s) { diff --git a/telephony/java/android/telephony/data/IDataService.aidl b/telephony/java/android/telephony/data/IDataService.aidl index 134694694a0e..15f88815ec6b 100644 --- a/telephony/java/android/telephony/data/IDataService.aidl +++ b/telephony/java/android/telephony/data/IDataService.aidl @@ -22,6 +22,8 @@ import android.telephony.data.IDataServiceCallback; import android.telephony.data.NetworkSliceInfo; import android.telephony.data.TrafficDescriptor; +import com.android.internal.telephony.IIntegerConsumer; + /** * {@hide} */ @@ -46,4 +48,5 @@ oneway interface IDataService void cancelHandover(int slotId, int cid, IDataServiceCallback callback); void registerForUnthrottleApn(int slotIndex, IDataServiceCallback callback); void unregisterForUnthrottleApn(int slotIndex, IDataServiceCallback callback); + void requestValidation(int slotId, int cid, IIntegerConsumer callback); } diff --git a/telephony/java/android/telephony/data/IQualifiedNetworksServiceCallback.aidl b/telephony/java/android/telephony/data/IQualifiedNetworksServiceCallback.aidl index 32ffdbc2121c..bdd212afd4b0 100644 --- a/telephony/java/android/telephony/data/IQualifiedNetworksServiceCallback.aidl +++ b/telephony/java/android/telephony/data/IQualifiedNetworksServiceCallback.aidl @@ -16,6 +16,8 @@ package android.telephony.data; +import com.android.internal.telephony.IIntegerConsumer; + /** * The qualified networks service call back interface * @hide @@ -23,4 +25,5 @@ package android.telephony.data; oneway interface IQualifiedNetworksServiceCallback { void onQualifiedNetworkTypesChanged(int apnTypes, in int[] qualifiedNetworkTypes); + void onNetworkValidationRequested(int networkCapability, IIntegerConsumer callback); } diff --git a/telephony/java/android/telephony/data/QualifiedNetworksService.java b/telephony/java/android/telephony/data/QualifiedNetworksService.java index 56f0f9f13772..c3ba09248298 100644 --- a/telephony/java/android/telephony/data/QualifiedNetworksService.java +++ b/telephony/java/android/telephony/data/QualifiedNetworksService.java @@ -16,6 +16,8 @@ package android.telephony.data; +import android.annotation.CallbackExecutor; +import android.annotation.FlaggedApi; import android.annotation.NonNull; import android.annotation.SystemApi; import android.app.Service; @@ -29,13 +31,23 @@ import android.os.RemoteException; import android.telephony.AccessNetworkConstants; import android.telephony.AccessNetworkConstants.AccessNetworkType; import android.telephony.Annotation.ApnType; +import android.telephony.Annotation.NetCapability; +import android.telephony.PreciseDataConnectionState; import android.util.Log; import android.util.SparseArray; import com.android.internal.annotations.VisibleForTesting; +import com.android.internal.telephony.IIntegerConsumer; +import com.android.internal.telephony.flags.FeatureFlags; +import com.android.internal.telephony.flags.FeatureFlagsImpl; +import com.android.internal.telephony.flags.Flags; +import com.android.internal.util.FunctionalUtils; import com.android.telephony.Rlog; import java.util.List; +import java.util.Objects; +import java.util.concurrent.Executor; +import java.util.function.Consumer; /** * Base class of the qualified networks service, which is a vendor service providing up-to-date @@ -69,6 +81,10 @@ public abstract class QualifiedNetworksService extends Service { private static final int QNS_UPDATE_QUALIFIED_NETWORKS = 4; private static final int QNS_APN_THROTTLE_STATUS_CHANGED = 5; private static final int QNS_EMERGENCY_DATA_NETWORK_PREFERRED_TRANSPORT_CHANGED = 6; + private static final int QNS_REQUEST_NETWORK_VALIDATION = 7; + + /** Feature flags */ + private static final FeatureFlags sFeatureFlag = new FeatureFlagsImpl(); private final HandlerThread mHandlerThread; @@ -208,6 +224,72 @@ public abstract class QualifiedNetworksService extends Service { } /** + * Request network validation to the connected data network for given a network capability. + * + * <p>This network validation can only be performed when a data network is in connected + * state, and will not be triggered if the data network does not support network validation + * feature or network validation is not in connected state. + * + * <p>See {@link DataServiceCallback.ResultCode} for the type of response that indicates + * whether the request was successfully submitted or had an error. + * + * <p>If network validation is requested, monitor network validation status in {@link + * PreciseDataConnectionState#getNetworkValidationStatus()}. + * + * @param networkCapability A network capability. (Note that only APN-type capabilities are + * supported. + * @param executor executor The callback executor that responds whether the request has been + * successfully submitted or not. + * @param resultCodeCallback A callback to determine whether the request was successfully + * submitted or not. + */ + @FlaggedApi(Flags.FLAG_NETWORK_VALIDATION) + public void requestNetworkValidation( + @NetCapability int networkCapability, + @NonNull @CallbackExecutor Executor executor, + @NonNull @DataServiceCallback.ResultCode Consumer<Integer> resultCodeCallback) { + Objects.requireNonNull(executor, "executor cannot be null"); + Objects.requireNonNull(resultCodeCallback, "resultCodeCallback cannot be null"); + + if (!sFeatureFlag.networkValidation()) { + loge("networkValidation feature is disabled"); + executor.execute( + () -> + resultCodeCallback.accept( + DataServiceCallback.RESULT_ERROR_UNSUPPORTED)); + return; + } + + IIntegerConsumer callback = new IIntegerConsumer.Stub() { + @Override + public void accept(int result) { + executor.execute(() -> resultCodeCallback.accept(result)); + } + }; + + // Move to the internal handler and process it. + mHandler.obtainMessage( + QNS_REQUEST_NETWORK_VALIDATION, + mSlotIndex, + 0, + new NetworkValidationRequestData(networkCapability, callback)) + .sendToTarget(); + } + + /** Process a network validation request on the internal handler. */ + private void onRequestNetworkValidation(NetworkValidationRequestData data) { + try { + log("onRequestNetworkValidation"); + // Callback to request a network validation. + mCallback.onNetworkValidationRequested(data.mNetworkCapability, data.mCallback); + } catch (RemoteException | NullPointerException e) { + loge("Failed to call onRequestNetworkValidation. " + e); + FunctionalUtils.ignoreRemoteException(data.mCallback::accept) + .accept(DataServiceCallback.RESULT_ERROR_UNSUPPORTED); + } + } + + /** * Called when the qualified networks provider is removed. The extended class should * implement this method to perform cleanup works. */ @@ -280,6 +362,10 @@ public abstract class QualifiedNetworksService extends Service { if (provider == null) break; provider.onUpdateQualifiedNetworkTypes(message.arg2, (int[]) message.obj); break; + + case QNS_REQUEST_NETWORK_VALIDATION: + if (provider == null) break; + provider.onRequestNetworkValidation((NetworkValidationRequestData) message.obj); } } } @@ -364,6 +450,17 @@ public abstract class QualifiedNetworksService extends Service { } } + private static final class NetworkValidationRequestData { + final @NetCapability int mNetworkCapability; + final IIntegerConsumer mCallback; + + private NetworkValidationRequestData(@NetCapability int networkCapability, + @NonNull IIntegerConsumer callback) { + mNetworkCapability = networkCapability; + mCallback = callback; + } + } + private void log(String s) { Rlog.d(TAG, s); } diff --git a/telephony/java/com/android/internal/telephony/RILConstants.java b/telephony/java/com/android/internal/telephony/RILConstants.java index edd659755c8d..50590177f791 100644 --- a/telephony/java/com/android/internal/telephony/RILConstants.java +++ b/telephony/java/com/android/internal/telephony/RILConstants.java @@ -546,6 +546,8 @@ public interface RILConstants { int RIL_REQUEST_IS_NULL_CIPHER_AND_INTEGRITY_ENABLED = 245; int RIL_REQUEST_IS_CELLULAR_IDENTIFIER_DISCLOSED_ENABLED = 246; int RIL_REQUEST_SET_CELLULAR_IDENTIFIER_DISCLOSED_ENABLED = 247; + int RIL_REQUEST_SET_SECURITY_ALGORITHMS_UPDATED_ENABLED = 248; + int RIL_REQUEST_IS_SECURITY_ALGORITHMS_UPDATED_ENABLED = 249; /* Responses begin */ int RIL_RESPONSE_ACKNOWLEDGEMENT = 800; @@ -608,6 +610,7 @@ public interface RILConstants { int RIL_UNSOL_RESPONSE_SIM_PHONEBOOK_RECORDS_RECEIVED = 1054; int RIL_UNSOL_SLICING_CONFIG_CHANGED = 1055; int RIL_UNSOL_CELLULAR_IDENTIFIER_DISCLOSED = 1056; + int RIL_UNSOL_SECURITY_ALGORITHMS_UPDATED = 1057; /* The following unsols are not defined in RIL.h */ int RIL_UNSOL_HAL_NON_RIL_BASE = 1100; diff --git a/tests/CtsSurfaceControlTestsStaging/src/main/java/android/view/surfacecontroltests/GraphicsActivity.java b/tests/CtsSurfaceControlTestsStaging/src/main/java/android/view/surfacecontroltests/GraphicsActivity.java index ae7c2a99b808..4548a7df6874 100644 --- a/tests/CtsSurfaceControlTestsStaging/src/main/java/android/view/surfacecontroltests/GraphicsActivity.java +++ b/tests/CtsSurfaceControlTestsStaging/src/main/java/android/view/surfacecontroltests/GraphicsActivity.java @@ -78,14 +78,15 @@ public class GraphicsActivity extends Activity { // TODO(b/293651105): Unhardcode category fps range mapping private static final FpsRange FRAME_RATE_CATEGORY_HIGH = new FpsRange(90, 120); private static final FpsRange FRAME_RATE_CATEGORY_NORMAL = new FpsRange(60, 90); - private static final FpsRange FRAME_RATE_CATEGORY_LOW = new FpsRange(30, 60); + private static final FpsRange FRAME_RATE_CATEGORY_LOW = new FpsRange(30, 30); private DisplayManager mDisplayManager; private SurfaceView mSurfaceView; private Handler mHandler = new Handler(Looper.getMainLooper()); private final Object mLock = new Object(); private Surface mSurface = null; - private float mDeviceFrameRate; + private float mDisplayModeRefreshRate; + private float mDisplayRefreshRate; private ModeChangedEvents mModeChangedEvents = new ModeChangedEvents(); private enum ActivityState { RUNNING, PAUSED, DESTROYED } @@ -123,14 +124,20 @@ public class GraphicsActivity extends Activity { return; } synchronized (mLock) { - Display.Mode mode = mDisplayManager.getDisplay(displayId).getMode(); + Display display = mDisplayManager.getDisplay(displayId); + Display.Mode mode = display.getMode(); mModeChangedEvents.add(mode); - float frameRate = mode.getRefreshRate(); - if (frameRate != mDeviceFrameRate) { + float displayModeRefreshRate = mode.getRefreshRate(); + float displayRefreshRate = display.getRefreshRate(); + if (displayModeRefreshRate != mDisplayModeRefreshRate + || displayRefreshRate != mDisplayRefreshRate) { Log.i(TAG, - String.format("Frame rate changed: %.2f --> %.2f", mDeviceFrameRate, - frameRate)); - mDeviceFrameRate = frameRate; + String.format("Refresh rate changed: (mode) %.2f --> %.2f, " + + "(display) %.2f --> %.2f", + mDisplayModeRefreshRate, displayModeRefreshRate, + mDisplayRefreshRate, displayRefreshRate)); + mDisplayModeRefreshRate = displayModeRefreshRate; + mDisplayRefreshRate = displayRefreshRate; mLock.notify(); } } @@ -317,8 +324,10 @@ public class GraphicsActivity extends Activity { super.onCreate(savedInstanceState); synchronized (mLock) { mDisplayManager = getSystemService(DisplayManager.class); - Display.Mode mode = getDisplay().getMode(); - mDeviceFrameRate = mode.getRefreshRate(); + Display display = getDisplay(); + Display.Mode mode = display.getMode(); + mDisplayModeRefreshRate = mode.getRefreshRate(); + mDisplayRefreshRate = display.getRefreshRate(); // Insert the initial mode so we have the full display mode history. mModeChangedEvents.add(mode); mDisplayManager.registerDisplayListener(mDisplayListener, mHandler); @@ -516,22 +525,25 @@ public class GraphicsActivity extends Activity { if (expectedFrameRate > FRAME_RATE_TOLERANCE) { // expectedFrameRate > 0 // Wait until we switch to a compatible frame rate. Log.i(TAG, - "Verifying expected frame rate: actual (device)=" + mDeviceFrameRate - + " expected=" + expectedFrameRate); + String.format( + "Verifying expected frame rate: actual=%.2f, expected=%.2f", + multiplesAllowed ? mDisplayModeRefreshRate : mDisplayRefreshRate, + expectedFrameRate)); if (multiplesAllowed) { - while (!isFrameRateMultiple(mDeviceFrameRate, expectedFrameRate) + while (!isFrameRateMultiple(mDisplayModeRefreshRate, expectedFrameRate) && !waitForEvents(gracePeriodEndTimeNanos, surfaces)) { // Empty } } else { - while (!frameRateEquals(mDeviceFrameRate, expectedFrameRate) + while (!frameRateEquals(mDisplayRefreshRate, expectedFrameRate) && !waitForEvents(gracePeriodEndTimeNanos, surfaces)) { // Empty } } nowNanos = System.nanoTime(); if (nowNanos >= gracePeriodEndTimeNanos) { - throw new FrameRateTimeoutException(expectedFrameRate, mDeviceFrameRate); + throw new FrameRateTimeoutException(expectedFrameRate, + multiplesAllowed ? mDisplayModeRefreshRate : mDisplayRefreshRate); } } @@ -541,7 +553,10 @@ public class GraphicsActivity extends Activity { while (endTimeNanos > nowNanos) { int numModeChangedEvents = mModeChangedEvents.size(); if (waitForEvents(endTimeNanos, surfaces)) { - Log.i(TAG, String.format("Stable frame rate %.2f verified", mDeviceFrameRate)); + Log.i(TAG, + String.format("Stable frame rate %.2f verified", + multiplesAllowed ? mDisplayModeRefreshRate + : mDisplayRefreshRate)); return; } nowNanos = System.nanoTime(); diff --git a/tests/MotionPrediction/Android.bp b/tests/MotionPrediction/Android.bp index 6cda8f050987..b4a435909953 100644 --- a/tests/MotionPrediction/Android.bp +++ b/tests/MotionPrediction/Android.bp @@ -26,5 +26,8 @@ package { android_app { name: "MotionPrediction", srcs: ["**/*.kt"], + kotlincflags: [ + "-Werror", + ], sdk_version: "current", } diff --git a/tests/MultiDeviceInput/Android.bp b/tests/MultiDeviceInput/Android.bp new file mode 100644 index 000000000000..3c80873168b4 --- /dev/null +++ b/tests/MultiDeviceInput/Android.bp @@ -0,0 +1,33 @@ +// +// Copyright 2023 The Android Open Source Project +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package { + // See: http://go/android-license-faq + // A large-scale-change added 'default_applicable_licenses' to import + // all of the 'license_kinds' from "frameworks_base_license" + // to get the below license kinds: + // SPDX-license-identifier-Apache-2.0 + default_applicable_licenses: ["frameworks_base_license"], +} + +android_app { + name: "MultiDeviceInput", + srcs: ["**/*.kt"], + kotlincflags: [ + "-Werror", + ], + sdk_version: "current", +} diff --git a/tests/MultiDeviceInput/AndroidManifest.xml b/tests/MultiDeviceInput/AndroidManifest.xml new file mode 100644 index 000000000000..ed8cadb9519b --- /dev/null +++ b/tests/MultiDeviceInput/AndroidManifest.xml @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright 2023 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<manifest xmlns:android="http://schemas.android.com/apk/res/android" + package="test.multideviceinput"> + + <application android:allowBackup="false" + android:icon="@mipmap/ic_launcher" + android:label="@string/app_name" + android:supportsRtl="true" + android:theme="@style/AppTheme"> + <activity android:name=".MainActivity" + android:exported="true"> + <intent-filter> + <action android:name="android.intent.action.MAIN"/> + <category android:name="android.intent.category.LAUNCHER"/> + </intent-filter> + </activity> + </application> + +</manifest> diff --git a/tests/MultiDeviceInput/OWNERS b/tests/MultiDeviceInput/OWNERS new file mode 100644 index 000000000000..c88bfe97cab9 --- /dev/null +++ b/tests/MultiDeviceInput/OWNERS @@ -0,0 +1 @@ +include platform/frameworks/base:/INPUT_OWNERS diff --git a/tests/MultiDeviceInput/README.md b/tests/MultiDeviceInput/README.md new file mode 100644 index 000000000000..5fcdeda6e5d7 --- /dev/null +++ b/tests/MultiDeviceInput/README.md @@ -0,0 +1,19 @@ +# MultiDeviceInput test app # + +This demo app is for manual testing of the multi-device input feature. +It creates two windows - one on the left and one on the right. You can use different input devices +in these windows. + +## Installation ## +Install this using: +``` +APP=MultiDeviceInput; m $APP && adb install $ANDROID_PRODUCT_OUT/system/app/$APP/$APP.apk +``` + +## Features ## + +* Touch in one window, use stylus in another window, at the same time +* Visualize hovering stylus +* Pinch zoom in one window to affect the line thickness in another window +* Check whether stylus rejects touch in the same window +* (in the future) Check stylus and touch operation in the same window diff --git a/tests/MultiDeviceInput/res/layout/activity_main.xml b/tests/MultiDeviceInput/res/layout/activity_main.xml new file mode 100644 index 000000000000..a6a6f891a034 --- /dev/null +++ b/tests/MultiDeviceInput/res/layout/activity_main.xml @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright 2023 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:orientation="vertical" + android:paddingBottom="@dimen/activity_vertical_margin" + android:paddingLeft="@dimen/activity_horizontal_margin" + android:paddingRight="@dimen/activity_horizontal_margin" + android:paddingTop="@dimen/activity_vertical_margin" + tools:context="test.multideviceinput.MainActivity"> + +</LinearLayout> diff --git a/tests/MultiDeviceInput/res/mipmap-hdpi/ic_launcher.png b/tests/MultiDeviceInput/res/mipmap-hdpi/ic_launcher.png Binary files differnew file mode 100644 index 000000000000..cde69bcccec6 --- /dev/null +++ b/tests/MultiDeviceInput/res/mipmap-hdpi/ic_launcher.png diff --git a/tests/MultiDeviceInput/res/mipmap-mdpi/ic_launcher.png b/tests/MultiDeviceInput/res/mipmap-mdpi/ic_launcher.png Binary files differnew file mode 100644 index 000000000000..c133a0cbd379 --- /dev/null +++ b/tests/MultiDeviceInput/res/mipmap-mdpi/ic_launcher.png diff --git a/tests/MultiDeviceInput/res/mipmap-xhdpi/ic_launcher.png b/tests/MultiDeviceInput/res/mipmap-xhdpi/ic_launcher.png Binary files differnew file mode 100644 index 000000000000..bfa42f0e7b91 --- /dev/null +++ b/tests/MultiDeviceInput/res/mipmap-xhdpi/ic_launcher.png diff --git a/tests/MultiDeviceInput/res/mipmap-xxhdpi/ic_launcher.png b/tests/MultiDeviceInput/res/mipmap-xxhdpi/ic_launcher.png Binary files differnew file mode 100644 index 000000000000..324e72cdd748 --- /dev/null +++ b/tests/MultiDeviceInput/res/mipmap-xxhdpi/ic_launcher.png diff --git a/tests/MultiDeviceInput/res/mipmap-xxxhdpi/ic_launcher.png b/tests/MultiDeviceInput/res/mipmap-xxxhdpi/ic_launcher.png Binary files differnew file mode 100644 index 000000000000..aee44e138434 --- /dev/null +++ b/tests/MultiDeviceInput/res/mipmap-xxxhdpi/ic_launcher.png diff --git a/tests/MultiDeviceInput/res/values-w820dp/dimens.xml b/tests/MultiDeviceInput/res/values-w820dp/dimens.xml new file mode 100644 index 000000000000..b14a560efd72 --- /dev/null +++ b/tests/MultiDeviceInput/res/values-w820dp/dimens.xml @@ -0,0 +1,20 @@ +<!-- Copyright 2023 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<resources> + <!-- Example customization of dimensions originally defined in res/values/dimens.xml + (such as screen margins) for screens with more than 820dp of available width. This + would include 7" and 10" devices in landscape (~960dp and ~1280dp respectively). --> + <dimen name="activity_horizontal_margin">64dp</dimen> +</resources> diff --git a/tests/MultiDeviceInput/res/values/colors.xml b/tests/MultiDeviceInput/res/values/colors.xml new file mode 100644 index 000000000000..c37df9f7b428 --- /dev/null +++ b/tests/MultiDeviceInput/res/values/colors.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright 2023 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<resources> + <color name="colorPrimary">#3F51B5</color> + <color name="colorPrimaryDark">#303F9F</color> + <color name="colorAccent">#FF4081</color> +</resources> diff --git a/tests/MultiDeviceInput/res/values/dimens.xml b/tests/MultiDeviceInput/res/values/dimens.xml new file mode 100644 index 000000000000..bdb8ede1c913 --- /dev/null +++ b/tests/MultiDeviceInput/res/values/dimens.xml @@ -0,0 +1,19 @@ +<!-- Copyright 2023 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<resources> + <!-- Default screen margins, per the Android Design guidelines. --> + <dimen name="activity_horizontal_margin">16dp</dimen> + <dimen name="activity_vertical_margin">16dp</dimen> +</resources> diff --git a/tests/MultiDeviceInput/res/values/strings.xml b/tests/MultiDeviceInput/res/values/strings.xml new file mode 100644 index 000000000000..3827c344f87f --- /dev/null +++ b/tests/MultiDeviceInput/res/values/strings.xml @@ -0,0 +1,17 @@ +<!-- Copyright 2023 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<resources> + <string name="app_name">Simultaneous touch and stylus</string> +</resources> diff --git a/tests/MultiDeviceInput/res/values/styles.xml b/tests/MultiDeviceInput/res/values/styles.xml new file mode 100644 index 000000000000..a563e7e09706 --- /dev/null +++ b/tests/MultiDeviceInput/res/values/styles.xml @@ -0,0 +1,23 @@ +<!-- Copyright 2023 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<resources> + <!-- Base application theme. --> + <style name="AppTheme" parent="@android:style/Theme.Material.Light.DarkActionBar"> + <!-- Customize your theme here. --> + <item name="android:colorPrimary">@color/colorPrimary</item> + <item name="android:colorPrimaryDark">@color/colorPrimaryDark</item> + <item name="android:colorAccent">@color/colorAccent</item> + </style> +</resources> diff --git a/tests/MultiDeviceInput/src/test/multideviceinput/DrawingView.kt b/tests/MultiDeviceInput/src/test/multideviceinput/DrawingView.kt new file mode 100644 index 000000000000..b5bd9ca746aa --- /dev/null +++ b/tests/MultiDeviceInput/src/test/multideviceinput/DrawingView.kt @@ -0,0 +1,183 @@ +/* + * Copyright 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package test.multideviceinput + +import android.content.Context +import android.graphics.Canvas +import android.graphics.Color +import android.graphics.Paint +import android.util.AttributeSet +import android.view.InputDevice.SOURCE_STYLUS +import android.view.MotionEvent +import android.view.MotionEvent.ACTION_DOWN +import android.view.MotionEvent.ACTION_HOVER_EXIT +import android.view.MotionEvent.ACTION_UP +import android.view.ScaleGestureDetector +import android.view.View + +import java.util.Vector + +private fun drawLine(canvas: Canvas, from: MotionEvent, to: MotionEvent, paint: Paint) { + // Correct implementation here would require us to build a set of pointers and then iterate + // through them. Instead, we are taking a few shortcuts and ignore some of the events, which + // causes occasional gaps in the drawings. + if (from.pointerCount != to.pointerCount) { + return + } + // Now, 'from' is guaranteed to have as many pointers as the 'to' event. It doesn't + // necessarily mean they are the same pointers, though. + for (p in 0..<from.pointerCount) { + val x0 = from.getX(p) + val y0 = from.getY(p) + if (to.getPointerId(p) == from.getPointerId(p)) { + // This only works when the i-th pointer in "to" is the same pointer + // as the i-th pointer in "from"`. It's not guaranteed by the input APIs, + // but it works in practice. + val x1 = to.getX(p) + val y1 = to.getY(p) + // Ignoring historical data here for simplicity + canvas.drawLine(x0, y0, x1, y1, paint) + } + } +} + +private fun drawCircle(canvas: Canvas, event: MotionEvent, paint: Paint, radius: Float) { + val x = event.getX() + val y = event.getY() + canvas.drawCircle(x, y, radius, paint) +} + +/** + * Draw the current stroke + */ +class DrawingView : View { + private val TAG = "DrawingView" + + private var myState: SharedScaledPointerSize? = null + private var otherState: SharedScaledPointerSize? = null + + constructor( + context: Context, + myState: SharedScaledPointerSize, + otherState: SharedScaledPointerSize + ) : super(context) { + this.myState = myState + this.otherState = otherState + init() + } + + constructor(context: Context, attrs: AttributeSet) : super(context, attrs) { + init() + } + + val touchEvents = mutableMapOf<Int, Vector<Pair<MotionEvent, Paint>>>() + val hoverEvents = mutableMapOf<Int, MotionEvent>() + + val scaleGestureListener = object : ScaleGestureDetector.SimpleOnScaleGestureListener() { + + override fun onScaleBegin(scaleGestureDetector: ScaleGestureDetector): Boolean { + return true + } + + override fun onScale(scaleGestureDetector: ScaleGestureDetector): Boolean { + val scaleFactor = scaleGestureDetector.scaleFactor + when (otherState?.state) { + PointerState.DOWN -> { + otherState?.lineSize = (otherState?.lineSize ?: 5f) * scaleFactor + } + PointerState.HOVER -> { + otherState?.circleSize = (otherState?.circleSize ?: 20f) * scaleFactor + } + else -> {} + } + return true + } + } + private val scaleGestureDetector = ScaleGestureDetector(context, scaleGestureListener, null) + + private var touchPaint = Paint() + private var stylusPaint = Paint() + + private fun init() { + touchPaint.color = Color.RED + touchPaint.setStrokeWidth(5f) + stylusPaint.color = Color.YELLOW + stylusPaint.setStrokeWidth(5f) + + setOnHoverListener { _, event -> processHoverEvent(event); true } + } + + private fun processTouchEvent(event: MotionEvent) { + scaleGestureDetector.onTouchEvent(event) + if (event.actionMasked == ACTION_DOWN) { + touchEvents.remove(event.deviceId) + myState?.state = PointerState.DOWN + } else if (event.actionMasked == ACTION_UP) { + myState?.state = PointerState.NONE + } + var vec = touchEvents.getOrPut(event.deviceId) { Vector<Pair<MotionEvent, Paint>>() } + + val paint = if (event.isFromSource(SOURCE_STYLUS)) { + val size = myState?.lineSize ?: 5f + stylusPaint.setStrokeWidth(size) + Paint(stylusPaint) + } else { + val size = myState?.lineSize ?: 5f + touchPaint.setStrokeWidth(size) + Paint(touchPaint) + } + vec.add(Pair(MotionEvent.obtain(event), paint)) + invalidate() + } + + private fun processHoverEvent(event: MotionEvent) { + hoverEvents.remove(event.deviceId) + if (event.getActionMasked() != ACTION_HOVER_EXIT) { + hoverEvents.put(event.deviceId, MotionEvent.obtain(event)) + myState?.state = PointerState.HOVER + } else { + myState?.state = PointerState.NONE + } + invalidate() + } + + public override fun onTouchEvent(event: MotionEvent): Boolean { + processTouchEvent(event) + return true + } + + public override fun onDraw(canvas: Canvas) { + super.onDraw(canvas) + + // Draw touch and stylus MotionEvents + for ((_, vec) in touchEvents ) { + for (i in 1 until vec.size) { + drawLine(canvas, vec[i - 1].first, vec[i].first, vec[i].second) + } + } + // Draw hovers + for ((_, event) in hoverEvents ) { + if (event.isFromSource(SOURCE_STYLUS)) { + val size = myState?.circleSize ?: 20f + drawCircle(canvas, event, stylusPaint, size) + } else { + val size = myState?.circleSize ?: 20f + drawCircle(canvas, event, touchPaint, size) + } + } + } +} diff --git a/tests/MultiDeviceInput/src/test/multideviceinput/MainActivity.kt b/tests/MultiDeviceInput/src/test/multideviceinput/MainActivity.kt new file mode 100644 index 000000000000..911208579d4f --- /dev/null +++ b/tests/MultiDeviceInput/src/test/multideviceinput/MainActivity.kt @@ -0,0 +1,83 @@ +/* + * Copyright 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package test.multideviceinput + +import android.app.Activity +import android.graphics.Color +import android.view.Gravity +import android.view.View +import android.view.ViewGroup +import android.view.WindowInsets.Type +import android.view.WindowManager + + +enum class PointerState { + DOWN, // One or more pointer(s) down, lines are being drawn + HOVER, // Pointer is hovering + NONE, // Nothing is touching or hovering +} + +data class SharedScaledPointerSize( + var lineSize: Float, + var circleSize: Float, + var state: PointerState +) + +class MainActivity : Activity() { + val TAG = "MultiDeviceInput" + private val leftState = SharedScaledPointerSize(5f, 20f, PointerState.NONE) + private val rightState = SharedScaledPointerSize(5f, 20f, PointerState.NONE) + private lateinit var left: View + private lateinit var right: View + + override fun onResume() { + super.onResume() + + val wm = getSystemService(WindowManager::class.java) + val wmlp = WindowManager.LayoutParams(WindowManager.LayoutParams.TYPE_APPLICATION) + wmlp.flags = (wmlp.flags or + WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL or + WindowManager.LayoutParams.FLAG_SPLIT_TOUCH) + + val windowMetrics = windowManager.currentWindowMetrics + val insets = windowMetrics.windowInsets.getInsetsIgnoringVisibility(Type.systemBars()) + val width = windowMetrics.bounds.width() - insets.left - insets.right + val height = windowMetrics.bounds.height() - insets.top - insets.bottom + + wmlp.width = width * 24 / 50 + wmlp.height = height * 35 / 50 + + val vglp = ViewGroup.LayoutParams( + ViewGroup.LayoutParams.WRAP_CONTENT, + ViewGroup.LayoutParams.WRAP_CONTENT + ) + + wmlp.setTitle("Left -- " + getPackageName()) + wmlp.gravity = Gravity.CENTER_VERTICAL or Gravity.START + left = DrawingView(this, leftState, rightState) + left.setBackgroundColor(Color.LTGRAY) + left.setLayoutParams(vglp) + wm.addView(left, wmlp) + + wmlp.setTitle("Right -- " + getPackageName()) + wmlp.gravity = Gravity.CENTER_VERTICAL or Gravity.END + right = DrawingView(this, rightState, leftState) + right.setBackgroundColor(Color.LTGRAY) + right.setLayoutParams(vglp) + wm.addView(right, wmlp) + } +} diff --git a/tools/hoststubgen/hoststubgen/Android.bp b/tools/hoststubgen/hoststubgen/Android.bp index fd4ec8bd5931..5949bca2f9a3 100644 --- a/tools/hoststubgen/hoststubgen/Android.bp +++ b/tools/hoststubgen/hoststubgen/Android.bp @@ -284,6 +284,9 @@ java_library { "hoststubgen-helper-runtime.ravenwood", "framework-minus-apex.ravenwood", ], + static_libs: [ + "core-xml-for-device", + ], } // Defaults for host side test modules. diff --git a/tools/hoststubgen/hoststubgen/helper-framework-runtime-src/framework/com/android/hoststubgen/nativesubstitution/Parcel_host.java b/tools/hoststubgen/hoststubgen/helper-framework-runtime-src/framework/com/android/hoststubgen/nativesubstitution/Parcel_host.java index 12c7841556fc..4a3a79803b65 100644 --- a/tools/hoststubgen/hoststubgen/helper-framework-runtime-src/framework/com/android/hoststubgen/nativesubstitution/Parcel_host.java +++ b/tools/hoststubgen/hoststubgen/helper-framework-runtime-src/framework/com/android/hoststubgen/nativesubstitution/Parcel_host.java @@ -286,11 +286,15 @@ public class Parcel_host { } public static byte[] nativeReadBlob(long nativePtr) { + var p = getInstance(nativePtr); + if (p.mSize - p.mPos < 4) { + // Match native impl that returns "null" when not enough data + return null; + } final var size = nativeReadInt(nativePtr); if (size == -1) { return null; } - var p = getInstance(nativePtr); try { p.ensureDataAvailable(align4(size)); } catch (Exception e) { |