diff options
444 files changed, 6817 insertions, 5006 deletions
diff --git a/Android.bp b/Android.bp index e756b3428164..eacf57ccd38c 100644 --- a/Android.bp +++ b/Android.bp @@ -366,7 +366,8 @@ filegroup { ":framework-tethering-srcs", ":framework-wifi-updatable-sources", ":updatable-media-srcs", - ] + ], + visibility: ["//visibility:private"], } java_library { @@ -383,7 +384,31 @@ java_library { "framework-wifi.stubs.module_lib", ], sdk_version: "module_current", - visibility: [":__pkg__"], + visibility: ["//visibility:private"], +} + +java_library { + name: "framework-all", + installable: false, + static_libs: [ + "framework-minus-apex", + "framework-appsearch", + "framework-graphics.impl", + "framework-mediaprovider.impl", + "framework-permission.impl", + "framework-sdkextensions.impl", + "framework-statsd.impl", + "framework-tethering.impl", + "framework-wifi.impl", + "updatable-media", + ], + apex_available: ["//apex_available:platform"], + sdk_version: "core_platform", + visibility: [ + // DO NOT ADD ANY MORE ENTRIES TO THIS LIST + "//external/robolectric-shadows:__subpackages__", + "//frameworks/layoutlib:__subpackages__", + ], } filegroup { @@ -474,53 +499,6 @@ java_library { installable: false, } -java_defaults { - name: "framework-defaults", - defaults: ["framework-aidl-export-defaults"], - installable: true, - - aidl: { - generate_get_transaction_name: true, - }, - - srcs: ["core/java/**/*.logtags"], - - exclude_srcs: [ - // See comment on framework-atb-backward-compatibility module below - "core/java/android/content/pm/AndroidTestBaseUpdater.java", - ], - - sdk_version: "core_platform", - libs: [ - "app-compat-annotations", - "ext", - "unsupportedappusage", - ], - - jarjar_rules: ":framework-jarjar-rules", - - static_libs: [ - "framework-internal-utils", - ], - - dxflags: [ - "--core-library", - "--multi-dex", - ], - - plugins: [ - "view-inspector-annotation-processor", - "staledataclass-annotation-processor", - "error_prone_android_framework", - ], - - required: [ - // TODO: remove gps_debug and protolog.conf.json when the build system propagates "required" properly. - "gps_debug.conf", - "protolog.conf.json.gz", - ], -} - filegroup { name: "framework-jarjar-rules", srcs: ["framework-jarjar-rules.txt"], @@ -560,19 +538,47 @@ filegroup { java_library { name: "framework-minus-apex", - defaults: ["framework-defaults"], - srcs: [":framework-non-updatable-sources"], + defaults: ["framework-aidl-export-defaults"], + srcs: [ + ":framework-non-updatable-sources", + "core/java/**/*.logtags", + ], + // See comment on framework-atb-backward-compatibility module below + exclude_srcs: ["core/java/android/content/pm/AndroidTestBaseUpdater.java"], + aidl: { + generate_get_transaction_name: true, + }, + dxflags: [ + "--core-library", + "--multi-dex", + ], installable: true, + jarjar_rules: ":framework-jarjar-rules", javac_shard_size: 150, + plugins: [ + "view-inspector-annotation-processor", + "staledataclass-annotation-processor", + "error_prone_android_framework", + ], required: [ "framework-platform-compat-config", + // TODO: remove gps_debug and protolog.conf.json when the build system propagates "required" properly. + "gps_debug.conf", "libcore-platform-compat-config", + "protolog.conf.json.gz", "services-platform-compat-config", "documents-ui-compat-config", "calendar-provider-compat-config", ], - libs: ["framework-updatable-stubs-module_libs_api"], + libs: [ + "app-compat-annotations", + "ext", + "framework-updatable-stubs-module_libs_api", + "unsupportedappusage", + ], + sdk_version: "core_platform", static_libs: [ + "framework-internal-utils", // If MimeMap ever becomes its own APEX, then this dependency would need to be removed // in favor of an API stubs dependency in java_library "framework" below. "mimemap", @@ -615,32 +621,6 @@ java_library { apex_available: ["//apex_available:platform"], } -java_library { - name: "framework-all", - defaults: ["framework-defaults"], - srcs: [":framework-all-sources"], - installable: false, - static_libs: [ - "exoplayer2-extractor", - "android.hardware.wifi-V1.0-java-constants", - "mediatranscoding_aidl_interface-java", - - // Additional dependencies needed to build the ike API classes. - "ike-internals", - ], - plugins: [ - "intdef-annotation-processor", - ], - libs: ["icing-java-proto-lite"], - apex_available: ["//apex_available:platform"], - visibility: [ - // DO NOT ADD ANY MORE ENTRIES TO THIS LIST - "//external/robolectric-shadows:__subpackages__", - "//frameworks/base", - "//frameworks/layoutlib:__subpackages__", - ], -} - platform_compat_config { name: "framework-platform-compat-config", src: ":framework-minus-apex", diff --git a/apct-tests/perftests/contentcapture/src/android/view/contentcapture/MyContentCaptureService.java b/apct-tests/perftests/contentcapture/src/android/view/contentcapture/MyContentCaptureService.java index b1dbb28c9501..d07ed375b2ab 100644 --- a/apct-tests/perftests/contentcapture/src/android/view/contentcapture/MyContentCaptureService.java +++ b/apct-tests/perftests/contentcapture/src/android/view/contentcapture/MyContentCaptureService.java @@ -51,13 +51,14 @@ public class MyContentCaptureService extends ContentCaptureService { sServiceWatcher = null; } - public static void clearServiceWatcher() { - if (sServiceWatcher != null) { - if (sServiceWatcher.mReadyToClear) { - sServiceWatcher.mService = null; + private static void clearServiceWatcher() { + final ServiceWatcher sw = sServiceWatcher; + if (sw != null) { + if (sw.mReadyToClear) { + sw.mService = null; sServiceWatcher = null; } else { - sServiceWatcher.mReadyToClear = true; + sw.mReadyToClear = true; } } } diff --git a/apex/Android.bp b/apex/Android.bp index 410e21141f86..266e6720c1a1 100644 --- a/apex/Android.bp +++ b/apex/Android.bp @@ -101,20 +101,16 @@ java_defaults { annotations_enabled: true, - stubs_library_visibility: [ - "//visibility:public", - ], - - // Set the visibility of the modules creating the stubs source. - stubs_source_visibility: [ - // Ignore any visibility rules specified on the java_sdk_library when - // setting the visibility of the stubs source modules. - "//visibility:override", - - // Currently, the stub source is not required for anything other than building - // the stubs library so is private to avoid misuse. - "//visibility:private", + // Allow access to the stubs from anywhere + visibility: ["//visibility:public"], + stubs_library_visibility: ["//visibility:public"], + + // Hide impl library and stub sources + impl_library_visibility: [ + ":__package__", + "//frameworks/base", // For framework-all ], + stubs_source_visibility: ["//visibility:private"], // Collates API usages from each module for further analysis. plugins: ["java_api_finder"], diff --git a/apex/jobscheduler/service/java/com/android/server/DeviceIdleController.java b/apex/jobscheduler/service/java/com/android/server/DeviceIdleController.java index 6c3398f91db1..d8386b5f1153 100644 --- a/apex/jobscheduler/service/java/com/android/server/DeviceIdleController.java +++ b/apex/jobscheduler/service/java/com/android/server/DeviceIdleController.java @@ -21,14 +21,12 @@ import android.app.ActivityManager; import android.app.ActivityManagerInternal; import android.app.AlarmManager; import android.content.BroadcastReceiver; -import android.content.ContentResolver; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.content.pm.ApplicationInfo; import android.content.pm.PackageManager; import android.content.pm.PackageManager.NameNotFoundException; -import android.database.ContentObserver; import android.hardware.Sensor; import android.hardware.SensorEvent; import android.hardware.SensorEventListener; @@ -63,11 +61,10 @@ import android.os.ShellCallback; import android.os.ShellCommand; import android.os.SystemClock; import android.os.UserHandle; -import android.provider.Settings; +import android.provider.DeviceConfig; import android.util.ArrayMap; import android.util.ArraySet; import android.util.AtomicFile; -import android.util.KeyValueListParser; import android.util.MutableLong; import android.util.Pair; import android.util.Slog; @@ -856,7 +853,7 @@ public class DeviceIdleController extends SystemService * global Settings. Any access to this class or its fields should be done while * holding the DeviceIdleController lock. */ - public final class Constants extends ContentObserver { + public final class Constants implements DeviceConfig.OnPropertiesChangedListener { // Key names stored in the settings value. private static final String KEY_LIGHT_IDLE_AFTER_INACTIVE_TIMEOUT = "light_after_inactive_to"; @@ -884,15 +881,15 @@ public class DeviceIdleController extends SystemService private static final String KEY_MAX_IDLE_TIMEOUT = "max_idle_to"; private static final String KEY_IDLE_FACTOR = "idle_factor"; private static final String KEY_MIN_TIME_TO_ALARM = "min_time_to_alarm"; + // TODO(166121524): update flag names private static final String KEY_MAX_TEMP_APP_WHITELIST_DURATION = "max_temp_app_whitelist_duration"; private static final String KEY_MMS_TEMP_APP_WHITELIST_DURATION = "mms_temp_app_whitelist_duration"; private static final String KEY_SMS_TEMP_APP_WHITELIST_DURATION = "sms_temp_app_whitelist_duration"; - // TODO(b/124466289): update value to match the name - private static final String KEY_NOTIFICATION_ALLOWLIST_DURATION = - "notification_whitelist_duration"; + private static final String KEY_NOTIFICATION_ALLOWLIST_DURATION_MS = + "notification_allowlist_duration_ms"; /** * Whether to wait for the user to unlock the device before causing screen-on to * exit doze. Default = true @@ -903,52 +900,106 @@ public class DeviceIdleController extends SystemService private static final String KEY_PRE_IDLE_FACTOR_SHORT = "pre_idle_factor_short"; + private static final long DEFAULT_LIGHT_IDLE_AFTER_INACTIVE_TIMEOUT = + !COMPRESS_TIME ? 3 * 60 * 1000L : 15 * 1000L; + private static final long DEFAULT_LIGHT_PRE_IDLE_TIMEOUT = + !COMPRESS_TIME ? 3 * 60 * 1000L : 30 * 1000L; + private static final long DEFAULT_LIGHT_IDLE_TIMEOUT = + !COMPRESS_TIME ? 5 * 60 * 1000L : 15 * 1000L; + private static final float DEFAULT_LIGHT_IDLE_FACTOR = 2f; + private static final long DEFAULT_LIGHT_MAX_IDLE_TIMEOUT = + !COMPRESS_TIME ? 15 * 60 * 1000L : 60 * 1000L; + private static final long DEFAULT_LIGHT_IDLE_MAINTENANCE_MIN_BUDGET = + !COMPRESS_TIME ? 1 * 60 * 1000L : 15 * 1000L; + private static final long DEFAULT_LIGHT_IDLE_MAINTENANCE_MAX_BUDGET = + !COMPRESS_TIME ? 5 * 60 * 1000L : 30 * 1000L; + private static final long DEFAULT_MIN_LIGHT_MAINTENANCE_TIME = + !COMPRESS_TIME ? 5 * 1000L : 1 * 1000L; + private static final long DEFAULT_MIN_DEEP_MAINTENANCE_TIME = + !COMPRESS_TIME ? 30 * 1000L : 5 * 1000L; + private static final long DEFAULT_INACTIVE_TIMEOUT = + (30 * 60 * 1000L) / (!COMPRESS_TIME ? 1 : 10); + private static final long DEFAULT_INACTIVE_TIMEOUT_SMALL_BATTERY = + (15 * 60 * 1000L) / (!COMPRESS_TIME ? 1 : 10); + private static final long DEFAULT_SENSING_TIMEOUT = + !COMPRESS_TIME ? 4 * 60 * 1000L : 60 * 1000L; + private static final long DEFAULT_LOCATING_TIMEOUT = + !COMPRESS_TIME ? 30 * 1000L : 15 * 1000L; + private static final float DEFAULT_LOCATION_ACCURACY = 20f; + private static final long DEFAULT_MOTION_INACTIVE_TIMEOUT = + !COMPRESS_TIME ? 10 * 60 * 1000L : 60 * 1000L; + private static final long DEFAULT_IDLE_AFTER_INACTIVE_TIMEOUT = + (30 * 60 * 1000L) / (!COMPRESS_TIME ? 1 : 10); + private static final long DEFAULT_IDLE_AFTER_INACTIVE_TIMEOUT_SMALL_BATTERY = + (15 * 60 * 1000L) / (!COMPRESS_TIME ? 1 : 10); + private static final long DEFAULT_IDLE_PENDING_TIMEOUT = + !COMPRESS_TIME ? 5 * 60 * 1000L : 30 * 1000L; + private static final long DEFAULT_MAX_IDLE_PENDING_TIMEOUT = + !COMPRESS_TIME ? 10 * 60 * 1000L : 60 * 1000L; + private static final float DEFAULT_IDLE_PENDING_FACTOR = 2f; + private static final long DEFAULT_QUICK_DOZE_DELAY_TIMEOUT = + !COMPRESS_TIME ? 60 * 1000L : 15 * 1000L; + private static final long DEFAULT_IDLE_TIMEOUT = + !COMPRESS_TIME ? 60 * 60 * 1000L : 6 * 60 * 1000L; + private static final long DEFAULT_MAX_IDLE_TIMEOUT = + !COMPRESS_TIME ? 6 * 60 * 60 * 1000L : 30 * 60 * 1000L; + private static final float DEFAULT_IDLE_FACTOR = 2f; + private static final long DEFAULT_MIN_TIME_TO_ALARM = + !COMPRESS_TIME ? 30 * 60 * 1000L : 6 * 60 * 1000L; + private static final long DEFAULT_MAX_TEMP_APP_WHITELIST_DURATION = 5 * 60 * 1000L; + private static final long DEFAULT_MMS_TEMP_APP_WHITELIST_DURATION = 60 * 1000L; + private static final long DEFAULT_SMS_TEMP_APP_WHITELIST_DURATION = 20 * 1000L; + private static final long DEFAULT_NOTIFICATION_ALLOWLIST_DURATION_MS = 30 * 1000L; + private static final boolean DEFAULT_WAIT_FOR_UNLOCK = true; + private static final float DEFAULT_PRE_IDLE_FACTOR_LONG = 1.67f; + private static final float DEFAULT_PRE_IDLE_FACTOR_SHORT = .33f; + /** * This is the time, after becoming inactive, that we go in to the first * light-weight idle mode. - * @see Settings.Global#DEVICE_IDLE_CONSTANTS + * * @see #KEY_LIGHT_IDLE_AFTER_INACTIVE_TIMEOUT */ - public long LIGHT_IDLE_AFTER_INACTIVE_TIMEOUT; + public long LIGHT_IDLE_AFTER_INACTIVE_TIMEOUT = DEFAULT_LIGHT_IDLE_AFTER_INACTIVE_TIMEOUT; /** * This is amount of time we will wait from the point where we decide we would * like to go idle until we actually do, while waiting for jobs and other current * activity to finish. - * @see Settings.Global#DEVICE_IDLE_CONSTANTS + * * @see #KEY_LIGHT_PRE_IDLE_TIMEOUT */ - public long LIGHT_PRE_IDLE_TIMEOUT; + public long LIGHT_PRE_IDLE_TIMEOUT = DEFAULT_LIGHT_PRE_IDLE_TIMEOUT; /** * This is the initial time that we will run in idle maintenance mode. - * @see Settings.Global#DEVICE_IDLE_CONSTANTS + * * @see #KEY_LIGHT_IDLE_TIMEOUT */ - public long LIGHT_IDLE_TIMEOUT; + public long LIGHT_IDLE_TIMEOUT = DEFAULT_LIGHT_IDLE_TIMEOUT; /** * Scaling factor to apply to the light idle mode time each time we complete a cycle. - * @see Settings.Global#DEVICE_IDLE_CONSTANTS + * * @see #KEY_LIGHT_IDLE_FACTOR */ - public float LIGHT_IDLE_FACTOR; + public float LIGHT_IDLE_FACTOR = DEFAULT_LIGHT_IDLE_FACTOR; /** * This is the maximum time we will run in idle maintenance mode. - * @see Settings.Global#DEVICE_IDLE_CONSTANTS + * * @see #KEY_LIGHT_MAX_IDLE_TIMEOUT */ - public long LIGHT_MAX_IDLE_TIMEOUT; + public long LIGHT_MAX_IDLE_TIMEOUT = DEFAULT_LIGHT_MAX_IDLE_TIMEOUT; /** * This is the minimum amount of time we want to make available for maintenance mode * when lightly idling. That is, we will always have at least this amount of time * available maintenance before timing out and cutting off maintenance mode. - * @see Settings.Global#DEVICE_IDLE_CONSTANTS + * * @see #KEY_LIGHT_IDLE_MAINTENANCE_MIN_BUDGET */ - public long LIGHT_IDLE_MAINTENANCE_MIN_BUDGET; + public long LIGHT_IDLE_MAINTENANCE_MIN_BUDGET = DEFAULT_LIGHT_IDLE_MAINTENANCE_MIN_BUDGET; /** * This is the maximum amount of time we want to make available for maintenance mode @@ -956,10 +1007,10 @@ public class DeviceIdleController extends SystemService * budget and this time is being added to the budget reserve, this is the maximum * reserve size we will allow to grow and thus the maximum amount of time we will * allow for the maintenance window. - * @see Settings.Global#DEVICE_IDLE_CONSTANTS + * * @see #KEY_LIGHT_IDLE_MAINTENANCE_MAX_BUDGET */ - public long LIGHT_IDLE_MAINTENANCE_MAX_BUDGET; + public long LIGHT_IDLE_MAINTENANCE_MAX_BUDGET = DEFAULT_LIGHT_IDLE_MAINTENANCE_MAX_BUDGET; /** * This is the minimum amount of time that we will stay in maintenance mode after @@ -967,10 +1018,10 @@ public class DeviceIdleController extends SystemService * in to maintenance mode and scheduling their work -- otherwise we may * see there is nothing to do (no jobs pending) and go out of maintenance * mode immediately. - * @see Settings.Global#DEVICE_IDLE_CONSTANTS + * * @see #KEY_MIN_LIGHT_MAINTENANCE_TIME */ - public long MIN_LIGHT_MAINTENANCE_TIME; + public long MIN_LIGHT_MAINTENANCE_TIME = DEFAULT_MIN_LIGHT_MAINTENANCE_TIME; /** * This is the minimum amount of time that we will stay in maintenance mode after @@ -978,271 +1029,323 @@ public class DeviceIdleController extends SystemService * in to maintenance mode and scheduling their work -- otherwise we may * see there is nothing to do (no jobs pending) and go out of maintenance * mode immediately. - * @see Settings.Global#DEVICE_IDLE_CONSTANTS * @see #KEY_MIN_DEEP_MAINTENANCE_TIME */ - public long MIN_DEEP_MAINTENANCE_TIME; + public long MIN_DEEP_MAINTENANCE_TIME = DEFAULT_MIN_DEEP_MAINTENANCE_TIME; /** * This is the time, after becoming inactive, at which we start looking at the * motion sensor to determine if the device is being left alone. We don't do this * immediately after going inactive just because we don't want to be continually running * the motion sensor whenever the screen is off. - * @see Settings.Global#DEVICE_IDLE_CONSTANTS * @see #KEY_INACTIVE_TIMEOUT */ - public long INACTIVE_TIMEOUT; + public long INACTIVE_TIMEOUT = DEFAULT_INACTIVE_TIMEOUT; /** * If we don't receive a callback from AnyMotion in this amount of time + * {@link #LOCATING_TIMEOUT}, we will change from * STATE_SENSING to STATE_INACTIVE, and any AnyMotion callbacks while not in STATE_SENSING * will be ignored. - * @see Settings.Global#DEVICE_IDLE_CONSTANTS * @see #KEY_SENSING_TIMEOUT */ - public long SENSING_TIMEOUT; + public long SENSING_TIMEOUT = DEFAULT_SENSING_TIMEOUT; /** * This is how long we will wait to try to get a good location fix before going in to * idle mode. - * @see Settings.Global#DEVICE_IDLE_CONSTANTS * @see #KEY_LOCATING_TIMEOUT */ - public long LOCATING_TIMEOUT; + public long LOCATING_TIMEOUT = DEFAULT_LOCATING_TIMEOUT; /** * The desired maximum accuracy (in meters) we consider the location to be good enough to go * on to idle. We will be trying to get an accuracy fix at least this good or until * {@link #LOCATING_TIMEOUT} expires. - * @see Settings.Global#DEVICE_IDLE_CONSTANTS * @see #KEY_LOCATION_ACCURACY */ - public float LOCATION_ACCURACY; + public float LOCATION_ACCURACY = DEFAULT_LOCATION_ACCURACY; /** * This is the time, after seeing motion, that we wait after becoming inactive from * that until we start looking for motion again. - * @see Settings.Global#DEVICE_IDLE_CONSTANTS * @see #KEY_MOTION_INACTIVE_TIMEOUT */ - public long MOTION_INACTIVE_TIMEOUT; + public long MOTION_INACTIVE_TIMEOUT = DEFAULT_MOTION_INACTIVE_TIMEOUT; /** * This is the time, after the inactive timeout elapses, that we will wait looking * for motion until we truly consider the device to be idle. - * @see Settings.Global#DEVICE_IDLE_CONSTANTS * @see #KEY_IDLE_AFTER_INACTIVE_TIMEOUT */ - public long IDLE_AFTER_INACTIVE_TIMEOUT; + public long IDLE_AFTER_INACTIVE_TIMEOUT = DEFAULT_IDLE_AFTER_INACTIVE_TIMEOUT; /** * This is the initial time, after being idle, that we will allow ourself to be back * in the IDLE_MAINTENANCE state allowing the system to run normally until we return to * idle. - * @see Settings.Global#DEVICE_IDLE_CONSTANTS * @see #KEY_IDLE_PENDING_TIMEOUT */ - public long IDLE_PENDING_TIMEOUT; + public long IDLE_PENDING_TIMEOUT = DEFAULT_IDLE_PENDING_TIMEOUT; /** * Maximum pending idle timeout (time spent running) we will be allowed to use. - * @see Settings.Global#DEVICE_IDLE_CONSTANTS * @see #KEY_MAX_IDLE_PENDING_TIMEOUT */ - public long MAX_IDLE_PENDING_TIMEOUT; + public long MAX_IDLE_PENDING_TIMEOUT = DEFAULT_MAX_IDLE_PENDING_TIMEOUT; /** * Scaling factor to apply to current pending idle timeout each time we cycle through * that state. - * @see Settings.Global#DEVICE_IDLE_CONSTANTS * @see #KEY_IDLE_PENDING_FACTOR */ - public float IDLE_PENDING_FACTOR; + public float IDLE_PENDING_FACTOR = DEFAULT_IDLE_PENDING_FACTOR; /** * This is amount of time we will wait from the point where we go into * STATE_QUICK_DOZE_DELAY until we actually go into STATE_IDLE, while waiting for jobs * and other current activity to finish. - * @see Settings.Global#DEVICE_IDLE_CONSTANTS * @see #KEY_QUICK_DOZE_DELAY_TIMEOUT */ - public long QUICK_DOZE_DELAY_TIMEOUT; + public long QUICK_DOZE_DELAY_TIMEOUT = DEFAULT_QUICK_DOZE_DELAY_TIMEOUT; /** * This is the initial time that we want to sit in the idle state before waking up * again to return to pending idle and allowing normal work to run. - * @see Settings.Global#DEVICE_IDLE_CONSTANTS * @see #KEY_IDLE_TIMEOUT */ - public long IDLE_TIMEOUT; + public long IDLE_TIMEOUT = DEFAULT_IDLE_TIMEOUT; /** * Maximum idle duration we will be allowed to use. - * @see Settings.Global#DEVICE_IDLE_CONSTANTS * @see #KEY_MAX_IDLE_TIMEOUT */ - public long MAX_IDLE_TIMEOUT; + public long MAX_IDLE_TIMEOUT = DEFAULT_MAX_IDLE_TIMEOUT; /** * Scaling factor to apply to current idle timeout each time we cycle through that state. - * @see Settings.Global#DEVICE_IDLE_CONSTANTS * @see #KEY_IDLE_FACTOR */ - public float IDLE_FACTOR; + public float IDLE_FACTOR = DEFAULT_IDLE_FACTOR; /** * This is the minimum time we will allow until the next upcoming alarm for us to * actually go in to idle mode. - * @see Settings.Global#DEVICE_IDLE_CONSTANTS * @see #KEY_MIN_TIME_TO_ALARM */ - public long MIN_TIME_TO_ALARM; + public long MIN_TIME_TO_ALARM = DEFAULT_MIN_TIME_TO_ALARM; /** * Max amount of time to temporarily whitelist an app when it receives a high priority * tickle. - * @see Settings.Global#DEVICE_IDLE_CONSTANTS + * * @see #KEY_MAX_TEMP_APP_WHITELIST_DURATION */ - public long MAX_TEMP_APP_WHITELIST_DURATION; + public long MAX_TEMP_APP_WHITELIST_DURATION = DEFAULT_MAX_TEMP_APP_WHITELIST_DURATION; /** * Amount of time we would like to whitelist an app that is receiving an MMS. - * @see Settings.Global#DEVICE_IDLE_CONSTANTS * @see #KEY_MMS_TEMP_APP_WHITELIST_DURATION */ - public long MMS_TEMP_APP_WHITELIST_DURATION; + public long MMS_TEMP_APP_WHITELIST_DURATION = DEFAULT_MMS_TEMP_APP_WHITELIST_DURATION; /** * Amount of time we would like to whitelist an app that is receiving an SMS. - * @see Settings.Global#DEVICE_IDLE_CONSTANTS * @see #KEY_SMS_TEMP_APP_WHITELIST_DURATION */ - public long SMS_TEMP_APP_WHITELIST_DURATION; + public long SMS_TEMP_APP_WHITELIST_DURATION = DEFAULT_SMS_TEMP_APP_WHITELIST_DURATION; /** * Amount of time we would like to whitelist an app that is handling a * {@link android.app.PendingIntent} triggered by a {@link android.app.Notification}. - * @see Settings.Global#DEVICE_IDLE_CONSTANTS - * @see #KEY_NOTIFICATION_ALLOWLIST_DURATION + * @see #KEY_NOTIFICATION_ALLOWLIST_DURATION_MS */ - public long NOTIFICATION_ALLOWLIST_DURATION; + public long NOTIFICATION_ALLOWLIST_DURATION_MS = DEFAULT_NOTIFICATION_ALLOWLIST_DURATION_MS; /** * Pre idle time factor use to make idle delay longer */ - public float PRE_IDLE_FACTOR_LONG; + public float PRE_IDLE_FACTOR_LONG = DEFAULT_PRE_IDLE_FACTOR_LONG; /** * Pre idle time factor use to make idle delay shorter */ - public float PRE_IDLE_FACTOR_SHORT; + public float PRE_IDLE_FACTOR_SHORT = DEFAULT_PRE_IDLE_FACTOR_SHORT; - public boolean WAIT_FOR_UNLOCK; + public boolean WAIT_FOR_UNLOCK = DEFAULT_WAIT_FOR_UNLOCK; - private final ContentResolver mResolver; private final boolean mSmallBatteryDevice; - private final KeyValueListParser mParser = new KeyValueListParser(','); - public Constants(Handler handler, ContentResolver resolver) { - super(handler); - mResolver = resolver; + public Constants() { mSmallBatteryDevice = ActivityManager.isSmallBatteryDevice(); - mResolver.registerContentObserver( - Settings.Global.getUriFor(Settings.Global.DEVICE_IDLE_CONSTANTS), - false, this); - updateConstants(); + if (mSmallBatteryDevice) { + INACTIVE_TIMEOUT = DEFAULT_INACTIVE_TIMEOUT_SMALL_BATTERY; + IDLE_AFTER_INACTIVE_TIMEOUT = DEFAULT_IDLE_AFTER_INACTIVE_TIMEOUT_SMALL_BATTERY; + } + DeviceConfig.addOnPropertiesChangedListener(DeviceConfig.NAMESPACE_DEVICE_IDLE, + JobSchedulerBackgroundThread.getExecutor(), this); + // Load all the constants. + onPropertiesChanged(DeviceConfig.getProperties(DeviceConfig.NAMESPACE_DEVICE_IDLE)); } - @Override - public void onChange(boolean selfChange, Uri uri) { - updateConstants(); - } - private void updateConstants() { + @Override + public void onPropertiesChanged(DeviceConfig.Properties properties) { synchronized (DeviceIdleController.this) { - try { - mParser.setString(Settings.Global.getString(mResolver, - Settings.Global.DEVICE_IDLE_CONSTANTS)); - } catch (IllegalArgumentException e) { - // Failed to parse the settings string, log this and move on - // with defaults. - Slog.e(TAG, "Bad device idle settings", e); + for (String name : properties.getKeyset()) { + if (name == null) { + continue; + } + switch (name) { + case KEY_LIGHT_IDLE_AFTER_INACTIVE_TIMEOUT: + LIGHT_IDLE_AFTER_INACTIVE_TIMEOUT = properties.getLong( + KEY_LIGHT_IDLE_AFTER_INACTIVE_TIMEOUT, + DEFAULT_LIGHT_IDLE_AFTER_INACTIVE_TIMEOUT); + break; + case KEY_LIGHT_PRE_IDLE_TIMEOUT: + LIGHT_PRE_IDLE_TIMEOUT = properties.getLong( + KEY_LIGHT_PRE_IDLE_TIMEOUT, DEFAULT_LIGHT_PRE_IDLE_TIMEOUT); + break; + case KEY_LIGHT_IDLE_TIMEOUT: + LIGHT_IDLE_TIMEOUT = properties.getLong( + KEY_LIGHT_IDLE_TIMEOUT, DEFAULT_LIGHT_IDLE_TIMEOUT); + break; + case KEY_LIGHT_IDLE_FACTOR: + LIGHT_IDLE_FACTOR = properties.getFloat( + KEY_LIGHT_IDLE_FACTOR, DEFAULT_LIGHT_IDLE_FACTOR); + break; + case KEY_LIGHT_MAX_IDLE_TIMEOUT: + LIGHT_MAX_IDLE_TIMEOUT = properties.getLong( + KEY_LIGHT_MAX_IDLE_TIMEOUT, DEFAULT_LIGHT_MAX_IDLE_TIMEOUT); + break; + case KEY_LIGHT_IDLE_MAINTENANCE_MIN_BUDGET: + LIGHT_IDLE_MAINTENANCE_MIN_BUDGET = properties.getLong( + KEY_LIGHT_IDLE_MAINTENANCE_MIN_BUDGET, + DEFAULT_LIGHT_IDLE_MAINTENANCE_MIN_BUDGET); + break; + case KEY_LIGHT_IDLE_MAINTENANCE_MAX_BUDGET: + LIGHT_IDLE_MAINTENANCE_MAX_BUDGET = properties.getLong( + KEY_LIGHT_IDLE_MAINTENANCE_MAX_BUDGET, + DEFAULT_LIGHT_IDLE_MAINTENANCE_MAX_BUDGET); + break; + case KEY_MIN_LIGHT_MAINTENANCE_TIME: + MIN_LIGHT_MAINTENANCE_TIME = properties.getLong( + KEY_MIN_LIGHT_MAINTENANCE_TIME, + DEFAULT_MIN_LIGHT_MAINTENANCE_TIME); + break; + case KEY_MIN_DEEP_MAINTENANCE_TIME: + MIN_DEEP_MAINTENANCE_TIME = properties.getLong( + KEY_MIN_DEEP_MAINTENANCE_TIME, + DEFAULT_MIN_DEEP_MAINTENANCE_TIME); + break; + case KEY_INACTIVE_TIMEOUT: + final long defaultInactiveTimeout = mSmallBatteryDevice + ? DEFAULT_INACTIVE_TIMEOUT_SMALL_BATTERY + : DEFAULT_INACTIVE_TIMEOUT; + INACTIVE_TIMEOUT = properties.getLong( + KEY_INACTIVE_TIMEOUT, defaultInactiveTimeout); + break; + case KEY_SENSING_TIMEOUT: + SENSING_TIMEOUT = properties.getLong( + KEY_SENSING_TIMEOUT, DEFAULT_SENSING_TIMEOUT); + break; + case KEY_LOCATING_TIMEOUT: + LOCATING_TIMEOUT = properties.getLong( + KEY_LOCATING_TIMEOUT, DEFAULT_LOCATING_TIMEOUT); + break; + case KEY_LOCATION_ACCURACY: + LOCATION_ACCURACY = properties.getFloat( + KEY_LOCATION_ACCURACY, DEFAULT_LOCATION_ACCURACY); + break; + case KEY_MOTION_INACTIVE_TIMEOUT: + MOTION_INACTIVE_TIMEOUT = properties.getLong( + KEY_MOTION_INACTIVE_TIMEOUT, DEFAULT_MOTION_INACTIVE_TIMEOUT); + break; + case KEY_IDLE_AFTER_INACTIVE_TIMEOUT: + final long defaultIdleAfterInactiveTimeout = mSmallBatteryDevice + ? DEFAULT_IDLE_AFTER_INACTIVE_TIMEOUT_SMALL_BATTERY + : DEFAULT_IDLE_AFTER_INACTIVE_TIMEOUT; + IDLE_AFTER_INACTIVE_TIMEOUT = properties.getLong( + KEY_IDLE_AFTER_INACTIVE_TIMEOUT, + defaultIdleAfterInactiveTimeout); + break; + case KEY_IDLE_PENDING_TIMEOUT: + IDLE_PENDING_TIMEOUT = properties.getLong( + KEY_IDLE_PENDING_TIMEOUT, DEFAULT_IDLE_PENDING_TIMEOUT); + break; + case KEY_MAX_IDLE_PENDING_TIMEOUT: + MAX_IDLE_PENDING_TIMEOUT = properties.getLong( + KEY_MAX_IDLE_PENDING_TIMEOUT, DEFAULT_MAX_IDLE_PENDING_TIMEOUT); + break; + case KEY_IDLE_PENDING_FACTOR: + IDLE_PENDING_FACTOR = properties.getFloat( + KEY_IDLE_PENDING_FACTOR, DEFAULT_IDLE_PENDING_FACTOR); + break; + case KEY_QUICK_DOZE_DELAY_TIMEOUT: + QUICK_DOZE_DELAY_TIMEOUT = properties.getLong( + KEY_QUICK_DOZE_DELAY_TIMEOUT, DEFAULT_QUICK_DOZE_DELAY_TIMEOUT); + break; + case KEY_IDLE_TIMEOUT: + IDLE_TIMEOUT = properties.getLong( + KEY_IDLE_TIMEOUT, DEFAULT_IDLE_TIMEOUT); + break; + case KEY_MAX_IDLE_TIMEOUT: + MAX_IDLE_TIMEOUT = properties.getLong( + KEY_MAX_IDLE_TIMEOUT, DEFAULT_MAX_IDLE_TIMEOUT); + break; + case KEY_IDLE_FACTOR: + IDLE_FACTOR = properties.getFloat(KEY_IDLE_FACTOR, DEFAULT_IDLE_FACTOR); + break; + case KEY_MIN_TIME_TO_ALARM: + MIN_TIME_TO_ALARM = properties.getLong( + KEY_MIN_TIME_TO_ALARM, DEFAULT_MIN_TIME_TO_ALARM); + break; + case KEY_MAX_TEMP_APP_WHITELIST_DURATION: + MAX_TEMP_APP_WHITELIST_DURATION = properties.getLong( + KEY_MAX_TEMP_APP_WHITELIST_DURATION, + DEFAULT_MAX_TEMP_APP_WHITELIST_DURATION); + break; + case KEY_MMS_TEMP_APP_WHITELIST_DURATION: + MMS_TEMP_APP_WHITELIST_DURATION = properties.getLong( + KEY_MMS_TEMP_APP_WHITELIST_DURATION, + DEFAULT_MMS_TEMP_APP_WHITELIST_DURATION); + break; + case KEY_SMS_TEMP_APP_WHITELIST_DURATION: + SMS_TEMP_APP_WHITELIST_DURATION = properties.getLong( + KEY_SMS_TEMP_APP_WHITELIST_DURATION, + DEFAULT_SMS_TEMP_APP_WHITELIST_DURATION); + break; + case KEY_NOTIFICATION_ALLOWLIST_DURATION_MS: + NOTIFICATION_ALLOWLIST_DURATION_MS = properties.getLong( + KEY_NOTIFICATION_ALLOWLIST_DURATION_MS, + DEFAULT_NOTIFICATION_ALLOWLIST_DURATION_MS); + break; + case KEY_WAIT_FOR_UNLOCK: + WAIT_FOR_UNLOCK = properties.getBoolean( + KEY_WAIT_FOR_UNLOCK, DEFAULT_WAIT_FOR_UNLOCK); + break; + case KEY_PRE_IDLE_FACTOR_LONG: + PRE_IDLE_FACTOR_LONG = properties.getFloat( + KEY_PRE_IDLE_FACTOR_LONG, DEFAULT_PRE_IDLE_FACTOR_LONG); + break; + case KEY_PRE_IDLE_FACTOR_SHORT: + PRE_IDLE_FACTOR_SHORT = properties.getFloat( + KEY_PRE_IDLE_FACTOR_SHORT, DEFAULT_PRE_IDLE_FACTOR_SHORT); + break; + default: + Slog.e(TAG, "Unknown configuration key: " + name); + break; + } } - - LIGHT_IDLE_AFTER_INACTIVE_TIMEOUT = mParser.getDurationMillis( - KEY_LIGHT_IDLE_AFTER_INACTIVE_TIMEOUT, - !COMPRESS_TIME ? 3 * 60 * 1000L : 15 * 1000L); - LIGHT_PRE_IDLE_TIMEOUT = mParser.getDurationMillis(KEY_LIGHT_PRE_IDLE_TIMEOUT, - !COMPRESS_TIME ? 3 * 60 * 1000L : 30 * 1000L); - LIGHT_IDLE_TIMEOUT = mParser.getDurationMillis(KEY_LIGHT_IDLE_TIMEOUT, - !COMPRESS_TIME ? 5 * 60 * 1000L : 15 * 1000L); - LIGHT_IDLE_FACTOR = mParser.getFloat(KEY_LIGHT_IDLE_FACTOR, - 2f); - LIGHT_MAX_IDLE_TIMEOUT = mParser.getDurationMillis(KEY_LIGHT_MAX_IDLE_TIMEOUT, - !COMPRESS_TIME ? 15 * 60 * 1000L : 60 * 1000L); - LIGHT_IDLE_MAINTENANCE_MIN_BUDGET = mParser.getDurationMillis( - KEY_LIGHT_IDLE_MAINTENANCE_MIN_BUDGET, - !COMPRESS_TIME ? 1 * 60 * 1000L : 15 * 1000L); - LIGHT_IDLE_MAINTENANCE_MAX_BUDGET = mParser.getDurationMillis( - KEY_LIGHT_IDLE_MAINTENANCE_MAX_BUDGET, - !COMPRESS_TIME ? 5 * 60 * 1000L : 30 * 1000L); - MIN_LIGHT_MAINTENANCE_TIME = mParser.getDurationMillis( - KEY_MIN_LIGHT_MAINTENANCE_TIME, - !COMPRESS_TIME ? 5 * 1000L : 1 * 1000L); - MIN_DEEP_MAINTENANCE_TIME = mParser.getDurationMillis( - KEY_MIN_DEEP_MAINTENANCE_TIME, - !COMPRESS_TIME ? 30 * 1000L : 5 * 1000L); - long inactiveTimeoutDefault = (mSmallBatteryDevice ? 15 : 30) * 60 * 1000L; - INACTIVE_TIMEOUT = mParser.getDurationMillis(KEY_INACTIVE_TIMEOUT, - !COMPRESS_TIME ? inactiveTimeoutDefault : (inactiveTimeoutDefault / 10)); - SENSING_TIMEOUT = mParser.getDurationMillis(KEY_SENSING_TIMEOUT, - !COMPRESS_TIME ? 4 * 60 * 1000L : 60 * 1000L); - LOCATING_TIMEOUT = mParser.getDurationMillis(KEY_LOCATING_TIMEOUT, - !COMPRESS_TIME ? 30 * 1000L : 15 * 1000L); - LOCATION_ACCURACY = mParser.getFloat(KEY_LOCATION_ACCURACY, 20); - MOTION_INACTIVE_TIMEOUT = mParser.getDurationMillis(KEY_MOTION_INACTIVE_TIMEOUT, - !COMPRESS_TIME ? 10 * 60 * 1000L : 60 * 1000L); - long idleAfterInactiveTimeout = (mSmallBatteryDevice ? 15 : 30) * 60 * 1000L; - IDLE_AFTER_INACTIVE_TIMEOUT = mParser.getDurationMillis( - KEY_IDLE_AFTER_INACTIVE_TIMEOUT, - !COMPRESS_TIME ? idleAfterInactiveTimeout - : (idleAfterInactiveTimeout / 10)); - IDLE_PENDING_TIMEOUT = mParser.getDurationMillis(KEY_IDLE_PENDING_TIMEOUT, - !COMPRESS_TIME ? 5 * 60 * 1000L : 30 * 1000L); - MAX_IDLE_PENDING_TIMEOUT = mParser.getDurationMillis(KEY_MAX_IDLE_PENDING_TIMEOUT, - !COMPRESS_TIME ? 10 * 60 * 1000L : 60 * 1000L); - IDLE_PENDING_FACTOR = mParser.getFloat(KEY_IDLE_PENDING_FACTOR, - 2f); - QUICK_DOZE_DELAY_TIMEOUT = mParser.getDurationMillis( - KEY_QUICK_DOZE_DELAY_TIMEOUT, !COMPRESS_TIME ? 60 * 1000L : 15 * 1000L); - IDLE_TIMEOUT = mParser.getDurationMillis(KEY_IDLE_TIMEOUT, - !COMPRESS_TIME ? 60 * 60 * 1000L : 6 * 60 * 1000L); - MAX_IDLE_TIMEOUT = mParser.getDurationMillis(KEY_MAX_IDLE_TIMEOUT, - !COMPRESS_TIME ? 6 * 60 * 60 * 1000L : 30 * 60 * 1000L); - IDLE_FACTOR = mParser.getFloat(KEY_IDLE_FACTOR, - 2f); - MIN_TIME_TO_ALARM = mParser.getDurationMillis(KEY_MIN_TIME_TO_ALARM, - !COMPRESS_TIME ? 30 * 60 * 1000L : 6 * 60 * 1000L); - MAX_TEMP_APP_WHITELIST_DURATION = mParser.getDurationMillis( - KEY_MAX_TEMP_APP_WHITELIST_DURATION, 5 * 60 * 1000L); - MMS_TEMP_APP_WHITELIST_DURATION = mParser.getDurationMillis( - KEY_MMS_TEMP_APP_WHITELIST_DURATION, 60 * 1000L); - SMS_TEMP_APP_WHITELIST_DURATION = mParser.getDurationMillis( - KEY_SMS_TEMP_APP_WHITELIST_DURATION, 20 * 1000L); - NOTIFICATION_ALLOWLIST_DURATION = mParser.getDurationMillis( - KEY_NOTIFICATION_ALLOWLIST_DURATION, 30 * 1000L); - WAIT_FOR_UNLOCK = mParser.getBoolean(KEY_WAIT_FOR_UNLOCK, true); - PRE_IDLE_FACTOR_LONG = mParser.getFloat(KEY_PRE_IDLE_FACTOR_LONG, 1.67f); - PRE_IDLE_FACTOR_SHORT = mParser.getFloat(KEY_PRE_IDLE_FACTOR_SHORT, 0.33f); } } void dump(PrintWriter pw) { pw.println(" Settings:"); - pw.print(" "); pw.print(KEY_LIGHT_IDLE_AFTER_INACTIVE_TIMEOUT); pw.print("="); + pw.print(" "); + pw.print(KEY_LIGHT_IDLE_AFTER_INACTIVE_TIMEOUT); + pw.print("="); TimeUtils.formatDuration(LIGHT_IDLE_AFTER_INACTIVE_TIMEOUT, pw); pw.println(); @@ -1344,8 +1447,8 @@ public class DeviceIdleController extends SystemService TimeUtils.formatDuration(SMS_TEMP_APP_WHITELIST_DURATION, pw); pw.println(); - pw.print(" "); pw.print(KEY_NOTIFICATION_ALLOWLIST_DURATION); pw.print("="); - TimeUtils.formatDuration(NOTIFICATION_ALLOWLIST_DURATION, pw); + pw.print(" "); pw.print(KEY_NOTIFICATION_ALLOWLIST_DURATION_MS); pw.print("="); + TimeUtils.formatDuration(NOTIFICATION_ALLOWLIST_DURATION_MS, pw); pw.println(); pw.print(" "); pw.print(KEY_WAIT_FOR_UNLOCK); pw.print("="); @@ -1794,7 +1897,7 @@ public class DeviceIdleController extends SystemService // duration in milliseconds @Override public long getNotificationAllowlistDuration() { - return mConstants.NOTIFICATION_ALLOWLIST_DURATION; + return mConstants.NOTIFICATION_ALLOWLIST_DURATION_MS; } @Override @@ -1871,10 +1974,9 @@ public class DeviceIdleController extends SystemService return mConnectivityManager; } - Constants getConstants(DeviceIdleController controller, Handler handler, - ContentResolver resolver) { + Constants getConstants(DeviceIdleController controller) { if (mConstants == null) { - mConstants = controller.new Constants(handler, resolver); + mConstants = controller.new Constants(); } return mConstants; } @@ -2023,7 +2125,7 @@ public class DeviceIdleController extends SystemService } } - mConstants = mInjector.getConstants(this, mHandler, getContext().getContentResolver()); + mConstants = mInjector.getConstants(this); readConfigFileLocked(); updateWhitelistAppIdsLocked(); diff --git a/apex/jobscheduler/service/java/com/android/server/job/controllers/ConnectivityController.java b/apex/jobscheduler/service/java/com/android/server/job/controllers/ConnectivityController.java index f1c624d1d9f5..67997cf31501 100644 --- a/apex/jobscheduler/service/java/com/android/server/job/controllers/ConnectivityController.java +++ b/apex/jobscheduler/service/java/com/android/server/job/controllers/ConnectivityController.java @@ -22,6 +22,7 @@ import static android.net.NetworkCapabilities.NET_CAPABILITY_NOT_METERED; import static com.android.server.job.JobSchedulerService.RESTRICTED_INDEX; +import android.annotation.Nullable; import android.app.job.JobInfo; import android.net.ConnectivityManager; import android.net.ConnectivityManager.NetworkCallback; @@ -86,9 +87,12 @@ public final class ConnectivityController extends RestrictingController implemen @GuardedBy("mLock") private final SparseArray<ArraySet<JobStatus>> mRequestedWhitelistJobs = new SparseArray<>(); - /** List of currently available networks. */ + /** + * Set of currently available networks mapped to their latest network capabilities. Cache the + * latest capabilities to avoid unnecessary calls into ConnectivityManager. + */ @GuardedBy("mLock") - private final ArraySet<Network> mAvailableNetworks = new ArraySet<>(); + private final ArrayMap<Network, NetworkCapabilities> mAvailableNetworks = new ArrayMap<>(); private static final int MSG_DATA_SAVER_TOGGLED = 0; private static final int MSG_UID_RULES_CHANGES = 1; @@ -165,9 +169,8 @@ public final class ConnectivityController extends RestrictingController implemen public boolean isNetworkAvailable(JobStatus job) { synchronized (mLock) { for (int i = 0; i < mAvailableNetworks.size(); ++i) { - final Network network = mAvailableNetworks.valueAt(i); - final NetworkCapabilities capabilities = mConnManager.getNetworkCapabilities( - network); + final Network network = mAvailableNetworks.keyAt(i); + final NetworkCapabilities capabilities = mAvailableNetworks.valueAt(i); final boolean satisfied = isSatisfied(job, network, capabilities, mConstants); if (DEBUG) { Slog.v(TAG, "isNetworkAvailable(" + job + ") with network " + network @@ -427,9 +430,33 @@ public final class ConnectivityController extends RestrictingController implemen return false; } + @Nullable + private NetworkCapabilities getNetworkCapabilities(@Nullable Network network) { + if (network == null) { + return null; + } + synchronized (mLock) { + // There is technically a race here if the Network object is reused. This can happen + // only if that Network disconnects and the auto-incrementing network ID in + // ConnectivityService wraps. This should no longer be a concern if/when we only make + // use of asynchronous calls. + if (mAvailableNetworks.get(network) != null) { + return mAvailableNetworks.get(network); + } + + // This should almost never happen because any time a new network connects, the + // NetworkCallback would populate mAvailableNetworks. However, it's currently necessary + // because we also call synchronous methods such as getActiveNetworkForUid. + // TODO(134978280): remove after switching to callback-based APIs + final NetworkCapabilities capabilities = mConnManager.getNetworkCapabilities(network); + mAvailableNetworks.put(network, capabilities); + return capabilities; + } + } + private boolean updateConstraintsSatisfied(JobStatus jobStatus) { final Network network = mConnManager.getActiveNetworkForUid(jobStatus.getSourceUid()); - final NetworkCapabilities capabilities = mConnManager.getNetworkCapabilities(network); + final NetworkCapabilities capabilities = getNetworkCapabilities(network); return updateConstraintsSatisfied(jobStatus, network, capabilities); } @@ -470,19 +497,13 @@ public final class ConnectivityController extends RestrictingController implemen */ private void updateTrackedJobs(int filterUid, Network filterNetwork) { synchronized (mLock) { - // Since this is a really hot codepath, temporarily cache any - // answers that we get from ConnectivityManager. - final ArrayMap<Network, NetworkCapabilities> networkToCapabilities = new ArrayMap<>(); - boolean changed = false; if (filterUid == -1) { for (int i = mTrackedJobs.size() - 1; i >= 0; i--) { - changed |= updateTrackedJobsLocked(mTrackedJobs.valueAt(i), - filterNetwork, networkToCapabilities); + changed |= updateTrackedJobsLocked(mTrackedJobs.valueAt(i), filterNetwork); } } else { - changed = updateTrackedJobsLocked(mTrackedJobs.get(filterUid), - filterNetwork, networkToCapabilities); + changed = updateTrackedJobsLocked(mTrackedJobs.get(filterUid), filterNetwork); } if (changed) { mStateChangedListener.onControllerStateChanged(); @@ -490,18 +511,13 @@ public final class ConnectivityController extends RestrictingController implemen } } - private boolean updateTrackedJobsLocked(ArraySet<JobStatus> jobs, Network filterNetwork, - ArrayMap<Network, NetworkCapabilities> networkToCapabilities) { + private boolean updateTrackedJobsLocked(ArraySet<JobStatus> jobs, Network filterNetwork) { if (jobs == null || jobs.size() == 0) { return false; } final Network network = mConnManager.getActiveNetworkForUid(jobs.valueAt(0).getSourceUid()); - NetworkCapabilities capabilities = networkToCapabilities.get(network); - if (capabilities == null) { - capabilities = mConnManager.getNetworkCapabilities(network); - networkToCapabilities.put(network, capabilities); - } + final NetworkCapabilities capabilities = getNetworkCapabilities(network); final boolean networkMatch = (filterNetwork == null || Objects.equals(filterNetwork, network)); @@ -544,9 +560,9 @@ public final class ConnectivityController extends RestrictingController implemen @Override public void onAvailable(Network network) { if (DEBUG) Slog.v(TAG, "onAvailable: " + network); - synchronized (mLock) { - mAvailableNetworks.add(network); - } + // Documentation says not to call getNetworkCapabilities here but wait for + // onCapabilitiesChanged instead. onCapabilitiesChanged should be called immediately + // after this, so no need to update mAvailableNetworks here. } @Override @@ -554,6 +570,9 @@ public final class ConnectivityController extends RestrictingController implemen if (DEBUG) { Slog.v(TAG, "onCapabilitiesChanged: " + network); } + synchronized (mLock) { + mAvailableNetworks.put(network, capabilities); + } updateTrackedJobs(-1, network); } @@ -630,6 +649,8 @@ public final class ConnectivityController extends RestrictingController implemen pw.println("Available networks:"); pw.increaseIndent(); for (int i = 0; i < mAvailableNetworks.size(); i++) { + pw.print(mAvailableNetworks.keyAt(i)); + pw.print(": "); pw.println(mAvailableNetworks.valueAt(i)); } pw.decreaseIndent(); @@ -667,7 +688,7 @@ public final class ConnectivityController extends RestrictingController implemen mRequestedWhitelistJobs.keyAt(i)); } for (int i = 0; i < mAvailableNetworks.size(); i++) { - Network network = mAvailableNetworks.valueAt(i); + Network network = mAvailableNetworks.keyAt(i); if (network != null) { network.dumpDebug(proto, StateControllerProto.ConnectivityController.AVAILABLE_NETWORKS); diff --git a/apex/media/framework/Android.bp b/apex/media/framework/Android.bp index 4417b681efc3..ce4b030467a7 100644 --- a/apex/media/framework/Android.bp +++ b/apex/media/framework/Android.bp @@ -44,7 +44,6 @@ java_library { plugins: ["java_api_finder"], hostdex: true, // for hiddenapi check - visibility: ["//frameworks/av/apex:__subpackages__"], apex_available: [ "com.android.media", "test_com.android.media", @@ -83,7 +82,7 @@ filegroup { "java/android/media/MediaParser.java" ], path: "java", -} +} java_sdk_library { name: "framework-media", @@ -99,15 +98,7 @@ java_sdk_library { libs: [ "framework_media_annotation", ], - - // Allow access to the stubs from anywhere. - visibility: ["//visibility:public"], - - // Restrict access to implementation library. - impl_library_visibility: [ - "//visibility:override", // Ignore the visibility property. - "//frameworks/av/apex:__subpackages__", - ], + impl_library_visibility: ["//frameworks/av/apex:__subpackages__"], } diff --git a/apex/permission/framework/Android.bp b/apex/permission/framework/Android.bp index be553feb1d34..c0560f61460f 100644 --- a/apex/permission/framework/Android.bp +++ b/apex/permission/framework/Android.bp @@ -25,14 +25,8 @@ java_sdk_library { name: "framework-permission", defaults: ["framework-module-defaults"], - // Allow access to the stubs from anywhere. - visibility: ["//visibility:public"], - // Restrict access to implementation library. - impl_library_visibility: [ - "//visibility:override", // Ignore the visibility property. - "//frameworks/base/apex/permission:__subpackages__", - ], + impl_library_visibility: ["//frameworks/base/apex/permission:__subpackages__"], srcs: [ ":framework-permission-sources", diff --git a/apex/permission/service/Android.bp b/apex/permission/service/Android.bp index 7f3187949712..b7d843352d8e 100644 --- a/apex/permission/service/Android.bp +++ b/apex/permission/service/Android.bp @@ -23,15 +23,7 @@ filegroup { java_sdk_library { name: "service-permission", defaults: ["framework-system-server-module-defaults"], - visibility: [ - "//frameworks/base/services/core", - "//frameworks/base/apex/permission", - "//frameworks/base/apex/permission/testing", - "//frameworks/base/apex/permission/tests", - "//frameworks/base/services/tests/mockingservicestests", - ], impl_library_visibility: [ - "//visibility:override", "//frameworks/base/apex/permission/tests", "//frameworks/base/services/tests/mockingservicestests", "//frameworks/base/services/tests/servicestests", diff --git a/apex/statsd/Android.bp b/apex/statsd/Android.bp index e75fa88c54fe..ede8852c5905 100644 --- a/apex/statsd/Android.bp +++ b/apex/statsd/Android.bp @@ -19,8 +19,10 @@ apex { } apex_defaults { - native_shared_libs: [ + jni_libs: [ "libstats_jni", + ], + native_shared_libs: [ "libstatspull", "libstatssocket", ], diff --git a/apex/statsd/framework/Android.bp b/apex/statsd/framework/Android.bp index b06f4019b480..bf4323ddfb0b 100644 --- a/apex/statsd/framework/Android.bp +++ b/apex/statsd/framework/Android.bp @@ -72,19 +72,7 @@ java_sdk_library { hostdex: true, // for hiddenapi check - visibility: [ - "//frameworks/base", // Framework - "//frameworks/base/apex/statsd:__subpackages__", // statsd apex - "//frameworks/base/packages/Tethering", // Tethering - "//frameworks/opt/net/wifi/service", // wifi service - "//packages/providers/MediaProvider", // MediaProvider apk - ], - - // Restrict access to implementation library. - impl_library_visibility: [ - "//visibility:override", // Ignore the visibility property. - "//frameworks/base/apex/statsd:__subpackages__", // statsd apex - ], + impl_library_visibility: ["//frameworks/base/apex/statsd/framework/test:__subpackages__"], apex_available: [ "com.android.os.statsd", diff --git a/api/current.txt b/api/current.txt index a1629f1a937e..e83450136aa4 100644 --- a/api/current.txt +++ b/api/current.txt @@ -1005,7 +1005,7 @@ package android { field public static final int numericModifiers = 16844111; // 0x101054f field public static final int numericShortcut = 16843236; // 0x10101e4 field public static final int offset = 16844052; // 0x1010514 - field public static final int onClick = 16843375; // 0x101026f + field @Deprecated public static final int onClick = 16843375; // 0x101026f field public static final int oneshot = 16843159; // 0x1010197 field public static final int opacity = 16843550; // 0x101031e field public static final int opticalInsetBottom = 16844171; // 0x101058b @@ -6188,6 +6188,7 @@ package android.app { method public android.app.PictureInPictureParams build(); method public android.app.PictureInPictureParams.Builder setActions(java.util.List<android.app.RemoteAction>); method public android.app.PictureInPictureParams.Builder setAspectRatio(android.util.Rational); + method @NonNull public android.app.PictureInPictureParams.Builder setAutoEnterAllowed(boolean); method public android.app.PictureInPictureParams.Builder setSourceRectHint(android.graphics.Rect); } @@ -31737,6 +31738,7 @@ package android.net.wifi.aware { method public void onPublishStarted(@NonNull android.net.wifi.aware.PublishDiscoverySession); method public void onServiceDiscovered(android.net.wifi.aware.PeerHandle, byte[], java.util.List<byte[]>); method public void onServiceDiscoveredWithinRange(android.net.wifi.aware.PeerHandle, byte[], java.util.List<byte[]>, int); + method public void onServiceLost(@NonNull android.net.wifi.aware.PeerHandle); method public void onSessionConfigFailed(); method public void onSessionConfigUpdated(); method public void onSessionTerminated(); @@ -48399,7 +48401,8 @@ package android.telephony { method public boolean isVoiceCapable(); method public boolean isVoicemailVibrationEnabled(android.telecom.PhoneAccountHandle); method public boolean isWorldPhone(); - method public void listen(android.telephony.PhoneStateListener, int); + method @Deprecated public void listen(android.telephony.PhoneStateListener, int); + method public void listen(long, @NonNull android.telephony.PhoneStateListener); method @RequiresPermission(android.Manifest.permission.ACCESS_FINE_LOCATION) public void requestCellInfoUpdate(@NonNull java.util.concurrent.Executor, @NonNull android.telephony.TelephonyManager.CellInfoCallback); method @RequiresPermission(allOf={android.Manifest.permission.MODIFY_PHONE_STATE, android.Manifest.permission.ACCESS_FINE_LOCATION}) public android.telephony.NetworkScan requestNetworkScan(android.telephony.NetworkScanRequest, java.util.concurrent.Executor, android.telephony.TelephonyScanManager.NetworkScanCallback); method public void sendDialerSpecialCode(String); diff --git a/api/module-lib-current.txt b/api/module-lib-current.txt index 17545a469cb8..73511c0f5b87 100644 --- a/api/module-lib-current.txt +++ b/api/module-lib-current.txt @@ -42,6 +42,10 @@ package android.media { package android.media.session { + public static final class MediaController.PlaybackInfo implements android.os.Parcelable { + ctor public MediaController.PlaybackInfo(int, int, @IntRange(from=0) int, @IntRange(from=0) int, @NonNull android.media.AudioAttributes, @Nullable String); + } + public final class MediaSession { field public static final int FLAG_EXCLUSIVE_GLOBAL_PRIORITY = 65536; // 0x10000 } @@ -129,6 +133,14 @@ package android.os { } +package android.provider { + + public final class DeviceConfig { + field public static final String NAMESPACE_DEVICE_IDLE = "device_idle"; + } + +} + package android.util { public class AtomicFile { diff --git a/api/system-current.txt b/api/system-current.txt index dbe2e318a7ba..c3e56643a805 100755 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -4334,11 +4334,8 @@ package android.media { field @RequiresPermission(android.Manifest.permission.CAPTURE_AUDIO_OUTPUT) public static final int RADIO_TUNER = 1998; // 0x7ce } - public final class MediaTranscodeManager implements java.lang.AutoCloseable { - method public void close(); + public final class MediaTranscodeManager { method @NonNull public android.media.MediaTranscodeManager.TranscodingJob enqueueRequest(@NonNull android.media.MediaTranscodeManager.TranscodingRequest, @NonNull java.util.concurrent.Executor, @NonNull android.media.MediaTranscodeManager.OnTranscodingFinishedListener) throws java.io.FileNotFoundException; - method protected void finalize(); - field public static final int PRIORITY_OFFLINE = 2; // 0x2 field public static final int PRIORITY_REALTIME = 1; // 0x1 field public static final int TRANSCODING_TYPE_VIDEO = 1; // 0x1 } @@ -4367,7 +4364,7 @@ package android.media { } @java.lang.FunctionalInterface public static interface MediaTranscodeManager.TranscodingJob.OnProgressUpdateListener { - method public void onProgressUpdate(@IntRange(from=0, to=100) int); + method public void onProgressUpdate(@NonNull android.media.MediaTranscodeManager.TranscodingJob, @IntRange(from=0, to=100) int); } public static final class MediaTranscodeManager.TranscodingRequest { @@ -10876,6 +10873,7 @@ package android.telephony { method @Deprecated public void onOutgoingEmergencyCall(@NonNull android.telephony.emergency.EmergencyNumber); method public void onOutgoingEmergencyCall(@NonNull android.telephony.emergency.EmergencyNumber, int); method public void onOutgoingEmergencySms(@NonNull android.telephony.emergency.EmergencyNumber); + method public void onPhysicalChannelConfigurationChanged(@NonNull java.util.List<android.telephony.PhysicalChannelConfig>); method @RequiresPermission("android.permission.READ_PRECISE_PHONE_STATE") public void onPreciseCallStateChanged(@NonNull android.telephony.PreciseCallState); method public void onRadioPowerStateChanged(int); method public void onSrvccStateChanged(int); @@ -10883,12 +10881,29 @@ package android.telephony { field @RequiresPermission("android.permission.READ_PRECISE_PHONE_STATE") public static final int LISTEN_CALL_ATTRIBUTES_CHANGED = 67108864; // 0x4000000 field @RequiresPermission(android.Manifest.permission.READ_ACTIVE_EMERGENCY_SESSION) public static final int LISTEN_OUTGOING_EMERGENCY_CALL = 268435456; // 0x10000000 field @RequiresPermission(android.Manifest.permission.READ_ACTIVE_EMERGENCY_SESSION) public static final int LISTEN_OUTGOING_EMERGENCY_SMS = 536870912; // 0x20000000 + field @RequiresPermission(android.Manifest.permission.READ_PRECISE_PHONE_STATE) public static final long LISTEN_PHYSICAL_CHANNEL_CONFIGURATION = 4294967296L; // 0x100000000L field @RequiresPermission("android.permission.READ_PRECISE_PHONE_STATE") public static final int LISTEN_PRECISE_CALL_STATE = 2048; // 0x800 field @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public static final int LISTEN_RADIO_POWER_STATE_CHANGED = 8388608; // 0x800000 field @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public static final int LISTEN_SRVCC_STATE_CHANGED = 16384; // 0x4000 field @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public static final int LISTEN_VOICE_ACTIVATION_STATE = 131072; // 0x20000 } + public final class PhysicalChannelConfig implements android.os.Parcelable { + method public int describeContents(); + method public int getCellBandwidthDownlink(); + method public int getChannelNumber(); + method public int getConnectionStatus(); + method public int getNetworkType(); + method @IntRange(from=0, to=1007) public int getPhysicalCellId(); + method public void writeToParcel(@NonNull android.os.Parcel, int); + field public static final int CHANNEL_NUMBER_UNKNOWN = -1; // 0xffffffff + field public static final int CONNECTION_PRIMARY_SERVING = 1; // 0x1 + field public static final int CONNECTION_SECONDARY_SERVING = 2; // 0x2 + field public static final int CONNECTION_UNKNOWN = -1; // 0xffffffff + field @NonNull public static final android.os.Parcelable.Creator<android.telephony.PhysicalChannelConfig> CREATOR; + field public static final int PHYSICAL_CELL_ID_UNKNOWN = -1; // 0xffffffff + } + public final class PreciseCallState implements android.os.Parcelable { ctor public PreciseCallState(int, int, int, int, int); method public int describeContents(); diff --git a/api/test-current.txt b/api/test-current.txt index 2dd740924275..1aa3db6963b7 100644 --- a/api/test-current.txt +++ b/api/test-current.txt @@ -1819,11 +1819,8 @@ package android.media { method @NonNull public String getOriginalId(); } - public final class MediaTranscodeManager implements java.lang.AutoCloseable { - method public void close(); + public final class MediaTranscodeManager { method @NonNull public android.media.MediaTranscodeManager.TranscodingJob enqueueRequest(@NonNull android.media.MediaTranscodeManager.TranscodingRequest, @NonNull java.util.concurrent.Executor, @NonNull android.media.MediaTranscodeManager.OnTranscodingFinishedListener) throws java.io.FileNotFoundException; - method protected void finalize(); - field public static final int PRIORITY_OFFLINE = 2; // 0x2 field public static final int PRIORITY_REALTIME = 1; // 0x1 field public static final int TRANSCODING_TYPE_VIDEO = 1; // 0x1 } @@ -1852,7 +1849,7 @@ package android.media { } @java.lang.FunctionalInterface public static interface MediaTranscodeManager.TranscodingJob.OnProgressUpdateListener { - method public void onProgressUpdate(@IntRange(from=0, to=100) int); + method public void onProgressUpdate(@NonNull android.media.MediaTranscodeManager.TranscodingJob, @IntRange(from=0, to=100) int); } public static final class MediaTranscodeManager.TranscodingRequest { @@ -3294,6 +3291,7 @@ package android.provider { field public static final String NAMESPACE_AUTOFILL = "autofill"; field public static final String NAMESPACE_BIOMETRICS = "biometrics"; field public static final String NAMESPACE_CONTENT_CAPTURE = "content_capture"; + field public static final String NAMESPACE_DEVICE_IDLE = "device_idle"; field public static final String NAMESPACE_JOB_SCHEDULER = "jobscheduler"; field public static final String NAMESPACE_PERMISSIONS = "permissions"; field public static final String NAMESPACE_PRIVACY = "privacy"; @@ -5623,18 +5621,18 @@ package android.window { public class TaskOrganizer extends android.window.WindowOrganizer { ctor public TaskOrganizer(); - method @Nullable @RequiresPermission(android.Manifest.permission.MANAGE_ACTIVITY_STACKS) public static android.app.ActivityManager.RunningTaskInfo createRootTask(int, int); - method @RequiresPermission(android.Manifest.permission.MANAGE_ACTIVITY_STACKS) public static boolean deleteRootTask(@NonNull android.window.WindowContainerToken); - method @Nullable @RequiresPermission(android.Manifest.permission.MANAGE_ACTIVITY_STACKS) public static java.util.List<android.app.ActivityManager.RunningTaskInfo> getChildTasks(@NonNull android.window.WindowContainerToken, @NonNull int[]); - method @Nullable @RequiresPermission(android.Manifest.permission.MANAGE_ACTIVITY_STACKS) public static android.window.WindowContainerToken getImeTarget(int); - method @Nullable @RequiresPermission(android.Manifest.permission.MANAGE_ACTIVITY_STACKS) public static java.util.List<android.app.ActivityManager.RunningTaskInfo> getRootTasks(int, @NonNull int[]); + method @Nullable @RequiresPermission(android.Manifest.permission.MANAGE_ACTIVITY_STACKS) public android.app.ActivityManager.RunningTaskInfo createRootTask(int, int); + method @RequiresPermission(android.Manifest.permission.MANAGE_ACTIVITY_STACKS) public boolean deleteRootTask(@NonNull android.window.WindowContainerToken); + method @Nullable @RequiresPermission(android.Manifest.permission.MANAGE_ACTIVITY_STACKS) public java.util.List<android.app.ActivityManager.RunningTaskInfo> getChildTasks(@NonNull android.window.WindowContainerToken, @NonNull int[]); + method @Nullable @RequiresPermission(android.Manifest.permission.MANAGE_ACTIVITY_STACKS) public android.window.WindowContainerToken getImeTarget(int); + method @Nullable @RequiresPermission(android.Manifest.permission.MANAGE_ACTIVITY_STACKS) public java.util.List<android.app.ActivityManager.RunningTaskInfo> getRootTasks(int, @NonNull int[]); method @BinderThread public void onBackPressedOnTaskRoot(@NonNull android.app.ActivityManager.RunningTaskInfo); method @BinderThread public void onTaskAppeared(@NonNull android.app.ActivityManager.RunningTaskInfo, @NonNull android.view.SurfaceControl); method @BinderThread public void onTaskInfoChanged(@NonNull android.app.ActivityManager.RunningTaskInfo); method @BinderThread public void onTaskVanished(@NonNull android.app.ActivityManager.RunningTaskInfo); method @RequiresPermission(android.Manifest.permission.MANAGE_ACTIVITY_STACKS) public final void registerOrganizer(); method @RequiresPermission(android.Manifest.permission.MANAGE_ACTIVITY_STACKS) public void setInterceptBackPressedOnTaskRoot(@NonNull android.window.WindowContainerToken, boolean); - method @RequiresPermission(android.Manifest.permission.MANAGE_ACTIVITY_STACKS) public static void setLaunchRoot(int, @NonNull android.window.WindowContainerToken); + method @RequiresPermission(android.Manifest.permission.MANAGE_ACTIVITY_STACKS) public void setLaunchRoot(int, @NonNull android.window.WindowContainerToken); method @RequiresPermission(android.Manifest.permission.MANAGE_ACTIVITY_STACKS) public final void unregisterOrganizer(); } @@ -5671,7 +5669,7 @@ package android.window { public class WindowOrganizer { ctor public WindowOrganizer(); method @RequiresPermission(android.Manifest.permission.MANAGE_ACTIVITY_STACKS) public int applySyncTransaction(@NonNull android.window.WindowContainerTransaction, @NonNull android.window.WindowContainerTransactionCallback); - method @RequiresPermission(android.Manifest.permission.MANAGE_ACTIVITY_STACKS) public static void applyTransaction(@NonNull android.window.WindowContainerTransaction); + method @RequiresPermission(android.Manifest.permission.MANAGE_ACTIVITY_STACKS) public void applyTransaction(@NonNull android.window.WindowContainerTransaction); } } diff --git a/cmds/hid/jni/com_android_commands_hid_Device.cpp b/cmds/hid/jni/com_android_commands_hid_Device.cpp index 1e200c52a207..437a87e8df54 100644 --- a/cmds/hid/jni/com_android_commands_hid_Device.cpp +++ b/cmds/hid/jni/com_android_commands_hid_Device.cpp @@ -27,9 +27,9 @@ #include <cstring> #include <memory> -#include <android/log.h> #include <android/looper.h> #include <jni.h> +#include <log/log.h> #include <nativehelper/JNIHelp.h> #include <nativehelper/ScopedLocalRef.h> #include <nativehelper/ScopedPrimitiveArray.h> @@ -37,10 +37,8 @@ #include <android-base/stringprintf.h> -#define LOGE(...) __android_log_print(ANDROID_LOG_ERROR,LOG_TAG,__VA_ARGS__) -#define LOGW(...) __android_log_print(ANDROID_LOG_WARN,LOG_TAG,__VA_ARGS__) -#define LOGD(...) __android_log_print(ANDROID_LOG_DEBUG,LOG_TAG,__VA_ARGS__) -#define LOGI(...) __android_log_print(ANDROID_LOG_INFO,LOG_TAG,__VA_ARGS__) +// Log debug messages about the output. +static constexpr bool DEBUG_OUTPUT = false; namespace android { namespace uhid { @@ -61,7 +59,7 @@ static int handleLooperEvents(int /* fd */, int events, void* data) { static void checkAndClearException(JNIEnv* env, const char* methodName) { if (env->ExceptionCheck()) { - LOGE("An exception was thrown by callback '%s'.", methodName); + ALOGE("An exception was thrown by callback '%s'.", methodName); env->ExceptionClear(); } } @@ -115,9 +113,9 @@ void DeviceCallback::onDeviceGetReport(uint32_t requestId, uint8_t reportId) { checkAndClearException(env, "onDeviceGetReport"); } -void DeviceCallback::onDeviceOutput(const std::vector<uint8_t>& data) { +void DeviceCallback::onDeviceOutput(uint8_t rType, const std::vector<uint8_t>& data) { JNIEnv* env = getJNIEnv(); - env->CallVoidMethod(mCallbackObject, gDeviceCallbackClassInfo.onDeviceOutput, + env->CallVoidMethod(mCallbackObject, gDeviceCallbackClassInfo.onDeviceOutput, rType, toJbyteArray(env, data).get()); checkAndClearException(env, "onDeviceOutput"); } @@ -133,13 +131,13 @@ std::unique_ptr<Device> Device::open(int32_t id, const char* name, int32_t vid, std::unique_ptr<DeviceCallback> callback) { size_t size = descriptor.size(); if (size > HID_MAX_DESCRIPTOR_SIZE) { - LOGE("Received invalid hid report with descriptor size %zu, skipping", size); + ALOGE("Received invalid hid report with descriptor size %zu, skipping", size); return nullptr; } android::base::unique_fd fd(::open(UHID_PATH, O_RDWR | O_CLOEXEC)); if (!fd.ok()) { - LOGE("Failed to open uhid: %s", strerror(errno)); + ALOGE("Failed to open uhid: %s", strerror(errno)); return nullptr; } @@ -159,14 +157,14 @@ std::unique_ptr<Device> Device::open(int32_t id, const char* name, int32_t vid, errno = 0; ssize_t ret = TEMP_FAILURE_RETRY(::write(fd, &ev, sizeof(ev))); if (ret < 0 || ret != sizeof(ev)) { - LOGE("Failed to create uhid node: %s", strerror(errno)); + ALOGE("Failed to create uhid node: %s", strerror(errno)); return nullptr; } // Wait for the device to actually be created. ret = TEMP_FAILURE_RETRY(::read(fd, &ev, sizeof(ev))); if (ret < 0 || ev.type != UHID_START) { - LOGE("uhid node failed to start: %s", strerror(errno)); + ALOGE("uhid node failed to start: %s", strerror(errno)); return nullptr; } // using 'new' to access non-public constructor @@ -177,7 +175,7 @@ Device::Device(int32_t id, android::base::unique_fd fd, std::unique_ptr<DeviceCa : mId(id), mFd(std::move(fd)), mDeviceCallback(std::move(callback)) { ALooper* aLooper = ALooper_forThread(); if (aLooper == NULL) { - LOGE("Could not get ALooper, ALooper_forThread returned NULL"); + ALOGE("Could not get ALooper, ALooper_forThread returned NULL"); aLooper = ALooper_prepare(ALOOPER_PREPARE_ALLOW_NON_CALLBACKS); } ALooper_addFd(aLooper, mFd, 0, ALOOPER_EVENT_INPUT, handleLooperEvents, @@ -189,7 +187,7 @@ Device::~Device() { if (looper != NULL) { ALooper_removeFd(looper, mFd); } else { - LOGE("Could not remove fd, ALooper_forThread() returned NULL!"); + ALOGE("Could not remove fd, ALooper_forThread() returned NULL!"); } struct uhid_event ev = {}; ev.type = UHID_DESTROY; @@ -200,13 +198,13 @@ Device::~Device() { static void writeEvent(int fd, struct uhid_event& ev, const char* messageType) { ssize_t ret = TEMP_FAILURE_RETRY(::write(fd, &ev, sizeof(ev))); if (ret < 0 || ret != sizeof(ev)) { - LOGE("Failed to send uhid_event %s: %s", messageType, strerror(errno)); + ALOGE("Failed to send uhid_event %s: %s", messageType, strerror(errno)); } } void Device::sendReport(const std::vector<uint8_t>& report) const { if (report.size() > UHID_DATA_MAX) { - LOGE("Received invalid report of size %zu, skipping", report.size()); + ALOGE("Received invalid report of size %zu, skipping", report.size()); return; } @@ -230,14 +228,14 @@ void Device::sendGetFeatureReportReply(uint32_t id, const std::vector<uint8_t>& int Device::handleEvents(int events) { if (events & (ALOOPER_EVENT_ERROR | ALOOPER_EVENT_HANGUP)) { - LOGE("uhid node was closed or an error occurred. events=0x%x", events); + ALOGE("uhid node was closed or an error occurred. events=0x%x", events); mDeviceCallback->onDeviceError(); return 0; } struct uhid_event ev; ssize_t ret = TEMP_FAILURE_RETRY(::read(mFd, &ev, sizeof(ev))); if (ret < 0) { - LOGE("Failed to read from uhid node: %s", strerror(errno)); + ALOGE("Failed to read from uhid node: %s", strerror(errno)); mDeviceCallback->onDeviceError(); return 0; } @@ -254,23 +252,28 @@ int Device::handleEvents(int events) { case UHID_SET_REPORT: { const struct uhid_set_report_req& set_report = ev.u.set_report; if (set_report.size > UHID_DATA_MAX) { - LOGE("SET_REPORT contains too much data: size = %" PRIu16, set_report.size); + ALOGE("SET_REPORT contains too much data: size = %" PRIu16, set_report.size); return 0; } std::vector<uint8_t> data(set_report.data, set_report.data + set_report.size); - LOGI("Received SET_REPORT: id=%" PRIu32 " rnum=%" PRIu8 " data=%s", set_report.id, - set_report.rnum, toString(data).c_str()); + if (DEBUG_OUTPUT) { + ALOGD("Received SET_REPORT: id=%" PRIu32 " rnum=%" PRIu8 " data=%s", set_report.id, + set_report.rnum, toString(data).c_str()); + } break; } case UHID_OUTPUT: { struct uhid_output_req& output = ev.u.output; std::vector<uint8_t> data(output.data, output.data + output.size); - mDeviceCallback->onDeviceOutput(data); + if (DEBUG_OUTPUT) { + ALOGD("UHID_OUTPUT rtype=%" PRIu8 " data=%s", output.rtype, toString(data).c_str()); + } + mDeviceCallback->onDeviceOutput(output.rtype, data); break; } default: { - LOGI("Unhandled event type: %" PRIu32, ev.type); + ALOGI("Unhandled event type: %" PRIu32, ev.type); break; } } @@ -318,7 +321,7 @@ static void sendReport(JNIEnv* env, jclass /* clazz */, jlong ptr, jbyteArray ra if (d) { d->sendReport(report); } else { - LOGE("Could not send report, Device* is null!"); + ALOGE("Could not send report, Device* is null!"); } } @@ -329,7 +332,7 @@ static void sendGetFeatureReportReply(JNIEnv* env, jclass /* clazz */, jlong ptr std::vector<uint8_t> report = getData(env, rawReport); d->sendGetFeatureReportReply(id, report); } else { - LOGE("Could not send get feature report reply, Device* is null!"); + ALOGE("Could not send get feature report reply, Device* is null!"); } } @@ -354,7 +357,7 @@ static JNINativeMethod sMethods[] = { int register_com_android_commands_hid_Device(JNIEnv* env) { jclass clazz = env->FindClass("com/android/commands/hid/Device$DeviceCallback"); if (clazz == NULL) { - LOGE("Unable to find class 'DeviceCallback'"); + ALOGE("Unable to find class 'DeviceCallback'"); return JNI_ERR; } uhid::gDeviceCallbackClassInfo.onDeviceOpen = @@ -362,12 +365,12 @@ int register_com_android_commands_hid_Device(JNIEnv* env) { uhid::gDeviceCallbackClassInfo.onDeviceGetReport = env->GetMethodID(clazz, "onDeviceGetReport", "(II)V"); uhid::gDeviceCallbackClassInfo.onDeviceOutput = - env->GetMethodID(clazz, "onDeviceOutput", "([B)V"); + env->GetMethodID(clazz, "onDeviceOutput", "(B[B)V"); uhid::gDeviceCallbackClassInfo.onDeviceError = env->GetMethodID(clazz, "onDeviceError", "()V"); if (uhid::gDeviceCallbackClassInfo.onDeviceOpen == NULL || uhid::gDeviceCallbackClassInfo.onDeviceError == NULL) { - LOGE("Unable to obtain onDeviceOpen or onDeviceError methods"); + ALOGE("Unable to obtain onDeviceOpen or onDeviceError methods"); return JNI_ERR; } diff --git a/cmds/hid/jni/com_android_commands_hid_Device.h b/cmds/hid/jni/com_android_commands_hid_Device.h index 7202b45adcde..5483b40831a0 100644 --- a/cmds/hid/jni/com_android_commands_hid_Device.h +++ b/cmds/hid/jni/com_android_commands_hid_Device.h @@ -31,7 +31,7 @@ public: void onDeviceOpen(); void onDeviceGetReport(uint32_t requestId, uint8_t reportId); - void onDeviceOutput(const std::vector<uint8_t>& data); + void onDeviceOutput(uint8_t rType, const std::vector<uint8_t>& data); void onDeviceError(); private: diff --git a/cmds/hid/src/com/android/commands/hid/Device.java b/cmds/hid/src/com/android/commands/hid/Device.java index dade41511ae6..20b4bd86baec 100644 --- a/cmds/hid/src/com/android/commands/hid/Device.java +++ b/cmds/hid/src/com/android/commands/hid/Device.java @@ -26,6 +26,12 @@ import android.util.SparseArray; import com.android.internal.os.SomeArgs; +import org.json.JSONArray; +import org.json.JSONException; +import org.json.JSONObject; + +import java.io.IOException; +import java.io.OutputStream; import java.nio.ByteBuffer; import java.util.Arrays; import java.util.Map; @@ -38,12 +44,16 @@ public class Device { private static final int MSG_SEND_GET_FEATURE_REPORT_REPLY = 3; private static final int MSG_CLOSE_DEVICE = 4; + // Sync with linux uhid_event_type::UHID_OUTPUT + private static final byte UHID_EVENT_TYPE_UHID_OUTPUT = 6; + private final int mId; private final HandlerThread mThread; private final DeviceHandler mHandler; // mFeatureReports is limited to 256 entries, because the report number is 8-bit private final SparseArray<byte[]> mFeatureReports; private final Map<ByteBuffer, byte[]> mOutputs; + private final OutputStream mOutputStream; private long mTimeToSend; private final Object mCond = new Object(); @@ -66,6 +76,7 @@ public class Device { mHandler = new DeviceHandler(mThread.getLooper()); mFeatureReports = featureReports; mOutputs = outputs; + mOutputStream = System.out; SomeArgs args = SomeArgs.obtain(); args.argi1 = id; args.argi2 = vid; @@ -188,7 +199,27 @@ public class Device { } // native callback - public void onDeviceOutput(byte[] data) { + public void onDeviceOutput(byte rtype, byte[] data) { + JSONObject json = new JSONObject(); + try { + json.put("eventId", UHID_EVENT_TYPE_UHID_OUTPUT); + json.put("deviceId", mId); + json.put("reportType", rtype); + JSONArray dataArray = new JSONArray(); + for (int i = 0; i < data.length; i++) { + dataArray.put(data[i] & 0xFF); + } + json.put("reportData", dataArray); + } catch (JSONException e) { + throw new RuntimeException("Could not create JSON object ", e); + } + try { + mOutputStream.write(json.toString().getBytes()); + mOutputStream.flush(); + } catch (IOException e) { + throw new RuntimeException(e); + } + if (mOutputs == null) { Log.e(TAG, "Received OUTPUT request, but 'outputs' section is not found"); return; diff --git a/cmds/statsd/src/metrics/CountMetricProducer.cpp b/cmds/statsd/src/metrics/CountMetricProducer.cpp index 573961276e5b..3dbb6ed47ff8 100644 --- a/cmds/statsd/src/metrics/CountMetricProducer.cpp +++ b/cmds/statsd/src/metrics/CountMetricProducer.cpp @@ -69,13 +69,14 @@ const int FIELD_ID_END_BUCKET_ELAPSED_MILLIS = 6; CountMetricProducer::CountMetricProducer( const ConfigKey& key, const CountMetric& metric, const int conditionIndex, const vector<ConditionState>& initialConditionCache, const sp<ConditionWizard>& wizard, - const int64_t timeBaseNs, const int64_t startTimeNs, + const uint64_t protoHash, const int64_t timeBaseNs, const int64_t startTimeNs, const unordered_map<int, shared_ptr<Activation>>& eventActivationMap, const unordered_map<int, vector<shared_ptr<Activation>>>& eventDeactivationMap, const vector<int>& slicedStateAtoms, const unordered_map<int, unordered_map<int, int64_t>>& stateGroupMap) : MetricProducer(metric.id(), key, timeBaseNs, conditionIndex, initialConditionCache, wizard, - eventActivationMap, eventDeactivationMap, slicedStateAtoms, stateGroupMap) { + protoHash, eventActivationMap, eventDeactivationMap, slicedStateAtoms, + stateGroupMap) { if (metric.has_bucket()) { mBucketSizeNs = TimeUnitToBucketSizeInMillisGuardrailed(key.GetUid(), metric.bucket()) * 1000000; diff --git a/cmds/statsd/src/metrics/CountMetricProducer.h b/cmds/statsd/src/metrics/CountMetricProducer.h index f05fb061ccc1..6b2f2ca61ecc 100644 --- a/cmds/statsd/src/metrics/CountMetricProducer.h +++ b/cmds/statsd/src/metrics/CountMetricProducer.h @@ -44,7 +44,7 @@ public: CountMetricProducer( const ConfigKey& key, const CountMetric& countMetric, const int conditionIndex, const vector<ConditionState>& initialConditionCache, const sp<ConditionWizard>& wizard, - const int64_t timeBaseNs, const int64_t startTimeNs, + const uint64_t protoHash, const int64_t timeBaseNs, const int64_t startTimeNs, const std::unordered_map<int, std::shared_ptr<Activation>>& eventActivationMap = {}, const std::unordered_map<int, std::vector<std::shared_ptr<Activation>>>& eventDeactivationMap = {}, @@ -57,6 +57,10 @@ public: const HashableDimensionKey& primaryKey, const FieldValue& oldState, const FieldValue& newState) override; + MetricType getMetricType() const override { + return METRIC_TYPE_COUNT; + } + protected: void onMatchedLogEventInternalLocked( const size_t matcherIndex, const MetricDimensionKey& eventKey, diff --git a/cmds/statsd/src/metrics/DurationMetricProducer.cpp b/cmds/statsd/src/metrics/DurationMetricProducer.cpp index e9b043876d3d..3acafaa3560e 100644 --- a/cmds/statsd/src/metrics/DurationMetricProducer.cpp +++ b/cmds/statsd/src/metrics/DurationMetricProducer.cpp @@ -66,14 +66,15 @@ DurationMetricProducer::DurationMetricProducer( const ConfigKey& key, const DurationMetric& metric, const int conditionIndex, const vector<ConditionState>& initialConditionCache, const size_t startIndex, const size_t stopIndex, const size_t stopAllIndex, const bool nesting, - const sp<ConditionWizard>& wizard, const FieldMatcher& internalDimensions, - const int64_t timeBaseNs, const int64_t startTimeNs, + const sp<ConditionWizard>& wizard, const uint64_t protoHash, + const FieldMatcher& internalDimensions, const int64_t timeBaseNs, const int64_t startTimeNs, const unordered_map<int, shared_ptr<Activation>>& eventActivationMap, const unordered_map<int, vector<shared_ptr<Activation>>>& eventDeactivationMap, const vector<int>& slicedStateAtoms, const unordered_map<int, unordered_map<int, int64_t>>& stateGroupMap) : MetricProducer(metric.id(), key, timeBaseNs, conditionIndex, initialConditionCache, wizard, - eventActivationMap, eventDeactivationMap, slicedStateAtoms, stateGroupMap), + protoHash, eventActivationMap, eventDeactivationMap, slicedStateAtoms, + stateGroupMap), mAggregationType(metric.aggregation_type()), mStartIndex(startIndex), mStopIndex(stopIndex), diff --git a/cmds/statsd/src/metrics/DurationMetricProducer.h b/cmds/statsd/src/metrics/DurationMetricProducer.h index bfe1010c89de..3a94d9c775aa 100644 --- a/cmds/statsd/src/metrics/DurationMetricProducer.h +++ b/cmds/statsd/src/metrics/DurationMetricProducer.h @@ -42,8 +42,9 @@ public: const ConfigKey& key, const DurationMetric& durationMetric, const int conditionIndex, const vector<ConditionState>& initialConditionCache, const size_t startIndex, const size_t stopIndex, const size_t stopAllIndex, const bool nesting, - const sp<ConditionWizard>& wizard, const FieldMatcher& internalDimensions, - const int64_t timeBaseNs, const int64_t startTimeNs, + const sp<ConditionWizard>& wizard, const uint64_t protoHash, + const FieldMatcher& internalDimensions, const int64_t timeBaseNs, + const int64_t startTimeNs, const unordered_map<int, shared_ptr<Activation>>& eventActivationMap = {}, const unordered_map<int, vector<shared_ptr<Activation>>>& eventDeactivationMap = {}, const vector<int>& slicedStateAtoms = {}, @@ -58,6 +59,10 @@ public: const HashableDimensionKey& primaryKey, const FieldValue& oldState, const FieldValue& newState) override; + MetricType getMetricType() const override { + return METRIC_TYPE_DURATION; + } + protected: void onMatchedLogEventLocked(const size_t matcherIndex, const LogEvent& event) override; diff --git a/cmds/statsd/src/metrics/EventMetricProducer.cpp b/cmds/statsd/src/metrics/EventMetricProducer.cpp index dc0036a687f3..dfe4559b05fb 100644 --- a/cmds/statsd/src/metrics/EventMetricProducer.cpp +++ b/cmds/statsd/src/metrics/EventMetricProducer.cpp @@ -55,13 +55,14 @@ const int FIELD_ID_ATOMS = 2; EventMetricProducer::EventMetricProducer( const ConfigKey& key, const EventMetric& metric, const int conditionIndex, const vector<ConditionState>& initialConditionCache, const sp<ConditionWizard>& wizard, - const int64_t startTimeNs, + const uint64_t protoHash, const int64_t startTimeNs, const unordered_map<int, shared_ptr<Activation>>& eventActivationMap, const unordered_map<int, vector<shared_ptr<Activation>>>& eventDeactivationMap, const vector<int>& slicedStateAtoms, const unordered_map<int, unordered_map<int, int64_t>>& stateGroupMap) : MetricProducer(metric.id(), key, startTimeNs, conditionIndex, initialConditionCache, wizard, - eventActivationMap, eventDeactivationMap, slicedStateAtoms, stateGroupMap) { + protoHash, eventActivationMap, eventDeactivationMap, slicedStateAtoms, + stateGroupMap) { if (metric.links().size() > 0) { for (const auto& link : metric.links()) { Metric2Condition mc; diff --git a/cmds/statsd/src/metrics/EventMetricProducer.h b/cmds/statsd/src/metrics/EventMetricProducer.h index bfb2de36fad4..e828dddcbb18 100644 --- a/cmds/statsd/src/metrics/EventMetricProducer.h +++ b/cmds/statsd/src/metrics/EventMetricProducer.h @@ -36,7 +36,7 @@ public: EventMetricProducer( const ConfigKey& key, const EventMetric& eventMetric, const int conditionIndex, const vector<ConditionState>& initialConditionCache, const sp<ConditionWizard>& wizard, - const int64_t startTimeNs, + const uint64_t protoHash, const int64_t startTimeNs, const std::unordered_map<int, std::shared_ptr<Activation>>& eventActivationMap = {}, const std::unordered_map<int, std::vector<std::shared_ptr<Activation>>>& eventDeactivationMap = {}, @@ -45,6 +45,10 @@ public: virtual ~EventMetricProducer(); + MetricType getMetricType() const override { + return METRIC_TYPE_EVENT; + } + private: void onMatchedLogEventInternalLocked( const size_t matcherIndex, const MetricDimensionKey& eventKey, diff --git a/cmds/statsd/src/metrics/GaugeMetricProducer.cpp b/cmds/statsd/src/metrics/GaugeMetricProducer.cpp index 020f4b638f4d..9dda248a6d1f 100644 --- a/cmds/statsd/src/metrics/GaugeMetricProducer.cpp +++ b/cmds/statsd/src/metrics/GaugeMetricProducer.cpp @@ -71,13 +71,14 @@ const int FIELD_ID_END_BUCKET_ELAPSED_MILLIS = 8; GaugeMetricProducer::GaugeMetricProducer( const ConfigKey& key, const GaugeMetric& metric, const int conditionIndex, const vector<ConditionState>& initialConditionCache, const sp<ConditionWizard>& wizard, - const int whatMatcherIndex, const sp<EventMatcherWizard>& matcherWizard, - const int pullTagId, const int triggerAtomId, const int atomId, const int64_t timeBaseNs, - const int64_t startTimeNs, const sp<StatsPullerManager>& pullerManager, + const uint64_t protoHash, const int whatMatcherIndex, + const sp<EventMatcherWizard>& matcherWizard, const int pullTagId, const int triggerAtomId, + const int atomId, const int64_t timeBaseNs, const int64_t startTimeNs, + const sp<StatsPullerManager>& pullerManager, const unordered_map<int, shared_ptr<Activation>>& eventActivationMap, const unordered_map<int, vector<shared_ptr<Activation>>>& eventDeactivationMap) : MetricProducer(metric.id(), key, timeBaseNs, conditionIndex, initialConditionCache, wizard, - eventActivationMap, eventDeactivationMap, /*slicedStateAtoms=*/{}, + protoHash, eventActivationMap, eventDeactivationMap, /*slicedStateAtoms=*/{}, /*stateGroupMap=*/{}), mWhatMatcherIndex(whatMatcherIndex), mEventMatcherWizard(matcherWizard), diff --git a/cmds/statsd/src/metrics/GaugeMetricProducer.h b/cmds/statsd/src/metrics/GaugeMetricProducer.h index ef3a24a43dcc..e933d4b19716 100644 --- a/cmds/statsd/src/metrics/GaugeMetricProducer.h +++ b/cmds/statsd/src/metrics/GaugeMetricProducer.h @@ -59,10 +59,11 @@ public: GaugeMetricProducer( const ConfigKey& key, const GaugeMetric& gaugeMetric, const int conditionIndex, const vector<ConditionState>& initialConditionCache, - const sp<ConditionWizard>& conditionWizard, const int whatMatcherIndex, - const sp<EventMatcherWizard>& matcherWizard, const int pullTagId, - const int triggerAtomId, const int atomId, const int64_t timeBaseNs, - const int64_t startTimeNs, const sp<StatsPullerManager>& pullerManager, + const sp<ConditionWizard>& conditionWizard, const uint64_t protoHash, + const int whatMatcherIndex, const sp<EventMatcherWizard>& matcherWizard, + const int pullTagId, const int triggerAtomId, const int atomId, + const int64_t timeBaseNs, const int64_t startTimeNs, + const sp<StatsPullerManager>& pullerManager, const std::unordered_map<int, std::shared_ptr<Activation>>& eventActivationMap = {}, const std::unordered_map<int, std::vector<std::shared_ptr<Activation>>>& eventDeactivationMap = {}); @@ -96,6 +97,10 @@ public: } }; + MetricType getMetricType() const override { + return METRIC_TYPE_GAUGE; + } + protected: void onMatchedLogEventInternalLocked( const size_t matcherIndex, const MetricDimensionKey& eventKey, diff --git a/cmds/statsd/src/metrics/MetricProducer.cpp b/cmds/statsd/src/metrics/MetricProducer.cpp index fe143e496373..c1c1d20f00e2 100644 --- a/cmds/statsd/src/metrics/MetricProducer.cpp +++ b/cmds/statsd/src/metrics/MetricProducer.cpp @@ -46,13 +46,14 @@ const int FIELD_ID_ACTIVE_EVENT_ACTIVATION_STATE = 3; MetricProducer::MetricProducer( const int64_t& metricId, const ConfigKey& key, const int64_t timeBaseNs, const int conditionIndex, const vector<ConditionState>& initialConditionCache, - const sp<ConditionWizard>& wizard, + const sp<ConditionWizard>& wizard, const uint64_t protoHash, const std::unordered_map<int, std::shared_ptr<Activation>>& eventActivationMap, const std::unordered_map<int, std::vector<std::shared_ptr<Activation>>>& eventDeactivationMap, const vector<int>& slicedStateAtoms, const unordered_map<int, unordered_map<int, int64_t>>& stateGroupMap) : mMetricId(metricId), + mProtoHash(protoHash), mConfigKey(key), mTimeBaseNs(timeBaseNs), mCurrentBucketStartTimeNs(timeBaseNs), diff --git a/cmds/statsd/src/metrics/MetricProducer.h b/cmds/statsd/src/metrics/MetricProducer.h index be4cd6724bb1..bb590aac54d6 100644 --- a/cmds/statsd/src/metrics/MetricProducer.h +++ b/cmds/statsd/src/metrics/MetricProducer.h @@ -87,6 +87,13 @@ enum BucketDropReason { NO_DATA = 9 }; +enum MetricType { + METRIC_TYPE_EVENT = 1, + METRIC_TYPE_COUNT = 2, + METRIC_TYPE_DURATION = 3, + METRIC_TYPE_GAUGE = 4, + METRIC_TYPE_VALUE = 5, +}; struct Activation { Activation(const ActivationType& activationType, const int64_t ttlNs) : ttl_ns(ttlNs), @@ -130,7 +137,7 @@ class MetricProducer : public virtual android::RefBase, public virtual StateList public: MetricProducer(const int64_t& metricId, const ConfigKey& key, const int64_t timeBaseNs, const int conditionIndex, const vector<ConditionState>& initialConditionCache, - const sp<ConditionWizard>& wizard, + const sp<ConditionWizard>& wizard, const uint64_t protoHash, const std::unordered_map<int, std::shared_ptr<Activation>>& eventActivationMap, const std::unordered_map<int, std::vector<std::shared_ptr<Activation>>>& eventDeactivationMap, @@ -259,10 +266,16 @@ public: int64_t currentTimeNs, const DumpReportReason reason, ProtoOutputStream* proto); // Start: getters/setters - inline const int64_t& getMetricId() const { + inline int64_t getMetricId() const { return mMetricId; } + inline uint64_t getProtoHash() const { + return mProtoHash; + } + + virtual MetricType getMetricType() const = 0; + // For test only. inline int64_t getCurrentBucketNum() const { return mCurrentBucketNum; @@ -400,6 +413,10 @@ protected: const int64_t mMetricId; + // Hash of the Metric's proto bytes from StatsdConfig, including any activations. + // Used to determine if the definition of this metric has changed across a config update. + const uint64_t mProtoHash; + const ConfigKey mConfigKey; // The time when this metric producer was first created. The end time for the current bucket diff --git a/cmds/statsd/src/metrics/MetricsManager.cpp b/cmds/statsd/src/metrics/MetricsManager.cpp index a0c701ea4229..39806890c42d 100644 --- a/cmds/statsd/src/metrics/MetricsManager.cpp +++ b/cmds/statsd/src/metrics/MetricsManager.cpp @@ -80,11 +80,11 @@ MetricsManager::MetricsManager(const ConfigKey& key, const StatsdConfig& config, mConfigValid = initStatsdConfig( key, config, uidMap, pullerManager, anomalyAlarmMonitor, periodicAlarmMonitor, timeBaseNs, currentTimeNs, mTagIds, mAllAtomMatchingTrackers, mAtomMatchingTrackerMap, - mAllConditionTrackers, mConditionTrackerMap, mAllMetricProducers, mAllAnomalyTrackers, - mAllPeriodicAlarmTrackers, mConditionToMetricMap, mTrackerToMetricMap, - mTrackerToConditionMap, mActivationAtomTrackerToMetricMap, + mAllConditionTrackers, mConditionTrackerMap, mAllMetricProducers, mMetricProducerMap, + mAllAnomalyTrackers, mAllPeriodicAlarmTrackers, mConditionToMetricMap, + mTrackerToMetricMap, mTrackerToConditionMap, mActivationAtomTrackerToMetricMap, mDeactivationAtomTrackerToMetricMap, mAlertTrackerMap, mMetricIndexesWithActivation, - mNoReportMetricIds); + mStateProtoHashes, mNoReportMetricIds); mHashStringsInReport = config.hash_strings_in_metric_report(); mVersionStringsInReport = config.version_strings_in_metric_report(); diff --git a/cmds/statsd/src/metrics/MetricsManager.h b/cmds/statsd/src/metrics/MetricsManager.h index bd0c8161a884..27f3d51b07ce 100644 --- a/cmds/statsd/src/metrics/MetricsManager.h +++ b/cmds/statsd/src/metrics/MetricsManager.h @@ -248,6 +248,9 @@ private: // Maps the id of a condition tracker to its index in mAllConditionTrackers. std::unordered_map<int64_t, int> mConditionTrackerMap; + // Maps the id of a metric producer to its index in mAllMetricProducers. + std::unordered_map<int64_t, int> mMetricProducerMap; + // To make the log processing more efficient, we want to do as much filtering as possible // before we go into individual trackers and conditions to match. @@ -295,6 +298,9 @@ private: // The config is always active if any metric in the config does not have an activation signal. bool mIsAlwaysActive; + // Hashes of the States used in this config, keyed by the state id, used in config updates. + std::map<int64_t, uint64_t> mStateProtoHashes; + FRIEND_TEST(WakelockDurationE2eTest, TestAggregatedPredicateDimensions); FRIEND_TEST(MetricConditionLinkE2eTest, TestMultiplePredicatesAndLinks); FRIEND_TEST(AttributionE2eTest, TestAttributionMatchAndSliceByFirstUid); diff --git a/cmds/statsd/src/metrics/ValueMetricProducer.cpp b/cmds/statsd/src/metrics/ValueMetricProducer.cpp index dcfbd5ea239b..39ae9a47f2bf 100644 --- a/cmds/statsd/src/metrics/ValueMetricProducer.cpp +++ b/cmds/statsd/src/metrics/ValueMetricProducer.cpp @@ -79,16 +79,17 @@ const Value ZERO_DOUBLE((int64_t)0); ValueMetricProducer::ValueMetricProducer( const ConfigKey& key, const ValueMetric& metric, const int conditionIndex, const vector<ConditionState>& initialConditionCache, - const sp<ConditionWizard>& conditionWizard, const int whatMatcherIndex, - const sp<EventMatcherWizard>& matcherWizard, const int pullTagId, const int64_t timeBaseNs, - const int64_t startTimeNs, const sp<StatsPullerManager>& pullerManager, + const sp<ConditionWizard>& conditionWizard, const uint64_t protoHash, + const int whatMatcherIndex, const sp<EventMatcherWizard>& matcherWizard, + const int pullTagId, const int64_t timeBaseNs, const int64_t startTimeNs, + const sp<StatsPullerManager>& pullerManager, const unordered_map<int, shared_ptr<Activation>>& eventActivationMap, const unordered_map<int, vector<shared_ptr<Activation>>>& eventDeactivationMap, const vector<int>& slicedStateAtoms, const unordered_map<int, unordered_map<int, int64_t>>& stateGroupMap) : MetricProducer(metric.id(), key, timeBaseNs, conditionIndex, initialConditionCache, - conditionWizard, eventActivationMap, eventDeactivationMap, slicedStateAtoms, - stateGroupMap), + conditionWizard, protoHash, eventActivationMap, eventDeactivationMap, + slicedStateAtoms, stateGroupMap), mWhatMatcherIndex(whatMatcherIndex), mEventMatcherWizard(matcherWizard), mPullerManager(pullerManager), diff --git a/cmds/statsd/src/metrics/ValueMetricProducer.h b/cmds/statsd/src/metrics/ValueMetricProducer.h index 472cc33b97fa..4b2599bdb517 100644 --- a/cmds/statsd/src/metrics/ValueMetricProducer.h +++ b/cmds/statsd/src/metrics/ValueMetricProducer.h @@ -52,9 +52,9 @@ public: ValueMetricProducer( const ConfigKey& key, const ValueMetric& valueMetric, const int conditionIndex, const vector<ConditionState>& initialConditionCache, - const sp<ConditionWizard>& conditionWizard, const int whatMatcherIndex, - const sp<EventMatcherWizard>& matcherWizard, const int pullTagId, - const int64_t timeBaseNs, const int64_t startTimeNs, + const sp<ConditionWizard>& conditionWizard, const uint64_t protoHash, + const int whatMatcherIndex, const sp<EventMatcherWizard>& matcherWizard, + const int pullTagId, const int64_t timeBaseNs, const int64_t startTimeNs, const sp<StatsPullerManager>& pullerManager, const std::unordered_map<int, std::shared_ptr<Activation>>& eventActivationMap = {}, const std::unordered_map<int, std::vector<std::shared_ptr<Activation>>>& @@ -92,6 +92,10 @@ public: void onStateChanged(int64_t eventTimeNs, int32_t atomId, const HashableDimensionKey& primaryKey, const FieldValue& oldState, const FieldValue& newState) override; + MetricType getMetricType() const override { + return METRIC_TYPE_VALUE; + } + protected: void onMatchedLogEventInternalLocked( const size_t matcherIndex, const MetricDimensionKey& eventKey, diff --git a/cmds/statsd/src/metrics/parsing_utils/metrics_manager_util.cpp b/cmds/statsd/src/metrics/parsing_utils/metrics_manager_util.cpp index 2e3e43413d54..3f40c90d515a 100644 --- a/cmds/statsd/src/metrics/parsing_utils/metrics_manager_util.cpp +++ b/cmds/statsd/src/metrics/parsing_utils/metrics_manager_util.cpp @@ -38,6 +38,7 @@ #include "state/StateManager.h" #include "stats_util.h" +using google::protobuf::MessageLite; using std::set; using std::unordered_map; using std::vector; @@ -60,6 +61,20 @@ bool hasLeafNode(const FieldMatcher& matcher) { return true; } +bool getMetricProtoHash(const MessageLite& metric, const int64_t id, const bool hasActivation, + const uint64_t activationHash, uint64_t& metricHash) { + string serializedMetric; + if (!metric.SerializeToString(&serializedMetric)) { + ALOGE("Unable to serialize metric %lld", (long long)id); + return false; + } + metricHash = Hash64(serializedMetric); + if (hasActivation) { + metricHash = Hash64(to_string(metricHash).append(to_string(activationHash))); + } + return true; +} + } // namespace sp<AtomMatchingTracker> createAtomMatchingTracker(const AtomMatcher& logMatcher, const int index, @@ -228,19 +243,31 @@ bool handleMetricWithStateLink(const FieldMatcher& stateMatcher, bool handleMetricActivation( const StatsdConfig& config, const int64_t metricId, const int metricIndex, const unordered_map<int64_t, int>& metricToActivationMap, - const unordered_map<int64_t, int>& atomMatchingTrackerMap, + const unordered_map<int64_t, int>& atomMatchingTrackerMap, bool& hasActivation, unordered_map<int, vector<int>>& activationAtomTrackerToMetricMap, unordered_map<int, vector<int>>& deactivationAtomTrackerToMetricMap, vector<int>& metricsWithActivation, unordered_map<int, shared_ptr<Activation>>& eventActivationMap, - unordered_map<int, vector<shared_ptr<Activation>>>& eventDeactivationMap) { + unordered_map<int, vector<shared_ptr<Activation>>>& eventDeactivationMap, + uint64_t& activationHash) { // Check if metric has an associated activation auto itr = metricToActivationMap.find(metricId); - if (itr == metricToActivationMap.end()) return true; + if (itr == metricToActivationMap.end()) { + hasActivation = false; + return true; + } + hasActivation = true; int activationIndex = itr->second; const MetricActivation& metricActivation = config.metric_activation(activationIndex); + string serializedActivation; + if (!metricActivation.SerializeToString(&serializedActivation)) { + ALOGE("Unable to serialize metric activation for metric %lld", (long long)metricId); + return false; + } + activationHash = Hash64(serializedActivation); + for (int i = 0; i < metricActivation.event_activation_size(); i++) { const EventActivation& activation = metricActivation.event_activation(i); @@ -357,12 +384,20 @@ bool initConditions(const ConfigKey& key, const StatsdConfig& config, } bool initStates(const StatsdConfig& config, unordered_map<int64_t, int>& stateAtomIdMap, - unordered_map<int64_t, unordered_map<int, int64_t>>& allStateGroupMaps) { + unordered_map<int64_t, unordered_map<int, int64_t>>& allStateGroupMaps, + map<int64_t, uint64_t>& stateProtoHashes) { for (int i = 0; i < config.state_size(); i++) { const State& state = config.state(i); const int64_t stateId = state.id(); stateAtomIdMap[stateId] = state.atom_id(); + string serializedState; + if (!state.SerializeToString(&serializedState)) { + ALOGE("Unable to serialize state %lld", (long long)stateId); + return false; + } + stateProtoHashes[stateId] = Hash64(serializedState); + const StateMap& stateMap = state.map(); for (auto group : stateMap.group()) { for (auto value : group.value()) { @@ -457,18 +492,25 @@ bool initMetrics(const ConfigKey& key, const StatsdConfig& config, const int64_t } } + bool hasActivation = false; unordered_map<int, shared_ptr<Activation>> eventActivationMap; unordered_map<int, vector<shared_ptr<Activation>>> eventDeactivationMap; + uint64_t activationHash; bool success = handleMetricActivation( config, metric.id(), metricIndex, metricToActivationMap, atomMatchingTrackerMap, - activationAtomTrackerToMetricMap, deactivationAtomTrackerToMetricMap, - metricsWithActivation, eventActivationMap, eventDeactivationMap); + hasActivation, activationAtomTrackerToMetricMap, deactivationAtomTrackerToMetricMap, + metricsWithActivation, eventActivationMap, eventDeactivationMap, activationHash); if (!success) return false; - sp<MetricProducer> countProducer = - new CountMetricProducer(key, metric, conditionIndex, initialConditionCache, wizard, - timeBaseTimeNs, currentTimeNs, eventActivationMap, - eventDeactivationMap, slicedStateAtoms, stateGroupMap); + uint64_t metricHash; + if (!getMetricProtoHash(metric, metric.id(), hasActivation, activationHash, metricHash)) { + return false; + } + + sp<MetricProducer> countProducer = new CountMetricProducer( + key, metric, conditionIndex, initialConditionCache, wizard, metricHash, + timeBaseTimeNs, currentTimeNs, eventActivationMap, eventDeactivationMap, + slicedStateAtoms, stateGroupMap); allMetricProducers.push_back(countProducer); } @@ -566,19 +608,26 @@ bool initMetrics(const ConfigKey& key, const StatsdConfig& config, const int64_t } } + bool hasActivation = false; unordered_map<int, shared_ptr<Activation>> eventActivationMap; unordered_map<int, vector<shared_ptr<Activation>>> eventDeactivationMap; + uint64_t activationHash; bool success = handleMetricActivation( config, metric.id(), metricIndex, metricToActivationMap, atomMatchingTrackerMap, - activationAtomTrackerToMetricMap, deactivationAtomTrackerToMetricMap, - metricsWithActivation, eventActivationMap, eventDeactivationMap); + hasActivation, activationAtomTrackerToMetricMap, deactivationAtomTrackerToMetricMap, + metricsWithActivation, eventActivationMap, eventDeactivationMap, activationHash); if (!success) return false; + uint64_t metricHash; + if (!getMetricProtoHash(metric, metric.id(), hasActivation, activationHash, metricHash)) { + return false; + } + sp<MetricProducer> durationMetric = new DurationMetricProducer( key, metric, conditionIndex, initialConditionCache, trackerIndices[0], - trackerIndices[1], trackerIndices[2], nesting, wizard, internalDimensions, - timeBaseTimeNs, currentTimeNs, eventActivationMap, eventDeactivationMap, - slicedStateAtoms, stateGroupMap); + trackerIndices[1], trackerIndices[2], nesting, wizard, metricHash, + internalDimensions, timeBaseTimeNs, currentTimeNs, eventActivationMap, + eventDeactivationMap, slicedStateAtoms, stateGroupMap); allMetricProducers.push_back(durationMetric); } @@ -614,17 +663,24 @@ bool initMetrics(const ConfigKey& key, const StatsdConfig& config, const int64_t } } + bool hasActivation = false; unordered_map<int, shared_ptr<Activation>> eventActivationMap; unordered_map<int, vector<shared_ptr<Activation>>> eventDeactivationMap; + uint64_t activationHash; bool success = handleMetricActivation( config, metric.id(), metricIndex, metricToActivationMap, atomMatchingTrackerMap, - activationAtomTrackerToMetricMap, deactivationAtomTrackerToMetricMap, - metricsWithActivation, eventActivationMap, eventDeactivationMap); + hasActivation, activationAtomTrackerToMetricMap, deactivationAtomTrackerToMetricMap, + metricsWithActivation, eventActivationMap, eventDeactivationMap, activationHash); if (!success) return false; - sp<MetricProducer> eventMetric = - new EventMetricProducer(key, metric, conditionIndex, initialConditionCache, wizard, - timeBaseTimeNs, eventActivationMap, eventDeactivationMap); + uint64_t metricHash; + if (!getMetricProtoHash(metric, metric.id(), hasActivation, activationHash, metricHash)) { + return false; + } + + sp<MetricProducer> eventMetric = new EventMetricProducer( + key, metric, conditionIndex, initialConditionCache, wizard, metricHash, + timeBaseTimeNs, eventActivationMap, eventDeactivationMap); allMetricProducers.push_back(eventMetric); } @@ -703,18 +759,26 @@ bool initMetrics(const ConfigKey& key, const StatsdConfig& config, const int64_t } } + bool hasActivation = false; unordered_map<int, shared_ptr<Activation>> eventActivationMap; unordered_map<int, vector<shared_ptr<Activation>>> eventDeactivationMap; + uint64_t activationHash; bool success = handleMetricActivation( config, metric.id(), metricIndex, metricToActivationMap, atomMatchingTrackerMap, - activationAtomTrackerToMetricMap, deactivationAtomTrackerToMetricMap, - metricsWithActivation, eventActivationMap, eventDeactivationMap); + hasActivation, activationAtomTrackerToMetricMap, deactivationAtomTrackerToMetricMap, + metricsWithActivation, eventActivationMap, eventDeactivationMap, activationHash); if (!success) return false; + uint64_t metricHash; + if (!getMetricProtoHash(metric, metric.id(), hasActivation, activationHash, metricHash)) { + return false; + } + sp<MetricProducer> valueProducer = new ValueMetricProducer( - key, metric, conditionIndex, initialConditionCache, wizard, trackerIndex, - matcherWizard, pullTagId, timeBaseTimeNs, currentTimeNs, pullerManager, - eventActivationMap, eventDeactivationMap, slicedStateAtoms, stateGroupMap); + key, metric, conditionIndex, initialConditionCache, wizard, metricHash, + trackerIndex, matcherWizard, pullTagId, timeBaseTimeNs, currentTimeNs, + pullerManager, eventActivationMap, eventDeactivationMap, slicedStateAtoms, + stateGroupMap); allMetricProducers.push_back(valueProducer); } @@ -799,18 +863,25 @@ bool initMetrics(const ConfigKey& key, const StatsdConfig& config, const int64_t } } + bool hasActivation = false; unordered_map<int, shared_ptr<Activation>> eventActivationMap; unordered_map<int, vector<shared_ptr<Activation>>> eventDeactivationMap; + uint64_t activationHash; bool success = handleMetricActivation( config, metric.id(), metricIndex, metricToActivationMap, atomMatchingTrackerMap, - activationAtomTrackerToMetricMap, deactivationAtomTrackerToMetricMap, - metricsWithActivation, eventActivationMap, eventDeactivationMap); + hasActivation, activationAtomTrackerToMetricMap, deactivationAtomTrackerToMetricMap, + metricsWithActivation, eventActivationMap, eventDeactivationMap, activationHash); if (!success) return false; + uint64_t metricHash; + if (!getMetricProtoHash(metric, metric.id(), hasActivation, activationHash, metricHash)) { + return false; + } + sp<MetricProducer> gaugeProducer = new GaugeMetricProducer( - key, metric, conditionIndex, initialConditionCache, wizard, trackerIndex, - matcherWizard, pullTagId, triggerAtomId, atomTagId, timeBaseTimeNs, currentTimeNs, - pullerManager, eventActivationMap, eventDeactivationMap); + key, metric, conditionIndex, initialConditionCache, wizard, metricHash, + trackerIndex, matcherWizard, pullTagId, triggerAtomId, atomTagId, timeBaseTimeNs, + currentTimeNs, pullerManager, eventActivationMap, eventDeactivationMap); allMetricProducers.push_back(gaugeProducer); } for (int i = 0; i < config.no_report_metric_size(); ++i) { @@ -945,6 +1016,7 @@ bool initStatsdConfig(const ConfigKey& key, const StatsdConfig& config, const sp vector<sp<ConditionTracker>>& allConditionTrackers, unordered_map<int64_t, int>& conditionTrackerMap, vector<sp<MetricProducer>>& allMetricProducers, + unordered_map<int64_t, int>& metricProducerMap, vector<sp<AnomalyTracker>>& allAnomalyTrackers, vector<sp<AlarmTracker>>& allPeriodicAlarmTrackers, unordered_map<int, std::vector<int>>& conditionToMetricMap, @@ -953,9 +1025,9 @@ bool initStatsdConfig(const ConfigKey& key, const StatsdConfig& config, const sp unordered_map<int, std::vector<int>>& activationAtomTrackerToMetricMap, unordered_map<int, std::vector<int>>& deactivationAtomTrackerToMetricMap, unordered_map<int64_t, int>& alertTrackerMap, - vector<int>& metricsWithActivation, std::set<int64_t>& noReportMetricIds) { + vector<int>& metricsWithActivation, map<int64_t, uint64_t>& stateProtoHashes, + set<int64_t>& noReportMetricIds) { vector<ConditionState> initialConditionCache; - unordered_map<int64_t, int> metricProducerMap; unordered_map<int64_t, int> stateAtomIdMap; unordered_map<int64_t, unordered_map<int, int64_t>> allStateGroupMaps; @@ -972,7 +1044,7 @@ bool initStatsdConfig(const ConfigKey& key, const StatsdConfig& config, const sp return false; } - if (!initStates(config, stateAtomIdMap, allStateGroupMaps)) { + if (!initStates(config, stateAtomIdMap, allStateGroupMaps, stateProtoHashes)) { ALOGE("initStates failed"); return false; } diff --git a/cmds/statsd/src/metrics/parsing_utils/metrics_manager_util.h b/cmds/statsd/src/metrics/parsing_utils/metrics_manager_util.h index 6eabcf4971d3..4979c3051133 100644 --- a/cmds/statsd/src/metrics/parsing_utils/metrics_manager_util.h +++ b/cmds/statsd/src/metrics/parsing_utils/metrics_manager_util.h @@ -98,8 +98,10 @@ bool initConditions(const ConfigKey& key, const StatsdConfig& config, // [stateAtomIdMap]: this map should contain the mapping from state ids to atom ids // [allStateGroupMaps]: this map should contain the mapping from states ids and state // values to state group ids for all states +// [stateProtoHashes]: contains a map of state id to the hash of the State proto from the config bool initStates(const StatsdConfig& config, unordered_map<int64_t, int>& stateAtomIdMap, - unordered_map<int64_t, unordered_map<int, int64_t>>& allStateGroupMaps); + unordered_map<int64_t, unordered_map<int, int64_t>>& allStateGroupMaps, + std::map<int64_t, uint64_t>& stateProtoHashes); // Initialize MetricProducers. // input: @@ -146,6 +148,7 @@ bool initStatsdConfig(const ConfigKey& key, const StatsdConfig& config, const sp std::vector<sp<ConditionTracker>>& allConditionTrackers, std::unordered_map<int64_t, int>& conditionTrackerMap, std::vector<sp<MetricProducer>>& allMetricProducers, + std::unordered_map<int64_t, int>& metricProducerMap, vector<sp<AnomalyTracker>>& allAnomalyTrackers, vector<sp<AlarmTracker>>& allPeriodicAlarmTrackers, std::unordered_map<int, std::vector<int>>& conditionToMetricMap, @@ -154,7 +157,9 @@ bool initStatsdConfig(const ConfigKey& key, const StatsdConfig& config, const sp unordered_map<int, std::vector<int>>& activationAtomTrackerToMetricMap, unordered_map<int, std::vector<int>>& deactivationAtomTrackerToMetricMap, std::unordered_map<int64_t, int>& alertTrackerMap, - vector<int>& metricsWithActivation, std::set<int64_t>& noReportMetricIds); + vector<int>& metricsWithActivation, + std::map<int64_t, uint64_t>& stateProtoHashes, + std::set<int64_t>& noReportMetricIds); } // namespace statsd } // namespace os diff --git a/cmds/statsd/tests/metrics/CountMetricProducer_test.cpp b/cmds/statsd/tests/metrics/CountMetricProducer_test.cpp index bb8e7bfd90f4..8e2864c6fba8 100644 --- a/cmds/statsd/tests/metrics/CountMetricProducer_test.cpp +++ b/cmds/statsd/tests/metrics/CountMetricProducer_test.cpp @@ -41,6 +41,7 @@ namespace statsd { namespace { const ConfigKey kConfigKey(0, 12345); +const uint64_t protoHash = 0x1234567890; void makeLogEvent(LogEvent* logEvent, int64_t timestampNs, int atomId) { AStatsEvent* statsEvent = AStatsEvent_obtain(); @@ -75,7 +76,7 @@ TEST(CountMetricProducerTest, TestFirstBucket) { sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>(); CountMetricProducer countProducer(kConfigKey, metric, -1 /*-1 meaning no condition*/, {}, - wizard, 5, 600 * NS_PER_SEC + NS_PER_SEC / 2); + wizard, protoHash, 5, 600 * NS_PER_SEC + NS_PER_SEC / 2); EXPECT_EQ(600500000000, countProducer.mCurrentBucketStartTimeNs); EXPECT_EQ(10, countProducer.mCurrentBucketNum); EXPECT_EQ(660000000005, countProducer.getCurrentBucketEndTimeNs()); @@ -95,7 +96,7 @@ TEST(CountMetricProducerTest, TestNonDimensionalEvents) { sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>(); CountMetricProducer countProducer(kConfigKey, metric, -1 /*-1 meaning no condition*/, {}, - wizard, bucketStartTimeNs, bucketStartTimeNs); + wizard, protoHash, bucketStartTimeNs, bucketStartTimeNs); // 2 events in bucket 1. LogEvent event1(/*uid=*/0, /*pid=*/0); @@ -158,7 +159,7 @@ TEST(CountMetricProducerTest, TestEventsWithNonSlicedCondition) { sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>(); CountMetricProducer countProducer(kConfigKey, metric, 0, {ConditionState::kUnknown}, wizard, - bucketStartTimeNs, bucketStartTimeNs); + protoHash, bucketStartTimeNs, bucketStartTimeNs); countProducer.onConditionChanged(true, bucketStartTimeNs); @@ -226,8 +227,8 @@ TEST(CountMetricProducerTest, TestEventsWithSlicedCondition) { EXPECT_CALL(*wizard, query(_, key2, _)).WillOnce(Return(ConditionState::kTrue)); CountMetricProducer countProducer(kConfigKey, metric, 0 /*condition tracker index*/, - {ConditionState::kUnknown}, wizard, bucketStartTimeNs, - bucketStartTimeNs); + {ConditionState::kUnknown}, wizard, protoHash, + bucketStartTimeNs, bucketStartTimeNs); countProducer.onMatchedLogEvent(1 /*log matcher index*/, event1); countProducer.flushIfNeededLocked(bucketStartTimeNs + 1); @@ -265,7 +266,7 @@ TEST_P(CountMetricProducerTest_PartialBucket, TestSplitInCurrentBucket) { sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>(); CountMetricProducer countProducer(kConfigKey, metric, -1 /* no condition */, {}, wizard, - bucketStartTimeNs, bucketStartTimeNs); + protoHash, bucketStartTimeNs, bucketStartTimeNs); sp<AnomalyTracker> anomalyTracker = countProducer.addAnomalyTracker(alert, alarmMonitor); EXPECT_TRUE(anomalyTracker != nullptr); @@ -332,7 +333,7 @@ TEST_P(CountMetricProducerTest_PartialBucket, TestSplitInNextBucket) { sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>(); CountMetricProducer countProducer(kConfigKey, metric, -1 /* no condition */, {}, wizard, - bucketStartTimeNs, bucketStartTimeNs); + protoHash, bucketStartTimeNs, bucketStartTimeNs); // Bucket is flushed yet. LogEvent event1(/*uid=*/0, /*pid=*/0); @@ -397,7 +398,7 @@ TEST(CountMetricProducerTest, TestAnomalyDetectionUnSliced) { sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>(); CountMetricProducer countProducer(kConfigKey, metric, -1 /*-1 meaning no condition*/, {}, - wizard, bucketStartTimeNs, bucketStartTimeNs); + wizard, protoHash, bucketStartTimeNs, bucketStartTimeNs); sp<AnomalyTracker> anomalyTracker = countProducer.addAnomalyTracker(alert, alarmMonitor); @@ -459,7 +460,7 @@ TEST(CountMetricProducerTest, TestOneWeekTimeUnit) { int64_t fiveWeeksNs = 5 * 7 * oneDayNs; CountMetricProducer countProducer(kConfigKey, metric, -1 /* meaning no condition */, {}, wizard, - oneDayNs, fiveWeeksNs); + protoHash, oneDayNs, fiveWeeksNs); int64_t fiveWeeksOneDayNs = fiveWeeksNs + oneDayNs; diff --git a/cmds/statsd/tests/metrics/DurationMetricProducer_test.cpp b/cmds/statsd/tests/metrics/DurationMetricProducer_test.cpp index 05cfa37b0ee1..d1f89775ed6a 100644 --- a/cmds/statsd/tests/metrics/DurationMetricProducer_test.cpp +++ b/cmds/statsd/tests/metrics/DurationMetricProducer_test.cpp @@ -45,6 +45,7 @@ namespace statsd { namespace { const ConfigKey kConfigKey(0, 12345); +const uint64_t protoHash = 0x1234567890; void makeLogEvent(LogEvent* logEvent, int64_t timestampNs, int atomId) { AStatsEvent* statsEvent = AStatsEvent_obtain(); AStatsEvent_setAtomId(statsEvent, atomId); @@ -71,10 +72,10 @@ TEST(DurationMetricTrackerTest, TestFirstBucket) { FieldMatcher dimensions; - DurationMetricProducer durationProducer(kConfigKey, metric, -1 /*no condition*/, {}, - 1 /* start index */, 2 /* stop index */, - 3 /* stop_all index */, false /*nesting*/, wizard, - dimensions, 5, 600 * NS_PER_SEC + NS_PER_SEC / 2); + DurationMetricProducer durationProducer( + kConfigKey, metric, -1 /*no condition*/, {}, 1 /* start index */, 2 /* stop index */, + 3 /* stop_all index */, false /*nesting*/, wizard, protoHash, dimensions, 5, + 600 * NS_PER_SEC + NS_PER_SEC / 2); EXPECT_EQ(600500000000, durationProducer.mCurrentBucketStartTimeNs); EXPECT_EQ(10, durationProducer.mCurrentBucketNum); @@ -99,10 +100,10 @@ TEST(DurationMetricTrackerTest, TestNoCondition) { FieldMatcher dimensions; - DurationMetricProducer durationProducer(kConfigKey, metric, -1 /*no condition*/, {}, - 1 /* start index */, 2 /* stop index */, - 3 /* stop_all index */, false /*nesting*/, wizard, - dimensions, bucketStartTimeNs, bucketStartTimeNs); + DurationMetricProducer durationProducer( + kConfigKey, metric, -1 /*no condition*/, {}, 1 /* start index */, 2 /* stop index */, + 3 /* stop_all index */, false /*nesting*/, wizard, protoHash, dimensions, + bucketStartTimeNs, bucketStartTimeNs); durationProducer.onMatchedLogEvent(1 /* start index*/, event1); durationProducer.onMatchedLogEvent(2 /* stop index*/, event2); @@ -145,7 +146,7 @@ TEST(DurationMetricTrackerTest, TestNonSlicedCondition) { DurationMetricProducer durationProducer( kConfigKey, metric, 0 /* condition index */, {ConditionState::kUnknown}, 1 /* start index */, 2 /* stop index */, 3 /* stop_all index */, false /*nesting*/, - wizard, dimensions, bucketStartTimeNs, bucketStartTimeNs); + wizard, protoHash, dimensions, bucketStartTimeNs, bucketStartTimeNs); durationProducer.mCondition = ConditionState::kFalse; EXPECT_FALSE(durationProducer.mCondition); @@ -195,7 +196,7 @@ TEST(DurationMetricTrackerTest, TestNonSlicedConditionUnknownState) { DurationMetricProducer durationProducer( kConfigKey, metric, 0 /* condition index */, {ConditionState::kUnknown}, 1 /* start index */, 2 /* stop index */, 3 /* stop_all index */, false /*nesting*/, - wizard, dimensions, bucketStartTimeNs, bucketStartTimeNs); + wizard, protoHash, dimensions, bucketStartTimeNs, bucketStartTimeNs); EXPECT_EQ(ConditionState::kUnknown, durationProducer.mCondition); EXPECT_FALSE(durationProducer.isConditionSliced()); @@ -238,10 +239,10 @@ TEST_P(DurationMetricProducerTest_PartialBucket, TestSumDuration) { sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>(); FieldMatcher dimensions; - DurationMetricProducer durationProducer(kConfigKey, metric, -1 /* no condition */, {}, - 1 /* start index */, 2 /* stop index */, - 3 /* stop_all index */, false /*nesting*/, wizard, - dimensions, bucketStartTimeNs, bucketStartTimeNs); + DurationMetricProducer durationProducer( + kConfigKey, metric, -1 /* no condition */, {}, 1 /* start index */, 2 /* stop index */, + 3 /* stop_all index */, false /*nesting*/, wizard, protoHash, dimensions, + bucketStartTimeNs, bucketStartTimeNs); int64_t startTimeNs = bucketStartTimeNs + 1 * NS_PER_SEC; LogEvent event1(/*uid=*/0, /*pid=*/0); @@ -301,10 +302,10 @@ TEST_P(DurationMetricProducerTest_PartialBucket, TestSumDurationWithSplitInFollo sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>(); FieldMatcher dimensions; - DurationMetricProducer durationProducer(kConfigKey, metric, -1 /* no condition */, {}, - 1 /* start index */, 2 /* stop index */, - 3 /* stop_all index */, false /*nesting*/, wizard, - dimensions, bucketStartTimeNs, bucketStartTimeNs); + DurationMetricProducer durationProducer( + kConfigKey, metric, -1 /* no condition */, {}, 1 /* start index */, 2 /* stop index */, + 3 /* stop_all index */, false /*nesting*/, wizard, protoHash, dimensions, + bucketStartTimeNs, bucketStartTimeNs); int64_t startTimeNs = bucketStartTimeNs + 1 * NS_PER_SEC; LogEvent event1(/*uid=*/0, /*pid=*/0); @@ -365,10 +366,10 @@ TEST_P(DurationMetricProducerTest_PartialBucket, TestSumDurationAnomaly) { sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>(); FieldMatcher dimensions; - DurationMetricProducer durationProducer(kConfigKey, metric, -1 /* no condition */, {}, - 1 /* start index */, 2 /* stop index */, - 3 /* stop_all index */, false /*nesting*/, wizard, - dimensions, bucketStartTimeNs, bucketStartTimeNs); + DurationMetricProducer durationProducer( + kConfigKey, metric, -1 /* no condition */, {}, 1 /* start index */, 2 /* stop index */, + 3 /* stop_all index */, false /*nesting*/, wizard, protoHash, dimensions, + bucketStartTimeNs, bucketStartTimeNs); sp<AnomalyTracker> anomalyTracker = durationProducer.addAnomalyTracker(alert, alarmMonitor); EXPECT_TRUE(anomalyTracker != nullptr); @@ -411,10 +412,10 @@ TEST_P(DurationMetricProducerTest_PartialBucket, TestMaxDuration) { sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>(); FieldMatcher dimensions; - DurationMetricProducer durationProducer(kConfigKey, metric, -1 /* no condition */, {}, - 1 /* start index */, 2 /* stop index */, - 3 /* stop_all index */, false /*nesting*/, wizard, - dimensions, bucketStartTimeNs, bucketStartTimeNs); + DurationMetricProducer durationProducer( + kConfigKey, metric, -1 /* no condition */, {}, 1 /* start index */, 2 /* stop index */, + 3 /* stop_all index */, false /*nesting*/, wizard, protoHash, dimensions, + bucketStartTimeNs, bucketStartTimeNs); int64_t startTimeNs = bucketStartTimeNs + 1; LogEvent event1(/*uid=*/0, /*pid=*/0); @@ -465,10 +466,10 @@ TEST_P(DurationMetricProducerTest_PartialBucket, TestMaxDurationWithSplitInNextB sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>(); FieldMatcher dimensions; - DurationMetricProducer durationProducer(kConfigKey, metric, -1 /* no condition */, {}, - 1 /* start index */, 2 /* stop index */, - 3 /* stop_all index */, false /*nesting*/, wizard, - dimensions, bucketStartTimeNs, bucketStartTimeNs); + DurationMetricProducer durationProducer( + kConfigKey, metric, -1 /* no condition */, {}, 1 /* start index */, 2 /* stop index */, + 3 /* stop_all index */, false /*nesting*/, wizard, protoHash, dimensions, + bucketStartTimeNs, bucketStartTimeNs); int64_t startTimeNs = bucketStartTimeNs + 1; LogEvent event1(/*uid=*/0, /*pid=*/0); diff --git a/cmds/statsd/tests/metrics/EventMetricProducer_test.cpp b/cmds/statsd/tests/metrics/EventMetricProducer_test.cpp index dfbb9da568b0..4bbbd2cb36ad 100644 --- a/cmds/statsd/tests/metrics/EventMetricProducer_test.cpp +++ b/cmds/statsd/tests/metrics/EventMetricProducer_test.cpp @@ -36,9 +36,11 @@ namespace android { namespace os { namespace statsd { -const ConfigKey kConfigKey(0, 12345); namespace { +const ConfigKey kConfigKey(0, 12345); +const uint64_t protoHash = 0x1234567890; + void makeLogEvent(LogEvent* logEvent, int32_t atomId, int64_t timestampNs, string str) { AStatsEvent* statsEvent = AStatsEvent_obtain(); AStatsEvent_setAtomId(statsEvent, atomId); @@ -66,7 +68,7 @@ TEST(EventMetricProducerTest, TestNoCondition) { sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>(); EventMetricProducer eventProducer(kConfigKey, metric, -1 /*-1 meaning no condition*/, {}, - wizard, bucketStartTimeNs); + wizard, protoHash, bucketStartTimeNs); eventProducer.onMatchedLogEvent(1 /*matcher index*/, event1); eventProducer.onMatchedLogEvent(1 /*matcher index*/, event2); @@ -102,7 +104,8 @@ TEST(EventMetricProducerTest, TestEventsWithNonSlicedCondition) { sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>(); EventMetricProducer eventProducer(kConfigKey, metric, 0 /*condition index*/, - {ConditionState::kUnknown}, wizard, bucketStartTimeNs); + {ConditionState::kUnknown}, wizard, protoHash, + bucketStartTimeNs); eventProducer.onConditionChanged(true /*condition*/, bucketStartTimeNs); eventProducer.onMatchedLogEvent(1 /*matcher index*/, event1); @@ -157,7 +160,8 @@ TEST(EventMetricProducerTest, TestEventsWithSlicedCondition) { EXPECT_CALL(*wizard, query(_, key2, _)).WillOnce(Return(ConditionState::kTrue)); EventMetricProducer eventProducer(kConfigKey, metric, 0 /*condition index*/, - {ConditionState::kUnknown}, wizard, bucketStartTimeNs); + {ConditionState::kUnknown}, wizard, protoHash, + bucketStartTimeNs); eventProducer.onMatchedLogEvent(1 /*matcher index*/, event1); eventProducer.onMatchedLogEvent(1 /*matcher index*/, event2); diff --git a/cmds/statsd/tests/metrics/GaugeMetricProducer_test.cpp b/cmds/statsd/tests/metrics/GaugeMetricProducer_test.cpp index ba919f1e0ad8..10606810d806 100644 --- a/cmds/statsd/tests/metrics/GaugeMetricProducer_test.cpp +++ b/cmds/statsd/tests/metrics/GaugeMetricProducer_test.cpp @@ -47,6 +47,7 @@ namespace { const ConfigKey kConfigKey(0, 12345); const int tagId = 1; const int64_t metricId = 123; +const uint64_t protoHash = 0x123456789; const int logEventMatcherIndex = 0; const int64_t bucketStartTimeNs = 10 * NS_PER_SEC; const int64_t bucketSizeNs = TimeUnitToBucketSizeInMillis(ONE_MINUTE) * 1000000LL; @@ -101,8 +102,9 @@ TEST(GaugeMetricProducerTest, TestFirstBucket) { // statsd started long ago. // The metric starts in the middle of the bucket GaugeMetricProducer gaugeProducer(kConfigKey, metric, -1 /*-1 meaning no condition*/, {}, - wizard, logEventMatcherIndex, eventMatcherWizard, -1, -1, - tagId, 5, 600 * NS_PER_SEC + NS_PER_SEC / 2, pullerManager); + wizard, protoHash, logEventMatcherIndex, eventMatcherWizard, + -1, -1, tagId, 5, 600 * NS_PER_SEC + NS_PER_SEC / 2, + pullerManager); gaugeProducer.prepareFirstBucket(); EXPECT_EQ(600500000000, gaugeProducer.mCurrentBucketStartTimeNs); @@ -139,8 +141,9 @@ TEST(GaugeMetricProducerTest, TestPulledEventsNoCondition) { })); GaugeMetricProducer gaugeProducer(kConfigKey, metric, -1 /*-1 meaning no condition*/, {}, - wizard, logEventMatcherIndex, eventMatcherWizard, tagId, -1, - tagId, bucketStartTimeNs, bucketStartTimeNs, pullerManager); + wizard, protoHash, logEventMatcherIndex, eventMatcherWizard, + tagId, -1, tagId, bucketStartTimeNs, bucketStartTimeNs, + pullerManager); gaugeProducer.prepareFirstBucket(); vector<shared_ptr<LogEvent>> allData; @@ -213,7 +216,7 @@ TEST_P(GaugeMetricProducerTest_PartialBucket, TestPushedEvents) { createEventMatcherWizard(tagId, logEventMatcherIndex); GaugeMetricProducer gaugeProducer(kConfigKey, metric, -1 /*-1 meaning no condition*/, {}, - wizard, logEventMatcherIndex, eventMatcherWizard, + wizard, protoHash, logEventMatcherIndex, eventMatcherWizard, -1 /* -1 means no pulling */, -1, tagId, bucketStartTimeNs, bucketStartTimeNs, pullerManager); gaugeProducer.prepareFirstBucket(); @@ -306,8 +309,9 @@ TEST_P(GaugeMetricProducerTest_PartialBucket, TestPulled) { })); GaugeMetricProducer gaugeProducer(kConfigKey, metric, -1 /*-1 meaning no condition*/, {}, - wizard, logEventMatcherIndex, eventMatcherWizard, tagId, -1, - tagId, bucketStartTimeNs, bucketStartTimeNs, pullerManager); + wizard, protoHash, logEventMatcherIndex, eventMatcherWizard, + tagId, -1, tagId, bucketStartTimeNs, bucketStartTimeNs, + pullerManager); gaugeProducer.prepareFirstBucket(); vector<shared_ptr<LogEvent>> allData; @@ -373,8 +377,9 @@ TEST(GaugeMetricProducerTest, TestPulledWithAppUpgradeDisabled) { .WillOnce(Return(false)); GaugeMetricProducer gaugeProducer(kConfigKey, metric, -1 /*-1 meaning no condition*/, {}, - wizard, logEventMatcherIndex, eventMatcherWizard, tagId, -1, - tagId, bucketStartTimeNs, bucketStartTimeNs, pullerManager); + wizard, protoHash, logEventMatcherIndex, eventMatcherWizard, + tagId, -1, tagId, bucketStartTimeNs, bucketStartTimeNs, + pullerManager); gaugeProducer.prepareFirstBucket(); vector<shared_ptr<LogEvent>> allData; @@ -426,9 +431,9 @@ TEST(GaugeMetricProducerTest, TestPulledEventsWithCondition) { })); GaugeMetricProducer gaugeProducer(kConfigKey, metric, 0 /*condition index*/, - {ConditionState::kUnknown}, wizard, logEventMatcherIndex, - eventMatcherWizard, tagId, -1, tagId, bucketStartTimeNs, - bucketStartTimeNs, pullerManager); + {ConditionState::kUnknown}, wizard, protoHash, + logEventMatcherIndex, eventMatcherWizard, tagId, -1, tagId, + bucketStartTimeNs, bucketStartTimeNs, pullerManager); gaugeProducer.prepareFirstBucket(); gaugeProducer.onConditionChanged(true, conditionChangeNs); @@ -509,9 +514,9 @@ TEST(GaugeMetricProducerTest, TestPulledEventsWithSlicedCondition) { })); GaugeMetricProducer gaugeProducer(kConfigKey, metric, 0 /*condition index*/, - {ConditionState::kUnknown}, wizard, logEventMatcherIndex, - eventMatcherWizard, tagId, -1, tagId, bucketStartTimeNs, - bucketStartTimeNs, pullerManager); + {ConditionState::kUnknown}, wizard, protoHash, + logEventMatcherIndex, eventMatcherWizard, tagId, -1, tagId, + bucketStartTimeNs, bucketStartTimeNs, pullerManager); gaugeProducer.prepareFirstBucket(); gaugeProducer.onSlicedConditionMayChange(true, sliceConditionChangeNs); @@ -554,8 +559,9 @@ TEST(GaugeMetricProducerTest, TestPulledEventsAnomalyDetection) { createEventMatcherWizard(tagId, logEventMatcherIndex); GaugeMetricProducer gaugeProducer(kConfigKey, metric, -1 /*-1 meaning no condition*/, {}, - wizard, logEventMatcherIndex, eventMatcherWizard, tagId, -1, - tagId, bucketStartTimeNs, bucketStartTimeNs, pullerManager); + wizard, protoHash, logEventMatcherIndex, eventMatcherWizard, + tagId, -1, tagId, bucketStartTimeNs, bucketStartTimeNs, + pullerManager); gaugeProducer.prepareFirstBucket(); Alert alert; @@ -649,8 +655,8 @@ TEST(GaugeMetricProducerTest, TestPullOnTrigger) { int triggerId = 5; GaugeMetricProducer gaugeProducer(kConfigKey, metric, -1 /*-1 meaning no condition*/, {}, - wizard, logEventMatcherIndex, eventMatcherWizard, tagId, - triggerId, tagId, bucketStartTimeNs, bucketStartTimeNs, + wizard, protoHash, logEventMatcherIndex, eventMatcherWizard, + tagId, triggerId, tagId, bucketStartTimeNs, bucketStartTimeNs, pullerManager); gaugeProducer.prepareFirstBucket(); @@ -724,8 +730,8 @@ TEST(GaugeMetricProducerTest, TestRemoveDimensionInOutput) { int triggerId = 5; GaugeMetricProducer gaugeProducer(kConfigKey, metric, -1 /*-1 meaning no condition*/, {}, - wizard, logEventMatcherIndex, eventMatcherWizard, tagId, - triggerId, tagId, bucketStartTimeNs, bucketStartTimeNs, + wizard, protoHash, logEventMatcherIndex, eventMatcherWizard, + tagId, triggerId, tagId, bucketStartTimeNs, bucketStartTimeNs, pullerManager); gaugeProducer.prepareFirstBucket(); @@ -783,8 +789,8 @@ TEST(GaugeMetricProducerTest_BucketDrop, TestBucketDropWhenBucketTooSmall) { int triggerId = 5; GaugeMetricProducer gaugeProducer(kConfigKey, metric, -1 /*-1 meaning no condition*/, {}, - wizard, logEventMatcherIndex, eventMatcherWizard, tagId, - triggerId, tagId, bucketStartTimeNs, bucketStartTimeNs, + wizard, protoHash, logEventMatcherIndex, eventMatcherWizard, + tagId, triggerId, tagId, bucketStartTimeNs, bucketStartTimeNs, pullerManager); gaugeProducer.prepareFirstBucket(); diff --git a/cmds/statsd/tests/metrics/ValueMetricProducer_test.cpp b/cmds/statsd/tests/metrics/ValueMetricProducer_test.cpp index 8790fe428d19..b166cc1fe04e 100644 --- a/cmds/statsd/tests/metrics/ValueMetricProducer_test.cpp +++ b/cmds/statsd/tests/metrics/ValueMetricProducer_test.cpp @@ -46,6 +46,7 @@ namespace { const ConfigKey kConfigKey(0, 12345); const int tagId = 1; const int64_t metricId = 123; +const uint64_t protoHash = 0x1234567890; const int logEventMatcherIndex = 0; const int64_t bucketStartTimeNs = 10000000000; const int64_t bucketSizeNs = TimeUnitToBucketSizeInMillis(ONE_MINUTE) * 1000000LL; @@ -108,8 +109,8 @@ public: sp<ValueMetricProducer> valueProducer = new ValueMetricProducer(kConfigKey, metric, -1 /*-1 meaning no condition*/, {}, - wizard, logEventMatcherIndex, eventMatcherWizard, tagId, - bucketStartTimeNs, bucketStartTimeNs, pullerManager); + wizard, protoHash, logEventMatcherIndex, eventMatcherWizard, + tagId, bucketStartTimeNs, bucketStartTimeNs, pullerManager); valueProducer->prepareFirstBucket(); return valueProducer; } @@ -127,7 +128,7 @@ public: sp<ValueMetricProducer> valueProducer = new ValueMetricProducer( kConfigKey, metric, 0 /*condition index*/, {ConditionState::kUnknown}, wizard, - logEventMatcherIndex, eventMatcherWizard, tagId, bucketStartTimeNs, + protoHash, logEventMatcherIndex, eventMatcherWizard, tagId, bucketStartTimeNs, bucketStartTimeNs, pullerManager); valueProducer->prepareFirstBucket(); valueProducer->mCondition = conditionAfterFirstBucketPrepared; @@ -147,9 +148,9 @@ public: .WillRepeatedly(Return()); sp<ValueMetricProducer> valueProducer = new ValueMetricProducer( - kConfigKey, metric, -1 /* no condition */, {}, wizard, logEventMatcherIndex, - eventMatcherWizard, tagId, bucketStartTimeNs, bucketStartTimeNs, pullerManager, {}, - {}, slicedStateAtoms, stateGroupMap); + kConfigKey, metric, -1 /* no condition */, {}, wizard, protoHash, + logEventMatcherIndex, eventMatcherWizard, tagId, bucketStartTimeNs, + bucketStartTimeNs, pullerManager, {}, {}, slicedStateAtoms, stateGroupMap); valueProducer->prepareFirstBucket(); return valueProducer; } @@ -169,8 +170,9 @@ public: sp<ValueMetricProducer> valueProducer = new ValueMetricProducer( kConfigKey, metric, 0 /* condition tracker index */, {ConditionState::kUnknown}, - wizard, logEventMatcherIndex, eventMatcherWizard, tagId, bucketStartTimeNs, - bucketStartTimeNs, pullerManager, {}, {}, slicedStateAtoms, stateGroupMap); + wizard, protoHash, logEventMatcherIndex, eventMatcherWizard, tagId, + bucketStartTimeNs, bucketStartTimeNs, pullerManager, {}, {}, slicedStateAtoms, + stateGroupMap); valueProducer->prepareFirstBucket(); valueProducer->mCondition = conditionAfterFirstBucketPrepared; return valueProducer; @@ -228,8 +230,8 @@ TEST(ValueMetricProducerTest, TestCalcPreviousBucketEndTime) { // statsd started long ago. // The metric starts in the middle of the bucket ValueMetricProducer valueProducer(kConfigKey, metric, -1 /*-1 meaning no condition*/, {}, - wizard, logEventMatcherIndex, eventMatcherWizard, -1, - startTimeBase, 22, pullerManager); + wizard, protoHash, logEventMatcherIndex, eventMatcherWizard, + -1, startTimeBase, 22, pullerManager); valueProducer.prepareFirstBucket(); EXPECT_EQ(startTimeBase, valueProducer.calcPreviousBucketEndTime(60 * NS_PER_SEC + 10)); @@ -254,8 +256,8 @@ TEST(ValueMetricProducerTest, TestFirstBucket) { // statsd started long ago. // The metric starts in the middle of the bucket ValueMetricProducer valueProducer(kConfigKey, metric, -1 /*-1 meaning no condition*/, {}, - wizard, logEventMatcherIndex, eventMatcherWizard, -1, 5, - 600 * NS_PER_SEC + NS_PER_SEC / 2, pullerManager); + wizard, protoHash, logEventMatcherIndex, eventMatcherWizard, + -1, 5, 600 * NS_PER_SEC + NS_PER_SEC / 2, pullerManager); valueProducer.prepareFirstBucket(); EXPECT_EQ(600500000000, valueProducer.mCurrentBucketStartTimeNs); @@ -414,9 +416,10 @@ TEST(ValueMetricProducerTest, TestPulledEventsWithFiltering) { return true; })); - sp<ValueMetricProducer> valueProducer = new ValueMetricProducer( - kConfigKey, metric, -1 /*-1 meaning no condition*/, {}, wizard, logEventMatcherIndex, - eventMatcherWizard, tagId, bucketStartTimeNs, bucketStartTimeNs, pullerManager); + sp<ValueMetricProducer> valueProducer = + new ValueMetricProducer(kConfigKey, metric, -1 /*-1 meaning no condition*/, {}, wizard, + protoHash, logEventMatcherIndex, eventMatcherWizard, tagId, + bucketStartTimeNs, bucketStartTimeNs, pullerManager); valueProducer->prepareFirstBucket(); vector<shared_ptr<LogEvent>> allData; @@ -679,9 +682,9 @@ TEST_P(ValueMetricProducerTest_PartialBucket, TestPushedEvents) { sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>(); sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>(); - ValueMetricProducer valueProducer(kConfigKey, metric, -1, {}, wizard, logEventMatcherIndex, - eventMatcherWizard, -1, bucketStartTimeNs, bucketStartTimeNs, - pullerManager); + ValueMetricProducer valueProducer(kConfigKey, metric, -1, {}, wizard, protoHash, + logEventMatcherIndex, eventMatcherWizard, -1, + bucketStartTimeNs, bucketStartTimeNs, pullerManager); valueProducer.prepareFirstBucket(); LogEvent event1(/*uid=*/0, /*pid=*/0); @@ -749,9 +752,9 @@ TEST_P(ValueMetricProducerTest_PartialBucket, TestPulledValue) { return true; })); - ValueMetricProducer valueProducer(kConfigKey, metric, -1, {}, wizard, logEventMatcherIndex, - eventMatcherWizard, tagId, bucketStartTimeNs, - bucketStartTimeNs, pullerManager); + ValueMetricProducer valueProducer(kConfigKey, metric, -1, {}, wizard, protoHash, + logEventMatcherIndex, eventMatcherWizard, tagId, + bucketStartTimeNs, bucketStartTimeNs, pullerManager); valueProducer.prepareFirstBucket(); vector<shared_ptr<LogEvent>> allData; @@ -797,9 +800,9 @@ TEST(ValueMetricProducerTest, TestPulledWithAppUpgradeDisabled) { EXPECT_CALL(*pullerManager, Pull(tagId, kConfigKey, bucketStartTimeNs, _)) .WillOnce(Return(true)); - ValueMetricProducer valueProducer(kConfigKey, metric, -1, {}, wizard, logEventMatcherIndex, - eventMatcherWizard, tagId, bucketStartTimeNs, - bucketStartTimeNs, pullerManager); + ValueMetricProducer valueProducer(kConfigKey, metric, -1, {}, wizard, protoHash, + logEventMatcherIndex, eventMatcherWizard, tagId, + bucketStartTimeNs, bucketStartTimeNs, pullerManager); valueProducer.prepareFirstBucket(); vector<shared_ptr<LogEvent>> allData; @@ -869,9 +872,9 @@ TEST(ValueMetricProducerTest, TestPushedEventsWithoutCondition) { sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>(); sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>(); - ValueMetricProducer valueProducer(kConfigKey, metric, -1, {}, wizard, logEventMatcherIndex, - eventMatcherWizard, -1, bucketStartTimeNs, bucketStartTimeNs, - pullerManager); + ValueMetricProducer valueProducer(kConfigKey, metric, -1, {}, wizard, protoHash, + logEventMatcherIndex, eventMatcherWizard, -1, + bucketStartTimeNs, bucketStartTimeNs, pullerManager); valueProducer.prepareFirstBucket(); LogEvent event1(/*uid=*/0, /*pid=*/0); @@ -911,7 +914,7 @@ TEST(ValueMetricProducerTest, TestPushedEventsWithCondition) { sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>(); ValueMetricProducer valueProducer(kConfigKey, metric, 0, {ConditionState::kUnknown}, wizard, - logEventMatcherIndex, eventMatcherWizard, -1, + protoHash, logEventMatcherIndex, eventMatcherWizard, -1, bucketStartTimeNs, bucketStartTimeNs, pullerManager); valueProducer.prepareFirstBucket(); valueProducer.mCondition = ConditionState::kFalse; @@ -978,7 +981,7 @@ TEST(ValueMetricProducerTest, TestAnomalyDetection) { sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>(); ValueMetricProducer valueProducer(kConfigKey, metric, -1 /*-1 meaning no condition*/, {}, - wizard, logEventMatcherIndex, eventMatcherWizard, + wizard, protoHash, logEventMatcherIndex, eventMatcherWizard, -1 /*not pulled*/, bucketStartTimeNs, bucketStartTimeNs, pullerManager); valueProducer.prepareFirstBucket(); @@ -1321,9 +1324,9 @@ TEST(ValueMetricProducerTest, TestPushedAggregateMin) { sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>(); sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>(); - ValueMetricProducer valueProducer(kConfigKey, metric, -1, {}, wizard, logEventMatcherIndex, - eventMatcherWizard, -1, bucketStartTimeNs, bucketStartTimeNs, - pullerManager); + ValueMetricProducer valueProducer(kConfigKey, metric, -1, {}, wizard, protoHash, + logEventMatcherIndex, eventMatcherWizard, -1, + bucketStartTimeNs, bucketStartTimeNs, pullerManager); valueProducer.prepareFirstBucket(); LogEvent event1(/*uid=*/0, /*pid=*/0); @@ -1361,9 +1364,9 @@ TEST(ValueMetricProducerTest, TestPushedAggregateMax) { sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>(); sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>(); - ValueMetricProducer valueProducer(kConfigKey, metric, -1, {}, wizard, logEventMatcherIndex, - eventMatcherWizard, -1, bucketStartTimeNs, bucketStartTimeNs, - pullerManager); + ValueMetricProducer valueProducer(kConfigKey, metric, -1, {}, wizard, protoHash, + logEventMatcherIndex, eventMatcherWizard, -1, + bucketStartTimeNs, bucketStartTimeNs, pullerManager); valueProducer.prepareFirstBucket(); LogEvent event1(/*uid=*/0, /*pid=*/0); @@ -1400,9 +1403,9 @@ TEST(ValueMetricProducerTest, TestPushedAggregateAvg) { sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>(); sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>(); - ValueMetricProducer valueProducer(kConfigKey, metric, -1, {}, wizard, logEventMatcherIndex, - eventMatcherWizard, -1, bucketStartTimeNs, bucketStartTimeNs, - pullerManager); + ValueMetricProducer valueProducer(kConfigKey, metric, -1, {}, wizard, protoHash, + logEventMatcherIndex, eventMatcherWizard, -1, + bucketStartTimeNs, bucketStartTimeNs, pullerManager); valueProducer.prepareFirstBucket(); LogEvent event1(/*uid=*/0, /*pid=*/0); @@ -1444,9 +1447,9 @@ TEST(ValueMetricProducerTest, TestPushedAggregateSum) { sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>(); sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>(); - ValueMetricProducer valueProducer(kConfigKey, metric, -1, {}, wizard, logEventMatcherIndex, - eventMatcherWizard, -1, bucketStartTimeNs, bucketStartTimeNs, - pullerManager); + ValueMetricProducer valueProducer(kConfigKey, metric, -1, {}, wizard, protoHash, + logEventMatcherIndex, eventMatcherWizard, -1, + bucketStartTimeNs, bucketStartTimeNs, pullerManager); valueProducer.prepareFirstBucket(); LogEvent event1(/*uid=*/0, /*pid=*/0); @@ -1484,9 +1487,9 @@ TEST(ValueMetricProducerTest, TestSkipZeroDiffOutput) { sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>(); sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>(); - ValueMetricProducer valueProducer(kConfigKey, metric, -1, {}, wizard, logEventMatcherIndex, - eventMatcherWizard, -1, bucketStartTimeNs, bucketStartTimeNs, - pullerManager); + ValueMetricProducer valueProducer(kConfigKey, metric, -1, {}, wizard, protoHash, + logEventMatcherIndex, eventMatcherWizard, -1, + bucketStartTimeNs, bucketStartTimeNs, pullerManager); valueProducer.prepareFirstBucket(); LogEvent event1(/*uid=*/0, /*pid=*/0); @@ -1553,9 +1556,9 @@ TEST(ValueMetricProducerTest, TestSkipZeroDiffOutputMultiValue) { sp<MockConditionWizard> wizard = new NaggyMock<MockConditionWizard>(); sp<MockStatsPullerManager> pullerManager = new StrictMock<MockStatsPullerManager>(); - ValueMetricProducer valueProducer(kConfigKey, metric, -1, {}, wizard, logEventMatcherIndex, - eventMatcherWizard, -1, bucketStartTimeNs, bucketStartTimeNs, - pullerManager); + ValueMetricProducer valueProducer(kConfigKey, metric, -1, {}, wizard, protoHash, + logEventMatcherIndex, eventMatcherWizard, -1, + bucketStartTimeNs, bucketStartTimeNs, pullerManager); valueProducer.prepareFirstBucket(); LogEvent event1(/*uid=*/0, /*pid=*/0); @@ -2089,7 +2092,7 @@ TEST(ValueMetricProducerTest, TestResetBaseOnPullTooLate) { EXPECT_CALL(*pullerManager, UnRegisterReceiver(tagId, kConfigKey, _)).WillRepeatedly(Return()); ValueMetricProducer valueProducer(kConfigKey, metric, 0, {ConditionState::kUnknown}, wizard, - logEventMatcherIndex, eventMatcherWizard, tagId, + protoHash, logEventMatcherIndex, eventMatcherWizard, tagId, bucket2StartTimeNs, bucket2StartTimeNs, pullerManager); valueProducer.prepareFirstBucket(); valueProducer.mCondition = ConditionState::kFalse; @@ -2922,9 +2925,9 @@ TEST(ValueMetricProducerTest, TestPullNeededFastDump) { return true; })); - ValueMetricProducer valueProducer(kConfigKey, metric, -1, {}, wizard, logEventMatcherIndex, - eventMatcherWizard, tagId, bucketStartTimeNs, - bucketStartTimeNs, pullerManager); + ValueMetricProducer valueProducer(kConfigKey, metric, -1, {}, wizard, protoHash, + logEventMatcherIndex, eventMatcherWizard, tagId, + bucketStartTimeNs, bucketStartTimeNs, pullerManager); valueProducer.prepareFirstBucket(); ProtoOutputStream output; @@ -2956,9 +2959,9 @@ TEST(ValueMetricProducerTest, TestFastDumpWithoutCurrentBucket) { return true; })); - ValueMetricProducer valueProducer(kConfigKey, metric, -1, {}, wizard, logEventMatcherIndex, - eventMatcherWizard, tagId, bucketStartTimeNs, - bucketStartTimeNs, pullerManager); + ValueMetricProducer valueProducer(kConfigKey, metric, -1, {}, wizard, protoHash, + logEventMatcherIndex, eventMatcherWizard, tagId, + bucketStartTimeNs, bucketStartTimeNs, pullerManager); valueProducer.prepareFirstBucket(); vector<shared_ptr<LogEvent>> allData; @@ -3005,9 +3008,9 @@ TEST(ValueMetricProducerTest, TestPullNeededNoTimeConstraints) { return true; })); - ValueMetricProducer valueProducer(kConfigKey, metric, -1, {}, wizard, logEventMatcherIndex, - eventMatcherWizard, tagId, bucketStartTimeNs, - bucketStartTimeNs, pullerManager); + ValueMetricProducer valueProducer(kConfigKey, metric, -1, {}, wizard, protoHash, + logEventMatcherIndex, eventMatcherWizard, tagId, + bucketStartTimeNs, bucketStartTimeNs, pullerManager); valueProducer.prepareFirstBucket(); ProtoOutputStream output; diff --git a/cmds/statsd/tests/metrics/parsing_utils/config_update_utils_test.cpp b/cmds/statsd/tests/metrics/parsing_utils/config_update_utils_test.cpp index 890884bc5d83..843d836a2c0b 100644 --- a/cmds/statsd/tests/metrics/parsing_utils/config_update_utils_test.cpp +++ b/cmds/statsd/tests/metrics/parsing_utils/config_update_utils_test.cpp @@ -58,6 +58,7 @@ unordered_map<int64_t, int> oldAtomMatchingTrackerMap; vector<sp<ConditionTracker>> oldConditionTrackers; unordered_map<int64_t, int> oldConditionTrackerMap; vector<sp<MetricProducer>> oldMetricProducers; +unordered_map<int64_t, int> oldMetricProducerMap; std::vector<sp<AnomalyTracker>> oldAnomalyTrackers; std::vector<sp<AlarmTracker>> oldAlarmTrackers; unordered_map<int, std::vector<int>> conditionToMetricMap; @@ -67,6 +68,7 @@ unordered_map<int, std::vector<int>> activationAtomTrackerToMetricMap; unordered_map<int, std::vector<int>> deactivationAtomTrackerToMetricMap; unordered_map<int64_t, int> alertTrackerMap; vector<int> metricsWithActivation; +map<int64_t, uint64_t> oldStateHashes; std::set<int64_t> noReportMetricIds; class ConfigUpdateTest : public ::testing::Test { @@ -81,6 +83,7 @@ public: oldConditionTrackers.clear(); oldConditionTrackerMap.clear(); oldMetricProducers.clear(); + oldMetricProducerMap.clear(); oldAnomalyTrackers.clear(); oldAlarmTrackers.clear(); conditionToMetricMap.clear(); @@ -90,6 +93,7 @@ public: deactivationAtomTrackerToMetricMap.clear(); alertTrackerMap.clear(); metricsWithActivation.clear(); + oldStateHashes.clear(); noReportMetricIds.clear(); } }; @@ -98,10 +102,11 @@ bool initConfig(const StatsdConfig& config) { return initStatsdConfig( key, config, uidMap, pullerManager, anomalyAlarmMonitor, periodicAlarmMonitor, timeBaseNs, timeBaseNs, allTagIds, oldAtomMatchingTrackers, oldAtomMatchingTrackerMap, - oldConditionTrackers, oldConditionTrackerMap, oldMetricProducers, oldAnomalyTrackers, - oldAlarmTrackers, conditionToMetricMap, trackerToMetricMap, trackerToConditionMap, - activationAtomTrackerToMetricMap, deactivationAtomTrackerToMetricMap, alertTrackerMap, - metricsWithActivation, noReportMetricIds); + oldConditionTrackers, oldConditionTrackerMap, oldMetricProducers, oldMetricProducerMap, + oldAnomalyTrackers, oldAlarmTrackers, conditionToMetricMap, trackerToMetricMap, + trackerToConditionMap, activationAtomTrackerToMetricMap, + deactivationAtomTrackerToMetricMap, alertTrackerMap, metricsWithActivation, + oldStateHashes, noReportMetricIds); } } // anonymous namespace diff --git a/cmds/statsd/tests/metrics/parsing_utils/metrics_manager_util_test.cpp b/cmds/statsd/tests/metrics/parsing_utils/metrics_manager_util_test.cpp index e6583c9686ec..0d0a8960043e 100644 --- a/cmds/statsd/tests/metrics/parsing_utils/metrics_manager_util_test.cpp +++ b/cmds/statsd/tests/metrics/parsing_utils/metrics_manager_util_test.cpp @@ -14,6 +14,7 @@ #include "src/metrics/parsing_utils/metrics_manager_util.h" +#include <gmock/gmock.h> #include <gtest/gtest.h> #include <private/android_filesystem_config.h> #include <stdio.h> @@ -388,6 +389,7 @@ TEST(MetricsManagerTest, TestInitialConditions) { vector<sp<ConditionTracker>> allConditionTrackers; unordered_map<int64_t, int> conditionTrackerMap; vector<sp<MetricProducer>> allMetricProducers; + unordered_map<int64_t, int> metricProducerMap; std::vector<sp<AnomalyTracker>> allAnomalyTrackers; std::vector<sp<AlarmTracker>> allAlarmTrackers; unordered_map<int, std::vector<int>> conditionToMetricMap; @@ -397,15 +399,17 @@ TEST(MetricsManagerTest, TestInitialConditions) { unordered_map<int, std::vector<int>> deactivationAtomTrackerToMetricMap; unordered_map<int64_t, int> alertTrackerMap; vector<int> metricsWithActivation; + map<int64_t, uint64_t> stateProtoHashes; std::set<int64_t> noReportMetricIds; EXPECT_TRUE(initStatsdConfig( kConfigKey, config, uidMap, pullerManager, anomalyAlarmMonitor, periodicAlarmMonitor, timeBaseSec, timeBaseSec, allTagIds, allAtomMatchingTrackers, atomMatchingTrackerMap, - allConditionTrackers, conditionTrackerMap, allMetricProducers, allAnomalyTrackers, - allAlarmTrackers, conditionToMetricMap, trackerToMetricMap, trackerToConditionMap, - activationAtomTrackerToMetricMap, deactivationAtomTrackerToMetricMap, alertTrackerMap, - metricsWithActivation, noReportMetricIds)); + allConditionTrackers, conditionTrackerMap, allMetricProducers, metricProducerMap, + allAnomalyTrackers, allAlarmTrackers, conditionToMetricMap, trackerToMetricMap, + trackerToConditionMap, activationAtomTrackerToMetricMap, + deactivationAtomTrackerToMetricMap, alertTrackerMap, metricsWithActivation, + stateProtoHashes, noReportMetricIds)); ASSERT_EQ(4u, allMetricProducers.size()); ASSERT_EQ(5u, allConditionTrackers.size()); @@ -438,6 +442,7 @@ TEST(MetricsManagerTest, TestGoodConfig) { vector<sp<ConditionTracker>> allConditionTrackers; unordered_map<int64_t, int> conditionTrackerMap; vector<sp<MetricProducer>> allMetricProducers; + unordered_map<int64_t, int> metricProducerMap; std::vector<sp<AnomalyTracker>> allAnomalyTrackers; std::vector<sp<AlarmTracker>> allAlarmTrackers; unordered_map<int, std::vector<int>> conditionToMetricMap; @@ -447,16 +452,19 @@ TEST(MetricsManagerTest, TestGoodConfig) { unordered_map<int, std::vector<int>> deactivationAtomTrackerToMetricMap; unordered_map<int64_t, int> alertTrackerMap; vector<int> metricsWithActivation; + map<int64_t, uint64_t> stateProtoHashes; std::set<int64_t> noReportMetricIds; EXPECT_TRUE(initStatsdConfig( kConfigKey, config, uidMap, pullerManager, anomalyAlarmMonitor, periodicAlarmMonitor, timeBaseSec, timeBaseSec, allTagIds, allAtomMatchingTrackers, atomMatchingTrackerMap, - allConditionTrackers, conditionTrackerMap, allMetricProducers, allAnomalyTrackers, - allAlarmTrackers, conditionToMetricMap, trackerToMetricMap, trackerToConditionMap, - activationAtomTrackerToMetricMap, deactivationAtomTrackerToMetricMap, alertTrackerMap, - metricsWithActivation, noReportMetricIds)); + allConditionTrackers, conditionTrackerMap, allMetricProducers, metricProducerMap, + allAnomalyTrackers, allAlarmTrackers, conditionToMetricMap, trackerToMetricMap, + trackerToConditionMap, activationAtomTrackerToMetricMap, + deactivationAtomTrackerToMetricMap, alertTrackerMap, metricsWithActivation, + stateProtoHashes, noReportMetricIds)); ASSERT_EQ(1u, allMetricProducers.size()); + EXPECT_THAT(metricProducerMap, UnorderedElementsAre(Pair(config.count_metric(0).id(), 0))); ASSERT_EQ(1u, allAnomalyTrackers.size()); ASSERT_EQ(1u, noReportMetricIds.size()); ASSERT_EQ(1u, alertTrackerMap.size()); @@ -476,6 +484,7 @@ TEST(MetricsManagerTest, TestDimensionMetricsWithMultiTags) { vector<sp<ConditionTracker>> allConditionTrackers; unordered_map<int64_t, int> conditionTrackerMap; vector<sp<MetricProducer>> allMetricProducers; + unordered_map<int64_t, int> metricProducerMap; std::vector<sp<AnomalyTracker>> allAnomalyTrackers; std::vector<sp<AlarmTracker>> allAlarmTrackers; unordered_map<int, std::vector<int>> conditionToMetricMap; @@ -485,15 +494,17 @@ TEST(MetricsManagerTest, TestDimensionMetricsWithMultiTags) { unordered_map<int, std::vector<int>> deactivationAtomTrackerToMetricMap; unordered_map<int64_t, int> alertTrackerMap; vector<int> metricsWithActivation; + map<int64_t, uint64_t> stateProtoHashes; std::set<int64_t> noReportMetricIds; EXPECT_FALSE(initStatsdConfig( kConfigKey, config, uidMap, pullerManager, anomalyAlarmMonitor, periodicAlarmMonitor, timeBaseSec, timeBaseSec, allTagIds, allAtomMatchingTrackers, atomMatchingTrackerMap, - allConditionTrackers, conditionTrackerMap, allMetricProducers, allAnomalyTrackers, - allAlarmTrackers, conditionToMetricMap, trackerToMetricMap, trackerToConditionMap, - activationAtomTrackerToMetricMap, deactivationAtomTrackerToMetricMap, alertTrackerMap, - metricsWithActivation, noReportMetricIds)); + allConditionTrackers, conditionTrackerMap, allMetricProducers, metricProducerMap, + allAnomalyTrackers, allAlarmTrackers, conditionToMetricMap, trackerToMetricMap, + trackerToConditionMap, activationAtomTrackerToMetricMap, + deactivationAtomTrackerToMetricMap, alertTrackerMap, metricsWithActivation, + stateProtoHashes, noReportMetricIds)); } TEST(MetricsManagerTest, TestCircleLogMatcherDependency) { @@ -508,6 +519,7 @@ TEST(MetricsManagerTest, TestCircleLogMatcherDependency) { vector<sp<ConditionTracker>> allConditionTrackers; unordered_map<int64_t, int> conditionTrackerMap; vector<sp<MetricProducer>> allMetricProducers; + unordered_map<int64_t, int> metricProducerMap; std::vector<sp<AnomalyTracker>> allAnomalyTrackers; std::vector<sp<AlarmTracker>> allAlarmTrackers; unordered_map<int, std::vector<int>> conditionToMetricMap; @@ -517,15 +529,17 @@ TEST(MetricsManagerTest, TestCircleLogMatcherDependency) { unordered_map<int, std::vector<int>> deactivationAtomTrackerToMetricMap; unordered_map<int64_t, int> alertTrackerMap; vector<int> metricsWithActivation; + map<int64_t, uint64_t> stateProtoHashes; std::set<int64_t> noReportMetricIds; EXPECT_FALSE(initStatsdConfig( kConfigKey, config, uidMap, pullerManager, anomalyAlarmMonitor, periodicAlarmMonitor, timeBaseSec, timeBaseSec, allTagIds, allAtomMatchingTrackers, atomMatchingTrackerMap, - allConditionTrackers, conditionTrackerMap, allMetricProducers, allAnomalyTrackers, - allAlarmTrackers, conditionToMetricMap, trackerToMetricMap, trackerToConditionMap, - activationAtomTrackerToMetricMap, deactivationAtomTrackerToMetricMap, alertTrackerMap, - metricsWithActivation, noReportMetricIds)); + allConditionTrackers, conditionTrackerMap, allMetricProducers, metricProducerMap, + allAnomalyTrackers, allAlarmTrackers, conditionToMetricMap, trackerToMetricMap, + trackerToConditionMap, activationAtomTrackerToMetricMap, + deactivationAtomTrackerToMetricMap, alertTrackerMap, metricsWithActivation, + stateProtoHashes, noReportMetricIds)); } TEST(MetricsManagerTest, TestMissingMatchers) { @@ -540,6 +554,7 @@ TEST(MetricsManagerTest, TestMissingMatchers) { vector<sp<ConditionTracker>> allConditionTrackers; unordered_map<int64_t, int> conditionTrackerMap; vector<sp<MetricProducer>> allMetricProducers; + unordered_map<int64_t, int> metricProducerMap; std::vector<sp<AnomalyTracker>> allAnomalyTrackers; std::vector<sp<AlarmTracker>> allAlarmTrackers; unordered_map<int, std::vector<int>> conditionToMetricMap; @@ -549,14 +564,16 @@ TEST(MetricsManagerTest, TestMissingMatchers) { unordered_map<int, std::vector<int>> deactivationAtomTrackerToMetricMap; unordered_map<int64_t, int> alertTrackerMap; vector<int> metricsWithActivation; + map<int64_t, uint64_t> stateProtoHashes; std::set<int64_t> noReportMetricIds; EXPECT_FALSE(initStatsdConfig( kConfigKey, config, uidMap, pullerManager, anomalyAlarmMonitor, periodicAlarmMonitor, timeBaseSec, timeBaseSec, allTagIds, allAtomMatchingTrackers, atomMatchingTrackerMap, - allConditionTrackers, conditionTrackerMap, allMetricProducers, allAnomalyTrackers, - allAlarmTrackers, conditionToMetricMap, trackerToMetricMap, trackerToConditionMap, - activationAtomTrackerToMetricMap, deactivationAtomTrackerToMetricMap, alertTrackerMap, - metricsWithActivation, noReportMetricIds)); + allConditionTrackers, conditionTrackerMap, allMetricProducers, metricProducerMap, + allAnomalyTrackers, allAlarmTrackers, conditionToMetricMap, trackerToMetricMap, + trackerToConditionMap, activationAtomTrackerToMetricMap, + deactivationAtomTrackerToMetricMap, alertTrackerMap, metricsWithActivation, + stateProtoHashes, noReportMetricIds)); } TEST(MetricsManagerTest, TestMissingPredicate) { @@ -571,6 +588,7 @@ TEST(MetricsManagerTest, TestMissingPredicate) { vector<sp<ConditionTracker>> allConditionTrackers; unordered_map<int64_t, int> conditionTrackerMap; vector<sp<MetricProducer>> allMetricProducers; + unordered_map<int64_t, int> metricProducerMap; std::vector<sp<AnomalyTracker>> allAnomalyTrackers; std::vector<sp<AlarmTracker>> allAlarmTrackers; unordered_map<int, std::vector<int>> conditionToMetricMap; @@ -580,14 +598,16 @@ TEST(MetricsManagerTest, TestMissingPredicate) { unordered_map<int, std::vector<int>> deactivationAtomTrackerToMetricMap; unordered_map<int64_t, int> alertTrackerMap; vector<int> metricsWithActivation; + map<int64_t, uint64_t> stateProtoHashes; std::set<int64_t> noReportMetricIds; EXPECT_FALSE(initStatsdConfig( kConfigKey, config, uidMap, pullerManager, anomalyAlarmMonitor, periodicAlarmMonitor, timeBaseSec, timeBaseSec, allTagIds, allAtomMatchingTrackers, atomMatchingTrackerMap, - allConditionTrackers, conditionTrackerMap, allMetricProducers, allAnomalyTrackers, - allAlarmTrackers, conditionToMetricMap, trackerToMetricMap, trackerToConditionMap, - activationAtomTrackerToMetricMap, deactivationAtomTrackerToMetricMap, alertTrackerMap, - metricsWithActivation, noReportMetricIds)); + allConditionTrackers, conditionTrackerMap, allMetricProducers, metricProducerMap, + allAnomalyTrackers, allAlarmTrackers, conditionToMetricMap, trackerToMetricMap, + trackerToConditionMap, activationAtomTrackerToMetricMap, + deactivationAtomTrackerToMetricMap, alertTrackerMap, metricsWithActivation, + stateProtoHashes, noReportMetricIds)); } TEST(MetricsManagerTest, TestCirclePredicateDependency) { @@ -602,6 +622,7 @@ TEST(MetricsManagerTest, TestCirclePredicateDependency) { vector<sp<ConditionTracker>> allConditionTrackers; unordered_map<int64_t, int> conditionTrackerMap; vector<sp<MetricProducer>> allMetricProducers; + unordered_map<int64_t, int> metricProducerMap; std::vector<sp<AnomalyTracker>> allAnomalyTrackers; std::vector<sp<AlarmTracker>> allAlarmTrackers; unordered_map<int, std::vector<int>> conditionToMetricMap; @@ -611,15 +632,17 @@ TEST(MetricsManagerTest, TestCirclePredicateDependency) { unordered_map<int, std::vector<int>> deactivationAtomTrackerToMetricMap; unordered_map<int64_t, int> alertTrackerMap; vector<int> metricsWithActivation; + map<int64_t, uint64_t> stateProtoHashes; std::set<int64_t> noReportMetricIds; EXPECT_FALSE(initStatsdConfig( kConfigKey, config, uidMap, pullerManager, anomalyAlarmMonitor, periodicAlarmMonitor, timeBaseSec, timeBaseSec, allTagIds, allAtomMatchingTrackers, atomMatchingTrackerMap, - allConditionTrackers, conditionTrackerMap, allMetricProducers, allAnomalyTrackers, - allAlarmTrackers, conditionToMetricMap, trackerToMetricMap, trackerToConditionMap, - activationAtomTrackerToMetricMap, deactivationAtomTrackerToMetricMap, alertTrackerMap, - metricsWithActivation, noReportMetricIds)); + allConditionTrackers, conditionTrackerMap, allMetricProducers, metricProducerMap, + allAnomalyTrackers, allAlarmTrackers, conditionToMetricMap, trackerToMetricMap, + trackerToConditionMap, activationAtomTrackerToMetricMap, + deactivationAtomTrackerToMetricMap, alertTrackerMap, metricsWithActivation, + stateProtoHashes, noReportMetricIds)); } TEST(MetricsManagerTest, testAlertWithUnknownMetric) { @@ -634,6 +657,7 @@ TEST(MetricsManagerTest, testAlertWithUnknownMetric) { vector<sp<ConditionTracker>> allConditionTrackers; unordered_map<int64_t, int> conditionTrackerMap; vector<sp<MetricProducer>> allMetricProducers; + unordered_map<int64_t, int> metricProducerMap; std::vector<sp<AnomalyTracker>> allAnomalyTrackers; std::vector<sp<AlarmTracker>> allAlarmTrackers; unordered_map<int, std::vector<int>> conditionToMetricMap; @@ -643,15 +667,17 @@ TEST(MetricsManagerTest, testAlertWithUnknownMetric) { unordered_map<int, std::vector<int>> deactivationAtomTrackerToMetricMap; unordered_map<int64_t, int> alertTrackerMap; vector<int> metricsWithActivation; + map<int64_t, uint64_t> stateProtoHashes; std::set<int64_t> noReportMetricIds; EXPECT_FALSE(initStatsdConfig( kConfigKey, config, uidMap, pullerManager, anomalyAlarmMonitor, periodicAlarmMonitor, timeBaseSec, timeBaseSec, allTagIds, allAtomMatchingTrackers, atomMatchingTrackerMap, - allConditionTrackers, conditionTrackerMap, allMetricProducers, allAnomalyTrackers, - allAlarmTrackers, conditionToMetricMap, trackerToMetricMap, trackerToConditionMap, - activationAtomTrackerToMetricMap, deactivationAtomTrackerToMetricMap, alertTrackerMap, - metricsWithActivation, noReportMetricIds)); + allConditionTrackers, conditionTrackerMap, allMetricProducers, metricProducerMap, + allAnomalyTrackers, allAlarmTrackers, conditionToMetricMap, trackerToMetricMap, + trackerToConditionMap, activationAtomTrackerToMetricMap, + deactivationAtomTrackerToMetricMap, alertTrackerMap, metricsWithActivation, + stateProtoHashes, noReportMetricIds)); } TEST(MetricsManagerTest, TestCreateAtomMatchingTrackerInvalidMatcher) { diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java index caca05a9e3b3..763ce6c6fd17 100644 --- a/core/java/android/app/ActivityThread.java +++ b/core/java/android/app/ActivityThread.java @@ -5418,13 +5418,12 @@ public final class ActivityThread extends ClientTransactionHandler { final int prevState = r.getLifecycleState(); - if (prevState < ON_RESUME || prevState > ON_STOP) { - Log.w(TAG, "Activity state must be in [ON_RESUME..ON_STOP] in order to be relaunched," + if (prevState < ON_START || prevState > ON_STOP) { + Log.w(TAG, "Activity state must be in [ON_START..ON_STOP] in order to be relaunched," + "current state is " + prevState); return; } - // Initialize a relaunch request. final MergedConfiguration mergedConfiguration = new MergedConfiguration( r.createdConfig != null ? r.createdConfig : mConfiguration, diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java index 6737972dc34e..1ff48f6baa6a 100644 --- a/core/java/android/app/Notification.java +++ b/core/java/android/app/Notification.java @@ -207,7 +207,7 @@ public class Notification implements Parcelable * <p> * Avoids spamming the system with overly large strings such as full e-mails. */ - private static final int MAX_CHARSEQUENCE_LENGTH = 5 * 1024; + private static final int MAX_CHARSEQUENCE_LENGTH = 1024; /** * Maximum entries of reply text that are accepted by Builder and friends. @@ -7863,7 +7863,7 @@ public class Notification implements Parcelable */ public Message(@NonNull CharSequence text, long timestamp, @Nullable Person sender, boolean remoteInputHistory) { - mText = text; + mText = safeCharSequence(text); mTimestamp = timestamp; mSender = sender; mRemoteInputHistory = remoteInputHistory; @@ -7977,7 +7977,7 @@ public class Notification implements Parcelable bundle.putLong(KEY_TIMESTAMP, mTimestamp); if (mSender != null) { // Legacy listeners need this - bundle.putCharSequence(KEY_SENDER, mSender.getName()); + bundle.putCharSequence(KEY_SENDER, safeCharSequence(mSender.getName())); bundle.putParcelable(KEY_SENDER_PERSON, mSender); } if (mDataMimeType != null) { diff --git a/core/java/android/app/PictureInPictureParams.java b/core/java/android/app/PictureInPictureParams.java index 67d94dec88c5..18c4d70dd9b0 100644 --- a/core/java/android/app/PictureInPictureParams.java +++ b/core/java/android/app/PictureInPictureParams.java @@ -16,6 +16,7 @@ package android.app; +import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.TestApi; import android.graphics.Rect; @@ -46,6 +47,8 @@ public final class PictureInPictureParams implements Parcelable { @Nullable private Rect mSourceRectHint; + private boolean mAutoEnterAllowed; + /** * Sets the aspect ratio. This aspect ratio is defined as the desired width / height, and * does not change upon device rotation. @@ -103,6 +106,25 @@ public final class PictureInPictureParams implements Parcelable { } /** + * Sets whether the system is allowed to automatically put the activity in + * picture-in-picture mode without needing/waiting for the activity to call + * {@link Activity#enterPictureInPictureMode(PictureInPictureParams)}. + * + * If true, {@link Activity#onPictureInPictureRequested()} will never be called. + * + * This property is false by default. + * @param autoEnterAllowed {@code true} if the system is allowed to automatically put the + * activity in picture-in-picture mode. + * + * @return this builder instance. + */ + @NonNull + public Builder setAutoEnterAllowed(boolean autoEnterAllowed) { + mAutoEnterAllowed = autoEnterAllowed; + return this; + } + + /** * @return an immutable {@link PictureInPictureParams} to be used when entering or updating * the activity in picture-in-picture. * @@ -111,7 +133,7 @@ public final class PictureInPictureParams implements Parcelable { */ public PictureInPictureParams build() { PictureInPictureParams params = new PictureInPictureParams(mAspectRatio, mUserActions, - mSourceRectHint); + mSourceRectHint, mAutoEnterAllowed); return params; } } @@ -136,6 +158,11 @@ public final class PictureInPictureParams implements Parcelable { @Nullable private Rect mSourceRectHint; + /** + * Whether the system is allowed to automatically put the activity in picture-in-picture mode. + */ + private boolean mAutoEnterAllowed; + /** {@hide} */ PictureInPictureParams() { } @@ -152,14 +179,18 @@ public final class PictureInPictureParams implements Parcelable { if (in.readInt() != 0) { mSourceRectHint = Rect.CREATOR.createFromParcel(in); } + if (in.readInt() != 0) { + mAutoEnterAllowed = in.readBoolean(); + } } /** {@hide} */ PictureInPictureParams(Rational aspectRatio, List<RemoteAction> actions, - Rect sourceRectHint) { + Rect sourceRectHint, boolean autoEnterAllowed) { mAspectRatio = aspectRatio; mUserActions = actions; mSourceRectHint = sourceRectHint; + mAutoEnterAllowed = autoEnterAllowed; } /** @@ -176,6 +207,7 @@ public final class PictureInPictureParams implements Parcelable { if (otherArgs.hasSourceBoundsHint()) { mSourceRectHint = new Rect(otherArgs.getSourceRectHint()); } + mAutoEnterAllowed = otherArgs.mAutoEnterAllowed; } /** @@ -248,11 +280,20 @@ public final class PictureInPictureParams implements Parcelable { } /** + * @return whether auto pip allowed. + * @hide + */ + public boolean isAutoEnterAllowed() { + return mAutoEnterAllowed; + } + + /** * @return True if no parameters are set * @hide */ public boolean empty() { - return !hasSourceBoundsHint() && !hasSetActions() && !hasSetAspectRatio(); + return !hasSourceBoundsHint() && !hasSetActions() && !hasSetAspectRatio() + && !mAutoEnterAllowed; } @Override @@ -281,6 +322,8 @@ public final class PictureInPictureParams implements Parcelable { } else { out.writeInt(0); } + out.writeInt(1); + out.writeBoolean(mAutoEnterAllowed); } public static final @android.annotation.NonNull Creator<PictureInPictureParams> CREATOR = diff --git a/core/java/android/app/admin/DevicePolicyManager.java b/core/java/android/app/admin/DevicePolicyManager.java index 98de85d9735d..7b3d9f113bda 100644 --- a/core/java/android/app/admin/DevicePolicyManager.java +++ b/core/java/android/app/admin/DevicePolicyManager.java @@ -11992,6 +11992,9 @@ public class DevicePolicyManager { * </ul> * Common Criteria mode is disabled by default. * + * <p><em>Note:</em> if Common Critera mode is turned off after being enabled previously, + * all existing WiFi configurations will be lost. + * * @param admin which {@link DeviceAdminReceiver} this request is associated with. * @param enabled whether Common Criteria mode should be enabled or not. */ diff --git a/core/java/android/app/servertransaction/TransactionExecutorHelper.java b/core/java/android/app/servertransaction/TransactionExecutorHelper.java index a34be5c3edc7..56bf59b52f74 100644 --- a/core/java/android/app/servertransaction/TransactionExecutorHelper.java +++ b/core/java/android/app/servertransaction/TransactionExecutorHelper.java @@ -185,6 +185,9 @@ public class TransactionExecutorHelper { final ActivityLifecycleItem lifecycleItem; switch (prevState) { // TODO(lifecycler): Extend to support all possible states. + case ON_START: + lifecycleItem = StartActivityItem.obtain(); + break; case ON_PAUSE: lifecycleItem = PauseActivityItem.obtain(); break; diff --git a/core/java/android/app/timezonedetector/TimeZoneConfiguration.java b/core/java/android/app/timezonedetector/TimeZoneConfiguration.java index 95db0a26cc6e..e879091cd68e 100644 --- a/core/java/android/app/timezonedetector/TimeZoneConfiguration.java +++ b/core/java/android/app/timezonedetector/TimeZoneConfiguration.java @@ -162,9 +162,9 @@ public final class TimeZoneConfiguration implements Parcelable { @Override public String toString() { - return "TimeZoneDetectorConfiguration{" + return "TimeZoneConfiguration{" + "mUserId=" + mUserId - + "mBundle=" + mBundle + + ", mBundle=" + mBundle + '}'; } diff --git a/core/java/android/content/pm/PackageParser.java b/core/java/android/content/pm/PackageParser.java index 0f1f276ce0f9..e108451b54fb 100644 --- a/core/java/android/content/pm/PackageParser.java +++ b/core/java/android/content/pm/PackageParser.java @@ -30,7 +30,6 @@ import static android.content.pm.ApplicationInfo.FLAG_SUSPENDED; import static android.content.pm.ApplicationInfo.PRIVATE_FLAG_ACTIVITIES_RESIZE_MODE_RESIZEABLE; import static android.content.pm.ApplicationInfo.PRIVATE_FLAG_ACTIVITIES_RESIZE_MODE_RESIZEABLE_VIA_SDK_VERSION; import static android.content.pm.ApplicationInfo.PRIVATE_FLAG_ACTIVITIES_RESIZE_MODE_UNRESIZEABLE; -import static android.content.pm.PackageManager.FEATURE_WATCH; import static android.content.pm.PackageManager.INSTALL_PARSE_FAILED_BAD_MANIFEST; import static android.content.pm.PackageManager.INSTALL_PARSE_FAILED_BAD_PACKAGE_NAME; import static android.content.pm.PackageManager.INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES; @@ -159,8 +158,6 @@ public class PackageParser { SystemProperties.getBoolean(PROPERTY_CHILD_PACKAGES_ENABLED, false); public static final float DEFAULT_PRE_O_MAX_ASPECT_RATIO = 1.86f; - public static final float DEFAULT_PRE_Q_MIN_ASPECT_RATIO = 1.333f; - public static final float DEFAULT_PRE_Q_MIN_ASPECT_RATIO_WATCH = 1f; private static final int DEFAULT_MIN_SDK_VERSION = 1; private static final int DEFAULT_TARGET_SDK_VERSION = 0; @@ -4683,20 +4680,8 @@ public class PackageParser { * ratio set. */ private void setMinAspectRatio(Package owner) { - final float minAspectRatio; - if (owner.applicationInfo.minAspectRatio != 0) { - // Use the application max aspect ration as default if set. - minAspectRatio = owner.applicationInfo.minAspectRatio; - } else { - // Default to (1.33) 4:3 aspect ratio for pre-Q apps and unset for Q and greater. - // NOTE: 4:3 was the min aspect ratio Android devices can support pre-Q per the CDD, - // except for watches which always supported 1:1. - minAspectRatio = owner.applicationInfo.targetSdkVersion >= Build.VERSION_CODES.Q - ? 0 - : (mCallback != null && mCallback.hasFeature(FEATURE_WATCH)) - ? DEFAULT_PRE_Q_MIN_ASPECT_RATIO_WATCH - : DEFAULT_PRE_Q_MIN_ASPECT_RATIO; - } + // Use the application max aspect ration as default if set. + final float minAspectRatio = owner.applicationInfo.minAspectRatio; for (Activity activity : owner.activities) { if (activity.hasMinAspectRatio()) { diff --git a/core/java/android/content/pm/parsing/ApkLiteParseUtils.java b/core/java/android/content/pm/parsing/ApkLiteParseUtils.java index 4914601b0b5a..542cfc29f1a2 100644 --- a/core/java/android/content/pm/parsing/ApkLiteParseUtils.java +++ b/core/java/android/content/pm/parsing/ApkLiteParseUtils.java @@ -67,7 +67,7 @@ public class ApkLiteParseUtils { * Automatically detects if the package is a monolithic style (single APK * file) or cluster style (directory of APKs). * <p> - * This performs sanity checking on cluster style packages, such as + * This performs validity checking on cluster style packages, such as * requiring identical package name and version codes, a single base APK, * and unique split names. * diff --git a/core/java/android/content/pm/parsing/ParsingPackageUtils.java b/core/java/android/content/pm/parsing/ParsingPackageUtils.java index e1f08f3e55a1..d9857e0d2328 100644 --- a/core/java/android/content/pm/parsing/ParsingPackageUtils.java +++ b/core/java/android/content/pm/parsing/ParsingPackageUtils.java @@ -18,7 +18,6 @@ package android.content.pm.parsing; import static android.content.pm.ActivityInfo.FLAG_SUPPORTS_PICTURE_IN_PICTURE; import static android.content.pm.ActivityInfo.RESIZE_MODE_UNRESIZEABLE; -import static android.content.pm.PackageManager.FEATURE_WATCH; import static android.content.pm.PackageManager.INSTALL_PARSE_FAILED_BAD_MANIFEST; import static android.content.pm.PackageManager.INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES; import static android.content.pm.PackageManager.INSTALL_PARSE_FAILED_ONLY_COREAPP_ALLOWED; @@ -211,7 +210,7 @@ public class ParsingPackageUtils { * package is a monolithic style (single APK file) or cluster style * (directory of APKs). * <p> - * This performs sanity checking on cluster style packages, such as + * This performs validity checking on cluster style packages, such as * requiring identical package name and version codes, a single base APK, * and unique split names. * <p> @@ -237,7 +236,7 @@ public class ParsingPackageUtils { /** * Parse all APKs contained in the given directory, treating them as a - * single package. This also performs sanity checking, such as requiring + * single package. This also performs validity checking, such as requiring * identical package name and version codes, a single base APK, and unique * split names. * <p> @@ -2375,21 +2374,8 @@ public class ParsingPackageUtils { * ratio set. */ private void setMinAspectRatio(ParsingPackage pkg) { - final float minAspectRatio; - float packageMinAspectRatio = pkg.getMinAspectRatio(); - if (packageMinAspectRatio != 0) { - // Use the application max aspect ration as default if set. - minAspectRatio = packageMinAspectRatio; - } else { - // Default to (1.33) 4:3 aspect ratio for pre-Q apps and unset for Q and greater. - // NOTE: 4:3 was the min aspect ratio Android devices can support pre-Q per the CDD, - // except for watches which always supported 1:1. - minAspectRatio = pkg.getTargetSdkVersion() >= Build.VERSION_CODES.Q - ? 0 - : (mCallback != null && mCallback.hasFeature(FEATURE_WATCH)) - ? PackageParser.DEFAULT_PRE_Q_MIN_ASPECT_RATIO_WATCH - : PackageParser.DEFAULT_PRE_Q_MIN_ASPECT_RATIO; - } + // Use the application max aspect ration as default if set. + final float minAspectRatio = pkg.getMinAspectRatio(); List<ParsedActivity> activities = pkg.getActivities(); int activitiesSize = activities.size(); diff --git a/core/java/android/os/LocaleList.java b/core/java/android/os/LocaleList.java index ab4bb0b9f2cd..9c0bc45a346e 100644 --- a/core/java/android/os/LocaleList.java +++ b/core/java/android/os/LocaleList.java @@ -25,6 +25,7 @@ import android.icu.util.ULocale; import com.android.internal.annotations.GuardedBy; +import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.HashSet; @@ -151,18 +152,18 @@ public final class LocaleList implements Parcelable { /** * Creates a new {@link LocaleList}. * + * If two or more same locales are passed, the repeated locales will be dropped. * <p>For empty lists of {@link Locale} items it is better to use {@link #getEmptyLocaleList()}, * which returns a pre-constructed empty list.</p> * * @throws NullPointerException if any of the input locales is <code>null</code>. - * @throws IllegalArgumentException if any of the input locales repeat. */ public LocaleList(@NonNull Locale... list) { if (list.length == 0) { mList = sEmptyList; mStringRepresentation = ""; } else { - final Locale[] localeList = new Locale[list.length]; + final ArrayList<Locale> localeList = new ArrayList<>(); final HashSet<Locale> seenLocales = new HashSet<Locale>(); final StringBuilder sb = new StringBuilder(); for (int i = 0; i < list.length; i++) { @@ -170,10 +171,10 @@ public final class LocaleList implements Parcelable { if (l == null) { throw new NullPointerException("list[" + i + "] is null"); } else if (seenLocales.contains(l)) { - throw new IllegalArgumentException("list[" + i + "] is a repetition"); + // Dropping duplicated locale entries. } else { final Locale localeClone = (Locale) l.clone(); - localeList[i] = localeClone; + localeList.add(localeClone); sb.append(localeClone.toLanguageTag()); if (i < list.length - 1) { sb.append(','); @@ -181,7 +182,7 @@ public final class LocaleList implements Parcelable { seenLocales.add(localeClone); } } - mList = localeList; + mList = localeList.toArray(new Locale[localeList.size()]); mStringRepresentation = sb.toString(); } } diff --git a/core/java/android/os/image/DynamicSystemManager.java b/core/java/android/os/image/DynamicSystemManager.java index 17851adac51b..7f01cad940ec 100644 --- a/core/java/android/os/image/DynamicSystemManager.java +++ b/core/java/android/os/image/DynamicSystemManager.java @@ -155,6 +155,19 @@ public class DynamicSystemManager { } } /** + * Complete the current partition installation. + * + * @return true if the partition installation completes without error. + */ + @RequiresPermission(android.Manifest.permission.MANAGE_DYNAMIC_SYSTEM) + public boolean closePartition() { + try { + return mService.closePartition(); + } catch (RemoteException e) { + throw new RuntimeException(e.toString()); + } + } + /** * Finish a previously started installation. Installations without a cooresponding * finishInstallation() will be cleaned up during device boot. */ diff --git a/core/java/android/os/image/IDynamicSystemService.aidl b/core/java/android/os/image/IDynamicSystemService.aidl index a1f927266de3..df0a69b47225 100644 --- a/core/java/android/os/image/IDynamicSystemService.aidl +++ b/core/java/android/os/image/IDynamicSystemService.aidl @@ -39,6 +39,13 @@ interface IDynamicSystemService boolean createPartition(@utf8InCpp String name, long size, boolean readOnly); /** + * Complete the current partition installation. + * + * @return true if the partition installation completes without error. + */ + boolean closePartition(); + + /** * Finish a previously started installation. Installations without * a cooresponding finishInstallation() will be cleaned up during device boot. */ diff --git a/core/java/android/provider/DeviceConfig.java b/core/java/android/provider/DeviceConfig.java index 859b70382328..7a03953f2e9b 100644 --- a/core/java/android/provider/DeviceConfig.java +++ b/core/java/android/provider/DeviceConfig.java @@ -145,6 +145,15 @@ public final class DeviceConfig { public static final String NAMESPACE_CONTENT_CAPTURE = "content_capture"; /** + * Namespace for device idle configurations. + * + * @hide + */ + @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) + @TestApi + public static final String NAMESPACE_DEVICE_IDLE = "device_idle"; + + /** * Namespace for how dex runs. The feature requires a reboot to reach a clean state. * * @deprecated No longer used diff --git a/core/java/android/provider/DocumentsProvider.java b/core/java/android/provider/DocumentsProvider.java index d55fc511fc77..4e1f81919c7d 100644 --- a/core/java/android/provider/DocumentsProvider.java +++ b/core/java/android/provider/DocumentsProvider.java @@ -239,6 +239,10 @@ public abstract class DocumentsProvider extends ContentProvider { } } + private Uri validateIncomingNullableUri(@Nullable Uri uri) { + return uri == null ? null : validateIncomingUri(uri); + } + /** * Create a new document and return its newly generated * {@link Document#COLUMN_DOCUMENT_ID}. You must allocate a new @@ -1086,11 +1090,18 @@ public abstract class DocumentsProvider extends ContentProvider { // If the URI is a tree URI performs some validation. enforceTreeForExtraUris(extras); + final Uri extraUri = validateIncomingNullableUri( + extras.getParcelable(DocumentsContract.EXTRA_URI)); + final Uri extraTargetUri = validateIncomingNullableUri( + extras.getParcelable(DocumentsContract.EXTRA_TARGET_URI)); + final Uri extraParentUri = validateIncomingNullableUri( + extras.getParcelable(DocumentsContract.EXTRA_PARENT_URI)); + if (METHOD_EJECT_ROOT.equals(method)) { // Given that certain system apps can hold MOUNT_UNMOUNT permission, but only apps // signed with platform signature can hold MANAGE_DOCUMENTS, we are going to check for // MANAGE_DOCUMENTS or associated URI permission here instead - final Uri rootUri = extras.getParcelable(DocumentsContract.EXTRA_URI); + final Uri rootUri = extraUri; enforceWritePermissionInner(rootUri, getCallingPackage(), getCallingAttributionTag(), null); @@ -1100,7 +1111,7 @@ public abstract class DocumentsProvider extends ContentProvider { return out; } - final Uri documentUri = extras.getParcelable(DocumentsContract.EXTRA_URI); + final Uri documentUri = extraUri; final String authority = documentUri.getAuthority(); final String documentId = DocumentsContract.getDocumentId(documentUri); @@ -1113,7 +1124,7 @@ public abstract class DocumentsProvider extends ContentProvider { enforceReadPermissionInner(documentUri, getCallingPackage(), getCallingAttributionTag(), null); - final Uri childUri = extras.getParcelable(DocumentsContract.EXTRA_TARGET_URI); + final Uri childUri = extraTargetUri; final String childAuthority = childUri.getAuthority(); final String childId = DocumentsContract.getDocumentId(childUri); @@ -1180,7 +1191,7 @@ public abstract class DocumentsProvider extends ContentProvider { revokeDocumentPermission(documentId); } else if (METHOD_COPY_DOCUMENT.equals(method)) { - final Uri targetUri = extras.getParcelable(DocumentsContract.EXTRA_TARGET_URI); + final Uri targetUri = extraTargetUri; final String targetId = DocumentsContract.getDocumentId(targetUri); enforceReadPermissionInner(documentUri, getCallingPackage(), @@ -1204,9 +1215,9 @@ public abstract class DocumentsProvider extends ContentProvider { } } else if (METHOD_MOVE_DOCUMENT.equals(method)) { - final Uri parentSourceUri = extras.getParcelable(DocumentsContract.EXTRA_PARENT_URI); + final Uri parentSourceUri = extraParentUri; final String parentSourceId = DocumentsContract.getDocumentId(parentSourceUri); - final Uri targetUri = extras.getParcelable(DocumentsContract.EXTRA_TARGET_URI); + final Uri targetUri = extraTargetUri; final String targetId = DocumentsContract.getDocumentId(targetUri); enforceWritePermissionInner(documentUri, getCallingPackage(), @@ -1232,7 +1243,7 @@ public abstract class DocumentsProvider extends ContentProvider { } } else if (METHOD_REMOVE_DOCUMENT.equals(method)) { - final Uri parentSourceUri = extras.getParcelable(DocumentsContract.EXTRA_PARENT_URI); + final Uri parentSourceUri = extraParentUri; final String parentSourceId = DocumentsContract.getDocumentId(parentSourceUri); enforceReadPermissionInner(parentSourceUri, getCallingPackage(), diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java index 03cf0cf2ca78..739e169e44c7 100644 --- a/core/java/android/provider/Settings.java +++ b/core/java/android/provider/Settings.java @@ -11534,38 +11534,6 @@ public final class Settings { public static final String APP_OPS_CONSTANTS = "app_ops_constants"; /** - * Device Idle (Doze) specific settings. - * This is encoded as a key=value list, separated by commas. Ex: - * - * "inactive_to=60000,sensing_to=400000" - * - * The following keys are supported: - * - * <pre> - * inactive_to (long) - * sensing_to (long) - * motion_inactive_to (long) - * idle_after_inactive_to (long) - * idle_pending_to (long) - * max_idle_pending_to (long) - * idle_pending_factor (float) - * quick_doze_delay_to (long) - * idle_to (long) - * max_idle_to (long) - * idle_factor (float) - * min_time_to_alarm (long) - * max_temp_app_whitelist_duration (long) - * notification_whitelist_duration (long) - * </pre> - * - * <p> - * Type: string - * @hide - * @see com.android.server.DeviceIdleController.Constants - */ - public static final String DEVICE_IDLE_CONSTANTS = "device_idle_constants"; - - /** * Battery Saver specific settings * This is encoded as a key=value list, separated by commas. Ex: * diff --git a/core/java/android/telephony/PhoneStateListener.java b/core/java/android/telephony/PhoneStateListener.java index cbc304b3293a..8f31d77ac180 100644 --- a/core/java/android/telephony/PhoneStateListener.java +++ b/core/java/android/telephony/PhoneStateListener.java @@ -486,6 +486,16 @@ public class PhoneStateListener { @RequiresPermission(Manifest.permission.READ_PRECISE_PHONE_STATE) public static final int LISTEN_BARRING_INFO = 0x80000000; + /** + * Listen for changes to the physical channel configuration. + * + * @see #onPhysicalChannelConfigurationChanged + * @hide + */ + @SystemApi + @RequiresPermission(android.Manifest.permission.READ_PRECISE_PHONE_STATE) + public static final long LISTEN_PHYSICAL_CHANNEL_CONFIGURATION = 0x100000000L; + /* * Subscription used to listen to the phone state changes * @hide @@ -1145,6 +1155,18 @@ public class PhoneStateListener { } /** + * Callback invoked when the current physical channel configuration has changed + * + * @param configs List of the current {@link PhysicalChannelConfig}s + * @hide + */ + @SystemApi + public void onPhysicalChannelConfigurationChanged( + @NonNull List<PhysicalChannelConfig> configs) { + // default implementation empty + } + + /** * The callback methods need to be called on the handler thread where * this object was created. If the binder did that for us it'd be nice. * @@ -1447,6 +1469,15 @@ public class PhoneStateListener { Binder.withCleanCallingIdentity( () -> mExecutor.execute(() -> psl.onBarringInfoChanged(barringInfo))); } + + public void onPhysicalChannelConfigurationChanged(List<PhysicalChannelConfig> configs) { + PhoneStateListener psl = mPhoneStateListenerWeakRef.get(); + if (psl == null) return; + + Binder.withCleanCallingIdentity( + () -> mExecutor.execute( + () -> psl.onPhysicalChannelConfigurationChanged(configs))); + } } diff --git a/core/java/android/telephony/TelephonyRegistryManager.java b/core/java/android/telephony/TelephonyRegistryManager.java index a720601d81ff..6d48dc36ceb4 100644 --- a/core/java/android/telephony/TelephonyRegistryManager.java +++ b/core/java/android/telephony/TelephonyRegistryManager.java @@ -211,7 +211,7 @@ public class TelephonyRegistryManager { * @param notifyNow Whether to notify instantly */ public void listenForSubscriber(int subId, @NonNull String pkg, @NonNull String featureId, - @NonNull PhoneStateListener listener, int events, boolean notifyNow) { + @NonNull PhoneStateListener listener, long events, boolean notifyNow) { try { // subId from PhoneStateListener is deprecated Q on forward, use the subId from // TelephonyManager instance. Keep using subId from PhoneStateListener for pre-Q. @@ -754,4 +754,19 @@ public class TelephonyRegistryManager { } } + /** + * Notify {@link PhysicalChannelConfig} has changed for a specific subscription. + * + * @param subId the subId + * @param configs a list of {@link PhysicalChannelConfig}, the configs of physical channel. + */ + public void notifyPhysicalChannelConfigurationForSubscriber( + int subId, List<PhysicalChannelConfig> configs) { + try { + sRegistry.notifyPhysicalChannelConfigurationForSubscriber(subId, configs); + } catch (RemoteException ex) { + // system server crash + } + } + } diff --git a/core/java/android/view/InsetsAnimationControlImpl.java b/core/java/android/view/InsetsAnimationControlImpl.java index 69220722fc05..6ffd892e4351 100644 --- a/core/java/android/view/InsetsAnimationControlImpl.java +++ b/core/java/android/view/InsetsAnimationControlImpl.java @@ -16,6 +16,7 @@ package android.view; +import static android.app.WindowConfiguration.WINDOWING_MODE_UNDEFINED; import static android.view.InsetsController.ANIMATION_TYPE_SHOW; import static android.view.InsetsController.AnimationType; import static android.view.InsetsController.DEBUG; @@ -24,6 +25,7 @@ import static android.view.InsetsState.ISIDE_LEFT; import static android.view.InsetsState.ISIDE_RIGHT; import static android.view.InsetsState.ISIDE_TOP; import static android.view.InsetsState.ITYPE_IME; +import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION; import static com.android.internal.annotations.VisibleForTesting.Visibility.PACKAGE; @@ -308,8 +310,8 @@ public class InsetsAnimationControlImpl implements WindowInsetsAnimationControll false /* isScreenRound */, false /* alwaysConsumeSystemBars */, null /* displayCutout */, LayoutParams.SOFT_INPUT_ADJUST_RESIZE /* legacySoftInputMode*/, - 0 /* legacyWindowFlags */, 0 /* legacySystemUiFlags */, typeSideMap) - .getInsets(mTypes); + 0 /* legacyWindowFlags */, 0 /* legacySystemUiFlags */, TYPE_APPLICATION, + WINDOWING_MODE_UNDEFINED, typeSideMap).getInsets(mTypes); } private Insets sanitize(Insets insets) { diff --git a/core/java/android/view/InsetsController.java b/core/java/android/view/InsetsController.java index 403ac3ab29c0..92eade3affaa 100644 --- a/core/java/android/view/InsetsController.java +++ b/core/java/android/view/InsetsController.java @@ -500,9 +500,11 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation /** Pending control request that is waiting on IME to be ready to be shown */ private PendingControlRequest mPendingImeControlRequest; + private int mWindowType; private int mLastLegacySoftInputMode; private int mLastLegacyWindowFlags; private int mLastLegacySystemUiFlags; + private int mLastWindowingMode; private DisplayCutout mLastDisplayCutout; private boolean mStartingAnimation; private int mCaptionInsetsHeight = 0; @@ -571,7 +573,8 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation WindowInsets insets = state.calculateInsets(mFrame, mState /* ignoringVisibilityState*/, mLastInsets.isRound(), mLastInsets.shouldAlwaysConsumeSystemBars(), mLastDisplayCutout, mLastLegacySoftInputMode, mLastLegacyWindowFlags, - mLastLegacySystemUiFlags, null /* typeSideMap */); + mLastLegacySystemUiFlags, mWindowType, mLastWindowingMode, + null /* typeSideMap */); mHost.dispatchWindowInsetsAnimationProgress(insets, mUnmodifiableTmpRunningAnims); if (DEBUG) { for (WindowInsetsAnimation anim : mUnmodifiableTmpRunningAnims) { @@ -709,9 +712,11 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation * @see InsetsState#calculateInsets */ @VisibleForTesting - public WindowInsets calculateInsets(boolean isScreenRound, - boolean alwaysConsumeSystemBars, DisplayCutout cutout, + public WindowInsets calculateInsets(boolean isScreenRound, boolean alwaysConsumeSystemBars, + DisplayCutout cutout, int windowType, int windowingMode, int legacySoftInputMode, int legacyWindowFlags, int legacySystemUiFlags) { + mWindowType = windowType; + mLastWindowingMode = windowingMode; mLastLegacySoftInputMode = legacySoftInputMode; mLastLegacyWindowFlags = legacyWindowFlags; mLastLegacySystemUiFlags = legacySystemUiFlags; @@ -719,7 +724,7 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation mLastInsets = mState.calculateInsets(mFrame, null /* ignoringVisibilityState*/, isScreenRound, alwaysConsumeSystemBars, cutout, legacySoftInputMode, legacyWindowFlags, legacySystemUiFlags, - null /* typeSideMap */); + windowType, windowingMode, null /* typeSideMap */); return mLastInsets; } diff --git a/core/java/android/view/InsetsSourceConsumer.java b/core/java/android/view/InsetsSourceConsumer.java index 700dc66fab55..ba40459692f7 100644 --- a/core/java/android/view/InsetsSourceConsumer.java +++ b/core/java/android/view/InsetsSourceConsumer.java @@ -113,13 +113,20 @@ public class InsetsSourceConsumer { InsetsState.typeToString(control.getType()), mController.getHost().getRootViewTitle())); } - // We are loosing control if (mSourceControl == null) { + // We are loosing control mController.notifyControlRevoked(this); - // Restore server visibility. - mState.getSource(getType()).setVisible( - mController.getLastDispatchedState().getSource(getType()).isVisible()); + // Check if we need to restore server visibility. + final InsetsSource source = mState.getSource(mType); + final boolean serverVisibility = + mController.getLastDispatchedState().getSourceOrDefaultVisibility(mType); + if (source.isVisible() != serverVisibility) { + source.setVisible(serverVisibility); + mController.notifyVisibilityChanged(); + } + + // For updateCompatSysUiVisibility applyLocalVisibilityOverride(); } else { // We are gaining control, and need to run an animation since previous state diff --git a/core/java/android/view/InsetsState.java b/core/java/android/view/InsetsState.java index 593b37af26ad..373a0963dc2f 100644 --- a/core/java/android/view/InsetsState.java +++ b/core/java/android/view/InsetsState.java @@ -30,11 +30,15 @@ import static android.view.WindowInsets.Type.isVisibleInsetsType; import static android.view.WindowInsets.Type.statusBars; import static android.view.WindowInsets.Type.systemBars; import static android.view.WindowManager.LayoutParams.FLAG_FULLSCREEN; +import static android.view.WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS; import static android.view.WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE; import static android.view.WindowManager.LayoutParams.SOFT_INPUT_MASK_ADJUST; +import static android.view.WindowManager.LayoutParams.TYPE_SYSTEM_ERROR; +import static android.view.WindowManager.LayoutParams.TYPE_WALLPAPER; import android.annotation.IntDef; import android.annotation.Nullable; +import android.app.WindowConfiguration; import android.graphics.Insets; import android.graphics.Rect; import android.os.Parcel; @@ -174,6 +178,7 @@ public class InsetsState implements Parcelable { public WindowInsets calculateInsets(Rect frame, @Nullable InsetsState ignoringVisibilityState, boolean isScreenRound, boolean alwaysConsumeSystemBars, DisplayCutout cutout, int legacySoftInputMode, int legacyWindowFlags, int legacySystemUiFlags, + int windowType, @WindowConfiguration.WindowingMode int windowingMode, @Nullable @InternalInsetsSide SparseIntArray typeSideMap) { Insets[] typeInsetsMap = new Insets[Type.SIZE]; Insets[] typeMaxInsetsMap = new Insets[Type.SIZE]; @@ -228,6 +233,9 @@ public class InsetsState implements Parcelable { if ((legacyWindowFlags & FLAG_FULLSCREEN) != 0) { compatInsetsTypes &= ~statusBars(); } + if (clearCompatInsets(windowType, legacyWindowFlags, windowingMode)) { + compatInsetsTypes = 0; + } return new WindowInsets(typeInsetsMap, typeMaxInsetsMap, typeVisibilityMap, isScreenRound, alwaysConsumeSystemBars, cutout, compatInsetsTypes, @@ -449,6 +457,12 @@ public class InsetsState implements Parcelable { mSources[source.getType()] = source; } + public static boolean clearCompatInsets(int windowType, int windowFlags, int windowingMode) { + return (windowFlags & FLAG_LAYOUT_NO_LIMITS) != 0 + && windowType != TYPE_WALLPAPER && windowType != TYPE_SYSTEM_ERROR + && !WindowConfiguration.inMultiWindowMode(windowingMode); + } + public static @InternalInsetsType ArraySet<Integer> toInternalType(@InsetsType int types) { final ArraySet<Integer> result = new ArraySet<>(); if ((types & Type.STATUS_BARS) != 0) { diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java index 6e17ac9960a8..f3a8d9754fd4 100644 --- a/core/java/android/view/ViewRootImpl.java +++ b/core/java/android/view/ViewRootImpl.java @@ -53,6 +53,9 @@ import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_APPEARANCE_CO import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_BEHAVIOR_CONTROLLED; import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_FIT_INSETS_CONTROLLED; import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_FORCE_DECOR_VIEW_VISIBILITY; +import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_INSET_PARENT_FRAME_BY_IME; +import static android.view.WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE; +import static android.view.WindowManager.LayoutParams.SOFT_INPUT_MASK_ADJUST; import static android.view.WindowManager.LayoutParams.TYPE_INPUT_METHOD; import static android.view.WindowManager.LayoutParams.TYPE_STATUS_BAR_ADDITIONAL; import static android.view.WindowManager.LayoutParams.TYPE_SYSTEM_ALERT; @@ -1439,14 +1442,13 @@ public final class ViewRootImpl implements ViewParent, } // Don't lose the mode we last auto-computed. - if ((attrs.softInputMode & WindowManager.LayoutParams.SOFT_INPUT_MASK_ADJUST) + if ((attrs.softInputMode & SOFT_INPUT_MASK_ADJUST) == WindowManager.LayoutParams.SOFT_INPUT_ADJUST_UNSPECIFIED) { mWindowAttributes.softInputMode = (mWindowAttributes.softInputMode - & ~WindowManager.LayoutParams.SOFT_INPUT_MASK_ADJUST) - | (oldSoftInputMode & WindowManager.LayoutParams.SOFT_INPUT_MASK_ADJUST); + & ~SOFT_INPUT_MASK_ADJUST) | (oldSoftInputMode & SOFT_INPUT_MASK_ADJUST); } - if ((changes & LayoutParams.SOFT_INPUT_MODE_CHANGED) != 0) { + if (mWindowAttributes.softInputMode != oldSoftInputMode) { requestFitSystemWindows(); } @@ -2063,6 +2065,7 @@ public final class ViewRootImpl implements ViewParent, final int sysUiVis = inOutParams.systemUiVisibility | inOutParams.subtreeSystemUiVisibility; final int flags = inOutParams.flags; final int type = inOutParams.type; + final int adjust = inOutParams.softInputMode & SOFT_INPUT_MASK_ADJUST; if ((inOutParams.privateFlags & PRIVATE_FLAG_APPEARANCE_CONTROLLED) == 0) { inOutParams.insetsFlags.appearance = 0; @@ -2088,12 +2091,13 @@ public final class ViewRootImpl implements ViewParent, } } + inOutParams.privateFlags &= ~PRIVATE_FLAG_INSET_PARENT_FRAME_BY_IME; + if ((inOutParams.privateFlags & PRIVATE_FLAG_FIT_INSETS_CONTROLLED) != 0) { return; } int types = inOutParams.getFitInsetsTypes(); - int sides = inOutParams.getFitInsetsSides(); boolean ignoreVis = inOutParams.isFitInsetsIgnoringVisibility(); if (((sysUiVis & SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN) != 0 @@ -2108,10 +2112,13 @@ public final class ViewRootImpl implements ViewParent, if (type == TYPE_TOAST || type == TYPE_SYSTEM_ALERT) { ignoreVis = true; } else if ((types & Type.systemBars()) == Type.systemBars()) { - types |= Type.ime(); + if (adjust == SOFT_INPUT_ADJUST_RESIZE) { + types |= Type.ime(); + } else { + inOutParams.privateFlags |= PRIVATE_FLAG_INSET_PARENT_FRAME_BY_IME; + } } inOutParams.setFitInsetsTypes(types); - inOutParams.setFitInsetsSides(sides); inOutParams.setFitInsetsIgnoringVisibility(ignoreVis); // The fitting of insets are not really controlled by the clients, so we remove the flag. @@ -2246,9 +2253,11 @@ public final class ViewRootImpl implements ViewParent, /* package */ WindowInsets getWindowInsets(boolean forceConstruct) { if (mLastWindowInsets == null || forceConstruct) { + final Configuration config = mContext.getResources().getConfiguration(); mLastWindowInsets = mInsetsController.calculateInsets( - mContext.getResources().getConfiguration().isScreenRound(), - mAttachInfo.mAlwaysConsumeSystemBars, mPendingDisplayCutout.get(), + config.isScreenRound(), mAttachInfo.mAlwaysConsumeSystemBars, + mPendingDisplayCutout.get(), mWindowAttributes.type, + config.windowConfiguration.getWindowingMode(), mWindowAttributes.softInputMode, mWindowAttributes.flags, (mWindowAttributes.systemUiVisibility | mWindowAttributes.subtreeSystemUiVisibility)); @@ -2481,8 +2490,7 @@ public final class ViewRootImpl implements ViewParent, if (mFirst || mAttachInfo.mViewVisibilityChanged) { mAttachInfo.mViewVisibilityChanged = false; - int resizeMode = mSoftInputMode & - WindowManager.LayoutParams.SOFT_INPUT_MASK_ADJUST; + int resizeMode = mSoftInputMode & SOFT_INPUT_MASK_ADJUST; // If we are in auto resize mode, then we need to determine // what mode to use now. if (resizeMode == WindowManager.LayoutParams.SOFT_INPUT_ADJUST_UNSPECIFIED) { @@ -2495,11 +2503,8 @@ public final class ViewRootImpl implements ViewParent, if (resizeMode == 0) { resizeMode = WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN; } - if ((lp.softInputMode & - WindowManager.LayoutParams.SOFT_INPUT_MASK_ADJUST) != resizeMode) { - lp.softInputMode = (lp.softInputMode & - ~WindowManager.LayoutParams.SOFT_INPUT_MASK_ADJUST) | - resizeMode; + if ((lp.softInputMode & SOFT_INPUT_MASK_ADJUST) != resizeMode) { + lp.softInputMode = (lp.softInputMode & ~SOFT_INPUT_MASK_ADJUST) | resizeMode; params = lp; } } @@ -3234,8 +3239,8 @@ public final class ViewRootImpl implements ViewParent, // Note: must be done after the focus change callbacks, // so all of the view state is set up correctly. - mImeFocusController.onPostWindowFocus(mView.findFocus(), hasWindowFocus, - mWindowAttributes); + mImeFocusController.onPostWindowFocus(mView != null ? mView.findFocus() : null, + hasWindowFocus, mWindowAttributes); if (hasWindowFocus) { // Clear the forward bit. We can just do this directly, since diff --git a/core/java/android/view/WindowInsetsController.java b/core/java/android/view/WindowInsetsController.java index 1a9003581078..e879bb4bff95 100644 --- a/core/java/android/view/WindowInsetsController.java +++ b/core/java/android/view/WindowInsetsController.java @@ -32,8 +32,6 @@ import java.lang.annotation.RetentionPolicy; /** * Interface to control windows that generate insets. - * - * TODO(118118435): Needs more information and examples once the API is more baked. */ public interface WindowInsetsController { diff --git a/core/java/android/view/WindowManager.java b/core/java/android/view/WindowManager.java index 32ee290a0f47..0d62da6bc8e3 100644 --- a/core/java/android/view/WindowManager.java +++ b/core/java/android/view/WindowManager.java @@ -2105,6 +2105,12 @@ public interface WindowManager extends ViewManager { public static final int PRIVATE_FLAG_TRUSTED_OVERLAY = 0x20000000; /** + * Flag to indicate that the parent frame of a window should be inset by IME. + * @hide + */ + public static final int PRIVATE_FLAG_INSET_PARENT_FRAME_BY_IME = 0x40000000; + + /** * An internal annotation for flags that can be specified to {@link #softInputMode}. * * @hide diff --git a/core/java/android/view/WindowManagerImpl.java b/core/java/android/view/WindowManagerImpl.java index 27fbfb6d4d17..5d53ad7ef186 100644 --- a/core/java/android/view/WindowManagerImpl.java +++ b/core/java/android/view/WindowManagerImpl.java @@ -29,6 +29,7 @@ import android.annotation.UiContext; import android.app.ResourcesManager; import android.compat.annotation.UnsupportedAppUsage; import android.content.Context; +import android.content.res.Configuration; import android.graphics.Insets; import android.graphics.Rect; import android.graphics.Region; @@ -271,13 +272,14 @@ public final class WindowManagerImpl implements WindowManager { final boolean alwaysConsumeSystemBars = WindowManagerGlobal.getWindowManagerService() .getWindowInsets(attrs, mContext.getDisplayId(), systemWindowInsets, stableInsets, displayCutout, insetsState); - final boolean isScreenRound = - mContext.getResources().getConfiguration().isScreenRound(); + final Configuration config = mContext.getResources().getConfiguration(); + final boolean isScreenRound = config.isScreenRound(); + final int windowingMode = config.windowConfiguration.getWindowingMode(); if (ViewRootImpl.sNewInsetsMode == NEW_INSETS_MODE_FULL) { return insetsState.calculateInsets(bounds, null /* ignoringVisibilityState*/, isScreenRound, alwaysConsumeSystemBars, displayCutout.get(), - SOFT_INPUT_ADJUST_NOTHING, attrs.flags, - SYSTEM_UI_FLAG_VISIBLE, null /* typeSideMap */); + SOFT_INPUT_ADJUST_NOTHING, attrs.flags, SYSTEM_UI_FLAG_VISIBLE, attrs.type, + windowingMode, null /* typeSideMap */); } else { return new WindowInsets.Builder() .setAlwaysConsumeSystemBars(alwaysConsumeSystemBars) diff --git a/core/java/android/widget/TEST_MAPPING b/core/java/android/widget/TEST_MAPPING index df3024eda4b6..b5beac99d4e2 100644 --- a/core/java/android/widget/TEST_MAPPING +++ b/core/java/android/widget/TEST_MAPPING @@ -36,17 +36,6 @@ "name": "CtsAutoFillServiceTestCases", "options": [ { - "include-filter": "android.autofillservice.cts.AutofillValueTest" - }, - { - "exclude-annotation": "androidx.test.filters.FlakyTest" - } - ] - }, - { - "name": "CtsAutoFillServiceTestCases", - "options": [ - { "include-filter": "android.autofillservice.cts.CheckoutActivityTest" }, { diff --git a/core/java/android/window/DisplayAreaOrganizer.java b/core/java/android/window/DisplayAreaOrganizer.java index f035d36a0f71..78fa30358d74 100644 --- a/core/java/android/window/DisplayAreaOrganizer.java +++ b/core/java/android/window/DisplayAreaOrganizer.java @@ -20,7 +20,6 @@ import android.annotation.NonNull; import android.annotation.RequiresPermission; import android.annotation.TestApi; import android.os.RemoteException; -import android.util.Singleton; import android.view.SurfaceControl; /** @@ -135,22 +134,12 @@ public class DisplayAreaOrganizer extends WindowOrganizer { } }; - private static IDisplayAreaOrganizerController getController() { - return IDisplayAreaOrganizerControllerSingleton.get(); + private IDisplayAreaOrganizerController getController() { + try { + return getWindowOrganizerController().getDisplayAreaOrganizerController(); + } catch (RemoteException e) { + return null; + } } - private static final Singleton<IDisplayAreaOrganizerController> - IDisplayAreaOrganizerControllerSingleton = - new Singleton<IDisplayAreaOrganizerController>() { - @Override - protected IDisplayAreaOrganizerController create() { - try { - return getWindowOrganizerController() - .getDisplayAreaOrganizerController(); - } catch (RemoteException e) { - return null; - } - } - }; - } diff --git a/core/java/android/window/TaskOrganizer.java b/core/java/android/window/TaskOrganizer.java index 38fb023a0822..d8f2bb248fd1 100644 --- a/core/java/android/window/TaskOrganizer.java +++ b/core/java/android/window/TaskOrganizer.java @@ -23,9 +23,10 @@ import android.annotation.RequiresPermission; import android.annotation.TestApi; import android.app.ActivityManager; import android.os.RemoteException; -import android.util.Singleton; import android.view.SurfaceControl; +import com.android.internal.annotations.VisibleForTesting; + import java.util.List; /** @@ -35,13 +36,25 @@ import java.util.List; @TestApi public class TaskOrganizer extends WindowOrganizer { + private ITaskOrganizerController mTaskOrganizerController; + + public TaskOrganizer() { + mTaskOrganizerController = getController(); + } + + /** @hide */ + @VisibleForTesting + public TaskOrganizer(ITaskOrganizerController taskOrganizerController) { + mTaskOrganizerController = taskOrganizerController; + } + /** * Register a TaskOrganizer to manage tasks as they enter a supported windowing mode. */ @RequiresPermission(android.Manifest.permission.MANAGE_ACTIVITY_STACKS) public final void registerOrganizer() { try { - getController().registerTaskOrganizer(mInterface); + mTaskOrganizerController.registerTaskOrganizer(mInterface); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } @@ -51,7 +64,7 @@ public class TaskOrganizer extends WindowOrganizer { @RequiresPermission(android.Manifest.permission.MANAGE_ACTIVITY_STACKS) public final void unregisterOrganizer() { try { - getController().unregisterTaskOrganizer(mInterface); + mTaskOrganizerController.unregisterTaskOrganizer(mInterface); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } @@ -78,9 +91,9 @@ public class TaskOrganizer extends WindowOrganizer { /** Creates a persistent root task in WM for a particular windowing-mode. */ @RequiresPermission(android.Manifest.permission.MANAGE_ACTIVITY_STACKS) @Nullable - public static ActivityManager.RunningTaskInfo createRootTask(int displayId, int windowingMode) { + public ActivityManager.RunningTaskInfo createRootTask(int displayId, int windowingMode) { try { - return getController().createRootTask(displayId, windowingMode); + return mTaskOrganizerController.createRootTask(displayId, windowingMode); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } @@ -88,9 +101,9 @@ public class TaskOrganizer extends WindowOrganizer { /** Deletes a persistent root task in WM */ @RequiresPermission(android.Manifest.permission.MANAGE_ACTIVITY_STACKS) - public static boolean deleteRootTask(@NonNull WindowContainerToken task) { + public boolean deleteRootTask(@NonNull WindowContainerToken task) { try { - return getController().deleteRootTask(task); + return mTaskOrganizerController.deleteRootTask(task); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } @@ -99,10 +112,10 @@ public class TaskOrganizer extends WindowOrganizer { /** Gets direct child tasks (ordered from top-to-bottom) */ @RequiresPermission(android.Manifest.permission.MANAGE_ACTIVITY_STACKS) @Nullable - public static List<ActivityManager.RunningTaskInfo> getChildTasks( + public List<ActivityManager.RunningTaskInfo> getChildTasks( @NonNull WindowContainerToken parent, @NonNull int[] activityTypes) { try { - return getController().getChildTasks(parent, activityTypes); + return mTaskOrganizerController.getChildTasks(parent, activityTypes); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } @@ -111,10 +124,10 @@ public class TaskOrganizer extends WindowOrganizer { /** Gets all root tasks on a display (ordered from top-to-bottom) */ @RequiresPermission(android.Manifest.permission.MANAGE_ACTIVITY_STACKS) @Nullable - public static List<ActivityManager.RunningTaskInfo> getRootTasks( + public List<ActivityManager.RunningTaskInfo> getRootTasks( int displayId, @NonNull int[] activityTypes) { try { - return getController().getRootTasks(displayId, activityTypes); + return mTaskOrganizerController.getRootTasks(displayId, activityTypes); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } @@ -123,9 +136,9 @@ public class TaskOrganizer extends WindowOrganizer { /** Get the root task which contains the current ime target */ @RequiresPermission(android.Manifest.permission.MANAGE_ACTIVITY_STACKS) @Nullable - public static WindowContainerToken getImeTarget(int display) { + public WindowContainerToken getImeTarget(int display) { try { - return getController().getImeTarget(display); + return mTaskOrganizerController.getImeTarget(display); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } @@ -136,9 +149,9 @@ public class TaskOrganizer extends WindowOrganizer { * root and thus new tasks just end up directly on the display. */ @RequiresPermission(android.Manifest.permission.MANAGE_ACTIVITY_STACKS) - public static void setLaunchRoot(int displayId, @NonNull WindowContainerToken root) { + public void setLaunchRoot(int displayId, @NonNull WindowContainerToken root) { try { - getController().setLaunchRoot(displayId, root); + mTaskOrganizerController.setLaunchRoot(displayId, root); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } @@ -152,7 +165,7 @@ public class TaskOrganizer extends WindowOrganizer { public void setInterceptBackPressedOnTaskRoot(@NonNull WindowContainerToken task, boolean interceptBackPressed) { try { - getController().setInterceptBackPressedOnTaskRoot(task, interceptBackPressed); + mTaskOrganizerController.setInterceptBackPressedOnTaskRoot(task, interceptBackPressed); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } @@ -181,19 +194,11 @@ public class TaskOrganizer extends WindowOrganizer { } }; - private static ITaskOrganizerController getController() { - return ITaskOrganizerControllerSingleton.get(); + private ITaskOrganizerController getController() { + try { + return getWindowOrganizerController().getTaskOrganizerController(); + } catch (RemoteException e) { + return null; + } } - - private static final Singleton<ITaskOrganizerController> ITaskOrganizerControllerSingleton = - new Singleton<ITaskOrganizerController>() { - @Override - protected ITaskOrganizerController create() { - try { - return getWindowOrganizerController().getTaskOrganizerController(); - } catch (RemoteException e) { - return null; - } - } - }; } diff --git a/core/java/android/window/TaskOrganizerTaskEmbedder.java b/core/java/android/window/TaskOrganizerTaskEmbedder.java index eb9dfed7f644..1e293df38cf8 100644 --- a/core/java/android/window/TaskOrganizerTaskEmbedder.java +++ b/core/java/android/window/TaskOrganizerTaskEmbedder.java @@ -109,7 +109,7 @@ public class TaskOrganizerTaskEmbedder extends TaskEmbedder { } WindowContainerTransaction wct = new WindowContainerTransaction(); wct.setHidden(mTaskToken, false /* hidden */); - WindowOrganizer.applyTransaction(wct); + mTaskOrganizer.applyTransaction(wct); // TODO(b/151449487): Only call callback once we enable synchronization if (mListener != null) { mListener.onTaskVisibilityChanged(getTaskId(), true); @@ -133,7 +133,7 @@ public class TaskOrganizerTaskEmbedder extends TaskEmbedder { } WindowContainerTransaction wct = new WindowContainerTransaction(); wct.setHidden(mTaskToken, true /* hidden */); - WindowOrganizer.applyTransaction(wct); + mTaskOrganizer.applyTransaction(wct); // TODO(b/151449487): Only call callback once we enable synchronization if (mListener != null) { mListener.onTaskVisibilityChanged(getTaskId(), false); @@ -165,7 +165,7 @@ public class TaskOrganizerTaskEmbedder extends TaskEmbedder { WindowContainerTransaction wct = new WindowContainerTransaction(); wct.setBounds(mTaskToken, screenBounds); // TODO(b/151449487): Enable synchronization - WindowOrganizer.applyTransaction(wct); + mTaskOrganizer.applyTransaction(wct); } /** diff --git a/core/java/android/window/WindowOrganizer.java b/core/java/android/window/WindowOrganizer.java index ff40ddac134e..97a97d9984f9 100644 --- a/core/java/android/window/WindowOrganizer.java +++ b/core/java/android/window/WindowOrganizer.java @@ -38,7 +38,7 @@ public class WindowOrganizer { * @param t The transaction to apply. */ @RequiresPermission(android.Manifest.permission.MANAGE_ACTIVITY_STACKS) - public static void applyTransaction(@NonNull WindowContainerTransaction t) { + public void applyTransaction(@NonNull WindowContainerTransaction t) { try { getWindowOrganizerController().applyTransaction(t); } catch (RemoteException e) { @@ -74,7 +74,7 @@ public class WindowOrganizer { */ @Nullable @RequiresPermission(android.Manifest.permission.READ_FRAME_BUFFER) - public static SurfaceControl takeScreenshot(@NonNull WindowContainerToken token) { + public SurfaceControl takeScreenshot(@NonNull WindowContainerToken token) { try { SurfaceControl surfaceControl = new SurfaceControl(); if (getWindowOrganizerController().takeScreenshot(token, surfaceControl)) { @@ -88,7 +88,7 @@ public class WindowOrganizer { } @RequiresPermission(android.Manifest.permission.MANAGE_ACTIVITY_STACKS) - static IWindowOrganizerController getWindowOrganizerController() { + IWindowOrganizerController getWindowOrganizerController() { return IWindowOrganizerControllerSingleton.get(); } diff --git a/core/java/com/android/internal/policy/DecorContext.java b/core/java/com/android/internal/policy/DecorContext.java index 51b41198e272..5e34c15c42e2 100644 --- a/core/java/com/android/internal/policy/DecorContext.java +++ b/core/java/com/android/internal/policy/DecorContext.java @@ -20,8 +20,10 @@ import android.content.AutofillOptions; import android.content.ContentCaptureOptions; import android.content.Context; import android.content.res.AssetManager; +import android.content.res.Configuration; import android.content.res.Resources; import android.view.ContextThemeWrapper; +import android.view.Display; import android.view.contentcapture.ContentCaptureManager; import com.android.internal.annotations.VisibleForTesting; @@ -47,9 +49,17 @@ public class DecorContext extends ContextThemeWrapper { public DecorContext(Context baseContext, PhoneWindow phoneWindow) { super(null /* base */, null); setPhoneWindow(phoneWindow); - final Context displayContext = baseContext.createDisplayContext( - // TODO(b/149790106): Non-activity context can be passed. - phoneWindow.getContext().getDisplayNoVerify()); + // TODO(b/149790106): Non-activity context can be passed. + final Display display = phoneWindow.getContext().getDisplayNoVerify(); + final Context displayContext; + if (display.getDisplayId() == Display.DEFAULT_DISPLAY) { + // TODO(b/166174272): Creating a display context for the default display will result + // in additional resource creation. + displayContext = baseContext.createConfigurationContext(Configuration.EMPTY); + displayContext.updateDisplay(Display.DEFAULT_DISPLAY); + } else { + displayContext = baseContext.createDisplayContext(display); + } attachBaseContext(displayContext); } diff --git a/core/java/com/android/internal/policy/DecorView.java b/core/java/com/android/internal/policy/DecorView.java index b12c5e9ba5b0..a6c3dd1071c9 100644 --- a/core/java/com/android/internal/policy/DecorView.java +++ b/core/java/com/android/internal/policy/DecorView.java @@ -24,6 +24,7 @@ import static android.os.Build.VERSION_CODES.M; import static android.os.Build.VERSION_CODES.N; import static android.view.InsetsState.ITYPE_NAVIGATION_BAR; import static android.view.InsetsState.ITYPE_STATUS_BAR; +import static android.view.InsetsState.clearCompatInsets; import static android.view.View.MeasureSpec.AT_MOST; import static android.view.View.MeasureSpec.EXACTLY; import static android.view.View.MeasureSpec.getMode; @@ -1097,10 +1098,12 @@ public class DecorView extends FrameLayout implements RootViewSurfaceTaker, Wind final Insets systemBarInsets = insets.getInsets(WindowInsets.Type.systemBars()); final Insets stableBarInsets = insets.getInsetsIgnoringVisibility( WindowInsets.Type.systemBars()); - mLastTopInset = systemBarInsets.top; - mLastBottomInset = systemBarInsets.bottom; - mLastRightInset = systemBarInsets.right; - mLastLeftInset = systemBarInsets.left; + final boolean clearCompatInsets = clearCompatInsets(attrs.type, attrs.flags, + getResources().getConfiguration().windowConfiguration.getWindowingMode()); + mLastTopInset = clearCompatInsets ? 0 : systemBarInsets.top; + mLastBottomInset = clearCompatInsets ? 0 : systemBarInsets.bottom; + mLastRightInset = clearCompatInsets ? 0 : systemBarInsets.right; + mLastLeftInset = clearCompatInsets ? 0 : systemBarInsets.left; // Don't animate if the presence of stable insets has changed, because that // indicates that the window was either just added and received them for the diff --git a/core/java/com/android/internal/policy/TaskResizingAlgorithm.java b/core/java/com/android/internal/policy/TaskResizingAlgorithm.java index 1ec020696cf3..64e0b91ae40a 100644 --- a/core/java/com/android/internal/policy/TaskResizingAlgorithm.java +++ b/core/java/com/android/internal/policy/TaskResizingAlgorithm.java @@ -51,8 +51,6 @@ public class TaskResizingAlgorithm { public static final int CTRL_BOTTOM = 0x8; // The minimal aspect ratio which needs to be met to count as landscape (or 1/.. for portrait). - // Note: We do not use the 1.33 from the CDD here since the user is allowed to use what ever - // aspect he desires. @VisibleForTesting public static final float MIN_ASPECT = 1.2f; diff --git a/core/java/com/android/internal/telephony/IPhoneStateListener.aidl b/core/java/com/android/internal/telephony/IPhoneStateListener.aidl index d41d30735d7d..25d1ae699aa6 100644 --- a/core/java/com/android/internal/telephony/IPhoneStateListener.aidl +++ b/core/java/com/android/internal/telephony/IPhoneStateListener.aidl @@ -23,6 +23,7 @@ import android.telephony.CellInfo; import android.telephony.DataConnectionRealTimeInfo; import android.telephony.TelephonyDisplayInfo; import android.telephony.PhoneCapability; +import android.telephony.PhysicalChannelConfig; import android.telephony.PreciseCallState; import android.telephony.PreciseDataConnectionState; import android.telephony.ServiceState; @@ -68,4 +69,6 @@ oneway interface IPhoneStateListener { void onRegistrationFailed(in CellIdentity cellIdentity, String chosenPlmn, int domain, int causeCode, int additionalCauseCode); void onBarringInfoChanged(in BarringInfo barringInfo); + void onPhysicalChannelConfigurationChanged(in List<PhysicalChannelConfig> configs); + } diff --git a/core/java/com/android/internal/telephony/ITelephonyRegistry.aidl b/core/java/com/android/internal/telephony/ITelephonyRegistry.aidl index ea09fc8cd34a..313bd42fe8c1 100644 --- a/core/java/com/android/internal/telephony/ITelephonyRegistry.aidl +++ b/core/java/com/android/internal/telephony/ITelephonyRegistry.aidl @@ -47,10 +47,10 @@ interface ITelephonyRegistry { */ @UnsupportedAppUsage void listen(String pkg, IPhoneStateListener callback, int events, boolean notifyNow); - void listenWithFeature(String pkg, String featureId, IPhoneStateListener callback, int events, + void listenWithFeature(String pkg, String featureId, IPhoneStateListener callback, long events, boolean notifyNow); void listenForSubscriber(in int subId, String pkg, String featureId, - IPhoneStateListener callback, int events, boolean notifyNow); + IPhoneStateListener callback, long events, boolean notifyNow); @UnsupportedAppUsage void notifyCallStateForAllSubs(int state, String incomingNumber); void notifyCallState(in int phoneId, in int subId, int state, String incomingNumber); @@ -99,4 +99,6 @@ interface ITelephonyRegistry { void notifyRegistrationFailed(int slotIndex, int subId, in CellIdentity cellIdentity, String chosenPlmn, int domain, int causeCode, int additionalCauseCode); void notifyBarringInfoChanged(int slotIndex, int subId, in BarringInfo barringInfo); + void notifyPhysicalChannelConfigurationForSubscriber(in int subId, + in List<PhysicalChannelConfig> configs); } diff --git a/core/java/com/android/internal/util/LatencyTracker.java b/core/java/com/android/internal/util/LatencyTracker.java index 67cfc3a7dd49..555f62c53387 100644 --- a/core/java/com/android/internal/util/LatencyTracker.java +++ b/core/java/com/android/internal/util/LatencyTracker.java @@ -14,13 +14,9 @@ package com.android.internal.util; -import android.content.BroadcastReceiver; import android.content.Context; -import android.content.Intent; -import android.content.IntentFilter; import android.os.Build; import android.os.SystemClock; -import android.os.SystemProperties; import android.os.Trace; import android.util.EventLog; import android.util.Log; @@ -29,18 +25,14 @@ import android.util.SparseLongArray; import com.android.internal.logging.EventLogTags; /** - * Class to track various latencies in SystemUI. It then outputs the latency to logcat so these - * latencies can be captured by tests and then used for dashboards. + * Class to track various latencies in SystemUI. It then writes the latency to statsd and also + * outputs it to logcat so these latencies can be captured by tests and then used for dashboards. * <p> * This is currently only in Keyguard so it can be shared between SystemUI and Keyguard, but * eventually we'd want to merge these two packages together so Keyguard can use common classes * that are shared with SystemUI. */ public class LatencyTracker { - - private static final String ACTION_RELOAD_PROPERTY = - "com.android.systemui.RELOAD_LATENCY_TRACKER_PROPERTY"; - private static final String TAG = "LatencyTracker"; /** @@ -82,7 +74,7 @@ public class LatencyTracker { /* * Time between we get a face acquired signal until we start with the unlock animation */ - public static final int ACTION_FACE_WAKE_AND_UNLOCK = 6; + public static final int ACTION_FACE_WAKE_AND_UNLOCK = 7; private static final String[] NAMES = new String[] { "expand panel", @@ -94,38 +86,34 @@ public class LatencyTracker { "rotate the screen", "face wake-and-unlock" }; + private static final int[] STATSD_ACTION = new int[] { + FrameworkStatsLog.UIACTION_LATENCY_REPORTED__ACTION__ACTION_EXPAND_PANEL, + FrameworkStatsLog.UIACTION_LATENCY_REPORTED__ACTION__ACTION_TOGGLE_RECENTS, + FrameworkStatsLog.UIACTION_LATENCY_REPORTED__ACTION__ACTION_FINGERPRINT_WAKE_AND_UNLOCK, + FrameworkStatsLog.UIACTION_LATENCY_REPORTED__ACTION__ACTION_CHECK_CREDENTIAL, + FrameworkStatsLog.UIACTION_LATENCY_REPORTED__ACTION__ACTION_CHECK_CREDENTIAL_UNLOCKED, + FrameworkStatsLog.UIACTION_LATENCY_REPORTED__ACTION__ACTION_TURN_ON_SCREEN, + FrameworkStatsLog.UIACTION_LATENCY_REPORTED__ACTION__ACTION_ROTATE_SCREEN, + FrameworkStatsLog.UIACTION_LATENCY_REPORTED__ACTION__ACTION_FACE_WAKE_AND_UNLOCK, + }; + private static LatencyTracker sLatencyTracker; private final SparseLongArray mStartRtc = new SparseLongArray(); - private boolean mEnabled; public static LatencyTracker getInstance(Context context) { if (sLatencyTracker == null) { - sLatencyTracker = new LatencyTracker(context.getApplicationContext()); + sLatencyTracker = new LatencyTracker(); } return sLatencyTracker; } - private LatencyTracker(Context context) { - context.registerReceiver(new BroadcastReceiver() { - @Override - public void onReceive(Context context, Intent intent) { - reloadProperty(); - } - }, new IntentFilter(ACTION_RELOAD_PROPERTY)); - reloadProperty(); - } - - private void reloadProperty() { - mEnabled = SystemProperties.getBoolean("debug.systemui.latency_tracking", false); - } - public static boolean isEnabled(Context ctx) { return getInstance(ctx).isEnabled(); } public boolean isEnabled() { - return Build.IS_DEBUGGABLE && mEnabled; + return Build.IS_DEBUGGABLE; } /** @@ -134,7 +122,7 @@ public class LatencyTracker { * @param action The action to start. One of the ACTION_* values. */ public void onActionStart(int action) { - if (!mEnabled) { + if (!isEnabled()) { return; } Trace.asyncTraceBegin(Trace.TRACE_TAG_APP, NAMES[action], 0); @@ -147,7 +135,7 @@ public class LatencyTracker { * @param action The action to end. One of the ACTION_* values. */ public void onActionEnd(int action) { - if (!mEnabled) { + if (!isEnabled()) { return; } long endRtc = SystemClock.elapsedRealtime(); @@ -169,5 +157,7 @@ public class LatencyTracker { public static void logAction(int action, int duration) { Log.i(TAG, "action=" + action + " latency=" + duration); EventLog.writeEvent(EventLogTags.SYSUI_LATENCY, action, duration); + FrameworkStatsLog.write( + FrameworkStatsLog.UI_ACTION_LATENCY_REPORTED, STATSD_ACTION[action], duration); } } diff --git a/core/jni/android_view_KeyEvent.cpp b/core/jni/android_view_KeyEvent.cpp index 54567e5010c5..8177ec6df803 100644 --- a/core/jni/android_view_KeyEvent.cpp +++ b/core/jni/android_view_KeyEvent.cpp @@ -20,6 +20,7 @@ #include <android_runtime/AndroidRuntime.h> #include <android_runtime/Log.h> +#include <attestation/HmacKeyManager.h> #include <input/Input.h> #include <nativehelper/ScopedPrimitiveArray.h> #include <nativehelper/ScopedUtfChars.h> diff --git a/core/jni/android_view_MotionEvent.cpp b/core/jni/android_view_MotionEvent.cpp index 2e396f247979..ce8b59941a5a 100644 --- a/core/jni/android_view_MotionEvent.cpp +++ b/core/jni/android_view_MotionEvent.cpp @@ -21,12 +21,13 @@ #include <android/graphics/matrix.h> #include <android_runtime/AndroidRuntime.h> #include <android_runtime/Log.h> -#include <utils/Log.h> +#include <attestation/HmacKeyManager.h> #include <input/Input.h> #include <nativehelper/ScopedUtfChars.h> +#include <utils/Log.h> #include "android_os_Parcel.h" -#include "android_view_MotionEvent.h" #include "android_util_Binder.h" +#include "android_view_MotionEvent.h" #include "core_jni_helpers.h" diff --git a/core/proto/android/app/settings_enums.proto b/core/proto/android/app/settings_enums.proto index 6212bcbbc05f..7fac615aa88d 100644 --- a/core/proto/android/app/settings_enums.proto +++ b/core/proto/android/app/settings_enums.proto @@ -2748,4 +2748,7 @@ enum PageId { // CATEGORY: SETTINGS // OS: R QPR ADAPTIVE_CONNECTIVITY_CATEGORY = 1850; + + // OS: R QPR2 + BLUETOOTH_PAIRING_RECEIVER = 1851; } diff --git a/core/proto/android/providers/settings/config.proto b/core/proto/android/providers/settings/config.proto index b0a70ef56dbc..d433c0e1859d 100644 --- a/core/proto/android/providers/settings/config.proto +++ b/core/proto/android/providers/settings/config.proto @@ -31,11 +31,14 @@ message ConfigSettingsProto { repeated SettingProto activity_manager_settings = 4; repeated SettingProto app_compat_settings = 5; repeated SettingProto autofill_settings = 6; + repeated SettingProto blobstore_settings = 23; repeated SettingProto connectivity_settings = 7; repeated SettingProto content_capture_settings = 8; - repeated SettingProto dex_boot_settings = 9; + repeated SettingProto device_idle_settings = 24; + reserved 9; // dex_boot_settings repeated SettingProto game_driver_settings = 10; repeated SettingProto input_native_boot_settings = 11; + repeated SettingProto job_scheduler_settings = 25; repeated SettingProto netd_native_settings = 12; repeated SettingProto privacy_settings = 13; repeated SettingProto rollback_boot_settings = 14; @@ -47,7 +50,8 @@ message ConfigSettingsProto { repeated SettingProto systemui_settings = 20; repeated SettingProto telephony_settings = 21; repeated SettingProto textclassifier_settings = 22; - repeated SettingProto blobstore_settings = 23; + + // Next tag: 26 message NamespaceProto { optional string namespace = 1; diff --git a/core/proto/android/providers/settings/global.proto b/core/proto/android/providers/settings/global.proto index 9fccdaf9684f..3ec14c01c363 100644 --- a/core/proto/android/providers/settings/global.proto +++ b/core/proto/android/providers/settings/global.proto @@ -292,7 +292,7 @@ message GlobalSettingsProto { optional SettingProto name = 1; optional SettingProto provisioned = 2 [ (android.privacy).dest = DEST_AUTOMATIC ]; optional SettingProto provisioning_mobile_data_enabled = 3 [ (android.privacy).dest = DEST_AUTOMATIC ]; - optional SettingProto idle_constants = 4; + reserved 4; // idle_constants optional SettingProto policy_constants = 5; optional SettingProto demo_mode = 6 [ (android.privacy).dest = DEST_AUTOMATIC ]; } diff --git a/core/proto/android/server/windowmanagerservice.proto b/core/proto/android/server/windowmanagerservice.proto index ff0ba8dd5ad4..3a59a16b54ca 100644 --- a/core/proto/android/server/windowmanagerservice.proto +++ b/core/proto/android/server/windowmanagerservice.proto @@ -316,6 +316,7 @@ message ActivityRecordProto { optional bool front_of_task = 28; optional int32 proc_id = 29; optional bool translucent = 30; + optional bool pip_auto_enter_allowed = 31; } /* represents WindowToken */ diff --git a/core/res/res/values-bs/strings.xml b/core/res/res/values-bs/strings.xml index 0e176b53f236..feef587dd685 100644 --- a/core/res/res/values-bs/strings.xml +++ b/core/res/res/values-bs/strings.xml @@ -1283,7 +1283,7 @@ <string name="network_switch_type_name_unknown" msgid="3665696841646851068">"nepoznata vrsta mreže"</string> <string name="accept" msgid="5447154347815825107">"Prihvati"</string> <string name="decline" msgid="6490507610282145874">"Odbijte"</string> - <string name="select_character" msgid="3352797107930786979">"Umetni karakter"</string> + <string name="select_character" msgid="3352797107930786979">"Umetni znak"</string> <string name="sms_control_title" msgid="4748684259903148341">"Slanje SMS poruka"</string> <string name="sms_control_message" msgid="6574313876316388239">"<b><xliff:g id="APP_NAME">%1$s</xliff:g></b> šalje veliki broj SMS poruka. Da li želite dozvoliti ovoj aplikaciji da nastavi slanje poruka?"</string> <string name="sms_control_yes" msgid="4858845109269524622">"Dozvoli"</string> diff --git a/core/res/res/values-hu/strings.xml b/core/res/res/values-hu/strings.xml index 0004ff1a3f13..9062435ec9ce 100644 --- a/core/res/res/values-hu/strings.xml +++ b/core/res/res/values-hu/strings.xml @@ -1900,8 +1900,8 @@ <string name="profile_encrypted_message" msgid="1128512616293157802">"A feloldáshoz koppintson rá"</string> <string name="usb_mtp_launch_notification_title" msgid="774319638256707227">"Csatlakoztatva a(z) <xliff:g id="PRODUCT_NAME">%1$s</xliff:g> eszközhöz"</string> <string name="usb_mtp_launch_notification_description" msgid="6942535713629852684">"Koppintson ide a fájlok megtekintéséhez"</string> - <string name="pin_target" msgid="8036028973110156895">"Rögzítés"</string> - <string name="pin_specific_target" msgid="7824671240625957415">"<xliff:g id="LABEL">%1$s</xliff:g> rögzítése"</string> + <string name="pin_target" msgid="8036028973110156895">"Kitűzés"</string> + <string name="pin_specific_target" msgid="7824671240625957415">"<xliff:g id="LABEL">%1$s</xliff:g> kitűzése"</string> <string name="unpin_target" msgid="3963318576590204447">"Feloldás"</string> <string name="unpin_specific_target" msgid="3859828252160908146">"<xliff:g id="LABEL">%1$s</xliff:g> rögzítésének feloldása"</string> <string name="app_info" msgid="6113278084877079851">"Alkalmazásinformáció"</string> diff --git a/core/res/res/values-hy/strings.xml b/core/res/res/values-hy/strings.xml index 264a8fcb343d..4f66b6e8a947 100644 --- a/core/res/res/values-hy/strings.xml +++ b/core/res/res/values-hy/strings.xml @@ -1979,7 +1979,7 @@ <string name="shortcut_restore_signature_mismatch" msgid="579345304221605479">"Չհաջողվեց վերականգնել դյուրանցումը, քանի որ հավելվածների ստորագրությունները տարբեր են"</string> <string name="shortcut_restore_unknown_issue" msgid="2478146134395982154">"Չհաջողվեց վերականգնել դյուրանցումը"</string> <string name="shortcut_disabled_reason_unknown" msgid="753074793553599166">"Դյուրանցումն անջատված է"</string> - <string name="harmful_app_warning_uninstall" msgid="6472912975664191772">"ՀԵՌԱՑՆԵԼ"</string> + <string name="harmful_app_warning_uninstall" msgid="6472912975664191772">"ԱՊԱՏԵՂԱԴՐԵԼ"</string> <string name="harmful_app_warning_open_anyway" msgid="5963657791740211807">"ԲԱՑԵԼ"</string> <string name="harmful_app_warning_title" msgid="8794823880881113856">"Հայտնաբերվել է վնասաբեր հավելված"</string> <string name="slices_permission_request" msgid="3677129866636153406">"<xliff:g id="APP_0">%1$s</xliff:g> հավելվածն ուզում է ցուցադրել հատվածներ <xliff:g id="APP_2">%2$s</xliff:g> հավելվածից"</string> diff --git a/core/res/res/values-mn/strings.xml b/core/res/res/values-mn/strings.xml index a65f80c9332f..2c041dced482 100644 --- a/core/res/res/values-mn/strings.xml +++ b/core/res/res/values-mn/strings.xml @@ -1120,7 +1120,7 @@ <string name="yes" msgid="9069828999585032361">"ОК"</string> <string name="no" msgid="5122037903299899715">"Цуцлах"</string> <string name="dialog_alert_title" msgid="651856561974090712">"Анхаар"</string> - <string name="loading" msgid="3138021523725055037">"Ачааллаж байна..."</string> + <string name="loading" msgid="3138021523725055037">"Ачаалж байна..."</string> <string name="capital_on" msgid="2770685323900821829">"Идэвхтэй"</string> <string name="capital_off" msgid="7443704171014626777">"Идэвхгүй"</string> <string name="checked" msgid="9179896827054513119">"тэмдэглэсэн"</string> diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml index 2b511706d024..20ef017f59f8 100644 --- a/core/res/res/values/attrs.xml +++ b/core/res/res/values/attrs.xml @@ -2784,7 +2784,11 @@ exactly one parameter of type View. For instance, if you specify <code>android:onClick="sayHello"</code>, you must declare a <code>public void sayHello(View v)</code> method of your context - (typically, your Activity). --> + (typically, your Activity). + {@deprecated View actually traverses the Context + hierarchy looking for the relevant method, which is fragile (an intermediate + ContextWrapper adding a same-named method would change behavior) and restricts + bytecode optimizers such as R8. Instead, use View.setOnClickListener.}--> <attr name="onClick" format="string" /> <!-- Defines over-scrolling behavior. This property is used only if the @@ -7505,7 +7509,11 @@ <attr name="enabled" /> <!-- Name of a method on the Context used to inflate the menu that will be - called when the item is clicked. --> + called when the item is clicked. + {@deprecated Menu actually traverses the Context hierarchy looking for the + relevant method, which is fragile (an intermediate ContextWrapper adding a + same-named method would change behavior) and restricts bytecode optimizers + such as R8. Instead, use MenuItem.setOnMenuItemClickListener.} --> <attr name="onClick" /> <!-- How this item should display in the Action Bar, if present. --> diff --git a/core/tests/coretests/src/android/view/ImeInsetsSourceConsumerTest.java b/core/tests/coretests/src/android/view/ImeInsetsSourceConsumerTest.java index eb695258142a..a5b7c6156109 100644 --- a/core/tests/coretests/src/android/view/ImeInsetsSourceConsumerTest.java +++ b/core/tests/coretests/src/android/view/ImeInsetsSourceConsumerTest.java @@ -16,9 +16,11 @@ package android.view; +import static android.app.WindowConfiguration.WINDOWING_MODE_UNDEFINED; import static android.view.ImeInsetsSourceConsumer.areEditorsSimilar; import static android.view.InsetsState.ITYPE_IME; import static android.view.WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE; +import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION; import static junit.framework.Assert.assertFalse; import static junit.framework.Assert.assertTrue; @@ -86,6 +88,7 @@ public class ImeInsetsSourceConsumerTest { false, new DisplayCutout( Insets.of(10, 10, 10, 10), rect, rect, rect, rect), + TYPE_APPLICATION, WINDOWING_MODE_UNDEFINED, SOFT_INPUT_ADJUST_RESIZE, 0, 0); mImeConsumer = (ImeInsetsSourceConsumer) mController.getSourceConsumer(ITYPE_IME); }); diff --git a/core/tests/coretests/src/android/view/InsetsControllerTest.java b/core/tests/coretests/src/android/view/InsetsControllerTest.java index de128ad6d78e..88e1f5781e0e 100644 --- a/core/tests/coretests/src/android/view/InsetsControllerTest.java +++ b/core/tests/coretests/src/android/view/InsetsControllerTest.java @@ -16,6 +16,7 @@ package android.view; +import static android.app.WindowConfiguration.WINDOWING_MODE_UNDEFINED; import static android.view.InsetsController.ANIMATION_TYPE_HIDE; import static android.view.InsetsController.ANIMATION_TYPE_NONE; import static android.view.InsetsController.ANIMATION_TYPE_SHOW; @@ -30,6 +31,7 @@ import static android.view.WindowInsets.Type.ime; import static android.view.WindowInsets.Type.navigationBars; import static android.view.WindowInsets.Type.statusBars; import static android.view.WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE; +import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; @@ -169,6 +171,7 @@ public class InsetsControllerTest { false, new DisplayCutout( Insets.of(10, 10, 10, 10), rect, rect, rect, rect), + TYPE_APPLICATION, WINDOWING_MODE_UNDEFINED, SOFT_INPUT_ADJUST_RESIZE, 0, 0); mController.onFrameChanged(new Rect(0, 0, 100, 100)); }); diff --git a/core/tests/coretests/src/android/view/InsetsStateTest.java b/core/tests/coretests/src/android/view/InsetsStateTest.java index c7d835ca7c7e..4306e3e0fe7b 100644 --- a/core/tests/coretests/src/android/view/InsetsStateTest.java +++ b/core/tests/coretests/src/android/view/InsetsStateTest.java @@ -16,6 +16,8 @@ package android.view; +import static android.app.WindowConfiguration.WINDOWING_MODE_FREEFORM; +import static android.app.WindowConfiguration.WINDOWING_MODE_UNDEFINED; import static android.view.InsetsState.ISIDE_BOTTOM; import static android.view.InsetsState.ISIDE_TOP; import static android.view.InsetsState.ITYPE_BOTTOM_GESTURES; @@ -30,9 +32,13 @@ import static android.view.WindowInsets.Type.ime; import static android.view.WindowInsets.Type.navigationBars; import static android.view.WindowInsets.Type.statusBars; import static android.view.WindowManager.LayoutParams.FLAG_FULLSCREEN; +import static android.view.WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS; import static android.view.WindowManager.LayoutParams.SOFT_INPUT_ADJUST_NOTHING; import static android.view.WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN; import static android.view.WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE; +import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION; +import static android.view.WindowManager.LayoutParams.TYPE_SYSTEM_ERROR; +import static android.view.WindowManager.LayoutParams.TYPE_WALLPAPER; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; @@ -78,7 +84,8 @@ public class InsetsStateTest { mState.getSource(ITYPE_IME).setVisible(true); SparseIntArray typeSideMap = new SparseIntArray(); WindowInsets insets = mState.calculateInsets(new Rect(0, 0, 100, 300), null, false, - false, DisplayCutout.NO_CUTOUT, SOFT_INPUT_ADJUST_RESIZE, 0, 0, typeSideMap); + false, DisplayCutout.NO_CUTOUT, SOFT_INPUT_ADJUST_RESIZE, 0, 0, + TYPE_APPLICATION, WINDOWING_MODE_UNDEFINED, typeSideMap); assertEquals(Insets.of(0, 100, 0, 100), insets.getSystemWindowInsets()); assertEquals(Insets.of(0, 100, 0, 100), insets.getInsets(Type.all())); assertEquals(ISIDE_TOP, typeSideMap.get(ITYPE_STATUS_BAR)); @@ -97,7 +104,8 @@ public class InsetsStateTest { mState.getSource(ITYPE_IME).setFrame(new Rect(0, 100, 100, 300)); mState.getSource(ITYPE_IME).setVisible(true); WindowInsets insets = mState.calculateInsets(new Rect(0, 0, 100, 300), null, false, - false, DisplayCutout.NO_CUTOUT, SOFT_INPUT_ADJUST_RESIZE, 0, 0, null); + false, DisplayCutout.NO_CUTOUT, SOFT_INPUT_ADJUST_RESIZE, 0, 0, + TYPE_APPLICATION, WINDOWING_MODE_UNDEFINED, null); assertEquals(100, insets.getStableInsetBottom()); assertEquals(Insets.of(0, 0, 0, 100), insets.getInsetsIgnoringVisibility(Type.systemBars())); assertEquals(Insets.of(0, 0, 0, 200), insets.getSystemWindowInsets()); @@ -116,7 +124,8 @@ public class InsetsStateTest { mState.getSource(ITYPE_NAVIGATION_BAR).setFrame(new Rect(80, 0, 100, 300)); mState.getSource(ITYPE_NAVIGATION_BAR).setVisible(true); WindowInsets insets = mState.calculateInsets(new Rect(0, 0, 100, 300), null, false, - false, DisplayCutout.NO_CUTOUT, 0, 0, 0, null); + false, DisplayCutout.NO_CUTOUT, 0, 0, 0, TYPE_APPLICATION, + WINDOWING_MODE_UNDEFINED, null); assertEquals(Insets.of(0, 100, 20, 0), insets.getSystemWindowInsets()); assertEquals(Insets.of(0, 100, 0, 0), insets.getInsets(Type.statusBars())); assertEquals(Insets.of(0, 0, 20, 0), insets.getInsets(Type.navigationBars())); @@ -132,7 +141,8 @@ public class InsetsStateTest { mState.getSource(ITYPE_IME).setFrame(new Rect(0, 200, 100, 300)); mState.getSource(ITYPE_IME).setVisible(true); WindowInsets insets = mState.calculateInsets(new Rect(0, 0, 100, 300), null, false, - false, DisplayCutout.NO_CUTOUT, SOFT_INPUT_ADJUST_NOTHING, 0, 0, null); + false, DisplayCutout.NO_CUTOUT, SOFT_INPUT_ADJUST_NOTHING, 0, 0, + TYPE_APPLICATION, WINDOWING_MODE_UNDEFINED, null); assertEquals(0, insets.getSystemWindowInsetBottom()); assertEquals(100, insets.getInsets(ime()).bottom); assertTrue(insets.isVisible(ime())); @@ -149,11 +159,11 @@ public class InsetsStateTest { mState.getSource(ITYPE_IME).setVisible(true); WindowInsets insets = mState.calculateInsets(new Rect(0, 0, 100, 300), null, false, false, DisplayCutout.NO_CUTOUT, SOFT_INPUT_ADJUST_NOTHING, 0, - SYSTEM_UI_FLAG_LAYOUT_STABLE, null); + SYSTEM_UI_FLAG_LAYOUT_STABLE, TYPE_APPLICATION, WINDOWING_MODE_UNDEFINED, null); assertEquals(100, insets.getSystemWindowInsetTop()); insets = mState.calculateInsets(new Rect(0, 0, 100, 300), null, false, false, DisplayCutout.NO_CUTOUT, SOFT_INPUT_ADJUST_NOTHING, 0, - 0 /* legacySystemUiFlags */, null); + 0 /* legacySystemUiFlags */, TYPE_APPLICATION, WINDOWING_MODE_UNDEFINED, null); assertEquals(0, insets.getSystemWindowInsetTop()); } } @@ -166,15 +176,37 @@ public class InsetsStateTest { mState.getSource(ITYPE_STATUS_BAR).setVisible(false); WindowInsets insets = mState.calculateInsets(new Rect(0, 0, 100, 300), null, false, false, DisplayCutout.NO_CUTOUT, SOFT_INPUT_ADJUST_NOTHING, FLAG_FULLSCREEN, - SYSTEM_UI_FLAG_LAYOUT_STABLE, null); + SYSTEM_UI_FLAG_LAYOUT_STABLE, TYPE_APPLICATION, WINDOWING_MODE_UNDEFINED, null); assertEquals(0, insets.getSystemWindowInsetTop()); insets = mState.calculateInsets(new Rect(0, 0, 100, 300), null, false, false, DisplayCutout.NO_CUTOUT, SOFT_INPUT_ADJUST_NOTHING, 0, - 0 /* legacySystemUiFlags */, null); + 0 /* legacySystemUiFlags */, TYPE_APPLICATION, WINDOWING_MODE_UNDEFINED, null); assertEquals(0, insets.getSystemWindowInsetTop()); } } + @Test + public void testCalculateInsets_flagLayoutNoLimits() { + mState.getSource(ITYPE_STATUS_BAR).setFrame(new Rect(0, 0, 100, 100)); + mState.getSource(ITYPE_STATUS_BAR).setVisible(true); + WindowInsets insets = mState.calculateInsets(new Rect(0, 0, 100, 300), null, false, + false, DisplayCutout.NO_CUTOUT, SOFT_INPUT_ADJUST_NOTHING, FLAG_LAYOUT_NO_LIMITS, + 0 /* legacySystemUiFlags */, TYPE_APPLICATION, WINDOWING_MODE_UNDEFINED, null); + assertEquals(0, insets.getSystemWindowInsetTop()); + insets = mState.calculateInsets(new Rect(0, 0, 100, 300), null, false, + false, DisplayCutout.NO_CUTOUT, SOFT_INPUT_ADJUST_NOTHING, FLAG_LAYOUT_NO_LIMITS, + 0 /* legacySystemUiFlags */, TYPE_SYSTEM_ERROR, WINDOWING_MODE_UNDEFINED, null); + assertEquals(100, insets.getSystemWindowInsetTop()); + insets = mState.calculateInsets(new Rect(0, 0, 100, 300), null, false, + false, DisplayCutout.NO_CUTOUT, SOFT_INPUT_ADJUST_NOTHING, FLAG_LAYOUT_NO_LIMITS, + 0 /* legacySystemUiFlags */, TYPE_WALLPAPER, WINDOWING_MODE_UNDEFINED, null); + assertEquals(100, insets.getSystemWindowInsetTop()); + insets = mState.calculateInsets(new Rect(0, 0, 100, 300), null, false, + false, DisplayCutout.NO_CUTOUT, SOFT_INPUT_ADJUST_NOTHING, FLAG_LAYOUT_NO_LIMITS, + 0 /* legacySystemUiFlags */, TYPE_APPLICATION, WINDOWING_MODE_FREEFORM, null); + assertEquals(100, insets.getSystemWindowInsetTop()); + } + @Test public void testCalculateInsets_captionStatusBarOverlap() throws Exception { @@ -213,7 +245,8 @@ public class InsetsStateTest { mState.getSource(ITYPE_EXTRA_NAVIGATION_BAR).setFrame(new Rect(80, 0, 100, 300)); mState.getSource(ITYPE_EXTRA_NAVIGATION_BAR).setVisible(true); WindowInsets insets = mState.calculateInsets(new Rect(0, 0, 100, 300), null, false, - false, DisplayCutout.NO_CUTOUT, 0, 0, 0, null); + false, DisplayCutout.NO_CUTOUT, 0, 0, 0, TYPE_APPLICATION, + WINDOWING_MODE_UNDEFINED, null); assertEquals(Insets.of(0, 100, 20, 0), insets.getSystemWindowInsets()); assertEquals(Insets.of(0, 100, 0, 0), insets.getInsets(Type.statusBars())); assertEquals(Insets.of(0, 0, 20, 0), insets.getInsets(Type.navigationBars())); @@ -229,7 +262,8 @@ public class InsetsStateTest { mState.getSource(ITYPE_NAVIGATION_BAR).setFrame(new Rect(80, 0, 100, 300)); mState.getSource(ITYPE_NAVIGATION_BAR).setVisible(true); WindowInsets insets = mState.calculateInsets(new Rect(0, 0, 100, 300), null, false, - false, DisplayCutout.NO_CUTOUT, 0, 0, 0, null); + false, DisplayCutout.NO_CUTOUT, 0, 0, 0, TYPE_APPLICATION, + WINDOWING_MODE_UNDEFINED, null); assertEquals(Insets.of(0, 100, 20, 0), insets.getSystemWindowInsets()); assertEquals(Insets.of(0, 100, 0, 0), insets.getInsets(Type.statusBars())); assertEquals(Insets.of(0, 0, 20, 0), insets.getInsets(Type.navigationBars())); @@ -244,7 +278,8 @@ public class InsetsStateTest { mState.getSource(ITYPE_IME).setVisible(true); mState.removeSource(ITYPE_IME); WindowInsets insets = mState.calculateInsets(new Rect(0, 0, 100, 300), null, false, false, - DisplayCutout.NO_CUTOUT, SOFT_INPUT_ADJUST_RESIZE, 0, 0, null); + DisplayCutout.NO_CUTOUT, SOFT_INPUT_ADJUST_RESIZE, 0, 0, TYPE_APPLICATION, + WINDOWING_MODE_UNDEFINED, null); assertEquals(0, insets.getSystemWindowInsetBottom()); } diff --git a/core/tests/coretests/src/android/view/ViewRootImplTest.java b/core/tests/coretests/src/android/view/ViewRootImplTest.java index 5c16772488d0..4cf6715ba0ca 100644 --- a/core/tests/coretests/src/android/view/ViewRootImplTest.java +++ b/core/tests/coretests/src/android/view/ViewRootImplTest.java @@ -24,6 +24,7 @@ import static android.view.View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR; import static android.view.View.SYSTEM_UI_FLAG_LOW_PROFILE; import static android.view.WindowInsetsController.BEHAVIOR_SHOW_BARS_BY_TOUCH; import static android.view.WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN; +import static android.view.WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE; import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION; import static android.view.WindowManager.LayoutParams.TYPE_SYSTEM_ALERT; import static android.view.WindowManager.LayoutParams.TYPE_TOAST; @@ -117,7 +118,15 @@ public class ViewRootImplTest { final WindowManager.LayoutParams attrs = new WindowManager.LayoutParams(TYPE_APPLICATION); ViewRootImpl.adjustLayoutParamsForCompatibility(attrs); - // A window which fits system bars must fit IME, unless its type is toast or system alert. + assertEquals(Type.systemBars(), attrs.getFitInsetsTypes()); + } + + @Test + public void adjustLayoutParamsForCompatibility_fitSystemBarsAndIme() { + final WindowManager.LayoutParams attrs = new WindowManager.LayoutParams(TYPE_APPLICATION); + attrs.softInputMode |= SOFT_INPUT_ADJUST_RESIZE; + ViewRootImpl.adjustLayoutParamsForCompatibility(attrs); + assertEquals(Type.systemBars() | Type.ime(), attrs.getFitInsetsTypes()); } diff --git a/core/tests/coretests/src/com/android/internal/policy/DecorContextTest.java b/core/tests/coretests/src/com/android/internal/policy/DecorContextTest.java index 02870a53773e..7f4e9ada7b22 100644 --- a/core/tests/coretests/src/com/android/internal/policy/DecorContextTest.java +++ b/core/tests/coretests/src/com/android/internal/policy/DecorContextTest.java @@ -20,6 +20,9 @@ import static android.view.Display.DEFAULT_DISPLAY; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.Mockito.never; +import static org.mockito.Mockito.verify; import android.app.Activity; import android.app.EmptyActivity; @@ -41,6 +44,7 @@ import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; +import org.mockito.Mockito; /** * Tests {@link DecorContext}. @@ -63,13 +67,18 @@ public final class DecorContextTest { @Test public void testDecorContextWithDefaultDisplay() { + final Context baseContext = Mockito.spy(mContext.getApplicationContext()); Display defaultDisplay = new Display(DisplayManagerGlobal.getInstance(), DEFAULT_DISPLAY, new DisplayInfo(), DisplayAdjustments.DEFAULT_DISPLAY_ADJUSTMENTS); final Context defaultDisplayContext = mContext.createDisplayContext(defaultDisplay); final PhoneWindow window = new PhoneWindow(defaultDisplayContext); - DecorContext context = new DecorContext(mContext.getApplicationContext(), window); + DecorContext context = new DecorContext(baseContext, window); assertDecorContextDisplay(DEFAULT_DISPLAY, context); + + // TODO(b/166174272): Creating a display context for the default display will result + // in additional resource creation. + verify(baseContext, never()).createDisplayContext(any()); } @Test diff --git a/core/tests/mockingcoretests/src/android/app/activity/ActivityThreadClientTest.java b/core/tests/mockingcoretests/src/android/app/activity/ActivityThreadClientTest.java index 1cdc75aa1f40..9d95de7eb60f 100644 --- a/core/tests/mockingcoretests/src/android/app/activity/ActivityThreadClientTest.java +++ b/core/tests/mockingcoretests/src/android/app/activity/ActivityThreadClientTest.java @@ -23,6 +23,8 @@ import static android.app.servertransaction.ActivityLifecycleItem.ON_RESUME; import static android.app.servertransaction.ActivityLifecycleItem.ON_START; import static android.app.servertransaction.ActivityLifecycleItem.ON_STOP; +import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation; + import static com.android.dx.mockito.inline.extended.ExtendedMockito.doReturn; import static com.android.dx.mockito.inline.extended.ExtendedMockito.mockitoSession; import static com.android.dx.mockito.inline.extended.ExtendedMockito.spyOn; @@ -30,7 +32,11 @@ import static com.android.dx.mockito.inline.extended.ExtendedMockito.spyOn; import static org.junit.Assert.assertEquals; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.anyInt; +import static org.mockito.Mockito.after; +import static org.mockito.Mockito.clearInvocations; import static org.mockito.Mockito.doNothing; +import static org.mockito.Mockito.timeout; +import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; import android.app.Activity; @@ -50,6 +56,7 @@ import android.os.Binder; import android.os.RemoteException; import android.os.UserHandle; import android.platform.test.annotations.Presubmit; +import android.testing.PollingCheck; import android.view.WindowManagerGlobal; import androidx.test.annotation.UiThreadTest; @@ -63,6 +70,8 @@ import org.mockito.Mockito; import org.mockito.MockitoSession; import org.mockito.quality.Strictness; +import java.util.concurrent.TimeUnit; + /** * Test for verifying {@link android.app.ActivityThread} class. * @@ -76,6 +85,7 @@ import org.mockito.quality.Strictness; @MediumTest @Presubmit public class ActivityThreadClientTest { + private static final long WAIT_TIMEOUT_MS = TimeUnit.SECONDS.toMillis(5); @Test @UiThreadTest @@ -152,6 +162,63 @@ public class ActivityThreadClientTest { } } + @Test + public void testLifecycleOfRelaunch() throws Exception { + try (ClientMockSession clientSession = new ClientMockSession()) { + ActivityThread activityThread = clientSession.mockThread(); + ActivityClientRecord r = clientSession.stubActivityRecord(); + final TestActivity[] activity = new TestActivity[1]; + + // Verify for ON_CREATE state. Activity should not be relaunched. + getInstrumentation().runOnMainSync(() -> { + activity[0] = (TestActivity) clientSession.launchActivity(r); + }); + recreateAndVerifyNoRelaunch(activityThread, activity[0]); + + // Verify for ON_START state. Activity should be relaunched. + getInstrumentation().runOnMainSync(() -> clientSession.startActivity(r)); + recreateAndVerifyRelaunched(activityThread, activity[0], r, ON_START); + + // Verify for ON_RESUME state. Activity should be relaunched. + getInstrumentation().runOnMainSync(() -> clientSession.resumeActivity(r)); + recreateAndVerifyRelaunched(activityThread, activity[0], r, ON_RESUME); + + // Verify for ON_PAUSE state. Activity should be relaunched. + getInstrumentation().runOnMainSync(() -> clientSession.pauseActivity(r)); + recreateAndVerifyRelaunched(activityThread, activity[0], r, ON_PAUSE); + + // Verify for ON_STOP state. Activity should be relaunched. + getInstrumentation().runOnMainSync(() -> clientSession.stopActivity(r)); + recreateAndVerifyRelaunched(activityThread, activity[0], r, ON_STOP); + + // Verify for ON_DESTROY state. Activity should not be relaunched. + getInstrumentation().runOnMainSync(() -> clientSession.destroyActivity(r)); + recreateAndVerifyNoRelaunch(activityThread, activity[0]); + } + } + + private void recreateAndVerifyNoRelaunch(ActivityThread activityThread, TestActivity activity) { + clearInvocations(activityThread); + getInstrumentation().runOnMainSync(() -> activity.recreate()); + + verify(activityThread, after(WAIT_TIMEOUT_MS).never()) + .handleRelaunchActivity(any(), any()); + } + + private void recreateAndVerifyRelaunched(ActivityThread activityThread, TestActivity activity, + ActivityClientRecord r, int expectedState) throws Exception { + clearInvocations(activityThread); + getInstrumentation().runOnMainSync(() -> activity.recreate()); + + verify(activityThread, timeout(WAIT_TIMEOUT_MS)).handleRelaunchActivity(any(), any()); + + // Wait for the relaunch to complete. + PollingCheck.check("Waiting for the expected state " + expectedState + " timeout", + WAIT_TIMEOUT_MS, + () -> expectedState == r.getLifecycleState()); + assertEquals(expectedState, r.getLifecycleState()); + } + private class ClientMockSession implements AutoCloseable { private MockitoSession mMockSession; private ActivityThread mThread; @@ -200,6 +267,11 @@ public class ActivityThreadClientTest { false /* getNonConfigInstance */, "test"); } + private ActivityThread mockThread() { + spyOn(mThread); + return mThread; + } + private ActivityClientRecord stubActivityRecord() { ComponentName component = new ComponentName( InstrumentationRegistry.getInstrumentation().getContext(), TestActivity.class); diff --git a/data/keyboards/Generic.kcm b/data/keyboards/Generic.kcm index 1ab4c6385ac1..fe6eeeb66e40 100644 --- a/data/keyboards/Generic.kcm +++ b/data/keyboards/Generic.kcm @@ -28,12 +28,14 @@ key A { label: 'A' base: 'a' shift, capslock: 'A' + shift+capslock: 'a' } key B { label: 'B' base: 'b' shift, capslock: 'B' + shift+capslock: 'b' } key C { @@ -42,12 +44,14 @@ key C { shift, capslock: 'C' alt: '\u00e7' shift+alt: '\u00c7' + shift+capslock: 'c' } key D { label: 'D' base: 'd' shift, capslock: 'D' + shift+capslock: 'd' } key E { @@ -55,24 +59,28 @@ key E { base: 'e' shift, capslock: 'E' alt: '\u0301' + shift+capslock: 'e' } key F { label: 'F' base: 'f' shift, capslock: 'F' + shift+capslock: 'f' } key G { label: 'G' base: 'g' shift, capslock: 'G' + shift+capslock: 'g' } key H { label: 'H' base: 'h' shift, capslock: 'H' + shift+capslock: 'h' } key I { @@ -80,30 +88,35 @@ key I { base: 'i' shift, capslock: 'I' alt: '\u0302' + shift+capslock: 'i' } key J { label: 'J' base: 'j' shift, capslock: 'J' + shift+capslock: 'j' } key K { label: 'K' base: 'k' shift, capslock: 'K' + shift+capslock: 'k' } key L { label: 'L' base: 'l' shift, capslock: 'L' + shift+capslock: 'l' } key M { label: 'M' base: 'm' shift, capslock: 'M' + shift+capslock: 'm' } key N { @@ -111,30 +124,35 @@ key N { base: 'n' shift, capslock: 'N' alt: '\u0303' + shift+capslock: 'n' } key O { label: 'O' base: 'o' shift, capslock: 'O' + shift+capslock: 'o' } key P { label: 'P' base: 'p' shift, capslock: 'P' + shift+capslock: 'p' } key Q { label: 'Q' base: 'q' shift, capslock: 'Q' + shift+capslock: 'q' } key R { label: 'R' base: 'r' shift, capslock: 'R' + shift+capslock: 'r' } key S { @@ -142,12 +160,14 @@ key S { base: 's' shift, capslock: 'S' alt: '\u00df' + shift+capslock: 's' } key T { label: 'T' base: 't' shift, capslock: 'T' + shift+capslock: 't' } key U { @@ -155,36 +175,42 @@ key U { base: 'u' shift, capslock: 'U' alt: '\u0308' + shift+capslock: 'u' } key V { label: 'V' base: 'v' shift, capslock: 'V' + shift+capslock: 'v' } key W { label: 'W' base: 'w' shift, capslock: 'W' + shift+capslock: 'w' } key X { label: 'X' base: 'x' shift, capslock: 'X' + shift+capslock: 'x' } key Y { label: 'Y' base: 'y' shift, capslock: 'Y' + shift+capslock: 'y' } key Z { label: 'Z' base: 'z' shift, capslock: 'Z' + shift+capslock: 'z' } key 0 { diff --git a/packages/SystemUI/res/anim/forced_resizable_enter.xml b/libs/WindowManager/Shell/res/anim/forced_resizable_enter.xml index 01b8fdbe4437..01b8fdbe4437 100644 --- a/packages/SystemUI/res/anim/forced_resizable_enter.xml +++ b/libs/WindowManager/Shell/res/anim/forced_resizable_enter.xml diff --git a/packages/SystemUI/res/anim/forced_resizable_exit.xml b/libs/WindowManager/Shell/res/anim/forced_resizable_exit.xml index 6f316a75dbed..6f316a75dbed 100644 --- a/packages/SystemUI/res/anim/forced_resizable_exit.xml +++ b/libs/WindowManager/Shell/res/anim/forced_resizable_exit.xml diff --git a/packages/SystemUI/res/layout/divider.xml b/libs/WindowManager/Shell/res/layout/divider.xml index f1f0df054240..f1f0df054240 100644 --- a/packages/SystemUI/res/layout/divider.xml +++ b/libs/WindowManager/Shell/res/layout/divider.xml diff --git a/packages/SystemUI/res/layout/docked_stack_divider.xml b/libs/WindowManager/Shell/res/layout/docked_stack_divider.xml index 70e5451eed57..ad870252d819 100644 --- a/packages/SystemUI/res/layout/docked_stack_divider.xml +++ b/libs/WindowManager/Shell/res/layout/docked_stack_divider.xml @@ -14,7 +14,7 @@ limitations under the License. --> -<com.android.systemui.stackdivider.DividerView +<com.android.wm.shell.splitscreen.DividerView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_height="match_parent" android:layout_width="match_parent"> @@ -24,15 +24,15 @@ android:id="@+id/docked_divider_background" android:background="@color/docked_divider_background"/> - <com.android.systemui.stackdivider.MinimizedDockShadow + <com.android.wm.shell.splitscreen.MinimizedDockShadow style="@style/DockedDividerMinimizedShadow" android:id="@+id/minimized_dock_shadow" android:alpha="0"/>"> - <com.android.systemui.stackdivider.DividerHandleView + <com.android.wm.shell.splitscreen.DividerHandleView style="@style/DockedDividerHandle" android:id="@+id/docked_divider_handle" android:contentDescription="@string/accessibility_divider" android:background="@null"/> -</com.android.systemui.stackdivider.DividerView> +</com.android.wm.shell.splitscreen.DividerView> diff --git a/packages/SystemUI/res/layout/forced_resizable_activity.xml b/libs/WindowManager/Shell/res/layout/forced_resizable_activity.xml index 3c778c431a2e..3c778c431a2e 100644 --- a/packages/SystemUI/res/layout/forced_resizable_activity.xml +++ b/libs/WindowManager/Shell/res/layout/forced_resizable_activity.xml diff --git a/libs/WindowManager/Shell/res/values-land/dimens.xml b/libs/WindowManager/Shell/res/values-land/dimens.xml new file mode 100644 index 000000000000..77a601ddf440 --- /dev/null +++ b/libs/WindowManager/Shell/res/values-land/dimens.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + * Copyright (c) 2020, The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +*/ +--> +<resources> + <dimen name="docked_divider_handle_width">2dp</dimen> + <dimen name="docked_divider_handle_height">16dp</dimen> +</resources>
\ No newline at end of file diff --git a/libs/WindowManager/Shell/res/values-land/styles.xml b/libs/WindowManager/Shell/res/values-land/styles.xml new file mode 100644 index 000000000000..863bb69d4034 --- /dev/null +++ b/libs/WindowManager/Shell/res/values-land/styles.xml @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2020 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<resources xmlns:android="http://schemas.android.com/apk/res/android"> + <style name="DockedDividerBackground"> + <item name="android:layout_width">10dp</item> + <item name="android:layout_height">match_parent</item> + <item name="android:layout_gravity">center_horizontal</item> + </style> + + <style name="DockedDividerHandle"> + <item name="android:layout_gravity">center_vertical</item> + <item name="android:layout_width">48dp</item> + <item name="android:layout_height">96dp</item> + </style> + + <style name="DockedDividerMinimizedShadow"> + <item name="android:layout_width">8dp</item> + <item name="android:layout_height">match_parent</item> + </style> +</resources> + diff --git a/libs/WindowManager/Shell/res/values-sw600dp/config.xml b/libs/WindowManager/Shell/res/values-sw600dp/config.xml new file mode 100644 index 000000000000..f194532f1e0d --- /dev/null +++ b/libs/WindowManager/Shell/res/values-sw600dp/config.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* +** Copyright 2020, The Android Open Source Project +** +** Licensed under the Apache License, Version 2.0 (the "License"); +** you may not use this file except in compliance with the License. +** You may obtain a copy of the License at +** +** http://www.apache.org/licenses/LICENSE-2.0 +** +** Unless required by applicable law or agreed to in writing, software +** distributed under the License is distributed on an "AS IS" BASIS, +** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +** See the License for the specific language governing permissions and +** limitations under the License. +*/ +--> + +<!-- These resources are around just to allow their values to be customized + for different hardware and product builds. --> +<resources> + <!-- Animation duration when using long press on recents to dock --> + <integer name="long_press_dock_anim_duration">290</integer> +</resources>
\ No newline at end of file diff --git a/libs/WindowManager/Shell/res/values/colors.xml b/libs/WindowManager/Shell/res/values/colors.xml new file mode 100644 index 000000000000..6a19083e3788 --- /dev/null +++ b/libs/WindowManager/Shell/res/values/colors.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* + * Copyright 2020, The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +--> +<resources> + <color name="docked_divider_background">#ff000000</color> + <color name="docked_divider_handle">#ffffff</color> + <drawable name="forced_resizable_background">#59000000</drawable> + <color name="minimize_dock_shadow_start">#60000000</color> + <color name="minimize_dock_shadow_end">#00000000</color> +</resources>
\ No newline at end of file diff --git a/libs/WindowManager/Shell/res/values/config.xml b/libs/WindowManager/Shell/res/values/config.xml index 245c0725c2a8..39efd0768eaa 100644 --- a/libs/WindowManager/Shell/res/values/config.xml +++ b/libs/WindowManager/Shell/res/values/config.xml @@ -26,4 +26,7 @@ <!-- Allow PIP to enable round corner, see also R.dimen.pip_corner_radius --> <bool name="config_pipEnableRoundCorner">false</bool> + + <!-- Animation duration when using long press on recents to dock --> + <integer name="long_press_dock_anim_duration">250</integer> </resources> diff --git a/libs/WindowManager/Shell/res/values/dimen.xml b/libs/WindowManager/Shell/res/values/dimen.xml index 1c1217681b9f..ce690281b491 100644 --- a/libs/WindowManager/Shell/res/values/dimen.xml +++ b/libs/WindowManager/Shell/res/values/dimen.xml @@ -56,4 +56,10 @@ <dimen name="pip_resize_handle_size">12dp</dimen> <dimen name="pip_resize_handle_margin">4dp</dimen> <dimen name="pip_resize_handle_padding">0dp</dimen> + + <!-- How high we lift the divider when touching --> + <dimen name="docked_stack_divider_lift_elevation">4dp</dimen> + + <dimen name="docked_divider_handle_width">16dp</dimen> + <dimen name="docked_divider_handle_height">2dp</dimen> </resources> diff --git a/libs/WindowManager/Shell/res/values/ids.xml b/libs/WindowManager/Shell/res/values/ids.xml index ed20398f309d..fb892388cf74 100644 --- a/libs/WindowManager/Shell/res/values/ids.xml +++ b/libs/WindowManager/Shell/res/values/ids.xml @@ -16,4 +16,11 @@ --> <resources> <item type="id" name="action_pip_resize" /> + + <!-- Accessibility actions for the docked stack divider --> + <item type="id" name="action_move_tl_full" /> + <item type="id" name="action_move_tl_70" /> + <item type="id" name="action_move_tl_50" /> + <item type="id" name="action_move_tl_30" /> + <item type="id" name="action_move_rb_full" /> </resources> diff --git a/libs/WindowManager/Shell/res/values/strings.xml b/libs/WindowManager/Shell/res/values/strings.xml index 6752b56fcdf3..cad924771cd3 100644 --- a/libs/WindowManager/Shell/res/values/strings.xml +++ b/libs/WindowManager/Shell/res/values/strings.xml @@ -53,4 +53,39 @@ <!-- TODO Deprecated. Label for PIP the drag to dismiss hint. DO NOT TRANSLATE [CHAR LIMIT=NONE]--> <string name="pip_phone_dismiss_hint">Drag down to dismiss</string> + + <!-- Multi-Window strings --> + <!-- Text that gets shown on top of current activity to inform the user that the system force-resized the current activity to be displayed in split-screen and that things might crash/not work properly [CHAR LIMIT=NONE] --> + <string name="dock_forced_resizable">App may not work with split-screen.</string> + <!-- Warning message when we try to dock a non-resizeable task and launch it in fullscreen instead. --> + <string name="dock_non_resizeble_failed_to_dock_text">App does not support split-screen.</string> + <!-- Text that gets shown on top of current activity to inform the user that the system force-resized the current activity to be displayed on a secondary display and that things might crash/not work properly [CHAR LIMIT=NONE] --> + <string name="forced_resizable_secondary_display">App may not work on a secondary display.</string> + <!-- Warning message when we try to launch a non-resizeable activity on a secondary display and launch it on the primary instead. --> + <string name="activity_launch_on_secondary_display_failed_text">App does not support launch on secondary displays.</string> + + <!-- Accessibility label for the divider that separates the windows in split-screen mode [CHAR LIMIT=NONE] --> + <string name="accessibility_divider">Split-screen divider</string> + + <!-- Accessibility action for moving docked stack divider to make the left screen full screen [CHAR LIMIT=NONE] --> + <string name="accessibility_action_divider_left_full">Left full screen</string> + <!-- Accessibility action for moving docked stack divider to make the left screen 70% [CHAR LIMIT=NONE] --> + <string name="accessibility_action_divider_left_70">Left 70%</string> + <!-- Accessibility action for moving docked stack divider to make the left screen 50% [CHAR LIMIT=NONE] --> + <string name="accessibility_action_divider_left_50">Left 50%</string> + <!-- Accessibility action for moving docked stack divider to make the left screen 30% [CHAR LIMIT=NONE] --> + <string name="accessibility_action_divider_left_30">Left 30%</string> + <!-- Accessibility action for moving docked stack divider to make the right screen full screen [CHAR LIMIT=NONE] --> + <string name="accessibility_action_divider_right_full">Right full screen</string> + + <!-- Accessibility action for moving docked stack divider to make the top screen full screen [CHAR LIMIT=NONE] --> + <string name="accessibility_action_divider_top_full">Top full screen</string> + <!-- Accessibility action for moving docked stack divider to make the top screen 70% [CHAR LIMIT=NONE] --> + <string name="accessibility_action_divider_top_70">Top 70%</string> + <!-- Accessibility action for moving docked stack divider to make the top screen 50% [CHAR LIMIT=NONE] --> + <string name="accessibility_action_divider_top_50">Top 50%</string> + <!-- Accessibility action for moving docked stack divider to make the top screen 30% [CHAR LIMIT=NONE] --> + <string name="accessibility_action_divider_top_30">Top 30%</string> + <!-- Accessibility action for moving docked stack divider to make the bottom screen full screen [CHAR LIMIT=NONE] --> + <string name="accessibility_action_divider_bottom_full">Bottom full screen</string> </resources> diff --git a/libs/WindowManager/Shell/res/values/styles.xml b/libs/WindowManager/Shell/res/values/styles.xml new file mode 100644 index 000000000000..fffcd33f7992 --- /dev/null +++ b/libs/WindowManager/Shell/res/values/styles.xml @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2020 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<resources xmlns:android="http://schemas.android.com/apk/res/android"> + <!-- Theme used for the activity that shows when the system forced an app to be resizable --> + <style name="ForcedResizableTheme" parent="@android:style/Theme.Translucent.NoTitleBar"> + <item name="android:windowBackground">@drawable/forced_resizable_background</item> + <item name="android:statusBarColor">@android:color/transparent</item> + <item name="android:windowAnimationStyle">@style/Animation.ForcedResizable</item> + </style> + + <style name="Animation.ForcedResizable" parent="@android:style/Animation"> + <item name="android:activityOpenEnterAnimation">@anim/forced_resizable_enter</item> + + <!-- If the target stack doesn't have focus, we do a task to front animation. --> + <item name="android:taskToFrontEnterAnimation">@anim/forced_resizable_enter</item> + <item name="android:activityCloseExitAnimation">@anim/forced_resizable_exit</item> + </style> + + <style name="DockedDividerBackground"> + <item name="android:layout_width">match_parent</item> + <item name="android:layout_height">10dp</item> + <item name="android:layout_gravity">center_vertical</item> + </style> + + <style name="DockedDividerMinimizedShadow"> + <item name="android:layout_width">match_parent</item> + <item name="android:layout_height">8dp</item> + </style> + + <style name="DockedDividerHandle"> + <item name="android:layout_gravity">center_horizontal</item> + <item name="android:layout_width">96dp</item> + <item name="android:layout_height">48dp</item> + </style> +</resources> diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/ShellTaskOrganizer.java b/libs/WindowManager/Shell/src/com/android/wm/shell/ShellTaskOrganizer.java index ea9576a511e9..f9ba695c8503 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/ShellTaskOrganizer.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/ShellTaskOrganizer.java @@ -17,23 +17,23 @@ package com.android.wm.shell; import android.app.ActivityManager.RunningTaskInfo; -import android.app.WindowConfiguration; -import android.content.Context; import android.util.Log; import android.util.Pair; import android.util.SparseArray; import android.view.SurfaceControl; +import android.window.ITaskOrganizerController; import android.window.TaskOrganizer; +import com.android.internal.annotations.VisibleForTesting; import com.android.internal.protolog.common.ProtoLog; import com.android.wm.shell.protolog.ShellProtoLogGroup; -import com.android.wm.shell.protolog.ShellProtoLogImpl; import java.util.ArrayList; import java.util.Arrays; /** * Unified task organizer for all components in the shell. + * TODO(b/167582004): may consider consolidating this class and TaskOrganizer */ public class ShellTaskOrganizer extends TaskOrganizer { @@ -56,6 +56,15 @@ public class ShellTaskOrganizer extends TaskOrganizer { // require us to report to both old and new listeners) private final SparseArray<Pair<RunningTaskInfo, SurfaceControl>> mTasks = new SparseArray<>(); + public ShellTaskOrganizer() { + super(); + } + + @VisibleForTesting + ShellTaskOrganizer(ITaskOrganizerController taskOrganizerController) { + super(taskOrganizerController); + } + /** * Adds a listener for tasks in a specific windowing mode. */ diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/FlingAnimationUtils.java b/libs/WindowManager/Shell/src/com/android/wm/shell/animation/FlingAnimationUtils.java index 12749fd8fce2..357f777e1270 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/FlingAnimationUtils.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/animation/FlingAnimationUtils.java @@ -11,10 +11,10 @@ * 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 + * limitations under the License. */ -package com.android.systemui.statusbar; +package com.android.wm.shell.animation; import android.animation.Animator; import android.util.DisplayMetrics; @@ -23,11 +23,6 @@ import android.view.ViewPropertyAnimator; import android.view.animation.Interpolator; import android.view.animation.PathInterpolator; -import com.android.systemui.Interpolators; -import com.android.systemui.statusbar.notification.NotificationUtils; - -import javax.inject.Inject; - /** * Utility class to calculate general fling animation when the finger is released. */ @@ -63,9 +58,9 @@ public class FlingAnimationUtils { /** * @param maxLengthSeconds the longest duration an animation can become in seconds - * @param speedUpFactor a factor from 0 to 1 how much the slow down should be shifted towards - * the end of the animation. 0 means it's at the beginning and no - * acceleration will take place. + * @param speedUpFactor a factor from 0 to 1 how much the slow down should be shifted towards + * the end of the animation. 0 means it's at the beginning and no + * acceleration will take place. */ public FlingAnimationUtils(DisplayMetrics displayMetrics, float maxLengthSeconds, float speedUpFactor) { @@ -74,19 +69,19 @@ public class FlingAnimationUtils { /** * @param maxLengthSeconds the longest duration an animation can become in seconds - * @param speedUpFactor a factor from 0 to 1 how much the slow down should be shifted towards - * the end of the animation. 0 means it's at the beginning and no - * acceleration will take place. - * @param x2 the x value to take for the second point of the bezier spline. If a value below 0 - * is provided, the value is automatically calculated. - * @param y2 the y value to take for the second point of the bezier spline + * @param speedUpFactor a factor from 0 to 1 how much the slow down should be shifted towards + * the end of the animation. 0 means it's at the beginning and no + * acceleration will take place. + * @param x2 the x value to take for the second point of the bezier spline. If a + * value below 0 is provided, the value is automatically calculated. + * @param y2 the y value to take for the second point of the bezier spline */ public FlingAnimationUtils(DisplayMetrics displayMetrics, float maxLengthSeconds, float speedUpFactor, float x2, float y2) { mMaxLengthSeconds = maxLengthSeconds; mSpeedUpFactor = speedUpFactor; if (x2 < 0) { - mLinearOutSlowInX2 = NotificationUtils.interpolate(LINEAR_OUT_SLOW_IN_X2, + mLinearOutSlowInX2 = interpolate(LINEAR_OUT_SLOW_IN_X2, LINEAR_OUT_SLOW_IN_X2_MAX, mSpeedUpFactor); } else { @@ -102,10 +97,10 @@ public class FlingAnimationUtils { * Applies the interpolator and length to the animator, such that the fling animation is * consistent with the finger motion. * - * @param animator the animator to apply + * @param animator the animator to apply * @param currValue the current value - * @param endValue the end value of the animator - * @param velocity the current velocity of the motion + * @param endValue the end value of the animator + * @param velocity the current velocity of the motion */ public void apply(Animator animator, float currValue, float endValue, float velocity) { apply(animator, currValue, endValue, velocity, Math.abs(endValue - currValue)); @@ -115,10 +110,10 @@ public class FlingAnimationUtils { * Applies the interpolator and length to the animator, such that the fling animation is * consistent with the finger motion. * - * @param animator the animator to apply + * @param animator the animator to apply * @param currValue the current value - * @param endValue the end value of the animator - * @param velocity the current velocity of the motion + * @param endValue the end value of the animator + * @param velocity the current velocity of the motion */ public void apply(ViewPropertyAnimator animator, float currValue, float endValue, float velocity) { @@ -129,10 +124,10 @@ public class FlingAnimationUtils { * Applies the interpolator and length to the animator, such that the fling animation is * consistent with the finger motion. * - * @param animator the animator to apply - * @param currValue the current value - * @param endValue the end value of the animator - * @param velocity the current velocity of the motion + * @param animator the animator to apply + * @param currValue the current value + * @param endValue the end value of the animator + * @param velocity the current velocity of the motion * @param maxDistance the maximum distance for this interaction; the maximum animation length * gets multiplied by the ratio between the actual distance and this value */ @@ -140,18 +135,18 @@ public class FlingAnimationUtils { float maxDistance) { AnimatorProperties properties = getProperties(currValue, endValue, velocity, maxDistance); - animator.setDuration(properties.duration); - animator.setInterpolator(properties.interpolator); + animator.setDuration(properties.mDuration); + animator.setInterpolator(properties.mInterpolator); } /** * Applies the interpolator and length to the animator, such that the fling animation is * consistent with the finger motion. * - * @param animator the animator to apply - * @param currValue the current value - * @param endValue the end value of the animator - * @param velocity the current velocity of the motion + * @param animator the animator to apply + * @param currValue the current value + * @param endValue the end value of the animator + * @param velocity the current velocity of the motion * @param maxDistance the maximum distance for this interaction; the maximum animation length * gets multiplied by the ratio between the actual distance and this value */ @@ -159,8 +154,8 @@ public class FlingAnimationUtils { float velocity, float maxDistance) { AnimatorProperties properties = getProperties(currValue, endValue, velocity, maxDistance); - animator.setDuration(properties.duration); - animator.setInterpolator(properties.interpolator); + animator.setDuration(properties.mDuration); + animator.setInterpolator(properties.mInterpolator); } private AnimatorProperties getProperties(float currValue, @@ -171,28 +166,28 @@ public class FlingAnimationUtils { float velAbs = Math.abs(velocity); float velocityFactor = mSpeedUpFactor == 0.0f ? 1.0f : Math.min(velAbs / HIGH_VELOCITY_DP_PER_SECOND, 1.0f); - float startGradient = NotificationUtils.interpolate(LINEAR_OUT_SLOW_IN_START_GRADIENT, + float startGradient = interpolate(LINEAR_OUT_SLOW_IN_START_GRADIENT, mY2 / mLinearOutSlowInX2, velocityFactor); float durationSeconds = startGradient * diff / velAbs; Interpolator slowInInterpolator = getInterpolator(startGradient, velocityFactor); if (durationSeconds <= maxLengthSeconds) { - mAnimatorProperties.interpolator = slowInInterpolator; + mAnimatorProperties.mInterpolator = slowInInterpolator; } else if (velAbs >= mMinVelocityPxPerSecond) { // Cross fade between fast-out-slow-in and linear interpolator with current velocity. durationSeconds = maxLengthSeconds; - VelocityInterpolator velocityInterpolator - = new VelocityInterpolator(durationSeconds, velAbs, diff); + VelocityInterpolator velocityInterpolator = new VelocityInterpolator( + durationSeconds, velAbs, diff); InterpolatorInterpolator superInterpolator = new InterpolatorInterpolator( velocityInterpolator, slowInInterpolator, Interpolators.LINEAR_OUT_SLOW_IN); - mAnimatorProperties.interpolator = superInterpolator; + mAnimatorProperties.mInterpolator = superInterpolator; } else { // Just use a normal interpolator which doesn't take the velocity into account. durationSeconds = maxLengthSeconds; - mAnimatorProperties.interpolator = Interpolators.FAST_OUT_SLOW_IN; + mAnimatorProperties.mInterpolator = Interpolators.FAST_OUT_SLOW_IN; } - mAnimatorProperties.duration = (long) (durationSeconds * 1000); + mAnimatorProperties.mDuration = (long) (durationSeconds * 1000); return mAnimatorProperties; } @@ -225,10 +220,10 @@ public class FlingAnimationUtils { * consistent with the finger motion for the case when the animation is making something * disappear. * - * @param animator the animator to apply - * @param currValue the current value - * @param endValue the end value of the animator - * @param velocity the current velocity of the motion + * @param animator the animator to apply + * @param currValue the current value + * @param endValue the end value of the animator + * @param velocity the current velocity of the motion * @param maxDistance the maximum distance for this interaction; the maximum animation length * gets multiplied by the ratio between the actual distance and this value */ @@ -236,8 +231,8 @@ public class FlingAnimationUtils { float velocity, float maxDistance) { AnimatorProperties properties = getDismissingProperties(currValue, endValue, velocity, maxDistance); - animator.setDuration(properties.duration); - animator.setInterpolator(properties.interpolator); + animator.setDuration(properties.mDuration); + animator.setInterpolator(properties.mInterpolator); } /** @@ -245,10 +240,10 @@ public class FlingAnimationUtils { * consistent with the finger motion for the case when the animation is making something * disappear. * - * @param animator the animator to apply - * @param currValue the current value - * @param endValue the end value of the animator - * @param velocity the current velocity of the motion + * @param animator the animator to apply + * @param currValue the current value + * @param endValue the end value of the animator + * @param velocity the current velocity of the motion * @param maxDistance the maximum distance for this interaction; the maximum animation length * gets multiplied by the ratio between the actual distance and this value */ @@ -256,8 +251,8 @@ public class FlingAnimationUtils { float velocity, float maxDistance) { AnimatorProperties properties = getDismissingProperties(currValue, endValue, velocity, maxDistance); - animator.setDuration(properties.duration); - animator.setInterpolator(properties.interpolator); + animator.setDuration(properties.mDuration); + animator.setInterpolator(properties.mInterpolator); } private AnimatorProperties getDismissingProperties(float currValue, float endValue, @@ -272,24 +267,24 @@ public class FlingAnimationUtils { Interpolator mLinearOutFasterIn = new PathInterpolator(0, 0, LINEAR_OUT_FASTER_IN_X2, y2); float durationSeconds = startGradient * diff / velAbs; if (durationSeconds <= maxLengthSeconds) { - mAnimatorProperties.interpolator = mLinearOutFasterIn; + mAnimatorProperties.mInterpolator = mLinearOutFasterIn; } else if (velAbs >= mMinVelocityPxPerSecond) { // Cross fade between linear-out-faster-in and linear interpolator with current // velocity. durationSeconds = maxLengthSeconds; - VelocityInterpolator velocityInterpolator - = new VelocityInterpolator(durationSeconds, velAbs, diff); + VelocityInterpolator velocityInterpolator = new VelocityInterpolator( + durationSeconds, velAbs, diff); InterpolatorInterpolator superInterpolator = new InterpolatorInterpolator( velocityInterpolator, mLinearOutFasterIn, Interpolators.LINEAR_OUT_SLOW_IN); - mAnimatorProperties.interpolator = superInterpolator; + mAnimatorProperties.mInterpolator = superInterpolator; } else { // Just use a normal interpolator which doesn't take the velocity into account. durationSeconds = maxLengthSeconds; - mAnimatorProperties.interpolator = Interpolators.FAST_OUT_LINEAR_IN; + mAnimatorProperties.mInterpolator = Interpolators.FAST_OUT_LINEAR_IN; } - mAnimatorProperties.duration = (long) (durationSeconds * 1000); + mAnimatorProperties.mDuration = (long) (durationSeconds * 1000); return mAnimatorProperties; } @@ -361,10 +356,11 @@ public class FlingAnimationUtils { } private static class AnimatorProperties { - Interpolator interpolator; - long duration; + Interpolator mInterpolator; + long mDuration; } + /** Builder for {@link #FlingAnimationUtils}. */ public static class Builder { private final DisplayMetrics mDisplayMetrics; float mMaxLengthSeconds; @@ -372,32 +368,39 @@ public class FlingAnimationUtils { float mX2; float mY2; - @Inject public Builder(DisplayMetrics displayMetrics) { mDisplayMetrics = displayMetrics; reset(); } + /** Sets the longest duration an animation can become in seconds. */ public Builder setMaxLengthSeconds(float maxLengthSeconds) { mMaxLengthSeconds = maxLengthSeconds; return this; } + /** + * Sets the factor for how much the slow down should be shifted towards the end of the + * animation. + */ public Builder setSpeedUpFactor(float speedUpFactor) { mSpeedUpFactor = speedUpFactor; return this; } + /** Sets the x value to take for the second point of the bezier spline. */ public Builder setX2(float x2) { mX2 = x2; return this; } + /** Sets the y value to take for the second point of the bezier spline. */ public Builder setY2(float y2) { mY2 = y2; return this; } + /** Resets all parameters of the builder. */ public Builder reset() { mMaxLengthSeconds = 0; mSpeedUpFactor = 0.0f; @@ -407,9 +410,14 @@ public class FlingAnimationUtils { return this; } + /** Builds {@link #FlingAnimationUtils}. */ public FlingAnimationUtils build() { return new FlingAnimationUtils(mDisplayMetrics, mMaxLengthSeconds, mSpeedUpFactor, mX2, mY2); } } + + private static float interpolate(float start, float end, float amount) { + return start * (1.0f - amount) + end * amount; + } } diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/animation/Interpolators.java b/libs/WindowManager/Shell/src/com/android/wm/shell/animation/Interpolators.java new file mode 100644 index 000000000000..b794b91568fc --- /dev/null +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/animation/Interpolators.java @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2020 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.wm.shell.animation; + +import android.view.animation.Interpolator; +import android.view.animation.PathInterpolator; + +/** + * Common interpolators used in wm shell library. + */ +public class Interpolators { + /** + * Interpolator for fast out linear in animation. + */ + public static final Interpolator FAST_OUT_LINEAR_IN = new PathInterpolator(0.4f, 0f, 1f, 1f); + + /** + * Interpolator for fast out slow in animation. + */ + public static final Interpolator FAST_OUT_SLOW_IN = new PathInterpolator(0.4f, 0f, 0.2f, 1f); + + /** + * Interpolator for linear out slow in animation. + */ + public static final Interpolator LINEAR_OUT_SLOW_IN = new PathInterpolator(0f, 0f, 0.2f, 1f); + + /** + * Interpolator to be used when animating a move based on a click. Pair with enough duration. + */ + public static final Interpolator TOUCH_RESPONSE = new PathInterpolator(0.3f, 0f, 0.1f, 1f); +} diff --git a/packages/SystemUI/src/com/android/systemui/stackdivider/SyncTransactionQueue.java b/libs/WindowManager/Shell/src/com/android/wm/shell/common/SyncTransactionQueue.java index 13ed02e9513e..9cb125087cd9 100644 --- a/packages/SystemUI/src/com/android/systemui/stackdivider/SyncTransactionQueue.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/common/SyncTransactionQueue.java @@ -14,8 +14,9 @@ * limitations under the License. */ -package com.android.systemui.stackdivider; +package com.android.wm.shell.common; +import android.annotation.NonNull; import android.os.Handler; import android.util.Slog; import android.view.SurfaceControl; @@ -23,17 +24,13 @@ import android.window.WindowContainerTransaction; import android.window.WindowContainerTransactionCallback; import android.window.WindowOrganizer; -import androidx.annotation.NonNull; - -import com.android.wm.shell.common.TransactionPool; - import java.util.ArrayList; /** * Helper for serializing sync-transactions and corresponding callbacks. */ -class SyncTransactionQueue { - private static final boolean DEBUG = SplitScreenController.DEBUG; +public final class SyncTransactionQueue { + private static final boolean DEBUG = false; private static final String TAG = "SyncTransactionQueue"; // Just a little longer than the sync-engine timeout of 5s @@ -58,7 +55,7 @@ class SyncTransactionQueue { } }; - SyncTransactionQueue(TransactionPool pool, Handler handler) { + public SyncTransactionQueue(TransactionPool pool, Handler handler) { mTransactionPool = pool; mHandler = handler; } @@ -66,7 +63,7 @@ class SyncTransactionQueue { /** * Queues a sync transaction to be sent serially to WM. */ - void queue(WindowContainerTransaction wct) { + public void queue(WindowContainerTransaction wct) { SyncCallback cb = new SyncCallback(wct); synchronized (mQueue) { if (DEBUG) Slog.d(TAG, "Queueing up " + wct); @@ -82,7 +79,7 @@ class SyncTransactionQueue { * Otherwise just returns without queueing. * @return {@code true} if queued, {@code false} if not. */ - boolean queueIfWaiting(WindowContainerTransaction wct) { + public boolean queueIfWaiting(WindowContainerTransaction wct) { synchronized (mQueue) { if (mQueue.isEmpty()) { if (DEBUG) Slog.d(TAG, "Nothing in queue, so skip queueing up " + wct); @@ -102,7 +99,7 @@ class SyncTransactionQueue { * Runs a runnable in sync with sync transactions (ie. when the current in-flight transaction * returns. If there are no transactions in-flight, runnable executes immediately. */ - void runInSync(TransactionRunnable runnable) { + public void runInSync(TransactionRunnable runnable) { synchronized (mQueue) { if (DEBUG) Slog.d(TAG, "Run in sync. mInFlight=" + mInFlight); if (mInFlight != null) { @@ -127,7 +124,9 @@ class SyncTransactionQueue { t.close(); } - interface TransactionRunnable { + /** Task to run with transaction. */ + public interface TransactionRunnable { + /** Runs with transaction. */ void runWithTransaction(SurfaceControl.Transaction t); } @@ -154,7 +153,7 @@ class SyncTransactionQueue { @Override public void onTransactionReady(int id, - @androidx.annotation.NonNull SurfaceControl.Transaction t) { + @NonNull SurfaceControl.Transaction t) { mHandler.post(() -> { synchronized (mQueue) { if (mId != id) { diff --git a/packages/SystemUI/src/com/android/systemui/stackdivider/DividerHandleView.java b/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/DividerHandleView.java index a10242a689a2..2cb1fff4cde6 100644 --- a/packages/SystemUI/src/com/android/systemui/stackdivider/DividerHandleView.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/DividerHandleView.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.android.systemui.stackdivider; +package com.android.wm.shell.splitscreen; import android.animation.Animator; import android.animation.AnimatorListenerAdapter; @@ -28,43 +28,41 @@ import android.util.AttributeSet; import android.util.Property; import android.view.View; -import com.android.systemui.Interpolators; -import com.android.systemui.R; +import com.android.wm.shell.R; +import com.android.wm.shell.animation.Interpolators; /** * View for the handle in the docked stack divider. */ -class DividerHandleView extends View { - - private final static Property<DividerHandleView, Integer> WIDTH_PROPERTY - = new Property<DividerHandleView, Integer>(Integer.class, "width") { - - @Override - public Integer get(DividerHandleView object) { - return object.mCurrentWidth; - } - - @Override - public void set(DividerHandleView object, Integer value) { - object.mCurrentWidth = value; - object.invalidate(); - } - }; - - private final static Property<DividerHandleView, Integer> HEIGHT_PROPERTY - = new Property<DividerHandleView, Integer>(Integer.class, "height") { - - @Override - public Integer get(DividerHandleView object) { - return object.mCurrentHeight; - } - - @Override - public void set(DividerHandleView object, Integer value) { - object.mCurrentHeight = value; - object.invalidate(); - } - }; +public class DividerHandleView extends View { + + private static final Property<DividerHandleView, Integer> WIDTH_PROPERTY = + new Property<DividerHandleView, Integer>(Integer.class, "width") { + @Override + public Integer get(DividerHandleView object) { + return object.mCurrentWidth; + } + + @Override + public void set(DividerHandleView object, Integer value) { + object.mCurrentWidth = value; + object.invalidate(); + } + }; + + private static final Property<DividerHandleView, Integer> HEIGHT_PROPERTY = + new Property<DividerHandleView, Integer>(Integer.class, "height") { + @Override + public Integer get(DividerHandleView object) { + return object.mCurrentHeight; + } + + @Override + public void set(DividerHandleView object, Integer value) { + object.mCurrentHeight = value; + object.invalidate(); + } + }; private final Paint mPaint = new Paint(); private final int mWidth; @@ -86,7 +84,7 @@ class DividerHandleView extends View { mCircleDiameter = (mWidth + mHeight) / 3; } - public void setTouching(boolean touching, boolean animate) { + void setTouching(boolean touching, boolean animate) { if (touching == mTouching) { return; } diff --git a/packages/SystemUI/src/com/android/systemui/stackdivider/DividerImeController.java b/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/DividerImeController.java index 64ee7ed5e0e0..ff617ed466d1 100644 --- a/packages/SystemUI/src/com/android/systemui/stackdivider/DividerImeController.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/DividerImeController.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.android.systemui.stackdivider; +package com.android.wm.shell.splitscreen; import static android.content.res.Configuration.SCREEN_HEIGHT_DP_UNDEFINED; import static android.content.res.Configuration.SCREEN_WIDTH_DP_UNDEFINED; @@ -22,6 +22,7 @@ import static android.content.res.Configuration.SCREEN_WIDTH_DP_UNDEFINED; import android.animation.Animator; import android.animation.AnimatorListenerAdapter; import android.animation.ValueAnimator; +import android.annotation.Nullable; import android.graphics.Rect; import android.os.Handler; import android.util.Slog; @@ -29,9 +30,6 @@ import android.view.SurfaceControl; import android.window.TaskOrganizer; import android.window.WindowContainerToken; import android.window.WindowContainerTransaction; -import android.window.WindowOrganizer; - -import androidx.annotation.Nullable; import com.android.wm.shell.common.DisplayImeController; import com.android.wm.shell.common.TransactionPool; @@ -45,6 +43,7 @@ class DividerImeController implements DisplayImeController.ImePositionProcessor private final SplitScreenTaskOrganizer mSplits; private final TransactionPool mTransactionPool; private final Handler mHandler; + private final TaskOrganizer mTaskOrganizer; /** * These are the y positions of the top of the IME surface when it is hidden and when it is @@ -93,10 +92,12 @@ class DividerImeController implements DisplayImeController.ImePositionProcessor private boolean mPausedTargetAdjusted = false; private boolean mAdjustedWhileHidden = false; - DividerImeController(SplitScreenTaskOrganizer splits, TransactionPool pool, Handler handler) { + DividerImeController(SplitScreenTaskOrganizer splits, TransactionPool pool, Handler handler, + TaskOrganizer taskOrganizer) { mSplits = splits; mTransactionPool = pool; mHandler = handler; + mTaskOrganizer = taskOrganizer; } private DividerView getView() { @@ -112,7 +113,7 @@ class DividerImeController implements DisplayImeController.ImePositionProcessor } private boolean getSecondaryHasFocus(int displayId) { - WindowContainerToken imeSplit = TaskOrganizer.getImeTarget(displayId); + WindowContainerToken imeSplit = mTaskOrganizer.getImeTarget(displayId); return imeSplit != null && (imeSplit.asBinder() == mSplits.mSecondary.token.asBinder()); } @@ -237,7 +238,7 @@ class DividerImeController implements DisplayImeController.ImePositionProcessor } if (!mSplits.mSplitScreenController.getWmProxy().queueSyncTransactionIfWaiting(wct)) { - WindowOrganizer.applyTransaction(wct); + mTaskOrganizer.applyTransaction(wct); } } diff --git a/packages/SystemUI/src/com/android/systemui/stackdivider/DividerState.java b/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/DividerState.java index 8e79d51ee209..23d86a00d4bf 100644 --- a/packages/SystemUI/src/com/android/systemui/stackdivider/DividerState.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/DividerState.java @@ -11,15 +11,15 @@ * 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 + * limitations under the License. */ -package com.android.systemui.stackdivider; +package com.android.wm.shell.splitscreen; /** * Class to hold state of divider that needs to persist across configuration changes. */ -public class DividerState { +final class DividerState { public boolean animateAfterRecentsDrawn; public float mRatioPositionBeforeMinimized; } diff --git a/packages/SystemUI/src/com/android/systemui/stackdivider/DividerView.java b/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/DividerView.java index fdf24b1e1a7e..00146e9447bd 100644 --- a/packages/SystemUI/src/com/android/systemui/stackdivider/DividerView.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/DividerView.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.android.systemui.stackdivider; +package com.android.wm.shell.splitscreen; import static android.view.PointerIcon.TYPE_HORIZONTAL_DOUBLE_ARROW; import static android.view.PointerIcon.TYPE_VERTICAL_DOUBLE_ARROW; @@ -62,9 +62,9 @@ import com.android.internal.logging.nano.MetricsProto.MetricsEvent; import com.android.internal.policy.DividerSnapAlgorithm; import com.android.internal.policy.DividerSnapAlgorithm.SnapTarget; import com.android.internal.policy.DockedDividerUtils; -import com.android.systemui.Interpolators; -import com.android.systemui.R; -import com.android.systemui.statusbar.FlingAnimationUtils; +import com.android.wm.shell.R; +import com.android.wm.shell.animation.FlingAnimationUtils; +import com.android.wm.shell.animation.Interpolators; import java.util.function.Consumer; @@ -76,7 +76,7 @@ public class DividerView extends FrameLayout implements OnTouchListener, private static final String TAG = "DividerView"; private static final boolean DEBUG = SplitScreenController.DEBUG; - public interface DividerCallbacks { + interface DividerCallbacks { void onDraggingStart(); void onDraggingEnd(); } @@ -187,7 +187,7 @@ public class DividerView extends FrameLayout implements OnTouchListener, if (snapAlgorithm.showMiddleSplitTargetForAccessibility()) { // Only show the middle target if there are more than 1 split target info.addAction(new AccessibilityAction(R.id.action_move_tl_50, - mContext.getString(R.string.accessibility_action_divider_top_50))); + mContext.getString(R.string.accessibility_action_divider_top_50))); } if (snapAlgorithm.isLastSplitTargetAvailable()) { info.addAction(new AccessibilityAction(R.id.action_move_tl_30, @@ -205,7 +205,7 @@ public class DividerView extends FrameLayout implements OnTouchListener, if (snapAlgorithm.showMiddleSplitTargetForAccessibility()) { // Only show the middle target if there are more than 1 split target info.addAction(new AccessibilityAction(R.id.action_move_tl_50, - mContext.getString(R.string.accessibility_action_divider_left_50))); + mContext.getString(R.string.accessibility_action_divider_left_50))); } if (snapAlgorithm.isLastSplitTargetAvailable()) { info.addAction(new AccessibilityAction(R.id.action_move_tl_30, @@ -373,6 +373,7 @@ public class DividerView extends FrameLayout implements OnTouchListener, } } + /** Gets non-minimized secondary bounds of split screen. */ public Rect getNonMinimizedSplitScreenSecondaryBounds() { mOtherTaskRect.set(mSplitLayout.mSecondary); return mOtherTaskRect; @@ -409,6 +410,7 @@ public class DividerView extends FrameLayout implements OnTouchListener, return mSurfaceHidden; } + /** Starts dragging the divider bar. */ public boolean startDragging(boolean animate, boolean touching) { cancelFlingAnimation(); if (touching) { @@ -427,6 +429,7 @@ public class DividerView extends FrameLayout implements OnTouchListener, return inSplitMode(); } + /** Stops dragging the divider bar. */ public void stopDragging(int position, float velocity, boolean avoidDismissStart, boolean logMetrics) { mHandle.setTouching(false, true /* animate */); @@ -616,7 +619,7 @@ public class DividerView extends FrameLayout implements OnTouchListener, mEntranceAnimationRunning = false; mExitAnimationRunning = false; if (!dismissed && !wasMinimizeInteraction) { - WindowManagerProxy.applyResizeSplits(snapTarget.position, mSplitLayout); + mWindowManagerProxy.applyResizeSplits(snapTarget.position, mSplitLayout); } if (mCallback != null) { mCallback.onDraggingEnd(); @@ -886,10 +889,10 @@ public class DividerView extends FrameLayout implements OnTouchListener, t.hide(sc).apply(); mTiles.releaseTransaction(t); int midPos = mSplitLayout.getSnapAlgorithm().getMiddleTarget().position; - WindowManagerProxy.applyResizeSplits(midPos, mSplitLayout); + mWindowManagerProxy.applyResizeSplits(midPos, mSplitLayout); } - public void setMinimizedDockStack(boolean minimized, long animDuration, + void setMinimizedDockStack(boolean minimized, long animDuration, boolean isHomeStackResizable) { if (DEBUG) Slog.d(TAG, "setMinDock: " + mDockedStackMinimized + "->" + minimized); mHomeStackResizable = isHomeStackResizable; @@ -925,7 +928,7 @@ public class DividerView extends FrameLayout implements OnTouchListener, } } - public void setAdjustedForIme(boolean adjustedForIme, long animDuration) { + void setAdjustedForIme(boolean adjustedForIme, long animDuration) { if (mAdjustedForIme == adjustedForIme) { return; } @@ -952,8 +955,8 @@ public class DividerView extends FrameLayout implements OnTouchListener, private void saveSnapTargetBeforeMinimized(SnapTarget target) { mSnapTargetBeforeMinimized = target; - mState.mRatioPositionBeforeMinimized = (float) target.position / - (isHorizontalDivision() ? mSplitLayout.mDisplayLayout.height() + mState.mRatioPositionBeforeMinimized = (float) target.position + / (isHorizontalDivision() ? mSplitLayout.mDisplayLayout.height() : mSplitLayout.mDisplayLayout.width()); } @@ -971,8 +974,8 @@ public class DividerView extends FrameLayout implements OnTouchListener, } private void repositionSnapTargetBeforeMinimized() { - int position = (int) (mState.mRatioPositionBeforeMinimized * - (isHorizontalDivision() ? mSplitLayout.mDisplayLayout.height() + int position = (int) (mState.mRatioPositionBeforeMinimized + * (isHorizontalDivision() ? mSplitLayout.mDisplayLayout.height() : mSplitLayout.mDisplayLayout.width())); // Set the snap target before minimized but do not save until divider is attached and not @@ -1011,7 +1014,7 @@ public class DividerView extends FrameLayout implements OnTouchListener, containingRect.right, containingRect.bottom); } - public void calculateBoundsForPosition(int position, int dockSide, Rect outRect) { + private void calculateBoundsForPosition(int position, int dockSide, Rect outRect) { DockedDividerUtils.calculateBoundsForPosition(position, dockSide, outRect, mSplitLayout.mDisplayLayout.width(), mSplitLayout.mDisplayLayout.height(), mDividerSize); @@ -1240,8 +1243,8 @@ public class DividerView extends FrameLayout implements OnTouchListener, if (dismissTarget != null && fraction > 0f && isDismissing(splitTarget, position, dockSide)) { fraction = calculateParallaxDismissingFraction(fraction, dockSide); - int offsetPosition = (int) (start + - fraction * (dismissTarget.position - splitTarget.position)); + int offsetPosition = (int) (start + fraction + * (dismissTarget.position - splitTarget.position)); int width = taskRect.width(); int height = taskRect.height(); switch (dockSide) { diff --git a/packages/SystemUI/src/com/android/systemui/stackdivider/DividerWindowManager.java b/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/DividerWindowManager.java index d869333e11a7..0b4e17c27398 100644 --- a/packages/SystemUI/src/com/android/systemui/stackdivider/DividerWindowManager.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/DividerWindowManager.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.android.systemui.stackdivider; +package com.android.wm.shell.splitscreen; import static android.view.WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE; import static android.view.WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE; @@ -37,7 +37,7 @@ import com.android.wm.shell.common.SystemWindows; /** * Manages the window parameters of the docked stack divider. */ -public class DividerWindowManager { +final class DividerWindowManager { private static final String WINDOW_TITLE = "DockedStackDivider"; @@ -45,12 +45,12 @@ public class DividerWindowManager { private WindowManager.LayoutParams mLp; private View mView; - public DividerWindowManager(SystemWindows systemWindows) { + DividerWindowManager(SystemWindows systemWindows) { mSystemWindows = systemWindows; } /** Add a divider view */ - public void add(View view, int width, int height, int displayId) { + void add(View view, int width, int height, int displayId) { mLp = new WindowManager.LayoutParams( width, height, TYPE_DOCK_DIVIDER, FLAG_NOT_FOCUSABLE | FLAG_NOT_TOUCH_MODAL @@ -67,14 +67,14 @@ public class DividerWindowManager { mView = view; } - public void remove() { + void remove() { if (mView != null) { mSystemWindows.removeView(mView); } mView = null; } - public void setSlippery(boolean slippery) { + void setSlippery(boolean slippery) { boolean changed = false; if (slippery && (mLp.flags & FLAG_SLIPPERY) == 0) { mLp.flags |= FLAG_SLIPPERY; @@ -88,7 +88,7 @@ public class DividerWindowManager { } } - public void setTouchable(boolean touchable) { + void setTouchable(boolean touchable) { if (mView == null) { return; } @@ -106,7 +106,7 @@ public class DividerWindowManager { } /** Sets the touch region to `touchRegion`. Use null to unset.*/ - public void setTouchRegion(Region touchRegion) { + void setTouchRegion(Region touchRegion) { if (mView == null) { return; } diff --git a/packages/SystemUI/src/com/android/systemui/stackdivider/ForcedResizableInfoActivity.java b/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/ForcedResizableInfoActivity.java index 02f75050c061..7a1633530148 100644 --- a/packages/SystemUI/src/com/android/systemui/stackdivider/ForcedResizableInfoActivity.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/ForcedResizableInfoActivity.java @@ -11,10 +11,10 @@ * 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 + * limitations under the License. */ -package com.android.systemui.stackdivider; +package com.android.wm.shell.splitscreen; import static android.app.ITaskStackListener.FORCED_RESIZEABLE_REASON_SECONDARY_DISPLAY; import static android.app.ITaskStackListener.FORCED_RESIZEABLE_REASON_SPLIT_SCREEN; @@ -29,7 +29,7 @@ import android.view.View; import android.view.View.OnTouchListener; import android.widget.TextView; -import com.android.systemui.R; +import com.android.wm.shell.R; /** * Translucent activity that gets started on top of a task in multi-window to inform the user that diff --git a/packages/SystemUI/src/com/android/systemui/stackdivider/ForcedResizableInfoActivityController.java b/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/ForcedResizableInfoActivityController.java index 4c26694cc22a..1ef142dacb9e 100644 --- a/packages/SystemUI/src/com/android/systemui/stackdivider/ForcedResizableInfoActivityController.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/ForcedResizableInfoActivityController.java @@ -11,13 +11,13 @@ * 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 + * limitations under the License. */ -package com.android.systemui.stackdivider; +package com.android.wm.shell.splitscreen; -import static com.android.systemui.stackdivider.ForcedResizableInfoActivity - .EXTRA_FORCED_RESIZEABLE_REASON; + +import static com.android.wm.shell.splitscreen.ForcedResizableInfoActivity.EXTRA_FORCED_RESIZEABLE_REASON; import android.app.ActivityOptions; import android.content.Context; @@ -27,7 +27,7 @@ import android.os.UserHandle; import android.util.ArraySet; import android.widget.Toast; -import com.android.systemui.R; +import com.android.wm.shell.R; import java.util.function.Consumer; @@ -55,20 +55,20 @@ final class ForcedResizableInfoActivityController implements DividerView.Divider /** Record of force resized task that's pending to be handled. */ private class PendingTaskRecord { - int taskId; + int mTaskId; /** * {@link android.app.ITaskStackListener#FORCED_RESIZEABLE_REASON_SPLIT_SCREEN} or * {@link android.app.ITaskStackListener#FORCED_RESIZEABLE_REASON_SECONDARY_DISPLAY} */ - int reason; + int mReason; PendingTaskRecord(int taskId, int reason) { - this.taskId = taskId; - this.reason = reason; + this.mTaskId = taskId; + this.mReason = reason; } } - public ForcedResizableInfoActivityController(Context context, + ForcedResizableInfoActivityController(Context context, SplitScreenController splitScreenController) { mContext = context; splitScreenController.registerInSplitScreenListener(mDockedStackExistsListener); @@ -116,11 +116,11 @@ final class ForcedResizableInfoActivityController implements DividerView.Divider PendingTaskRecord pendingRecord = mPendingTasks.valueAt(i); Intent intent = new Intent(mContext, ForcedResizableInfoActivity.class); ActivityOptions options = ActivityOptions.makeBasic(); - options.setLaunchTaskId(pendingRecord.taskId); + options.setLaunchTaskId(pendingRecord.mTaskId); // Set as task overlay and allow to resume, so that when an app enters split-screen and // becomes paused, the overlay will still be shown. options.setTaskOverlay(true, true /* canResume */); - intent.putExtra(EXTRA_FORCED_RESIZEABLE_REASON, pendingRecord.reason); + intent.putExtra(EXTRA_FORCED_RESIZEABLE_REASON, pendingRecord.mReason); mContext.startActivityAsUser(intent, options.toBundle(), UserHandle.CURRENT); } mPendingTasks.clear(); diff --git a/packages/SystemUI/src/com/android/systemui/stackdivider/MinimizedDockShadow.java b/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/MinimizedDockShadow.java index ecff54fd907d..06f4ef109193 100644 --- a/packages/SystemUI/src/com/android/systemui/stackdivider/MinimizedDockShadow.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/MinimizedDockShadow.java @@ -11,10 +11,10 @@ * 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 + * limitations under the License. */ -package com.android.systemui.stackdivider; +package com.android.wm.shell.splitscreen; import android.annotation.Nullable; import android.content.Context; @@ -27,7 +27,7 @@ import android.util.AttributeSet; import android.view.View; import android.view.WindowManager; -import com.android.systemui.R; +import com.android.wm.shell.R; /** * Shadow for the minimized dock state on homescreen. @@ -42,7 +42,7 @@ public class MinimizedDockShadow extends View { super(context, attrs); } - public void setDockSide(int dockSide) { + void setDockSide(int dockSide) { if (dockSide != mDockSide) { mDockSide = dockSide; updatePaint(getLeft(), getTop(), getRight(), getBottom()); diff --git a/packages/SystemUI/src/com/android/systemui/stackdivider/SplitDisplayLayout.java b/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/SplitDisplayLayout.java index a34e85517953..3c0f93906795 100644 --- a/packages/SystemUI/src/com/android/systemui/stackdivider/SplitDisplayLayout.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/SplitDisplayLayout.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.android.systemui.stackdivider; +package com.android.wm.shell.splitscreen; import static android.content.res.Configuration.ORIENTATION_LANDSCAPE; import static android.content.res.Configuration.ORIENTATION_PORTRAIT; diff --git a/packages/SystemUI/src/com/android/systemui/stackdivider/SplitScreen.java b/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/SplitScreen.java index 93b1f86a5dc2..184342f14d4f 100644 --- a/packages/SystemUI/src/com/android/systemui/stackdivider/SplitScreen.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/SplitScreen.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.android.systemui.stackdivider; +package com.android.wm.shell.splitscreen; import android.graphics.Rect; import android.window.WindowContainerToken; diff --git a/packages/SystemUI/src/com/android/systemui/stackdivider/SplitScreenController.java b/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/SplitScreenController.java index 360b49555612..eed5092ea96b 100644 --- a/packages/SystemUI/src/com/android/systemui/stackdivider/SplitScreenController.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/SplitScreenController.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.android.systemui.stackdivider; +package com.android.wm.shell.splitscreen; import static android.app.WindowConfiguration.ACTIVITY_TYPE_UNDEFINED; import static android.content.res.Configuration.ORIENTATION_LANDSCAPE; @@ -29,12 +29,12 @@ import android.provider.Settings; import android.util.Slog; import android.view.LayoutInflater; import android.view.View; +import android.window.TaskOrganizer; import android.window.WindowContainerToken; import android.window.WindowContainerTransaction; -import android.window.WindowOrganizer; import com.android.internal.policy.DividerSnapAlgorithm; -import com.android.systemui.R; +import com.android.wm.shell.R; import com.android.wm.shell.ShellTaskOrganizer; import com.android.wm.shell.common.DisplayChangeController; import com.android.wm.shell.common.DisplayController; @@ -71,6 +71,7 @@ public class SplitScreenController implements SplitScreen, private final SystemWindows mSystemWindows; final TransactionPool mTransactionPool; private final WindowManagerProxy mWindowManagerProxy; + private final TaskOrganizer mTaskOrganizer; private final ArrayList<WeakReference<Consumer<Boolean>>> mDockedStackExistsListeners = new ArrayList<>(); @@ -106,9 +107,12 @@ public class SplitScreenController implements SplitScreen, mHandler = handler; mForcedResizableController = new ForcedResizableInfoActivityController(context, this); mTransactionPool = transactionPool; - mWindowManagerProxy = new WindowManagerProxy(mTransactionPool, mHandler); + mWindowManagerProxy = new WindowManagerProxy(mTransactionPool, mHandler, + shellTaskOrganizer); + mTaskOrganizer = shellTaskOrganizer; mSplits = new SplitScreenTaskOrganizer(this, shellTaskOrganizer); - mImePositionProcessor = new DividerImeController(mSplits, mTransactionPool, mHandler); + mImePositionProcessor = new DividerImeController(mSplits, mTransactionPool, mHandler, + shellTaskOrganizer); mRotationController = (display, fromRotation, toRotation, wct) -> { if (!mSplits.isSplitScreenSupported() || mWindowManagerProxy == null) { @@ -132,7 +136,7 @@ public class SplitScreenController implements SplitScreen, sdl.resizeSplits(target.position, t); if (isSplitActive() && mHomeStackResizable) { - WindowManagerProxy + mWindowManagerProxy .applyHomeTasksMinimized(sdl, mSplits.mSecondary.token, t); } if (mWindowManagerProxy.queueSyncTransactionIfWaiting(t)) { @@ -189,7 +193,7 @@ public class SplitScreenController implements SplitScreen, final WindowContainerTransaction tct = new WindowContainerTransaction(); int midPos = mSplitLayout.getSnapAlgorithm().getMiddleTarget().position; mSplitLayout.resizeSplits(midPos, tct); - WindowOrganizer.applyTransaction(tct); + mTaskOrganizer.applyTransaction(tct); } catch (Exception e) { Slog.e(TAG, "Failed to register docked stack listener", e); removeDivider(); @@ -208,7 +212,7 @@ public class SplitScreenController implements SplitScreen, int midPos = mSplitLayout.getSnapAlgorithm().getMiddleTarget().position; final WindowContainerTransaction tct = new WindowContainerTransaction(); mSplitLayout.resizeSplits(midPos, tct); - WindowOrganizer.applyTransaction(tct); + mTaskOrganizer.applyTransaction(tct); } else if (mSplitLayout.mDisplayLayout.rotation() == mRotateSplitLayout.mDisplayLayout.rotation()) { mSplitLayout.mPrimary = new Rect(mRotateSplitLayout.mPrimary); @@ -372,7 +376,7 @@ public class SplitScreenController implements SplitScreen, // If we are only setting focusability, a sync transaction isn't necessary (in fact it // can interrupt other animations), so see if it can be submitted on pending instead. if (!mWindowManagerProxy.queueSyncTransactionIfWaiting(wct)) { - WindowOrganizer.applyTransaction(wct); + mTaskOrganizer.applyTransaction(wct); } } diff --git a/packages/SystemUI/src/com/android/systemui/stackdivider/SplitScreenTaskOrganizer.java b/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/SplitScreenTaskOrganizer.java index 325c5597f9d8..30bc43b0292f 100644 --- a/packages/SystemUI/src/com/android/systemui/stackdivider/SplitScreenTaskOrganizer.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/SplitScreenTaskOrganizer.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.android.systemui.stackdivider; +package com.android.wm.shell.splitscreen; import static android.app.WindowConfiguration.ACTIVITY_TYPE_HOME; import static android.app.WindowConfiguration.ACTIVITY_TYPE_RECENTS; @@ -31,7 +31,6 @@ import android.util.Log; import android.view.Display; import android.view.SurfaceControl; import android.view.SurfaceSession; -import android.window.TaskOrganizer; import com.android.wm.shell.ShellTaskOrganizer; @@ -64,9 +63,9 @@ class SplitScreenTaskOrganizer implements ShellTaskOrganizer.TaskListener { void init() throws RemoteException { synchronized (this) { try { - mPrimary = TaskOrganizer.createRootTask(Display.DEFAULT_DISPLAY, + mPrimary = mTaskOrganizer.createRootTask(Display.DEFAULT_DISPLAY, WindowConfiguration.WINDOWING_MODE_SPLIT_SCREEN_PRIMARY); - mSecondary = TaskOrganizer.createRootTask(Display.DEFAULT_DISPLAY, + mSecondary = mTaskOrganizer.createRootTask(Display.DEFAULT_DISPLAY, WindowConfiguration.WINDOWING_MODE_SPLIT_SCREEN_SECONDARY); } catch (Exception e) { // teardown to prevent callbacks diff --git a/packages/SystemUI/src/com/android/systemui/stackdivider/WindowManagerProxy.java b/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/WindowManagerProxy.java index 82b10bd40b17..015707ecc6c8 100644 --- a/packages/SystemUI/src/com/android/systemui/stackdivider/WindowManagerProxy.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/WindowManagerProxy.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.android.systemui.stackdivider; +package com.android.wm.shell.splitscreen; import static android.app.WindowConfiguration.ACTIVITY_TYPE_HOME; import static android.app.WindowConfiguration.ACTIVITY_TYPE_RECENTS; @@ -40,6 +40,7 @@ import android.window.WindowContainerTransaction; import android.window.WindowOrganizer; import com.android.internal.annotations.GuardedBy; +import com.android.wm.shell.common.SyncTransactionQueue; import com.android.wm.shell.common.TransactionPool; import java.util.ArrayList; @@ -82,8 +83,12 @@ class WindowManagerProxy { } }; - WindowManagerProxy(TransactionPool transactionPool, Handler handler) { + private final TaskOrganizer mTaskOrganizer; + + WindowManagerProxy(TransactionPool transactionPool, Handler handler, + TaskOrganizer taskOrganizer) { mSyncTransactionQueue = new SyncTransactionQueue(transactionPool, handler); + mTaskOrganizer = taskOrganizer; } void dismissOrMaximizeDocked(final SplitScreenTaskOrganizer tiles, SplitDisplayLayout layout, @@ -112,18 +117,18 @@ class WindowManagerProxy { mExecutor.execute(mSetTouchableRegionRunnable); } - static void applyResizeSplits(int position, SplitDisplayLayout splitLayout) { + void applyResizeSplits(int position, SplitDisplayLayout splitLayout) { WindowContainerTransaction t = new WindowContainerTransaction(); splitLayout.resizeSplits(position, t); - WindowOrganizer.applyTransaction(t); + new WindowOrganizer().applyTransaction(t); } - private static boolean getHomeAndRecentsTasks(List<ActivityManager.RunningTaskInfo> out, + private boolean getHomeAndRecentsTasks(List<ActivityManager.RunningTaskInfo> out, WindowContainerToken parent) { boolean resizable = false; List<ActivityManager.RunningTaskInfo> rootTasks = parent == null - ? TaskOrganizer.getRootTasks(Display.DEFAULT_DISPLAY, HOME_AND_RECENTS) - : TaskOrganizer.getChildTasks(parent, HOME_AND_RECENTS); + ? mTaskOrganizer.getRootTasks(Display.DEFAULT_DISPLAY, HOME_AND_RECENTS) + : mTaskOrganizer.getChildTasks(parent, HOME_AND_RECENTS); for (int i = 0, n = rootTasks.size(); i < n; ++i) { final ActivityManager.RunningTaskInfo ti = rootTasks.get(i); out.add(ti); @@ -139,7 +144,7 @@ class WindowManagerProxy { * split is minimized. This actually "sticks out" of the secondary split area, but when in * minimized mode, the secondary split gets a 'negative' crop to expose it. */ - static boolean applyHomeTasksMinimized(SplitDisplayLayout layout, WindowContainerToken parent, + boolean applyHomeTasksMinimized(SplitDisplayLayout layout, WindowContainerToken parent, @NonNull WindowContainerTransaction wct) { // Resize the home/recents stacks to the larger minimized-state size final Rect homeBounds; @@ -191,9 +196,9 @@ class WindowManagerProxy { // Set launchtile first so that any stack created after // getAllStackInfos and before reparent (even if unlikely) are placed // correctly. - TaskOrganizer.setLaunchRoot(DEFAULT_DISPLAY, tiles.mSecondary.token); + mTaskOrganizer.setLaunchRoot(DEFAULT_DISPLAY, tiles.mSecondary.token); List<ActivityManager.RunningTaskInfo> rootTasks = - TaskOrganizer.getRootTasks(DEFAULT_DISPLAY, null /* activityTypes */); + mTaskOrganizer.getRootTasks(DEFAULT_DISPLAY, null /* activityTypes */); WindowContainerTransaction wct = new WindowContainerTransaction(); if (rootTasks.isEmpty()) { return false; @@ -229,7 +234,7 @@ class WindowManagerProxy { return isHomeResizable; } - static boolean isHomeOrRecentTask(ActivityManager.RunningTaskInfo ti) { + boolean isHomeOrRecentTask(ActivityManager.RunningTaskInfo ti) { final int atype = ti.configuration.windowConfiguration.getActivityType(); return atype == ACTIVITY_TYPE_HOME || atype == ACTIVITY_TYPE_RECENTS; } @@ -244,18 +249,18 @@ class WindowManagerProxy { boolean dismissOrMaximize) { // Set launch root first so that any task created after getChildContainers and // before reparent (pretty unlikely) are put into fullscreen. - TaskOrganizer.setLaunchRoot(Display.DEFAULT_DISPLAY, null); + mTaskOrganizer.setLaunchRoot(Display.DEFAULT_DISPLAY, null); // TODO(task-org): Once task-org is more complete, consider using Appeared/Vanished // plus specific APIs to clean this up. List<ActivityManager.RunningTaskInfo> primaryChildren = - TaskOrganizer.getChildTasks(tiles.mPrimary.token, null /* activityTypes */); + mTaskOrganizer.getChildTasks(tiles.mPrimary.token, null /* activityTypes */); List<ActivityManager.RunningTaskInfo> secondaryChildren = - TaskOrganizer.getChildTasks(tiles.mSecondary.token, null /* activityTypes */); + mTaskOrganizer.getChildTasks(tiles.mSecondary.token, null /* activityTypes */); // In some cases (eg. non-resizable is launched), system-server will leave split-screen. // as a result, the above will not capture any tasks; yet, we need to clean-up the // home task bounds. List<ActivityManager.RunningTaskInfo> freeHomeAndRecents = - TaskOrganizer.getRootTasks(DEFAULT_DISPLAY, HOME_AND_RECENTS); + mTaskOrganizer.getRootTasks(DEFAULT_DISPLAY, HOME_AND_RECENTS); // Filter out the root split tasks freeHomeAndRecents.removeIf(p -> p.token.equals(tiles.mSecondary.token) || p.token.equals(tiles.mPrimary.token)); diff --git a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/ShellTaskOrganizerTests.java b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/ShellTaskOrganizerTests.java index 10672c8d87ad..497b6b714281 100644 --- a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/ShellTaskOrganizerTests.java +++ b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/ShellTaskOrganizerTests.java @@ -20,10 +20,14 @@ import static android.app.WindowConfiguration.WINDOWING_MODE_MULTI_WINDOW; import static android.app.WindowConfiguration.WINDOWING_MODE_PINNED; import static org.junit.Assert.assertTrue; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.Mockito.verify; import android.app.ActivityManager.RunningTaskInfo; -import android.content.res.Configuration; +import android.os.RemoteException; import android.view.SurfaceControl; +import android.window.ITaskOrganizer; +import android.window.ITaskOrganizerController; import androidx.test.ext.junit.runners.AndroidJUnit4; import androidx.test.filters.SmallTest; @@ -31,6 +35,8 @@ import androidx.test.filters.SmallTest; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; +import org.mockito.Mock; +import org.mockito.MockitoAnnotations; import java.util.ArrayList; @@ -41,6 +47,9 @@ import java.util.ArrayList; @RunWith(AndroidJUnit4.class) public class ShellTaskOrganizerTests { + @Mock + private ITaskOrganizerController mTaskOrganizerController; + ShellTaskOrganizer mOrganizer; private class TrackingTaskListener implements ShellTaskOrganizer.TaskListener { @@ -71,7 +80,15 @@ public class ShellTaskOrganizerTests { @Before public void setUp() { - mOrganizer = new ShellTaskOrganizer(); + MockitoAnnotations.initMocks(this); + mOrganizer = new ShellTaskOrganizer(mTaskOrganizerController); + } + + @Test + public void registerOrganizer_sendRegisterTaskOrganizer() throws RemoteException { + mOrganizer.registerOrganizer(); + + verify(mTaskOrganizerController).registerTaskOrganizer(any(ITaskOrganizer.class)); } @Test diff --git a/libs/hwui/renderthread/VulkanManager.cpp b/libs/hwui/renderthread/VulkanManager.cpp index 76ec078ce3c9..4dbce92ed01c 100644 --- a/libs/hwui/renderthread/VulkanManager.cpp +++ b/libs/hwui/renderthread/VulkanManager.cpp @@ -84,7 +84,6 @@ VulkanManager::~VulkanManager() { mGraphicsQueue = VK_NULL_HANDLE; mAHBUploadQueue = VK_NULL_HANDLE; - mPresentQueue = VK_NULL_HANDLE; mDevice = VK_NULL_HANDLE; mPhysicalDevice = VK_NULL_HANDLE; mInstance = VK_NULL_HANDLE; @@ -192,10 +191,6 @@ void VulkanManager::setupDevice(GrVkExtensions& grExtensions, VkPhysicalDeviceFe } LOG_ALWAYS_FATAL_IF(mGraphicsQueueIndex == queueCount); - // All physical devices and queue families on Android must be capable of - // presentation with any native window. So just use the first one. - mPresentQueueIndex = 0; - { uint32_t extensionCount = 0; err = mEnumerateDeviceExtensionProperties(mPhysicalDevice, nullptr, &extensionCount, @@ -289,31 +284,21 @@ void VulkanManager::setupDevice(GrVkExtensions& grExtensions, VkPhysicalDeviceFe queueNextPtr = &queuePriorityCreateInfo; } - const VkDeviceQueueCreateInfo queueInfo[2] = { - { - VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO, // sType - queueNextPtr, // pNext - 0, // VkDeviceQueueCreateFlags - mGraphicsQueueIndex, // queueFamilyIndex - 2, // queueCount - queuePriorities, // pQueuePriorities - }, - { - VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO, // sType - queueNextPtr, // pNext - 0, // VkDeviceQueueCreateFlags - mPresentQueueIndex, // queueFamilyIndex - 1, // queueCount - queuePriorities, // pQueuePriorities - }}; - uint32_t queueInfoCount = (mPresentQueueIndex != mGraphicsQueueIndex) ? 2 : 1; + const VkDeviceQueueCreateInfo queueInfo = { + VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO, // sType + queueNextPtr, // pNext + 0, // VkDeviceQueueCreateFlags + mGraphicsQueueIndex, // queueFamilyIndex + 2, // queueCount + queuePriorities, // pQueuePriorities + }; const VkDeviceCreateInfo deviceInfo = { VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO, // sType &features, // pNext 0, // VkDeviceCreateFlags - queueInfoCount, // queueCreateInfoCount - queueInfo, // pQueueCreateInfos + 1, // queueCreateInfoCount + &queueInfo, // pQueueCreateInfos 0, // layerCount nullptr, // ppEnabledLayerNames (uint32_t)mDeviceExtensions.size(), // extensionCount @@ -361,8 +346,6 @@ void VulkanManager::initialize() { mGetDeviceQueue(mDevice, mGraphicsQueueIndex, 0, &mGraphicsQueue); mGetDeviceQueue(mDevice, mGraphicsQueueIndex, 1, &mAHBUploadQueue); - mGetDeviceQueue(mDevice, mPresentQueueIndex, 0, &mPresentQueue); - if (Properties::enablePartialUpdates && Properties::useBufferAge) { mSwapBehavior = SwapBehavior::BufferAge; } @@ -555,8 +538,8 @@ void VulkanManager::swapBuffers(VulkanSurface* surface, const SkRect& dirtyRect) void VulkanManager::destroySurface(VulkanSurface* surface) { // Make sure all submit commands have finished before starting to destroy objects. - if (VK_NULL_HANDLE != mPresentQueue) { - mQueueWaitIdle(mPresentQueue); + if (VK_NULL_HANDLE != mGraphicsQueue) { + mQueueWaitIdle(mGraphicsQueue); } mDeviceWaitIdle(mDevice); diff --git a/libs/hwui/renderthread/VulkanManager.h b/libs/hwui/renderthread/VulkanManager.h index 75c05b828e5d..7a77466303cd 100644 --- a/libs/hwui/renderthread/VulkanManager.h +++ b/libs/hwui/renderthread/VulkanManager.h @@ -163,8 +163,6 @@ private: uint32_t mGraphicsQueueIndex; VkQueue mGraphicsQueue = VK_NULL_HANDLE; VkQueue mAHBUploadQueue = VK_NULL_HANDLE; - uint32_t mPresentQueueIndex; - VkQueue mPresentQueue = VK_NULL_HANDLE; // Variables saved to populate VkFunctorInitParams. static const uint32_t mAPIVersion = VK_MAKE_VERSION(1, 1, 0); diff --git a/libs/hwui/shader/BlurShader.cpp b/libs/hwui/shader/BlurShader.cpp index 4d18cdd27e4e..fa10be100bca 100644 --- a/libs/hwui/shader/BlurShader.cpp +++ b/libs/hwui/shader/BlurShader.cpp @@ -26,7 +26,9 @@ BlurShader::BlurShader(float radiusX, float radiusY, Shader* inputShader, const SkImageFilters::Blur( Blur::convertRadiusToSigma(radiusX), Blur::convertRadiusToSigma(radiusY), - inputShader ? inputShader->asSkImageFilter() : nullptr) + SkTileMode::kClamp, + inputShader ? inputShader->asSkImageFilter() : nullptr, + nullptr) ) { } sk_sp<SkImageFilter> BlurShader::makeSkImageFilter() { diff --git a/location/java/android/location/timezone/LocationTimeZoneEvent.java b/location/java/android/location/timezone/LocationTimeZoneEvent.java index 540bdfffe16a..55bc507964e6 100644 --- a/location/java/android/location/timezone/LocationTimeZoneEvent.java +++ b/location/java/android/location/timezone/LocationTimeZoneEvent.java @@ -35,7 +35,8 @@ import java.util.Objects; */ public final class LocationTimeZoneEvent implements Parcelable { - @IntDef({ EVENT_TYPE_UNKNOWN, EVENT_TYPE_SUCCESS, EVENT_TYPE_SUCCESS }) + @IntDef({ EVENT_TYPE_UNKNOWN, EVENT_TYPE_PERMANENT_FAILURE, EVENT_TYPE_SUCCESS, + EVENT_TYPE_UNCERTAIN }) @interface EventType {} /** Uninitialized value for {@link #mEventType} - must not be used for real events. */ @@ -43,7 +44,7 @@ public final class LocationTimeZoneEvent implements Parcelable { /** * Indicates there was a permanent failure. This is not generally expected, and probably means a - * required backend service is no longer supported / available. + * required backend service has been turned down, or the client is unreasonably old. */ public static final int EVENT_TYPE_PERMANENT_FAILURE = 1; @@ -54,8 +55,9 @@ public final class LocationTimeZoneEvent implements Parcelable { public static final int EVENT_TYPE_SUCCESS = 2; /** - * Indicates the time zone is not known because there was a (temporary) error, e.g. when - * detecting location, or when resolving the location to a time zone. + * Indicates the time zone is not known because of an expected runtime state or error, e.g. when + * the provider is unable to detect location, or there was a problem when resolving the location + * to a time zone. */ public static final int EVENT_TYPE_UNCERTAIN = 3; diff --git a/media/java/android/media/AudioManager.java b/media/java/android/media/AudioManager.java index a16e063fe969..a16e063fe969 100755..100644 --- a/media/java/android/media/AudioManager.java +++ b/media/java/android/media/AudioManager.java diff --git a/media/java/android/media/AudioSystem.java b/media/java/android/media/AudioSystem.java index 243ec1f1fcd0..22f625004aaf 100644 --- a/media/java/android/media/AudioSystem.java +++ b/media/java/android/media/AudioSystem.java @@ -524,6 +524,7 @@ public class AudioSystem /** @hide Media server died. see ErrorCallback */ public static final int AUDIO_STATUS_SERVER_DIED = 100; + // all accesses must be synchronized (AudioSystem.class) private static ErrorCallback sErrorCallback; /** @hide @@ -560,11 +561,9 @@ public class AudioSystem @UnsupportedAppUsage private static void errorCallbackFromNative(int error) { - ErrorCallback errorCallback = null; + ErrorCallback errorCallback; synchronized (AudioSystem.class) { - if (sErrorCallback != null) { - errorCallback = sErrorCallback; - } + errorCallback = sErrorCallback; } if (errorCallback != null) { errorCallback.onError(error); @@ -584,6 +583,7 @@ public class AudioSystem //keep in sync with include/media/AudioPolicy.h private final static int DYNAMIC_POLICY_EVENT_MIX_STATE_UPDATE = 0; + // all accesses must be synchronized (AudioSystem.class) private static DynamicPolicyCallback sDynPolicyCallback; /** @hide */ @@ -598,11 +598,9 @@ public class AudioSystem @UnsupportedAppUsage private static void dynamicPolicyCallbackFromNative(int event, String regId, int val) { - DynamicPolicyCallback cb = null; + DynamicPolicyCallback cb; synchronized (AudioSystem.class) { - if (sDynPolicyCallback != null) { - cb = sDynPolicyCallback; - } + cb = sDynPolicyCallback; } if (cb != null) { switch(event) { @@ -646,6 +644,7 @@ public class AudioSystem int activeSource, String packName); } + // all accesses must be synchronized (AudioSystem.class) private static AudioRecordingCallback sRecordingCallback; /** @hide */ @@ -678,7 +677,7 @@ public class AudioSystem int source, int portId, boolean silenced, int[] recordingFormat, AudioEffect.Descriptor[] clientEffects, AudioEffect.Descriptor[] effects, int activeSource) { - AudioRecordingCallback cb = null; + AudioRecordingCallback cb; synchronized (AudioSystem.class) { cb = sRecordingCallback; } diff --git a/media/java/android/media/MediaTranscodeManager.java b/media/java/android/media/MediaTranscodeManager.java index cf61152c4775..1c5288b04685 100644 --- a/media/java/android/media/MediaTranscodeManager.java +++ b/media/java/android/media/MediaTranscodeManager.java @@ -102,7 +102,7 @@ import java.util.concurrent.Executors; */ @TestApi @SystemApi -public final class MediaTranscodeManager implements AutoCloseable { +public final class MediaTranscodeManager { private static final String TAG = "MediaTranscodeManager"; private static final String MEDIA_TRANSCODING_SERVICE = "media.transcoding"; @@ -131,28 +131,6 @@ public final class MediaTranscodeManager implements AutoCloseable { */ public static final int TRANSCODING_TYPE_IMAGE = 2; - @Override - public void close() { - release(); - } - - /** - * Releases the MediaTranscodeManager. - */ - private void release() { - synchronized (mLock) { - try { - if (mTranscodingClient != null) { - mTranscodingClient.unregister(); - } - } catch (Exception ex) { - Log.e(TAG, "Failed to unregister the client"); - } finally { - mTranscodingClient = null; - } - } - } - /** @hide */ @IntDef(prefix = {"TRANSCODING_TYPE_"}, value = { TRANSCODING_TYPE_UNKNOWN, @@ -182,6 +160,7 @@ public final class MediaTranscodeManager implements AutoCloseable { * <p>Jobs with PRIORITY_OFFLINE will be scheduled behind PRIORITY_REALTIME. Always set to * PRIORITY_OFFLINE if client does not need the result as soon as possible and could accept * delay of the transcoding result. + * @hide * TODO(hkuang): Add more description of this when priority is finalized. */ public static final int PRIORITY_OFFLINE = 2; @@ -287,7 +266,7 @@ public final class MediaTranscodeManager implements AutoCloseable { // Notifies client the progress update. if (job.mProgressUpdateExecutor != null && job.mProgressUpdateListener != null) { job.mProgressUpdateExecutor.execute( - () -> job.mProgressUpdateListener.onProgressUpdate(newProgress)); + () -> job.mProgressUpdateListener.onProgressUpdate(job, newProgress)); } } } @@ -503,11 +482,6 @@ public final class MediaTranscodeManager implements AutoCloseable { mTranscodingClient = registerClient(service); } - @Override - protected void finalize() { - release(); - } - public static final class TranscodingRequest { /** Uri of the source media file. */ private @NonNull Uri mSourceUri; @@ -892,9 +866,12 @@ public final class MediaTranscodeManager implements AutoCloseable { /** * Called when the progress changes. The progress is in percentage between 0 and 1, * where 0 means that the job has not yet started and 100 means that it has finished. + * + * @param job The job associated with the progress. * @param progress The new progress ranging from 0 ~ 100 inclusive. */ - void onProgressUpdate(@IntRange(from = 0, to = 100) int progress); + void onProgressUpdate(@NonNull TranscodingJob job, + @IntRange(from = 0, to = 100) int progress); } private final ITranscodingClient mJobOwner; diff --git a/media/java/android/media/session/MediaController.java b/media/java/android/media/session/MediaController.java index aa57233bc824..24dacc48f28e 100644 --- a/media/java/android/media/session/MediaController.java +++ b/media/java/android/media/session/MediaController.java @@ -16,8 +16,11 @@ package android.media.session; +import android.annotation.IntDef; +import android.annotation.IntRange; import android.annotation.NonNull; import android.annotation.Nullable; +import android.annotation.SystemApi; import android.app.PendingIntent; import android.compat.annotation.UnsupportedAppUsage; import android.content.Context; @@ -27,6 +30,7 @@ import android.media.AudioManager; import android.media.MediaMetadata; import android.media.Rating; import android.media.VolumeProvider; +import android.media.VolumeProvider.ControlType; import android.media.session.MediaSession.QueueItem; import android.net.Uri; import android.os.Bundle; @@ -41,6 +45,8 @@ import android.text.TextUtils; import android.util.Log; import android.view.KeyEvent; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; import java.lang.ref.WeakReference; import java.util.ArrayList; import java.util.List; @@ -950,6 +956,14 @@ public final class MediaController { * this session. */ public static final class PlaybackInfo implements Parcelable { + + /** + * @hide + */ + @IntDef({PLAYBACK_TYPE_LOCAL, PLAYBACK_TYPE_REMOTE}) + @Retention(RetentionPolicy.SOURCE) + public @interface PlaybackType {} + /** * The session uses local playback. */ @@ -959,7 +973,7 @@ public final class MediaController { */ public static final int PLAYBACK_TYPE_REMOTE = 2; - private final int mVolumeType; + private final int mPlaybackType; private final int mVolumeControl; private final int mMaxVolume; private final int mCurrentVolume; @@ -967,27 +981,35 @@ public final class MediaController { private final String mVolumeControlId; /** + * Creates a new playback info. + * + * @param playbackType The playback type. Should be {@link #PLAYBACK_TYPE_LOCAL} or + * {@link #PLAYBACK_TYPE_REMOTE} + * @param volumeControl The volume control. Should be one of: + * {@link VolumeProvider#VOLUME_CONTROL_ABSOLUTE}, + * {@link VolumeProvider#VOLUME_CONTROL_RELATIVE}, and + * {@link VolumeProvider#VOLUME_CONTROL_FIXED}. + * @param maxVolume The max volume. Should be equal or greater than zero. + * @param currentVolume The current volume. Should be in the interval [0, maxVolume]. + * @param audioAttrs The audio attributes for this playback. Should not be null. + * @param volumeControlId The volume control ID. This is used for matching + * {@link RoutingSessionInfo} and {@link MediaSession}. * @hide */ - public PlaybackInfo(int type, int control, int max, int current, AudioAttributes attrs) { - this(type, control, max, current, attrs, null); - } - - /** - * @hide - */ - public PlaybackInfo(int type, int control, int max, int current, AudioAttributes attrs, - String volumeControlId) { - mVolumeType = type; - mVolumeControl = control; - mMaxVolume = max; - mCurrentVolume = current; - mAudioAttrs = attrs; + @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) + public PlaybackInfo(@PlaybackType int playbackType, @ControlType int volumeControl, + @IntRange(from = 0) int maxVolume, @IntRange(from = 0) int currentVolume, + @NonNull AudioAttributes audioAttrs, @Nullable String volumeControlId) { + mPlaybackType = playbackType; + mVolumeControl = volumeControl; + mMaxVolume = maxVolume; + mCurrentVolume = currentVolume; + mAudioAttrs = audioAttrs; mVolumeControlId = volumeControlId; } PlaybackInfo(Parcel in) { - mVolumeType = in.readInt(); + mPlaybackType = in.readInt(); mVolumeControl = in.readInt(); mMaxVolume = in.readInt(); mCurrentVolume = in.readInt(); @@ -1005,7 +1027,7 @@ public final class MediaController { * @return The type of playback this session is using. */ public int getPlaybackType() { - return mVolumeType; + return mPlaybackType; } /** @@ -1016,8 +1038,7 @@ public final class MediaController { * <li>{@link VolumeProvider#VOLUME_CONTROL_FIXED}</li> * </ul> * - * @return The type of volume control that may be used with this - * session. + * @return The type of volume control that may be used with this session. */ public int getVolumeControl() { return mVolumeControl; @@ -1075,7 +1096,7 @@ public final class MediaController { @Override public String toString() { - return "volumeType=" + mVolumeType + ", volumeControl=" + mVolumeControl + return "playbackType=" + mPlaybackType + ", volumeControlType=" + mVolumeControl + ", maxVolume=" + mMaxVolume + ", currentVolume=" + mCurrentVolume + ", audioAttrs=" + mAudioAttrs + ", volumeControlId=" + mVolumeControlId; } @@ -1087,7 +1108,7 @@ public final class MediaController { @Override public void writeToParcel(Parcel dest, int flags) { - dest.writeInt(mVolumeType); + dest.writeInt(mPlaybackType); dest.writeInt(mVolumeControl); dest.writeInt(mMaxVolume); dest.writeInt(mCurrentVolume); diff --git a/media/tests/MediaTranscodingTest/build_and_run_unit_tests.sh b/media/tests/MediaTranscodingTest/build_and_run_unit_tests.sh index 43db3530a16b..c8fb3a63fe2c 100644 --- a/media/tests/MediaTranscodingTest/build_and_run_unit_tests.sh +++ b/media/tests/MediaTranscodingTest/build_and_run_unit_tests.sh @@ -31,6 +31,9 @@ do adb push --sync $file /data/user/0/com.android.mediatranscodingtest/cache/ done -echo "[==========] running real transcoding tests" +echo "[==========] running MediaTranscodeManagerTest" adb shell am instrument -e class com.android.mediatranscodingtest.MediaTranscodeManagerTest -w com.android.mediatranscodingtest/.MediaTranscodingTestRunner +echo "[==========] running MediaTranscodeManagerDiedTest" +adb shell am instrument -e class com.android.mediatranscodingtest.MediaTranscodeManagerDiedTest -w com.android.mediatranscodingtest/.MediaTranscodingTestRunner + diff --git a/media/tests/MediaTranscodingTest/src/com/android/mediatranscodingtest/MediaTranscodeManagerDiedTest.java b/media/tests/MediaTranscodingTest/src/com/android/mediatranscodingtest/MediaTranscodeManagerDiedTest.java new file mode 100644 index 000000000000..f00c14d79bec --- /dev/null +++ b/media/tests/MediaTranscodingTest/src/com/android/mediatranscodingtest/MediaTranscodeManagerDiedTest.java @@ -0,0 +1,255 @@ +/* + * Copyright (C) 2020 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.mediatranscodingtest; + +import android.content.ContentResolver; +import android.content.Context; +import android.media.MediaFormat; +import android.media.MediaTranscodeManager; +import android.media.MediaTranscodeManager.TranscodingJob; +import android.media.MediaTranscodeManager.TranscodingRequest; +import android.net.Uri; +import android.os.Bundle; +import android.os.FileUtils; +import android.os.ParcelFileDescriptor; +import android.test.ActivityInstrumentationTestCase2; +import android.util.Log; + +import androidx.test.InstrumentationRegistry; +import androidx.test.uiautomator.UiDevice; + +import org.junit.Test; + +import java.io.BufferedReader; +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.OutputStream; +import java.util.concurrent.Executor; +import java.util.concurrent.Executors; +import java.util.concurrent.Semaphore; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicInteger; + +/* + * Service died tests for MediaTranscodeManager in the media framework. + * + * To run this test suite: + make frameworks/base/media/tests/MediaTranscodingTest + make mediatranscodingtest + + adb install -r testcases/mediatranscodingtest/arm64/mediatranscodingtest.apk + + adb shell am instrument -e class \ + com.android.mediatranscodingtest.MediaTranscodeManagerDiedTest \ + -w com.android.mediatranscodingtest/.MediaTranscodingTestRunner + * + */ +public class MediaTranscodeManagerDiedTest + extends ActivityInstrumentationTestCase2<MediaTranscodingTest> { + private static final String TAG = "MediaTranscodeManagerDiedTest"; + /** The time to wait for the transcode operation to complete before failing the test. */ + private static final int TRANSCODE_TIMEOUT_SECONDS = 10; + + /** Maximum number of retry to connect to the service. */ + private static final int CONNECT_SERVICE_RETRY_COUNT = 100; + + /** Interval between trying to reconnect to the service. */ + private static final int INTERVAL_CONNECT_SERVICE_RETRY_MS = 40; + + private Context mContext; + private MediaTranscodeManager mMediaTranscodeManager = null; + private Uri mSourceHEVCVideoUri = null; + private Uri mSourceAVCVideoUri = null; + private Uri mDestinationUri = null; + + // Setting for transcoding to H.264. + private static final String MIME_TYPE = MediaFormat.MIMETYPE_VIDEO_AVC; + private static final int BIT_RATE = 20000000; // 20Mbps + private static final int WIDTH = 1920; + private static final int HEIGHT = 1080; + + public MediaTranscodeManagerDiedTest() { + super("com.android.MediaTranscodeManagerTest", MediaTranscodingTest.class); + } + + // Copy the resource to cache. + private Uri resourceToUri(Context context, int resId, String name) throws IOException { + Uri resUri = new Uri.Builder() + .scheme(ContentResolver.SCHEME_ANDROID_RESOURCE) + .authority(context.getResources().getResourcePackageName(resId)) + .appendPath(context.getResources().getResourceTypeName(resId)) + .appendPath(context.getResources().getResourceEntryName(resId)) + .build(); + + Uri cacheUri = Uri.parse(ContentResolver.SCHEME_FILE + "://" + + mContext.getCacheDir().getAbsolutePath() + "/" + name); + + InputStream is = mContext.getResources().openRawResource(resId); + OutputStream os = mContext.getContentResolver().openOutputStream(cacheUri); + + FileUtils.copy(is, os); + + return cacheUri; + } + + private static Uri generateNewUri(Context context, String filename) { + File outFile = new File(context.getExternalCacheDir(), filename); + return Uri.fromFile(outFile); + } + + /** + * Creates a MediaFormat with the basic set of values. + */ + private static MediaFormat createMediaFormat() { + MediaFormat format = MediaFormat.createVideoFormat(MIME_TYPE, WIDTH, HEIGHT); + format.setInteger(MediaFormat.KEY_BIT_RATE, BIT_RATE); + return format; + } + + private MediaTranscodeManager getManager() { + for (int count = 1; count <= CONNECT_SERVICE_RETRY_COUNT; count++) { + Log.d(TAG, "Trying to connect to service. Try count: " + count); + MediaTranscodeManager manager = mContext.getSystemService(MediaTranscodeManager.class); + if (manager != null) { + return manager; + } + try { + // Sleep a bit before retry. + Thread.sleep(INTERVAL_CONNECT_SERVICE_RETRY_MS); + } catch (InterruptedException ie) { + /* ignore */ + } + } + + throw new UnsupportedOperationException("Failed to acquire MediaTranscodeManager"); + } + + @Override + public void setUp() throws Exception { + Log.d(TAG, "setUp"); + super.setUp(); + + mContext = getInstrumentation().getContext(); + mMediaTranscodeManager = getManager(); + assertNotNull(mMediaTranscodeManager); + androidx.test.InstrumentationRegistry.registerInstance(getInstrumentation(), new Bundle()); + + // Setup source HEVC file uri. + mSourceHEVCVideoUri = resourceToUri(mContext, R.raw.VideoOnlyHEVC, "VideoOnlyHEVC.mp4"); + + // Setup source AVC file uri. + mSourceAVCVideoUri = resourceToUri(mContext, R.raw.VideoOnlyAVC, + "VideoOnlyAVC.mp4"); + + // Setup destination file. + mDestinationUri = generateNewUri(mContext, "transcoded.mp4"); + } + + @Override + public void tearDown() throws Exception { + super.tearDown(); + } + + // [[ $(adb shell whoami) == "root" ]] + private boolean checkIfRoot() { + try (ParcelFileDescriptor result = getInstrumentation().getUiAutomation() + .executeShellCommand("whoami"); + BufferedReader bufferedReader = new BufferedReader(new InputStreamReader( + new FileInputStream(result.getFileDescriptor())))) { + String line; + while ((line = bufferedReader.readLine()) != null) { + if (line.contains("root")) { + return true; + } + } + } catch (IOException ie) { + return false; + } + return false; + } + + private String executeShellCommand(String cmd) throws Exception { + return UiDevice.getInstance( + InstrumentationRegistry.getInstrumentation()).executeShellCommand(cmd); + } + + @Test + public void testHandleTranscoderServiceDied() throws Exception { + if (!checkIfRoot()) { + throw new AssertionError("must be root to run this test; try adb root?"); + } + + Semaphore transcodeCompleteSemaphore = new Semaphore(0); + Semaphore jobStartedSemaphore = new Semaphore(0); + + // Transcode a 15 seconds video, so that the transcoding is not finished when we kill the + // service. + Uri srcUri = Uri.parse(ContentResolver.SCHEME_FILE + "://" + + mContext.getCacheDir().getAbsolutePath() + "/longtest_15s.mp4"); + Uri destinationUri = Uri.parse(ContentResolver.SCHEME_FILE + "://" + + mContext.getCacheDir().getAbsolutePath() + "/HevcTranscode.mp4"); + + TranscodingRequest request = + new TranscodingRequest.Builder() + .setSourceUri(mSourceHEVCVideoUri) + .setDestinationUri(destinationUri) + .setType(MediaTranscodeManager.TRANSCODING_TYPE_VIDEO) + .setPriority(MediaTranscodeManager.PRIORITY_REALTIME) + .setVideoTrackFormat(createMediaFormat()) + .build(); + Executor listenerExecutor = Executors.newSingleThreadExecutor(); + + Log.i(TAG, "transcoding to " + createMediaFormat()); + + TranscodingJob job = mMediaTranscodeManager.enqueueRequest(request, listenerExecutor, + transcodingJob -> { + Log.d(TAG, "Transcoding completed with result: " + transcodingJob.getResult()); + transcodeCompleteSemaphore.release(); + }); + assertNotNull(job); + + AtomicInteger progressUpdateCount = new AtomicInteger(0); + + // Set progress update executor and use the same executor as result listener. + job.setOnProgressUpdateListener(listenerExecutor, + new TranscodingJob.OnProgressUpdateListener() { + @Override + public void onProgressUpdate(TranscodingJob job, int newProgress) { + if (newProgress > 0) { + jobStartedSemaphore.release(); + } + } + }); + + // Wait for progress update so the job is in running state. + jobStartedSemaphore.tryAcquire(TRANSCODE_TIMEOUT_SECONDS, TimeUnit.SECONDS); + assertTrue("Job is not running", job.getStatus() == TranscodingJob.STATUS_RUNNING); + + // Kills the service and expects receiving failure of the job. + executeShellCommand("pkill -f media.transcoding"); + + Log.d(TAG, "testMediaTranscodeManager - Waiting for transcode result."); + boolean finishedOnTime = transcodeCompleteSemaphore.tryAcquire( + TRANSCODE_TIMEOUT_SECONDS, TimeUnit.SECONDS); + assertTrue("Invalid job status", job.getStatus() == TranscodingJob.STATUS_FINISHED); + assertTrue("Invalid job result", job.getResult()== TranscodingJob.RESULT_ERROR); + } +} + diff --git a/media/tests/MediaTranscodingTest/src/com/android/mediatranscodingtest/MediaTranscodeManagerTest.java b/media/tests/MediaTranscodingTest/src/com/android/mediatranscodingtest/MediaTranscodeManagerTest.java index a707c7a7955b..1a3e3608f37f 100644 --- a/media/tests/MediaTranscodingTest/src/com/android/mediatranscodingtest/MediaTranscodeManagerTest.java +++ b/media/tests/MediaTranscodingTest/src/com/android/mediatranscodingtest/MediaTranscodeManagerTest.java @@ -16,12 +16,15 @@ package com.android.mediatranscodingtest; +import static org.testng.Assert.assertThrows; + import android.content.ContentResolver; import android.content.Context; import android.media.MediaFormat; import android.media.MediaTranscodeManager; import android.media.MediaTranscodeManager.TranscodingJob; import android.media.MediaTranscodeManager.TranscodingRequest; +import android.media.TranscodingTestConfig; import android.net.Uri; import android.os.Bundle; import android.os.FileUtils; @@ -180,6 +183,227 @@ public class MediaTranscodeManagerTest super.tearDown(); } + + /** + * Verify that setting null destination uri will throw exception. + */ + @Test + public void testCreateTranscodingRequestWithNullDestinationUri() throws Exception { + assertThrows(IllegalArgumentException.class, () -> { + TranscodingRequest request = + new TranscodingRequest.Builder() + .setSourceUri(mSourceHEVCVideoUri) + .setDestinationUri(null) + .setType(MediaTranscodeManager.TRANSCODING_TYPE_VIDEO) + .setPriority(MediaTranscodeManager.PRIORITY_REALTIME) + .setVideoTrackFormat(createMediaFormat()) + .build(); + }); + } + + /** + * Verify that setting null source uri will throw exception. + */ + @Test + public void testCreateTranscodingRequestWithNullSourceUri() throws Exception { + assertThrows(IllegalArgumentException.class, () -> { + TranscodingRequest request = + new TranscodingRequest.Builder() + .setSourceUri(null) + .setDestinationUri(mDestinationUri) + .setPriority(MediaTranscodeManager.PRIORITY_REALTIME) + .setType(MediaTranscodeManager.TRANSCODING_TYPE_VIDEO) + .build(); + }); + } + + /** + * Verify that not setting source uri will throw exception. + */ + @Test + public void testCreateTranscodingRequestWithoutSourceUri() throws Exception { + assertThrows(UnsupportedOperationException.class, () -> { + TranscodingRequest request = + new TranscodingRequest.Builder() + .setDestinationUri(mDestinationUri) + .setType(MediaTranscodeManager.TRANSCODING_TYPE_VIDEO) + .setPriority(MediaTranscodeManager.PRIORITY_REALTIME) + .setVideoTrackFormat(createMediaFormat()) + .build(); + }); + } + + /** + * Verify that not setting destination uri will throw exception. + */ + @Test + public void testCreateTranscodingRequestWithoutDestinationUri() throws Exception { + assertThrows(UnsupportedOperationException.class, () -> { + TranscodingRequest request = + new TranscodingRequest.Builder() + .setSourceUri(mSourceHEVCVideoUri) + .setType(MediaTranscodeManager.TRANSCODING_TYPE_VIDEO) + .setPriority(MediaTranscodeManager.PRIORITY_REALTIME) + .setVideoTrackFormat(createMediaFormat()) + .build(); + }); + } + + /** + * Verify that setting image transcoding mode will throw exception. + */ + @Test + public void testCreateTranscodingRequestWithUnsupportedMode() throws Exception { + assertThrows(UnsupportedOperationException.class, () -> { + TranscodingRequest request = + new TranscodingRequest.Builder() + .setSourceUri(mSourceHEVCVideoUri) + .setDestinationUri(mDestinationUri) + .setType(MediaTranscodeManager.TRANSCODING_TYPE_IMAGE) + .setPriority(MediaTranscodeManager.PRIORITY_REALTIME) + .setVideoTrackFormat(createMediaFormat()) + .build(); + }); + } + + /** + * Verify that setting video transcoding without setting video format will throw exception. + */ + @Test + public void testCreateTranscodingRequestWithoutVideoFormat() throws Exception { + assertThrows(UnsupportedOperationException.class, () -> { + TranscodingRequest request = + new TranscodingRequest.Builder() + .setSourceUri(mSourceHEVCVideoUri) + .setDestinationUri(mDestinationUri) + .setType(MediaTranscodeManager.TRANSCODING_TYPE_VIDEO) + .setPriority(MediaTranscodeManager.PRIORITY_REALTIME) + .build(); + }); + } + + void testTranscodingWithExpectResult(Uri srcUri, Uri dstUri, int expectedResult) + throws Exception { + Semaphore transcodeCompleteSemaphore = new Semaphore(0); + TranscodingTestConfig testConfig = new TranscodingTestConfig(); + testConfig.passThroughMode = true; + testConfig.processingTotalTimeMs = 300; // minimum time spent on transcoding. + + TranscodingRequest request = + new TranscodingRequest.Builder() + .setSourceUri(srcUri) + .setDestinationUri(dstUri) + .setType(MediaTranscodeManager.TRANSCODING_TYPE_VIDEO) + .setPriority(MediaTranscodeManager.PRIORITY_REALTIME) + .setVideoTrackFormat(createMediaFormat()) + .setTestConfig(testConfig) + .build(); + Executor listenerExecutor = Executors.newSingleThreadExecutor(); + + TranscodingJob job = mMediaTranscodeManager.enqueueRequest(request, listenerExecutor, + transcodingJob -> { + Log.d(TAG, "Transcoding completed with result: " + transcodingJob.getResult()); + assertTrue("Transcoding should failed.", + transcodingJob.getResult() == expectedResult); + transcodeCompleteSemaphore.release(); + }); + assertNotNull(job); + + if (job != null) { + Log.d(TAG, "testMediaTranscodeManager - Waiting for transcode to complete."); + boolean finishedOnTime = transcodeCompleteSemaphore.tryAcquire( + TRANSCODE_TIMEOUT_SECONDS, TimeUnit.SECONDS); + assertTrue("Transcode failed to complete in time.", finishedOnTime); + } + + if (expectedResult == TranscodingJob.RESULT_SUCCESS) { + // Checks the destination file get generated. + File file = new File(dstUri.getPath()); + assertTrue("Failed to create destination file", file.exists()); + + // Removes the file. + file.delete(); + } + } + + // Tests transcoding from invalid a invalid and expects failure. + @Test + public void testTranscodingInvalidSrcUri() throws Exception { + Log.d(TAG, "Starting: testMediaTranscodeManager"); + + Uri invalidSrcUri = Uri.parse(ContentResolver.SCHEME_ANDROID_RESOURCE + "://" + + mContext.getPackageName() + "/source.mp4"); + Log.d(TAG, "Transcoding from source: " + invalidSrcUri); + + // Create a file Uri: file:///data/user/0/com.android.mediatranscodingtest/cache/temp.mp4 + // The full path of this file is: + // /data/user/0/com.android.mediatranscodingtest/cache/temp.mp4 + Uri destinationUri = Uri.parse(ContentResolver.SCHEME_ANDROID_RESOURCE + "://" + + mContext.getPackageName() + "/temp.mp4"); + Log.d(TAG, "Transcoding to destination: " + destinationUri); + + testTranscodingWithExpectResult(invalidSrcUri, destinationUri, TranscodingJob.RESULT_ERROR); + } + + // Tests transcoding to a uri in res folder and expects failure as we could not write to res + // folder. + @Test + public void testTranscodingToResFolder() throws Exception { + Log.d(TAG, "Starting: testMediaTranscodeManager"); + + // Create a file Uri: file:///data/user/0/com.android.mediatranscodingtest/cache/temp.mp4 + // The full path of this file is: + // /data/user/0/com.android.mediatranscodingtest/cache/temp.mp4 + Uri destinationUri = Uri.parse(ContentResolver.SCHEME_ANDROID_RESOURCE + "://" + + mContext.getPackageName() + "/temp.mp4"); + Log.d(TAG, "Transcoding to destination: " + destinationUri); + + testTranscodingWithExpectResult(mSourceHEVCVideoUri, destinationUri, + TranscodingJob.RESULT_ERROR); + } + + // Tests transcoding to a uri in internal storage folder and expects success. + @Test + public void testTranscodingToCacheDir() throws Exception { + Log.d(TAG, "Starting: testMediaTranscodeManager"); + + // Create a file Uri: file:///data/user/0/com.android.mediatranscodingtest/cache/temp.mp4 + // The full path of this file is: + // /data/user/0/com.android.mediatranscodingtest/cache/temp.mp4 + Uri destinationUri = Uri.parse(ContentResolver.SCHEME_FILE + "://" + + mContext.getCacheDir().getAbsolutePath() + "/temp.mp4"); + + testTranscodingWithExpectResult(mSourceHEVCVideoUri, destinationUri, + TranscodingJob.RESULT_SUCCESS); + } + + // Tests transcoding to a uri in internal files directory and expects success. + @Test + public void testTranscodingToInternalFilesDir() throws Exception { + Log.d(TAG, "Starting: testMediaTranscodeManager"); + + // Create a file Uri: + // file:///storage/emulated/0/Android/data/com.android.mediatranscodingtest/files/temp.mp4 + Uri destinationUri = Uri.fromFile(new File(mContext.getFilesDir(), "temp.mp4")); + Log.i(TAG, "Transcoding to files dir: " + destinationUri); + + testTranscodingWithExpectResult(mSourceHEVCVideoUri, destinationUri, + TranscodingJob.RESULT_SUCCESS); + } + + // Tests transcoding to a uri in external files directory and expects success. + @Test + public void testTranscodingToExternalFilesDir() throws Exception { + Log.d(TAG, "Starting: testMediaTranscodeManager"); + + // Create a file Uri: file:///data/user/0/com.android.mediatranscodingtest/files/temp.mp4 + Uri destinationUri = Uri.fromFile(new File(mContext.getExternalFilesDir(null), "temp.mp4")); + Log.i(TAG, "Transcoding to files dir: " + destinationUri); + + testTranscodingWithExpectResult(mSourceHEVCVideoUri, destinationUri, + TranscodingJob.RESULT_SUCCESS); + } + @Test public void testTranscodingFromHevcToAvc() throws Exception { Semaphore transcodeCompleteSemaphore = new Semaphore(0); @@ -308,7 +532,7 @@ public class MediaTranscodeManagerTest int mPreviousProgress = 0; @Override - public void onProgressUpdate(int newProgress) { + public void onProgressUpdate(TranscodingJob job, int newProgress) { assertTrue("Invalid proress update", newProgress > mPreviousProgress); assertTrue("Invalid proress update", newProgress <= 100); if (newProgress > 0) { @@ -354,73 +578,5 @@ public class MediaTranscodeManagerTest return UiDevice.getInstance( InstrumentationRegistry.getInstrumentation()).executeShellCommand(cmd); } - - @Test - public void testHandleTranscoderServiceDied() throws Exception { - try { - if (!checkIfRoot()) { - throw new AssertionError("must be root to run this test; try adb root?"); - } else { - Log.i(TAG, "Device is root"); - } - } catch (IOException e) { - throw new AssertionError(e); - } - - Semaphore transcodeCompleteSemaphore = new Semaphore(0); - Semaphore jobStartedSemaphore = new Semaphore(0); - - // Transcode a 15 seconds video, so that the transcoding is not finished when we kill the - // service. - Uri srcUri = Uri.parse(ContentResolver.SCHEME_FILE + "://" - + mContext.getCacheDir().getAbsolutePath() + "/longtest_15s.mp4"); - Uri destinationUri = Uri.parse(ContentResolver.SCHEME_FILE + "://" - + mContext.getCacheDir().getAbsolutePath() + "/HevcTranscode.mp4"); - - TranscodingRequest request = - new TranscodingRequest.Builder() - .setSourceUri(mSourceHEVCVideoUri) - .setDestinationUri(destinationUri) - .setType(MediaTranscodeManager.TRANSCODING_TYPE_VIDEO) - .setPriority(MediaTranscodeManager.PRIORITY_REALTIME) - .setVideoTrackFormat(createMediaFormat()) - .build(); - Executor listenerExecutor = Executors.newSingleThreadExecutor(); - - Log.i(TAG, "transcoding to " + createMediaFormat()); - - TranscodingJob job = mMediaTranscodeManager.enqueueRequest(request, listenerExecutor, - transcodingJob -> { - Log.d(TAG, "Transcoding completed with result: " + transcodingJob.getResult()); - assertEquals(transcodingJob.getResult(), TranscodingJob.RESULT_ERROR); - transcodeCompleteSemaphore.release(); - }); - assertNotNull(job); - - AtomicInteger progressUpdateCount = new AtomicInteger(0); - - // Set progress update executor and use the same executor as result listener. - job.setOnProgressUpdateListener(listenerExecutor, - new TranscodingJob.OnProgressUpdateListener() { - @Override - public void onProgressUpdate(int newProgress) { - if (newProgress > 0) { - jobStartedSemaphore.release(); - } - } - }); - - // Wait for progress update so the job is in running state. - jobStartedSemaphore.tryAcquire(TRANSCODE_TIMEOUT_SECONDS, TimeUnit.SECONDS); - assertTrue("Job is not running", job.getStatus() == TranscodingJob.STATUS_RUNNING); - - // Kills the service and expects receiving failure of the job. - executeShellCommand("pkill -f media.transcoding"); - - Log.d(TAG, "testMediaTranscodeManager - Waiting for transcode result."); - boolean finishedOnTime = transcodeCompleteSemaphore.tryAcquire( - TRANSCODE_TIMEOUT_SECONDS, TimeUnit.SECONDS); - assertTrue("Invalid job status", job.getStatus() == TranscodingJob.STATUS_FINISHED); - } } diff --git a/media/tests/MediaTranscodingTest/src/com/android/mediatranscodingtest/MediaTranscodeManagerWithMockServiceTest.java b/media/tests/MediaTranscodingTest/src/com/android/mediatranscodingtest/MediaTranscodeManagerWithMockServiceTest.java deleted file mode 100644 index 167e474eb143..000000000000 --- a/media/tests/MediaTranscodingTest/src/com/android/mediatranscodingtest/MediaTranscodeManagerWithMockServiceTest.java +++ /dev/null @@ -1,503 +0,0 @@ -/* - * Copyright (C) 2019 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.mediatranscodingtest; - -import static org.testng.Assert.assertThrows; - -import android.content.ContentResolver; -import android.content.Context; -import android.media.IMediaTranscodingService; -import android.media.ITranscodingClient; -import android.media.ITranscodingClientCallback; -import android.media.MediaFormat; -import android.media.MediaTranscodeManager; -import android.media.MediaTranscodeManager.TranscodingJob; -import android.media.MediaTranscodeManager.TranscodingRequest; -import android.media.TranscodingJobParcel; -import android.media.TranscodingRequestParcel; -import android.media.TranscodingResultParcel; -import android.media.TranscodingTestConfig; -import android.net.Uri; -import android.os.ParcelFileDescriptor; -import android.os.RemoteException; -import android.test.ActivityInstrumentationTestCase2; -import android.util.Log; - -import org.junit.Test; - -import java.io.File; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.ConcurrentMap; -import java.util.concurrent.Executor; -import java.util.concurrent.Executors; -import java.util.concurrent.RejectedExecutionException; -import java.util.concurrent.ScheduledExecutorService; -import java.util.concurrent.ScheduledFuture; -import java.util.concurrent.Semaphore; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; - -/* - * Functional tests for MediaTranscodeManager in the media framework. - * The test uses a mock Transcoding service as backend to test the API functionality. - * - * To run this test suite: - make frameworks/base/media/tests/MediaTranscodingTest - make mediatranscodingtest - - adb install -r testcases/mediatranscodingtest/arm64/mediatranscodingtest.apk - - adb shell am instrument -e class \ - com.android.mediatranscodingtest.MediaTranscodeManagerWithMockServiceTest \ - -w com.android.mediatranscodingtest/.MediaTranscodingTestRunner - * - */ -public class MediaTranscodeManagerWithMockServiceTest - extends ActivityInstrumentationTestCase2<MediaTranscodingTest> { - private static final String TAG = "MediaTranscodeManagerWithMockServiceTest"; - /** The time to wait for the transcode operation to complete before failing the test. */ - private static final int TRANSCODE_TIMEOUT_SECONDS = 2; - private Context mContext; - private MediaTranscodeManager mMediaTranscodeManager = null; - private Uri mSourceHEVCVideoUri = null; - private Uri mDestinationUri = null; - // Use mock transcoding service for testing the api. - private MockTranscodingService mTranscodingService = null; - - // Setting for transcoding to H.264. - private static final String MIME_TYPE = MediaFormat.MIMETYPE_VIDEO_AVC; - private static final int BIT_RATE = 2000000; // 2Mbps - private static final int WIDTH = 1920; - private static final int HEIGHT = 1080; - - // A mock transcoding service that will take constant 300ms to process each transcoding job. - // Instead of doing real transcoding, it will return the dst uri directly. - class MockTranscodingService extends IMediaTranscodingService.Stub { - private final ScheduledExecutorService mJobScheduler = Executors.newScheduledThreadPool(1); - private int mNumOfClients = 0; - private AtomicInteger mJobId = new AtomicInteger(); - - // A runnable that will process the job. - private class ProcessingJobRunnable implements Runnable { - private TranscodingJobParcel mJob; - private ITranscodingClientCallback mCallback; - private ConcurrentMap<Integer, ScheduledFuture<?>> mJobMap; - - ProcessingJobRunnable(ITranscodingClientCallback callback, - TranscodingJobParcel job, - ConcurrentMap<Integer, ScheduledFuture<?>> jobMap) { - mJob = job; - mCallback = callback; - mJobMap = jobMap; - } - - @Override - public void run() { - Log.d(TAG, "Start to process job " + mJob.jobId); - TranscodingResultParcel result = new TranscodingResultParcel(); - try { - // Try to open the source fd. - ParcelFileDescriptor sourceFd = mCallback.openFileDescriptor( - mJob.request.sourceFilePath, "r"); - if (sourceFd == null) { - Log.d(TAG, "Failed to open sourceFd"); - // TODO(hkuang): Pass the correct error code. - mCallback.onTranscodingFailed(mJob.jobId, 1); - return; - } else { - Log.d(TAG, "Successfully open sourceFd"); - } - - // Try to write to the destination fd. - ParcelFileDescriptor destinationFd = mCallback.openFileDescriptor( - mJob.request.destinationFilePath, "w"); - if (destinationFd == null) { - Log.d(TAG, "Failed to open destinationFd"); - // TODO(hkuang): Pass the correct error code. - mCallback.onTranscodingFailed(mJob.jobId, 1); - return; - } else { - Log.d(TAG, "Successfully open destinationFd"); - } - - mCallback.onTranscodingFinished(mJob.jobId, result); - // Removes the job from job map. - mJobMap.remove(mJob.jobId); - } catch (RemoteException re) { - Log.e(TAG, "Failed to callback to client"); - } - } - } - - @Override - public ITranscodingClient registerClient(ITranscodingClientCallback callback, - String clientName, String opPackageName, int clientUid, int clientPid) - throws RemoteException { - Log.d(TAG, "MockTranscodingService creates one client"); - - ITranscodingClient client = new ITranscodingClient.Stub() { - private final ConcurrentMap<Integer, ScheduledFuture<?>> mPendingTranscodingJobs = - new ConcurrentHashMap<Integer, ScheduledFuture<?>>(); - - @Override - public boolean submitRequest(TranscodingRequestParcel inRequest, - TranscodingJobParcel outjob) { - Log.d(TAG, "Mock client gets submitRequest"); - try { - outjob.request = inRequest; - outjob.jobId = mJobId.getAndIncrement(); - Log.i(TAG, "Generate new job " + outjob.jobId); - Log.i(TAG, "Source Uri " + inRequest.sourceFilePath); - Log.i(TAG, "Destination Uri " + inRequest.destinationFilePath); - - // Schedules the job to run after inRequest.processingDelayMs. - ScheduledFuture<?> transcodingFuture = mJobScheduler.schedule( - new ProcessingJobRunnable(callback, outjob, - mPendingTranscodingJobs), - inRequest.testConfig == null ? 0 - : inRequest.testConfig.processingTotalTimeMs, - TimeUnit.MILLISECONDS); - mPendingTranscodingJobs.put(outjob.jobId, transcodingFuture); - } catch (RejectedExecutionException e) { - Log.e(TAG, "Failed to schedule transcoding job: " + e); - return false; - } - - return true; - } - - @Override - public boolean cancelJob(int jobId) throws RemoteException { - Log.d(TAG, "Mock client gets cancelJob " + jobId); - // Cancels the job is still in the mPendingTranscodingJobs. - if (mPendingTranscodingJobs.containsKey(jobId)) { - // Cancel the future task for transcoding. - mPendingTranscodingJobs.get(jobId).cancel(true); - - // Remove the job from the mPendingTranscodingJobs. - mPendingTranscodingJobs.remove(jobId); - return true; - } - return false; - } - - @Override - public boolean getJobWithId(int jobId, TranscodingJobParcel job) - throws RemoteException { - // This will be implemented this if needed in the test. - return true; - } - - @Override - public void unregister() throws RemoteException { - Log.d(TAG, "Mock client gets unregister"); - // This will be implemented this if needed in the test. - mNumOfClients--; - } - }; - mNumOfClients++; - return client; - } - - @Override - public int getNumOfClients() throws RemoteException { - return mNumOfClients; - } - } - - public MediaTranscodeManagerWithMockServiceTest() { - super("com.android.MediaTranscodeManagerWithMockServiceTest", MediaTranscodingTest.class); - } - - private static Uri resourceToUri(Context context, int resId) { - Uri uri = new Uri.Builder() - .scheme(ContentResolver.SCHEME_ANDROID_RESOURCE) - .authority(context.getResources().getResourcePackageName(resId)) - .appendPath(context.getResources().getResourceTypeName(resId)) - .appendPath(context.getResources().getResourceEntryName(resId)) - .build(); - return uri; - } - - private static Uri generateNewUri(Context context, String filename) { - File outFile = new File(context.getExternalCacheDir(), filename); - return Uri.fromFile(outFile); - } - - // Generates a invalid uri which will let the mock service return transcoding failure. - private static Uri generateInvalidTranscodingUri(Context context) { - File outFile = new File(context.getExternalCacheDir(), "InvalidUri.mp4"); - return Uri.fromFile(outFile); - } - - /** - * Creates a MediaFormat with the basic set of values. - */ - private static MediaFormat createMediaFormat() { - MediaFormat format = MediaFormat.createVideoFormat(MIME_TYPE, WIDTH, HEIGHT); - format.setInteger(MediaFormat.KEY_BIT_RATE, BIT_RATE); - return format; - } - - @Override - public void setUp() throws Exception { - Log.d(TAG, "setUp"); - super.setUp(); - mTranscodingService = new MockTranscodingService(); - mContext = getInstrumentation().getContext(); - mMediaTranscodeManager = mContext.getSystemService(MediaTranscodeManager.class); - assertNotNull(mMediaTranscodeManager); - - // Setup source HEVC file uri. - mSourceHEVCVideoUri = resourceToUri(mContext, R.raw.VideoOnlyHEVC); - - // Setup destination file. - mDestinationUri = generateNewUri(mContext, "transcoded.mp4"); - } - - @Override - public void tearDown() throws Exception { - super.tearDown(); - } - - /** - * Verify that setting null destination uri will throw exception. - */ - @Test - public void testCreateTranscodingRequestWithNullDestinationUri() throws Exception { - assertThrows(IllegalArgumentException.class, () -> { - TranscodingRequest request = - new TranscodingRequest.Builder() - .setSourceUri(mSourceHEVCVideoUri) - .setDestinationUri(null) - .setType(MediaTranscodeManager.TRANSCODING_TYPE_VIDEO) - .setPriority(MediaTranscodeManager.PRIORITY_REALTIME) - .setVideoTrackFormat(createMediaFormat()) - .build(); - }); - } - - /** - * Verify that setting null source uri will throw exception. - */ - @Test - public void testCreateTranscodingRequestWithNullSourceUri() throws Exception { - assertThrows(IllegalArgumentException.class, () -> { - TranscodingRequest request = - new TranscodingRequest.Builder() - .setSourceUri(null) - .setDestinationUri(mDestinationUri) - .setPriority(MediaTranscodeManager.PRIORITY_REALTIME) - .setType(MediaTranscodeManager.TRANSCODING_TYPE_VIDEO) - .build(); - }); - } - - /** - * Verify that not setting source uri will throw exception. - */ - @Test - public void testCreateTranscodingRequestWithoutSourceUri() throws Exception { - assertThrows(UnsupportedOperationException.class, () -> { - TranscodingRequest request = - new TranscodingRequest.Builder() - .setDestinationUri(mDestinationUri) - .setType(MediaTranscodeManager.TRANSCODING_TYPE_VIDEO) - .setPriority(MediaTranscodeManager.PRIORITY_REALTIME) - .setVideoTrackFormat(createMediaFormat()) - .build(); - }); - } - - /** - * Verify that not setting destination uri will throw exception. - */ - @Test - public void testCreateTranscodingRequestWithoutDestinationUri() throws Exception { - assertThrows(UnsupportedOperationException.class, () -> { - TranscodingRequest request = - new TranscodingRequest.Builder() - .setSourceUri(mSourceHEVCVideoUri) - .setType(MediaTranscodeManager.TRANSCODING_TYPE_VIDEO) - .setPriority(MediaTranscodeManager.PRIORITY_REALTIME) - .setVideoTrackFormat(createMediaFormat()) - .build(); - }); - } - - /** - * Verify that setting image transcoding mode will throw exception. - */ - @Test - public void testCreateTranscodingRequestWithUnsupportedMode() throws Exception { - assertThrows(UnsupportedOperationException.class, () -> { - TranscodingRequest request = - new TranscodingRequest.Builder() - .setSourceUri(mSourceHEVCVideoUri) - .setDestinationUri(mDestinationUri) - .setType(MediaTranscodeManager.TRANSCODING_TYPE_IMAGE) - .setPriority(MediaTranscodeManager.PRIORITY_REALTIME) - .setVideoTrackFormat(createMediaFormat()) - .build(); - }); - } - - /** - * Verify that setting video transcoding without setting video format will throw exception. - */ - @Test - public void testCreateTranscodingRequestWithoutVideoFormat() throws Exception { - assertThrows(UnsupportedOperationException.class, () -> { - TranscodingRequest request = - new TranscodingRequest.Builder() - .setSourceUri(mSourceHEVCVideoUri) - .setDestinationUri(mDestinationUri) - .setType(MediaTranscodeManager.TRANSCODING_TYPE_VIDEO) - .setPriority(MediaTranscodeManager.PRIORITY_REALTIME) - .build(); - }); - } - - void testTranscodingWithExpectResult(Uri srcUri, Uri dstUri, int expectedResult) - throws Exception { - Semaphore transcodeCompleteSemaphore = new Semaphore(0); - TranscodingTestConfig testConfig = new TranscodingTestConfig(); - testConfig.passThroughMode = true; - testConfig.processingTotalTimeMs = 300; // minimum time spent on transcoding. - - TranscodingRequest request = - new TranscodingRequest.Builder() - .setSourceUri(srcUri) - .setDestinationUri(dstUri) - .setType(MediaTranscodeManager.TRANSCODING_TYPE_VIDEO) - .setPriority(MediaTranscodeManager.PRIORITY_REALTIME) - .setVideoTrackFormat(createMediaFormat()) - .setTestConfig(testConfig) - .build(); - Executor listenerExecutor = Executors.newSingleThreadExecutor(); - - TranscodingJob job = mMediaTranscodeManager.enqueueRequest(request, listenerExecutor, - transcodingJob -> { - Log.d(TAG, "Transcoding completed with result: " + transcodingJob.getResult()); - assertTrue("Transcoding should failed.", - transcodingJob.getResult() == expectedResult); - transcodeCompleteSemaphore.release(); - }); - assertNotNull(job); - - if (job != null) { - Log.d(TAG, "testMediaTranscodeManager - Waiting for transcode to complete."); - boolean finishedOnTime = transcodeCompleteSemaphore.tryAcquire( - TRANSCODE_TIMEOUT_SECONDS, TimeUnit.SECONDS); - assertTrue("Transcode failed to complete in time.", finishedOnTime); - } - - if (expectedResult == TranscodingJob.RESULT_SUCCESS) { - // Checks the destination file get generated. - File file = new File(dstUri.getPath()); - assertTrue("Failed to create destination file", file.exists()); - - // Removes the file. - file.delete(); - } - } - - // Tests transcoding from invalid a invalid and expects failure. - @Test - public void testTranscodingInvalidSrcUri() throws Exception { - Log.d(TAG, "Starting: testMediaTranscodeManager"); - - Uri invalidSrcUri = Uri.parse(ContentResolver.SCHEME_ANDROID_RESOURCE + "://" - + mContext.getPackageName() + "/source.mp4"); - Log.d(TAG, "Transcoding from source: " + invalidSrcUri); - - // Create a file Uri: file:///data/user/0/com.android.mediatranscodingtest/cache/temp.mp4 - // The full path of this file is: - // /data/user/0/com.android.mediatranscodingtest/cache/temp.mp4 - Uri destinationUri = Uri.parse(ContentResolver.SCHEME_ANDROID_RESOURCE + "://" - + mContext.getPackageName() + "/temp.mp4"); - Log.d(TAG, "Transcoding to destination: " + destinationUri); - - testTranscodingWithExpectResult(invalidSrcUri, destinationUri, TranscodingJob.RESULT_ERROR); - } - - // Tests transcoding to a uri in res folder and expects failure as we could not write to res - // folder. - @Test - public void testTranscodingToResFolder() throws Exception { - Log.d(TAG, "Starting: testMediaTranscodeManager"); - - // Create a file Uri: file:///data/user/0/com.android.mediatranscodingtest/cache/temp.mp4 - // The full path of this file is: - // /data/user/0/com.android.mediatranscodingtest/cache/temp.mp4 - Uri destinationUri = Uri.parse(ContentResolver.SCHEME_ANDROID_RESOURCE + "://" - + mContext.getPackageName() + "/temp.mp4"); - Log.d(TAG, "Transcoding to destination: " + destinationUri); - - testTranscodingWithExpectResult(mSourceHEVCVideoUri, destinationUri, - TranscodingJob.RESULT_ERROR); - } - - // Tests transcoding to a uri in internal storage folder and expects success. - @Test - public void testTranscodingToCacheDir() throws Exception { - Log.d(TAG, "Starting: testMediaTranscodeManager"); - - // Create a file Uri: file:///data/user/0/com.android.mediatranscodingtest/cache/temp.mp4 - // The full path of this file is: - // /data/user/0/com.android.mediatranscodingtest/cache/temp.mp4 - Uri destinationUri = Uri.parse(ContentResolver.SCHEME_FILE + "://" - + mContext.getCacheDir().getAbsolutePath() + "/temp.mp4"); - - testTranscodingWithExpectResult(mSourceHEVCVideoUri, destinationUri, - TranscodingJob.RESULT_SUCCESS); - } - - // Tests transcoding to a uri in internal files directory and expects success. - @Test - public void testTranscodingToInternalFilesDir() throws Exception { - Log.d(TAG, "Starting: testMediaTranscodeManager"); - - // Create a file Uri: - // file:///storage/emulated/0/Android/data/com.android.mediatranscodingtest/files/temp.mp4 - Uri destinationUri = Uri.fromFile(new File(mContext.getFilesDir(), "temp.mp4")); - Log.i(TAG, "Transcoding to files dir: " + destinationUri); - - testTranscodingWithExpectResult(mSourceHEVCVideoUri, destinationUri, - TranscodingJob.RESULT_SUCCESS); - } - - // Tests transcoding to a uri in external files directory and expects success. - @Test - public void testTranscodingToExternalFilesDir() throws Exception { - Log.d(TAG, "Starting: testMediaTranscodeManager"); - - // Create a file Uri: file:///data/user/0/com.android.mediatranscodingtest/files/temp.mp4 - Uri destinationUri = Uri.fromFile(new File(mContext.getExternalFilesDir(null), "temp.mp4")); - Log.i(TAG, "Transcoding to files dir: " + destinationUri); - - testTranscodingWithExpectResult(mSourceHEVCVideoUri, destinationUri, - TranscodingJob.RESULT_SUCCESS); - } - - @Test - public void testTranscodingOneVideo() throws Exception { - Log.d(TAG, "Starting: testMediaTranscodeManager"); - testTranscodingWithExpectResult(mSourceHEVCVideoUri, mDestinationUri, - TranscodingJob.RESULT_SUCCESS); - } -} diff --git a/media/tests/MediaTranscodingTest/src/com/android/mediatranscodingtest/MediaTranscodingTestRunner.java b/media/tests/MediaTranscodingTest/src/com/android/mediatranscodingtest/MediaTranscodingTestRunner.java index 53b23927fc64..bd1551f352f4 100644 --- a/media/tests/MediaTranscodingTest/src/com/android/mediatranscodingtest/MediaTranscodingTestRunner.java +++ b/media/tests/MediaTranscodingTest/src/com/android/mediatranscodingtest/MediaTranscodingTestRunner.java @@ -36,8 +36,8 @@ public class MediaTranscodingTestRunner extends InstrumentationTestRunner { @Override public TestSuite getAllTests() { TestSuite suite = new InstrumentationTestSuite(this); + suite.addTestSuite(MediaTranscodeManagerDiedTest.class); suite.addTestSuite(MediaTranscodeManagerTest.class); - suite.addTestSuite(MediaTranscodeManagerWithMockServiceTest.class); suite.addTestSuite(MediaTranscodingBenchmark.class); return suite; } diff --git a/non-updatable-api/current.txt b/non-updatable-api/current.txt index e1b3151acd5b..bb40e24a68ac 100644 --- a/non-updatable-api/current.txt +++ b/non-updatable-api/current.txt @@ -1005,7 +1005,7 @@ package android { field public static final int numericModifiers = 16844111; // 0x101054f field public static final int numericShortcut = 16843236; // 0x10101e4 field public static final int offset = 16844052; // 0x1010514 - field public static final int onClick = 16843375; // 0x101026f + field @Deprecated public static final int onClick = 16843375; // 0x101026f field public static final int oneshot = 16843159; // 0x1010197 field public static final int opacity = 16843550; // 0x101031e field public static final int opticalInsetBottom = 16844171; // 0x101058b @@ -6188,6 +6188,7 @@ package android.app { method public android.app.PictureInPictureParams build(); method public android.app.PictureInPictureParams.Builder setActions(java.util.List<android.app.RemoteAction>); method public android.app.PictureInPictureParams.Builder setAspectRatio(android.util.Rational); + method @NonNull public android.app.PictureInPictureParams.Builder setAutoEnterAllowed(boolean); method public android.app.PictureInPictureParams.Builder setSourceRectHint(android.graphics.Rect); } @@ -46546,7 +46547,8 @@ package android.telephony { method public boolean isVoiceCapable(); method public boolean isVoicemailVibrationEnabled(android.telecom.PhoneAccountHandle); method public boolean isWorldPhone(); - method public void listen(android.telephony.PhoneStateListener, int); + method @Deprecated public void listen(android.telephony.PhoneStateListener, int); + method public void listen(long, @NonNull android.telephony.PhoneStateListener); method @RequiresPermission(android.Manifest.permission.ACCESS_FINE_LOCATION) public void requestCellInfoUpdate(@NonNull java.util.concurrent.Executor, @NonNull android.telephony.TelephonyManager.CellInfoCallback); method @RequiresPermission(allOf={android.Manifest.permission.MODIFY_PHONE_STATE, android.Manifest.permission.ACCESS_FINE_LOCATION}) public android.telephony.NetworkScan requestNetworkScan(android.telephony.NetworkScanRequest, java.util.concurrent.Executor, android.telephony.TelephonyScanManager.NetworkScanCallback); method public void sendDialerSpecialCode(String); diff --git a/non-updatable-api/module-lib-current.txt b/non-updatable-api/module-lib-current.txt index 8892a2954afb..d4c5e7ea375d 100644 --- a/non-updatable-api/module-lib-current.txt +++ b/non-updatable-api/module-lib-current.txt @@ -42,6 +42,10 @@ package android.media { package android.media.session { + public static final class MediaController.PlaybackInfo implements android.os.Parcelable { + ctor public MediaController.PlaybackInfo(int, int, @IntRange(from=0) int, @IntRange(from=0) int, @NonNull android.media.AudioAttributes, @Nullable String); + } + public final class MediaSession { field public static final int FLAG_EXCLUSIVE_GLOBAL_PRIORITY = 65536; // 0x10000 } @@ -84,6 +88,14 @@ package android.os { } +package android.provider { + + public final class DeviceConfig { + field public static final String NAMESPACE_DEVICE_IDLE = "device_idle"; + } + +} + package android.util { public class AtomicFile { diff --git a/non-updatable-api/system-current.txt b/non-updatable-api/system-current.txt index f64be2b1ff03..cc6c3dc97acf 100644 --- a/non-updatable-api/system-current.txt +++ b/non-updatable-api/system-current.txt @@ -4274,11 +4274,8 @@ package android.media { field @RequiresPermission(android.Manifest.permission.CAPTURE_AUDIO_OUTPUT) public static final int RADIO_TUNER = 1998; // 0x7ce } - public final class MediaTranscodeManager implements java.lang.AutoCloseable { - method public void close(); + public final class MediaTranscodeManager { method @NonNull public android.media.MediaTranscodeManager.TranscodingJob enqueueRequest(@NonNull android.media.MediaTranscodeManager.TranscodingRequest, @NonNull java.util.concurrent.Executor, @NonNull android.media.MediaTranscodeManager.OnTranscodingFinishedListener) throws java.io.FileNotFoundException; - method protected void finalize(); - field public static final int PRIORITY_OFFLINE = 2; // 0x2 field public static final int PRIORITY_REALTIME = 1; // 0x1 field public static final int TRANSCODING_TYPE_VIDEO = 1; // 0x1 } @@ -4307,7 +4304,7 @@ package android.media { } @java.lang.FunctionalInterface public static interface MediaTranscodeManager.TranscodingJob.OnProgressUpdateListener { - method public void onProgressUpdate(@IntRange(from=0, to=100) int); + method public void onProgressUpdate(@NonNull android.media.MediaTranscodeManager.TranscodingJob, @IntRange(from=0, to=100) int); } public static final class MediaTranscodeManager.TranscodingRequest { @@ -9742,6 +9739,7 @@ package android.telephony { method @Deprecated public void onOutgoingEmergencyCall(@NonNull android.telephony.emergency.EmergencyNumber); method public void onOutgoingEmergencyCall(@NonNull android.telephony.emergency.EmergencyNumber, int); method public void onOutgoingEmergencySms(@NonNull android.telephony.emergency.EmergencyNumber); + method public void onPhysicalChannelConfigurationChanged(@NonNull java.util.List<android.telephony.PhysicalChannelConfig>); method @RequiresPermission("android.permission.READ_PRECISE_PHONE_STATE") public void onPreciseCallStateChanged(@NonNull android.telephony.PreciseCallState); method public void onRadioPowerStateChanged(int); method public void onSrvccStateChanged(int); @@ -9749,12 +9747,29 @@ package android.telephony { field @RequiresPermission("android.permission.READ_PRECISE_PHONE_STATE") public static final int LISTEN_CALL_ATTRIBUTES_CHANGED = 67108864; // 0x4000000 field @RequiresPermission(android.Manifest.permission.READ_ACTIVE_EMERGENCY_SESSION) public static final int LISTEN_OUTGOING_EMERGENCY_CALL = 268435456; // 0x10000000 field @RequiresPermission(android.Manifest.permission.READ_ACTIVE_EMERGENCY_SESSION) public static final int LISTEN_OUTGOING_EMERGENCY_SMS = 536870912; // 0x20000000 + field @RequiresPermission(android.Manifest.permission.READ_PRECISE_PHONE_STATE) public static final long LISTEN_PHYSICAL_CHANNEL_CONFIGURATION = 4294967296L; // 0x100000000L field @RequiresPermission("android.permission.READ_PRECISE_PHONE_STATE") public static final int LISTEN_PRECISE_CALL_STATE = 2048; // 0x800 field @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public static final int LISTEN_RADIO_POWER_STATE_CHANGED = 8388608; // 0x800000 field @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public static final int LISTEN_SRVCC_STATE_CHANGED = 16384; // 0x4000 field @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public static final int LISTEN_VOICE_ACTIVATION_STATE = 131072; // 0x20000 } + public final class PhysicalChannelConfig implements android.os.Parcelable { + method public int describeContents(); + method public int getCellBandwidthDownlink(); + method public int getChannelNumber(); + method public int getConnectionStatus(); + method public int getNetworkType(); + method @IntRange(from=0, to=1007) public int getPhysicalCellId(); + method public void writeToParcel(@NonNull android.os.Parcel, int); + field public static final int CHANNEL_NUMBER_UNKNOWN = -1; // 0xffffffff + field public static final int CONNECTION_PRIMARY_SERVING = 1; // 0x1 + field public static final int CONNECTION_SECONDARY_SERVING = 2; // 0x2 + field public static final int CONNECTION_UNKNOWN = -1; // 0xffffffff + field @NonNull public static final android.os.Parcelable.Creator<android.telephony.PhysicalChannelConfig> CREATOR; + field public static final int PHYSICAL_CELL_ID_UNKNOWN = -1; // 0xffffffff + } + public final class PreciseCallState implements android.os.Parcelable { ctor public PreciseCallState(int, int, int, int, int); method public int describeContents(); diff --git a/packages/CarSystemUI/res/drawable/hvac_decrease_button.xml b/packages/CarSystemUI/res/drawable/hvac_decrease_button.xml index 469ac91073f9..656e94ae348b 100644 --- a/packages/CarSystemUI/res/drawable/hvac_decrease_button.xml +++ b/packages/CarSystemUI/res/drawable/hvac_decrease_button.xml @@ -27,20 +27,20 @@ android:width="@dimen/system_bar_icon_drawing_size" android:height="@dimen/system_bar_icon_drawing_size"/> <solid - android:color="#3C4043"/> + android:color="@color/hvac_temperature_adjust_button_color"/> </shape> </aapt:attr> </item> <item android:gravity="center" - android:width="48dp" - android:height="48dp"> + android:width="@dimen/system_bar_icon_drawing_size" + android:height="@dimen/system_bar_icon_drawing_size"> <aapt:attr name="android:drawable"> - <vector android:width="48dp" - android:height="48dp" + <vector android:width="@dimen/system_bar_icon_drawing_size" + android:height="@dimen/system_bar_icon_drawing_size" android:viewportWidth="24.0" android:viewportHeight="24.0"> <path - android:fillColor="#8AB4F8" + android:fillColor="@color/hvac_temperature_decrease_arrow_color" android:pathData="M14,7l-5,5 5,5V7z"/> </vector> </aapt:attr> diff --git a/packages/CarSystemUI/res/drawable/hvac_increase_button.xml b/packages/CarSystemUI/res/drawable/hvac_increase_button.xml index a3fca2233ddd..57c07c873d76 100644 --- a/packages/CarSystemUI/res/drawable/hvac_increase_button.xml +++ b/packages/CarSystemUI/res/drawable/hvac_increase_button.xml @@ -27,20 +27,20 @@ android:width="@dimen/system_bar_icon_drawing_size" android:height="@dimen/system_bar_icon_drawing_size"/> <solid - android:color="#3C4043"/> + android:color="@color/hvac_temperature_adjust_button_color"/> </shape> </aapt:attr> </item> <item android:gravity="center" - android:width="48dp" - android:height="48dp"> + android:width="@dimen/system_bar_icon_drawing_size" + android:height="@dimen/system_bar_icon_drawing_size"> <aapt:attr name="android:drawable"> - <vector android:width="48dp" - android:height="48dp" + <vector android:width="@dimen/system_bar_icon_drawing_size" + android:height="@dimen/system_bar_icon_drawing_size" android:viewportWidth="24.0" android:viewportHeight="24.0"> <path - android:fillColor="#F28B82" + android:fillColor="@color/hvac_temperature_increase_arrow_color" android:pathData="M10,17l5,-5 -5,-5v10z"/> </vector> </aapt:attr> diff --git a/packages/CarSystemUI/res/layout/car_top_navigation_bar_unprovisioned.xml b/packages/CarSystemUI/res/layout/car_top_navigation_bar_unprovisioned.xml index d9c149106451..b8ac2b43b047 100644 --- a/packages/CarSystemUI/res/layout/car_top_navigation_bar_unprovisioned.xml +++ b/packages/CarSystemUI/res/layout/car_top_navigation_bar_unprovisioned.xml @@ -56,8 +56,6 @@ android:textAppearance="@style/TextAppearance.CarStatus" systemui:hvacAreaId="49" systemui:hvacPivotOffset="60dp" - systemui:hvacPropertyId="358614275" - systemui:hvacTempFormat="%.0f\u00B0" /> </FrameLayout> @@ -130,8 +128,6 @@ android:textAppearance="@style/TextAppearance.CarStatus" systemui:hvacAreaId="68" systemui:hvacPivotOffset="60dp" - systemui:hvacPropertyId="358614275" - systemui:hvacTempFormat="%.0f\u00B0" /> </FrameLayout> </RelativeLayout> diff --git a/packages/CarSystemUI/res/values/colors.xml b/packages/CarSystemUI/res/values/colors.xml index 1e15affcbf48..c390cc8d70a4 100644 --- a/packages/CarSystemUI/res/values/colors.xml +++ b/packages/CarSystemUI/res/values/colors.xml @@ -37,6 +37,11 @@ <color name="status_bar_background_color">#33000000</color> <drawable name="system_bar_background">@color/status_bar_background_color</drawable> + <!-- colors for hvac temperature view --> + <color name="hvac_temperature_adjust_button_color">#3C4043</color> + <color name="hvac_temperature_decrease_arrow_color">#8AB4F8</color> + <color name="hvac_temperature_increase_arrow_color">#F28B82</color> + <!-- The background color of the notification shade --> <color name="notification_shade_background_color">#D6000000</color> diff --git a/packages/CarSystemUI/res/values/dimens.xml b/packages/CarSystemUI/res/values/dimens.xml index f02a8e7648c0..28b8eadf9750 100644 --- a/packages/CarSystemUI/res/values/dimens.xml +++ b/packages/CarSystemUI/res/values/dimens.xml @@ -48,8 +48,14 @@ <dimen name="system_bar_user_icon_padding">16dp</dimen> <dimen name="system_bar_user_icon_drawing_size">36dp</dimen> + <!-- Padding on either side of the group of all system bar buttons --> <dimen name="system_bar_button_group_padding">64dp</dimen> <dimen name="system_bar_icon_drawing_size">44dp</dimen> + <dimen name="system_bar_button_size">76dp</dimen> + <!-- Margin between the system bar buttons --> + <dimen name="system_bar_button_margin">32dp</dimen> + <!-- Padding between the system bar button and the icon within it --> + <dimen name="system_bar_button_padding">16dp</dimen> <!-- The amount by which to scale up the status bar icons. --> <item name="status_bar_icon_scale_factor" format="float" type="dimen">1.75</item> @@ -61,8 +67,8 @@ <dimen name="hvac_temperature_text_padding">8dp</dimen> <dimen name="hvac_temperature_button_size">76dp</dimen> <!--These values represent MIN and MAX for hvac--> - <item name="hvac_min_value_celsius" format="float" type="dimen">0</item> - <item name="hvac_max_value_celsius" format="float" type="dimen">126</item> + <item name="hvac_min_value_celsius" format="float" type="dimen">10</item> + <item name="hvac_max_value_celsius" format="float" type="dimen">35</item> <!-- Largest size an avatar might need to be drawn in the user picker, status bar, or quick settings header --> diff --git a/packages/CarSystemUI/res/values/styles.xml b/packages/CarSystemUI/res/values/styles.xml index 0db17ac42a77..f242db0aec09 100644 --- a/packages/CarSystemUI/res/values/styles.xml +++ b/packages/CarSystemUI/res/values/styles.xml @@ -43,10 +43,10 @@ </style> <style name="NavigationBarButton"> - <item name="android:layout_height">76dp</item> - <item name="android:layout_width">76dp</item> - <item name="android:layout_marginEnd">32dp</item> - <item name="android:padding">16dp</item> + <item name="android:layout_height">@dimen/system_bar_button_size</item> + <item name="android:layout_width">@dimen/system_bar_button_size</item> + <item name="android:layout_marginEnd">@dimen/system_bar_button_margin</item> + <item name="android:padding">@dimen/system_bar_button_padding</item> <item name="android:gravity">center</item> <item name="android:background">?android:attr/selectableItemBackground</item> </style> diff --git a/packages/CarSystemUI/src/com/android/systemui/CarSystemUIBinder.java b/packages/CarSystemUI/src/com/android/systemui/CarSystemUIBinder.java index 616e56288392..3def945dd03c 100644 --- a/packages/CarSystemUI/src/com/android/systemui/CarSystemUIBinder.java +++ b/packages/CarSystemUI/src/com/android/systemui/CarSystemUIBinder.java @@ -28,7 +28,6 @@ import com.android.systemui.car.window.SystemUIOverlayWindowManager; import com.android.systemui.globalactions.GlobalActionsComponent; import com.android.systemui.keyguard.KeyguardViewMediator; import com.android.systemui.keyguard.dagger.KeyguardModule; -import com.android.systemui.onehanded.OneHandedUI; import com.android.systemui.power.PowerUI; import com.android.systemui.recents.Recents; import com.android.systemui.recents.RecentsModule; @@ -94,12 +93,6 @@ public abstract class CarSystemUIBinder { @ClassKey(LatencyTester.class) public abstract SystemUI bindLatencyTester(LatencyTester sysui); - /** Inject into OneHandedUI. */ - @Binds - @IntoMap - @ClassKey(OneHandedUI.class) - public abstract SystemUI bindOneHandedUI(OneHandedUI sysui); - /** Inject into PowerUI. */ @Binds @IntoMap diff --git a/packages/CarSystemUI/src/com/android/systemui/car/hvac/AdjustableTemperatureView.java b/packages/CarSystemUI/src/com/android/systemui/car/hvac/AdjustableTemperatureView.java index 4cac4456789d..85d4ceb81eeb 100644 --- a/packages/CarSystemUI/src/com/android/systemui/car/hvac/AdjustableTemperatureView.java +++ b/packages/CarSystemUI/src/com/android/systemui/car/hvac/AdjustableTemperatureView.java @@ -35,22 +35,27 @@ import com.android.systemui.R; */ public class AdjustableTemperatureView extends LinearLayout implements TemperatureView { - private HvacController mHvacController; - private float mCurrentTempC; + private final int mAreaId; private TextView mTempTextView; + private float mMinTempC; + private float mMaxTempC; + private String mTempFormat; private boolean mDisplayInFahrenheit = false; - private final float mMinTempC; - private final float mMaxTempC; - private final int mAreaId; - private final String mTempFormat; + private HvacController mHvacController; + private float mCurrentTempC; public AdjustableTemperatureView(Context context, AttributeSet attrs) { super(context, attrs); TypedArray typedArray = context.obtainStyledAttributes(attrs, R.styleable.TemperatureView); mAreaId = typedArray.getInt(R.styleable.TemperatureView_hvacAreaId, -1); + } - LayoutInflater.from(context).inflate(R.layout.adjustable_temperature_view, /* root= */this); + @Override + public void onFinishInflate() { + super.onFinishInflate(); + LayoutInflater.from(getContext()).inflate(R.layout.adjustable_temperature_view, + /* root= */ this); mTempFormat = getResources().getString(R.string.hvac_temperature_format); mMinTempC = getResources().getFloat(R.dimen.hvac_min_value_celsius); mMaxTempC = getResources().getFloat(R.dimen.hvac_max_value_celsius); @@ -63,7 +68,7 @@ public class AdjustableTemperatureView extends LinearLayout implements Temperatu } @Override - public void setTemperatureView(float tempC) { + public void setTemp(float tempC) { if (tempC > mMaxTempC || tempC < mMinTempC) { return; } @@ -78,7 +83,7 @@ public class AdjustableTemperatureView extends LinearLayout implements Temperatu @Override public void setDisplayInFahrenheit(boolean displayFahrenheit) { mDisplayInFahrenheit = displayFahrenheit; - setTemperatureView(mCurrentTempC); + setTemp(mCurrentTempC); } @Override diff --git a/packages/CarSystemUI/src/com/android/systemui/car/hvac/AnimatedTemperatureView.java b/packages/CarSystemUI/src/com/android/systemui/car/hvac/AnimatedTemperatureView.java index 567baa91cb59..b98b68038e6f 100644 --- a/packages/CarSystemUI/src/com/android/systemui/car/hvac/AnimatedTemperatureView.java +++ b/packages/CarSystemUI/src/com/android/systemui/car/hvac/AnimatedTemperatureView.java @@ -189,7 +189,7 @@ public class AnimatedTemperatureView extends FrameLayout implements TemperatureV * @param temp - The current temp or NaN */ @Override - public void setTemperatureView(float temp) { + public void setTemp(float temp) { if (mDisplayInFahrenheit) { temp = convertToFahrenheit(temp); } diff --git a/packages/CarSystemUI/src/com/android/systemui/car/hvac/HvacController.java b/packages/CarSystemUI/src/com/android/systemui/car/hvac/HvacController.java index f7451dc6fdee..10a361c3084e 100644 --- a/packages/CarSystemUI/src/com/android/systemui/car/hvac/HvacController.java +++ b/packages/CarSystemUI/src/com/android/systemui/car/hvac/HvacController.java @@ -30,6 +30,7 @@ import android.view.ViewGroup; import com.android.systemui.car.CarServiceProvider; import com.android.systemui.dagger.SysUISingleton; +import com.android.systemui.dagger.qualifiers.UiBackground; import java.util.ArrayList; import java.util.HashMap; @@ -37,6 +38,7 @@ import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; +import java.util.concurrent.Executor; import javax.inject.Inject; @@ -49,6 +51,7 @@ public class HvacController { public static final String TAG = "HvacController"; private static final boolean DEBUG = true; + private final Executor mBackgroundExecutor; private final CarServiceProvider mCarServiceProvider; private final Set<TemperatureView> mRegisteredViews = new HashSet<>(); @@ -68,7 +71,7 @@ public class HvacController { Log.d(TAG, "onChangeEvent: " + areaId + ":" + value); } for (TemperatureView view : temperatureViews) { - view.setTemperatureView(newTemp); + view.setTemp(newTemp); } } } catch (Exception e) { @@ -117,8 +120,10 @@ public class HvacController { }; @Inject - public HvacController(CarServiceProvider carServiceProvider) { + public HvacController(CarServiceProvider carServiceProvider, + @UiBackground Executor backgroundExecutor) { mCarServiceProvider = carServiceProvider; + mBackgroundExecutor = backgroundExecutor; } /** @@ -171,14 +176,14 @@ public class HvacController { } if (mCarPropertyManager == null || !mCarPropertyManager.isPropertyAvailable( HVAC_TEMPERATURE_SET, zone)) { - view.setTemperatureView(Float.NaN); + view.setTemp(Float.NaN); return; } - view.setTemperatureView( + view.setTemp( mCarPropertyManager.getFloatProperty(HVAC_TEMPERATURE_SET, zone)); view.setHvacController(this); } catch (Exception e) { - view.setTemperatureView(Float.NaN); + view.setTemp(Float.NaN); Log.e(TAG, "Failed to get value from hvac service", e); } } @@ -213,7 +218,8 @@ public class HvacController { public void setTemperature(float tempC, int zone) { if (mCarPropertyManager != null) { // Internally, all temperatures are represented in floating point Celsius - mCarPropertyManager.setFloatProperty(HVAC_TEMPERATURE_SET, zone, tempC); + mBackgroundExecutor.execute( + () -> mCarPropertyManager.setFloatProperty(HVAC_TEMPERATURE_SET, zone, tempC)); } } @@ -234,6 +240,6 @@ public class HvacController { * @return Temperature in Celsius. */ public static float convertToCelsius(float tempF) { - return (float) ((tempF - 32) * 0.55555555556); + return (tempF - 32) * 5f / 9f; } } diff --git a/packages/CarSystemUI/src/com/android/systemui/car/hvac/TemperatureTextView.java b/packages/CarSystemUI/src/com/android/systemui/car/hvac/TemperatureTextView.java index 252f7830b72c..90df15c907dd 100644 --- a/packages/CarSystemUI/src/com/android/systemui/car/hvac/TemperatureTextView.java +++ b/packages/CarSystemUI/src/com/android/systemui/car/hvac/TemperatureTextView.java @@ -56,7 +56,7 @@ public class TemperatureTextView extends TextView implements TemperatureView { * @param temp - The current temp or NaN */ @Override - public void setTemperatureView(float temp) { + public void setTemp(float temp) { if (Float.isNaN(temp)) { setText("--"); return; diff --git a/packages/CarSystemUI/src/com/android/systemui/car/hvac/TemperatureView.java b/packages/CarSystemUI/src/com/android/systemui/car/hvac/TemperatureView.java index 3c0e0acc446c..6edf25431ffd 100644 --- a/packages/CarSystemUI/src/com/android/systemui/car/hvac/TemperatureView.java +++ b/packages/CarSystemUI/src/com/android/systemui/car/hvac/TemperatureView.java @@ -33,7 +33,7 @@ public interface TemperatureView { * * @param temp - The current temp in Celsius or NaN */ - void setTemperatureView(float temp); + void setTemp(float temp); /** * Render the displayed temperature in Fahrenheit diff --git a/packages/CarSystemUI/src/com/android/systemui/car/notification/NotificationPanelViewController.java b/packages/CarSystemUI/src/com/android/systemui/car/notification/NotificationPanelViewController.java index fe4cba8e73cd..8d91e7eae91a 100644 --- a/packages/CarSystemUI/src/com/android/systemui/car/notification/NotificationPanelViewController.java +++ b/packages/CarSystemUI/src/com/android/systemui/car/notification/NotificationPanelViewController.java @@ -54,8 +54,8 @@ import com.android.systemui.dagger.qualifiers.Main; import com.android.systemui.dagger.qualifiers.UiBackground; import com.android.systemui.plugins.statusbar.StatusBarStateController; import com.android.systemui.statusbar.CommandQueue; -import com.android.systemui.statusbar.FlingAnimationUtils; import com.android.systemui.statusbar.StatusBarState; +import com.android.wm.shell.animation.FlingAnimationUtils; import java.util.concurrent.Executor; diff --git a/packages/CarSystemUI/src/com/android/systemui/car/window/OverlayPanelViewController.java b/packages/CarSystemUI/src/com/android/systemui/car/window/OverlayPanelViewController.java index 1b00c6301011..d928ad0f42c9 100644 --- a/packages/CarSystemUI/src/com/android/systemui/car/window/OverlayPanelViewController.java +++ b/packages/CarSystemUI/src/com/android/systemui/car/window/OverlayPanelViewController.java @@ -34,7 +34,7 @@ import androidx.annotation.CallSuper; import com.android.systemui.R; import com.android.systemui.car.CarDeviceProvisionedController; import com.android.systemui.dagger.qualifiers.Main; -import com.android.systemui.statusbar.FlingAnimationUtils; +import com.android.wm.shell.animation.FlingAnimationUtils; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; diff --git a/packages/CarSystemUI/tests/src/com/android/systemui/car/hvac/AdjustableTemperatureViewTest.java b/packages/CarSystemUI/tests/src/com/android/systemui/car/hvac/AdjustableTemperatureViewTest.java index e8850def6bcd..a3a55aae5f18 100644 --- a/packages/CarSystemUI/tests/src/com/android/systemui/car/hvac/AdjustableTemperatureViewTest.java +++ b/packages/CarSystemUI/tests/src/com/android/systemui/car/hvac/AdjustableTemperatureViewTest.java @@ -46,9 +46,12 @@ import com.android.systemui.car.CarSystemUiTest; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; +import org.mockito.ArgumentCaptor; import org.mockito.Mock; import org.mockito.MockitoAnnotations; +import java.util.concurrent.Executor; + @CarSystemUiTest @RunWith(AndroidTestingRunner.class) @TestableLooper.RunWithLooper @@ -64,6 +67,8 @@ public class AdjustableTemperatureViewTest extends SysuiTestCase { private Car mCar; @Mock private CarPropertyManager mCarPropertyManager; + @Mock + private Executor mExecutor; @Before public void setUp() { @@ -72,9 +77,10 @@ public class AdjustableTemperatureViewTest extends SysuiTestCase { when(mCar.getCarManager(Car.PROPERTY_SERVICE)).thenReturn(mCarPropertyManager); CarServiceProvider carServiceProvider = new CarServiceProvider(mContext, mCar); - mHvacController = new HvacController(carServiceProvider); + mHvacController = new HvacController(carServiceProvider, mExecutor); mHvacController.connectToCarService(); mAdjustableTemperatureView = new AdjustableTemperatureView(getContext(), /* attrs= */ null); + mAdjustableTemperatureView.onFinishInflate(); mAdjustableTemperatureView.setHvacController(mHvacController); } @@ -118,6 +124,9 @@ public class AdjustableTemperatureViewTest extends SysuiTestCase { mAdjustableTemperatureView.findViewById(R.id.hvac_increase_button).callOnClick(); + ArgumentCaptor<Runnable> setTempRunnableCaptor = ArgumentCaptor.forClass(Runnable.class); + verify(mExecutor).execute(setTempRunnableCaptor.capture()); + setTempRunnableCaptor.getValue().run(); verify(mCarPropertyManager).setFloatProperty(eq(HVAC_TEMPERATURE_SET), anyInt(), eq(TEMP_CELSIUS + 1)); } @@ -132,6 +141,9 @@ public class AdjustableTemperatureViewTest extends SysuiTestCase { mAdjustableTemperatureView.findViewById(R.id.hvac_decrease_button).callOnClick(); + ArgumentCaptor<Runnable> setTempRunnableCaptor = ArgumentCaptor.forClass(Runnable.class); + verify(mExecutor).execute(setTempRunnableCaptor.capture()); + setTempRunnableCaptor.getValue().run(); verify(mCarPropertyManager).setFloatProperty(eq(HVAC_TEMPERATURE_SET), anyInt(), eq(TEMP_CELSIUS - 1)); } @@ -150,6 +162,9 @@ public class AdjustableTemperatureViewTest extends SysuiTestCase { mAdjustableTemperatureView.findViewById(R.id.hvac_increase_button).callOnClick(); + ArgumentCaptor<Runnable> setTempRunnableCaptor = ArgumentCaptor.forClass(Runnable.class); + verify(mExecutor).execute(setTempRunnableCaptor.capture()); + setTempRunnableCaptor.getValue().run(); verify(mCarPropertyManager).setFloatProperty(eq(HVAC_TEMPERATURE_SET), anyInt(), eq(convertToCelsius(convertToFahrenheit(TEMP_CELSIUS) + 1))); } @@ -168,6 +183,9 @@ public class AdjustableTemperatureViewTest extends SysuiTestCase { mAdjustableTemperatureView.findViewById(R.id.hvac_decrease_button).callOnClick(); + ArgumentCaptor<Runnable> setTempRunnableCaptor = ArgumentCaptor.forClass(Runnable.class); + verify(mExecutor).execute(setTempRunnableCaptor.capture()); + setTempRunnableCaptor.getValue().run(); verify(mCarPropertyManager).setFloatProperty(eq(HVAC_TEMPERATURE_SET), anyInt(), eq(convertToCelsius(convertToFahrenheit(TEMP_CELSIUS) - 1))); } diff --git a/packages/CarSystemUI/tests/src/com/android/systemui/car/hvac/HvacControllerTest.java b/packages/CarSystemUI/tests/src/com/android/systemui/car/hvac/HvacControllerTest.java index 9912657d78e1..52f07dfd6b81 100644 --- a/packages/CarSystemUI/tests/src/com/android/systemui/car/hvac/HvacControllerTest.java +++ b/packages/CarSystemUI/tests/src/com/android/systemui/car/hvac/HvacControllerTest.java @@ -40,6 +40,8 @@ import androidx.test.filters.SmallTest; import com.android.systemui.SysuiTestCase; import com.android.systemui.car.CarServiceProvider; import com.android.systemui.car.CarSystemUiTest; +import com.android.systemui.util.concurrency.FakeExecutor; +import com.android.systemui.util.time.FakeSystemClock; import org.junit.Before; import org.junit.Test; @@ -70,7 +72,8 @@ public class HvacControllerTest extends SysuiTestCase { when(mCar.getCarManager(Car.PROPERTY_SERVICE)).thenReturn(mCarPropertyManager); CarServiceProvider carServiceProvider = new CarServiceProvider(mContext, mCar); - mHvacController = new HvacController(carServiceProvider); + mHvacController = new HvacController(carServiceProvider, + new FakeExecutor(new FakeSystemClock())); mHvacController.connectToCarService(); } @@ -86,31 +89,31 @@ public class HvacControllerTest extends SysuiTestCase { TemperatureTextView v = setupMockTemperatureTextView(AREA_ID, TEMP); mHvacController.addTemperatureViewToController(v); - verify(v).setTemperatureView(TEMP); + verify(v).setTemp(TEMP); } @Test public void addTemperatureViewToController_usingSameTemperatureView_registersFirstView() { TemperatureTextView v = setupMockTemperatureTextView(AREA_ID, TEMP); mHvacController.addTemperatureViewToController(v); - verify(v).setTemperatureView(TEMP); + verify(v).setTemp(TEMP); resetTemperatureView(v, AREA_ID); mHvacController.addTemperatureViewToController(v); - verify(v, never()).setTemperatureView(TEMP); + verify(v, never()).setTemp(TEMP); } @Test public void addTemperatureViewToController_usingDifferentTemperatureView_registersBothViews() { TemperatureTextView v1 = setupMockTemperatureTextView(AREA_ID, TEMP); mHvacController.addTemperatureViewToController(v1); - verify(v1).setTemperatureView(TEMP); + verify(v1).setTemp(TEMP); TemperatureTextView v2 = setupMockTemperatureTextView( AREA_ID + 1, TEMP + 1); mHvacController.addTemperatureViewToController(v2); - verify(v2).setTemperatureView(TEMP + 1); + verify(v2).setTemp(TEMP + 1); } @Test @@ -124,7 +127,7 @@ public class HvacControllerTest extends SysuiTestCase { mHvacController.addTemperatureViewToController(v); verify(v).setDisplayInFahrenheit(true); - verify(v).setTemperatureView(TEMP); + verify(v).setTemp(TEMP); } private TemperatureTextView setupMockTemperatureTextView(int areaId, float value) { diff --git a/packages/CarSystemUI/tests/src/com/android/systemui/car/hvac/TemperatureTextViewTest.java b/packages/CarSystemUI/tests/src/com/android/systemui/car/hvac/TemperatureTextViewTest.java index e97d9d9b3f6a..3ed811105a54 100644 --- a/packages/CarSystemUI/tests/src/com/android/systemui/car/hvac/TemperatureTextViewTest.java +++ b/packages/CarSystemUI/tests/src/com/android/systemui/car/hvac/TemperatureTextViewTest.java @@ -40,6 +40,8 @@ import com.android.systemui.R; import com.android.systemui.SysuiTestCase; import com.android.systemui.car.CarServiceProvider; import com.android.systemui.car.CarSystemUiTest; +import com.android.systemui.util.concurrency.FakeExecutor; +import com.android.systemui.util.time.FakeSystemClock; import org.junit.Before; import org.junit.Test; @@ -72,7 +74,8 @@ public class TemperatureTextViewTest extends SysuiTestCase { when(mCar.getCarManager(Car.PROPERTY_SERVICE)).thenReturn(mCarPropertyManager); CarServiceProvider carServiceProvider = new CarServiceProvider(mContext, mCar); - mHvacController = new HvacController(carServiceProvider); + mHvacController = new HvacController(carServiceProvider, + new FakeExecutor(new FakeSystemClock())); mHvacController.connectToCarService(); mTextView = new TemperatureTextView(getContext(), /* attrs= */ null); } diff --git a/packages/CarSystemUI/tests/src/com/android/systemui/car/window/OverlayPanelViewControllerTest.java b/packages/CarSystemUI/tests/src/com/android/systemui/car/window/OverlayPanelViewControllerTest.java index 7311cdb68a3c..bed803eedc22 100644 --- a/packages/CarSystemUI/tests/src/com/android/systemui/car/window/OverlayPanelViewControllerTest.java +++ b/packages/CarSystemUI/tests/src/com/android/systemui/car/window/OverlayPanelViewControllerTest.java @@ -40,8 +40,8 @@ import androidx.test.filters.SmallTest; import com.android.systemui.SysuiTestCase; import com.android.systemui.car.CarDeviceProvisionedController; import com.android.systemui.car.CarSystemUiTest; -import com.android.systemui.statusbar.FlingAnimationUtils; import com.android.systemui.tests.R; +import com.android.wm.shell.animation.FlingAnimationUtils; import org.junit.Before; import org.junit.Test; diff --git a/packages/DynamicSystemInstallationService/src/com/android/dynsystem/InstallationAsyncTask.java b/packages/DynamicSystemInstallationService/src/com/android/dynsystem/InstallationAsyncTask.java index f8952ace3cb3..4d31ce97e8b7 100644 --- a/packages/DynamicSystemInstallationService/src/com/android/dynsystem/InstallationAsyncTask.java +++ b/packages/DynamicSystemInstallationService/src/com/android/dynsystem/InstallationAsyncTask.java @@ -334,6 +334,11 @@ class InstallationAsyncTask extends AsyncTask<String, InstallationAsyncTask.Prog throw new IOException( "Failed to start installation with requested size: " + mUserdataSize); } + // Reset installation session and verify that installation completes successfully. + mInstallationSession = null; + if (!mDynSystem.closePartition()) { + throw new IOException("Failed to complete partition installation: userdata"); + } } private void installImages() @@ -503,6 +508,12 @@ class InstallationAsyncTask extends AsyncTask<String, InstallationAsyncTask.Prog imageValidationThrowOrWarning(new KeyRevokedException(publicKey)); } } + + // Reset installation session and verify that installation completes successfully. + mInstallationSession = null; + if (!mDynSystem.closePartition()) { + throw new IOException("Failed to complete partition installation: " + partitionName); + } } private static String toHexString(byte[] bytes) { diff --git a/packages/PackageInstaller/res/values-ar/strings.xml b/packages/PackageInstaller/res/values-ar/strings.xml index 87f89ce192c4..c840374d3f6b 100644 --- a/packages/PackageInstaller/res/values-ar/strings.xml +++ b/packages/PackageInstaller/res/values-ar/strings.xml @@ -57,7 +57,7 @@ <string name="uninstall_application_text_all_users" msgid="575491774380227119">"هل تريد إزالة هذا التطبيق "<b>"لكل"</b>" المستخدمين؟ ستتم إزالة التطبيق وبياناته من "<b>"كل"</b>" المستخدمين على هذا الجهاز."</string> <string name="uninstall_application_text_user" msgid="498072714173920526">"هل تريد إزالة هذا التطبيق للمستخدم <xliff:g id="USERNAME">%1$s</xliff:g>؟"</string> <string name="uninstall_update_text" msgid="863648314632448705">"هل تريد استبدال هذا التطبيق بإصدار المصنع؟ ستتم إزالة جميع البيانات."</string> - <string name="uninstall_update_text_multiuser" msgid="8992883151333057227">"هل تريد استبدال هذا التطبيق بإصدار المصنع؟ ستتم إزالة جميع البيانات. وسيؤثر هذا في جميع مستخدمي هذا الجهاز، بما في ذلك من لديهم ملفات شخصية للعمل."</string> + <string name="uninstall_update_text_multiuser" msgid="8992883151333057227">"هل تريد إعادة ضبط هذا التطبيق على الإعدادات الأصلية؟ سؤدي ذلك إلى إزالة جميع البيانات، كما سيؤثر على جميع مستخدمي هذا الجهاز، بما في ذلك من لديهم ملفات شخصية للعمل."</string> <string name="uninstall_keep_data" msgid="7002379587465487550">"الاحتفاظ بالحجم <xliff:g id="SIZE">%1$s</xliff:g> من بيانات التطبيق."</string> <string name="uninstalling_notification_channel" msgid="840153394325714653">"عمليات إلغاء التثبيت الجارية"</string> <string name="uninstall_failure_notification_channel" msgid="1136405866767576588">"عمليات إلغاء التثبيت غير الناجحة"</string> diff --git a/packages/SettingsLib/res/values-eu/strings.xml b/packages/SettingsLib/res/values-eu/strings.xml index dcdadbdf3454..4a11aa77c7fc 100644 --- a/packages/SettingsLib/res/values-eu/strings.xml +++ b/packages/SettingsLib/res/values-eu/strings.xml @@ -400,7 +400,7 @@ <string name="inactive_app_active_summary" msgid="8047630990208722344">"Aktibo. Aldatzeko, sakatu hau."</string> <string name="standby_bucket_summary" msgid="5128193447550429600">"Egonean moduko aplikazioaren egoera: <xliff:g id="BUCKET"> %s</xliff:g>"</string> <string name="runningservices_settings_title" msgid="6460099290493086515">"Abian diren zerbitzuak"</string> - <string name="runningservices_settings_summary" msgid="1046080643262665743">"Ikusi eta kontrolatu unean abian diren zerbitzuak"</string> + <string name="runningservices_settings_summary" msgid="1046080643262665743">"Ikusi eta kontrolatu une honetan abian diren zerbitzuak"</string> <string name="select_webview_provider_title" msgid="3917815648099445503">"WebView inplementazioa"</string> <string name="select_webview_provider_dialog_title" msgid="2444261109877277714">"Ezarri WebView inplementazioa"</string> <string name="select_webview_provider_toast_text" msgid="8512254949169359848">"Jada ez dago erabilgarri aukera hori. Saiatu berriro."</string> diff --git a/packages/SettingsLib/res/values-ja/arrays.xml b/packages/SettingsLib/res/values-ja/arrays.xml index 743017c82e3a..7a4e71b18ec0 100644 --- a/packages/SettingsLib/res/values-ja/arrays.xml +++ b/packages/SettingsLib/res/values-ja/arrays.xml @@ -243,7 +243,7 @@ </string-array> <string-array name="track_frame_time_entries"> <item msgid="634406443901014984">"OFF"</item> - <item msgid="1288760936356000927">"バーとして画面に表示"</item> + <item msgid="1288760936356000927">"棒グラフとして画面に表示"</item> <item msgid="5023908510820531131">"<xliff:g id="AS_TYPED_COMMAND">adb shell dumpsys gfxinfo</xliff:g> 内"</item> </string-array> <string-array name="debug_hw_overdraw_entries"> diff --git a/packages/SettingsLib/res/values-ky/strings.xml b/packages/SettingsLib/res/values-ky/strings.xml index c4b5f7e7477f..419c18f3b8c6 100644 --- a/packages/SettingsLib/res/values-ky/strings.xml +++ b/packages/SettingsLib/res/values-ky/strings.xml @@ -396,8 +396,8 @@ <item msgid="1282170165150762976">"Санарип мазмун үчүн оптималдаштырылган түстөр"</item> </string-array> <string name="inactive_apps_title" msgid="5372523625297212320">"Көшүү режиминдеги колдонмолор"</string> - <string name="inactive_app_inactive_summary" msgid="3161222402614236260">"Иштеген жок. Которуштуруу үчүн таптап коюңуз."</string> - <string name="inactive_app_active_summary" msgid="8047630990208722344">"Иштеп турат. Которуштуруу үчүн таптап коюңуз."</string> + <string name="inactive_app_inactive_summary" msgid="3161222402614236260">"Иштеген жок. Күйгүзүү үчүн басып коюңуз."</string> + <string name="inactive_app_active_summary" msgid="8047630990208722344">"Иштеп турат. Өчүрүү үчүн басып коюңуз."</string> <string name="standby_bucket_summary" msgid="5128193447550429600">"Көшүү режиминдеги колдонмонун абалы:<xliff:g id="BUCKET"> %s</xliff:g>"</string> <string name="runningservices_settings_title" msgid="6460099290493086515">"Иштеп жаткан кызматтар"</string> <string name="runningservices_settings_summary" msgid="1046080643262665743">"Учурда иштеп жаткан кызматтарды көрүп, көзөмөлдөп турасыз"</string> diff --git a/packages/SettingsLib/res/values-mk/strings.xml b/packages/SettingsLib/res/values-mk/strings.xml index fb7b63410a5f..58d4af1c2c64 100644 --- a/packages/SettingsLib/res/values-mk/strings.xml +++ b/packages/SettingsLib/res/values-mk/strings.xml @@ -204,10 +204,10 @@ <string name="tethering_settings_not_available" msgid="266821736434699780">"Поставките за спојување не се достапни за овој корисник"</string> <string name="apn_settings_not_available" msgid="1147111671403342300">"Поставките за името на пристапната точка не се достапни за овој корисник"</string> <string name="enable_adb" msgid="8072776357237289039">"Отстранување грешки на USB"</string> - <string name="enable_adb_summary" msgid="3711526030096574316">"Режим на отстранување грешки кога е поврзано USB"</string> + <string name="enable_adb_summary" msgid="3711526030096574316">"Режим за отстранување грешки кога е поврзано USB"</string> <string name="clear_adb_keys" msgid="3010148733140369917">"Отповикај овластувања за отстранување грешки од USB"</string> <string name="enable_adb_wireless" msgid="6973226350963971018">"Безжично отстранување грешки"</string> - <string name="enable_adb_wireless_summary" msgid="7344391423657093011">"Режим на отстранување грешки кога е поврзано Wi‑Fi"</string> + <string name="enable_adb_wireless_summary" msgid="7344391423657093011">"Режим за отстранување грешки кога е поврзано Wi‑Fi"</string> <string name="adb_wireless_error" msgid="721958772149779856">"Грешка"</string> <string name="adb_wireless_settings" msgid="2295017847215680229">"Безжично отстранување грешки"</string> <string name="adb_wireless_list_empty_off" msgid="1713707973837255490">"За да ги гледате и користите достапните уреди, вклучете го безжичното отстранување грешки"</string> diff --git a/packages/SettingsLib/src/com/android/settingslib/Utils.java b/packages/SettingsLib/src/com/android/settingslib/Utils.java index b2808061586b..2fd46d94d5cc 100644 --- a/packages/SettingsLib/src/com/android/settingslib/Utils.java +++ b/packages/SettingsLib/src/com/android/settingslib/Utils.java @@ -13,6 +13,7 @@ import android.content.res.ColorStateList; import android.content.res.Resources; import android.content.res.TypedArray; import android.graphics.Bitmap; +import android.graphics.Canvas; import android.graphics.Color; import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.Drawable; @@ -29,6 +30,10 @@ import android.telephony.AccessNetworkConstants; import android.telephony.NetworkRegistrationInfo; import android.telephony.ServiceState; +import androidx.annotation.NonNull; +import androidx.core.graphics.drawable.RoundedBitmapDrawable; +import androidx.core.graphics.drawable.RoundedBitmapDrawableFactory; + import com.android.internal.annotations.VisibleForTesting; import com.android.internal.util.UserIcons; import com.android.launcher3.icons.IconFactory; @@ -504,4 +509,25 @@ public class Utils { == NetworkRegistrationInfo.REGISTRATION_STATE_ROAMING); return !isInIwlan; } + + /** + * Returns a bitmap with rounded corner. + * + * @param context application context. + * @param source bitmap to apply round corner. + * @param cornerRadius corner radius value. + */ + public static Bitmap convertCornerRadiusBitmap(@NonNull Context context, + @NonNull Bitmap source, @NonNull float cornerRadius) { + final Bitmap roundedBitmap = Bitmap.createBitmap(source.getWidth(), source.getHeight(), + Bitmap.Config.ARGB_8888); + final RoundedBitmapDrawable drawable = + RoundedBitmapDrawableFactory.create(context.getResources(), source); + drawable.setAntiAlias(true); + drawable.setCornerRadius(cornerRadius); + final Canvas canvas = new Canvas(roundedBitmap); + drawable.setBounds(0, 0, canvas.getWidth(), canvas.getHeight()); + drawable.draw(canvas); + return roundedBitmap; + } } diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothUtils.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothUtils.java index 68f72896c251..8f8f859d1ada 100644 --- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothUtils.java +++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothUtils.java @@ -18,6 +18,7 @@ import android.util.Log; import android.util.Pair; import androidx.annotation.DrawableRes; +import androidx.core.graphics.drawable.IconCompat; import com.android.settingslib.R; import com.android.settingslib.widget.AdaptiveIcon; @@ -216,6 +217,23 @@ public class BluetoothUtils { } /** + * Create an Icon pointing to a drawable. + */ + public static IconCompat createIconWithDrawable(Drawable drawable) { + Bitmap bitmap; + if (drawable instanceof BitmapDrawable) { + bitmap = ((BitmapDrawable) drawable).getBitmap(); + } else { + final int width = drawable.getIntrinsicWidth(); + final int height = drawable.getIntrinsicHeight(); + bitmap = createBitmap(drawable, + width > 0 ? width : 1, + height > 0 ? height : 1); + } + return IconCompat.createWithBitmap(bitmap); + } + + /** * Build device icon with advanced outline */ public static Drawable buildAdvancedDrawable(Context context, Drawable drawable) { diff --git a/packages/SettingsLib/src/com/android/settingslib/wifi/AccessPoint.java b/packages/SettingsLib/src/com/android/settingslib/wifi/AccessPoint.java index c5e66bef9653..a81a05f1147a 100644 --- a/packages/SettingsLib/src/com/android/settingslib/wifi/AccessPoint.java +++ b/packages/SettingsLib/src/com/android/settingslib/wifi/AccessPoint.java @@ -116,6 +116,16 @@ public class AccessPoint implements Comparable<AccessPoint> { */ public static final int HIGHER_FREQ_5GHZ = 5900; + /** + * Lower bound on the 60 GHz (802.11ad) WIGIG channels + */ + public static final int LOWER_FREQ_60GHZ = 58320; + + /** + * Upper bound on the 60 GHz (802.11ad) WIGIG channels + */ + public static final int HIGHER_FREQ_60GHZ = 70200; + /** The key which identifies this AccessPoint grouping. */ private String mKey; diff --git a/packages/SettingsLib/src/com/android/settingslib/wifi/WifiUtils.java b/packages/SettingsLib/src/com/android/settingslib/wifi/WifiUtils.java index 1ace0b4250b9..15b146deb1cb 100644 --- a/packages/SettingsLib/src/com/android/settingslib/wifi/WifiUtils.java +++ b/packages/SettingsLib/src/com/android/settingslib/wifi/WifiUtils.java @@ -93,6 +93,7 @@ public class WifiUtils { StringBuilder visibility = new StringBuilder(); StringBuilder scans24GHz = new StringBuilder(); StringBuilder scans5GHz = new StringBuilder(); + StringBuilder scans60GHz = new StringBuilder(); String bssid = null; if (accessPoint.isActive() && info != null) { @@ -115,9 +116,11 @@ public class WifiUtils { int maxRssi5 = INVALID_RSSI; int maxRssi24 = INVALID_RSSI; + int maxRssi60 = INVALID_RSSI; final int maxDisplayedScans = 4; int num5 = 0; // number of scanned BSSID on 5GHz band int num24 = 0; // number of scanned BSSID on 2.4Ghz band + int num60 = 0; // number of scanned BSSID on 60Ghz band int numBlockListed = 0; // TODO: sort list by RSSI or age @@ -152,6 +155,19 @@ public class WifiUtils { verboseScanResultSummary(accessPoint, result, bssid, nowMs)); } + } else if (result.frequency >= AccessPoint.LOWER_FREQ_60GHZ + && result.frequency <= AccessPoint.HIGHER_FREQ_60GHZ) { + // Strictly speaking: [60000, 61000] + num60++; + + if (result.level > maxRssi60) { + maxRssi60 = result.level; + } + if (num60 <= maxDisplayedScans) { + scans60GHz.append( + verboseScanResultSummary(accessPoint, result, bssid, + nowMs)); + } } } visibility.append(" ["); @@ -170,6 +186,14 @@ public class WifiUtils { } visibility.append(scans5GHz.toString()); } + visibility.append(";"); + if (num60 > 0) { + visibility.append("(").append(num60).append(")"); + if (num60 > maxDisplayedScans) { + visibility.append("max=").append(maxRssi60).append(","); + } + visibility.append(scans60GHz.toString()); + } if (numBlockListed > 0) { visibility.append("!").append(numBlockListed); } diff --git a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProtoDumpUtil.java b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProtoDumpUtil.java index a29314817a8f..fbd88763fff4 100644 --- a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProtoDumpUtil.java +++ b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProtoDumpUtil.java @@ -58,10 +58,14 @@ class SettingsProtoDumpUtil { ConfigSettingsProto.CONNECTIVITY_SETTINGS); namespaceToFieldMap.put(DeviceConfig.NAMESPACE_CONTENT_CAPTURE, ConfigSettingsProto.CONTENT_CAPTURE_SETTINGS); + namespaceToFieldMap.put(DeviceConfig.NAMESPACE_DEVICE_IDLE, + ConfigSettingsProto.DEVICE_IDLE_SETTINGS); namespaceToFieldMap.put(DeviceConfig.NAMESPACE_GAME_DRIVER, ConfigSettingsProto.GAME_DRIVER_SETTINGS); namespaceToFieldMap.put(DeviceConfig.NAMESPACE_INPUT_NATIVE_BOOT, ConfigSettingsProto.INPUT_NATIVE_BOOT_SETTINGS); + namespaceToFieldMap.put(DeviceConfig.NAMESPACE_JOB_SCHEDULER, + ConfigSettingsProto.JOB_SCHEDULER_SETTINGS); namespaceToFieldMap.put(DeviceConfig.NAMESPACE_NETD_NATIVE, ConfigSettingsProto.NETD_NATIVE_SETTINGS); namespaceToFieldMap.put(DeviceConfig.NAMESPACE_PRIVACY, @@ -564,9 +568,6 @@ class SettingsProtoDumpUtil { Settings.Global.DEVICE_PROVISIONING_MOBILE_DATA_ENABLED, GlobalSettingsProto.Device.PROVISIONING_MOBILE_DATA_ENABLED); dumpSetting(s, p, - Settings.Global.DEVICE_IDLE_CONSTANTS, - GlobalSettingsProto.Device.IDLE_CONSTANTS); - dumpSetting(s, p, Settings.Global.DEVICE_POLICY_CONSTANTS, GlobalSettingsProto.Device.POLICY_CONSTANTS); dumpSetting(s, p, diff --git a/packages/SettingsProvider/test/src/android/provider/SettingsBackupTest.java b/packages/SettingsProvider/test/src/android/provider/SettingsBackupTest.java index f219aecfc9d9..d8f772d7f440 100644 --- a/packages/SettingsProvider/test/src/android/provider/SettingsBackupTest.java +++ b/packages/SettingsProvider/test/src/android/provider/SettingsBackupTest.java @@ -230,7 +230,6 @@ public class SettingsBackupTest { Settings.Global.DEVELOPMENT_ENABLE_SIZECOMPAT_FREEFORM, Settings.Global.DEVELOPMENT_RENDER_SHADOWS_IN_COMPOSITOR, Settings.Global.DEVICE_DEMO_MODE, - Settings.Global.DEVICE_IDLE_CONSTANTS, Settings.Global.BATTERY_SAVER_ADAPTIVE_CONSTANTS, Settings.Global.BATTERY_SAVER_CONSTANTS, Settings.Global.BATTERY_TIP_CONSTANTS, diff --git a/packages/SystemUI/AndroidManifest.xml b/packages/SystemUI/AndroidManifest.xml index 6db3d0b8dff2..06a97b17a73c 100644 --- a/packages/SystemUI/AndroidManifest.xml +++ b/packages/SystemUI/AndroidManifest.xml @@ -390,7 +390,7 @@ </activity-alias> <activity - android:name=".stackdivider.ForcedResizableInfoActivity" + android:name="com.android.wm.shell.splitscreen.ForcedResizableInfoActivity" android:theme="@style/ForcedResizableTheme" android:excludeFromRecents="true" android:stateNotNeeded="true" @@ -711,10 +711,9 @@ <service android:name=".controls.controller.AuxiliaryPersistenceWrapper$DeletionJobService" android:permission="android.permission.BIND_JOB_SERVICE"/> - <!-- started from ControlsFavoritingActivity --> + <!-- started from ControlsRequestReceiver --> <activity android:name=".controls.management.ControlsRequestDialog" - android:exported="true" android:theme="@style/Theme.ControlsRequestDialog" android:finishOnCloseSystemDialogs="true" android:showForAllUsers="true" diff --git a/packages/SystemUI/README.md b/packages/SystemUI/README.md index bd93c396aa16..ee8d02301d5d 100644 --- a/packages/SystemUI/README.md +++ b/packages/SystemUI/README.md @@ -111,10 +111,6 @@ Plays ringtones. Shows UI for keyboard shortcuts (triggered by keyboard shortcut). -### [com.android.systemui.onehanded.OneHandedUI](/packages/SystemUI/src/com/android/systemui/onehanded/OneHandedUI.java) - -Shows the overlay controls when One handed is triggered. - ### [com.android.systemui.shortcut.ShortcutKeyDispatcher](/packages/SystemUI/src/com/android/systemui/shortcut/ShortcutKeyDispatcher.java) Dispatches shortcut to System UI components. diff --git a/packages/SystemUI/docs/camera.md b/packages/SystemUI/docs/camera.md new file mode 100644 index 000000000000..7a7a5aa3eb7f --- /dev/null +++ b/packages/SystemUI/docs/camera.md @@ -0,0 +1,33 @@ +# How double-click power launches the camera + +_as of august 2020_ + + +## Sequence of events + + + +1. [PhoneWindowManager.java](/services/core/java/com/android/server/policy/PhoneWindowManager.java) is responsible for all power button presses (see `interceptPowerKeyDown`). +2. Even though PWMgr has a lot of logic to detect all manner of power button multipresses and gestures, it also checks with GestureLauncherService, which is also [offered the chance](/services/core/java/com/android/server/policy/PhoneWindowManager.java#943) to [intercept](/services/core/java/com/android/server/GestureLauncherService.java#358) the power key. +3. GLS is responsible for the camera timeout, and if it detects one, it [forwards it to the StatusBarManagerService](/services/core/java/com/android/server/GestureLauncherService.java#475) (which hands it off to SystemUI). +4. Inside SystemUI, [onCameraLaunchDetected](/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java#3927) looks at the keyguard state and determines + 1. whether the camera is even allowed + 2. whether the screen is on; if not, we need to delay until that happens + 3. whether the device is locked (defined as "keyuguard is showing"). +5. If the device is unlocked (no keyguard), the camera is launched immediately. [Callsite](/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java#3949). +6. If the keyguard is up, however, [KeyguardBottomAreaView.launchCamera](/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java#477) takes over to handle the "secure camera" (a different intent, usually directing to the same app, but giving that app the cue to not allow access to the photo roll, etc). +7. If the intent [would have to launch a resolver](/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java#480) (the user has multiple cameras installed and hasn’t chosen one to always launch for the `SECURE_CAMERA_INTENT`), + 1. In order to show the resolver, the lockscreen "bouncer" (authentication method) [is first presented](/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java#523). +8. Otherwise (just one secure camera), [it is launched](/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java#501) (with some window animation gymnastics). + + +## Which intent launches? + + + +* If the keyguard is not showing (device is unlocked) + * `KeyguardBottomAreaView.INSECURE_CAMERA_INTENT`, defined to be `MediaStore.INTENT_ACTION_STILL_IMAGE_CAMERA`. + * [Callsite](/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java#3950) in StatusBar.java. +* If the keyguard is showing (device locked) + * [KeyguardBottomAreaView.getCameraIntent()](/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java#366) is consulted, which allows the "keyguard right button" (which we don’t actually show) to control the camera intent. The [default implementation](/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java#831) returns one of `KeyguardBottomAreaView.INSECURE_CAMERA_INTENT` or `KeyguardBottomAreaView.SECURE_CAMERA_INTENT`, which are `MediaStore.INTENT_ACTION_STILL_IMAGE_CAMERA` and `MediaStore.INTENT_ACTION_STILL_IMAGE_CAMERA_SECURE`, respectively. + * [Callsite](/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java#523) in KeyguardBottomAreaView.java. diff --git a/packages/SystemUI/res-keyguard/values-ar/strings.xml b/packages/SystemUI/res-keyguard/values-ar/strings.xml index 6d86a78360d8..65e3f0dbd176 100644 --- a/packages/SystemUI/res-keyguard/values-ar/strings.xml +++ b/packages/SystemUI/res-keyguard/values-ar/strings.xml @@ -112,7 +112,7 @@ <string name="kg_pin_accepted" msgid="1625501841604389716">"تم قبول الرمز"</string> <string name="keyguard_carrier_default" msgid="6359808469637388586">"لا تتوفر خدمة."</string> <string name="accessibility_ime_switch_button" msgid="9082358310194861329">"تبديل أسلوب الإدخال"</string> - <string name="airplane_mode" msgid="2528005343938497866">"وضع الطائرة"</string> + <string name="airplane_mode" msgid="2528005343938497866">"وضع الطيران"</string> <string name="kg_prompt_reason_restart_pattern" msgid="4720554342633852066">"يجب رسم النقش بعد إعادة تشغيل الجهاز"</string> <string name="kg_prompt_reason_restart_pin" msgid="1587671566498057656">"يجب إدخال رقم التعريف الشخصي بعد إعادة تشغيل الجهاز"</string> <string name="kg_prompt_reason_restart_password" msgid="8061279087240952002">"يجب إدخال كلمة المرور بعد إعادة تشغيل الجهاز"</string> diff --git a/packages/SystemUI/res/drawable-mcc310-mnc004/ic_5g_plus_mobiledata.xml b/packages/SystemUI/res/drawable-mcc310-mnc004/ic_5g_plus_mobiledata.xml new file mode 100644 index 000000000000..998db3b44b19 --- /dev/null +++ b/packages/SystemUI/res/drawable-mcc310-mnc004/ic_5g_plus_mobiledata.xml @@ -0,0 +1,36 @@ +<!-- + Copyright (C) 2020 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:viewportWidth="22" + android:viewportHeight="17" + android:width="22dp" + android:height="17dp"> + <group> + <group> + <path android:fillColor="#FF000000" + android:pathData="M19.98,3.54v2.81c0,0.47 -0.15,0.84 -0.44,1.11s-0.69,0.41 -1.2,0.41c-0.5,0 -0.89,-0.13 -1.19,-0.4s-0.44,-0.63 -0.45,-1.09V3.54h0.88v2.82c0,0.28 0.07,0.48 0.2,0.61c0.13,0.13 0.32,0.19 0.56,0.19c0.49,0 0.75,-0.26 0.75,-0.78V3.54H19.98z"/> + <path android:fillColor="#FF000000" + android:pathData="M19.42,12.25l0.57,-3.04h0.88l-0.95,4.27h-0.88l-0.69,-2.85l-0.69,2.85h-0.88l-0.95,-4.27h0.88l0.58,3.03l0.7,-3.03h0.74L19.42,12.25z"/> + </group> + <group> + <path android:fillColor="#FF000000" + android:pathData="M0.94,8.49l0.43,-4.96H5.7v1.17H2.39L2.15,7.41c0.41,-0.29 0.85,-0.43 1.33,-0.43c0.77,0 1.38,0.3 1.83,0.9c0.44,0.6 0.66,1.41 0.66,2.43c0,1.03 -0.24,1.84 -0.72,2.43c-0.48,0.59 -1.14,0.88 -1.98,0.88c-0.75,0 -1.36,-0.24 -1.83,-0.73c-0.47,-0.49 -0.74,-1.16 -0.81,-2.02h1.13c0.07,0.57 0.23,1 0.49,1.29c0.26,0.29 0.59,0.43 1.01,0.43c0.47,0 0.84,-0.2 1.1,-0.61c0.26,-0.41 0.4,-0.96 0.4,-1.65c0,-0.65 -0.14,-1.18 -0.43,-1.59C4.05,8.32 3.67,8.11 3.19,8.11c-0.4,0 -0.72,0.1 -0.96,0.31L1.9,8.75L0.94,8.49z"/> + </group> + <path android:fillColor="#FF000000" + android:pathData="M13.86,12.24l-0.22,0.27c-0.63,0.73 -1.55,1.1 -2.76,1.1c-1.08,0 -1.92,-0.36 -2.53,-1.07c-0.61,-0.71 -0.93,-1.72 -0.94,-3.02V7.56c0,-1.39 0.28,-2.44 0.84,-3.13c0.56,-0.7 1.39,-1.04 2.51,-1.04c0.95,0 1.69,0.26 2.22,0.79c0.54,0.53 0.83,1.28 0.89,2.26h-1.25c-0.05,-0.62 -0.22,-1.1 -0.52,-1.45c-0.29,-0.35 -0.74,-0.52 -1.34,-0.52c-0.72,0 -1.24,0.23 -1.57,0.7C8.85,5.63 8.68,6.37 8.66,7.4v2.03c0,1 0.19,1.77 0.57,2.31c0.38,0.54 0.93,0.8 1.65,0.8c0.67,0 1.19,-0.16 1.54,-0.49l0.18,-0.17V9.59h-1.82V8.52h3.07V12.24z"/> + </group> +</vector> + diff --git a/packages/SystemUI/res/drawable-mcc311-mnc480/ic_5g_plus_mobiledata.xml b/packages/SystemUI/res/drawable-mcc311-mnc480/ic_5g_plus_mobiledata.xml new file mode 100644 index 000000000000..998db3b44b19 --- /dev/null +++ b/packages/SystemUI/res/drawable-mcc311-mnc480/ic_5g_plus_mobiledata.xml @@ -0,0 +1,36 @@ +<!-- + Copyright (C) 2020 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:viewportWidth="22" + android:viewportHeight="17" + android:width="22dp" + android:height="17dp"> + <group> + <group> + <path android:fillColor="#FF000000" + android:pathData="M19.98,3.54v2.81c0,0.47 -0.15,0.84 -0.44,1.11s-0.69,0.41 -1.2,0.41c-0.5,0 -0.89,-0.13 -1.19,-0.4s-0.44,-0.63 -0.45,-1.09V3.54h0.88v2.82c0,0.28 0.07,0.48 0.2,0.61c0.13,0.13 0.32,0.19 0.56,0.19c0.49,0 0.75,-0.26 0.75,-0.78V3.54H19.98z"/> + <path android:fillColor="#FF000000" + android:pathData="M19.42,12.25l0.57,-3.04h0.88l-0.95,4.27h-0.88l-0.69,-2.85l-0.69,2.85h-0.88l-0.95,-4.27h0.88l0.58,3.03l0.7,-3.03h0.74L19.42,12.25z"/> + </group> + <group> + <path android:fillColor="#FF000000" + android:pathData="M0.94,8.49l0.43,-4.96H5.7v1.17H2.39L2.15,7.41c0.41,-0.29 0.85,-0.43 1.33,-0.43c0.77,0 1.38,0.3 1.83,0.9c0.44,0.6 0.66,1.41 0.66,2.43c0,1.03 -0.24,1.84 -0.72,2.43c-0.48,0.59 -1.14,0.88 -1.98,0.88c-0.75,0 -1.36,-0.24 -1.83,-0.73c-0.47,-0.49 -0.74,-1.16 -0.81,-2.02h1.13c0.07,0.57 0.23,1 0.49,1.29c0.26,0.29 0.59,0.43 1.01,0.43c0.47,0 0.84,-0.2 1.1,-0.61c0.26,-0.41 0.4,-0.96 0.4,-1.65c0,-0.65 -0.14,-1.18 -0.43,-1.59C4.05,8.32 3.67,8.11 3.19,8.11c-0.4,0 -0.72,0.1 -0.96,0.31L1.9,8.75L0.94,8.49z"/> + </group> + <path android:fillColor="#FF000000" + android:pathData="M13.86,12.24l-0.22,0.27c-0.63,0.73 -1.55,1.1 -2.76,1.1c-1.08,0 -1.92,-0.36 -2.53,-1.07c-0.61,-0.71 -0.93,-1.72 -0.94,-3.02V7.56c0,-1.39 0.28,-2.44 0.84,-3.13c0.56,-0.7 1.39,-1.04 2.51,-1.04c0.95,0 1.69,0.26 2.22,0.79c0.54,0.53 0.83,1.28 0.89,2.26h-1.25c-0.05,-0.62 -0.22,-1.1 -0.52,-1.45c-0.29,-0.35 -0.74,-0.52 -1.34,-0.52c-0.72,0 -1.24,0.23 -1.57,0.7C8.85,5.63 8.68,6.37 8.66,7.4v2.03c0,1 0.19,1.77 0.57,2.31c0.38,0.54 0.93,0.8 1.65,0.8c0.67,0 1.19,-0.16 1.54,-0.49l0.18,-0.17V9.59h-1.82V8.52h3.07V12.24z"/> + </group> +</vector> + diff --git a/packages/SystemUI/res/layout-land-television/volume_dialog_row.xml b/packages/SystemUI/res/layout-land-television/volume_dialog_row.xml index 708dfd01975a..d28d5664d725 100644 --- a/packages/SystemUI/res/layout-land-television/volume_dialog_row.xml +++ b/packages/SystemUI/res/layout-land-television/volume_dialog_row.xml @@ -37,6 +37,7 @@ android:layout_height="@dimen/tv_volume_dialog_bubble_size" android:maxLength="2" android:gravity="center" + android:fontFeatureSettings="tnum" android:background="@drawable/tv_volume_dialog_circle" android:textSize="@dimen/tv_volume_number_text_size" android:textColor="@color/accent_tint_color_selector"/> diff --git a/packages/SystemUI/res/layout/media_view.xml b/packages/SystemUI/res/layout/media_view.xml index ed870f8bb2ef..170f2c4e0bea 100644 --- a/packages/SystemUI/res/layout/media_view.xml +++ b/packages/SystemUI/res/layout/media_view.xml @@ -166,8 +166,7 @@ android:layout_height="wrap_content" android:clickable="true" android:maxHeight="@dimen/qs_media_enabled_seekbar_height" - android:paddingTop="16dp" - android:paddingBottom="16dp" + android:paddingVertical="@dimen/qs_media_enabled_seekbar_vertical_padding" android:thumbTint="@color/media_primary_text" android:progressTint="@color/media_seekbar_progress" android:progressBackgroundTint="@color/media_disabled" diff --git a/packages/SystemUI/res/values-af/strings.xml b/packages/SystemUI/res/values-af/strings.xml index 316fa8aac5e6..eae2cbb332df 100644 --- a/packages/SystemUI/res/values-af/strings.xml +++ b/packages/SystemUI/res/values-af/strings.xml @@ -879,17 +879,6 @@ </string-array> <string name="tuner_low_priority" msgid="8412666814123009820">"Wys laeprioriteit-kennisgewingikone"</string> <string name="other" msgid="429768510980739978">"Ander"</string> - <string name="accessibility_divider" msgid="2830785970889237307">"Skermverdeler"</string> - <string name="accessibility_action_divider_left_full" msgid="7598733539422375847">"Volskerm links"</string> - <string name="accessibility_action_divider_left_70" msgid="4919312892541727761">"Links 70%"</string> - <string name="accessibility_action_divider_left_50" msgid="3664701169564893826">"Links 50%"</string> - <string name="accessibility_action_divider_left_30" msgid="4358145268046362088">"Links 30%"</string> - <string name="accessibility_action_divider_right_full" msgid="8576057422864896305">"Volskerm regs"</string> - <string name="accessibility_action_divider_top_full" msgid="4243901660795169777">"Volskerm bo"</string> - <string name="accessibility_action_divider_top_70" msgid="6941226213260515072">"Bo 70%"</string> - <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Bo 50%"</string> - <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Bo 30%"</string> - <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Volskerm onder"</string> <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Posisie <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Dubbeltik om te wysig."</string> <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Dubbeltik om by te voeg."</string> <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Skuif <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string> @@ -898,10 +887,6 @@ <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Skuif <xliff:g id="TILE_NAME">%1$s</xliff:g> na posisie <xliff:g id="POSITION">%2$d</xliff:g>"</string> <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Kitsinstellingswysiger."</string> <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g>-kennisgewing: <xliff:g id="ID_2">%2$s</xliff:g>"</string> - <string name="dock_forced_resizable" msgid="4689301323912928801">"Program sal dalk nie met verdeelde skerm werk nie."</string> - <string name="dock_non_resizeble_failed_to_dock_text" msgid="7284915968096153808">"Program steun nie verdeelde skerm nie."</string> - <string name="forced_resizable_secondary_display" msgid="522558907654394940">"Program sal dalk nie op \'n sekondêre skerm werk nie."</string> - <string name="activity_launch_on_secondary_display_failed_text" msgid="8446727617187998208">"Program steun nie begin op sekondêre skerms nie."</string> <string name="accessibility_quick_settings_settings" msgid="7098489591715844713">"Maak instellings oop."</string> <string name="accessibility_quick_settings_expand" msgid="2609275052412521467">"Maak kitsinstellings oop."</string> <string name="accessibility_quick_settings_collapse" msgid="4674876336725041982">"Maak kitsinstellings toe."</string> diff --git a/packages/SystemUI/res/values-am/strings.xml b/packages/SystemUI/res/values-am/strings.xml index e2a4dc6404d8..e8326a7b3293 100644 --- a/packages/SystemUI/res/values-am/strings.xml +++ b/packages/SystemUI/res/values-am/strings.xml @@ -879,17 +879,6 @@ </string-array> <string name="tuner_low_priority" msgid="8412666814123009820">"አነስተኛ ቅድሚያ ያላቸው የማሳወቂያ አዶዎችን አሳይ"</string> <string name="other" msgid="429768510980739978">"ሌላ"</string> - <string name="accessibility_divider" msgid="2830785970889237307">"የተከፈለ የማያ ገጽ ከፋይ"</string> - <string name="accessibility_action_divider_left_full" msgid="7598733539422375847">"የግራ ሙሉ ማያ ገጽ"</string> - <string name="accessibility_action_divider_left_70" msgid="4919312892541727761">"ግራ 70%"</string> - <string name="accessibility_action_divider_left_50" msgid="3664701169564893826">"ግራ 50%"</string> - <string name="accessibility_action_divider_left_30" msgid="4358145268046362088">"ግራ 30%"</string> - <string name="accessibility_action_divider_right_full" msgid="8576057422864896305">"የቀኝ ሙሉ ማያ ገጽ"</string> - <string name="accessibility_action_divider_top_full" msgid="4243901660795169777">"የላይ ሙሉ ማያ ገጽ"</string> - <string name="accessibility_action_divider_top_70" msgid="6941226213260515072">"ከላይ 70%"</string> - <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"ከላይ 50%"</string> - <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"ከላይ 30%"</string> - <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"የታች ሙሉ ማያ ገጽ"</string> <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"ቦታ <xliff:g id="POSITION">%1$d</xliff:g>፣ <xliff:g id="TILE_NAME">%2$s</xliff:g>። ለማርትዕ ሁለቴ መታ ያድርጉ።"</string> <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>። ለማከል ሁለቴ መታ ያድርጉ።"</string> <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"<xliff:g id="TILE_NAME">%1$s</xliff:g>ን ይውሰዱ"</string> @@ -898,10 +887,6 @@ <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"<xliff:g id="TILE_NAME">%1$s</xliff:g>ን ወደ አቀማመጥ <xliff:g id="POSITION">%2$d</xliff:g> አንቀሳቅስ"</string> <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"የፈጣን ቅንብሮች አርታዒ።"</string> <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"የ<xliff:g id="ID_1">%1$s</xliff:g> ማሳወቂያ፦ <xliff:g id="ID_2">%2$s</xliff:g>"</string> - <string name="dock_forced_resizable" msgid="4689301323912928801">"መተግበሪያ ከተከፈለ ማያ ገጽ ጋር ላይሠራ ይችላል"</string> - <string name="dock_non_resizeble_failed_to_dock_text" msgid="7284915968096153808">"መተግበሪያው የተከፈለ ማያ ገጽን አይደግፍም።"</string> - <string name="forced_resizable_secondary_display" msgid="522558907654394940">"መተግበሪያ በሁለተኛ ማሳያ ላይ ላይሠራ ይችላል።"</string> - <string name="activity_launch_on_secondary_display_failed_text" msgid="8446727617187998208">"መተግበሪያ በሁለተኛ ማሳያዎች ላይ ማስጀመርን አይደግፍም።"</string> <string name="accessibility_quick_settings_settings" msgid="7098489591715844713">"ቅንብሮችን ክፈት።"</string> <string name="accessibility_quick_settings_expand" msgid="2609275052412521467">"ፈጣን ቅንብሮችን ክፈት።"</string> <string name="accessibility_quick_settings_collapse" msgid="4674876336725041982">"ፈጣን ቅንብሮችን ዝጋ።"</string> diff --git a/packages/SystemUI/res/values-ar/strings.xml b/packages/SystemUI/res/values-ar/strings.xml index b33c6c57f905..b020f17dc612 100644 --- a/packages/SystemUI/res/values-ar/strings.xml +++ b/packages/SystemUI/res/values-ar/strings.xml @@ -232,7 +232,7 @@ <string name="not_default_data_content_description" msgid="6757881730711522517">"لم يتم الضبط على استخدام البيانات"</string> <string name="cell_data_off" msgid="4886198950247099526">"غير مفعّلة"</string> <string name="accessibility_bluetooth_tether" msgid="6327291292208790599">"التوصيل عبر البلوتوث"</string> - <string name="accessibility_airplane_mode" msgid="1899529214045998505">"وضع الطائرة."</string> + <string name="accessibility_airplane_mode" msgid="1899529214045998505">"وضع الطيران."</string> <string name="accessibility_vpn_on" msgid="8037549696057288731">"الشبكة الافتراضية الخاصة (VPN) قيد التفعيل."</string> <string name="accessibility_no_sims" msgid="5711270400476534667">"ليس هناك شريحة SIM."</string> <string name="carrier_network_change_mode" msgid="5174141476991149918">"جارٍ تغيير شبكة مشغِّل شبكة الجوّال."</string> @@ -267,10 +267,10 @@ <string name="accessibility_quick_settings_wifi_changed_on" msgid="1490362586009027611">"تم تفعيل Wifi."</string> <string name="accessibility_quick_settings_mobile" msgid="1817825313718492906">"الجوّال <xliff:g id="SIGNAL">%1$s</xliff:g>. <xliff:g id="TYPE">%2$s</xliff:g>. <xliff:g id="NETWORK">%3$s</xliff:g>."</string> <string name="accessibility_quick_settings_battery" msgid="533594896310663853">"البطارية <xliff:g id="STATE">%s</xliff:g>."</string> - <string name="accessibility_quick_settings_airplane_off" msgid="1275658769368793228">"إيقاف وضع الطائرة."</string> - <string name="accessibility_quick_settings_airplane_on" msgid="8106176561295294255">"تفعيل وضع الطائرة."</string> - <string name="accessibility_quick_settings_airplane_changed_off" msgid="8880183481476943754">"تم إيقاف وضع الطائرة."</string> - <string name="accessibility_quick_settings_airplane_changed_on" msgid="6327378061894076288">"تم تفعيل وضع الطائرة."</string> + <string name="accessibility_quick_settings_airplane_off" msgid="1275658769368793228">"إيقاف وضع الطيران."</string> + <string name="accessibility_quick_settings_airplane_on" msgid="8106176561295294255">"تفعيل وضع الطيران."</string> + <string name="accessibility_quick_settings_airplane_changed_off" msgid="8880183481476943754">"تم إيقاف وضع الطيران."</string> + <string name="accessibility_quick_settings_airplane_changed_on" msgid="6327378061894076288">"تم تفعيل وضع الطيران."</string> <string name="accessibility_quick_settings_dnd_none_on" msgid="3235552940146035383">"كتم الصوت تمامًا"</string> <string name="accessibility_quick_settings_dnd_alarms_on" msgid="3375848309132140014">"المنبِّهات فقط"</string> <string name="accessibility_quick_settings_dnd" msgid="2415967452264206047">"عدم الإزعاج"</string> @@ -664,7 +664,7 @@ <string name="status_bar_ethernet" msgid="5690979758988647484">"إيثرنت"</string> <string name="status_bar_alarm" msgid="87160847643623352">"المنبّه"</string> <string name="status_bar_work" msgid="5238641949837091056">"الملف الشخصي للعمل"</string> - <string name="status_bar_airplane" msgid="4848702508684541009">"وضع الطائرة"</string> + <string name="status_bar_airplane" msgid="4848702508684541009">"وضع الطيران"</string> <string name="add_tile" msgid="6239678623873086686">"إضافة فئة"</string> <string name="broadcast_tile" msgid="5224010633596487481">"إرسال فئة"</string> <string name="zen_alarm_warning_indef" msgid="5252866591716504287">"لن تسمع المنبّه القادم في <xliff:g id="WHEN">%1$s</xliff:g> إلا إذا أوقفت هذا قبل الموعد"</string> @@ -899,17 +899,6 @@ </string-array> <string name="tuner_low_priority" msgid="8412666814123009820">"إظهار رموز الإشعارات ذات الأولوية المنخفضة"</string> <string name="other" msgid="429768510980739978">"غير ذلك"</string> - <string name="accessibility_divider" msgid="2830785970889237307">"أداة تقسيم الشاشة"</string> - <string name="accessibility_action_divider_left_full" msgid="7598733539422375847">"عرض النافذة اليسرى بملء الشاشة"</string> - <string name="accessibility_action_divider_left_70" msgid="4919312892541727761">"ضبط حجم النافذة اليسرى ليكون ٧٠%"</string> - <string name="accessibility_action_divider_left_50" msgid="3664701169564893826">"ضبط حجم النافذة اليسرى ليكون ٥٠%"</string> - <string name="accessibility_action_divider_left_30" msgid="4358145268046362088">"ضبط حجم النافذة اليسرى ليكون ٣٠%"</string> - <string name="accessibility_action_divider_right_full" msgid="8576057422864896305">"عرض النافذة اليمنى بملء الشاشة"</string> - <string name="accessibility_action_divider_top_full" msgid="4243901660795169777">"عرض النافذة العلوية بملء الشاشة"</string> - <string name="accessibility_action_divider_top_70" msgid="6941226213260515072">"ضبط حجم النافذة العلوية ليكون ٧٠%"</string> - <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"ضبط حجم النافذة العلوية ليكون ٥٠%"</string> - <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"ضبط حجم النافذة العلوية ليكون ٣٠%"</string> - <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"عرض النافذة السفلية بملء الشاشة"</string> <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"الموضع <xliff:g id="POSITION">%1$d</xliff:g>، <xliff:g id="TILE_NAME">%2$s</xliff:g>. انقر مرّتين للتعديل."</string> <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. انقر مرّتين للإضافة."</string> <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"نقل <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string> @@ -918,10 +907,6 @@ <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"نقل <xliff:g id="TILE_NAME">%1$s</xliff:g> إلى الموضع <xliff:g id="POSITION">%2$d</xliff:g>"</string> <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"برنامج تعديل الإعدادات السريعة."</string> <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"إشعار <xliff:g id="ID_1">%1$s</xliff:g>: <xliff:g id="ID_2">%2$s</xliff:g>"</string> - <string name="dock_forced_resizable" msgid="4689301323912928801">"يمكن ألا يعمل التطبيق مع وضع تقسيم الشاشة."</string> - <string name="dock_non_resizeble_failed_to_dock_text" msgid="7284915968096153808">"التطبيق لا يتيح تقسيم الشاشة."</string> - <string name="forced_resizable_secondary_display" msgid="522558907654394940">"قد لا يعمل التطبيق على شاشة عرض ثانوية."</string> - <string name="activity_launch_on_secondary_display_failed_text" msgid="8446727617187998208">"لا يمكن تشغيل التطبيق على شاشات عرض ثانوية."</string> <string name="accessibility_quick_settings_settings" msgid="7098489591715844713">"فتح الإعدادات."</string> <string name="accessibility_quick_settings_expand" msgid="2609275052412521467">"فتح الإعدادات السريعة."</string> <string name="accessibility_quick_settings_collapse" msgid="4674876336725041982">"إغلاق الإعدادات السريعة."</string> diff --git a/packages/SystemUI/res/values-as/strings.xml b/packages/SystemUI/res/values-as/strings.xml index 5a3c659727d3..31077dac8c41 100644 --- a/packages/SystemUI/res/values-as/strings.xml +++ b/packages/SystemUI/res/values-as/strings.xml @@ -879,17 +879,6 @@ </string-array> <string name="tuner_low_priority" msgid="8412666814123009820">"কম গুৰুত্বপূৰ্ণ জাননীৰ আইকনসমূহ দেখুৱাওক"</string> <string name="other" msgid="429768510980739978">"অন্যান্য"</string> - <string name="accessibility_divider" msgid="2830785970889237307">"স্প্লিট স্ক্ৰীণৰ বিভাজক"</string> - <string name="accessibility_action_divider_left_full" msgid="7598733539422375847">"বাওঁফালৰ স্ক্ৰীণখন সম্পূৰ্ণ স্ক্ৰীণ কৰক"</string> - <string name="accessibility_action_divider_left_70" msgid="4919312892541727761">"বাওঁফালৰ স্ক্ৰীণখন ৭০% কৰক"</string> - <string name="accessibility_action_divider_left_50" msgid="3664701169564893826">"বাওঁফালৰ স্ক্ৰীণখন ৫০% কৰক"</string> - <string name="accessibility_action_divider_left_30" msgid="4358145268046362088">"বাওঁফালৰ স্ক্ৰীণখন ৩০% কৰক"</string> - <string name="accessibility_action_divider_right_full" msgid="8576057422864896305">"সোঁফালৰ স্ক্ৰীণখন সম্পূৰ্ণ স্ক্ৰীণ কৰক"</string> - <string name="accessibility_action_divider_top_full" msgid="4243901660795169777">"শীৰ্ষ স্ক্ৰীণখন সম্পূৰ্ণ স্ক্ৰীণ কৰক"</string> - <string name="accessibility_action_divider_top_70" msgid="6941226213260515072">"শীর্ষ স্ক্ৰীণখন ৭০% কৰক"</string> - <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"শীর্ষ স্ক্ৰীণখন ৫০% কৰক"</string> - <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"শীর্ষ স্ক্ৰীণখন ৩০% কৰক"</string> - <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"তলৰ স্ক্ৰীণখন সম্পূৰ্ণ স্ক্ৰীণ কৰক"</string> <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"অৱস্থান <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>। সম্পাদনা কৰিবৰ বাবে দুবাৰ টিপক।"</string> <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>। যোগ কৰিবলৈ দুবাৰ টিপক।"</string> <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"<xliff:g id="TILE_NAME">%1$s</xliff:g> স্থানান্তৰ কৰক"</string> @@ -898,10 +887,6 @@ <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"<xliff:g id="TILE_NAME">%1$s</xliff:g>ক এই স্থান <xliff:g id="POSITION">%2$d</xliff:g>লৈ যাওক"</string> <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"ক্ষিপ্ৰ ছেটিংসমূহৰ সম্পাদক।"</string> <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g> জাননী: <xliff:g id="ID_2">%2$s</xliff:g>"</string> - <string name="dock_forced_resizable" msgid="4689301323912928801">"বিভাজিত স্ক্ৰীণৰ সৈতে এপে হয়তো কাম নকৰিব।"</string> - <string name="dock_non_resizeble_failed_to_dock_text" msgid="7284915968096153808">"এপটোৱে বিভাজিত স্ক্ৰীণ সমৰ্থন নকৰে।"</string> - <string name="forced_resizable_secondary_display" msgid="522558907654394940">"গৌণ ডিছপ্লেত এপে সঠিকভাৱে কাম নকৰিব পাৰে।"</string> - <string name="activity_launch_on_secondary_display_failed_text" msgid="8446727617187998208">"গৌণ ডিছপ্লেত এপ্ লঞ্চ কৰিব নোৱাৰি।"</string> <string name="accessibility_quick_settings_settings" msgid="7098489591715844713">"ছেটিংসমূহ খোলক।"</string> <string name="accessibility_quick_settings_expand" msgid="2609275052412521467">"ক্ষিপ্ৰ ছেটিংসমূহ খোলক।"</string> <string name="accessibility_quick_settings_collapse" msgid="4674876336725041982">"ক্ষিপ্ৰ ছেটিংসমূহ বন্ধ কৰক।"</string> diff --git a/packages/SystemUI/res/values-az/strings.xml b/packages/SystemUI/res/values-az/strings.xml index 40df8cd68bac..b5960668e8fe 100644 --- a/packages/SystemUI/res/values-az/strings.xml +++ b/packages/SystemUI/res/values-az/strings.xml @@ -879,17 +879,6 @@ </string-array> <string name="tuner_low_priority" msgid="8412666814123009820">"Aşağı prioritet bildiriş işarələrini göstərin"</string> <string name="other" msgid="429768510980739978">"Digər"</string> - <string name="accessibility_divider" msgid="2830785970889237307">"Bölünmüş ekran ayırıcısı"</string> - <string name="accessibility_action_divider_left_full" msgid="7598733539422375847">"Sol tam ekran"</string> - <string name="accessibility_action_divider_left_70" msgid="4919312892541727761">"Sol 70%"</string> - <string name="accessibility_action_divider_left_50" msgid="3664701169564893826">"Sol 50%"</string> - <string name="accessibility_action_divider_left_30" msgid="4358145268046362088">"Sol 30%"</string> - <string name="accessibility_action_divider_right_full" msgid="8576057422864896305">"Sağ tam ekran"</string> - <string name="accessibility_action_divider_top_full" msgid="4243901660795169777">"Yuxarı tam ekran"</string> - <string name="accessibility_action_divider_top_70" msgid="6941226213260515072">"Yuxarı 70%"</string> - <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Yuxarı 50%"</string> - <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Yuxarı 30%"</string> - <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Aşağı tam ekran"</string> <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"<xliff:g id="POSITION">%1$d</xliff:g> mövqeyi, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Redaktə etmək üçün iki dəfə tıklayın."</string> <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Əlavə etmək üçün iki dəfə tıklayın."</string> <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"<xliff:g id="TILE_NAME">%1$s</xliff:g> köçürün"</string> @@ -898,10 +887,6 @@ <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"<xliff:g id="POSITION">%2$d</xliff:g> pozisiyasına <xliff:g id="TILE_NAME">%1$s</xliff:g> köçürün"</string> <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Sürətli ayarlar redaktoru."</string> <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g> bildiriş: <xliff:g id="ID_2">%2$s</xliff:g>"</string> - <string name="dock_forced_resizable" msgid="4689301323912928801">"Tətbiq bölünmüş ekran ilə işləməyə bilər."</string> - <string name="dock_non_resizeble_failed_to_dock_text" msgid="7284915968096153808">"Tətbiq ekran bölünməsini dəstəkləmir."</string> - <string name="forced_resizable_secondary_display" msgid="522558907654394940">"Tətbiq ikinci ekranda işləməyə bilər."</string> - <string name="activity_launch_on_secondary_display_failed_text" msgid="8446727617187998208">"Tətbiq ikinci ekranda başlamağı dəstəkləmir."</string> <string name="accessibility_quick_settings_settings" msgid="7098489591715844713">"Ayarları açın."</string> <string name="accessibility_quick_settings_expand" msgid="2609275052412521467">"Cəld ayarları açın."</string> <string name="accessibility_quick_settings_collapse" msgid="4674876336725041982">"Cəld ayarları bağlayın."</string> diff --git a/packages/SystemUI/res/values-b+sr+Latn/strings.xml b/packages/SystemUI/res/values-b+sr+Latn/strings.xml index a9725f331856..aa141e637932 100644 --- a/packages/SystemUI/res/values-b+sr+Latn/strings.xml +++ b/packages/SystemUI/res/values-b+sr+Latn/strings.xml @@ -884,17 +884,6 @@ </string-array> <string name="tuner_low_priority" msgid="8412666814123009820">"Prikaži ikone obaveštenja niskog prioriteta"</string> <string name="other" msgid="429768510980739978">"Drugo"</string> - <string name="accessibility_divider" msgid="2830785970889237307">"Razdelnik podeljenog ekrana"</string> - <string name="accessibility_action_divider_left_full" msgid="7598733539422375847">"Režim celog ekrana za levi ekran"</string> - <string name="accessibility_action_divider_left_70" msgid="4919312892541727761">"Levi ekran 70%"</string> - <string name="accessibility_action_divider_left_50" msgid="3664701169564893826">"Levi ekran 50%"</string> - <string name="accessibility_action_divider_left_30" msgid="4358145268046362088">"Levi ekran 30%"</string> - <string name="accessibility_action_divider_right_full" msgid="8576057422864896305">"Režim celog ekrana za donji ekran"</string> - <string name="accessibility_action_divider_top_full" msgid="4243901660795169777">"Režim celog ekrana za gornji ekran"</string> - <string name="accessibility_action_divider_top_70" msgid="6941226213260515072">"Gornji ekran 70%"</string> - <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Gornji ekran 50%"</string> - <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Gornji ekran 30%"</string> - <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Režim celog ekrana za donji ekran"</string> <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"<xliff:g id="POSITION">%1$d</xliff:g>. pozicija, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Dvaput dodirnite da biste izmenili."</string> <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Dvaput dodirnite da biste dodali."</string> <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Premesti pločicu <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string> @@ -903,10 +892,6 @@ <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Premestite „<xliff:g id="TILE_NAME">%1$s</xliff:g>“ na poziciju <xliff:g id="POSITION">%2$d</xliff:g>"</string> <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Uređivač za Brza podešavanja."</string> <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"Obaveštenja za <xliff:g id="ID_1">%1$s</xliff:g>: <xliff:g id="ID_2">%2$s</xliff:g>"</string> - <string name="dock_forced_resizable" msgid="4689301323912928801">"Aplikacija možda neće funkcionisati sa podeljenim ekranom."</string> - <string name="dock_non_resizeble_failed_to_dock_text" msgid="7284915968096153808">"Aplikacija ne podržava podeljeni ekran."</string> - <string name="forced_resizable_secondary_display" msgid="522558907654394940">"Aplikacija možda neće funkcionisati na sekundarnom ekranu."</string> - <string name="activity_launch_on_secondary_display_failed_text" msgid="8446727617187998208">"Aplikacija ne podržava pokretanje na sekundarnim ekranima."</string> <string name="accessibility_quick_settings_settings" msgid="7098489591715844713">"Otvori Podešavanja."</string> <string name="accessibility_quick_settings_expand" msgid="2609275052412521467">"Otvori Brza podešavanja."</string> <string name="accessibility_quick_settings_collapse" msgid="4674876336725041982">"Zatvori Brza podešavanja."</string> diff --git a/packages/SystemUI/res/values-be/strings.xml b/packages/SystemUI/res/values-be/strings.xml index b4c5eba9f77b..194f92b633e4 100644 --- a/packages/SystemUI/res/values-be/strings.xml +++ b/packages/SystemUI/res/values-be/strings.xml @@ -889,17 +889,6 @@ </string-array> <string name="tuner_low_priority" msgid="8412666814123009820">"Паказваць значкі апавяшчэнняў з нізкім прыярытэтам"</string> <string name="other" msgid="429768510980739978">"Іншае"</string> - <string name="accessibility_divider" msgid="2830785970889237307">"Раздзяляльнік падзеленага экрана"</string> - <string name="accessibility_action_divider_left_full" msgid="7598733539422375847">"Левы экран – поўнаэкранны рэжым"</string> - <string name="accessibility_action_divider_left_70" msgid="4919312892541727761">"Левы экран – 70%"</string> - <string name="accessibility_action_divider_left_50" msgid="3664701169564893826">"Левы экран – 50%"</string> - <string name="accessibility_action_divider_left_30" msgid="4358145268046362088">"Левы экран – 30%"</string> - <string name="accessibility_action_divider_right_full" msgid="8576057422864896305">"Правы экран – поўнаэкранны рэжым"</string> - <string name="accessibility_action_divider_top_full" msgid="4243901660795169777">"Верхні экран – поўнаэкранны рэжым"</string> - <string name="accessibility_action_divider_top_70" msgid="6941226213260515072">"Верхні экран – 70%"</string> - <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Верхні экран – 50%"</string> - <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Верхні экран – 30%"</string> - <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Ніжні экран – поўнаэкранны рэжым"</string> <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Месца: <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Краніце двойчы, каб рэдагаваць."</string> <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Краніце двойчы, каб дадаць."</string> <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Перамясціць <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string> @@ -908,10 +897,6 @@ <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Перамясціць \"<xliff:g id="TILE_NAME">%1$s</xliff:g>\" у наступнае месца: <xliff:g id="POSITION">%2$d</xliff:g>"</string> <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Рэдактар хуткіх налад."</string> <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"Апавяшчэнне <xliff:g id="ID_1">%1$s</xliff:g>: <xliff:g id="ID_2">%2$s</xliff:g>"</string> - <string name="dock_forced_resizable" msgid="4689301323912928801">"Праграма можа не працаваць у рэжыме дзялення экрана."</string> - <string name="dock_non_resizeble_failed_to_dock_text" msgid="7284915968096153808">"Праграма не падтрымлівае функцыю дзялення экрана."</string> - <string name="forced_resizable_secondary_display" msgid="522558907654394940">"Праграма можа не працаваць на дадатковых экранах."</string> - <string name="activity_launch_on_secondary_display_failed_text" msgid="8446727617187998208">"Праграма не падтрымлівае запуск на дадатковых экранах."</string> <string name="accessibility_quick_settings_settings" msgid="7098489591715844713">"Адкрыць налады."</string> <string name="accessibility_quick_settings_expand" msgid="2609275052412521467">"Адкрыць хуткія налады."</string> <string name="accessibility_quick_settings_collapse" msgid="4674876336725041982">"Закрыць хуткія налады."</string> diff --git a/packages/SystemUI/res/values-bg/strings.xml b/packages/SystemUI/res/values-bg/strings.xml index 52e82869d575..02eea8abe4dd 100644 --- a/packages/SystemUI/res/values-bg/strings.xml +++ b/packages/SystemUI/res/values-bg/strings.xml @@ -879,17 +879,6 @@ </string-array> <string name="tuner_low_priority" msgid="8412666814123009820">"Показване на иконите за известията с нисък приоритет"</string> <string name="other" msgid="429768510980739978">"Друго"</string> - <string name="accessibility_divider" msgid="2830785970889237307">"Разделител в режима за разделен екран"</string> - <string name="accessibility_action_divider_left_full" msgid="7598733539422375847">"Ляв екран: Показване на цял екран"</string> - <string name="accessibility_action_divider_left_70" msgid="4919312892541727761">"Ляв екран: 70%"</string> - <string name="accessibility_action_divider_left_50" msgid="3664701169564893826">"Ляв екран: 50%"</string> - <string name="accessibility_action_divider_left_30" msgid="4358145268046362088">"Ляв екран: 30%"</string> - <string name="accessibility_action_divider_right_full" msgid="8576057422864896305">"Десен екран: Показване на цял екран"</string> - <string name="accessibility_action_divider_top_full" msgid="4243901660795169777">"Горен екран: Показване на цял екран"</string> - <string name="accessibility_action_divider_top_70" msgid="6941226213260515072">"Горен екран: 70%"</string> - <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Горен екран: 50%"</string> - <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Горен екран: 30%"</string> - <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Долен екран: Показване на цял екран"</string> <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Позиция <xliff:g id="POSITION">%1$d</xliff:g>, „<xliff:g id="TILE_NAME">%2$s</xliff:g>“. Докоснете двукратно, за да редактирате."</string> <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"„<xliff:g id="TILE_NAME">%1$s</xliff:g>“. Докоснете двукратно, за да добавите."</string> <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Преместване на „<xliff:g id="TILE_NAME">%1$s</xliff:g>“"</string> @@ -898,10 +887,6 @@ <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Преместете „<xliff:g id="TILE_NAME">%1$s</xliff:g>“ на позиция <xliff:g id="POSITION">%2$d</xliff:g>"</string> <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Редактор за бързи настройки."</string> <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"Известие от <xliff:g id="ID_1">%1$s</xliff:g>: <xliff:g id="ID_2">%2$s</xliff:g>"</string> - <string name="dock_forced_resizable" msgid="4689301323912928801">"Приложението може да не работи в режим на разделен екран."</string> - <string name="dock_non_resizeble_failed_to_dock_text" msgid="7284915968096153808">"Приложението не поддържа разделен екран."</string> - <string name="forced_resizable_secondary_display" msgid="522558907654394940">"Възможно е приложението да не работи на алтернативни дисплеи."</string> - <string name="activity_launch_on_secondary_display_failed_text" msgid="8446727617187998208">"Приложението не поддържа използването на алтернативни дисплеи."</string> <string name="accessibility_quick_settings_settings" msgid="7098489591715844713">"Отваряне на настройките."</string> <string name="accessibility_quick_settings_expand" msgid="2609275052412521467">"Отваряне на бързите настройки."</string> <string name="accessibility_quick_settings_collapse" msgid="4674876336725041982">"Затваряне на бързите настройки."</string> diff --git a/packages/SystemUI/res/values-bn/strings.xml b/packages/SystemUI/res/values-bn/strings.xml index d0de9cf03b38..96a7368b1dfd 100644 --- a/packages/SystemUI/res/values-bn/strings.xml +++ b/packages/SystemUI/res/values-bn/strings.xml @@ -879,17 +879,6 @@ </string-array> <string name="tuner_low_priority" msgid="8412666814123009820">"কম-গুরুত্বপূর্ণ বিজ্ঞপ্তির আইকন দেখুন"</string> <string name="other" msgid="429768510980739978">"অন্যান্য"</string> - <string name="accessibility_divider" msgid="2830785970889237307">"বিভক্ত-স্ক্রিন বিভাজক"</string> - <string name="accessibility_action_divider_left_full" msgid="7598733539422375847">"বাঁ দিকের অংশ নিয়ে পূর্ণ স্ক্রিন"</string> - <string name="accessibility_action_divider_left_70" msgid="4919312892541727761">"৭০% বাকি আছে"</string> - <string name="accessibility_action_divider_left_50" msgid="3664701169564893826">"৫০% বাকি আছে"</string> - <string name="accessibility_action_divider_left_30" msgid="4358145268046362088">"৩০% বাকি আছে"</string> - <string name="accessibility_action_divider_right_full" msgid="8576057422864896305">"ডান দিকের অংশ নিয়ে পূর্ণ স্ক্রিন"</string> - <string name="accessibility_action_divider_top_full" msgid="4243901660795169777">"উপর দিকের অংশ নিয়ে পূর্ণ স্ক্রিন"</string> - <string name="accessibility_action_divider_top_70" msgid="6941226213260515072">"শীর্ষ ৭০%"</string> - <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"শীর্ষ ৫০%"</string> - <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"শীর্ষ ৩০%"</string> - <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"নীচের অংশ নিয়ে পূর্ণ স্ক্রিন"</string> <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"<xliff:g id="POSITION">%1$d</xliff:g> লোকেশন, <xliff:g id="TILE_NAME">%2$s</xliff:g>৷ সম্পাদনা করতে দুবার আলতো চাপুন৷"</string> <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>৷ যোগ করতে দুবার আলতো চাপুন৷"</string> <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"<xliff:g id="TILE_NAME">%1$s</xliff:g> সরান"</string> @@ -898,10 +887,6 @@ <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"<xliff:g id="TILE_NAME">%1$s</xliff:g> <xliff:g id="POSITION">%2$d</xliff:g>-এ সরান"</string> <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"দ্রুত সেটিংস সম্পাদক৷"</string> <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g> বিজ্ঞপ্তি: <xliff:g id="ID_2">%2$s</xliff:g>"</string> - <string name="dock_forced_resizable" msgid="4689301323912928801">"অ্যাপ্লিকেশানটি বিভক্ত স্ক্রীনে কাজ নাও করতে পারে৷"</string> - <string name="dock_non_resizeble_failed_to_dock_text" msgid="7284915968096153808">"অ্যাপ্লিকেশান বিভক্ত-স্ক্রিন সমর্থন করে না৷"</string> - <string name="forced_resizable_secondary_display" msgid="522558907654394940">"সেকেন্ডারি ডিসপ্লেতে অ্যাপটি কাজ নাও করতে পারে।"</string> - <string name="activity_launch_on_secondary_display_failed_text" msgid="8446727617187998208">"সেকেন্ডারি ডিসপ্লেতে অ্যাপ লঞ্চ করা যাবে না।"</string> <string name="accessibility_quick_settings_settings" msgid="7098489591715844713">"সেটিংস খুলুন।"</string> <string name="accessibility_quick_settings_expand" msgid="2609275052412521467">"দ্রুত সেটিংস খুলুন৷"</string> <string name="accessibility_quick_settings_collapse" msgid="4674876336725041982">"দ্রুত সেটিংস বন্ধ করুন৷"</string> diff --git a/packages/SystemUI/res/values-bs/strings.xml b/packages/SystemUI/res/values-bs/strings.xml index 57b7945c7a8c..0a091aae70b9 100644 --- a/packages/SystemUI/res/values-bs/strings.xml +++ b/packages/SystemUI/res/values-bs/strings.xml @@ -884,17 +884,6 @@ </string-array> <string name="tuner_low_priority" msgid="8412666814123009820">"Prikaži ikone obavještenja niskog prioriteta"</string> <string name="other" msgid="429768510980739978">"Ostalo"</string> - <string name="accessibility_divider" msgid="2830785970889237307">"Razdjelnik ekrana"</string> - <string name="accessibility_action_divider_left_full" msgid="7598733539422375847">"Lijevo cijeli ekran"</string> - <string name="accessibility_action_divider_left_70" msgid="4919312892541727761">"Lijevo 70%"</string> - <string name="accessibility_action_divider_left_50" msgid="3664701169564893826">"Lijevo 50%"</string> - <string name="accessibility_action_divider_left_30" msgid="4358145268046362088">"Lijevo 30%"</string> - <string name="accessibility_action_divider_right_full" msgid="8576057422864896305">"Desno cijeli ekran"</string> - <string name="accessibility_action_divider_top_full" msgid="4243901660795169777">"Gore cijeli ekran"</string> - <string name="accessibility_action_divider_top_70" msgid="6941226213260515072">"Gore 70%"</string> - <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Gore 50%"</string> - <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Gore 30%"</string> - <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Donji ekran kao cijeli ekran"</string> <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Pozicija <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Dodirnite dvaput za uređivanje."</string> <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g> Dodirnite dvaput za dodavanje."</string> <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Pomjeri <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string> @@ -903,10 +892,6 @@ <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Premjesti <xliff:g id="TILE_NAME">%1$s</xliff:g> na poziciju <xliff:g id="POSITION">%2$d</xliff:g>"</string> <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Uređivanje brzih postavki"</string> <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g> obavještenje: <xliff:g id="ID_2">%2$s</xliff:g>"</string> - <string name="dock_forced_resizable" msgid="4689301323912928801">"Aplikacija možda neće raditi na podijeljenom ekranu"</string> - <string name="dock_non_resizeble_failed_to_dock_text" msgid="7284915968096153808">"Aplikacija ne podržava dijeljenje ekrana."</string> - <string name="forced_resizable_secondary_display" msgid="522558907654394940">"Aplikacija možda neće raditi na sekundarnom ekranu."</string> - <string name="activity_launch_on_secondary_display_failed_text" msgid="8446727617187998208">"Aplikacija ne podržava pokretanje na sekundarnim ekranima."</string> <string name="accessibility_quick_settings_settings" msgid="7098489591715844713">"Otvori postavke."</string> <string name="accessibility_quick_settings_expand" msgid="2609275052412521467">"Otvoriti brze postavke."</string> <string name="accessibility_quick_settings_collapse" msgid="4674876336725041982">"Zatvoriti brze postavke."</string> diff --git a/packages/SystemUI/res/values-ca/strings.xml b/packages/SystemUI/res/values-ca/strings.xml index 0489d18ff36b..d4e8befe3f4d 100644 --- a/packages/SystemUI/res/values-ca/strings.xml +++ b/packages/SystemUI/res/values-ca/strings.xml @@ -707,7 +707,7 @@ <string name="inline_turn_off_notifications" msgid="8543989584403106071">"Desactiva les notificacions"</string> <string name="inline_keep_showing_app" msgid="4393429060390649757">"Vols continuar rebent notificacions d\'aquesta aplicació?"</string> <string name="notification_silence_title" msgid="8608090968400832335">"Silenci"</string> - <string name="notification_alert_title" msgid="3656229781017543655">"Predeterminada"</string> + <string name="notification_alert_title" msgid="3656229781017543655">"Predeterminat"</string> <string name="notification_bubble_title" msgid="8330481035191903164">"Bombolla"</string> <string name="notification_automatic_title" msgid="3745465364578762652">"Automàtic"</string> <string name="notification_channel_summary_low" msgid="4860617986908931158">"Sense so ni vibració"</string> @@ -879,17 +879,6 @@ </string-array> <string name="tuner_low_priority" msgid="8412666814123009820">"Mostra les icones de notificació amb prioritat baixa"</string> <string name="other" msgid="429768510980739978">"Altres"</string> - <string name="accessibility_divider" msgid="2830785970889237307">"Divisor de pantalles"</string> - <string name="accessibility_action_divider_left_full" msgid="7598733539422375847">"Pantalla esquerra completa"</string> - <string name="accessibility_action_divider_left_70" msgid="4919312892541727761">"Pantalla esquerra al 70%"</string> - <string name="accessibility_action_divider_left_50" msgid="3664701169564893826">"Pantalla esquerra al 50%"</string> - <string name="accessibility_action_divider_left_30" msgid="4358145268046362088">"Pantalla esquerra al 30%"</string> - <string name="accessibility_action_divider_right_full" msgid="8576057422864896305">"Pantalla dreta completa"</string> - <string name="accessibility_action_divider_top_full" msgid="4243901660795169777">"Pantalla superior completa"</string> - <string name="accessibility_action_divider_top_70" msgid="6941226213260515072">"Pantalla superior al 70%"</string> - <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Pantalla superior al 50%"</string> - <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Pantalla superior al 30%"</string> - <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Pantalla inferior completa"</string> <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Posició <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Fes doble toc per editar-la."</string> <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Fes doble toc per afegir-ho."</string> <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Mou <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string> @@ -898,10 +887,6 @@ <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Mou <xliff:g id="TILE_NAME">%1$s</xliff:g> a la posició <xliff:g id="POSITION">%2$d</xliff:g>"</string> <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Editor de configuració ràpida."</string> <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"Notificació de <xliff:g id="ID_1">%1$s</xliff:g>: <xliff:g id="ID_2">%2$s</xliff:g>"</string> - <string name="dock_forced_resizable" msgid="4689301323912928801">"És possible que l\'aplicació no funcioni amb la pantalla dividida."</string> - <string name="dock_non_resizeble_failed_to_dock_text" msgid="7284915968096153808">"L\'aplicació no admet la pantalla dividida."</string> - <string name="forced_resizable_secondary_display" msgid="522558907654394940">"És possible que l\'aplicació no funcioni en una pantalla secundària."</string> - <string name="activity_launch_on_secondary_display_failed_text" msgid="8446727617187998208">"L\'aplicació no es pot obrir en pantalles secundàries."</string> <string name="accessibility_quick_settings_settings" msgid="7098489591715844713">"Obre la configuració."</string> <string name="accessibility_quick_settings_expand" msgid="2609275052412521467">"Obre la configuració ràpida."</string> <string name="accessibility_quick_settings_collapse" msgid="4674876336725041982">"Tanca la configuració ràpida."</string> diff --git a/packages/SystemUI/res/values-cs/strings.xml b/packages/SystemUI/res/values-cs/strings.xml index acb6637b68dc..239a0f6b3d53 100644 --- a/packages/SystemUI/res/values-cs/strings.xml +++ b/packages/SystemUI/res/values-cs/strings.xml @@ -889,17 +889,6 @@ </string-array> <string name="tuner_low_priority" msgid="8412666814123009820">"Zobrazit ikony oznámení s nízkou prioritou"</string> <string name="other" msgid="429768510980739978">"Jiné"</string> - <string name="accessibility_divider" msgid="2830785970889237307">"Čára rozdělující obrazovku"</string> - <string name="accessibility_action_divider_left_full" msgid="7598733539422375847">"Levá část na celou obrazovku"</string> - <string name="accessibility_action_divider_left_70" msgid="4919312892541727761">"70 % vlevo"</string> - <string name="accessibility_action_divider_left_50" msgid="3664701169564893826">"50 % vlevo"</string> - <string name="accessibility_action_divider_left_30" msgid="4358145268046362088">"30 % vlevo"</string> - <string name="accessibility_action_divider_right_full" msgid="8576057422864896305">"Pravá část na celou obrazovku"</string> - <string name="accessibility_action_divider_top_full" msgid="4243901660795169777">"Horní část na celou obrazovku"</string> - <string name="accessibility_action_divider_top_70" msgid="6941226213260515072">"70 % nahoře"</string> - <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"50 % nahoře"</string> - <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"30 % nahoře"</string> - <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Dolní část na celou obrazovku"</string> <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Pozice <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Dvojitým klepnutím ji upravíte."</string> <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Dlaždici přidáte dvojitým klepnutím."</string> <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Přesunout dlaždici <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string> @@ -908,10 +897,6 @@ <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Přesunout dlaždici <xliff:g id="TILE_NAME">%1$s</xliff:g> na pozici <xliff:g id="POSITION">%2$d</xliff:g>"</string> <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Editor rychlého nastavení"</string> <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"Oznámení aplikace <xliff:g id="ID_1">%1$s</xliff:g>: <xliff:g id="ID_2">%2$s</xliff:g>"</string> - <string name="dock_forced_resizable" msgid="4689301323912928801">"Aplikace v režimu rozdělené obrazovky nemusí fungovat."</string> - <string name="dock_non_resizeble_failed_to_dock_text" msgid="7284915968096153808">"Aplikace nepodporuje režim rozdělené obrazovky."</string> - <string name="forced_resizable_secondary_display" msgid="522558907654394940">"Aplikace na sekundárním displeji nemusí fungovat."</string> - <string name="activity_launch_on_secondary_display_failed_text" msgid="8446727617187998208">"Aplikace nepodporuje spuštění na sekundárních displejích."</string> <string name="accessibility_quick_settings_settings" msgid="7098489591715844713">"Otevřít nastavení."</string> <string name="accessibility_quick_settings_expand" msgid="2609275052412521467">"Otevřít rychlé nastavení."</string> <string name="accessibility_quick_settings_collapse" msgid="4674876336725041982">"Zavřít rychlé nastavení."</string> diff --git a/packages/SystemUI/res/values-da/strings.xml b/packages/SystemUI/res/values-da/strings.xml index 886369598f1c..7ce60ea1536a 100644 --- a/packages/SystemUI/res/values-da/strings.xml +++ b/packages/SystemUI/res/values-da/strings.xml @@ -879,17 +879,6 @@ </string-array> <string name="tuner_low_priority" msgid="8412666814123009820">"Vis ikoner for notifikationer med lav prioritet"</string> <string name="other" msgid="429768510980739978">"Andet"</string> - <string name="accessibility_divider" msgid="2830785970889237307">"Adskiller til opdelt skærm"</string> - <string name="accessibility_action_divider_left_full" msgid="7598733539422375847">"Vis venstre del i fuld skærm"</string> - <string name="accessibility_action_divider_left_70" msgid="4919312892541727761">"Venstre 70 %"</string> - <string name="accessibility_action_divider_left_50" msgid="3664701169564893826">"Venstre 50 %"</string> - <string name="accessibility_action_divider_left_30" msgid="4358145268046362088">"Venstre 30 %"</string> - <string name="accessibility_action_divider_right_full" msgid="8576057422864896305">"Vis højre del i fuld skærm"</string> - <string name="accessibility_action_divider_top_full" msgid="4243901660795169777">"Vis øverste del i fuld skærm"</string> - <string name="accessibility_action_divider_top_70" msgid="6941226213260515072">"Øverste 70 %"</string> - <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Øverste 50 %"</string> - <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Øverste 30 %"</string> - <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Vis nederste del i fuld skærm"</string> <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Position <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Tryk to gange for at redigere."</string> <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Tryk to gange for at tilføje."</string> <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Flyt <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string> @@ -898,10 +887,6 @@ <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Flyt <xliff:g id="TILE_NAME">%1$s</xliff:g> til position <xliff:g id="POSITION">%2$d</xliff:g>"</string> <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Redigeringsværktøj til Kvikmenu."</string> <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g>-notifikation: <xliff:g id="ID_2">%2$s</xliff:g>"</string> - <string name="dock_forced_resizable" msgid="4689301323912928801">"Appen fungerer muligvis ikke i opdelt skærm."</string> - <string name="dock_non_resizeble_failed_to_dock_text" msgid="7284915968096153808">"Appen understøtter ikke opdelt skærm."</string> - <string name="forced_resizable_secondary_display" msgid="522558907654394940">"Appen fungerer muligvis ikke på sekundære skærme."</string> - <string name="activity_launch_on_secondary_display_failed_text" msgid="8446727617187998208">"Appen kan ikke åbnes på sekundære skærme."</string> <string name="accessibility_quick_settings_settings" msgid="7098489591715844713">"Åbn Indstillinger."</string> <string name="accessibility_quick_settings_expand" msgid="2609275052412521467">"Åbn Kvikmenu."</string> <string name="accessibility_quick_settings_collapse" msgid="4674876336725041982">"Luk Kvikmenu."</string> diff --git a/packages/SystemUI/res/values-de/strings.xml b/packages/SystemUI/res/values-de/strings.xml index 8d990c66ecdf..093e1a20ca97 100644 --- a/packages/SystemUI/res/values-de/strings.xml +++ b/packages/SystemUI/res/values-de/strings.xml @@ -879,17 +879,6 @@ </string-array> <string name="tuner_low_priority" msgid="8412666814123009820">"Symbole für Benachrichtigungen mit einer niedrigen Priorität anzeigen"</string> <string name="other" msgid="429768510980739978">"Sonstiges"</string> - <string name="accessibility_divider" msgid="2830785970889237307">"Bildschirmteiler"</string> - <string name="accessibility_action_divider_left_full" msgid="7598733539422375847">"Vollbild links"</string> - <string name="accessibility_action_divider_left_70" msgid="4919312892541727761">"70 % links"</string> - <string name="accessibility_action_divider_left_50" msgid="3664701169564893826">"50 % links"</string> - <string name="accessibility_action_divider_left_30" msgid="4358145268046362088">"30 % links"</string> - <string name="accessibility_action_divider_right_full" msgid="8576057422864896305">"Vollbild rechts"</string> - <string name="accessibility_action_divider_top_full" msgid="4243901660795169777">"Vollbild oben"</string> - <string name="accessibility_action_divider_top_70" msgid="6941226213260515072">"70 % oben"</string> - <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"50 % oben"</string> - <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"30 % oben"</string> - <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Vollbild unten"</string> <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Position <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Zum Bearbeiten doppeltippen."</string> <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Zum Hinzufügen doppeltippen."</string> <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"<xliff:g id="TILE_NAME">%1$s</xliff:g> verschieben"</string> @@ -898,10 +887,6 @@ <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"<xliff:g id="TILE_NAME">%1$s</xliff:g> auf Position <xliff:g id="POSITION">%2$d</xliff:g> verschieben"</string> <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Editor für Schnelleinstellungen."</string> <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"Benachrichtigung von <xliff:g id="ID_1">%1$s</xliff:g>: <xliff:g id="ID_2">%2$s</xliff:g>"</string> - <string name="dock_forced_resizable" msgid="4689301323912928801">"Die App funktioniert unter Umständen bei geteiltem Bildschirm nicht."</string> - <string name="dock_non_resizeble_failed_to_dock_text" msgid="7284915968096153808">"Das Teilen des Bildschirms wird in dieser App nicht unterstützt."</string> - <string name="forced_resizable_secondary_display" msgid="522558907654394940">"Die App funktioniert auf einem sekundären Display möglicherweise nicht."</string> - <string name="activity_launch_on_secondary_display_failed_text" msgid="8446727617187998208">"Die App unterstützt den Start auf sekundären Displays nicht."</string> <string name="accessibility_quick_settings_settings" msgid="7098489591715844713">"Einstellungen öffnen."</string> <string name="accessibility_quick_settings_expand" msgid="2609275052412521467">"Schnelleinstellungen öffnen."</string> <string name="accessibility_quick_settings_collapse" msgid="4674876336725041982">"Schnelleinstellungen schließen."</string> diff --git a/packages/SystemUI/res/values-el/strings.xml b/packages/SystemUI/res/values-el/strings.xml index 5ca236b2514a..ac1a3ee4601e 100644 --- a/packages/SystemUI/res/values-el/strings.xml +++ b/packages/SystemUI/res/values-el/strings.xml @@ -879,17 +879,6 @@ </string-array> <string name="tuner_low_priority" msgid="8412666814123009820">"Εμφάνιση εικονιδίων ειδοποιήσεων χαμηλής προτεραιότητας"</string> <string name="other" msgid="429768510980739978">"Άλλο"</string> - <string name="accessibility_divider" msgid="2830785970889237307">"Διαχωριστικό οθόνης"</string> - <string name="accessibility_action_divider_left_full" msgid="7598733539422375847">"Αριστερή πλήρης οθόνη"</string> - <string name="accessibility_action_divider_left_70" msgid="4919312892541727761">"Αριστερή 70%"</string> - <string name="accessibility_action_divider_left_50" msgid="3664701169564893826">"Αριστερή 50%"</string> - <string name="accessibility_action_divider_left_30" msgid="4358145268046362088">"Αριστερή 30%"</string> - <string name="accessibility_action_divider_right_full" msgid="8576057422864896305">"Δεξιά πλήρης οθόνη"</string> - <string name="accessibility_action_divider_top_full" msgid="4243901660795169777">"Πάνω πλήρης οθόνη"</string> - <string name="accessibility_action_divider_top_70" msgid="6941226213260515072">"Πάνω 70%"</string> - <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Πάνω 50%"</string> - <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Πάνω 30%"</string> - <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Κάτω πλήρης οθόνη"</string> <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Θέση <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Πατήστε δύο φορές για επεξεργασία."</string> <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Πατήστε δύο φορές για προσθήκη."</string> <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Μετακίνηση <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string> @@ -898,10 +887,6 @@ <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Μετακίνηση <xliff:g id="TILE_NAME">%1$s</xliff:g> στη θέση <xliff:g id="POSITION">%2$d</xliff:g>"</string> <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Επεξεργασία γρήγορων ρυθμίσεων."</string> <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"Ειδοποίηση <xliff:g id="ID_1">%1$s</xliff:g>: <xliff:g id="ID_2">%2$s</xliff:g>"</string> - <string name="dock_forced_resizable" msgid="4689301323912928801">"Δεν είναι δυνατή η λειτουργία της εφαρμογής με διαχωρισμό οθόνης."</string> - <string name="dock_non_resizeble_failed_to_dock_text" msgid="7284915968096153808">"Η εφαρμογή δεν υποστηρίζει διαχωρισμό οθόνης."</string> - <string name="forced_resizable_secondary_display" msgid="522558907654394940">"Η εφαρμογή ίσως να μην λειτουργήσει σε δευτερεύουσα οθόνη."</string> - <string name="activity_launch_on_secondary_display_failed_text" msgid="8446727617187998208">"Η εφαρμογή δεν υποστηρίζει την εκκίνηση σε δευτερεύουσες οθόνες."</string> <string name="accessibility_quick_settings_settings" msgid="7098489591715844713">"Άνοιγμα ρυθμίσεων."</string> <string name="accessibility_quick_settings_expand" msgid="2609275052412521467">"Άνοιγμα γρήγορων ρυθμίσεων."</string> <string name="accessibility_quick_settings_collapse" msgid="4674876336725041982">"Κλείσιμο γρήγορων ρυθμίσεων."</string> diff --git a/packages/SystemUI/res/values-en-rAU/strings.xml b/packages/SystemUI/res/values-en-rAU/strings.xml index 8a7963a1f845..3a76d75ac043 100644 --- a/packages/SystemUI/res/values-en-rAU/strings.xml +++ b/packages/SystemUI/res/values-en-rAU/strings.xml @@ -879,17 +879,6 @@ </string-array> <string name="tuner_low_priority" msgid="8412666814123009820">"Show low-priority notification icons"</string> <string name="other" msgid="429768510980739978">"Other"</string> - <string name="accessibility_divider" msgid="2830785970889237307">"Split screen divider"</string> - <string name="accessibility_action_divider_left_full" msgid="7598733539422375847">"Left full screen"</string> - <string name="accessibility_action_divider_left_70" msgid="4919312892541727761">"Left 70%"</string> - <string name="accessibility_action_divider_left_50" msgid="3664701169564893826">"Left 50%"</string> - <string name="accessibility_action_divider_left_30" msgid="4358145268046362088">"Left 30%"</string> - <string name="accessibility_action_divider_right_full" msgid="8576057422864896305">"Right full screen"</string> - <string name="accessibility_action_divider_top_full" msgid="4243901660795169777">"Top full screen"</string> - <string name="accessibility_action_divider_top_70" msgid="6941226213260515072">"Top 70%"</string> - <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Top 50%"</string> - <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Top 30%"</string> - <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Bottom full screen"</string> <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Position <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Double tap to edit."</string> <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Double tap to add."</string> <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Move <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string> @@ -898,10 +887,6 @@ <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Move <xliff:g id="TILE_NAME">%1$s</xliff:g> to position <xliff:g id="POSITION">%2$d</xliff:g>"</string> <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Quick settings editor."</string> <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g> notification: <xliff:g id="ID_2">%2$s</xliff:g>"</string> - <string name="dock_forced_resizable" msgid="4689301323912928801">"App may not work with split-screen."</string> - <string name="dock_non_resizeble_failed_to_dock_text" msgid="7284915968096153808">"App does not support split-screen."</string> - <string name="forced_resizable_secondary_display" msgid="522558907654394940">"App may not work on a secondary display."</string> - <string name="activity_launch_on_secondary_display_failed_text" msgid="8446727617187998208">"App does not support launch on secondary displays."</string> <string name="accessibility_quick_settings_settings" msgid="7098489591715844713">"Open settings."</string> <string name="accessibility_quick_settings_expand" msgid="2609275052412521467">"Open quick settings."</string> <string name="accessibility_quick_settings_collapse" msgid="4674876336725041982">"Close quick settings."</string> diff --git a/packages/SystemUI/res/values-en-rCA/strings.xml b/packages/SystemUI/res/values-en-rCA/strings.xml index 7b2b25a0e678..ac6519394268 100644 --- a/packages/SystemUI/res/values-en-rCA/strings.xml +++ b/packages/SystemUI/res/values-en-rCA/strings.xml @@ -879,17 +879,6 @@ </string-array> <string name="tuner_low_priority" msgid="8412666814123009820">"Show low-priority notification icons"</string> <string name="other" msgid="429768510980739978">"Other"</string> - <string name="accessibility_divider" msgid="2830785970889237307">"Split screen divider"</string> - <string name="accessibility_action_divider_left_full" msgid="7598733539422375847">"Left full screen"</string> - <string name="accessibility_action_divider_left_70" msgid="4919312892541727761">"Left 70%"</string> - <string name="accessibility_action_divider_left_50" msgid="3664701169564893826">"Left 50%"</string> - <string name="accessibility_action_divider_left_30" msgid="4358145268046362088">"Left 30%"</string> - <string name="accessibility_action_divider_right_full" msgid="8576057422864896305">"Right full screen"</string> - <string name="accessibility_action_divider_top_full" msgid="4243901660795169777">"Top full screen"</string> - <string name="accessibility_action_divider_top_70" msgid="6941226213260515072">"Top 70%"</string> - <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Top 50%"</string> - <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Top 30%"</string> - <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Bottom full screen"</string> <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Position <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Double tap to edit."</string> <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Double tap to add."</string> <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Move <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string> @@ -898,10 +887,6 @@ <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Move <xliff:g id="TILE_NAME">%1$s</xliff:g> to position <xliff:g id="POSITION">%2$d</xliff:g>"</string> <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Quick settings editor."</string> <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g> notification: <xliff:g id="ID_2">%2$s</xliff:g>"</string> - <string name="dock_forced_resizable" msgid="4689301323912928801">"App may not work with split-screen."</string> - <string name="dock_non_resizeble_failed_to_dock_text" msgid="7284915968096153808">"App does not support split-screen."</string> - <string name="forced_resizable_secondary_display" msgid="522558907654394940">"App may not work on a secondary display."</string> - <string name="activity_launch_on_secondary_display_failed_text" msgid="8446727617187998208">"App does not support launch on secondary displays."</string> <string name="accessibility_quick_settings_settings" msgid="7098489591715844713">"Open settings."</string> <string name="accessibility_quick_settings_expand" msgid="2609275052412521467">"Open quick settings."</string> <string name="accessibility_quick_settings_collapse" msgid="4674876336725041982">"Close quick settings."</string> diff --git a/packages/SystemUI/res/values-en-rGB/strings.xml b/packages/SystemUI/res/values-en-rGB/strings.xml index 8a7963a1f845..3a76d75ac043 100644 --- a/packages/SystemUI/res/values-en-rGB/strings.xml +++ b/packages/SystemUI/res/values-en-rGB/strings.xml @@ -879,17 +879,6 @@ </string-array> <string name="tuner_low_priority" msgid="8412666814123009820">"Show low-priority notification icons"</string> <string name="other" msgid="429768510980739978">"Other"</string> - <string name="accessibility_divider" msgid="2830785970889237307">"Split screen divider"</string> - <string name="accessibility_action_divider_left_full" msgid="7598733539422375847">"Left full screen"</string> - <string name="accessibility_action_divider_left_70" msgid="4919312892541727761">"Left 70%"</string> - <string name="accessibility_action_divider_left_50" msgid="3664701169564893826">"Left 50%"</string> - <string name="accessibility_action_divider_left_30" msgid="4358145268046362088">"Left 30%"</string> - <string name="accessibility_action_divider_right_full" msgid="8576057422864896305">"Right full screen"</string> - <string name="accessibility_action_divider_top_full" msgid="4243901660795169777">"Top full screen"</string> - <string name="accessibility_action_divider_top_70" msgid="6941226213260515072">"Top 70%"</string> - <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Top 50%"</string> - <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Top 30%"</string> - <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Bottom full screen"</string> <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Position <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Double tap to edit."</string> <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Double tap to add."</string> <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Move <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string> @@ -898,10 +887,6 @@ <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Move <xliff:g id="TILE_NAME">%1$s</xliff:g> to position <xliff:g id="POSITION">%2$d</xliff:g>"</string> <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Quick settings editor."</string> <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g> notification: <xliff:g id="ID_2">%2$s</xliff:g>"</string> - <string name="dock_forced_resizable" msgid="4689301323912928801">"App may not work with split-screen."</string> - <string name="dock_non_resizeble_failed_to_dock_text" msgid="7284915968096153808">"App does not support split-screen."</string> - <string name="forced_resizable_secondary_display" msgid="522558907654394940">"App may not work on a secondary display."</string> - <string name="activity_launch_on_secondary_display_failed_text" msgid="8446727617187998208">"App does not support launch on secondary displays."</string> <string name="accessibility_quick_settings_settings" msgid="7098489591715844713">"Open settings."</string> <string name="accessibility_quick_settings_expand" msgid="2609275052412521467">"Open quick settings."</string> <string name="accessibility_quick_settings_collapse" msgid="4674876336725041982">"Close quick settings."</string> diff --git a/packages/SystemUI/res/values-en-rIN/strings.xml b/packages/SystemUI/res/values-en-rIN/strings.xml index 8a7963a1f845..3a76d75ac043 100644 --- a/packages/SystemUI/res/values-en-rIN/strings.xml +++ b/packages/SystemUI/res/values-en-rIN/strings.xml @@ -879,17 +879,6 @@ </string-array> <string name="tuner_low_priority" msgid="8412666814123009820">"Show low-priority notification icons"</string> <string name="other" msgid="429768510980739978">"Other"</string> - <string name="accessibility_divider" msgid="2830785970889237307">"Split screen divider"</string> - <string name="accessibility_action_divider_left_full" msgid="7598733539422375847">"Left full screen"</string> - <string name="accessibility_action_divider_left_70" msgid="4919312892541727761">"Left 70%"</string> - <string name="accessibility_action_divider_left_50" msgid="3664701169564893826">"Left 50%"</string> - <string name="accessibility_action_divider_left_30" msgid="4358145268046362088">"Left 30%"</string> - <string name="accessibility_action_divider_right_full" msgid="8576057422864896305">"Right full screen"</string> - <string name="accessibility_action_divider_top_full" msgid="4243901660795169777">"Top full screen"</string> - <string name="accessibility_action_divider_top_70" msgid="6941226213260515072">"Top 70%"</string> - <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Top 50%"</string> - <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Top 30%"</string> - <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Bottom full screen"</string> <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Position <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Double tap to edit."</string> <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Double tap to add."</string> <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Move <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string> @@ -898,10 +887,6 @@ <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Move <xliff:g id="TILE_NAME">%1$s</xliff:g> to position <xliff:g id="POSITION">%2$d</xliff:g>"</string> <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Quick settings editor."</string> <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g> notification: <xliff:g id="ID_2">%2$s</xliff:g>"</string> - <string name="dock_forced_resizable" msgid="4689301323912928801">"App may not work with split-screen."</string> - <string name="dock_non_resizeble_failed_to_dock_text" msgid="7284915968096153808">"App does not support split-screen."</string> - <string name="forced_resizable_secondary_display" msgid="522558907654394940">"App may not work on a secondary display."</string> - <string name="activity_launch_on_secondary_display_failed_text" msgid="8446727617187998208">"App does not support launch on secondary displays."</string> <string name="accessibility_quick_settings_settings" msgid="7098489591715844713">"Open settings."</string> <string name="accessibility_quick_settings_expand" msgid="2609275052412521467">"Open quick settings."</string> <string name="accessibility_quick_settings_collapse" msgid="4674876336725041982">"Close quick settings."</string> diff --git a/packages/SystemUI/res/values-en-rXC/strings.xml b/packages/SystemUI/res/values-en-rXC/strings.xml index 15738f2512f4..211a27c69b7e 100644 --- a/packages/SystemUI/res/values-en-rXC/strings.xml +++ b/packages/SystemUI/res/values-en-rXC/strings.xml @@ -879,17 +879,6 @@ </string-array> <string name="tuner_low_priority" msgid="8412666814123009820">"Show low-priority notification icons"</string> <string name="other" msgid="429768510980739978">"Other"</string> - <string name="accessibility_divider" msgid="2830785970889237307">"Split-screen divider"</string> - <string name="accessibility_action_divider_left_full" msgid="7598733539422375847">"Left full screen"</string> - <string name="accessibility_action_divider_left_70" msgid="4919312892541727761">"Left 70%"</string> - <string name="accessibility_action_divider_left_50" msgid="3664701169564893826">"Left 50%"</string> - <string name="accessibility_action_divider_left_30" msgid="4358145268046362088">"Left 30%"</string> - <string name="accessibility_action_divider_right_full" msgid="8576057422864896305">"Right full screen"</string> - <string name="accessibility_action_divider_top_full" msgid="4243901660795169777">"Top full screen"</string> - <string name="accessibility_action_divider_top_70" msgid="6941226213260515072">"Top 70%"</string> - <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Top 50%"</string> - <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Top 30%"</string> - <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Bottom full screen"</string> <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Position <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Double tap to edit."</string> <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Double tap to add."</string> <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Move <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string> @@ -898,10 +887,6 @@ <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Move <xliff:g id="TILE_NAME">%1$s</xliff:g> to position <xliff:g id="POSITION">%2$d</xliff:g>"</string> <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Quick settings editor."</string> <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g> notification: <xliff:g id="ID_2">%2$s</xliff:g>"</string> - <string name="dock_forced_resizable" msgid="4689301323912928801">"App may not work with split-screen."</string> - <string name="dock_non_resizeble_failed_to_dock_text" msgid="7284915968096153808">"App does not support split-screen."</string> - <string name="forced_resizable_secondary_display" msgid="522558907654394940">"App may not work on a secondary display."</string> - <string name="activity_launch_on_secondary_display_failed_text" msgid="8446727617187998208">"App does not support launch on secondary displays."</string> <string name="accessibility_quick_settings_settings" msgid="7098489591715844713">"Open settings."</string> <string name="accessibility_quick_settings_expand" msgid="2609275052412521467">"Open quick settings."</string> <string name="accessibility_quick_settings_collapse" msgid="4674876336725041982">"Close quick settings."</string> diff --git a/packages/SystemUI/res/values-es-rUS/strings.xml b/packages/SystemUI/res/values-es-rUS/strings.xml index aa81ab8efadd..ccc46266f7fe 100644 --- a/packages/SystemUI/res/values-es-rUS/strings.xml +++ b/packages/SystemUI/res/values-es-rUS/strings.xml @@ -879,17 +879,6 @@ </string-array> <string name="tuner_low_priority" msgid="8412666814123009820">"Mostrar íconos de notificaciones con prioridad baja"</string> <string name="other" msgid="429768510980739978">"Otros"</string> - <string name="accessibility_divider" msgid="2830785970889237307">"Divisor de pantalla dividida"</string> - <string name="accessibility_action_divider_left_full" msgid="7598733539422375847">"Pantalla izquierda completa"</string> - <string name="accessibility_action_divider_left_70" msgid="4919312892541727761">"Izquierda: 70%"</string> - <string name="accessibility_action_divider_left_50" msgid="3664701169564893826">"Izquierda: 50%"</string> - <string name="accessibility_action_divider_left_30" msgid="4358145268046362088">"Izquierda: 30%"</string> - <string name="accessibility_action_divider_right_full" msgid="8576057422864896305">"Pantalla derecha completa"</string> - <string name="accessibility_action_divider_top_full" msgid="4243901660795169777">"Pantalla superior completa"</string> - <string name="accessibility_action_divider_top_70" msgid="6941226213260515072">"Superior: 70%"</string> - <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Superior: 50%"</string> - <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Superior: 30%"</string> - <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Pantalla inferior completa"</string> <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Posición <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Presiona dos veces para editarla."</string> <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Presiona dos veces para agregarlo."</string> <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Mover <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string> @@ -898,10 +887,6 @@ <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Mover <xliff:g id="TILE_NAME">%1$s</xliff:g> a la posición <xliff:g id="POSITION">%2$d</xliff:g>"</string> <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Editor de Configuración rápida"</string> <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"Notificación de <xliff:g id="ID_1">%1$s</xliff:g>: <xliff:g id="ID_2">%2$s</xliff:g>"</string> - <string name="dock_forced_resizable" msgid="4689301323912928801">"Es posible que la app no funcione en el modo de pantalla dividida."</string> - <string name="dock_non_resizeble_failed_to_dock_text" msgid="7284915968096153808">"La app no es compatible con la función de pantalla dividida."</string> - <string name="forced_resizable_secondary_display" msgid="522558907654394940">"Es posible que la app no funcione en una pantalla secundaria."</string> - <string name="activity_launch_on_secondary_display_failed_text" msgid="8446727617187998208">"La app no puede iniciarse en pantallas secundarias."</string> <string name="accessibility_quick_settings_settings" msgid="7098489591715844713">"Abrir Configuración"</string> <string name="accessibility_quick_settings_expand" msgid="2609275052412521467">"Abrir la configuración rápida"</string> <string name="accessibility_quick_settings_collapse" msgid="4674876336725041982">"Cerrar configuración rápida"</string> diff --git a/packages/SystemUI/res/values-es/strings.xml b/packages/SystemUI/res/values-es/strings.xml index 863857016388..4e9347cb01e6 100644 --- a/packages/SystemUI/res/values-es/strings.xml +++ b/packages/SystemUI/res/values-es/strings.xml @@ -98,7 +98,7 @@ <string name="screenrecord_device_audio_description" msgid="4922694220572186193">"Sonido de tu dispositivo, como música, llamadas y tonos de llamada"</string> <string name="screenrecord_mic_label" msgid="2111264835791332350">"Micrófono"</string> <string name="screenrecord_device_audio_and_mic_label" msgid="1831323771978646841">"Audio y micrófono del dispositivo"</string> - <string name="screenrecord_start" msgid="330991441575775004">"Empezar"</string> + <string name="screenrecord_start" msgid="330991441575775004">"Iniciar"</string> <string name="screenrecord_ongoing_screen_only" msgid="4459670242451527727">"Grabando pantalla"</string> <string name="screenrecord_ongoing_screen_and_audio" msgid="5351133763125180920">"Grabando pantalla y audio"</string> <string name="screenrecord_taps_label" msgid="1595690528298857649">"Mostrar toques en la pantalla"</string> @@ -879,17 +879,6 @@ </string-array> <string name="tuner_low_priority" msgid="8412666814123009820">"Mostrar iconos de notificaciones con prioridad baja"</string> <string name="other" msgid="429768510980739978">"Otros"</string> - <string name="accessibility_divider" msgid="2830785970889237307">"Dividir la pantalla"</string> - <string name="accessibility_action_divider_left_full" msgid="7598733539422375847">"Pantalla izquierda completa"</string> - <string name="accessibility_action_divider_left_70" msgid="4919312892541727761">"Izquierda 70%"</string> - <string name="accessibility_action_divider_left_50" msgid="3664701169564893826">"Izquierda 50%"</string> - <string name="accessibility_action_divider_left_30" msgid="4358145268046362088">"Izquierda 30%"</string> - <string name="accessibility_action_divider_right_full" msgid="8576057422864896305">"Pantalla derecha completa"</string> - <string name="accessibility_action_divider_top_full" msgid="4243901660795169777">"Pantalla superior completa"</string> - <string name="accessibility_action_divider_top_70" msgid="6941226213260515072">"Superior 70%"</string> - <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Superior 50%"</string> - <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Superior 30%"</string> - <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Pantalla inferior completa"</string> <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Posición <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Toca dos veces para cambiarla."</string> <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Toca dos veces para añadirlo."</string> <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Mover <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string> @@ -898,10 +887,6 @@ <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Mover <xliff:g id="TILE_NAME">%1$s</xliff:g> a la posición <xliff:g id="POSITION">%2$d</xliff:g>"</string> <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Editor de ajustes rápidos."</string> <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"Notificación de <xliff:g id="ID_1">%1$s</xliff:g>: <xliff:g id="ID_2">%2$s</xliff:g>"</string> - <string name="dock_forced_resizable" msgid="4689301323912928801">"Es posible que la aplicación no funcione con la pantalla dividida."</string> - <string name="dock_non_resizeble_failed_to_dock_text" msgid="7284915968096153808">"La aplicación no admite la pantalla dividida."</string> - <string name="forced_resizable_secondary_display" msgid="522558907654394940">"Es posible que la aplicación no funcione en una pantalla secundaria."</string> - <string name="activity_launch_on_secondary_display_failed_text" msgid="8446727617187998208">"La aplicación no se puede abrir en pantallas secundarias."</string> <string name="accessibility_quick_settings_settings" msgid="7098489591715844713">"Abrir ajustes."</string> <string name="accessibility_quick_settings_expand" msgid="2609275052412521467">"Abrir ajustes rápidos."</string> <string name="accessibility_quick_settings_collapse" msgid="4674876336725041982">"Cerrar ajustes rápidos."</string> diff --git a/packages/SystemUI/res/values-et/strings.xml b/packages/SystemUI/res/values-et/strings.xml index f5ffad255cf6..21189f1ea5f6 100644 --- a/packages/SystemUI/res/values-et/strings.xml +++ b/packages/SystemUI/res/values-et/strings.xml @@ -879,17 +879,6 @@ </string-array> <string name="tuner_low_priority" msgid="8412666814123009820">"Kuva madala prioriteediga märguande ikoonid"</string> <string name="other" msgid="429768510980739978">"Muu"</string> - <string name="accessibility_divider" msgid="2830785970889237307">"Ekraanijagaja"</string> - <string name="accessibility_action_divider_left_full" msgid="7598733539422375847">"Vasak täisekraan"</string> - <string name="accessibility_action_divider_left_70" msgid="4919312892541727761">"Vasak: 70%"</string> - <string name="accessibility_action_divider_left_50" msgid="3664701169564893826">"Vasak: 50%"</string> - <string name="accessibility_action_divider_left_30" msgid="4358145268046362088">"Vasak: 30%"</string> - <string name="accessibility_action_divider_right_full" msgid="8576057422864896305">"Parem täisekraan"</string> - <string name="accessibility_action_divider_top_full" msgid="4243901660795169777">"Ülemine täisekraan"</string> - <string name="accessibility_action_divider_top_70" msgid="6941226213260515072">"Ülemine: 70%"</string> - <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Ülemine: 50%"</string> - <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Ülemine: 30%"</string> - <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Alumine täisekraan"</string> <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Asend <xliff:g id="POSITION">%1$d</xliff:g>, paan <xliff:g id="TILE_NAME">%2$s</xliff:g>. Topeltpuudutage muutmiseks."</string> <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Topeltpuudutage lisamiseks."</string> <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Paani <xliff:g id="TILE_NAME">%1$s</xliff:g> teisaldamine"</string> @@ -898,10 +887,6 @@ <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Teisaldage <xliff:g id="TILE_NAME">%1$s</xliff:g> asendisse <xliff:g id="POSITION">%2$d</xliff:g>"</string> <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Kiirseadete redigeerija."</string> <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"Teenuse <xliff:g id="ID_1">%1$s</xliff:g> märguanne: <xliff:g id="ID_2">%2$s</xliff:g>"</string> - <string name="dock_forced_resizable" msgid="4689301323912928801">"Rakendus ei pruugi poolitatud ekraaniga töötada."</string> - <string name="dock_non_resizeble_failed_to_dock_text" msgid="7284915968096153808">"Rakendus ei toeta jagatud ekraani."</string> - <string name="forced_resizable_secondary_display" msgid="522558907654394940">"Rakendus ei pruugi teisesel ekraanil töötada."</string> - <string name="activity_launch_on_secondary_display_failed_text" msgid="8446727617187998208">"Rakendus ei toeta teisestel ekraanidel käivitamist."</string> <string name="accessibility_quick_settings_settings" msgid="7098489591715844713">"Ava seaded."</string> <string name="accessibility_quick_settings_expand" msgid="2609275052412521467">"Ava kiirseaded."</string> <string name="accessibility_quick_settings_collapse" msgid="4674876336725041982">"Sule kiirseaded."</string> diff --git a/packages/SystemUI/res/values-eu/strings.xml b/packages/SystemUI/res/values-eu/strings.xml index 23bcd2c32c76..8a372361daac 100644 --- a/packages/SystemUI/res/values-eu/strings.xml +++ b/packages/SystemUI/res/values-eu/strings.xml @@ -879,17 +879,6 @@ </string-array> <string name="tuner_low_priority" msgid="8412666814123009820">"Erakutsi lehentasun txikiko jakinarazpenen ikonoak"</string> <string name="other" msgid="429768510980739978">"Beste bat"</string> - <string name="accessibility_divider" msgid="2830785970889237307">"Pantaila-zatitzailea"</string> - <string name="accessibility_action_divider_left_full" msgid="7598733539422375847">"Ezarri ezkerraldea pantaila osoan"</string> - <string name="accessibility_action_divider_left_70" msgid="4919312892541727761">"Ezarri ezkerraldea % 70en"</string> - <string name="accessibility_action_divider_left_50" msgid="3664701169564893826">"Ezarri ezkerraldea % 50en"</string> - <string name="accessibility_action_divider_left_30" msgid="4358145268046362088">"Ezarri ezkerraldea % 30en"</string> - <string name="accessibility_action_divider_right_full" msgid="8576057422864896305">"Ezarri eskuinaldea pantaila osoan"</string> - <string name="accessibility_action_divider_top_full" msgid="4243901660795169777">"Ezarri goialdea pantaila osoan"</string> - <string name="accessibility_action_divider_top_70" msgid="6941226213260515072">"Ezarri goialdea % 70en"</string> - <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Ezarri goialdea % 50en"</string> - <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Ezarri goialdea % 30en"</string> - <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Ezarri behealdea pantaila osoan"</string> <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"<xliff:g id="POSITION">%1$d</xliff:g>. posizioa, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Editatzeko, sakatu birritan."</string> <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Gehitzeko, sakatu birritan."</string> <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Mugitu <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string> @@ -898,10 +887,6 @@ <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Eraman <xliff:g id="TILE_NAME">%1$s</xliff:g> <xliff:g id="POSITION">%2$d</xliff:g>garren postura"</string> <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Ezarpen bizkorren editorea."</string> <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g> zerbitzuaren jakinarazpena: <xliff:g id="ID_2">%2$s</xliff:g>"</string> - <string name="dock_forced_resizable" msgid="4689301323912928801">"Baliteke aplikazioak ez funtzionatzea pantaila zatituan."</string> - <string name="dock_non_resizeble_failed_to_dock_text" msgid="7284915968096153808">"Aplikazioak ez du onartzen pantaila zatitua"</string> - <string name="forced_resizable_secondary_display" msgid="522558907654394940">"Baliteke aplikazioak ez funtzionatzea bigarren mailako pantailetan."</string> - <string name="activity_launch_on_secondary_display_failed_text" msgid="8446727617187998208">"Aplikazioa ezin da abiarazi bigarren mailako pantailatan."</string> <string name="accessibility_quick_settings_settings" msgid="7098489591715844713">"Ireki ezarpenak."</string> <string name="accessibility_quick_settings_expand" msgid="2609275052412521467">"Ireki ezarpen bizkorrak."</string> <string name="accessibility_quick_settings_collapse" msgid="4674876336725041982">"Itxi ezarpen bizkorrak."</string> diff --git a/packages/SystemUI/res/values-fa/strings.xml b/packages/SystemUI/res/values-fa/strings.xml index 55d8ab2566c6..7f85959af7aa 100644 --- a/packages/SystemUI/res/values-fa/strings.xml +++ b/packages/SystemUI/res/values-fa/strings.xml @@ -808,7 +808,7 @@ <string name="keyboard_shortcut_group_system_back" msgid="1055709713218453863">"برگشت"</string> <string name="keyboard_shortcut_group_system_notifications" msgid="3615971650562485878">"اعلانها"</string> <string name="keyboard_shortcut_group_system_shortcuts_helper" msgid="4856808328618265589">"میانبرهای صفحهکلید"</string> - <string name="keyboard_shortcut_group_system_switch_input" msgid="952555530383268166">"تغییر طرحبندی صفحهکلید"</string> + <string name="keyboard_shortcut_group_system_switch_input" msgid="952555530383268166">"تغییر جانمایی صفحهکلید"</string> <string name="keyboard_shortcut_group_applications" msgid="7386239431100651266">"برنامهها"</string> <string name="keyboard_shortcut_group_applications_assist" msgid="771606231466098742">"دستیار"</string> <string name="keyboard_shortcut_group_applications_browser" msgid="2776211137869809251">"مرورگر"</string> @@ -879,17 +879,6 @@ </string-array> <string name="tuner_low_priority" msgid="8412666814123009820">"نمایش نمادهای اعلان کماهمیت"</string> <string name="other" msgid="429768510980739978">"موارد دیگر"</string> - <string name="accessibility_divider" msgid="2830785970889237307">"تقسیمکننده صفحه"</string> - <string name="accessibility_action_divider_left_full" msgid="7598733539422375847">"تمامصفحه چپ"</string> - <string name="accessibility_action_divider_left_70" msgid="4919312892541727761">"٪۷۰ چپ"</string> - <string name="accessibility_action_divider_left_50" msgid="3664701169564893826">"٪۵۰ چپ"</string> - <string name="accessibility_action_divider_left_30" msgid="4358145268046362088">"٪۳۰ چپ"</string> - <string name="accessibility_action_divider_right_full" msgid="8576057422864896305">"تمامصفحه راست"</string> - <string name="accessibility_action_divider_top_full" msgid="4243901660795169777">"تمامصفحه بالا"</string> - <string name="accessibility_action_divider_top_70" msgid="6941226213260515072">"٪۷۰ بالا"</string> - <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"٪۵۰ بالا"</string> - <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"٪۳۰ بالا"</string> - <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"تمامصفحه پایین"</string> <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"موقعیت <xliff:g id="POSITION">%1$d</xliff:g>، <xliff:g id="TILE_NAME">%2$s</xliff:g>. برای ویرایش دو ضربه سریع بزنید."</string> <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. برای افزودن دو ضربه سریع بزنید."</string> <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"انتقال <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string> @@ -898,10 +887,6 @@ <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"انتقال <xliff:g id="TILE_NAME">%1$s</xliff:g> به موقعیت <xliff:g id="POSITION">%2$d</xliff:g>"</string> <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"ویرایشگر تنظیمات سریع."</string> <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"اعلان <xliff:g id="ID_1">%1$s</xliff:g>: <xliff:g id="ID_2">%2$s</xliff:g>"</string> - <string name="dock_forced_resizable" msgid="4689301323912928801">"ممکن است برنامه با تقسیم صفحه کار نکند."</string> - <string name="dock_non_resizeble_failed_to_dock_text" msgid="7284915968096153808">"برنامه از تقسیم صفحه پشتیبانی نمیکند."</string> - <string name="forced_resizable_secondary_display" msgid="522558907654394940">"ممکن است برنامه در نمایشگر ثانویه کار نکند."</string> - <string name="activity_launch_on_secondary_display_failed_text" msgid="8446727617187998208">"برنامه از راهاندازی در نمایشگرهای ثانویه پشتیبانی نمیکند."</string> <string name="accessibility_quick_settings_settings" msgid="7098489591715844713">"باز کردن تنظیمات."</string> <string name="accessibility_quick_settings_expand" msgid="2609275052412521467">"باز کردن تنظیمات سریع."</string> <string name="accessibility_quick_settings_collapse" msgid="4674876336725041982">"بستن تنظیمات سریع."</string> diff --git a/packages/SystemUI/res/values-fi/strings.xml b/packages/SystemUI/res/values-fi/strings.xml index f30c44b3ffba..fd9bbd94625c 100644 --- a/packages/SystemUI/res/values-fi/strings.xml +++ b/packages/SystemUI/res/values-fi/strings.xml @@ -879,17 +879,6 @@ </string-array> <string name="tuner_low_priority" msgid="8412666814123009820">"Näytä vähemmän tärkeät ilmoituskuvakkeet"</string> <string name="other" msgid="429768510980739978">"Muu"</string> - <string name="accessibility_divider" msgid="2830785970889237307">"Näytön jakaja"</string> - <string name="accessibility_action_divider_left_full" msgid="7598733539422375847">"Vasen koko näytölle"</string> - <string name="accessibility_action_divider_left_70" msgid="4919312892541727761">"Vasen 70 %"</string> - <string name="accessibility_action_divider_left_50" msgid="3664701169564893826">"Vasen 50 %"</string> - <string name="accessibility_action_divider_left_30" msgid="4358145268046362088">"Vasen 30 %"</string> - <string name="accessibility_action_divider_right_full" msgid="8576057422864896305">"Oikea koko näytölle"</string> - <string name="accessibility_action_divider_top_full" msgid="4243901660795169777">"Yläosa koko näytölle"</string> - <string name="accessibility_action_divider_top_70" msgid="6941226213260515072">"Yläosa 70 %"</string> - <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Yläosa 50 %"</string> - <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Yläosa 30 %"</string> - <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Alaosa koko näytölle"</string> <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Paikka <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Muokkaa kaksoisnapauttamalla."</string> <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Lisää kaksoisnapauttamalla."</string> <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Siirrä <xliff:g id="TILE_NAME">%1$s</xliff:g>."</string> @@ -898,10 +887,6 @@ <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Siirrä <xliff:g id="TILE_NAME">%1$s</xliff:g> kohtaan <xliff:g id="POSITION">%2$d</xliff:g>"</string> <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Pika-asetusten muokkausnäkymä"</string> <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"Ilmoitus kohteesta <xliff:g id="ID_1">%1$s</xliff:g>: <xliff:g id="ID_2">%2$s</xliff:g>"</string> - <string name="dock_forced_resizable" msgid="4689301323912928801">"Sovellus ei ehkä toimi jaetulla näytöllä."</string> - <string name="dock_non_resizeble_failed_to_dock_text" msgid="7284915968096153808">"Sovellus ei tue jaetun näytön tilaa."</string> - <string name="forced_resizable_secondary_display" msgid="522558907654394940">"Sovellus ei ehkä toimi toissijaisella näytöllä."</string> - <string name="activity_launch_on_secondary_display_failed_text" msgid="8446727617187998208">"Sovellus ei tue käynnistämistä toissijaisilla näytöillä."</string> <string name="accessibility_quick_settings_settings" msgid="7098489591715844713">"Avaa asetukset."</string> <string name="accessibility_quick_settings_expand" msgid="2609275052412521467">"Avaa pika-asetukset."</string> <string name="accessibility_quick_settings_collapse" msgid="4674876336725041982">"Sulje pika-asetukset."</string> diff --git a/packages/SystemUI/res/values-fr-rCA/strings.xml b/packages/SystemUI/res/values-fr-rCA/strings.xml index f6196dd63695..8817cebdcf4d 100644 --- a/packages/SystemUI/res/values-fr-rCA/strings.xml +++ b/packages/SystemUI/res/values-fr-rCA/strings.xml @@ -879,17 +879,6 @@ </string-array> <string name="tuner_low_priority" msgid="8412666814123009820">"Afficher les icônes de notification de faible priorité"</string> <string name="other" msgid="429768510980739978">"Autre"</string> - <string name="accessibility_divider" msgid="2830785970889237307">"Séparateur d\'écran partagé"</string> - <string name="accessibility_action_divider_left_full" msgid="7598733539422375847">"Plein écran à la gauche"</string> - <string name="accessibility_action_divider_left_70" msgid="4919312892541727761">"70 % à la gauche"</string> - <string name="accessibility_action_divider_left_50" msgid="3664701169564893826">"50 % à la gauche"</string> - <string name="accessibility_action_divider_left_30" msgid="4358145268046362088">"30 % à la gauche"</string> - <string name="accessibility_action_divider_right_full" msgid="8576057422864896305">"Plein écran à la droite"</string> - <string name="accessibility_action_divider_top_full" msgid="4243901660795169777">"Plein écran dans le haut"</string> - <string name="accessibility_action_divider_top_70" msgid="6941226213260515072">"70 % dans le haut"</string> - <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"50 % dans le haut"</string> - <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"30 % dans le haut"</string> - <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Plein écran dans le bas"</string> <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Position <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Touchez deux fois pour modifier."</string> <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Touchez deux fois pour ajouter."</string> <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Déplacer <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string> @@ -898,10 +887,6 @@ <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Déplacer <xliff:g id="TILE_NAME">%1$s</xliff:g> à la position <xliff:g id="POSITION">%2$d</xliff:g>"</string> <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Éditeur de paramètres rapides."</string> <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"Notification <xliff:g id="ID_1">%1$s</xliff:g> : <xliff:g id="ID_2">%2$s</xliff:g>"</string> - <string name="dock_forced_resizable" msgid="4689301323912928801">"Il est possible que l\'application ne fonctionne pas en mode Écran partagé."</string> - <string name="dock_non_resizeble_failed_to_dock_text" msgid="7284915968096153808">"L\'application n\'est pas compatible avec l\'écran partagé."</string> - <string name="forced_resizable_secondary_display" msgid="522558907654394940">"Il est possible que l\'application ne fonctionne pas sur un écran secondaire."</string> - <string name="activity_launch_on_secondary_display_failed_text" msgid="8446727617187998208">"L\'application ne peut pas être lancée sur des écrans secondaires."</string> <string name="accessibility_quick_settings_settings" msgid="7098489591715844713">"Ouvrir les paramètres."</string> <string name="accessibility_quick_settings_expand" msgid="2609275052412521467">"Ouvrir les réglages rapides."</string> <string name="accessibility_quick_settings_collapse" msgid="4674876336725041982">"Fermer les réglages rapides."</string> diff --git a/packages/SystemUI/res/values-fr/strings.xml b/packages/SystemUI/res/values-fr/strings.xml index 0146ce4d9a59..35176c79f987 100644 --- a/packages/SystemUI/res/values-fr/strings.xml +++ b/packages/SystemUI/res/values-fr/strings.xml @@ -879,17 +879,6 @@ </string-array> <string name="tuner_low_priority" msgid="8412666814123009820">"Afficher les icônes de notification à faible priorité"</string> <string name="other" msgid="429768510980739978">"Autre"</string> - <string name="accessibility_divider" msgid="2830785970889237307">"Séparateur d\'écran partagé"</string> - <string name="accessibility_action_divider_left_full" msgid="7598733539422375847">"Écran de gauche en plein écran"</string> - <string name="accessibility_action_divider_left_70" msgid="4919312892541727761">"Écran de gauche à 70 %"</string> - <string name="accessibility_action_divider_left_50" msgid="3664701169564893826">"Écran de gauche à 50 %"</string> - <string name="accessibility_action_divider_left_30" msgid="4358145268046362088">"Écran de gauche à 30 %"</string> - <string name="accessibility_action_divider_right_full" msgid="8576057422864896305">"Écran de droite en plein écran"</string> - <string name="accessibility_action_divider_top_full" msgid="4243901660795169777">"Écran du haut en plein écran"</string> - <string name="accessibility_action_divider_top_70" msgid="6941226213260515072">"Écran du haut à 70 %"</string> - <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Écran du haut à 50 %"</string> - <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Écran du haut à 30 %"</string> - <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Écran du bas en plein écran"</string> <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Position <xliff:g id="POSITION">%1$d</xliff:g>, \"<xliff:g id="TILE_NAME">%2$s</xliff:g>\". Appuyer deux fois pour modifier."</string> <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Appuyer deux fois pour ajouter."</string> <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Déplacer \"<xliff:g id="TILE_NAME">%1$s</xliff:g>\""</string> @@ -898,10 +887,6 @@ <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Déplacer l\'élément \"<xliff:g id="TILE_NAME">%1$s</xliff:g>\" à la position <xliff:g id="POSITION">%2$d</xliff:g>"</string> <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Éditeur de configuration rapide."</string> <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"Notification <xliff:g id="ID_1">%1$s</xliff:g> : <xliff:g id="ID_2">%2$s</xliff:g>"</string> - <string name="dock_forced_resizable" msgid="4689301323912928801">"Il est possible que l\'application ne fonctionne pas en mode Écran partagé."</string> - <string name="dock_non_resizeble_failed_to_dock_text" msgid="7284915968096153808">"Application incompatible avec l\'écran partagé."</string> - <string name="forced_resizable_secondary_display" msgid="522558907654394940">"Il est possible que l\'application ne fonctionne pas sur un écran secondaire."</string> - <string name="activity_launch_on_secondary_display_failed_text" msgid="8446727617187998208">"L\'application ne peut pas être lancée sur des écrans secondaires."</string> <string name="accessibility_quick_settings_settings" msgid="7098489591715844713">"Ouvrir les paramètres."</string> <string name="accessibility_quick_settings_expand" msgid="2609275052412521467">"Ouvrir la fenêtre de configuration rapide."</string> <string name="accessibility_quick_settings_collapse" msgid="4674876336725041982">"Fermer la fenêtre de configuration rapide."</string> diff --git a/packages/SystemUI/res/values-gl/strings.xml b/packages/SystemUI/res/values-gl/strings.xml index fd4d3c6a4ad5..7c6279894069 100644 --- a/packages/SystemUI/res/values-gl/strings.xml +++ b/packages/SystemUI/res/values-gl/strings.xml @@ -879,17 +879,6 @@ </string-array> <string name="tuner_low_priority" msgid="8412666814123009820">"Mostrar iconas das notificacións que teñan baixa prioridade"</string> <string name="other" msgid="429768510980739978">"Outros"</string> - <string name="accessibility_divider" msgid="2830785970889237307">"Divisor de pantalla dividida"</string> - <string name="accessibility_action_divider_left_full" msgid="7598733539422375847">"Pantalla completa á esquerda"</string> - <string name="accessibility_action_divider_left_70" msgid="4919312892541727761">"70 % á esquerda"</string> - <string name="accessibility_action_divider_left_50" msgid="3664701169564893826">"50 % á esquerda"</string> - <string name="accessibility_action_divider_left_30" msgid="4358145268046362088">"30 % á esquerda"</string> - <string name="accessibility_action_divider_right_full" msgid="8576057422864896305">"Pantalla completa á dereita"</string> - <string name="accessibility_action_divider_top_full" msgid="4243901660795169777">"Pantalla completa arriba"</string> - <string name="accessibility_action_divider_top_70" msgid="6941226213260515072">"70 % arriba"</string> - <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"50 % arriba"</string> - <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"30 % arriba"</string> - <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Pantalla completa abaixo"</string> <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Posición <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Toca dúas veces o elemento para editalo."</string> <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Toca dúas veces o elemento para engadilo"</string> <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Move <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string> @@ -898,10 +887,6 @@ <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Mover \"<xliff:g id="TILE_NAME">%1$s</xliff:g>\" á posición <xliff:g id="POSITION">%2$d</xliff:g>"</string> <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Editor de configuración rápida."</string> <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"Notificación de <xliff:g id="ID_1">%1$s</xliff:g>: <xliff:g id="ID_2">%2$s</xliff:g>"</string> - <string name="dock_forced_resizable" msgid="4689301323912928801">"Pode que a aplicación non funcione coa pantalla dividida."</string> - <string name="dock_non_resizeble_failed_to_dock_text" msgid="7284915968096153808">"A aplicación non é compatible coa función de pantalla dividida."</string> - <string name="forced_resizable_secondary_display" msgid="522558907654394940">"É posible que a aplicación non funcione nunha pantalla secundaria."</string> - <string name="activity_launch_on_secondary_display_failed_text" msgid="8446727617187998208">"A aplicación non se pode iniciar en pantallas secundarias."</string> <string name="accessibility_quick_settings_settings" msgid="7098489591715844713">"Abrir configuración."</string> <string name="accessibility_quick_settings_expand" msgid="2609275052412521467">"Abrir configuración rápida."</string> <string name="accessibility_quick_settings_collapse" msgid="4674876336725041982">"Pechar a configuración rápida."</string> diff --git a/packages/SystemUI/res/values-gu/strings.xml b/packages/SystemUI/res/values-gu/strings.xml index 46f7a2bde43c..af0d7d3e1b10 100644 --- a/packages/SystemUI/res/values-gu/strings.xml +++ b/packages/SystemUI/res/values-gu/strings.xml @@ -879,17 +879,6 @@ </string-array> <string name="tuner_low_priority" msgid="8412666814123009820">"ઓછી પ્રાધાન્યતાનું નોટિફિકેશન આઇકન બતાવો"</string> <string name="other" msgid="429768510980739978">"અન્ય"</string> - <string name="accessibility_divider" msgid="2830785970889237307">"સ્પ્લિટ-સ્ક્રીન વિભાજક"</string> - <string name="accessibility_action_divider_left_full" msgid="7598733539422375847">"ડાબી પૂર્ણ સ્ક્રીન"</string> - <string name="accessibility_action_divider_left_70" msgid="4919312892541727761">"ડાબે 70%"</string> - <string name="accessibility_action_divider_left_50" msgid="3664701169564893826">"ડાબે 50%"</string> - <string name="accessibility_action_divider_left_30" msgid="4358145268046362088">"ડાબે 30%"</string> - <string name="accessibility_action_divider_right_full" msgid="8576057422864896305">"જમણી સ્ક્રીન સ્ક્રીન"</string> - <string name="accessibility_action_divider_top_full" msgid="4243901660795169777">"શીર્ષ પૂર્ણ સ્ક્રીન"</string> - <string name="accessibility_action_divider_top_70" msgid="6941226213260515072">"શીર્ષ 70%"</string> - <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"શીર્ષ 50%"</string> - <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"શીર્ષ 30%"</string> - <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"તળિયાની પૂર્ણ સ્ક્રીન"</string> <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"સ્થિતિ <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. સંપાદિત કરવા માટે બે વાર ટૅપ કરો."</string> <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. ઉમેરવા માટે બે વાર ટૅપ કરો."</string> <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"<xliff:g id="TILE_NAME">%1$s</xliff:g> ખસેડો"</string> @@ -898,10 +887,6 @@ <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"<xliff:g id="POSITION">%2$d</xliff:g> જગ્યા પર <xliff:g id="TILE_NAME">%1$s</xliff:g>ને ખસેડો"</string> <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"ઝડપી સેટિંગ્સ સંપાદક."</string> <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g> નોટિફિકેશન: <xliff:g id="ID_2">%2$s</xliff:g>"</string> - <string name="dock_forced_resizable" msgid="4689301323912928801">"વિભાજિત-સ્ક્રીન સાથે ઍપ્લિકેશન કદાચ કામ ન કરે."</string> - <string name="dock_non_resizeble_failed_to_dock_text" msgid="7284915968096153808">"ઍપ્લિકેશન સ્ક્રીન-વિભાજનનું સમર્થન કરતી નથી."</string> - <string name="forced_resizable_secondary_display" msgid="522558907654394940">"ઍપ્લિકેશન ગૌણ ડિસ્પ્લે પર કદાચ કામ ન કરે."</string> - <string name="activity_launch_on_secondary_display_failed_text" msgid="8446727617187998208">"ઍપ્લિકેશન ગૌણ ડિસ્પ્લે પર લૉન્ચનું સમર્થન કરતી નથી."</string> <string name="accessibility_quick_settings_settings" msgid="7098489591715844713">"સેટિંગ્સ ખોલો."</string> <string name="accessibility_quick_settings_expand" msgid="2609275052412521467">"ઝડપી સેટિંગ્સ ખોલો."</string> <string name="accessibility_quick_settings_collapse" msgid="4674876336725041982">"ઝડપી સેટિંગ્સ બંધ કરો."</string> diff --git a/packages/SystemUI/res/values-hi/strings.xml b/packages/SystemUI/res/values-hi/strings.xml index e4a6ed79848d..0a7515d03a65 100644 --- a/packages/SystemUI/res/values-hi/strings.xml +++ b/packages/SystemUI/res/values-hi/strings.xml @@ -881,17 +881,6 @@ </string-array> <string name="tuner_low_priority" msgid="8412666814123009820">"कम प्राथमिकता वाली सूचना के आइकॉन दिखाएं"</string> <string name="other" msgid="429768510980739978">"अन्य"</string> - <string name="accessibility_divider" msgid="2830785970889237307">"विभाजित स्क्रीन विभाजक"</string> - <string name="accessibility_action_divider_left_full" msgid="7598733539422375847">"बाईं स्क्रीन को फ़ुल स्क्रीन बनाएं"</string> - <string name="accessibility_action_divider_left_70" msgid="4919312892541727761">"बाईं स्क्रीन को 70% बनाएं"</string> - <string name="accessibility_action_divider_left_50" msgid="3664701169564893826">"बाईं स्क्रीन को 50% बनाएं"</string> - <string name="accessibility_action_divider_left_30" msgid="4358145268046362088">"बाईं स्क्रीन को 30% बनाएं"</string> - <string name="accessibility_action_divider_right_full" msgid="8576057422864896305">"दाईं स्क्रीन को फ़ुल स्क्रीन बनाएं"</string> - <string name="accessibility_action_divider_top_full" msgid="4243901660795169777">"ऊपर की स्क्रीन को फ़ुल स्क्रीन बनाएं"</string> - <string name="accessibility_action_divider_top_70" msgid="6941226213260515072">"ऊपर की स्क्रीन को 70% बनाएं"</string> - <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"ऊपर की स्क्रीन को 50% बनाएं"</string> - <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"ऊपर की स्क्रीन को 30% बनाएं"</string> - <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"नीचे की स्क्रीन को फ़ुल स्क्रीन बनाएं"</string> <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"स्थिति <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. में बदलाव करने के लिए दो बार छूएं."</string> <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. जोड़ने के लिए दो बार छूएं."</string> <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"<xliff:g id="TILE_NAME">%1$s</xliff:g> को ले जाएं"</string> @@ -900,10 +889,6 @@ <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"<xliff:g id="TILE_NAME">%1$s</xliff:g> काे क्रम संख्या <xliff:g id="POSITION">%2$d</xliff:g> पर ले जाएं"</string> <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"त्वरित सेटिंग संपादक."</string> <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g> सूचना: <xliff:g id="ID_2">%2$s</xliff:g>"</string> - <string name="dock_forced_resizable" msgid="4689301323912928801">"हो सकता है कि ऐप्लिकेशन विभाजित स्क्रीन के साथ काम ना करे."</string> - <string name="dock_non_resizeble_failed_to_dock_text" msgid="7284915968096153808">"ऐप विभाजित स्क्रीन का समर्थन नहीं करता है."</string> - <string name="forced_resizable_secondary_display" msgid="522558907654394940">"हो सकता है कि ऐप प्राइमरी (मुख्य) डिस्प्ले के अलावा बाकी दूसरे डिस्प्ले पर काम न करे."</string> - <string name="activity_launch_on_secondary_display_failed_text" msgid="8446727617187998208">"प्राइमरी (मुख्य) डिस्प्ले के अलावा बाकी दूसरे डिस्प्ले पर ऐप लॉन्च नहीं किया जा सकता."</string> <string name="accessibility_quick_settings_settings" msgid="7098489591715844713">"सेटिंग खोलें."</string> <string name="accessibility_quick_settings_expand" msgid="2609275052412521467">"क्विक सेटिंग खोलें."</string> <string name="accessibility_quick_settings_collapse" msgid="4674876336725041982">"त्वरित सेटिंग बंद करें."</string> diff --git a/packages/SystemUI/res/values-hr/strings.xml b/packages/SystemUI/res/values-hr/strings.xml index a27b06694588..27b6909159aa 100644 --- a/packages/SystemUI/res/values-hr/strings.xml +++ b/packages/SystemUI/res/values-hr/strings.xml @@ -884,17 +884,6 @@ </string-array> <string name="tuner_low_priority" msgid="8412666814123009820">"Prikaži ikone obavijesti niskog prioriteta"</string> <string name="other" msgid="429768510980739978">"Ostalo"</string> - <string name="accessibility_divider" msgid="2830785970889237307">"Razdjelnik podijeljenog zaslona"</string> - <string name="accessibility_action_divider_left_full" msgid="7598733539422375847">"Lijevi zaslon u cijeli zaslon"</string> - <string name="accessibility_action_divider_left_70" msgid="4919312892541727761">"Lijevi zaslon na 70%"</string> - <string name="accessibility_action_divider_left_50" msgid="3664701169564893826">"Lijevi zaslon na 50%"</string> - <string name="accessibility_action_divider_left_30" msgid="4358145268046362088">"Lijevi zaslon na 30%"</string> - <string name="accessibility_action_divider_right_full" msgid="8576057422864896305">"Desni zaslon u cijeli zaslon"</string> - <string name="accessibility_action_divider_top_full" msgid="4243901660795169777">"Gornji zaslon u cijeli zaslon"</string> - <string name="accessibility_action_divider_top_70" msgid="6941226213260515072">"Gornji zaslon na 70%"</string> - <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Gornji zaslon na 50%"</string> - <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Gornji zaslon na 30%"</string> - <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Donji zaslon u cijeli zaslon"</string> <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Položaj <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Dodirnite dvaput da biste uredili."</string> <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Dodirnite dvaput da biste dodali."</string> <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Premjesti <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string> @@ -903,10 +892,6 @@ <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Premjestite pločicu <xliff:g id="TILE_NAME">%1$s</xliff:g> na položaj <xliff:g id="POSITION">%2$d</xliff:g>"</string> <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Uređivač brzih postavki."</string> <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g> obavijest: <xliff:g id="ID_2">%2$s</xliff:g>"</string> - <string name="dock_forced_resizable" msgid="4689301323912928801">"Aplikacija možda neće funkcionirati s podijeljenim zaslonom."</string> - <string name="dock_non_resizeble_failed_to_dock_text" msgid="7284915968096153808">"Aplikacija ne podržava podijeljeni zaslon."</string> - <string name="forced_resizable_secondary_display" msgid="522558907654394940">"Aplikacija možda neće funkcionirati na sekundarnom zaslonu."</string> - <string name="activity_launch_on_secondary_display_failed_text" msgid="8446727617187998208">"Aplikacija ne podržava pokretanje na sekundarnim zaslonima."</string> <string name="accessibility_quick_settings_settings" msgid="7098489591715844713">"Otvaranje postavki."</string> <string name="accessibility_quick_settings_expand" msgid="2609275052412521467">"Otvaranje brzih postavki."</string> <string name="accessibility_quick_settings_collapse" msgid="4674876336725041982">"Zatvaranje brzih postavki."</string> diff --git a/packages/SystemUI/res/values-hu/strings.xml b/packages/SystemUI/res/values-hu/strings.xml index 0d1f50acc1c7..1f52b2cbe78b 100644 --- a/packages/SystemUI/res/values-hu/strings.xml +++ b/packages/SystemUI/res/values-hu/strings.xml @@ -428,7 +428,7 @@ <string name="quick_settings_nfc_off" msgid="3465000058515424663">"Az NFC ki van kapcsolva"</string> <string name="quick_settings_nfc_on" msgid="1004976611203202230">"Az NFC be van kapcsolva"</string> <string name="quick_settings_screen_record_label" msgid="1594046461509776676">"Képernyő rögzítése"</string> - <string name="quick_settings_screen_record_start" msgid="1574725369331638985">"Kezdés"</string> + <string name="quick_settings_screen_record_start" msgid="1574725369331638985">"Indítás"</string> <string name="quick_settings_screen_record_stop" msgid="8087348522976412119">"Leállítás"</string> <string name="media_seamless_remote_device" msgid="177033467332920464">"Eszköz"</string> <string name="recents_swipe_up_onboarding" msgid="2820265886420993995">"Váltás az alkalmazások között felfelé csúsztatással"</string> @@ -879,17 +879,6 @@ </string-array> <string name="tuner_low_priority" msgid="8412666814123009820">"Alacsony prioritású értesítési ikonok mutatása"</string> <string name="other" msgid="429768510980739978">"Egyéb"</string> - <string name="accessibility_divider" msgid="2830785970889237307">"Elválasztó az osztott nézetben"</string> - <string name="accessibility_action_divider_left_full" msgid="7598733539422375847">"Bal oldali teljes képernyőre"</string> - <string name="accessibility_action_divider_left_70" msgid="4919312892541727761">"Bal oldali 70%-ra"</string> - <string name="accessibility_action_divider_left_50" msgid="3664701169564893826">"Bal oldali 50%-ra"</string> - <string name="accessibility_action_divider_left_30" msgid="4358145268046362088">"Bal oldali 30%-ra"</string> - <string name="accessibility_action_divider_right_full" msgid="8576057422864896305">"Jobb oldali teljes képernyőre"</string> - <string name="accessibility_action_divider_top_full" msgid="4243901660795169777">"Felső teljes képernyőre"</string> - <string name="accessibility_action_divider_top_70" msgid="6941226213260515072">"Felső 70%-ra"</string> - <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Felső 50%-ra"</string> - <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Felső 30%-ra"</string> - <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Alsó teljes képernyőre"</string> <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"<xliff:g id="POSITION">%1$d</xliff:g>. pozíció: <xliff:g id="TILE_NAME">%2$s</xliff:g>. Koppintson duplán a szerkesztéshez."</string> <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Koppintson duplán a hozzáadáshoz."</string> <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"A(z) <xliff:g id="TILE_NAME">%1$s</xliff:g> áthelyezése"</string> @@ -898,10 +887,6 @@ <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"<xliff:g id="TILE_NAME">%1$s</xliff:g> áthelyezése a következő pozícióba: <xliff:g id="POSITION">%2$d</xliff:g>"</string> <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Gyorsbeállítások szerkesztője"</string> <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g>-értesítések: <xliff:g id="ID_2">%2$s</xliff:g>"</string> - <string name="dock_forced_resizable" msgid="4689301323912928801">"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="7284915968096153808">"Az alkalmazás nem támogatja az osztott képernyős nézetet."</string> - <string name="forced_resizable_secondary_display" msgid="522558907654394940">"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="8446727617187998208">"Az alkalmazást nem lehet másodlagos kijelzőn elindítani."</string> <string name="accessibility_quick_settings_settings" msgid="7098489591715844713">"Beállítások megnyitása."</string> <string name="accessibility_quick_settings_expand" msgid="2609275052412521467">"Gyorsbeállítások megnyitása."</string> <string name="accessibility_quick_settings_collapse" msgid="4674876336725041982">"Gyorsbeállítások bezárása"</string> diff --git a/packages/SystemUI/res/values-hy/strings.xml b/packages/SystemUI/res/values-hy/strings.xml index f9a10fa1578e..d4a093f78659 100644 --- a/packages/SystemUI/res/values-hy/strings.xml +++ b/packages/SystemUI/res/values-hy/strings.xml @@ -879,17 +879,6 @@ </string-array> <string name="tuner_low_priority" msgid="8412666814123009820">"Ցուցադրել ցածր առաջնահերթության ծանուցումների պատկերակները"</string> <string name="other" msgid="429768510980739978">"Այլ"</string> - <string name="accessibility_divider" msgid="2830785970889237307">"Տրոհված էկրանի բաժանիչ"</string> - <string name="accessibility_action_divider_left_full" msgid="7598733539422375847">"Ձախ էկրանը՝ լիաէկրան"</string> - <string name="accessibility_action_divider_left_70" msgid="4919312892541727761">"Ձախ էկրանը՝ 70%"</string> - <string name="accessibility_action_divider_left_50" msgid="3664701169564893826">"Ձախ էկրանը՝ 50%"</string> - <string name="accessibility_action_divider_left_30" msgid="4358145268046362088">"Ձախ էկրանը՝ 30%"</string> - <string name="accessibility_action_divider_right_full" msgid="8576057422864896305">"Աջ էկրանը՝ լիաէկրան"</string> - <string name="accessibility_action_divider_top_full" msgid="4243901660795169777">"Վերևի էկրանը՝ լիաէկրան"</string> - <string name="accessibility_action_divider_top_70" msgid="6941226213260515072">"Վերևի էկրանը՝ 70%"</string> - <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Վերևի էկրանը՝ 50%"</string> - <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Վերևի էկրանը՝ 30%"</string> - <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Ներքևի էկրանը՝ լիաէկրան"</string> <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Դիրք <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>: Կրկնակի հպեք՝ փոխելու համար:"</string> <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>: Կրկնակի հպեք՝ ավելացնելու համար:"</string> <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Տեղափոխել <xliff:g id="TILE_NAME">%1$s</xliff:g> սալիկը"</string> @@ -898,10 +887,6 @@ <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"<xliff:g id="TILE_NAME">%1$s</xliff:g> սալիկը տեղափոխել դիրք <xliff:g id="POSITION">%2$d</xliff:g>"</string> <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Արագ կարգավորումների խմբագրիչ:"</string> <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g> ծանուցում՝ <xliff:g id="ID_2">%2$s</xliff:g>"</string> - <string name="dock_forced_resizable" msgid="4689301323912928801">"Հավելվածը չի կարող աշխատել տրոհված էկրանի ռեժիմում:"</string> - <string name="dock_non_resizeble_failed_to_dock_text" msgid="7284915968096153808">"Հավելվածը չի աջակցում էկրանի տրոհումը:"</string> - <string name="forced_resizable_secondary_display" msgid="522558907654394940">"Հավելվածը կարող է չաշխատել լրացուցիչ էկրանի վրա"</string> - <string name="activity_launch_on_secondary_display_failed_text" msgid="8446727617187998208">"Հավելվածը չի աջակցում գործարկումը լրացուցիչ էկրանների վրա"</string> <string name="accessibility_quick_settings_settings" msgid="7098489591715844713">"Բացել կարգավորումները:"</string> <string name="accessibility_quick_settings_expand" msgid="2609275052412521467">"Բացել արագ կարգավորումները:"</string> <string name="accessibility_quick_settings_collapse" msgid="4674876336725041982">"Փակել արագ կարգավորումները:"</string> diff --git a/packages/SystemUI/res/values-in/strings.xml b/packages/SystemUI/res/values-in/strings.xml index f65be90bb00e..3b89b3d5e9fc 100644 --- a/packages/SystemUI/res/values-in/strings.xml +++ b/packages/SystemUI/res/values-in/strings.xml @@ -879,17 +879,6 @@ </string-array> <string name="tuner_low_priority" msgid="8412666814123009820">"Tampilkan ikon notifikasi prioritas rendah"</string> <string name="other" msgid="429768510980739978">"Lainnya"</string> - <string name="accessibility_divider" msgid="2830785970889237307">"Pembagi layar terpisah"</string> - <string name="accessibility_action_divider_left_full" msgid="7598733539422375847">"Layar penuh di kiri"</string> - <string name="accessibility_action_divider_left_70" msgid="4919312892541727761">"Kiri 70%"</string> - <string name="accessibility_action_divider_left_50" msgid="3664701169564893826">"Kiri 50%"</string> - <string name="accessibility_action_divider_left_30" msgid="4358145268046362088">"Kiri 30%"</string> - <string name="accessibility_action_divider_right_full" msgid="8576057422864896305">"Layar penuh di kanan"</string> - <string name="accessibility_action_divider_top_full" msgid="4243901660795169777">"Layar penuh di atas"</string> - <string name="accessibility_action_divider_top_70" msgid="6941226213260515072">"Atas 70%"</string> - <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Atas 50%"</string> - <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Atas 30%"</string> - <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Layar penuh di bawah"</string> <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Posisi <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Ketuk dua kali untuk mengedit."</string> <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Ketuk dua kali untuk menambahkan."</string> <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Pindahkan <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string> @@ -898,10 +887,6 @@ <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Pindahkan <xliff:g id="TILE_NAME">%1$s</xliff:g> ke posisi <xliff:g id="POSITION">%2$d</xliff:g>"</string> <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Editor setelan cepat."</string> <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"Notifikasi <xliff:g id="ID_1">%1$s</xliff:g>: <xliff:g id="ID_2">%2$s</xliff:g>"</string> - <string name="dock_forced_resizable" msgid="4689301323912928801">"Aplikasi mungkin tidak berfungsi dengan layar terpisah."</string> - <string name="dock_non_resizeble_failed_to_dock_text" msgid="7284915968096153808">"App tidak mendukung layar terpisah."</string> - <string name="forced_resizable_secondary_display" msgid="522558907654394940">"Aplikasi mungkin tidak berfungsi pada layar sekunder."</string> - <string name="activity_launch_on_secondary_display_failed_text" msgid="8446727617187998208">"Aplikasi tidak mendukung peluncuran pada layar sekunder."</string> <string name="accessibility_quick_settings_settings" msgid="7098489591715844713">"Buka setelan."</string> <string name="accessibility_quick_settings_expand" msgid="2609275052412521467">"Buka setelan cepat."</string> <string name="accessibility_quick_settings_collapse" msgid="4674876336725041982">"Tutup setelan cepat."</string> diff --git a/packages/SystemUI/res/values-is/strings.xml b/packages/SystemUI/res/values-is/strings.xml index 66c91477c1e8..da8a092bcc47 100644 --- a/packages/SystemUI/res/values-is/strings.xml +++ b/packages/SystemUI/res/values-is/strings.xml @@ -879,17 +879,6 @@ </string-array> <string name="tuner_low_priority" msgid="8412666814123009820">"Sýna tákn fyrir tilkynningar með litlum forgangi"</string> <string name="other" msgid="429768510980739978">"Annað"</string> - <string name="accessibility_divider" msgid="2830785970889237307">"Skjáskipting"</string> - <string name="accessibility_action_divider_left_full" msgid="7598733539422375847">"Vinstri á öllum skjánum"</string> - <string name="accessibility_action_divider_left_70" msgid="4919312892541727761">"Vinstri 70%"</string> - <string name="accessibility_action_divider_left_50" msgid="3664701169564893826">"Vinstri 50%"</string> - <string name="accessibility_action_divider_left_30" msgid="4358145268046362088">"Vinstri 30%"</string> - <string name="accessibility_action_divider_right_full" msgid="8576057422864896305">"Hægri á öllum skjánum"</string> - <string name="accessibility_action_divider_top_full" msgid="4243901660795169777">"Efri á öllum skjánum"</string> - <string name="accessibility_action_divider_top_70" msgid="6941226213260515072">"Efri 70%"</string> - <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Efri 50%"</string> - <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Efri 30%"</string> - <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Neðri á öllum skjánum"</string> <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Staða <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Ýttu tvisvar til að breyta."</string> <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Ýttu tvisvar til að bæta við."</string> <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Færa <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string> @@ -898,10 +887,6 @@ <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Færa <xliff:g id="TILE_NAME">%1$s</xliff:g> í stöðu <xliff:g id="POSITION">%2$d</xliff:g>"</string> <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Flýtistillingaritill."</string> <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g> tilkynning: <xliff:g id="ID_2">%2$s</xliff:g>"</string> - <string name="dock_forced_resizable" msgid="4689301323912928801">"Hugsanlega virkar forritið ekki ef skjánum er skipt upp."</string> - <string name="dock_non_resizeble_failed_to_dock_text" msgid="7284915968096153808">"Forritið styður ekki að skjánum sé skipt."</string> - <string name="forced_resizable_secondary_display" msgid="522558907654394940">"Hugsanlegt er að forritið virki ekki á öðrum skjá."</string> - <string name="activity_launch_on_secondary_display_failed_text" msgid="8446727617187998208">"Forrit styður ekki opnun á öðrum skjá."</string> <string name="accessibility_quick_settings_settings" msgid="7098489591715844713">"Opna stillingar."</string> <string name="accessibility_quick_settings_expand" msgid="2609275052412521467">"Opna flýtistillingar."</string> <string name="accessibility_quick_settings_collapse" msgid="4674876336725041982">"Loka flýtistillingum."</string> diff --git a/packages/SystemUI/res/values-it/strings.xml b/packages/SystemUI/res/values-it/strings.xml index b0e64a27f154..0ec9c236f761 100644 --- a/packages/SystemUI/res/values-it/strings.xml +++ b/packages/SystemUI/res/values-it/strings.xml @@ -879,17 +879,6 @@ </string-array> <string name="tuner_low_priority" msgid="8412666814123009820">"Mostra icone di notifiche con priorità bassa"</string> <string name="other" msgid="429768510980739978">"Altro"</string> - <string name="accessibility_divider" msgid="2830785970889237307">"Strumento per schermo diviso"</string> - <string name="accessibility_action_divider_left_full" msgid="7598733539422375847">"Schermata sinistra a schermo intero"</string> - <string name="accessibility_action_divider_left_70" msgid="4919312892541727761">"Schermata sinistra al 70%"</string> - <string name="accessibility_action_divider_left_50" msgid="3664701169564893826">"Schermata sinistra al 50%"</string> - <string name="accessibility_action_divider_left_30" msgid="4358145268046362088">"Schermata sinistra al 30%"</string> - <string name="accessibility_action_divider_right_full" msgid="8576057422864896305">"Schermata destra a schermo intero"</string> - <string name="accessibility_action_divider_top_full" msgid="4243901660795169777">"Schermata superiore a schermo intero"</string> - <string name="accessibility_action_divider_top_70" msgid="6941226213260515072">"Schermata superiore al 70%"</string> - <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Schermata superiore al 50%"</string> - <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Schermata superiore al 30%"</string> - <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Schermata inferiore a schermo intero"</string> <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Posizione <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Tocca due volte per modificare."</string> <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Tocca due volte per aggiungere."</string> <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Sposta <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string> @@ -898,10 +887,6 @@ <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Sposta il riquadro <xliff:g id="TILE_NAME">%1$s</xliff:g> nella posizione <xliff:g id="POSITION">%2$d</xliff:g>"</string> <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Editor di impostazioni rapide."</string> <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"Notifica di <xliff:g id="ID_1">%1$s</xliff:g>: <xliff:g id="ID_2">%2$s</xliff:g>"</string> - <string name="dock_forced_resizable" msgid="4689301323912928801">"L\'app potrebbe non funzionare con lo schermo diviso."</string> - <string name="dock_non_resizeble_failed_to_dock_text" msgid="7284915968096153808">"L\'app non supporta la modalità Schermo diviso."</string> - <string name="forced_resizable_secondary_display" msgid="522558907654394940">"L\'app potrebbe non funzionare su un display secondario."</string> - <string name="activity_launch_on_secondary_display_failed_text" msgid="8446727617187998208">"L\'app non supporta l\'avvio su display secondari."</string> <string name="accessibility_quick_settings_settings" msgid="7098489591715844713">"Apri le impostazioni."</string> <string name="accessibility_quick_settings_expand" msgid="2609275052412521467">"Apri le impostazioni rapide."</string> <string name="accessibility_quick_settings_collapse" msgid="4674876336725041982">"Chiudi le impostazioni rapide."</string> diff --git a/packages/SystemUI/res/values-iw/strings.xml b/packages/SystemUI/res/values-iw/strings.xml index 92fa09b81e39..193c5f61fe3e 100644 --- a/packages/SystemUI/res/values-iw/strings.xml +++ b/packages/SystemUI/res/values-iw/strings.xml @@ -889,17 +889,6 @@ </string-array> <string name="tuner_low_priority" msgid="8412666814123009820">"הצגת סמלי התראות בעדיפות נמוכה"</string> <string name="other" msgid="429768510980739978">"אחר"</string> - <string name="accessibility_divider" msgid="2830785970889237307">"מחלק מסך מפוצל"</string> - <string name="accessibility_action_divider_left_full" msgid="7598733539422375847">"מסך שמאלי מלא"</string> - <string name="accessibility_action_divider_left_70" msgid="4919312892541727761">"שמאלה 70%"</string> - <string name="accessibility_action_divider_left_50" msgid="3664701169564893826">"שמאלה 50%"</string> - <string name="accessibility_action_divider_left_30" msgid="4358145268046362088">"שמאלה 30%"</string> - <string name="accessibility_action_divider_right_full" msgid="8576057422864896305">"מסך ימני מלא"</string> - <string name="accessibility_action_divider_top_full" msgid="4243901660795169777">"מסך עליון מלא"</string> - <string name="accessibility_action_divider_top_70" msgid="6941226213260515072">"עליון 70%"</string> - <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"עליון 50%"</string> - <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"עליון 30%"</string> - <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"מסך תחתון מלא"</string> <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"מיקום <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. הקש פעמיים כדי לערוך."</string> <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. הקש פעמיים כדי להוסיף."</string> <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"הזזת <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string> @@ -908,10 +897,6 @@ <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"העברת <xliff:g id="TILE_NAME">%1$s</xliff:g> למיקום <xliff:g id="POSITION">%2$d</xliff:g>"</string> <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"עורך הגדרות מהירות."</string> <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"התראות <xliff:g id="ID_1">%1$s</xliff:g>: <xliff:g id="ID_2">%2$s</xliff:g>"</string> - <string name="dock_forced_resizable" msgid="4689301323912928801">"ייתכן שהיישום לא יפעל עם מסך מפוצל."</string> - <string name="dock_non_resizeble_failed_to_dock_text" msgid="7284915968096153808">"האפליקציה אינה תומכת במסך מפוצל."</string> - <string name="forced_resizable_secondary_display" msgid="522558907654394940">"ייתכן שהאפליקציה לא תפעל במסך משני."</string> - <string name="activity_launch_on_secondary_display_failed_text" msgid="8446727617187998208">"האפליקציה אינה תומכת בהפעלה במסכים משניים."</string> <string name="accessibility_quick_settings_settings" msgid="7098489591715844713">"פתיחת הגדרות."</string> <string name="accessibility_quick_settings_expand" msgid="2609275052412521467">"פתיחה של \'הגדרות מהירות\'."</string> <string name="accessibility_quick_settings_collapse" msgid="4674876336725041982">"סגירה של \'הגדרות מהירות\'."</string> diff --git a/packages/SystemUI/res/values-ja/strings.xml b/packages/SystemUI/res/values-ja/strings.xml index e427c8f950e5..9aa9e76c1597 100644 --- a/packages/SystemUI/res/values-ja/strings.xml +++ b/packages/SystemUI/res/values-ja/strings.xml @@ -879,17 +879,6 @@ </string-array> <string name="tuner_low_priority" msgid="8412666814123009820">"優先度の低い通知アイコンを表示"</string> <string name="other" msgid="429768510980739978">"その他"</string> - <string name="accessibility_divider" msgid="2830785970889237307">"分割画面の分割線"</string> - <string name="accessibility_action_divider_left_full" msgid="7598733539422375847">"左全画面"</string> - <string name="accessibility_action_divider_left_70" msgid="4919312892541727761">"左 70%"</string> - <string name="accessibility_action_divider_left_50" msgid="3664701169564893826">"左 50%"</string> - <string name="accessibility_action_divider_left_30" msgid="4358145268046362088">"左 30%"</string> - <string name="accessibility_action_divider_right_full" msgid="8576057422864896305">"右全画面"</string> - <string name="accessibility_action_divider_top_full" msgid="4243901660795169777">"上部全画面"</string> - <string name="accessibility_action_divider_top_70" msgid="6941226213260515072">"上 70%"</string> - <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"上 50%"</string> - <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"上 30%"</string> - <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"下部全画面"</string> <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"ポジション <xliff:g id="POSITION">%1$d</xliff:g> の <xliff:g id="TILE_NAME">%2$s</xliff:g> を編集するにはダブルタップします。"</string> <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g> を追加するにはダブルタップします。"</string> <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"<xliff:g id="TILE_NAME">%1$s</xliff:g> を移動します"</string> @@ -898,10 +887,6 @@ <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"<xliff:g id="TILE_NAME">%1$s</xliff:g> をポジション <xliff:g id="POSITION">%2$d</xliff:g> に移動"</string> <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"クイック設定エディタ"</string> <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g> の通知: <xliff:g id="ID_2">%2$s</xliff:g>"</string> - <string name="dock_forced_resizable" msgid="4689301323912928801">"アプリは分割画面では動作しないことがあります。"</string> - <string name="dock_non_resizeble_failed_to_dock_text" msgid="7284915968096153808">"アプリで分割画面がサポートされていません。"</string> - <string name="forced_resizable_secondary_display" msgid="522558907654394940">"アプリはセカンダリ ディスプレイでは動作しないことがあります。"</string> - <string name="activity_launch_on_secondary_display_failed_text" msgid="8446727617187998208">"アプリはセカンダリ ディスプレイでの起動に対応していません。"</string> <string name="accessibility_quick_settings_settings" msgid="7098489591715844713">"設定を開きます。"</string> <string name="accessibility_quick_settings_expand" msgid="2609275052412521467">"クイック設定を開きます。"</string> <string name="accessibility_quick_settings_collapse" msgid="4674876336725041982">"クイック設定を閉じます。"</string> diff --git a/packages/SystemUI/res/values-ka/strings.xml b/packages/SystemUI/res/values-ka/strings.xml index b86bf8c32a75..aa6f35d00826 100644 --- a/packages/SystemUI/res/values-ka/strings.xml +++ b/packages/SystemUI/res/values-ka/strings.xml @@ -879,17 +879,6 @@ </string-array> <string name="tuner_low_priority" msgid="8412666814123009820">"დაბალი პრიორიტეტის მქონე შეტყობინებების ხატულების ჩვენება"</string> <string name="other" msgid="429768510980739978">"სხვა"</string> - <string name="accessibility_divider" msgid="2830785970889237307">"გაყოფილი ეკრანის რეჟიმის გამყოფი"</string> - <string name="accessibility_action_divider_left_full" msgid="7598733539422375847">"მარცხენა ნაწილის სრულ ეკრანზე გაშლა"</string> - <string name="accessibility_action_divider_left_70" msgid="4919312892541727761">"მარცხენა ეკრანი — 70%"</string> - <string name="accessibility_action_divider_left_50" msgid="3664701169564893826">"მარცხენა ეკრანი — 50%"</string> - <string name="accessibility_action_divider_left_30" msgid="4358145268046362088">"მარცხენა ეკრანი — 30%"</string> - <string name="accessibility_action_divider_right_full" msgid="8576057422864896305">"მარჯვენა ნაწილის სრულ ეკრანზე გაშლა"</string> - <string name="accessibility_action_divider_top_full" msgid="4243901660795169777">"ზედა ნაწილის სრულ ეკრანზე გაშლა"</string> - <string name="accessibility_action_divider_top_70" msgid="6941226213260515072">"ზედა ეკრანი — 70%"</string> - <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"ზედა ეკრანი — 50%"</string> - <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"ზედა ეკრანი — 30%"</string> - <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"ქვედა ნაწილის სრულ ეკრანზე გაშლა"</string> <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"პოზიცია <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. რედაქტირებისთვის, შეეხეთ ორმაგად."</string> <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. დასამატებლად, შეეხეთ ორმაგად."</string> <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"<xliff:g id="TILE_NAME">%1$s</xliff:g>-ის გადატანა"</string> @@ -898,10 +887,6 @@ <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"<xliff:g id="TILE_NAME">%1$s</xliff:g>-ის გადატანა პოზიციაზე <xliff:g id="POSITION">%2$d</xliff:g>"</string> <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"სწრაფი პარამეტრების რედაქტორი."</string> <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g> შეტყობინება: <xliff:g id="ID_2">%2$s</xliff:g>"</string> - <string name="dock_forced_resizable" msgid="4689301323912928801">"აპმა შეიძლება არ იმუშაოს გაყოფილი ეკრანის რეჟიმში."</string> - <string name="dock_non_resizeble_failed_to_dock_text" msgid="7284915968096153808">"ეკრანის გაყოფა არ არის მხარდაჭერილი აპის მიერ."</string> - <string name="forced_resizable_secondary_display" msgid="522558907654394940">"აპმა შეიძლება არ იმუშაოს მეორეულ ეკრანზე."</string> - <string name="activity_launch_on_secondary_display_failed_text" msgid="8446727617187998208">"აპს არ გააჩნია მეორეული ეკრანის მხარდაჭერა."</string> <string name="accessibility_quick_settings_settings" msgid="7098489591715844713">"პარამეტრების გახსნა."</string> <string name="accessibility_quick_settings_expand" msgid="2609275052412521467">"სწრაფი პარამეტრების გახსნა."</string> <string name="accessibility_quick_settings_collapse" msgid="4674876336725041982">"სწრაფი პარამეტრების დახურვა."</string> diff --git a/packages/SystemUI/res/values-kk/strings.xml b/packages/SystemUI/res/values-kk/strings.xml index 1adaf2bc2755..cafbc2b56732 100644 --- a/packages/SystemUI/res/values-kk/strings.xml +++ b/packages/SystemUI/res/values-kk/strings.xml @@ -879,17 +879,6 @@ </string-array> <string name="tuner_low_priority" msgid="8412666814123009820">"Маңызды емес хабарландыру белгішелерін көрсету"</string> <string name="other" msgid="429768510980739978">"Басқа"</string> - <string name="accessibility_divider" msgid="2830785970889237307">"Бөлінген экран бөлгіші"</string> - <string name="accessibility_action_divider_left_full" msgid="7598733539422375847">"Сол жағын толық экранға шығару"</string> - <string name="accessibility_action_divider_left_70" msgid="4919312892541727761">"70% сол жақта"</string> - <string name="accessibility_action_divider_left_50" msgid="3664701169564893826">"50% сол жақта"</string> - <string name="accessibility_action_divider_left_30" msgid="4358145268046362088">"30% сол жақта"</string> - <string name="accessibility_action_divider_right_full" msgid="8576057422864896305">"Оң жағын толық экранға шығару"</string> - <string name="accessibility_action_divider_top_full" msgid="4243901660795169777">"Жоғарғы жағын толық экранға шығару"</string> - <string name="accessibility_action_divider_top_70" msgid="6941226213260515072">"70% жоғарғы жақта"</string> - <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"50% жоғарғы жақта"</string> - <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"30% жоғарғы жақта"</string> - <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Төменгісін толық экранға шығару"</string> <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"<xliff:g id="POSITION">%1$d</xliff:g> орны, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Өңдеу үшін екі рет түртіңіз."</string> <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Қосу үшін екі рет түртіңіз."</string> <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"<xliff:g id="TILE_NAME">%1$s</xliff:g> жылжыту"</string> @@ -898,10 +887,6 @@ <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"<xliff:g id="TILE_NAME">%1$s</xliff:g> бөлшегін <xliff:g id="POSITION">%2$d</xliff:g>-позицияға жылжыту"</string> <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Жылдам параметрлер өңдегіші."</string> <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g> хабарландыруы: <xliff:g id="ID_2">%2$s</xliff:g>"</string> - <string name="dock_forced_resizable" msgid="4689301323912928801">"Қолданба бөлінген экранда жұмыс істемеуі мүмкін."</string> - <string name="dock_non_resizeble_failed_to_dock_text" msgid="7284915968096153808">"Қодланба бөлінген экранды қолдамайды."</string> - <string name="forced_resizable_secondary_display" msgid="522558907654394940">"Қолданба қосымша дисплейде жұмыс істемеуі мүмкін."</string> - <string name="activity_launch_on_secondary_display_failed_text" msgid="8446727617187998208">"Қолданба қосымша дисплейлерде іске қосуды қолдамайды."</string> <string name="accessibility_quick_settings_settings" msgid="7098489591715844713">"Параметрлерді ашу."</string> <string name="accessibility_quick_settings_expand" msgid="2609275052412521467">"Жылдам параметрлерді ашу."</string> <string name="accessibility_quick_settings_collapse" msgid="4674876336725041982">"Жылдам параметрлерді жабу."</string> diff --git a/packages/SystemUI/res/values-km/strings.xml b/packages/SystemUI/res/values-km/strings.xml index 961a37b3cd57..5f16c7645511 100644 --- a/packages/SystemUI/res/values-km/strings.xml +++ b/packages/SystemUI/res/values-km/strings.xml @@ -879,17 +879,6 @@ </string-array> <string name="tuner_low_priority" msgid="8412666814123009820">"បង្ហាញរូបការជូនដំណឹងដែលមានអាទិភាពទាប"</string> <string name="other" msgid="429768510980739978">"ផ្សេងៗ"</string> - <string name="accessibility_divider" msgid="2830785970889237307">"កម្មវិធីចែកអេក្រង់បំបែក"</string> - <string name="accessibility_action_divider_left_full" msgid="7598733539422375847">"អេក្រង់ពេញខាងឆ្វេង"</string> - <string name="accessibility_action_divider_left_70" msgid="4919312892541727761">"ឆ្វេង 70%"</string> - <string name="accessibility_action_divider_left_50" msgid="3664701169564893826">"ឆ្វេង 50%"</string> - <string name="accessibility_action_divider_left_30" msgid="4358145268046362088">"ឆ្វេង 30%"</string> - <string name="accessibility_action_divider_right_full" msgid="8576057422864896305">"អេក្រង់ពេញខាងស្តាំ"</string> - <string name="accessibility_action_divider_top_full" msgid="4243901660795169777">"អេក្រង់ពេញខាងលើ"</string> - <string name="accessibility_action_divider_top_70" msgid="6941226213260515072">"ខាងលើ 70%"</string> - <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"ខាងលើ 50%"</string> - <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"ខាងលើ 30%"</string> - <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"អេក្រង់ពេញខាងក្រោម"</string> <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"ទីតាំង <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>, ប៉ះពីរដងដើម្បីកែ"</string> <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>, ប៉ះពីរដងដើម្បីបន្ថែម"</string> <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"ផ្លាស់ទី <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string> @@ -898,10 +887,6 @@ <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"ផ្លាស់ទី <xliff:g id="TILE_NAME">%1$s</xliff:g> ទៅទីតាំង <xliff:g id="POSITION">%2$d</xliff:g>"</string> <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"កម្មវិធីកែការកំណត់រហ័ស"</string> <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g> ការជូនដំណឹង៖ <xliff:g id="ID_2">%2$s</xliff:g>"</string> - <string name="dock_forced_resizable" msgid="4689301323912928801">"កម្មវិធីអាចនឹងមិនដំណើរការនៅលើអេក្រង់បំបែកទេ"</string> - <string name="dock_non_resizeble_failed_to_dock_text" msgid="7284915968096153808">"កម្មវិធីមិនគាំទ្រអេក្រង់បំបែកជាពីរទេ"</string> - <string name="forced_resizable_secondary_display" msgid="522558907654394940">"កម្មវិធីនេះប្រហែលជាមិនដំណើរការនៅលើអេក្រង់បន្ទាប់បន្សំទេ។"</string> - <string name="activity_launch_on_secondary_display_failed_text" msgid="8446727617187998208">"កម្មវិធីនេះមិនអាចចាប់ផ្តើមនៅលើអេក្រង់បន្ទាប់បន្សំបានទេ។"</string> <string name="accessibility_quick_settings_settings" msgid="7098489591715844713">"បើកការកំណត់"</string> <string name="accessibility_quick_settings_expand" msgid="2609275052412521467">"បើកការកំណត់រហ័ស"</string> <string name="accessibility_quick_settings_collapse" msgid="4674876336725041982">"បិទការកំណត់រហ័ស"</string> diff --git a/packages/SystemUI/res/values-kn/strings.xml b/packages/SystemUI/res/values-kn/strings.xml index 7ec6a9f54a74..dff9ebd1a072 100644 --- a/packages/SystemUI/res/values-kn/strings.xml +++ b/packages/SystemUI/res/values-kn/strings.xml @@ -879,17 +879,6 @@ </string-array> <string name="tuner_low_priority" msgid="8412666814123009820">"ಕಡಿಮೆ-ಆದ್ಯತೆ ಸೂಚನೆಯ ಐಕಾನ್ಗಳನ್ನು ತೋರಿಸಿ"</string> <string name="other" msgid="429768510980739978">"ಇತರ"</string> - <string name="accessibility_divider" msgid="2830785970889237307">"ಸ್ಪ್ಲಿಟ್-ಪರದೆ ಡಿವೈಡರ್"</string> - <string name="accessibility_action_divider_left_full" msgid="7598733539422375847">"ಎಡ ಪೂರ್ಣ ಪರದೆ"</string> - <string name="accessibility_action_divider_left_70" msgid="4919312892541727761">"70% ಎಡಕ್ಕೆ"</string> - <string name="accessibility_action_divider_left_50" msgid="3664701169564893826">"50% ಎಡಕ್ಕೆ"</string> - <string name="accessibility_action_divider_left_30" msgid="4358145268046362088">"30% ಎಡಕ್ಕೆ"</string> - <string name="accessibility_action_divider_right_full" msgid="8576057422864896305">"ಬಲ ಪೂರ್ಣ ಪರದೆ"</string> - <string name="accessibility_action_divider_top_full" msgid="4243901660795169777">"ಮೇಲಿನ ಪೂರ್ಣ ಪರದೆ"</string> - <string name="accessibility_action_divider_top_70" msgid="6941226213260515072">"70% ಮೇಲಕ್ಕೆ"</string> - <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"50% ಮೇಲಕ್ಕೆ"</string> - <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"30% ಮೇಲಕ್ಕೆ"</string> - <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"ಕೆಳಗಿನ ಪೂರ್ಣ ಪರದೆ"</string> <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"ಸ್ಥಳ <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. ಎಡಿಟ್ ಮಾಡಲು ಡಬಲ್ ಟ್ಯಾಪ್ ಮಾಡಿ."</string> <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. ಸೇರಿಸಲು ಡಬಲ್ ಟ್ಯಾಪ್ ಮಾಡಿ."</string> <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"<xliff:g id="TILE_NAME">%1$s</xliff:g> ಸರಿಸಿ"</string> @@ -898,10 +887,6 @@ <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"<xliff:g id="TILE_NAME">%1$s</xliff:g> ಅನ್ನು <xliff:g id="POSITION">%2$d</xliff:g> ಗೆ ಸರಿಸಿ"</string> <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"ತ್ವರಿತ ಸೆಟ್ಟಿಂಗ್ಗಳ ಎಡಿಟರ್."</string> <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g> ಅಧಿಸೂಚನೆ: <xliff:g id="ID_2">%2$s</xliff:g>"</string> - <string name="dock_forced_resizable" msgid="4689301323912928801">"ವಿಭಜಿಸಿದ ಪರದೆಯಲ್ಲಿ ಅಪ್ಲಿಕೇಶನ್ ಕೆಲಸ ಮಾಡದೇ ಇರಬಹುದು."</string> - <string name="dock_non_resizeble_failed_to_dock_text" msgid="7284915968096153808">"ಅಪ್ಲಿಕೇಶನ್ ಸ್ಪ್ಲಿಟ್ ಸ್ಕ್ರೀನ್ ಅನ್ನು ಬೆಂಬಲಿಸುವುದಿಲ್ಲ."</string> - <string name="forced_resizable_secondary_display" msgid="522558907654394940">"ಸೆಕೆಂಡರಿ ಡಿಸ್ಪ್ಲೇಗಳಲ್ಲಿ ಅಪ್ಲಿಕೇಶನ್ ಕಾರ್ಯ ನಿರ್ವಹಿಸದೇ ಇರಬಹುದು."</string> - <string name="activity_launch_on_secondary_display_failed_text" msgid="8446727617187998208">"ಸೆಕೆಂಡರಿ ಡಿಸ್ಪ್ಲೇಗಳಲ್ಲಿ ಪ್ರಾರಂಭಿಸುವಿಕೆಯನ್ನು ಅಪ್ಲಿಕೇಶನ್ ಬೆಂಬಲಿಸುವುದಿಲ್ಲ."</string> <string name="accessibility_quick_settings_settings" msgid="7098489591715844713">"ಸೆಟ್ಟಿಂಗ್ಗಳನ್ನು ತೆರೆಯಿರಿ."</string> <string name="accessibility_quick_settings_expand" msgid="2609275052412521467">"ತ್ವರಿತ ಸೆಟ್ಟಿಂಗ್ಗಳನ್ನು ತೆರೆಯಿರಿ."</string> <string name="accessibility_quick_settings_collapse" msgid="4674876336725041982">"ತ್ವರಿತ ಸೆಟ್ಟಿಂಗ್ಗಳನ್ನು ಮುಚ್ಚಿ."</string> diff --git a/packages/SystemUI/res/values-ko/strings.xml b/packages/SystemUI/res/values-ko/strings.xml index 840a98e32e23..181888f29161 100644 --- a/packages/SystemUI/res/values-ko/strings.xml +++ b/packages/SystemUI/res/values-ko/strings.xml @@ -879,17 +879,6 @@ </string-array> <string name="tuner_low_priority" msgid="8412666814123009820">"우선순위가 낮은 알림 아이콘 표시"</string> <string name="other" msgid="429768510980739978">"기타"</string> - <string name="accessibility_divider" msgid="2830785970889237307">"화면 분할기"</string> - <string name="accessibility_action_divider_left_full" msgid="7598733539422375847">"왼쪽 화면 전체화면"</string> - <string name="accessibility_action_divider_left_70" msgid="4919312892541727761">"왼쪽 화면 70%"</string> - <string name="accessibility_action_divider_left_50" msgid="3664701169564893826">"왼쪽 화면 50%"</string> - <string name="accessibility_action_divider_left_30" msgid="4358145268046362088">"왼쪽 화면 30%"</string> - <string name="accessibility_action_divider_right_full" msgid="8576057422864896305">"오른쪽 화면 전체화면"</string> - <string name="accessibility_action_divider_top_full" msgid="4243901660795169777">"위쪽 화면 전체화면"</string> - <string name="accessibility_action_divider_top_70" msgid="6941226213260515072">"위쪽 화면 70%"</string> - <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"위쪽 화면 50%"</string> - <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"위쪽 화면 30%"</string> - <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"아래쪽 화면 전체화면"</string> <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"위치 <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. 수정하려면 두 번 탭하세요."</string> <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. 추가하려면 두 번 탭하세요."</string> <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"<xliff:g id="TILE_NAME">%1$s</xliff:g> 이동"</string> @@ -898,10 +887,6 @@ <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"<xliff:g id="TILE_NAME">%1$s</xliff:g> 타일을 위치 <xliff:g id="POSITION">%2$d</xliff:g>(으)로 이동"</string> <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"빠른 설정 편집기"</string> <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g> 알림: <xliff:g id="ID_2">%2$s</xliff:g>"</string> - <string name="dock_forced_resizable" msgid="4689301323912928801">"앱이 분할 화면에서 작동하지 않을 수 있습니다."</string> - <string name="dock_non_resizeble_failed_to_dock_text" msgid="7284915968096153808">"앱이 화면 분할을 지원하지 않습니다."</string> - <string name="forced_resizable_secondary_display" msgid="522558907654394940">"앱이 보조 디스플레이에서 작동하지 않을 수도 있습니다."</string> - <string name="activity_launch_on_secondary_display_failed_text" msgid="8446727617187998208">"앱이 보조 디스플레이에서의 실행을 지원하지 않습니다."</string> <string name="accessibility_quick_settings_settings" msgid="7098489591715844713">"설정 열기"</string> <string name="accessibility_quick_settings_expand" msgid="2609275052412521467">"빠른 설정 열기"</string> <string name="accessibility_quick_settings_collapse" msgid="4674876336725041982">"빠른 설정 닫기"</string> diff --git a/packages/SystemUI/res/values-ky/strings.xml b/packages/SystemUI/res/values-ky/strings.xml index 14ee566d305c..47fc3a8fbf31 100644 --- a/packages/SystemUI/res/values-ky/strings.xml +++ b/packages/SystemUI/res/values-ky/strings.xml @@ -879,17 +879,6 @@ </string-array> <string name="tuner_low_priority" msgid="8412666814123009820">"Анча маанилүү эмес билдирменин сүрөтчөлөрүн көрсөтүү"</string> <string name="other" msgid="429768510980739978">"Башка"</string> - <string name="accessibility_divider" msgid="2830785970889237307">"Экранды бөлгүч"</string> - <string name="accessibility_action_divider_left_full" msgid="7598733539422375847">"Сол жактагы экранды толук экран режимине өткөрүү"</string> - <string name="accessibility_action_divider_left_70" msgid="4919312892541727761">"Сол жактагы экранды 70%"</string> - <string name="accessibility_action_divider_left_50" msgid="3664701169564893826">"Сол жактагы экранды 50%"</string> - <string name="accessibility_action_divider_left_30" msgid="4358145268046362088">"Сол жактагы экранды 30%"</string> - <string name="accessibility_action_divider_right_full" msgid="8576057422864896305">"Оң жактагы экранды толук экран режимине өткөрүү"</string> - <string name="accessibility_action_divider_top_full" msgid="4243901660795169777">"Үстүнкү экранды толук экран режимине өткөрүү"</string> - <string name="accessibility_action_divider_top_70" msgid="6941226213260515072">"Үстүнкү экранды 70%"</string> - <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Үстүнкү экранды 50%"</string> - <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Үстүнкү экранды 30%"</string> - <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Ылдыйкы экранды толук экран режимине өткөрүү"</string> <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Орду - <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Түзөтүү үчүн эки жолу таптаңыз."</string> <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Кошуу үчүн эки жолу таптаңыз."</string> <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"<xliff:g id="TILE_NAME">%1$s</xliff:g> дегенди жылдыруу"</string> @@ -898,10 +887,6 @@ <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"<xliff:g id="TILE_NAME">%1$s</xliff:g> плиткасы <xliff:g id="POSITION">%2$d</xliff:g>-позицияга кошулсун"</string> <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Ыкчам жөндөөлөр түзөткүчү."</string> <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g> эскертмеси: <xliff:g id="ID_2">%2$s</xliff:g>"</string> - <string name="dock_forced_resizable" msgid="4689301323912928801">"Колдонмодо экран бөлүнбөшү мүмкүн."</string> - <string name="dock_non_resizeble_failed_to_dock_text" msgid="7284915968096153808">"Колдонмодо экран бөлүнбөйт."</string> - <string name="forced_resizable_secondary_display" msgid="522558907654394940">"Колдонмо кошумча экранда иштебей коюшу мүмкүн."</string> - <string name="activity_launch_on_secondary_display_failed_text" msgid="8446727617187998208">"Колдонмону кошумча экрандарда иштетүүгө болбойт."</string> <string name="accessibility_quick_settings_settings" msgid="7098489591715844713">"Жөндөөлөрдү ачуу."</string> <string name="accessibility_quick_settings_expand" msgid="2609275052412521467">"Ыкчам жөндөөлөрдү ачуу."</string> <string name="accessibility_quick_settings_collapse" msgid="4674876336725041982">"Ыкчам жөндөөлөрдү жабуу."</string> diff --git a/packages/SystemUI/res/values-lo/strings.xml b/packages/SystemUI/res/values-lo/strings.xml index 553d0da2e295..cb875559011d 100644 --- a/packages/SystemUI/res/values-lo/strings.xml +++ b/packages/SystemUI/res/values-lo/strings.xml @@ -879,17 +879,6 @@ </string-array> <string name="tuner_low_priority" msgid="8412666814123009820">"ສະແດງໄອຄອນການແຈ້ງເຕືອນຄວາມສຳຄັນຕ່ຳ"</string> <string name="other" msgid="429768510980739978">"ອື່ນໆ"</string> - <string name="accessibility_divider" msgid="2830785970889237307">"ຕົວຂັ້ນການແບ່ງໜ້າຈໍ"</string> - <string name="accessibility_action_divider_left_full" msgid="7598733539422375847">"ເຕັມໜ້າຈໍຊ້າຍ"</string> - <string name="accessibility_action_divider_left_70" msgid="4919312892541727761">"ຊ້າຍ 70%"</string> - <string name="accessibility_action_divider_left_50" msgid="3664701169564893826">"ຊ້າຍ 50%"</string> - <string name="accessibility_action_divider_left_30" msgid="4358145268046362088">"ຊ້າຍ 30%"</string> - <string name="accessibility_action_divider_right_full" msgid="8576057422864896305">"ເຕັມໜ້າຈໍຂວາ"</string> - <string name="accessibility_action_divider_top_full" msgid="4243901660795169777">"ເຕັມໜ້າຈໍເທິງສຸດ"</string> - <string name="accessibility_action_divider_top_70" msgid="6941226213260515072">"ເທິງສຸດ 70%"</string> - <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"ເທິງສຸດ 50%"</string> - <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"ເທິງສຸດ 30%"</string> - <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"ເຕັມໜ້າຈໍລຸ່ມສຸດ"</string> <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"ຕຳແໜ່ງ <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. ແຕະສອງເທື່ອເພື່ອແກ້ໄຂ."</string> <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. ແຕະສອງເທື່ອເພື່ອເພີ່ມ."</string> <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"ຍ້າຍ <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string> @@ -898,10 +887,6 @@ <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"ຍ້າຍ <xliff:g id="TILE_NAME">%1$s</xliff:g> ໄປຕຳແໜ່ງ <xliff:g id="POSITION">%2$d</xliff:g>"</string> <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"ຕົວແກ້ໄຂການຕັ້ງຄ່າດ່ວນ"</string> <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"ການແຈ້ງເຕືອນ <xliff:g id="ID_1">%1$s</xliff:g>: <xliff:g id="ID_2">%2$s</xliff:g>"</string> - <string name="dock_forced_resizable" msgid="4689301323912928801">"ແອັບອາດໃຊ້ບໍ່ໄດ້ກັບການແບ່ງໜ້າຈໍ."</string> - <string name="dock_non_resizeble_failed_to_dock_text" msgid="7284915968096153808">"ແອັບບໍ່ຮອງຮັບໜ້າຈໍແບບແຍກກັນ."</string> - <string name="forced_resizable_secondary_display" msgid="522558907654394940">"ແອັບອາດບໍ່ສາມາດໃຊ້ໄດ້ໃນໜ້າຈໍທີສອງ."</string> - <string name="activity_launch_on_secondary_display_failed_text" msgid="8446727617187998208">"ແອັບບໍ່ຮອງຮັບການເປີດໃນໜ້າຈໍທີສອງ."</string> <string name="accessibility_quick_settings_settings" msgid="7098489591715844713">"ເປີດການຕັ້ງຄ່າ."</string> <string name="accessibility_quick_settings_expand" msgid="2609275052412521467">"ເປີດການຕັ້ງຄ່າດ່ວນ."</string> <string name="accessibility_quick_settings_collapse" msgid="4674876336725041982">"ປິດການຕັ້ງຄ່າດ່ວນ."</string> diff --git a/packages/SystemUI/res/values-lt/strings.xml b/packages/SystemUI/res/values-lt/strings.xml index 28d6e6b35431..ac90c0f58e68 100644 --- a/packages/SystemUI/res/values-lt/strings.xml +++ b/packages/SystemUI/res/values-lt/strings.xml @@ -889,17 +889,6 @@ </string-array> <string name="tuner_low_priority" msgid="8412666814123009820">"Rodyti mažo prioriteto pranešimų piktogramas"</string> <string name="other" msgid="429768510980739978">"Kita"</string> - <string name="accessibility_divider" msgid="2830785970889237307">"Skaidyto ekrano daliklis"</string> - <string name="accessibility_action_divider_left_full" msgid="7598733539422375847">"Kairysis ekranas viso ekrano režimu"</string> - <string name="accessibility_action_divider_left_70" msgid="4919312892541727761">"Kairysis ekranas 70 %"</string> - <string name="accessibility_action_divider_left_50" msgid="3664701169564893826">"Kairysis ekranas 50 %"</string> - <string name="accessibility_action_divider_left_30" msgid="4358145268046362088">"Kairysis ekranas 30 %"</string> - <string name="accessibility_action_divider_right_full" msgid="8576057422864896305">"Dešinysis ekranas viso ekrano režimu"</string> - <string name="accessibility_action_divider_top_full" msgid="4243901660795169777">"Viršutinis ekranas viso ekrano režimu"</string> - <string name="accessibility_action_divider_top_70" msgid="6941226213260515072">"Viršutinis ekranas 70 %"</string> - <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Viršutinis ekranas 50 %"</string> - <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Viršutinis ekranas 30 %"</string> - <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Apatinis ekranas viso ekrano režimu"</string> <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"<xliff:g id="POSITION">%1$d</xliff:g> padėtis, išklotinės elementas „<xliff:g id="TILE_NAME">%2$s</xliff:g>“. Dukart palieskite, kad redaguotumėte."</string> <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"Išklotinės elementas „<xliff:g id="TILE_NAME">%1$s</xliff:g>“. Dukart palieskite, kad pridėtumėte."</string> <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Perkelti išklotinės elementą „<xliff:g id="TILE_NAME">%1$s</xliff:g>“"</string> @@ -908,10 +897,6 @@ <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Perkelti išklotinės elementą „<xliff:g id="TILE_NAME">%1$s</xliff:g>“ į <xliff:g id="POSITION">%2$d</xliff:g> padėtį"</string> <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Sparčiųjų nustatymų redagavimo priemonė."</string> <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"„<xliff:g id="ID_1">%1$s</xliff:g>“ pranešimas: <xliff:g id="ID_2">%2$s</xliff:g>"</string> - <string name="dock_forced_resizable" msgid="4689301323912928801">"Programa gali neveikti naudojant skaidytą ekraną."</string> - <string name="dock_non_resizeble_failed_to_dock_text" msgid="7284915968096153808">"Programoje nepalaikomas skaidytas ekranas."</string> - <string name="forced_resizable_secondary_display" msgid="522558907654394940">"Programa gali neveikti antriniame ekrane."</string> - <string name="activity_launch_on_secondary_display_failed_text" msgid="8446727617187998208">"Programa nepalaiko paleisties antriniuose ekranuose."</string> <string name="accessibility_quick_settings_settings" msgid="7098489591715844713">"Atidaryti nustatymus."</string> <string name="accessibility_quick_settings_expand" msgid="2609275052412521467">"Atidaryti sparčiuosius nustatymus."</string> <string name="accessibility_quick_settings_collapse" msgid="4674876336725041982">"Uždaryti sparčiuosius nustatymus."</string> diff --git a/packages/SystemUI/res/values-lv/strings.xml b/packages/SystemUI/res/values-lv/strings.xml index 223a57fdb640..2f5edd3f0d9f 100644 --- a/packages/SystemUI/res/values-lv/strings.xml +++ b/packages/SystemUI/res/values-lv/strings.xml @@ -884,17 +884,6 @@ </string-array> <string name="tuner_low_priority" msgid="8412666814123009820">"Rādīt zemas prioritātes paziņojumu ikonas"</string> <string name="other" msgid="429768510980739978">"Citi"</string> - <string name="accessibility_divider" msgid="2830785970889237307">"Ekrāna sadalītājs"</string> - <string name="accessibility_action_divider_left_full" msgid="7598733539422375847">"Kreisā daļa pa visu ekrānu"</string> - <string name="accessibility_action_divider_left_70" msgid="4919312892541727761">"Pa kreisi 70%"</string> - <string name="accessibility_action_divider_left_50" msgid="3664701169564893826">"Pa kreisi 50%"</string> - <string name="accessibility_action_divider_left_30" msgid="4358145268046362088">"Pa kreisi 30%"</string> - <string name="accessibility_action_divider_right_full" msgid="8576057422864896305">"Labā daļa pa visu ekrānu"</string> - <string name="accessibility_action_divider_top_full" msgid="4243901660795169777">"Augšdaļa pa visu ekrānu"</string> - <string name="accessibility_action_divider_top_70" msgid="6941226213260515072">"Augšdaļa 70%"</string> - <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Augšdaļa 50%"</string> - <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Augšdaļa 30%"</string> - <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Apakšdaļu pa visu ekrānu"</string> <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"<xliff:g id="POSITION">%1$d</xliff:g>. pozīcija, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Lai rediģētu, veiciet dubultskārienu."</string> <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Lai pievienotu, veiciet dubultskārienu."</string> <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Pārvietot elementu <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string> @@ -903,10 +892,6 @@ <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Pārvietot elementu “<xliff:g id="TILE_NAME">%1$s</xliff:g>” uz <xliff:g id="POSITION">%2$d</xliff:g>. pozīciju"</string> <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Ātro iestatījumu redaktors."</string> <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g> paziņojums: <xliff:g id="ID_2">%2$s</xliff:g>"</string> - <string name="dock_forced_resizable" msgid="4689301323912928801">"Iespējams, lietotnē nedarbosies ekrāna sadalīšana."</string> - <string name="dock_non_resizeble_failed_to_dock_text" msgid="7284915968096153808">"Lietotnē netiek atbalstīta ekrāna sadalīšana."</string> - <string name="forced_resizable_secondary_display" msgid="522558907654394940">"Lietotne, iespējams, nedarbosies sekundārajā displejā."</string> - <string name="activity_launch_on_secondary_display_failed_text" msgid="8446727617187998208">"Lietotnē netiek atbalstīta palaišana sekundārajos displejos."</string> <string name="accessibility_quick_settings_settings" msgid="7098489591715844713">"Atvērt iestatījumus."</string> <string name="accessibility_quick_settings_expand" msgid="2609275052412521467">"Atvērt ātros iestatījumus."</string> <string name="accessibility_quick_settings_collapse" msgid="4674876336725041982">"Aizvērt ātros iestatījumus."</string> diff --git a/packages/SystemUI/res/values-mcc310-mnc004/strings.xml b/packages/SystemUI/res/values-mcc310-mnc004/strings.xml new file mode 100644 index 000000000000..f8ed0c01fa83 --- /dev/null +++ b/packages/SystemUI/res/values-mcc310-mnc004/strings.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/** + * Copyright (c) 2020, The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +--> +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <!-- Content description of the data connection type 5G UW. [CHAR LIMIT=NONE] --> + <string name="data_connection_5g_plus" translatable="false">5G UW</string> +</resources> diff --git a/packages/SystemUI/res/values-mcc311-mnc480/strings.xml b/packages/SystemUI/res/values-mcc311-mnc480/strings.xml new file mode 100644 index 000000000000..f8ed0c01fa83 --- /dev/null +++ b/packages/SystemUI/res/values-mcc311-mnc480/strings.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/** + * Copyright (c) 2020, The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +--> +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <!-- Content description of the data connection type 5G UW. [CHAR LIMIT=NONE] --> + <string name="data_connection_5g_plus" translatable="false">5G UW</string> +</resources> diff --git a/packages/SystemUI/res/values-mk/strings.xml b/packages/SystemUI/res/values-mk/strings.xml index a591031cabba..de9cf0fb57bf 100644 --- a/packages/SystemUI/res/values-mk/strings.xml +++ b/packages/SystemUI/res/values-mk/strings.xml @@ -879,17 +879,6 @@ </string-array> <string name="tuner_low_priority" msgid="8412666814123009820">"Прикажувај икони за известувања со низок приоритет"</string> <string name="other" msgid="429768510980739978">"Друго"</string> - <string name="accessibility_divider" msgid="2830785970889237307">"Разделник на поделен екран"</string> - <string name="accessibility_action_divider_left_full" msgid="7598733539422375847">"Левиот на цел екран"</string> - <string name="accessibility_action_divider_left_70" msgid="4919312892541727761">"Левиот 70%"</string> - <string name="accessibility_action_divider_left_50" msgid="3664701169564893826">"Левиот 50%"</string> - <string name="accessibility_action_divider_left_30" msgid="4358145268046362088">"Левиот 30%"</string> - <string name="accessibility_action_divider_right_full" msgid="8576057422864896305">"Десниот на цел екран"</string> - <string name="accessibility_action_divider_top_full" msgid="4243901660795169777">"Горниот на цел екран"</string> - <string name="accessibility_action_divider_top_70" msgid="6941226213260515072">"Горниот 70%"</string> - <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Горниот 50%"</string> - <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Горниот 30%"</string> - <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Долниот на цел екран"</string> <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Место <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Допрете двапати за уредување."</string> <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Допрете двапати за додавање."</string> <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Преместете <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string> @@ -898,10 +887,6 @@ <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Преместете <xliff:g id="TILE_NAME">%1$s</xliff:g> на позицијата <xliff:g id="POSITION">%2$d</xliff:g>"</string> <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Уредник за брзи поставки."</string> <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"Известување од <xliff:g id="ID_1">%1$s</xliff:g>: <xliff:g id="ID_2">%2$s</xliff:g>"</string> - <string name="dock_forced_resizable" msgid="4689301323912928801">"Апликацијата можеби нема да работи во поделен екран."</string> - <string name="dock_non_resizeble_failed_to_dock_text" msgid="7284915968096153808">"Апликацијата не поддржува поделен екран."</string> - <string name="forced_resizable_secondary_display" msgid="522558907654394940">"Апликацијата може да не функционира на друг екран."</string> - <string name="activity_launch_on_secondary_display_failed_text" msgid="8446727617187998208">"Апликацијата не поддржува стартување на други екрани."</string> <string name="accessibility_quick_settings_settings" msgid="7098489591715844713">"Отворете ги поставките."</string> <string name="accessibility_quick_settings_expand" msgid="2609275052412521467">"Отворете ги брзите поставки."</string> <string name="accessibility_quick_settings_collapse" msgid="4674876336725041982">"Затворете ги брзите поставки."</string> diff --git a/packages/SystemUI/res/values-ml/strings.xml b/packages/SystemUI/res/values-ml/strings.xml index 47d220df5bde..bd5187456574 100644 --- a/packages/SystemUI/res/values-ml/strings.xml +++ b/packages/SystemUI/res/values-ml/strings.xml @@ -879,17 +879,6 @@ </string-array> <string name="tuner_low_priority" msgid="8412666814123009820">"പ്രാധാന്യം കുറഞ്ഞ അറിയിപ്പ് ചിഹ്നങ്ങൾ"</string> <string name="other" msgid="429768510980739978">"മറ്റുള്ളവ"</string> - <string name="accessibility_divider" msgid="2830785970889237307">"സ്പ്ലിറ്റ്-സ്ക്രീൻ ഡിവൈഡർ"</string> - <string name="accessibility_action_divider_left_full" msgid="7598733539422375847">"ഇടത് പൂർണ്ണ സ്ക്രീൻ"</string> - <string name="accessibility_action_divider_left_70" msgid="4919312892541727761">"ഇടത് 70%"</string> - <string name="accessibility_action_divider_left_50" msgid="3664701169564893826">"ഇടത് 50%"</string> - <string name="accessibility_action_divider_left_30" msgid="4358145268046362088">"ഇടത് 30%"</string> - <string name="accessibility_action_divider_right_full" msgid="8576057422864896305">"വലത് പൂർണ്ണ സ്ക്രീൻ"</string> - <string name="accessibility_action_divider_top_full" msgid="4243901660795169777">"മുകളിൽ പൂർണ്ണ സ്ക്രീൻ"</string> - <string name="accessibility_action_divider_top_70" msgid="6941226213260515072">"മുകളിൽ 70%"</string> - <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"മുകളിൽ 50%"</string> - <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"മുകളിൽ 30%"</string> - <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"താഴെ പൂർണ്ണ സ്ക്രീൻ"</string> <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"സ്ഥാനം <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. എഡിറ്റുചെയ്യുന്നതിന് രണ്ടുതവണ ടാപ്പുചെയ്യുക."</string> <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. ചേർക്കാൻ രണ്ടുതവണ ടാപ്പുചെയ്യുക."</string> <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"<xliff:g id="TILE_NAME">%1$s</xliff:g> നീക്കുക"</string> @@ -898,10 +887,6 @@ <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"<xliff:g id="POSITION">%2$d</xliff:g> സ്ഥാനത്തേയ്ക്ക് <xliff:g id="TILE_NAME">%1$s</xliff:g> നീക്കുക"</string> <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"ദ്രുത ക്രമീകരണ എഡിറ്റർ."</string> <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g> അറിയിപ്പ്: <xliff:g id="ID_2">%2$s</xliff:g>"</string> - <string name="dock_forced_resizable" msgid="4689301323912928801">"സ്പ്ലിറ്റ്-സ്ക്രീനിനൊപ്പം ആപ്പ് പ്രവർത്തിച്ചേക്കില്ല."</string> - <string name="dock_non_resizeble_failed_to_dock_text" msgid="7284915968096153808">"സ്പ്ലിറ്റ്-സ്ക്രീനിനെ ആപ്പ് പിന്തുണയ്ക്കുന്നില്ല."</string> - <string name="forced_resizable_secondary_display" msgid="522558907654394940">"രണ്ടാം ഡിസ്പ്ലേയിൽ ആപ്പ് പ്രവർത്തിച്ചേക്കില്ല."</string> - <string name="activity_launch_on_secondary_display_failed_text" msgid="8446727617187998208">"രണ്ടാം ഡിസ്പ്ലേകളിൽ സമാരംഭിക്കുന്നതിനെ ആപ്പ് അനുവദിക്കുന്നില്ല."</string> <string name="accessibility_quick_settings_settings" msgid="7098489591715844713">"ക്രമീകരണം തുറക്കുക."</string> <string name="accessibility_quick_settings_expand" msgid="2609275052412521467">"ദ്രുത ക്രമീകരണം തുറക്കുക."</string> <string name="accessibility_quick_settings_collapse" msgid="4674876336725041982">"ദ്രുത ക്രമീകരണം അടയ്ക്കുക."</string> diff --git a/packages/SystemUI/res/values-mn/strings.xml b/packages/SystemUI/res/values-mn/strings.xml index 202f292503b0..14401030fb21 100644 --- a/packages/SystemUI/res/values-mn/strings.xml +++ b/packages/SystemUI/res/values-mn/strings.xml @@ -879,17 +879,6 @@ </string-array> <string name="tuner_low_priority" msgid="8412666814123009820">"Бага ач холбогдолтой мэдэгдлийн дүрс тэмдгийг харуулах"</string> <string name="other" msgid="429768510980739978">"Бусад"</string> - <string name="accessibility_divider" msgid="2830785970889237307">"\"Дэлгэц хуваах\" хуваагч"</string> - <string name="accessibility_action_divider_left_full" msgid="7598733539422375847">"Зүүн талын бүтэн дэлгэц"</string> - <string name="accessibility_action_divider_left_70" msgid="4919312892541727761">"Зүүн 70%"</string> - <string name="accessibility_action_divider_left_50" msgid="3664701169564893826">"Зүүн 50%"</string> - <string name="accessibility_action_divider_left_30" msgid="4358145268046362088">"Зүүн 30%"</string> - <string name="accessibility_action_divider_right_full" msgid="8576057422864896305">"Баруун талын бүтэн дэлгэц"</string> - <string name="accessibility_action_divider_top_full" msgid="4243901660795169777">"Дээд талын бүтэн дэлгэц"</string> - <string name="accessibility_action_divider_top_70" msgid="6941226213260515072">"Дээд 70%"</string> - <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Дээд 50%"</string> - <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Дээд 30%"</string> - <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Доод бүтэн дэлгэц"</string> <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Байршил <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Засахын тулд 2 удаа дарна уу."</string> <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Нэмэхийн тулд 2 удаа дарна уу."</string> <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"<xliff:g id="TILE_NAME">%1$s</xliff:g>-г зөөх"</string> @@ -898,10 +887,6 @@ <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"<xliff:g id="TILE_NAME">%1$s</xliff:g>-г байрлал <xliff:g id="POSITION">%2$d</xliff:g> руу зөөх"</string> <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Түргэн тохиргоо засварлагч."</string> <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g> мэдэгдэл: <xliff:g id="ID_2">%2$s</xliff:g>"</string> - <string name="dock_forced_resizable" msgid="4689301323912928801">"Апп хуваагдсан дэлгэцэд ажиллахгүй."</string> - <string name="dock_non_resizeble_failed_to_dock_text" msgid="7284915968096153808">"Энэ апп нь дэлгэц хуваах тохиргоог дэмждэггүй."</string> - <string name="forced_resizable_secondary_display" msgid="522558907654394940">"Апп хоёрдогч дэлгэцэд ажиллахгүй."</string> - <string name="activity_launch_on_secondary_display_failed_text" msgid="8446727617187998208">"Аппыг хоёрдогч дэлгэцэд эхлүүлэх боломжгүй."</string> <string name="accessibility_quick_settings_settings" msgid="7098489591715844713">"Тохиргоог нээнэ үү."</string> <string name="accessibility_quick_settings_expand" msgid="2609275052412521467">"Шуурхай тохиргоог нээнэ үү."</string> <string name="accessibility_quick_settings_collapse" msgid="4674876336725041982">"Хурдан тохиргоог хаана уу."</string> diff --git a/packages/SystemUI/res/values-mr/strings.xml b/packages/SystemUI/res/values-mr/strings.xml index e4120726c66c..32fe7bdecb42 100644 --- a/packages/SystemUI/res/values-mr/strings.xml +++ b/packages/SystemUI/res/values-mr/strings.xml @@ -879,17 +879,6 @@ </string-array> <string name="tuner_low_priority" msgid="8412666814123009820">"कमी प्राधान्य सूचना आयकन दर्शवा"</string> <string name="other" msgid="429768510980739978">"अन्य"</string> - <string name="accessibility_divider" msgid="2830785970889237307">"विभाजित-स्क्रीन विभाजक"</string> - <string name="accessibility_action_divider_left_full" msgid="7598733539422375847">"डावी फुल स्क्रीन"</string> - <string name="accessibility_action_divider_left_70" msgid="4919312892541727761">"डावी 70%"</string> - <string name="accessibility_action_divider_left_50" msgid="3664701169564893826">"डावी 50%"</string> - <string name="accessibility_action_divider_left_30" msgid="4358145268046362088">"डावी 30%"</string> - <string name="accessibility_action_divider_right_full" msgid="8576057422864896305">"उजवी फुल स्क्रीन"</string> - <string name="accessibility_action_divider_top_full" msgid="4243901660795169777">"शीर्ष फुल स्क्रीन"</string> - <string name="accessibility_action_divider_top_70" msgid="6941226213260515072">"शीर्ष 70%"</string> - <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"शीर्ष 50%"</string> - <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"शीर्ष 10"</string> - <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"तळाशी फुल स्क्रीन"</string> <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"स्थिती <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. संपादित करण्यासाठी दोनदा टॅप करा."</string> <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g> . जोडण्यासाठी दोनदा टॅप करा."</string> <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"<xliff:g id="TILE_NAME">%1$s</xliff:g> हलवा"</string> @@ -898,10 +887,6 @@ <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"<xliff:g id="TILE_NAME">%1$s</xliff:g> <xliff:g id="POSITION">%2$d</xliff:g> स्थानावर हलवा"</string> <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"द्रुत सेटिंग्ज संपादक."</string> <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g> सूचना: <xliff:g id="ID_2">%2$s</xliff:g>"</string> - <string name="dock_forced_resizable" msgid="4689301323912928801">"अॅप कदाचित विभाजित-स्क्रीनसह कार्य करू शकत नाही."</string> - <string name="dock_non_resizeble_failed_to_dock_text" msgid="7284915968096153808">"अॅप स्क्रीन-विभाजनास समर्थन देत नाही."</string> - <string name="forced_resizable_secondary_display" msgid="522558907654394940">"दुसऱ्या डिस्प्लेवर अॅप कदाचित चालणार नाही."</string> - <string name="activity_launch_on_secondary_display_failed_text" msgid="8446727617187998208">"दुसऱ्या डिस्प्लेवर अॅप लाँच होणार नाही."</string> <string name="accessibility_quick_settings_settings" msgid="7098489591715844713">"सेटिंग्ज उघडा."</string> <string name="accessibility_quick_settings_expand" msgid="2609275052412521467">"जलद सेटिंग्ज उघडा."</string> <string name="accessibility_quick_settings_collapse" msgid="4674876336725041982">"जलद सेटिंग्ज बंद करा."</string> diff --git a/packages/SystemUI/res/values-ms/strings.xml b/packages/SystemUI/res/values-ms/strings.xml index 0331d26e4ec7..fe246d1a6129 100644 --- a/packages/SystemUI/res/values-ms/strings.xml +++ b/packages/SystemUI/res/values-ms/strings.xml @@ -879,17 +879,6 @@ </string-array> <string name="tuner_low_priority" msgid="8412666814123009820">"Tunjukkan ikon pemberitahuan keutamaan rendah"</string> <string name="other" msgid="429768510980739978">"Lain-lain"</string> - <string name="accessibility_divider" msgid="2830785970889237307">"Pembahagi skrin pisah"</string> - <string name="accessibility_action_divider_left_full" msgid="7598733539422375847">"Skrin penuh kiri"</string> - <string name="accessibility_action_divider_left_70" msgid="4919312892541727761">"Kiri 70%"</string> - <string name="accessibility_action_divider_left_50" msgid="3664701169564893826">"Kiri 50%"</string> - <string name="accessibility_action_divider_left_30" msgid="4358145268046362088">"Kiri 30%"</string> - <string name="accessibility_action_divider_right_full" msgid="8576057422864896305">"Skrin penuh kanan"</string> - <string name="accessibility_action_divider_top_full" msgid="4243901660795169777">"Skrin penuh atas"</string> - <string name="accessibility_action_divider_top_70" msgid="6941226213260515072">"Atas 70%"</string> - <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Atas 50%"</string> - <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Atas 30%"</string> - <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Skrin penuh bawah"</string> <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Kedudukan <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Dwiketik untuk mengedit."</string> <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Dwiketik untuk menambah."</string> <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Alihkan <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string> @@ -898,10 +887,6 @@ <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Alihkan <xliff:g id="TILE_NAME">%1$s</xliff:g> ke kedudukan <xliff:g id="POSITION">%2$d</xliff:g>"</string> <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Editor tetapan pantas."</string> <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"Pemberitahuan <xliff:g id="ID_1">%1$s</xliff:g>: <xliff:g id="ID_2">%2$s</xliff:g>"</string> - <string name="dock_forced_resizable" msgid="4689301323912928801">"Apl mungkin tidak berfungsi dengan skrin pisah."</string> - <string name="dock_non_resizeble_failed_to_dock_text" msgid="7284915968096153808">"Apl tidak menyokong skrin pisah."</string> - <string name="forced_resizable_secondary_display" msgid="522558907654394940">"Apl mungkin tidak berfungsi pada paparan kedua."</string> - <string name="activity_launch_on_secondary_display_failed_text" msgid="8446727617187998208">"Apl tidak menyokong pelancaran pada paparan kedua."</string> <string name="accessibility_quick_settings_settings" msgid="7098489591715844713">"Buka tetapan."</string> <string name="accessibility_quick_settings_expand" msgid="2609275052412521467">"Buka tetapan pantas."</string> <string name="accessibility_quick_settings_collapse" msgid="4674876336725041982">"Tutup tetapan pantas."</string> diff --git a/packages/SystemUI/res/values-my/strings.xml b/packages/SystemUI/res/values-my/strings.xml index 83272f2a43c4..53c02a54ef7c 100644 --- a/packages/SystemUI/res/values-my/strings.xml +++ b/packages/SystemUI/res/values-my/strings.xml @@ -879,17 +879,6 @@ </string-array> <string name="tuner_low_priority" msgid="8412666814123009820">"အရေးမကြီးသော အကြောင်းကြားချက် သင်္ကေတများ ပြရန်"</string> <string name="other" msgid="429768510980739978">"အခြား"</string> - <string name="accessibility_divider" msgid="2830785970889237307">"မျက်နှာပြင်ခွဲခြမ်း ပိုင်းခြားပေးသည့်စနစ်"</string> - <string name="accessibility_action_divider_left_full" msgid="7598733539422375847">"ဘယ်ဘက် မျက်နှာပြင်အပြည့်"</string> - <string name="accessibility_action_divider_left_70" msgid="4919312892541727761">"ဘယ်ဘက်မျက်နှာပြင် ၇၀%"</string> - <string name="accessibility_action_divider_left_50" msgid="3664701169564893826">"ဘယ်ဘက် မျက်နှာပြင် ၅၀%"</string> - <string name="accessibility_action_divider_left_30" msgid="4358145268046362088">"ဘယ်ဘက် မျက်နှာပြင် ၃၀%"</string> - <string name="accessibility_action_divider_right_full" msgid="8576057422864896305">"ညာဘက် မျက်နှာပြင်အပြည့်"</string> - <string name="accessibility_action_divider_top_full" msgid="4243901660795169777">"အပေါ်ဘက် မျက်နှာပြင်အပြည့်"</string> - <string name="accessibility_action_divider_top_70" msgid="6941226213260515072">"အပေါ်ဘက် မျက်နှာပြင် ၇၀%"</string> - <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"အပေါ်ဘက် မျက်နှာပြင် ၅၀%"</string> - <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"အပေါ်ဘက် မျက်နှာပြင် ၃၀%"</string> - <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"အောက်ခြေ မျက်နှာပြင်အပြည့်"</string> <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"<xliff:g id="POSITION">%1$d</xliff:g>၊ <xliff:g id="TILE_NAME">%2$s</xliff:g> နေရာ။ တည်းဖြတ်ရန် နှစ်ချက်တို့ပါ။"</string> <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>။ ပေါင်းထည့်ရန် နှစ်ချက်တို့ပါ။"</string> <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"<xliff:g id="TILE_NAME">%1$s</xliff:g> ကိုရွှေ့ပါ"</string> @@ -898,10 +887,6 @@ <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"<xliff:g id="TILE_NAME">%1$s</xliff:g> ကို အနေအထား <xliff:g id="POSITION">%2$d</xliff:g> သို့ ရွှေ့ရန်"</string> <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"မြန်ဆန်သည့် ဆက်တင်တည်းဖြတ်စနစ်"</string> <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g> အကြောင်းကြားချက် − <xliff:g id="ID_2">%2$s</xliff:g>"</string> - <string name="dock_forced_resizable" msgid="4689301323912928801">"မျက်နှာပြင် ခွဲခြမ်းပြသမှုဖြင့် အက်ပ်သည် အလုပ်လုပ်မည် မဟုတ်ပါ။"</string> - <string name="dock_non_resizeble_failed_to_dock_text" msgid="7284915968096153808">"အက်ပ်သည် မျက်နှာပြင်ခွဲပြရန် ပံ့ပိုးထားခြင်းမရှိပါ။"</string> - <string name="forced_resizable_secondary_display" msgid="522558907654394940">"ဤအက်ပ်အနေဖြင့် ဒုတိယဖန်သားပြင်ပေါ်တွင် အလုပ်လုပ်မည် မဟုတ်ပါ။"</string> - <string name="activity_launch_on_secondary_display_failed_text" msgid="8446727617187998208">"ဤအက်ပ်အနေဖြင့် ဖွင့်ရန်စနစ်ကို ဒုတိယဖန်သားပြင်မှ အသုံးပြုရန် ပံ့ပိုးမထားပါ။"</string> <string name="accessibility_quick_settings_settings" msgid="7098489591715844713">"ဆက်တင်များကို ဖွင့်ပါ။"</string> <string name="accessibility_quick_settings_expand" msgid="2609275052412521467">"အမြန်ဆက်တင်များကို ဖွင့်ပါ။"</string> <string name="accessibility_quick_settings_collapse" msgid="4674876336725041982">"အမြန်ဆက်တင်များကို ပိတ်ပါ။"</string> diff --git a/packages/SystemUI/res/values-nb/strings.xml b/packages/SystemUI/res/values-nb/strings.xml index 01859ef5a13e..5c9f63f3a797 100644 --- a/packages/SystemUI/res/values-nb/strings.xml +++ b/packages/SystemUI/res/values-nb/strings.xml @@ -879,17 +879,6 @@ </string-array> <string name="tuner_low_priority" msgid="8412666814123009820">"Vis ikoner for varsler med lav prioritet"</string> <string name="other" msgid="429768510980739978">"Annet"</string> - <string name="accessibility_divider" msgid="2830785970889237307">"Skilleelement for delt skjerm"</string> - <string name="accessibility_action_divider_left_full" msgid="7598733539422375847">"Utvid den venstre delen av skjermen til hele skjermen"</string> - <string name="accessibility_action_divider_left_70" msgid="4919312892541727761">"Sett størrelsen på den venstre delen av skjermen til 70 %"</string> - <string name="accessibility_action_divider_left_50" msgid="3664701169564893826">"Sett størrelsen på den venstre delen av skjermen til 50 %"</string> - <string name="accessibility_action_divider_left_30" msgid="4358145268046362088">"Sett størrelsen på den venstre delen av skjermen til 30 %"</string> - <string name="accessibility_action_divider_right_full" msgid="8576057422864896305">"Utvid den høyre delen av skjermen til hele skjermen"</string> - <string name="accessibility_action_divider_top_full" msgid="4243901660795169777">"Utvid den øverste delen av skjermen til hele skjermen"</string> - <string name="accessibility_action_divider_top_70" msgid="6941226213260515072">"Sett størrelsen på den øverste delen av skjermen til 70 %"</string> - <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Sett størrelsen på den øverste delen av skjermen til 50 %"</string> - <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Sett størrelsen på den øverste delen av skjermen til 30 %"</string> - <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Utvid den nederste delen av skjermen til hele skjermen"</string> <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Plassering <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Dobbelttrykk for å endre."</string> <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Dobbelttrykk for å legge til."</string> <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Flytt <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string> @@ -898,10 +887,6 @@ <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Flytt <xliff:g id="TILE_NAME">%1$s</xliff:g> til posisjon <xliff:g id="POSITION">%2$d</xliff:g>"</string> <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Redigeringsvindu for hurtiginnstillinger."</string> <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g>-varsel: <xliff:g id="ID_2">%2$s</xliff:g>"</string> - <string name="dock_forced_resizable" msgid="4689301323912928801">"Det kan hende at appen ikke fungerer med delt skjerm."</string> - <string name="dock_non_resizeble_failed_to_dock_text" msgid="7284915968096153808">"Appen støtter ikke delt skjerm."</string> - <string name="forced_resizable_secondary_display" msgid="522558907654394940">"Appen fungerer kanskje ikke på en sekundær skjerm."</string> - <string name="activity_launch_on_secondary_display_failed_text" msgid="8446727617187998208">"Appen kan ikke kjøres på sekundære skjermer."</string> <string name="accessibility_quick_settings_settings" msgid="7098489591715844713">"Åpne innstillingene."</string> <string name="accessibility_quick_settings_expand" msgid="2609275052412521467">"Åpner hurtiginnstillingene."</string> <string name="accessibility_quick_settings_collapse" msgid="4674876336725041982">"Lukk hurtiginnstillingene."</string> diff --git a/packages/SystemUI/res/values-ne/strings.xml b/packages/SystemUI/res/values-ne/strings.xml index 196b4ad2f94e..791e4d3d3f20 100644 --- a/packages/SystemUI/res/values-ne/strings.xml +++ b/packages/SystemUI/res/values-ne/strings.xml @@ -879,17 +879,6 @@ </string-array> <string name="tuner_low_priority" msgid="8412666814123009820">"कम प्राथमिकताका सूचना आइकनहरू देखाउनुहोस्"</string> <string name="other" msgid="429768510980739978">"अन्य"</string> - <string name="accessibility_divider" msgid="2830785970889237307">"विभाजित-स्क्रिन छुट्याउने"</string> - <string name="accessibility_action_divider_left_full" msgid="7598733539422375847">"बायाँ भाग फुल स्क्रिन"</string> - <string name="accessibility_action_divider_left_70" msgid="4919312892541727761">"बायाँ भाग ७०%"</string> - <string name="accessibility_action_divider_left_50" msgid="3664701169564893826">"बायाँ भाग ५०%"</string> - <string name="accessibility_action_divider_left_30" msgid="4358145268046362088">"बायाँ भाग ३०%"</string> - <string name="accessibility_action_divider_right_full" msgid="8576057422864896305">"दायाँ भाग फुल स्क्रिन"</string> - <string name="accessibility_action_divider_top_full" msgid="4243901660795169777">"माथिल्लो भाग फुल स्क्रिन"</string> - <string name="accessibility_action_divider_top_70" msgid="6941226213260515072">"माथिल्लो भाग ७०%"</string> - <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"माथिल्लो भाग ५०%"</string> - <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"माथिल्लो भाग ३०%"</string> - <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"तल्लो भाग फुल स्क्रिन"</string> <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"स्थिति <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>। सम्पादन गर्नाका लागि डबल ट्याप गर्नुहोस्।"</string> <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>। थप्नका लागि डबल ट्याप गर्नुहोस्।"</string> <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"<xliff:g id="TILE_NAME">%1$s</xliff:g> लाई सार्नुहोस्"</string> @@ -898,10 +887,6 @@ <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"<xliff:g id="TILE_NAME">%1$s</xliff:g> लाई <xliff:g id="POSITION">%2$d</xliff:g> स्थितिमा सार्नुहोस्"</string> <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"द्रुत सेटिङ सम्पादक।"</string> <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g> को सूचना: <xliff:g id="ID_2">%2$s</xliff:g>"</string> - <string name="dock_forced_resizable" msgid="4689301323912928801">"अनुप्रयोगले विभाजित-स्क्रिनमा काम नगर्न सक्छ।"</string> - <string name="dock_non_resizeble_failed_to_dock_text" msgid="7284915968096153808">"अनुप्रयोगले विभाजित-स्क्रिनलाई समर्थन गर्दैन।"</string> - <string name="forced_resizable_secondary_display" msgid="522558907654394940">"यो अनुप्रयोगले सहायक प्रदर्शनमा काम नगर्नसक्छ।"</string> - <string name="activity_launch_on_secondary_display_failed_text" msgid="8446727617187998208">"अनुप्रयोगले सहायक प्रदर्शनहरूमा लञ्च सुविधालाई समर्थन गर्दैन।"</string> <string name="accessibility_quick_settings_settings" msgid="7098489591715844713">"सेटिङहरूलाई खोल्नुहोस्।"</string> <string name="accessibility_quick_settings_expand" msgid="2609275052412521467">"द्रुत सेटिङहरूलाई खोल्नुहोस्।"</string> <string name="accessibility_quick_settings_collapse" msgid="4674876336725041982">"द्रुत सेटिङहरूलाई बन्द गर्नुहोस्।"</string> diff --git a/packages/SystemUI/res/values-nl/strings.xml b/packages/SystemUI/res/values-nl/strings.xml index fa028c336594..b02be5d241d7 100644 --- a/packages/SystemUI/res/values-nl/strings.xml +++ b/packages/SystemUI/res/values-nl/strings.xml @@ -879,17 +879,6 @@ </string-array> <string name="tuner_low_priority" msgid="8412666814123009820">"Pictogrammen voor meldingen met lage prioriteit weergeven"</string> <string name="other" msgid="429768510980739978">"Overig"</string> - <string name="accessibility_divider" msgid="2830785970889237307">"Scheiding voor gesplitst scherm"</string> - <string name="accessibility_action_divider_left_full" msgid="7598733539422375847">"Linkerscherm op volledig scherm"</string> - <string name="accessibility_action_divider_left_70" msgid="4919312892541727761">"Linkerscherm 70%"</string> - <string name="accessibility_action_divider_left_50" msgid="3664701169564893826">"Linkerscherm 50%"</string> - <string name="accessibility_action_divider_left_30" msgid="4358145268046362088">"Linkerscherm 30%"</string> - <string name="accessibility_action_divider_right_full" msgid="8576057422864896305">"Rechterscherm op volledig scherm"</string> - <string name="accessibility_action_divider_top_full" msgid="4243901660795169777">"Bovenste scherm op volledig scherm"</string> - <string name="accessibility_action_divider_top_70" msgid="6941226213260515072">"Bovenste scherm 70%"</string> - <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Bovenste scherm 50%"</string> - <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Bovenste scherm 30%"</string> - <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Onderste scherm op volledig scherm"</string> <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Positie <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Dubbeltik om te bewerken."</string> <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Dubbeltik om toe te voegen."</string> <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"<xliff:g id="TILE_NAME">%1$s</xliff:g> verplaatsen"</string> @@ -898,10 +887,6 @@ <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"<xliff:g id="TILE_NAME">%1$s</xliff:g> verplaatsen naar positie <xliff:g id="POSITION">%2$d</xliff:g>"</string> <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Editor voor \'Snelle instellingen\'."</string> <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g>-melding: <xliff:g id="ID_2">%2$s</xliff:g>"</string> - <string name="dock_forced_resizable" msgid="4689301323912928801">"App werkt mogelijk niet met gesplitst scherm."</string> - <string name="dock_non_resizeble_failed_to_dock_text" msgid="7284915968096153808">"App biedt geen ondersteuning voor gesplitst scherm."</string> - <string name="forced_resizable_secondary_display" msgid="522558907654394940">"App werkt mogelijk niet op een secundair scherm."</string> - <string name="activity_launch_on_secondary_display_failed_text" msgid="8446727617187998208">"App kan niet op secundaire displays worden gestart."</string> <string name="accessibility_quick_settings_settings" msgid="7098489591715844713">"Instellingen openen."</string> <string name="accessibility_quick_settings_expand" msgid="2609275052412521467">"Snelle instellingen openen."</string> <string name="accessibility_quick_settings_collapse" msgid="4674876336725041982">"Snelle instellingen sluiten."</string> diff --git a/packages/SystemUI/res/values-or/strings.xml b/packages/SystemUI/res/values-or/strings.xml index 4c6ef486436a..c7de8ca38cb2 100644 --- a/packages/SystemUI/res/values-or/strings.xml +++ b/packages/SystemUI/res/values-or/strings.xml @@ -879,17 +879,6 @@ </string-array> <string name="tuner_low_priority" msgid="8412666814123009820">"କମ୍-ଅଗ୍ରାଧିକାର ବିଜ୍ଞପ୍ତି ଆଇକନ୍ ଦେଖାନ୍ତୁ"</string> <string name="other" msgid="429768510980739978">"ଅନ୍ୟାନ୍ୟ"</string> - <string name="accessibility_divider" msgid="2830785970889237307">"ସ୍ପ୍ଲିଟ୍-ସ୍କ୍ରୀନ ବିଭାଜକ"</string> - <string name="accessibility_action_divider_left_full" msgid="7598733539422375847">"ବାମ ପଟକୁ ପୂର୍ଣ୍ଣ ସ୍କ୍ରୀନ୍ କରନ୍ତୁ"</string> - <string name="accessibility_action_divider_left_70" msgid="4919312892541727761">"ବାମ ପଟକୁ 70% କରନ୍ତୁ"</string> - <string name="accessibility_action_divider_left_50" msgid="3664701169564893826">"ବାମ ପଟକୁ 50% କରନ୍ତୁ"</string> - <string name="accessibility_action_divider_left_30" msgid="4358145268046362088">"ବାମ ପଟେ 30%"</string> - <string name="accessibility_action_divider_right_full" msgid="8576057422864896305">"ଡାହାଣ ପଟକୁ ପୂର୍ଣ୍ଣ ସ୍କ୍ରୀନ୍ କରନ୍ତୁ"</string> - <string name="accessibility_action_divider_top_full" msgid="4243901660795169777">"ଉପର ଆଡ଼କୁ ପୂର୍ଣ୍ଣ ସ୍କ୍ରୀନ୍ କରନ୍ତୁ"</string> - <string name="accessibility_action_divider_top_70" msgid="6941226213260515072">"ଉପର ଆଡ଼କୁ 70% କରନ୍ତୁ"</string> - <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"ଉପର ଆଡ଼କୁ 50% କରନ୍ତୁ"</string> - <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"ଉପର ଆଡ଼କୁ 30% କରନ୍ତୁ"</string> - <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"ତଳ ଅଂଶର ପୂର୍ଣ୍ଣ ସ୍କ୍ରୀନ୍"</string> <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"ଅବସ୍ଥାନ <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>। ଏଡିଟ୍ କରିବାକୁ ଡବଲ୍-ଟାପ୍ କରନ୍ତୁ।"</string> <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>। ଯୋଡ଼ିବା ପାଇଁ ଡବଲ୍-ଟାପ୍ କରନ୍ତୁ।"</string> <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"<xliff:g id="TILE_NAME">%1$s</xliff:g> ନିଅନ୍ତୁ"</string> @@ -898,10 +887,6 @@ <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"<xliff:g id="POSITION">%2$d</xliff:g> ଅବସ୍ଥାନକୁ <xliff:g id="TILE_NAME">%1$s</xliff:g> ଘୁଞ୍ଚାନ୍ତୁ"</string> <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"ଦ୍ରୁତ ସେଟିଙ୍ଗ ଏଡିଟର୍।"</string> <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g> ବିଜ୍ଞପ୍ତି: <xliff:g id="ID_2">%2$s</xliff:g>"</string> - <string name="dock_forced_resizable" msgid="4689301323912928801">"ସ୍ପ୍ଲିଟ୍-ସ୍କ୍ରୀନରେ ଆପ୍ କାମ କରିନପାରେ।"</string> - <string name="dock_non_resizeble_failed_to_dock_text" msgid="7284915968096153808">"ଆପ୍ ସ୍ପ୍ଲିଟ୍-ସ୍କ୍ରୀନକୁ ସପୋର୍ଟ କରେ ନାହିଁ।"</string> - <string name="forced_resizable_secondary_display" msgid="522558907654394940">"ସେକେଣ୍ଡାରୀ ଡିସପ୍ଲେରେ ଆପ୍ କାମ ନକରିପାରେ।"</string> - <string name="activity_launch_on_secondary_display_failed_text" msgid="8446727617187998208">"ସେକେଣ୍ଡାରୀ ଡିସପ୍ଲେରେ ଆପ୍ ଲଞ୍ଚ ସପୋର୍ଟ କରେ ନାହିଁ।"</string> <string name="accessibility_quick_settings_settings" msgid="7098489591715844713">"ସେଟିଂସ୍ ଖୋଲନ୍ତୁ।"</string> <string name="accessibility_quick_settings_expand" msgid="2609275052412521467">"ଦ୍ରୁତ ସେଟିଙ୍ଗ ଖୋଲନ୍ତୁ।"</string> <string name="accessibility_quick_settings_collapse" msgid="4674876336725041982">"ଦ୍ରୁତ ସେଟିଂସ୍ ବନ୍ଦ କରନ୍ତୁ।"</string> diff --git a/packages/SystemUI/res/values-pa/strings.xml b/packages/SystemUI/res/values-pa/strings.xml index 98583c0aedca..66333b9e09fe 100644 --- a/packages/SystemUI/res/values-pa/strings.xml +++ b/packages/SystemUI/res/values-pa/strings.xml @@ -879,17 +879,6 @@ </string-array> <string name="tuner_low_priority" msgid="8412666814123009820">"ਘੱਟ ਤਰਜੀਹ ਵਾਲੇ ਸੂਚਨਾ ਪ੍ਰਤੀਕਾਂ ਨੂੰ ਦਿਖਾਓ"</string> <string name="other" msgid="429768510980739978">"ਹੋਰ"</string> - <string name="accessibility_divider" msgid="2830785970889237307">"ਸਪਲਿਟ-ਸਕ੍ਰੀਨ ਡਿਵਾਈਡਰ"</string> - <string name="accessibility_action_divider_left_full" msgid="7598733539422375847">"ਖੱਬੇ ਪੂਰੀ ਸਕ੍ਰੀਨ"</string> - <string name="accessibility_action_divider_left_70" msgid="4919312892541727761">"ਖੱਬੇ 70%"</string> - <string name="accessibility_action_divider_left_50" msgid="3664701169564893826">"ਖੱਬੇ 50%"</string> - <string name="accessibility_action_divider_left_30" msgid="4358145268046362088">"ਖੱਬੇ 30%"</string> - <string name="accessibility_action_divider_right_full" msgid="8576057422864896305">"ਸੱਜੇ ਪੂਰੀ ਸਕ੍ਰੀਨ"</string> - <string name="accessibility_action_divider_top_full" msgid="4243901660795169777">"ਉੱਪਰ ਪੂਰੀ ਸਕ੍ਰੀਨ"</string> - <string name="accessibility_action_divider_top_70" msgid="6941226213260515072">"ਉੱਪਰ 70%"</string> - <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"ਉੱਪਰ 50%"</string> - <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"ਉੱਪਰ 30%"</string> - <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"ਹੇਠਾਂ ਪੂਰੀ ਸਕ੍ਰੀਨ"</string> <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"ਸਥਿਤੀ <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>। ਸੰਪਾਦਨ ਲਈ ਦੋ ਵਾਰ ਟੈਪ ਕਰੋ।"</string> <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>। ਸ਼ਾਮਲ ਕਰਨ ਲਈ ਦੋ ਵਾਰ ਟੈਪ ਕਰੋ।"</string> <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"<xliff:g id="TILE_NAME">%1$s</xliff:g> ਨੂੰ ਤਬਦੀਲ ਕਰੋ"</string> @@ -898,10 +887,6 @@ <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"<xliff:g id="TILE_NAME">%1$s</xliff:g> ਨੂੰ <xliff:g id="POSITION">%2$d</xliff:g> ਸਥਾਨ \'ਤੇ ਲਿਜਾਓ"</string> <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"ਤਤਕਾਲ ਸੈਟਿੰਗਾਂ ਸੰਪਾਦਕ।"</string> <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g> ਸੂਚਨਾ: <xliff:g id="ID_2">%2$s</xliff:g>"</string> - <string name="dock_forced_resizable" msgid="4689301323912928801">"ਹੋ ਸਕਦਾ ਹੈ ਕਿ ਐਪ ਸਪਲਿਟ-ਸਕ੍ਰੀਨ ਨਾਲ ਕੰਮ ਨਾ ਕਰੇ।"</string> - <string name="dock_non_resizeble_failed_to_dock_text" msgid="7284915968096153808">"ਐਪ ਸਪਲਿਟ-ਸਕ੍ਰੀਨ ਨੂੰ ਸਮਰਥਨ ਨਹੀਂ ਕਰਦੀ।"</string> - <string name="forced_resizable_secondary_display" msgid="522558907654394940">"ਹੋ ਸਕਦਾ ਹੈ ਕਿ ਐਪ ਸੈਕੰਡਰੀ ਡਿਸਪਲੇ \'ਤੇ ਕੰਮ ਨਾ ਕਰੇ।"</string> - <string name="activity_launch_on_secondary_display_failed_text" msgid="8446727617187998208">"ਐਪ ਸੈਕੰਡਰੀ ਡਿਸਪਲੇਆਂ \'ਤੇ ਲਾਂਚ ਕਰਨ ਦਾ ਸਮਰਥਨ ਨਹੀਂ ਕਰਦੀ"</string> <string name="accessibility_quick_settings_settings" msgid="7098489591715844713">"ਸੈਟਿੰਗਾਂ ਖੋਲ੍ਹੋ।"</string> <string name="accessibility_quick_settings_expand" msgid="2609275052412521467">"ਤਤਕਾਲ ਸੈਟਿੰਗਾਂ ਨੂੰ ਖੋਲ੍ਹੋ।"</string> <string name="accessibility_quick_settings_collapse" msgid="4674876336725041982">"ਤਤਕਾਲ ਸੈਟਿੰਗਾਂ ਨੂੰ ਬੰਦ ਕਰੋ।"</string> diff --git a/packages/SystemUI/res/values-pl/strings.xml b/packages/SystemUI/res/values-pl/strings.xml index 4d5a2ae88949..c68e3ac46932 100644 --- a/packages/SystemUI/res/values-pl/strings.xml +++ b/packages/SystemUI/res/values-pl/strings.xml @@ -889,17 +889,6 @@ </string-array> <string name="tuner_low_priority" msgid="8412666814123009820">"Pokazuj ikony powiadomień o niskim priorytecie"</string> <string name="other" msgid="429768510980739978">"Inne"</string> - <string name="accessibility_divider" msgid="2830785970889237307">"Linia dzielenia ekranu"</string> - <string name="accessibility_action_divider_left_full" msgid="7598733539422375847">"Lewa część ekranu na pełnym ekranie"</string> - <string name="accessibility_action_divider_left_70" msgid="4919312892541727761">"70% lewej części ekranu"</string> - <string name="accessibility_action_divider_left_50" msgid="3664701169564893826">"50% lewej części ekranu"</string> - <string name="accessibility_action_divider_left_30" msgid="4358145268046362088">"30% lewej części ekranu"</string> - <string name="accessibility_action_divider_right_full" msgid="8576057422864896305">"Prawa część ekranu na pełnym ekranie"</string> - <string name="accessibility_action_divider_top_full" msgid="4243901660795169777">"Górna część ekranu na pełnym ekranie"</string> - <string name="accessibility_action_divider_top_70" msgid="6941226213260515072">"70% górnej części ekranu"</string> - <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"50% górnej części ekranu"</string> - <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"30% górnej części ekranu"</string> - <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Dolna część ekranu na pełnym ekranie"</string> <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Położenie <xliff:g id="POSITION">%1$d</xliff:g>, kafelek <xliff:g id="TILE_NAME">%2$s</xliff:g>. Kliknij dwukrotnie, by edytować."</string> <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"Kafelek <xliff:g id="TILE_NAME">%1$s</xliff:g>. Kliknij dwukrotnie, by dodać."</string> <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Przenieś kafelek <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string> @@ -908,10 +897,6 @@ <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Przenieś kafelek <xliff:g id="TILE_NAME">%1$s</xliff:g> w położenie <xliff:g id="POSITION">%2$d</xliff:g>"</string> <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Edytor szybkich ustawień."</string> <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"Powiadomienie z aplikacji <xliff:g id="ID_1">%1$s</xliff:g>: <xliff:g id="ID_2">%2$s</xliff:g>"</string> - <string name="dock_forced_resizable" msgid="4689301323912928801">"Aplikacja może nie działać przy podzielonym ekranie."</string> - <string name="dock_non_resizeble_failed_to_dock_text" msgid="7284915968096153808">"Aplikacja nie obsługuje dzielonego ekranu."</string> - <string name="forced_resizable_secondary_display" msgid="522558907654394940">"Aplikacja może nie działać na dodatkowym ekranie."</string> - <string name="activity_launch_on_secondary_display_failed_text" msgid="8446727617187998208">"Aplikacja nie obsługuje uruchamiania na dodatkowych ekranach."</string> <string name="accessibility_quick_settings_settings" msgid="7098489591715844713">"Otwórz ustawienia."</string> <string name="accessibility_quick_settings_expand" msgid="2609275052412521467">"Otwórz szybkie ustawienia."</string> <string name="accessibility_quick_settings_collapse" msgid="4674876336725041982">"Zamknij szybkie ustawienia."</string> @@ -1016,7 +1001,7 @@ <string name="bubble_accessibility_action_move_bottom_left" msgid="6339015902495504715">"Przenieś w lewy dolny róg"</string> <string name="bubble_accessibility_action_move_bottom_right" msgid="7471571700628346212">"Przenieś w prawy dolny róg"</string> <string name="bubble_dismiss_text" msgid="1314082410868930066">"Zamknij dymek"</string> - <string name="bubbles_dont_bubble_conversation" msgid="1033040343437428822">"Nie wyświetlaj rozmowy jako dymku"</string> + <string name="bubbles_dont_bubble_conversation" msgid="1033040343437428822">"Nie wyświetlaj rozmowy jako dymka"</string> <string name="bubbles_user_education_title" msgid="5547017089271445797">"Czatuj, korzystając z dymków"</string> <string name="bubbles_user_education_description" msgid="1160281719576715211">"Nowe rozmowy będą wyświetlane jako pływające ikony lub dymki. Kliknij, by otworzyć dymek. Przeciągnij, by go przenieść."</string> <string name="bubbles_user_education_manage_title" msgid="2848511858160342320">"Zarządzaj dymkami w dowolnym momencie"</string> diff --git a/packages/SystemUI/res/values-pt-rBR/strings.xml b/packages/SystemUI/res/values-pt-rBR/strings.xml index ef5c9cee6ee4..ff2ecd38547f 100644 --- a/packages/SystemUI/res/values-pt-rBR/strings.xml +++ b/packages/SystemUI/res/values-pt-rBR/strings.xml @@ -879,17 +879,6 @@ </string-array> <string name="tuner_low_priority" msgid="8412666814123009820">"Mostrar ícones de notificações de baixa prioridade"</string> <string name="other" msgid="429768510980739978">"Outros"</string> - <string name="accessibility_divider" msgid="2830785970889237307">"Divisor de tela"</string> - <string name="accessibility_action_divider_left_full" msgid="7598733539422375847">"Lado esquerdo em tela cheia"</string> - <string name="accessibility_action_divider_left_70" msgid="4919312892541727761">"Esquerda a 70%"</string> - <string name="accessibility_action_divider_left_50" msgid="3664701169564893826">"Esquerda a 50%"</string> - <string name="accessibility_action_divider_left_30" msgid="4358145268046362088">"Esquerda a 30%"</string> - <string name="accessibility_action_divider_right_full" msgid="8576057422864896305">"Lado direito em tela cheia"</string> - <string name="accessibility_action_divider_top_full" msgid="4243901660795169777">"Parte superior em tela cheia"</string> - <string name="accessibility_action_divider_top_70" msgid="6941226213260515072">"Parte superior a 70%"</string> - <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Parte superior a 50%"</string> - <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Parte superior a 30%"</string> - <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Parte inferior em tela cheia"</string> <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Posição <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Toque duas vezes para editar."</string> <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Toque duas vezes para adicionar."</string> <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Move <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string> @@ -898,10 +887,6 @@ <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Mover <xliff:g id="TILE_NAME">%1$s</xliff:g> para a posição <xliff:g id="POSITION">%2$d</xliff:g>"</string> <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Editor de configurações rápidas."</string> <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"Notificação do <xliff:g id="ID_1">%1$s</xliff:g>: <xliff:g id="ID_2">%2$s</xliff:g>"</string> - <string name="dock_forced_resizable" msgid="4689301323912928801">"É possível que o app não funcione com o recurso de divisão de tela."</string> - <string name="dock_non_resizeble_failed_to_dock_text" msgid="7284915968096153808">"O app não é compatível com a divisão de tela."</string> - <string name="forced_resizable_secondary_display" msgid="522558907654394940">"É possível que o app não funcione em uma tela secundária."</string> - <string name="activity_launch_on_secondary_display_failed_text" msgid="8446727617187998208">"O app não é compatível com a inicialização em telas secundárias."</string> <string name="accessibility_quick_settings_settings" msgid="7098489591715844713">"Abrir configurações."</string> <string name="accessibility_quick_settings_expand" msgid="2609275052412521467">"Abrir as configurações rápidas."</string> <string name="accessibility_quick_settings_collapse" msgid="4674876336725041982">"Fechar as configurações rápidas."</string> diff --git a/packages/SystemUI/res/values-pt-rPT/strings.xml b/packages/SystemUI/res/values-pt-rPT/strings.xml index 541f12c32e02..c39a5eb54868 100644 --- a/packages/SystemUI/res/values-pt-rPT/strings.xml +++ b/packages/SystemUI/res/values-pt-rPT/strings.xml @@ -879,17 +879,6 @@ </string-array> <string name="tuner_low_priority" msgid="8412666814123009820">"Mostrar ícones de notificações de prioridade baixa"</string> <string name="other" msgid="429768510980739978">"Outro"</string> - <string name="accessibility_divider" msgid="2830785970889237307">"Divisor do ecrã dividido"</string> - <string name="accessibility_action_divider_left_full" msgid="7598733539422375847">"Ecrã esquerdo inteiro"</string> - <string name="accessibility_action_divider_left_70" msgid="4919312892541727761">"70% no ecrã esquerdo"</string> - <string name="accessibility_action_divider_left_50" msgid="3664701169564893826">"50% no ecrã esquerdo"</string> - <string name="accessibility_action_divider_left_30" msgid="4358145268046362088">"30% no ecrã esquerdo"</string> - <string name="accessibility_action_divider_right_full" msgid="8576057422864896305">"Ecrã direito inteiro"</string> - <string name="accessibility_action_divider_top_full" msgid="4243901660795169777">"Ecrã superior inteiro"</string> - <string name="accessibility_action_divider_top_70" msgid="6941226213260515072">"70% no ecrã superior"</string> - <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"50% no ecrã superior"</string> - <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"30% no ecrã superior"</string> - <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Ecrã inferior inteiro"</string> <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Posição <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Toque duas vezes para editar."</string> <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Toque duas vezes para adicionar."</string> <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Mover <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string> @@ -898,10 +887,6 @@ <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Mover <xliff:g id="TILE_NAME">%1$s</xliff:g> para a posição <xliff:g id="POSITION">%2$d</xliff:g>"</string> <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Editor de definições rápidas."</string> <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"Notificação do <xliff:g id="ID_1">%1$s</xliff:g>: <xliff:g id="ID_2">%2$s</xliff:g>"</string> - <string name="dock_forced_resizable" msgid="4689301323912928801">"A app pode não funcionar com o ecrã dividido."</string> - <string name="dock_non_resizeble_failed_to_dock_text" msgid="7284915968096153808">"A app não é compatível com o ecrã dividido."</string> - <string name="forced_resizable_secondary_display" msgid="522558907654394940">"A app pode não funcionar num ecrã secundário."</string> - <string name="activity_launch_on_secondary_display_failed_text" msgid="8446727617187998208">"A app não é compatível com o início em ecrãs secundários."</string> <string name="accessibility_quick_settings_settings" msgid="7098489591715844713">"Abrir as definições."</string> <string name="accessibility_quick_settings_expand" msgid="2609275052412521467">"Abrir as definições rápidas."</string> <string name="accessibility_quick_settings_collapse" msgid="4674876336725041982">"Fechar as definições rápidas."</string> diff --git a/packages/SystemUI/res/values-pt/strings.xml b/packages/SystemUI/res/values-pt/strings.xml index ef5c9cee6ee4..ff2ecd38547f 100644 --- a/packages/SystemUI/res/values-pt/strings.xml +++ b/packages/SystemUI/res/values-pt/strings.xml @@ -879,17 +879,6 @@ </string-array> <string name="tuner_low_priority" msgid="8412666814123009820">"Mostrar ícones de notificações de baixa prioridade"</string> <string name="other" msgid="429768510980739978">"Outros"</string> - <string name="accessibility_divider" msgid="2830785970889237307">"Divisor de tela"</string> - <string name="accessibility_action_divider_left_full" msgid="7598733539422375847">"Lado esquerdo em tela cheia"</string> - <string name="accessibility_action_divider_left_70" msgid="4919312892541727761">"Esquerda a 70%"</string> - <string name="accessibility_action_divider_left_50" msgid="3664701169564893826">"Esquerda a 50%"</string> - <string name="accessibility_action_divider_left_30" msgid="4358145268046362088">"Esquerda a 30%"</string> - <string name="accessibility_action_divider_right_full" msgid="8576057422864896305">"Lado direito em tela cheia"</string> - <string name="accessibility_action_divider_top_full" msgid="4243901660795169777">"Parte superior em tela cheia"</string> - <string name="accessibility_action_divider_top_70" msgid="6941226213260515072">"Parte superior a 70%"</string> - <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Parte superior a 50%"</string> - <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Parte superior a 30%"</string> - <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Parte inferior em tela cheia"</string> <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Posição <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Toque duas vezes para editar."</string> <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Toque duas vezes para adicionar."</string> <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Move <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string> @@ -898,10 +887,6 @@ <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Mover <xliff:g id="TILE_NAME">%1$s</xliff:g> para a posição <xliff:g id="POSITION">%2$d</xliff:g>"</string> <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Editor de configurações rápidas."</string> <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"Notificação do <xliff:g id="ID_1">%1$s</xliff:g>: <xliff:g id="ID_2">%2$s</xliff:g>"</string> - <string name="dock_forced_resizable" msgid="4689301323912928801">"É possível que o app não funcione com o recurso de divisão de tela."</string> - <string name="dock_non_resizeble_failed_to_dock_text" msgid="7284915968096153808">"O app não é compatível com a divisão de tela."</string> - <string name="forced_resizable_secondary_display" msgid="522558907654394940">"É possível que o app não funcione em uma tela secundária."</string> - <string name="activity_launch_on_secondary_display_failed_text" msgid="8446727617187998208">"O app não é compatível com a inicialização em telas secundárias."</string> <string name="accessibility_quick_settings_settings" msgid="7098489591715844713">"Abrir configurações."</string> <string name="accessibility_quick_settings_expand" msgid="2609275052412521467">"Abrir as configurações rápidas."</string> <string name="accessibility_quick_settings_collapse" msgid="4674876336725041982">"Fechar as configurações rápidas."</string> diff --git a/packages/SystemUI/res/values-ro/strings.xml b/packages/SystemUI/res/values-ro/strings.xml index 3e2373deb67d..b793bcd33e4c 100644 --- a/packages/SystemUI/res/values-ro/strings.xml +++ b/packages/SystemUI/res/values-ro/strings.xml @@ -884,17 +884,6 @@ </string-array> <string name="tuner_low_priority" msgid="8412666814123009820">"Afișați pictogramele de notificare cu prioritate redusă"</string> <string name="other" msgid="429768510980739978">"Altele"</string> - <string name="accessibility_divider" msgid="2830785970889237307">"Separator pentru ecranul împărțit"</string> - <string name="accessibility_action_divider_left_full" msgid="7598733539422375847">"Partea stângă pe ecran complet"</string> - <string name="accessibility_action_divider_left_70" msgid="4919312892541727761">"Partea stângă: 70%"</string> - <string name="accessibility_action_divider_left_50" msgid="3664701169564893826">"Partea stângă: 50%"</string> - <string name="accessibility_action_divider_left_30" msgid="4358145268046362088">"Partea stângă: 30%"</string> - <string name="accessibility_action_divider_right_full" msgid="8576057422864896305">"Partea dreaptă pe ecran complet"</string> - <string name="accessibility_action_divider_top_full" msgid="4243901660795169777">"Partea de sus pe ecran complet"</string> - <string name="accessibility_action_divider_top_70" msgid="6941226213260515072">"Partea de sus: 70%"</string> - <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Partea de sus: 50%"</string> - <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Partea de sus: 30%"</string> - <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Partea de jos pe ecran complet"</string> <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Poziția <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Atingeți de două ori pentru a edita."</string> <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Atingeți de două ori pentru a adăuga."</string> <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Mutați <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string> @@ -903,10 +892,6 @@ <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Mutați <xliff:g id="TILE_NAME">%1$s</xliff:g> pe poziția <xliff:g id="POSITION">%2$d</xliff:g>"</string> <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Editorul pentru setări rapide."</string> <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"Notificare <xliff:g id="ID_1">%1$s</xliff:g>: <xliff:g id="ID_2">%2$s</xliff:g>"</string> - <string name="dock_forced_resizable" msgid="4689301323912928801">"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="7284915968096153808">"Aplicația nu acceptă ecranul împărțit."</string> - <string name="forced_resizable_secondary_display" msgid="522558907654394940">"Este posibil ca aplicația să nu funcționeze pe un ecran secundar."</string> - <string name="activity_launch_on_secondary_display_failed_text" msgid="8446727617187998208">"Aplicația nu acceptă lansare pe ecrane secundare."</string> <string name="accessibility_quick_settings_settings" msgid="7098489591715844713">"Deschideți setările."</string> <string name="accessibility_quick_settings_expand" msgid="2609275052412521467">"Deschideți setările rapide."</string> <string name="accessibility_quick_settings_collapse" msgid="4674876336725041982">"Închideți setările rapide."</string> diff --git a/packages/SystemUI/res/values-ru/strings.xml b/packages/SystemUI/res/values-ru/strings.xml index 7747724eab80..7560f5309824 100644 --- a/packages/SystemUI/res/values-ru/strings.xml +++ b/packages/SystemUI/res/values-ru/strings.xml @@ -889,17 +889,6 @@ </string-array> <string name="tuner_low_priority" msgid="8412666814123009820">"Показывать значки уведомлений с низким приоритетом"</string> <string name="other" msgid="429768510980739978">"Другое"</string> - <string name="accessibility_divider" msgid="2830785970889237307">"Разделитель экрана"</string> - <string name="accessibility_action_divider_left_full" msgid="7598733539422375847">"Левый во весь экран"</string> - <string name="accessibility_action_divider_left_70" msgid="4919312892541727761">"Левый на 70%"</string> - <string name="accessibility_action_divider_left_50" msgid="3664701169564893826">"Левый на 50%"</string> - <string name="accessibility_action_divider_left_30" msgid="4358145268046362088">"Левый на 30%"</string> - <string name="accessibility_action_divider_right_full" msgid="8576057422864896305">"Правый во весь экран"</string> - <string name="accessibility_action_divider_top_full" msgid="4243901660795169777">"Верхний во весь экран"</string> - <string name="accessibility_action_divider_top_70" msgid="6941226213260515072">"Верхний на 70%"</string> - <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Верхний на 50%"</string> - <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Верхний на 30%"</string> - <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Нижний во весь экран"</string> <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Позиция <xliff:g id="POSITION">%1$d</xliff:g>, кнопка \"<xliff:g id="TILE_NAME">%2$s</xliff:g>\". Чтобы изменить, нажмите дважды."</string> <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"Кнопка \"<xliff:g id="TILE_NAME">%1$s</xliff:g>\". Чтобы добавить, нажмите дважды."</string> <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Переместить кнопку \"<xliff:g id="TILE_NAME">%1$s</xliff:g>\""</string> @@ -908,10 +897,6 @@ <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Переместить значок <xliff:g id="TILE_NAME">%1$s</xliff:g> на позицию <xliff:g id="POSITION">%2$d</xliff:g>"</string> <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Редактор быстрых настроек."</string> <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"Уведомление <xliff:g id="ID_1">%1$s</xliff:g>: <xliff:g id="ID_2">%2$s</xliff:g>"</string> - <string name="dock_forced_resizable" msgid="4689301323912928801">"Приложение не поддерживает разделение экрана."</string> - <string name="dock_non_resizeble_failed_to_dock_text" msgid="7284915968096153808">"Приложение не поддерживает разделение экрана."</string> - <string name="forced_resizable_secondary_display" msgid="522558907654394940">"Приложение может не работать на дополнительном экране"</string> - <string name="activity_launch_on_secondary_display_failed_text" msgid="8446727617187998208">"Приложение не поддерживает запуск на дополнительных экранах"</string> <string name="accessibility_quick_settings_settings" msgid="7098489591715844713">"Открыть настройки."</string> <string name="accessibility_quick_settings_expand" msgid="2609275052412521467">"Развернуть быстрые настройки."</string> <string name="accessibility_quick_settings_collapse" msgid="4674876336725041982">"Скрыть быстрые настройки."</string> diff --git a/packages/SystemUI/res/values-si/strings.xml b/packages/SystemUI/res/values-si/strings.xml index b8813f2ef53c..02f9c23cecf9 100644 --- a/packages/SystemUI/res/values-si/strings.xml +++ b/packages/SystemUI/res/values-si/strings.xml @@ -879,17 +879,6 @@ </string-array> <string name="tuner_low_priority" msgid="8412666814123009820">"අඩු ප්රමුඛතා දැනුම්දීම් අයිකන පෙන්වන්න"</string> <string name="other" msgid="429768510980739978">"වෙනත්"</string> - <string name="accessibility_divider" msgid="2830785970889237307">"බෙදුම්-තිර වෙන්කරණය"</string> - <string name="accessibility_action_divider_left_full" msgid="7598733539422375847">"වම් පූර්ණ තිරය"</string> - <string name="accessibility_action_divider_left_70" msgid="4919312892541727761">"වම් 70%"</string> - <string name="accessibility_action_divider_left_50" msgid="3664701169564893826">"වම් 50%"</string> - <string name="accessibility_action_divider_left_30" msgid="4358145268046362088">"වම් 30%"</string> - <string name="accessibility_action_divider_right_full" msgid="8576057422864896305">"දකුණු පූර්ණ තිරය"</string> - <string name="accessibility_action_divider_top_full" msgid="4243901660795169777">"ඉහළම පූර්ණ තිරය"</string> - <string name="accessibility_action_divider_top_70" msgid="6941226213260515072">"ඉහළම 70%"</string> - <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"ඉහළම 50%"</string> - <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"ඉහළම 30%"</string> - <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"පහළ පූර්ණ තිරය"</string> <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"ස්ථානය <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. වෙනස් කිරීමට දෙවරක් තට්ටු කරන්න."</string> <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. එක් කිරීමට දෙවරක් තට්ටු කරන්න."</string> <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"<xliff:g id="TILE_NAME">%1$s</xliff:g> ගෙන යන්න"</string> @@ -898,10 +887,6 @@ <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"<xliff:g id="TILE_NAME">%1$s</xliff:g> තත්ත්වයට <xliff:g id="POSITION">%2$d</xliff:g> ගෙන යන්න"</string> <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"ඉක්මන් සැකසුම් සංස්කාරකය."</string> <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g> දැනුම්දීම: <xliff:g id="ID_2">%2$s</xliff:g>"</string> - <string name="dock_forced_resizable" msgid="4689301323912928801">"යෙදුම බෙදුම්-තිරය සමග ක්රියා නොකළ හැකිය."</string> - <string name="dock_non_resizeble_failed_to_dock_text" msgid="7284915968096153808">"යෙදුම බෙදුණු-තිරය සඳහා සහාය නොදක්වයි."</string> - <string name="forced_resizable_secondary_display" msgid="522558907654394940">"යෙදුම ද්විතියික සංදර්ශකයක ක්රියා නොකළ හැකිය."</string> - <string name="activity_launch_on_secondary_display_failed_text" msgid="8446727617187998208">"යෙදුම ද්විතීයික සංදර්ශක මත දියත් කිරීම සඳහා සහාය නොදක්වයි."</string> <string name="accessibility_quick_settings_settings" msgid="7098489591715844713">"සැකසීම් විවෘත කරන්න."</string> <string name="accessibility_quick_settings_expand" msgid="2609275052412521467">"ඉක්මන් සැකසීම් විවෘත කරන්න."</string> <string name="accessibility_quick_settings_collapse" msgid="4674876336725041982">"ඉක්මන් සැකසීම් වසන්න."</string> diff --git a/packages/SystemUI/res/values-sk/strings.xml b/packages/SystemUI/res/values-sk/strings.xml index 0f9cb5f4616c..54a32ddd1cbf 100644 --- a/packages/SystemUI/res/values-sk/strings.xml +++ b/packages/SystemUI/res/values-sk/strings.xml @@ -889,17 +889,6 @@ </string-array> <string name="tuner_low_priority" msgid="8412666814123009820">"Zobraziť ikony upozornení s nízkou prioritou"</string> <string name="other" msgid="429768510980739978">"Ďalšie"</string> - <string name="accessibility_divider" msgid="2830785970889237307">"Rozdeľovač obrazovky"</string> - <string name="accessibility_action_divider_left_full" msgid="7598733539422375847">"Ľavá – na celú obrazovku"</string> - <string name="accessibility_action_divider_left_70" msgid="4919312892541727761">"Ľavá – 70 %"</string> - <string name="accessibility_action_divider_left_50" msgid="3664701169564893826">"Ľavá – 50 %"</string> - <string name="accessibility_action_divider_left_30" msgid="4358145268046362088">"Ľavá – 30 %"</string> - <string name="accessibility_action_divider_right_full" msgid="8576057422864896305">"Pravá– na celú obrazovku"</string> - <string name="accessibility_action_divider_top_full" msgid="4243901660795169777">"Horná – na celú obrazovku"</string> - <string name="accessibility_action_divider_top_70" msgid="6941226213260515072">"Horná – 70 %"</string> - <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Horná – 50 %"</string> - <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Horná – 30 %"</string> - <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Dolná – na celú obrazovku"</string> <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Pozícia <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Upravíte ju dvojitým klepnutím."</string> <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Pridáte ju dvojitým klepnutím."</string> <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Presunúť dlaždicu <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string> @@ -908,10 +897,6 @@ <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Presunúť <xliff:g id="TILE_NAME">%1$s</xliff:g> na pozíciu <xliff:g id="POSITION">%2$d</xliff:g>"</string> <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Editor rýchlych nastavení"</string> <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"Upozornenie <xliff:g id="ID_1">%1$s</xliff:g>: <xliff:g id="ID_2">%2$s</xliff:g>"</string> - <string name="dock_forced_resizable" msgid="4689301323912928801">"Aplikácia nemusí fungovať so zapnutou rozdelenou obrazovkou."</string> - <string name="dock_non_resizeble_failed_to_dock_text" msgid="7284915968096153808">"Aplikácia nepodporuje rozdelenú obrazovku."</string> - <string name="forced_resizable_secondary_display" msgid="522558907654394940">"Aplikácia nemusí fungovať na sekundárnej obrazovke."</string> - <string name="activity_launch_on_secondary_display_failed_text" msgid="8446727617187998208">"Aplikácia nepodporuje spúšťanie na sekundárnych obrazovkách."</string> <string name="accessibility_quick_settings_settings" msgid="7098489591715844713">"Otvoriť nastavenia"</string> <string name="accessibility_quick_settings_expand" msgid="2609275052412521467">"Otvoriť rýchle nastavenia"</string> <string name="accessibility_quick_settings_collapse" msgid="4674876336725041982">"Zavrieť rýchle nastavenia"</string> diff --git a/packages/SystemUI/res/values-sl/strings.xml b/packages/SystemUI/res/values-sl/strings.xml index 18db332b63ec..32fce7d58c9c 100644 --- a/packages/SystemUI/res/values-sl/strings.xml +++ b/packages/SystemUI/res/values-sl/strings.xml @@ -889,17 +889,6 @@ </string-array> <string name="tuner_low_priority" msgid="8412666814123009820">"Pokaži ikone obvestil z nizko stopnjo prednosti"</string> <string name="other" msgid="429768510980739978">"Drugo"</string> - <string name="accessibility_divider" msgid="2830785970889237307">"Razdelilnik zaslonov"</string> - <string name="accessibility_action_divider_left_full" msgid="7598733539422375847">"Levi v celozaslonski način"</string> - <string name="accessibility_action_divider_left_70" msgid="4919312892541727761">"Levi 70 %"</string> - <string name="accessibility_action_divider_left_50" msgid="3664701169564893826">"Levi 50 %"</string> - <string name="accessibility_action_divider_left_30" msgid="4358145268046362088">"Levi 30 %"</string> - <string name="accessibility_action_divider_right_full" msgid="8576057422864896305">"Desni v celozaslonski način"</string> - <string name="accessibility_action_divider_top_full" msgid="4243901660795169777">"Zgornji v celozaslonski način"</string> - <string name="accessibility_action_divider_top_70" msgid="6941226213260515072">"Zgornji 70 %"</string> - <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Zgornji 50 %"</string> - <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Zgornji 30 %"</string> - <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Spodnji v celozaslonski način"</string> <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Položaj <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Če želite urediti, se dvakrat dotaknite."</string> <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Če želite dodati, se dvakrat dotaknite."</string> <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Premik tega: <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string> @@ -908,10 +897,6 @@ <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Premakni ploščico <xliff:g id="TILE_NAME">%1$s</xliff:g> na položaj <xliff:g id="POSITION">%2$d</xliff:g>"</string> <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Urejevalnik hitrih nastavitev."</string> <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"Obvestilo za <xliff:g id="ID_1">%1$s</xliff:g>: <xliff:g id="ID_2">%2$s</xliff:g>"</string> - <string name="dock_forced_resizable" msgid="4689301323912928801">"Aplikacija morda ne deluje v načinu razdeljenega zaslona."</string> - <string name="dock_non_resizeble_failed_to_dock_text" msgid="7284915968096153808">"Aplikacija ne podpira načina razdeljenega zaslona."</string> - <string name="forced_resizable_secondary_display" msgid="522558907654394940">"Aplikacija morda ne bo delovala na sekundarnem zaslonu."</string> - <string name="activity_launch_on_secondary_display_failed_text" msgid="8446727617187998208">"Aplikacija ne podpira zagona na sekundarnih zaslonih."</string> <string name="accessibility_quick_settings_settings" msgid="7098489591715844713">"Odpri nastavitve."</string> <string name="accessibility_quick_settings_expand" msgid="2609275052412521467">"Odpri hitre nastavitve."</string> <string name="accessibility_quick_settings_collapse" msgid="4674876336725041982">"Zapri hitre nastavitve."</string> diff --git a/packages/SystemUI/res/values-sq/strings.xml b/packages/SystemUI/res/values-sq/strings.xml index 57ab1c384ca9..c907bc23cf32 100644 --- a/packages/SystemUI/res/values-sq/strings.xml +++ b/packages/SystemUI/res/values-sq/strings.xml @@ -480,7 +480,7 @@ <string name="guest_wipe_session_title" msgid="7147965814683990944">"Mirë se erdhe, i ftuar!"</string> <string name="guest_wipe_session_message" msgid="3393823610257065457">"Dëshiron ta vazhdosh sesionin tënd?"</string> <string name="guest_wipe_session_wipe" msgid="8056836584445473309">"Fillo nga e para"</string> - <string name="guest_wipe_session_dontwipe" msgid="3211052048269304205">"Po, vazhdo!"</string> + <string name="guest_wipe_session_dontwipe" msgid="3211052048269304205">"Po, vazhdo"</string> <string name="guest_notification_title" msgid="4434456703930764167">"Përdorues vizitor"</string> <string name="guest_notification_text" msgid="4202692942089571351">"Për të fshirë aplikacionet dhe të dhënat, hiqe përdoruesin vizitor"</string> <string name="guest_notification_remove_action" msgid="4153019027696868099">"HIQ VIZITORIN"</string> @@ -879,17 +879,6 @@ </string-array> <string name="tuner_low_priority" msgid="8412666814123009820">"Shfaq ikonat e njoftimeve me përparësi të ulët"</string> <string name="other" msgid="429768510980739978">"Të tjera"</string> - <string name="accessibility_divider" msgid="2830785970889237307">"Ndarësi i ekranit të ndarë"</string> - <string name="accessibility_action_divider_left_full" msgid="7598733539422375847">"Ekrani i plotë majtas"</string> - <string name="accessibility_action_divider_left_70" msgid="4919312892541727761">"Majtas 70%"</string> - <string name="accessibility_action_divider_left_50" msgid="3664701169564893826">"Majtas 50%"</string> - <string name="accessibility_action_divider_left_30" msgid="4358145268046362088">"Majtas 30%"</string> - <string name="accessibility_action_divider_right_full" msgid="8576057422864896305">"Ekrani i plotë djathtas"</string> - <string name="accessibility_action_divider_top_full" msgid="4243901660795169777">"Ekrani i plotë lart"</string> - <string name="accessibility_action_divider_top_70" msgid="6941226213260515072">"Lart 70%"</string> - <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Lart 50%"</string> - <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Lart 30%"</string> - <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Ekrani i plotë poshtë"</string> <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Pozicioni <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Trokit dy herë për ta redaktuar."</string> <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Trokit dy herë për ta shtuar."</string> <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Zhvendose <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string> @@ -898,10 +887,6 @@ <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Zhvendos <xliff:g id="TILE_NAME">%1$s</xliff:g> te pozicioni <xliff:g id="POSITION">%2$d</xliff:g>"</string> <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Redaktori i cilësimeve të shpejta."</string> <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"Njoftim nga <xliff:g id="ID_1">%1$s</xliff:g>: <xliff:g id="ID_2">%2$s</xliff:g>"</string> - <string name="dock_forced_resizable" msgid="4689301323912928801">"Aplikacioni mund të mos funksionojë me ekranin e ndarë."</string> - <string name="dock_non_resizeble_failed_to_dock_text" msgid="7284915968096153808">"Aplikacioni nuk mbështet ekranin e ndarë."</string> - <string name="forced_resizable_secondary_display" msgid="522558907654394940">"Aplikacioni mund të mos funksionojë në një ekran dytësor."</string> - <string name="activity_launch_on_secondary_display_failed_text" msgid="8446727617187998208">"Aplikacioni nuk mbështet nisjen në ekrane dytësore."</string> <string name="accessibility_quick_settings_settings" msgid="7098489591715844713">"Hap cilësimet."</string> <string name="accessibility_quick_settings_expand" msgid="2609275052412521467">"Hap cilësimet e shpejta."</string> <string name="accessibility_quick_settings_collapse" msgid="4674876336725041982">"Mbyll cilësimet e shpejta."</string> diff --git a/packages/SystemUI/res/values-sr/strings.xml b/packages/SystemUI/res/values-sr/strings.xml index ec763f675d4c..8b7ce1f35cb3 100644 --- a/packages/SystemUI/res/values-sr/strings.xml +++ b/packages/SystemUI/res/values-sr/strings.xml @@ -884,17 +884,6 @@ </string-array> <string name="tuner_low_priority" msgid="8412666814123009820">"Прикажи иконе обавештења ниског приоритета"</string> <string name="other" msgid="429768510980739978">"Друго"</string> - <string name="accessibility_divider" msgid="2830785970889237307">"Разделник подељеног екрана"</string> - <string name="accessibility_action_divider_left_full" msgid="7598733539422375847">"Режим целог екрана за леви екран"</string> - <string name="accessibility_action_divider_left_70" msgid="4919312892541727761">"Леви екран 70%"</string> - <string name="accessibility_action_divider_left_50" msgid="3664701169564893826">"Леви екран 50%"</string> - <string name="accessibility_action_divider_left_30" msgid="4358145268046362088">"Леви екран 30%"</string> - <string name="accessibility_action_divider_right_full" msgid="8576057422864896305">"Режим целог екрана за доњи екран"</string> - <string name="accessibility_action_divider_top_full" msgid="4243901660795169777">"Режим целог екрана за горњи екран"</string> - <string name="accessibility_action_divider_top_70" msgid="6941226213260515072">"Горњи екран 70%"</string> - <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Горњи екран 50%"</string> - <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Горњи екран 30%"</string> - <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Режим целог екрана за доњи екран"</string> <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"<xliff:g id="POSITION">%1$d</xliff:g>. позиција, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Двапут додирните да бисте изменили."</string> <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Двапут додирните да бисте додали."</string> <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Премести плочицу <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string> @@ -903,10 +892,6 @@ <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Преместите „<xliff:g id="TILE_NAME">%1$s</xliff:g>“ на позицију <xliff:g id="POSITION">%2$d</xliff:g>"</string> <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Уређивач за Брза подешавања."</string> <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"Обавештења за <xliff:g id="ID_1">%1$s</xliff:g>: <xliff:g id="ID_2">%2$s</xliff:g>"</string> - <string name="dock_forced_resizable" msgid="4689301323912928801">"Апликација можда неће функционисати са подељеним екраном."</string> - <string name="dock_non_resizeble_failed_to_dock_text" msgid="7284915968096153808">"Апликација не подржава подељени екран."</string> - <string name="forced_resizable_secondary_display" msgid="522558907654394940">"Апликација можда неће функционисати на секундарном екрану."</string> - <string name="activity_launch_on_secondary_display_failed_text" msgid="8446727617187998208">"Апликација не подржава покретање на секундарним екранима."</string> <string name="accessibility_quick_settings_settings" msgid="7098489591715844713">"Отвори Подешавања."</string> <string name="accessibility_quick_settings_expand" msgid="2609275052412521467">"Отвори Брза подешавања."</string> <string name="accessibility_quick_settings_collapse" msgid="4674876336725041982">"Затвори Брза подешавања."</string> diff --git a/packages/SystemUI/res/values-sv/strings.xml b/packages/SystemUI/res/values-sv/strings.xml index a0a563d81d46..c4b7977ae5a6 100644 --- a/packages/SystemUI/res/values-sv/strings.xml +++ b/packages/SystemUI/res/values-sv/strings.xml @@ -879,17 +879,6 @@ </string-array> <string name="tuner_low_priority" msgid="8412666814123009820">"Visa ikoner för aviseringar med låg prioritet"</string> <string name="other" msgid="429768510980739978">"Annat"</string> - <string name="accessibility_divider" msgid="2830785970889237307">"Avdelare för delad skärm"</string> - <string name="accessibility_action_divider_left_full" msgid="7598733539422375847">"Helskärm på vänster skärm"</string> - <string name="accessibility_action_divider_left_70" msgid="4919312892541727761">"Vänster 70 %"</string> - <string name="accessibility_action_divider_left_50" msgid="3664701169564893826">"Vänster 50 %"</string> - <string name="accessibility_action_divider_left_30" msgid="4358145268046362088">"Vänster 30 %"</string> - <string name="accessibility_action_divider_right_full" msgid="8576057422864896305">"Helskärm på höger skärm"</string> - <string name="accessibility_action_divider_top_full" msgid="4243901660795169777">"Helskärm på övre skärm"</string> - <string name="accessibility_action_divider_top_70" msgid="6941226213260515072">"Övre 70 %"</string> - <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Övre 50 %"</string> - <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Övre 30 %"</string> - <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Helskärm på nedre skärm"</string> <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Position <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Tryck snabbt två gånger för att redigera positionen."</string> <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Lägg till genom att trycka snabbt två gånger."</string> <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Flytta <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string> @@ -898,10 +887,6 @@ <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Flytta <xliff:g id="TILE_NAME">%1$s</xliff:g> till position <xliff:g id="POSITION">%2$d</xliff:g>"</string> <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Redigerare för snabbinställningar."</string> <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g>-avisering: <xliff:g id="ID_2">%2$s</xliff:g>"</string> - <string name="dock_forced_resizable" msgid="4689301323912928801">"Appen kanske inte fungerar med delad skärm."</string> - <string name="dock_non_resizeble_failed_to_dock_text" msgid="7284915968096153808">"Appen har inte stöd för delad skärm."</string> - <string name="forced_resizable_secondary_display" msgid="522558907654394940">"Appen kanske inte fungerar på en sekundär skärm."</string> - <string name="activity_launch_on_secondary_display_failed_text" msgid="8446727617187998208">"Appen kan inte köras på en sekundär skärm."</string> <string name="accessibility_quick_settings_settings" msgid="7098489591715844713">"Öppna inställningarna."</string> <string name="accessibility_quick_settings_expand" msgid="2609275052412521467">"Öppna snabbinställningarna."</string> <string name="accessibility_quick_settings_collapse" msgid="4674876336725041982">"Stäng snabbinställningarna"</string> diff --git a/packages/SystemUI/res/values-sw/strings.xml b/packages/SystemUI/res/values-sw/strings.xml index 7e264a4a312a..b483fa8f0791 100644 --- a/packages/SystemUI/res/values-sw/strings.xml +++ b/packages/SystemUI/res/values-sw/strings.xml @@ -879,17 +879,6 @@ </string-array> <string name="tuner_low_priority" msgid="8412666814123009820">"Onyesha aikoni za arifa zisizo muhimu"</string> <string name="other" msgid="429768510980739978">"Nyingine"</string> - <string name="accessibility_divider" msgid="2830785970889237307">"Kitenganishi cha skrini inayogawanywa"</string> - <string name="accessibility_action_divider_left_full" msgid="7598733539422375847">"Skrini nzima ya kushoto"</string> - <string name="accessibility_action_divider_left_70" msgid="4919312892541727761">"Kushoto 70%"</string> - <string name="accessibility_action_divider_left_50" msgid="3664701169564893826">"Kushoto 50%"</string> - <string name="accessibility_action_divider_left_30" msgid="4358145268046362088">"Kushoto 30%"</string> - <string name="accessibility_action_divider_right_full" msgid="8576057422864896305">"Skrini nzima ya kulia"</string> - <string name="accessibility_action_divider_top_full" msgid="4243901660795169777">"Skrini nzima ya juu"</string> - <string name="accessibility_action_divider_top_70" msgid="6941226213260515072">"Juu 70%"</string> - <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Juu 50%"</string> - <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Juu 30%"</string> - <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Skrini nzima ya chini"</string> <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Nafasi ya <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Gusa mara mbili ili ubadilishe."</string> <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Gusa mara mbili ili uongeze."</string> <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Hamisha <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string> @@ -898,10 +887,6 @@ <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Sogeza <xliff:g id="TILE_NAME">%1$s</xliff:g> kwenye nafasi ya <xliff:g id="POSITION">%2$d</xliff:g>"</string> <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Kihariri cha Mipangilio ya haraka."</string> <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"Arifa kutoka <xliff:g id="ID_1">%1$s</xliff:g>: <xliff:g id="ID_2">%2$s</xliff:g>"</string> - <string name="dock_forced_resizable" msgid="4689301323912928801">"Huenda programu isifanye kazi kwenye skrini inayogawanywa."</string> - <string name="dock_non_resizeble_failed_to_dock_text" msgid="7284915968096153808">"Programu haiwezi kutumia skrini iliyogawanywa."</string> - <string name="forced_resizable_secondary_display" msgid="522558907654394940">"Huenda programu isifanye kazi kwenye dirisha lingine."</string> - <string name="activity_launch_on_secondary_display_failed_text" msgid="8446727617187998208">"Programu hii haiwezi kufunguliwa kwenye madirisha mengine."</string> <string name="accessibility_quick_settings_settings" msgid="7098489591715844713">"Fungua mipangilio."</string> <string name="accessibility_quick_settings_expand" msgid="2609275052412521467">"Fungua mipangilio ya haraka."</string> <string name="accessibility_quick_settings_collapse" msgid="4674876336725041982">"Funga mipangilio ya haraka."</string> diff --git a/packages/SystemUI/res/values-sw600dp/config.xml b/packages/SystemUI/res/values-sw600dp/config.xml index 5d20564a3ab8..be66320975d9 100644 --- a/packages/SystemUI/res/values-sw600dp/config.xml +++ b/packages/SystemUI/res/values-sw600dp/config.xml @@ -29,9 +29,6 @@ <!-- Nav bar button default ordering/layout --> <string name="config_navBarLayout" translatable="false">left;back,home,recent;right</string> - <!-- Animation duration when using long press on recents to dock --> - <integer name="long_press_dock_anim_duration">290</integer> - <!-- orientation of the dead zone when touches have recently occurred elsewhere on screen --> <integer name="navigation_bar_deadzone_orientation">0</integer> diff --git a/packages/SystemUI/res/values-ta/strings.xml b/packages/SystemUI/res/values-ta/strings.xml index e0f20ceea353..2c025e72cdf4 100644 --- a/packages/SystemUI/res/values-ta/strings.xml +++ b/packages/SystemUI/res/values-ta/strings.xml @@ -879,17 +879,6 @@ </string-array> <string name="tuner_low_priority" msgid="8412666814123009820">"குறைந்த முன்னுரிமை உள்ள அறிவிப்பு ஐகான்களைக் காட்டு"</string> <string name="other" msgid="429768510980739978">"மற்றவை"</string> - <string name="accessibility_divider" msgid="2830785970889237307">"திரையைப் பிரிக்கும் பிரிப்பான்"</string> - <string name="accessibility_action_divider_left_full" msgid="7598733539422375847">"இடது புறம் முழுத் திரை"</string> - <string name="accessibility_action_divider_left_70" msgid="4919312892541727761">"இடது புறம் 70%"</string> - <string name="accessibility_action_divider_left_50" msgid="3664701169564893826">"இடது புறம் 50%"</string> - <string name="accessibility_action_divider_left_30" msgid="4358145268046362088">"இடது புறம் 30%"</string> - <string name="accessibility_action_divider_right_full" msgid="8576057422864896305">"வலது புறம் முழுத் திரை"</string> - <string name="accessibility_action_divider_top_full" msgid="4243901660795169777">"மேற்புறம் முழுத் திரை"</string> - <string name="accessibility_action_divider_top_70" msgid="6941226213260515072">"மேலே 70%"</string> - <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"மேலே 50%"</string> - <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"மேலே 30%"</string> - <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"கீழ்ப்புறம் முழுத் திரை"</string> <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"நிலை <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. திருத்த, இருமுறை தட்டவும்."</string> <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. சேர்க்க, இருமுறை தட்டவும்."</string> <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"<xliff:g id="TILE_NAME">%1$s</xliff:g>ஐ நகர்த்தவும்"</string> @@ -898,10 +887,6 @@ <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"நிலைப்பாடு <xliff:g id="POSITION">%2$d</xliff:g>க்கு <xliff:g id="TILE_NAME">%1$s</xliff:g>ஐ நகர்த்தும்"</string> <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"விரைவு அமைப்புகள் திருத்தி."</string> <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g> அறிவிப்பு: <xliff:g id="ID_2">%2$s</xliff:g>"</string> - <string name="dock_forced_resizable" msgid="4689301323912928801">"திரைப் பிரிப்பில் ஆப்ஸ் வேலைசெய்யாமல் போகக்கூடும்."</string> - <string name="dock_non_resizeble_failed_to_dock_text" msgid="7284915968096153808">"திரையைப் பிரிப்பதைப் ஆப்ஸ் ஆதரிக்கவில்லை."</string> - <string name="forced_resizable_secondary_display" msgid="522558907654394940">"இரண்டாம்நிலைத் திரையில் ஆப்ஸ் வேலை செய்யாமல் போகக்கூடும்."</string> - <string name="activity_launch_on_secondary_display_failed_text" msgid="8446727617187998208">"இரண்டாம்நிலைத் திரைகளில் பயன்பாட்டைத் தொடங்க முடியாது."</string> <string name="accessibility_quick_settings_settings" msgid="7098489591715844713">"அமைப்புகளைத் திற."</string> <string name="accessibility_quick_settings_expand" msgid="2609275052412521467">"விரைவு அமைப்புகளைத் திற."</string> <string name="accessibility_quick_settings_collapse" msgid="4674876336725041982">"விரைவு அமைப்புகளை மூடு."</string> diff --git a/packages/SystemUI/res/values-te/strings.xml b/packages/SystemUI/res/values-te/strings.xml index 3e94b72b02fe..a49bb9b46512 100644 --- a/packages/SystemUI/res/values-te/strings.xml +++ b/packages/SystemUI/res/values-te/strings.xml @@ -879,17 +879,6 @@ </string-array> <string name="tuner_low_priority" msgid="8412666814123009820">"తక్కువ ప్రాధాన్యత నోటిఫికేషన్ చిహ్నాలను చూపించు"</string> <string name="other" msgid="429768510980739978">"ఇతరం"</string> - <string name="accessibility_divider" msgid="2830785970889237307">"విభజన స్క్రీన్ విభాగిని"</string> - <string name="accessibility_action_divider_left_full" msgid="7598733539422375847">"ఎడమవైపు పూర్తి స్క్రీన్"</string> - <string name="accessibility_action_divider_left_70" msgid="4919312892541727761">"ఎడమవైపు 70%"</string> - <string name="accessibility_action_divider_left_50" msgid="3664701169564893826">"ఎడమవైపు 50%"</string> - <string name="accessibility_action_divider_left_30" msgid="4358145268046362088">"ఎడమవైపు 30%"</string> - <string name="accessibility_action_divider_right_full" msgid="8576057422864896305">"కుడివైపు పూర్తి స్క్రీన్"</string> - <string name="accessibility_action_divider_top_full" msgid="4243901660795169777">"ఎగువ పూర్తి స్క్రీన్"</string> - <string name="accessibility_action_divider_top_70" msgid="6941226213260515072">"ఎగువ 70%"</string> - <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"ఎగువ 50%"</string> - <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"ఎగువ 30%"</string> - <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"దిగువ పూర్తి స్క్రీన్"</string> <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"స్థానం <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. సవరించడానికి రెండుసార్లు నొక్కండి."</string> <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. జోడించడానికి రెండుసార్లు నొక్కండి."</string> <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"<xliff:g id="TILE_NAME">%1$s</xliff:g>ని తరలిస్తుంది"</string> @@ -898,10 +887,6 @@ <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"స్థానం <xliff:g id="POSITION">%2$d</xliff:g>కి <xliff:g id="TILE_NAME">%1$s</xliff:g>ని తరలించండి"</string> <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"శీఘ్ర సెట్టింగ్ల ఎడిటర్."</string> <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g> నోటిఫికేషన్: <xliff:g id="ID_2">%2$s</xliff:g>"</string> - <string name="dock_forced_resizable" msgid="4689301323912928801">"స్క్రీన్ విభజనతో యాప్ పని చేయకపోవచ్చు."</string> - <string name="dock_non_resizeble_failed_to_dock_text" msgid="7284915968096153808">"అనువర్తనంలో స్క్రీన్ విభజనకు మద్దతు లేదు."</string> - <string name="forced_resizable_secondary_display" msgid="522558907654394940">"ప్రత్యామ్నాయ డిస్ప్లేలో యాప్ పని చేయకపోవచ్చు."</string> - <string name="activity_launch_on_secondary_display_failed_text" msgid="8446727617187998208">"ప్రత్యామ్నాయ డిస్ప్లేల్లో ప్రారంభానికి యాప్ మద్దతు లేదు."</string> <string name="accessibility_quick_settings_settings" msgid="7098489591715844713">"సెట్టింగ్లను తెరవండి."</string> <string name="accessibility_quick_settings_expand" msgid="2609275052412521467">"శీఘ్ర సెట్టింగ్లను తెరవండి."</string> <string name="accessibility_quick_settings_collapse" msgid="4674876336725041982">"శీఘ్ర సెట్టింగ్లను మూసివేయండి."</string> diff --git a/packages/SystemUI/res/values-television/config.xml b/packages/SystemUI/res/values-television/config.xml index 4a94038f4533..66304013da46 100644 --- a/packages/SystemUI/res/values-television/config.xml +++ b/packages/SystemUI/res/values-television/config.xml @@ -39,7 +39,6 @@ <item>com.android.systemui.SizeCompatModeActivityController</item> <item>com.android.systemui.statusbar.notification.InstantAppNotifier</item> <item>com.android.systemui.toast.ToastUI</item> - <item>com.android.systemui.onehanded.OneHandedUI</item> <item>com.android.systemui.wmshell.WMShell</item> </string-array> diff --git a/packages/SystemUI/res/values-th/strings.xml b/packages/SystemUI/res/values-th/strings.xml index 088b62421b92..8fd844203d9f 100644 --- a/packages/SystemUI/res/values-th/strings.xml +++ b/packages/SystemUI/res/values-th/strings.xml @@ -879,17 +879,6 @@ </string-array> <string name="tuner_low_priority" msgid="8412666814123009820">"แสดงไอคอนการแจ้งเตือนลำดับความสำคัญต่ำ"</string> <string name="other" msgid="429768510980739978">"อื่นๆ"</string> - <string name="accessibility_divider" msgid="2830785970889237307">"เส้นแบ่งหน้าจอ"</string> - <string name="accessibility_action_divider_left_full" msgid="7598733539422375847">"เต็มหน้าจอทางซ้าย"</string> - <string name="accessibility_action_divider_left_70" msgid="4919312892541727761">"ซ้าย 70%"</string> - <string name="accessibility_action_divider_left_50" msgid="3664701169564893826">"ซ้าย 50%"</string> - <string name="accessibility_action_divider_left_30" msgid="4358145268046362088">"ซ้าย 30%"</string> - <string name="accessibility_action_divider_right_full" msgid="8576057422864896305">"เต็มหน้าจอทางขวา"</string> - <string name="accessibility_action_divider_top_full" msgid="4243901660795169777">"เต็มหน้าจอด้านบน"</string> - <string name="accessibility_action_divider_top_70" msgid="6941226213260515072">"ด้านบน 70%"</string> - <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"ด้านบน 50%"</string> - <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"ด้านบน 30%"</string> - <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"เต็มหน้าจอด้านล่าง"</string> <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"ตำแหน่ง <xliff:g id="POSITION">%1$d</xliff:g> <xliff:g id="TILE_NAME">%2$s</xliff:g> แตะ 2 ครั้งเพื่อแก้ไข"</string> <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g> แตะ 2 ครั้งเพื่อเพิ่ม"</string> <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"ย้าย <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string> @@ -898,10 +887,6 @@ <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"ย้าย <xliff:g id="TILE_NAME">%1$s</xliff:g> ไปยังตำแหน่ง <xliff:g id="POSITION">%2$d</xliff:g>"</string> <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"ตัวแก้ไขการตั้งค่าด่วน"</string> <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g> การแจ้งเตือน: <xliff:g id="ID_2">%2$s</xliff:g>"</string> - <string name="dock_forced_resizable" msgid="4689301323912928801">"แอปอาจใช้ไม่ได้กับโหมดแยกหน้าจอ"</string> - <string name="dock_non_resizeble_failed_to_dock_text" msgid="7284915968096153808">"แอปไม่สนับสนุนการแยกหน้าจอ"</string> - <string name="forced_resizable_secondary_display" msgid="522558907654394940">"แอปอาจไม่ทำงานในจอแสดงผลรอง"</string> - <string name="activity_launch_on_secondary_display_failed_text" msgid="8446727617187998208">"แอปไม่รองรับการเรียกใช้ในจอแสดงผลรอง"</string> <string name="accessibility_quick_settings_settings" msgid="7098489591715844713">"เปิดการตั้งค่า"</string> <string name="accessibility_quick_settings_expand" msgid="2609275052412521467">"เปิดการตั้งค่าด่วน"</string> <string name="accessibility_quick_settings_collapse" msgid="4674876336725041982">"ปิดการตั้งค่าด่วน"</string> diff --git a/packages/SystemUI/res/values-tl/strings.xml b/packages/SystemUI/res/values-tl/strings.xml index e787b17417bb..5951ba223c5d 100644 --- a/packages/SystemUI/res/values-tl/strings.xml +++ b/packages/SystemUI/res/values-tl/strings.xml @@ -879,17 +879,6 @@ </string-array> <string name="tuner_low_priority" msgid="8412666814123009820">"Ipakita ang mga icon ng notification na may mababang priority"</string> <string name="other" msgid="429768510980739978">"Iba pa"</string> - <string name="accessibility_divider" msgid="2830785970889237307">"Divider ng split-screen"</string> - <string name="accessibility_action_divider_left_full" msgid="7598733539422375847">"I-full screen ang nasa kaliwa"</string> - <string name="accessibility_action_divider_left_70" msgid="4919312892541727761">"Gawing 70% ang nasa kaliwa"</string> - <string name="accessibility_action_divider_left_50" msgid="3664701169564893826">"Gawing 50% ang nasa kaliwa"</string> - <string name="accessibility_action_divider_left_30" msgid="4358145268046362088">"Gawing 30% ang nasa kaliwa"</string> - <string name="accessibility_action_divider_right_full" msgid="8576057422864896305">"I-full screen ang nasa kanan"</string> - <string name="accessibility_action_divider_top_full" msgid="4243901660795169777">"I-full screen ang nasa itaas"</string> - <string name="accessibility_action_divider_top_70" msgid="6941226213260515072">"Gawing 70% ang nasa itaas"</string> - <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Gawing 50% ang nasa itaas"</string> - <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Gawing 30% ang nasa itaas"</string> - <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"I-full screen ang nasa ibaba"</string> <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Posisyon <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. I-double tap upang i-edit."</string> <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. I-double tap upang idagdag."</string> <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Ilipat ang <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string> @@ -898,10 +887,6 @@ <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Ilipat ang <xliff:g id="TILE_NAME">%1$s</xliff:g> sa posisyong <xliff:g id="POSITION">%2$d</xliff:g>"</string> <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Editor ng Mga mabilisang setting."</string> <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"Notification sa <xliff:g id="ID_1">%1$s</xliff:g>: <xliff:g id="ID_2">%2$s</xliff:g>"</string> - <string name="dock_forced_resizable" msgid="4689301323912928801">"Maaaring hindi gumana ang app sa split-screen."</string> - <string name="dock_non_resizeble_failed_to_dock_text" msgid="7284915968096153808">"Hindi sinusuportahan ng app ang split-screen."</string> - <string name="forced_resizable_secondary_display" msgid="522558907654394940">"Maaaring hindi gumana ang app sa pangalawang display."</string> - <string name="activity_launch_on_secondary_display_failed_text" msgid="8446727617187998208">"Hindi sinusuportahan ng app ang paglulunsad sa mga pangalawang display."</string> <string name="accessibility_quick_settings_settings" msgid="7098489591715844713">"Buksan ang mga setting."</string> <string name="accessibility_quick_settings_expand" msgid="2609275052412521467">"Buksan ang mga mabilisang setting."</string> <string name="accessibility_quick_settings_collapse" msgid="4674876336725041982">"Isara ang mga mabilisang setting."</string> diff --git a/packages/SystemUI/res/values-tr/strings.xml b/packages/SystemUI/res/values-tr/strings.xml index e33944517393..2d2ccadd65d8 100644 --- a/packages/SystemUI/res/values-tr/strings.xml +++ b/packages/SystemUI/res/values-tr/strings.xml @@ -879,17 +879,6 @@ </string-array> <string name="tuner_low_priority" msgid="8412666814123009820">"Düşük öncelikli bildirim simgelerini göster"</string> <string name="other" msgid="429768510980739978">"Diğer"</string> - <string name="accessibility_divider" msgid="2830785970889237307">"Bölünmüş ekran ayırıcı"</string> - <string name="accessibility_action_divider_left_full" msgid="7598733539422375847">"Solda tam ekran"</string> - <string name="accessibility_action_divider_left_70" msgid="4919312892541727761">"Solda %70"</string> - <string name="accessibility_action_divider_left_50" msgid="3664701169564893826">"Solda %50"</string> - <string name="accessibility_action_divider_left_30" msgid="4358145268046362088">"Solda %30"</string> - <string name="accessibility_action_divider_right_full" msgid="8576057422864896305">"Sağda tam ekran"</string> - <string name="accessibility_action_divider_top_full" msgid="4243901660795169777">"Üstte tam ekran"</string> - <string name="accessibility_action_divider_top_70" msgid="6941226213260515072">"Üstte %70"</string> - <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Üstte %50"</string> - <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Üstte %30"</string> - <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Altta tam ekran"</string> <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"<xliff:g id="POSITION">%1$d</xliff:g>. konum, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Düzenlemek için iki kez dokunun."</string> <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Eklemek için iki kez dokunun."</string> <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"<xliff:g id="TILE_NAME">%1$s</xliff:g> kutusunu taşı"</string> @@ -898,10 +887,6 @@ <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"<xliff:g id="TILE_NAME">%1$s</xliff:g> öğesini <xliff:g id="POSITION">%2$d</xliff:g> konumuna taşı"</string> <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Hızlı ayar düzenleyicisi."</string> <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g> bildirimi: <xliff:g id="ID_2">%2$s</xliff:g>"</string> - <string name="dock_forced_resizable" msgid="4689301323912928801">"Uygulama bölünmüş ekranda çalışmayabilir."</string> - <string name="dock_non_resizeble_failed_to_dock_text" msgid="7284915968096153808">"Uygulama bölünmüş ekranı desteklemiyor."</string> - <string name="forced_resizable_secondary_display" msgid="522558907654394940">"Uygulama ikincil ekranda çalışmayabilir."</string> - <string name="activity_launch_on_secondary_display_failed_text" msgid="8446727617187998208">"Uygulama ikincil ekranlarda başlatılmayı desteklemiyor."</string> <string name="accessibility_quick_settings_settings" msgid="7098489591715844713">"Ayarları aç."</string> <string name="accessibility_quick_settings_expand" msgid="2609275052412521467">"Hızlı ayarları aç."</string> <string name="accessibility_quick_settings_collapse" msgid="4674876336725041982">"Hızlı ayarları kapat."</string> diff --git a/packages/SystemUI/res/values-uk/strings.xml b/packages/SystemUI/res/values-uk/strings.xml index f5419f1d1290..1a8ce7b6ad76 100644 --- a/packages/SystemUI/res/values-uk/strings.xml +++ b/packages/SystemUI/res/values-uk/strings.xml @@ -889,17 +889,6 @@ </string-array> <string name="tuner_low_priority" msgid="8412666814123009820">"Показувати значки сповіщень із низьким пріоритетом"</string> <string name="other" msgid="429768510980739978">"Інше"</string> - <string name="accessibility_divider" msgid="2830785970889237307">"Розділювач екрана"</string> - <string name="accessibility_action_divider_left_full" msgid="7598733539422375847">"Ліве вікно на весь екран"</string> - <string name="accessibility_action_divider_left_70" msgid="4919312892541727761">"Ліве вікно на 70%"</string> - <string name="accessibility_action_divider_left_50" msgid="3664701169564893826">"Ліве вікно на 50%"</string> - <string name="accessibility_action_divider_left_30" msgid="4358145268046362088">"Ліве вікно на 30%"</string> - <string name="accessibility_action_divider_right_full" msgid="8576057422864896305">"Праве вікно на весь екран"</string> - <string name="accessibility_action_divider_top_full" msgid="4243901660795169777">"Верхнє вікно на весь екран"</string> - <string name="accessibility_action_divider_top_70" msgid="6941226213260515072">"Верхнє вікно на 70%"</string> - <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Верхнє вікно на 50%"</string> - <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Верхнє вікно на 30%"</string> - <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Нижнє вікно на весь екран"</string> <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Позиція <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Двічі торкніться, щоб змінити."</string> <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Двічі торкніться, щоб додати."</string> <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Перемістити <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string> @@ -908,10 +897,6 @@ <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Перемістити <xliff:g id="TILE_NAME">%1$s</xliff:g> на позицію <xliff:g id="POSITION">%2$d</xliff:g>"</string> <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Редактор швидких налаштувань."</string> <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"Сповіщення <xliff:g id="ID_1">%1$s</xliff:g>: <xliff:g id="ID_2">%2$s</xliff:g>"</string> - <string name="dock_forced_resizable" msgid="4689301323912928801">"Додаток може не працювати в режимі розділеного екрана."</string> - <string name="dock_non_resizeble_failed_to_dock_text" msgid="7284915968096153808">"Додаток не підтримує розділення екрана."</string> - <string name="forced_resizable_secondary_display" msgid="522558907654394940">"Додаток може не працювати на додатковому екрані."</string> - <string name="activity_launch_on_secondary_display_failed_text" msgid="8446727617187998208">"Додаток не підтримує запуск на додаткових екранах."</string> <string name="accessibility_quick_settings_settings" msgid="7098489591715844713">"Відкрити налаштування."</string> <string name="accessibility_quick_settings_expand" msgid="2609275052412521467">"Відкрити швидкі налаштування."</string> <string name="accessibility_quick_settings_collapse" msgid="4674876336725041982">"Закрити швидкі налаштування."</string> diff --git a/packages/SystemUI/res/values-ur/strings.xml b/packages/SystemUI/res/values-ur/strings.xml index 2abf3500ff4a..4f091d6bde09 100644 --- a/packages/SystemUI/res/values-ur/strings.xml +++ b/packages/SystemUI/res/values-ur/strings.xml @@ -879,17 +879,6 @@ </string-array> <string name="tuner_low_priority" msgid="8412666814123009820">"کم ترجیحی اطلاع کے آئیکنز دکھائیں"</string> <string name="other" msgid="429768510980739978">"دیگر"</string> - <string name="accessibility_divider" msgid="2830785970889237307">"سپلٹ اسکرین تقسیم کار"</string> - <string name="accessibility_action_divider_left_full" msgid="7598733539422375847">"بائیں فل اسکرین"</string> - <string name="accessibility_action_divider_left_70" msgid="4919312892541727761">"بائیں %70"</string> - <string name="accessibility_action_divider_left_50" msgid="3664701169564893826">"بائیں %50"</string> - <string name="accessibility_action_divider_left_30" msgid="4358145268046362088">"بائیں %30"</string> - <string name="accessibility_action_divider_right_full" msgid="8576057422864896305">"دائیں فل اسکرین"</string> - <string name="accessibility_action_divider_top_full" msgid="4243901660795169777">"بالائی فل اسکرین"</string> - <string name="accessibility_action_divider_top_70" msgid="6941226213260515072">"اوپر %70"</string> - <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"اوپر %50"</string> - <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"اوپر %30"</string> - <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"نچلی فل اسکرین"</string> <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"پوزیشن <xliff:g id="POSITION">%1$d</xliff:g>، <xliff:g id="TILE_NAME">%2$s</xliff:g>۔ ترمیم کرنے کیلئے دو بار تھپتھپائیں۔"</string> <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>۔ شامل کرنے کیلئے دو بار تھپتھپائیں۔"</string> <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"<xliff:g id="TILE_NAME">%1$s</xliff:g> کو منتقل کریں"</string> @@ -898,10 +887,6 @@ <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"<xliff:g id="TILE_NAME">%1$s</xliff:g> کو پوزیشن <xliff:g id="POSITION">%2$d</xliff:g> میں منتقل کریں"</string> <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"فوری ترتیبات کا ایڈیٹر۔"</string> <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g> اطلاع: <xliff:g id="ID_2">%2$s</xliff:g>"</string> - <string name="dock_forced_resizable" msgid="4689301323912928801">"ممکن ہے کہ ایپ سپلٹ اسکرین کے ساتھ کام نہ کرے۔"</string> - <string name="dock_non_resizeble_failed_to_dock_text" msgid="7284915968096153808">"ایپ سپلٹ اسکرین کو سپورٹ نہیں کرتی۔"</string> - <string name="forced_resizable_secondary_display" msgid="522558907654394940">"ممکن ہے ایپ ثانوی ڈسپلے پر کام نہ کرے۔"</string> - <string name="activity_launch_on_secondary_display_failed_text" msgid="8446727617187998208">"ایپ ثانوی ڈسپلیز پر شروعات کا تعاون نہیں کرتی۔"</string> <string name="accessibility_quick_settings_settings" msgid="7098489591715844713">"ترتیبات کھولیں۔"</string> <string name="accessibility_quick_settings_expand" msgid="2609275052412521467">"فوری ترتیبات کھولیں۔"</string> <string name="accessibility_quick_settings_collapse" msgid="4674876336725041982">"فوری ترتیبات بند کریں۔"</string> diff --git a/packages/SystemUI/res/values-uz/strings.xml b/packages/SystemUI/res/values-uz/strings.xml index 61b10a4ed24c..26a691a147ce 100644 --- a/packages/SystemUI/res/values-uz/strings.xml +++ b/packages/SystemUI/res/values-uz/strings.xml @@ -879,17 +879,6 @@ </string-array> <string name="tuner_low_priority" msgid="8412666814123009820">"Muhim boʻlmagan bildirishnoma ikonkalarini koʻrsatish"</string> <string name="other" msgid="429768510980739978">"Boshqa"</string> - <string name="accessibility_divider" msgid="2830785970889237307">"Ekranni ikkiga bo‘lish chizig‘i"</string> - <string name="accessibility_action_divider_left_full" msgid="7598733539422375847">"Chapda to‘liq ekran"</string> - <string name="accessibility_action_divider_left_70" msgid="4919312892541727761">"Chapda 70%"</string> - <string name="accessibility_action_divider_left_50" msgid="3664701169564893826">"Chapda 50%"</string> - <string name="accessibility_action_divider_left_30" msgid="4358145268046362088">"Chapda 30%"</string> - <string name="accessibility_action_divider_right_full" msgid="8576057422864896305">"O‘ngda to‘liq ekran"</string> - <string name="accessibility_action_divider_top_full" msgid="4243901660795169777">"Tepada to‘liq ekran"</string> - <string name="accessibility_action_divider_top_70" msgid="6941226213260515072">"Tepada 70%"</string> - <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Tepada 50%"</string> - <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Tepada 30%"</string> - <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Pastda to‘liq ekran"</string> <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"<xliff:g id="POSITION">%1$d</xliff:g>-joy, “<xliff:g id="TILE_NAME">%2$s</xliff:g>” tugmasi. Tahrirlash uchun ustiga ikki marta bosing."</string> <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"“<xliff:g id="TILE_NAME">%1$s</xliff:g>” tugmasi. Qo‘shish uchun ustiga ikki marta bosing."</string> <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"“<xliff:g id="TILE_NAME">%1$s</xliff:g>” tugmasini ko‘chirish"</string> @@ -898,10 +887,6 @@ <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"<xliff:g id="POSITION">%2$d</xliff:g>-joyga buni ko‘chirish: <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string> <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Tezkor sozlamalar muharriri"</string> <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g> bildirishnomasi: <xliff:g id="ID_2">%2$s</xliff:g>"</string> - <string name="dock_forced_resizable" msgid="4689301323912928801">"Ilova ekranni ikkiga bo‘lish rejimini qo‘llab-quvvatlamaydi."</string> - <string name="dock_non_resizeble_failed_to_dock_text" msgid="7284915968096153808">"Bu ilova ekranni bo‘lish xususiyatini qo‘llab-quvvatlamaydi."</string> - <string name="forced_resizable_secondary_display" msgid="522558907654394940">"Bu ilova qo‘shimcha ekranda ishlamasligi mumkin."</string> - <string name="activity_launch_on_secondary_display_failed_text" msgid="8446727617187998208">"Bu ilova qo‘shimcha ekranlarda ishga tushmaydi."</string> <string name="accessibility_quick_settings_settings" msgid="7098489591715844713">"Sozlamalarni ochish."</string> <string name="accessibility_quick_settings_expand" msgid="2609275052412521467">"Tezkor sozlamalarni ochish."</string> <string name="accessibility_quick_settings_collapse" msgid="4674876336725041982">"Tezkor sozlamalarni yopish."</string> diff --git a/packages/SystemUI/res/values-vi/strings.xml b/packages/SystemUI/res/values-vi/strings.xml index 6107270f10c5..bea99a9aa82e 100644 --- a/packages/SystemUI/res/values-vi/strings.xml +++ b/packages/SystemUI/res/values-vi/strings.xml @@ -879,17 +879,6 @@ </string-array> <string name="tuner_low_priority" msgid="8412666814123009820">"Hiển thị biểu tượng thông báo có mức ưu tiên thấp"</string> <string name="other" msgid="429768510980739978">"Khác"</string> - <string name="accessibility_divider" msgid="2830785970889237307">"Bộ chia chia đôi màn hình"</string> - <string name="accessibility_action_divider_left_full" msgid="7598733539422375847">"Toàn màn hình bên trái"</string> - <string name="accessibility_action_divider_left_70" msgid="4919312892541727761">"Trái 70%"</string> - <string name="accessibility_action_divider_left_50" msgid="3664701169564893826">"Trái 50%"</string> - <string name="accessibility_action_divider_left_30" msgid="4358145268046362088">"Trái 30%"</string> - <string name="accessibility_action_divider_right_full" msgid="8576057422864896305">"Toàn màn hình bên phải"</string> - <string name="accessibility_action_divider_top_full" msgid="4243901660795169777">"Toàn màn hình phía trên"</string> - <string name="accessibility_action_divider_top_70" msgid="6941226213260515072">"Trên 70%"</string> - <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Trên 50%"</string> - <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Trên 30%"</string> - <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Toàn màn hình phía dưới"</string> <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Vị trí <xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Nhấn đúp để chỉnh sửa."</string> <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Nhấn đúp để thêm."</string> <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Di chuyển <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string> @@ -898,10 +887,6 @@ <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Di chuyển <xliff:g id="TILE_NAME">%1$s</xliff:g> đến vị trí <xliff:g id="POSITION">%2$d</xliff:g>"</string> <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Trình chỉnh sửa cài đặt nhanh."</string> <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"Thông báo của <xliff:g id="ID_1">%1$s</xliff:g>: <xliff:g id="ID_2">%2$s</xliff:g>"</string> - <string name="dock_forced_resizable" msgid="4689301323912928801">"Ứng dụng có thể không hoạt động với tính năng chia đôi màn hình."</string> - <string name="dock_non_resizeble_failed_to_dock_text" msgid="7284915968096153808">"Ứng dụng không hỗ trợ chia đôi màn hình."</string> - <string name="forced_resizable_secondary_display" msgid="522558907654394940">"Ứ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="8446727617187998208">"Ứng dụng không hỗ trợ khởi chạy trên màn hình phụ."</string> <string name="accessibility_quick_settings_settings" msgid="7098489591715844713">"Mở phần cài đặt."</string> <string name="accessibility_quick_settings_expand" msgid="2609275052412521467">"Mở cài đặt nhanh."</string> <string name="accessibility_quick_settings_collapse" msgid="4674876336725041982">"Đóng cài đặt nhanh."</string> diff --git a/packages/SystemUI/res/values-zh-rCN/strings.xml b/packages/SystemUI/res/values-zh-rCN/strings.xml index ffd19956f471..8e73f36a74d3 100644 --- a/packages/SystemUI/res/values-zh-rCN/strings.xml +++ b/packages/SystemUI/res/values-zh-rCN/strings.xml @@ -879,17 +879,6 @@ </string-array> <string name="tuner_low_priority" msgid="8412666814123009820">"显示低优先级的通知图标"</string> <string name="other" msgid="429768510980739978">"其他"</string> - <string name="accessibility_divider" msgid="2830785970889237307">"分屏分隔线"</string> - <string name="accessibility_action_divider_left_full" msgid="7598733539422375847">"左侧全屏"</string> - <string name="accessibility_action_divider_left_70" msgid="4919312892541727761">"左侧 70%"</string> - <string name="accessibility_action_divider_left_50" msgid="3664701169564893826">"左侧 50%"</string> - <string name="accessibility_action_divider_left_30" msgid="4358145268046362088">"左侧 30%"</string> - <string name="accessibility_action_divider_right_full" msgid="8576057422864896305">"右侧全屏"</string> - <string name="accessibility_action_divider_top_full" msgid="4243901660795169777">"顶部全屏"</string> - <string name="accessibility_action_divider_top_70" msgid="6941226213260515072">"顶部 70%"</string> - <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"顶部 50%"</string> - <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"顶部 30%"</string> - <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"底部全屏"</string> <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"位置 <xliff:g id="POSITION">%1$d</xliff:g>,<xliff:g id="TILE_NAME">%2$s</xliff:g>。点按两次即可修改。"</string> <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>。点按两次即可添加。"</string> <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"移动<xliff:g id="TILE_NAME">%1$s</xliff:g>"</string> @@ -898,10 +887,6 @@ <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"将“<xliff:g id="TILE_NAME">%1$s</xliff:g>”移动到位置 <xliff:g id="POSITION">%2$d</xliff:g>"</string> <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"快捷设置编辑器。"</string> <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g>通知:<xliff:g id="ID_2">%2$s</xliff:g>"</string> - <string name="dock_forced_resizable" msgid="4689301323912928801">"应用可能无法在分屏模式下正常运行。"</string> - <string name="dock_non_resizeble_failed_to_dock_text" msgid="7284915968096153808">"应用不支持分屏。"</string> - <string name="forced_resizable_secondary_display" msgid="522558907654394940">"应用可能无法在辅显示屏上正常运行。"</string> - <string name="activity_launch_on_secondary_display_failed_text" msgid="8446727617187998208">"应用不支持在辅显示屏上启动。"</string> <string name="accessibility_quick_settings_settings" msgid="7098489591715844713">"打开设置。"</string> <string name="accessibility_quick_settings_expand" msgid="2609275052412521467">"开启快捷设置。"</string> <string name="accessibility_quick_settings_collapse" msgid="4674876336725041982">"关闭快捷设置。"</string> diff --git a/packages/SystemUI/res/values-zh-rHK/strings.xml b/packages/SystemUI/res/values-zh-rHK/strings.xml index 1575427f155b..08bf63b116cc 100644 --- a/packages/SystemUI/res/values-zh-rHK/strings.xml +++ b/packages/SystemUI/res/values-zh-rHK/strings.xml @@ -879,17 +879,6 @@ </string-array> <string name="tuner_low_priority" msgid="8412666814123009820">"顯示低優先順序通知圖示"</string> <string name="other" msgid="429768510980739978">"其他"</string> - <string name="accessibility_divider" msgid="2830785970889237307">"分割畫面分隔線"</string> - <string name="accessibility_action_divider_left_full" msgid="7598733539422375847">"左邊全螢幕"</string> - <string name="accessibility_action_divider_left_70" msgid="4919312892541727761">"左邊 70%"</string> - <string name="accessibility_action_divider_left_50" msgid="3664701169564893826">"左邊 50%"</string> - <string name="accessibility_action_divider_left_30" msgid="4358145268046362088">"左邊 30%"</string> - <string name="accessibility_action_divider_right_full" msgid="8576057422864896305">"右邊全螢幕"</string> - <string name="accessibility_action_divider_top_full" msgid="4243901660795169777">"頂部全螢幕"</string> - <string name="accessibility_action_divider_top_70" msgid="6941226213260515072">"頂部 70%"</string> - <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"頂部 50%"</string> - <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"頂部 30%"</string> - <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"底部全螢幕"</string> <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"位置 <xliff:g id="POSITION">%1$d</xliff:g>,<xliff:g id="TILE_NAME">%2$s</xliff:g>。輕按兩下即可編輯。"</string> <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>。輕按兩下即可新增。"</string> <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"移動 <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string> @@ -898,10 +887,6 @@ <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"將「<xliff:g id="TILE_NAME">%1$s</xliff:g>」移去位置 <xliff:g id="POSITION">%2$d</xliff:g>"</string> <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"快速設定編輯工具。"</string> <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g> 通知:<xliff:g id="ID_2">%2$s</xliff:g>"</string> - <string name="dock_forced_resizable" msgid="4689301323912928801">"應用程式可能無法在分割畫面中運作。"</string> - <string name="dock_non_resizeble_failed_to_dock_text" msgid="7284915968096153808">"應用程式不支援分割畫面。"</string> - <string name="forced_resizable_secondary_display" msgid="522558907654394940">"應用程式可能無法在次要顯示屏上運作。"</string> - <string name="activity_launch_on_secondary_display_failed_text" msgid="8446727617187998208">"應用程式無法在次要顯示屏上啟動。"</string> <string name="accessibility_quick_settings_settings" msgid="7098489591715844713">"開啟設定。"</string> <string name="accessibility_quick_settings_expand" msgid="2609275052412521467">"開啟快速設定。"</string> <string name="accessibility_quick_settings_collapse" msgid="4674876336725041982">"關閉快速設定。"</string> diff --git a/packages/SystemUI/res/values-zh-rTW/strings.xml b/packages/SystemUI/res/values-zh-rTW/strings.xml index bbd83551c0f9..3e7d2e481630 100644 --- a/packages/SystemUI/res/values-zh-rTW/strings.xml +++ b/packages/SystemUI/res/values-zh-rTW/strings.xml @@ -879,17 +879,6 @@ </string-array> <string name="tuner_low_priority" msgid="8412666814123009820">"顯示低優先順序通知圖示"</string> <string name="other" msgid="429768510980739978">"其他"</string> - <string name="accessibility_divider" msgid="2830785970889237307">"分割畫面分隔線"</string> - <string name="accessibility_action_divider_left_full" msgid="7598733539422375847">"以全螢幕顯示左側畫面"</string> - <string name="accessibility_action_divider_left_70" msgid="4919312892541727761">"以 70% 的螢幕空間顯示左側畫面"</string> - <string name="accessibility_action_divider_left_50" msgid="3664701169564893826">"以 50% 的螢幕空間顯示左側畫面"</string> - <string name="accessibility_action_divider_left_30" msgid="4358145268046362088">"以 30% 的螢幕空間顯示左側畫面"</string> - <string name="accessibility_action_divider_right_full" msgid="8576057422864896305">"以全螢幕顯示右側畫面"</string> - <string name="accessibility_action_divider_top_full" msgid="4243901660795169777">"以全螢幕顯示頂端畫面"</string> - <string name="accessibility_action_divider_top_70" msgid="6941226213260515072">"以 70% 的螢幕空間顯示頂端畫面"</string> - <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"以 50% 的螢幕空間顯示頂端畫面"</string> - <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"以 30% 的螢幕空間顯示頂端畫面"</string> - <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"以全螢幕顯示底部畫面"</string> <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"位置 <xliff:g id="POSITION">%1$d</xliff:g>,<xliff:g id="TILE_NAME">%2$s</xliff:g>。輕觸兩下即可編輯。"</string> <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>。輕觸兩下即可新增。"</string> <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"移動 <xliff:g id="TILE_NAME">%1$s</xliff:g>"</string> @@ -898,10 +887,6 @@ <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"將 <xliff:g id="TILE_NAME">%1$s</xliff:g> 移到位置 <xliff:g id="POSITION">%2$d</xliff:g>"</string> <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"快速設定編輯器。"</string> <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g> 通知:<xliff:g id="ID_2">%2$s</xliff:g>"</string> - <string name="dock_forced_resizable" msgid="4689301323912928801">"應用程式可能無法在分割畫面中運作。"</string> - <string name="dock_non_resizeble_failed_to_dock_text" msgid="7284915968096153808">"這個應用程式不支援分割畫面。"</string> - <string name="forced_resizable_secondary_display" msgid="522558907654394940">"應用程式可能無法在次要顯示器上運作。"</string> - <string name="activity_launch_on_secondary_display_failed_text" msgid="8446727617187998208">"應用程式無法在次要顯示器上啟動。"</string> <string name="accessibility_quick_settings_settings" msgid="7098489591715844713">"開啟設定。"</string> <string name="accessibility_quick_settings_expand" msgid="2609275052412521467">"開啟快速設定。"</string> <string name="accessibility_quick_settings_collapse" msgid="4674876336725041982">"關閉快速設定。"</string> diff --git a/packages/SystemUI/res/values-zu/strings.xml b/packages/SystemUI/res/values-zu/strings.xml index 63b4c613a06a..f93ff1d85db8 100644 --- a/packages/SystemUI/res/values-zu/strings.xml +++ b/packages/SystemUI/res/values-zu/strings.xml @@ -879,17 +879,6 @@ </string-array> <string name="tuner_low_priority" msgid="8412666814123009820">"Bonisa izithonjana zesaziso zokubaluleka okuncane"</string> <string name="other" msgid="429768510980739978">"Okunye"</string> - <string name="accessibility_divider" msgid="2830785970889237307">"Isihlukanisi sokuhlukanisa isikrini"</string> - <string name="accessibility_action_divider_left_full" msgid="7598733539422375847">"Isikrini esigcwele esingakwesokunxele"</string> - <string name="accessibility_action_divider_left_70" msgid="4919312892541727761">"Kwesokunxele ngo-70%"</string> - <string name="accessibility_action_divider_left_50" msgid="3664701169564893826">"Kwesokunxele ngo-50%"</string> - <string name="accessibility_action_divider_left_30" msgid="4358145268046362088">"Kwesokunxele ngo-30%"</string> - <string name="accessibility_action_divider_right_full" msgid="8576057422864896305">"Isikrini esigcwele esingakwesokudla"</string> - <string name="accessibility_action_divider_top_full" msgid="4243901660795169777">"Isikrini esigcwele esiphezulu"</string> - <string name="accessibility_action_divider_top_70" msgid="6941226213260515072">"Okuphezulu okungu-70%"</string> - <string name="accessibility_action_divider_top_50" msgid="6275211443706497621">"Okuphezulu okungu-50%"</string> - <string name="accessibility_action_divider_top_30" msgid="5780597635887574916">"Okuphezulu okungu-30%"</string> - <string name="accessibility_action_divider_bottom_full" msgid="7352434720610115395">"Ngaphansi kwesikrini esigcwele"</string> <string name="accessibility_qs_edit_tile_label" msgid="9079791448815232967">"Isimo esingu-<xliff:g id="POSITION">%1$d</xliff:g>, <xliff:g id="TILE_NAME">%2$s</xliff:g>. Thepha kabili ukuze uhlele."</string> <string name="accessibility_qs_edit_add_tile_label" msgid="8292218072049068613">"<xliff:g id="TILE_NAME">%1$s</xliff:g>. Thepha kabili ukuze ungeze."</string> <string name="accessibility_qs_edit_move_tile" msgid="6027997446473163426">"Hambisa i-<xliff:g id="TILE_NAME">%1$s</xliff:g>"</string> @@ -898,10 +887,6 @@ <string name="accessibility_qs_edit_tile_move" msgid="4841770637244326837">"Hambisa i-<xliff:g id="TILE_NAME">%1$s</xliff:g> ukuze ubeke i-<xliff:g id="POSITION">%2$d</xliff:g>"</string> <string name="accessibility_desc_quick_settings_edit" msgid="741658939453595297">"Isihleli sezilungiselelo ezisheshayo."</string> <string name="accessibility_desc_notification_icon" msgid="7331265967584178674">"<xliff:g id="ID_1">%1$s</xliff:g> isaziso: <xliff:g id="ID_2">%2$s</xliff:g>"</string> - <string name="dock_forced_resizable" msgid="4689301323912928801">"Izinhlelo zokusebenza kungenzeka zingasebenzi ngesikrini esihlukanisiwe."</string> - <string name="dock_non_resizeble_failed_to_dock_text" msgid="7284915968096153808">"Uhlelo lokusebenza alusekeli isikrini esihlukanisiwe."</string> - <string name="forced_resizable_secondary_display" msgid="522558907654394940">"Uhlelo lokusebenza kungenzeka lungasebenzi kusibonisi sesibili."</string> - <string name="activity_launch_on_secondary_display_failed_text" msgid="8446727617187998208">"Uhlelo lokusebenza alusekeli ukuqalisa kuzibonisi zesibili."</string> <string name="accessibility_quick_settings_settings" msgid="7098489591715844713">"Vula izilungiselelo."</string> <string name="accessibility_quick_settings_expand" msgid="2609275052412521467">"Vula izilungiselelo ezisheshayo."</string> <string name="accessibility_quick_settings_collapse" msgid="4674876336725041982">"Vala izilungiselelo ezisheshayo."</string> diff --git a/packages/SystemUI/res/values/config.xml b/packages/SystemUI/res/values/config.xml index 7faa2a44bb6c..1c3fba2abacd 100644 --- a/packages/SystemUI/res/values/config.xml +++ b/packages/SystemUI/res/values/config.xml @@ -161,9 +161,6 @@ <!-- The number of milliseconds to extend ambient pulse by when prompted (e.g. on touch) --> <integer name="ambient_notification_extension_time">10000</integer> - <!-- Animation duration when using long press on recents to dock --> - <integer name="long_press_dock_anim_duration">250</integer> - <!-- Whether to enable KeyguardService or not --> <bool name="config_enableKeyguardService">true</bool> @@ -320,7 +317,6 @@ <item>com.android.systemui.accessibility.WindowMagnification</item> <item>com.android.systemui.accessibility.SystemActions</item> <item>com.android.systemui.toast.ToastUI</item> - <item>com.android.systemui.onehanded.OneHandedUI</item> <item>com.android.systemui.wmshell.WMShell</item> </string-array> diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml index 7b80f00e8333..76c61fb6e1e5 100644 --- a/packages/SystemUI/res/values/dimens.xml +++ b/packages/SystemUI/res/values/dimens.xml @@ -954,12 +954,6 @@ <dimen name="fab_elevation">12dp</dimen> <dimen name="fab_press_translation_z">9dp</dimen> - <!-- How high we lift the divider when touching --> - <dimen name="docked_stack_divider_lift_elevation">4dp</dimen> - - <dimen name="docked_divider_handle_width">16dp</dimen> - <dimen name="docked_divider_handle_height">2dp</dimen> - <dimen name="battery_detail_graph_space_top">27dp</dimen> <dimen name="battery_detail_graph_space_bottom">27dp</dimen> @@ -1261,6 +1255,8 @@ <dimen name="qs_footer_horizontal_margin">22dp</dimen> <dimen name="qs_media_disabled_seekbar_height">1dp</dimen> <dimen name="qs_media_enabled_seekbar_height">3dp</dimen> + <dimen name="qs_media_enabled_seekbar_vertical_padding">15dp</dimen> + <dimen name="qs_media_disabled_seekbar_vertical_padding">16dp</dimen> <!-- Window magnification --> <dimen name="magnification_border_drag_size">35dp</dimen> diff --git a/packages/SystemUI/res/values/ids.xml b/packages/SystemUI/res/values/ids.xml index a56f6f56836a..2f018b9239b5 100644 --- a/packages/SystemUI/res/values/ids.xml +++ b/packages/SystemUI/res/values/ids.xml @@ -103,13 +103,6 @@ <item type="id" name="contains_transformed_view" /> <item type="id" name="is_clicked_heads_up_tag" /> - <!-- Accessibility actions for the docked stack divider --> - <item type="id" name="action_move_tl_full" /> - <item type="id" name="action_move_tl_70" /> - <item type="id" name="action_move_tl_50" /> - <item type="id" name="action_move_tl_30" /> - <item type="id" name="action_move_rb_full" /> - <item type="id" name="bottom_roundess_animator_tag"/> <item type="id" name="bottom_roundess_animator_start_tag"/> <item type="id" name="bottom_roundess_animator_end_tag"/> diff --git a/packages/SystemUI/res/values/strings.xml b/packages/SystemUI/res/values/strings.xml index bfa7532349aa..e58bf3bad795 100644 --- a/packages/SystemUI/res/values/strings.xml +++ b/packages/SystemUI/res/values/strings.xml @@ -2260,31 +2260,6 @@ <!-- SysUI Tuner: Other section --> <string name="other">Other</string> - <!-- Accessibility label for the divider that separates the windows in split-screen mode [CHAR LIMIT=NONE] --> - <string name="accessibility_divider">Split-screen divider</string> - - <!-- Accessibility action for moving docked stack divider to make the left screen full screen [CHAR LIMIT=NONE] --> - <string name="accessibility_action_divider_left_full">Left full screen</string> - <!-- Accessibility action for moving docked stack divider to make the left screen 70% [CHAR LIMIT=NONE] --> - <string name="accessibility_action_divider_left_70">Left 70%</string> - <!-- Accessibility action for moving docked stack divider to make the left screen 50% [CHAR LIMIT=NONE] --> - <string name="accessibility_action_divider_left_50">Left 50%</string> - <!-- Accessibility action for moving docked stack divider to make the left screen 30% [CHAR LIMIT=NONE] --> - <string name="accessibility_action_divider_left_30">Left 30%</string> - <!-- Accessibility action for moving docked stack divider to make the right screen full screen [CHAR LIMIT=NONE] --> - <string name="accessibility_action_divider_right_full">Right full screen</string> - - <!-- Accessibility action for moving docked stack divider to make the top screen full screen [CHAR LIMIT=NONE] --> - <string name="accessibility_action_divider_top_full">Top full screen</string> - <!-- Accessibility action for moving docked stack divider to make the top screen 70% [CHAR LIMIT=NONE] --> - <string name="accessibility_action_divider_top_70">Top 70%</string> - <!-- Accessibility action for moving docked stack divider to make the top screen 50% [CHAR LIMIT=NONE] --> - <string name="accessibility_action_divider_top_50">Top 50%</string> - <!-- Accessibility action for moving docked stack divider to make the top screen 30% [CHAR LIMIT=NONE] --> - <string name="accessibility_action_divider_top_30">Top 30%</string> - <!-- Accessibility action for moving docked stack divider to make the bottom screen full screen [CHAR LIMIT=NONE] --> - <string name="accessibility_action_divider_bottom_full">Bottom full screen</string> - <!-- Accessibility description of a QS tile while editing positions [CHAR LIMIT=NONE] --> <string name="accessibility_qs_edit_tile_label">Position <xliff:g id="position" example="2">%1$d</xliff:g>, <xliff:g id="tile_name" example="Wi-Fi">%2$s</xliff:g>. Double tap to edit.</string> @@ -2312,16 +2287,6 @@ <!-- Label for button that reports a touch that was wrongly rejected by the lockscreen. For debugging only. [CHAR LIMIT=NONE] --> <string name="report_rejected_touch" translatable="false">Report rejected touch</string> - <!-- Multi-Window strings --> - <!-- Text that gets shown on top of current activity to inform the user that the system force-resized the current activity to be displayed in split-screen and that things might crash/not work properly [CHAR LIMIT=NONE] --> - <string name="dock_forced_resizable">App may not work with split-screen.</string> - <!-- Warning message when we try to dock a non-resizeable task and launch it in fullscreen instead. --> - <string name="dock_non_resizeble_failed_to_dock_text">App does not support split-screen.</string> - <!-- Text that gets shown on top of current activity to inform the user that the system force-resized the current activity to be displayed on a secondary display and that things might crash/not work properly [CHAR LIMIT=NONE] --> - <string name="forced_resizable_secondary_display">App may not work on a secondary display.</string> - <!-- Warning message when we try to launch a non-resizeable activity on a secondary display and launch it on the primary instead. --> - <string name="activity_launch_on_secondary_display_failed_text">App does not support launch on secondary displays.</string> - <!-- accessibility label for button to open settings [CHAR LIMIT=NONE] --> <string name="accessibility_quick_settings_settings">Open settings.</string> diff --git a/packages/SystemUI/res/values/styles.xml b/packages/SystemUI/res/values/styles.xml index ee07e613a0c5..58563f49dce4 100644 --- a/packages/SystemUI/res/values/styles.xml +++ b/packages/SystemUI/res/values/styles.xml @@ -24,21 +24,6 @@ <item name="android:layout_marginBottom">0dp</item> </style> - <!-- Theme used for the activity that shows when the system forced an app to be resizable --> - <style name="ForcedResizableTheme" parent="@android:style/Theme.Translucent.NoTitleBar"> - <item name="android:windowBackground">@drawable/forced_resizable_background</item> - <item name="android:statusBarColor">@*android:color/transparent</item> - <item name="android:windowAnimationStyle">@style/Animation.ForcedResizable</item> - </style> - - <style name="Animation.ForcedResizable" parent="@android:style/Animation"> - <item name="android:activityOpenEnterAnimation">@anim/forced_resizable_enter</item> - - <!-- If the target stack doesn't have focus, we do a task to front animation. --> - <item name="android:taskToFrontEnterAnimation">@anim/forced_resizable_enter</item> - <item name="android:activityCloseExitAnimation">@anim/forced_resizable_exit</item> - </style> - <style name="PipPhoneOverlayControlTheme" parent="@android:style/Theme.Material"> <item name="android:windowIsTranslucent">true</item> <item name="android:windowNoTitle">true</item> @@ -483,23 +468,6 @@ <item name="android:background">@drawable/btn_borderless_rect</item> </style> - <style name="DockedDividerBackground"> - <item name="android:layout_width">match_parent</item> - <item name="android:layout_height">10dp</item> - <item name="android:layout_gravity">center_vertical</item> - </style> - - <style name="DockedDividerMinimizedShadow"> - <item name="android:layout_width">match_parent</item> - <item name="android:layout_height">8dp</item> - </style> - - <style name="DockedDividerHandle"> - <item name="android:layout_gravity">center_horizontal</item> - <item name="android:layout_width">96dp</item> - <item name="android:layout_height">48dp</item> - </style> - <style name="TunerSettings" parent="@android:style/Theme.DeviceDefault.Settings"> <item name="android:windowActionBar">false</item> <item name="preferenceTheme">@style/TunerPreferenceTheme</item> diff --git a/packages/SystemUI/src/com/android/systemui/ExpandHelper.java b/packages/SystemUI/src/com/android/systemui/ExpandHelper.java index 17b840cc7a20..744a77f5cff9 100644 --- a/packages/SystemUI/src/com/android/systemui/ExpandHelper.java +++ b/packages/SystemUI/src/com/android/systemui/ExpandHelper.java @@ -32,10 +32,10 @@ import android.view.View; import android.view.ViewConfiguration; import com.android.internal.annotations.VisibleForTesting; -import com.android.systemui.statusbar.FlingAnimationUtils; import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow; import com.android.systemui.statusbar.notification.row.ExpandableView; import com.android.systemui.statusbar.policy.ScrollAdapter; +import com.android.wm.shell.animation.FlingAnimationUtils; public class ExpandHelper implements Gefingerpoken { public interface Callback { diff --git a/packages/SystemUI/src/com/android/systemui/SwipeHelper.java b/packages/SystemUI/src/com/android/systemui/SwipeHelper.java index e91284b546db..8aa3493cc105 100644 --- a/packages/SystemUI/src/com/android/systemui/SwipeHelper.java +++ b/packages/SystemUI/src/com/android/systemui/SwipeHelper.java @@ -37,8 +37,8 @@ import android.view.accessibility.AccessibilityEvent; import com.android.systemui.plugins.FalsingManager; import com.android.systemui.plugins.statusbar.NotificationMenuRowPlugin; -import com.android.systemui.statusbar.FlingAnimationUtils; import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow; +import com.android.wm.shell.animation.FlingAnimationUtils; public class SwipeHelper implements Gefingerpoken { static final String TAG = "com.android.systemui.SwipeHelper"; diff --git a/packages/SystemUI/src/com/android/systemui/broadcast/BroadcastDispatcher.kt b/packages/SystemUI/src/com/android/systemui/broadcast/BroadcastDispatcher.kt index b9b849b8488e..83de3243602b 100644 --- a/packages/SystemUI/src/com/android/systemui/broadcast/BroadcastDispatcher.kt +++ b/packages/SystemUI/src/com/android/systemui/broadcast/BroadcastDispatcher.kt @@ -16,7 +16,6 @@ package com.android.systemui.broadcast -import android.app.ActivityManager import android.content.BroadcastReceiver import android.content.Context import android.content.Intent @@ -33,6 +32,7 @@ import com.android.internal.util.IndentingPrintWriter import com.android.systemui.Dumpable import com.android.systemui.broadcast.logging.BroadcastDispatcherLogger import com.android.systemui.dump.DumpManager +import com.android.systemui.settings.UserTracker import java.io.FileDescriptor import java.io.PrintWriter import java.util.concurrent.Executor @@ -47,8 +47,6 @@ data class ReceiverData( private const val MSG_ADD_RECEIVER = 0 private const val MSG_REMOVE_RECEIVER = 1 private const val MSG_REMOVE_RECEIVER_FOR_USER = 2 -private const val MSG_USER_SWITCH = 3 -private const val MSG_SET_STARTING_USER = 99 private const val TAG = "BroadcastDispatcher" private const val DEBUG = true @@ -68,23 +66,15 @@ open class BroadcastDispatcher constructor ( private val bgLooper: Looper, private val bgExecutor: Executor, private val dumpManager: DumpManager, - private val logger: BroadcastDispatcherLogger -) : Dumpable, BroadcastReceiver() { + private val logger: BroadcastDispatcherLogger, + private val userTracker: UserTracker +) : Dumpable { // Only modify in BG thread private val receiversByUser = SparseArray<UserBroadcastDispatcher>(20) fun initialize() { dumpManager.registerDumpable(javaClass.name, this) - handler.sendEmptyMessage(MSG_SET_STARTING_USER) - registerReceiver(this, IntentFilter(Intent.ACTION_USER_SWITCHED), null, UserHandle.ALL) - } - - override fun onReceive(context: Context, intent: Intent) { - if (intent.action == Intent.ACTION_USER_SWITCHED) { - val user = intent.getIntExtra(Intent.EXTRA_USER_HANDLE, UserHandle.USER_NULL) - handler.obtainMessage(MSG_USER_SWITCH, user, 0).sendToTarget() - } } /** @@ -181,7 +171,6 @@ open class BroadcastDispatcher constructor ( pw.println("Broadcast dispatcher:") val ipw = IndentingPrintWriter(pw, " ") ipw.increaseIndent() - ipw.println("Current user: ${handler.currentUser}") for (index in 0 until receiversByUser.size()) { ipw.println("User ${receiversByUser.keyAt(index)}") receiversByUser.valueAt(index).dump(fd, ipw, args) @@ -190,7 +179,6 @@ open class BroadcastDispatcher constructor ( } private val handler = object : Handler(bgLooper) { - var currentUser = UserHandle.USER_SYSTEM override fun handleMessage(msg: Message) { when (msg.what) { @@ -199,7 +187,7 @@ open class BroadcastDispatcher constructor ( // If the receiver asked to be registered under the current user, we register // under the actual current user. val userId = if (data.user.identifier == UserHandle.USER_CURRENT) { - currentUser + userTracker.userId } else { data.user.identifier } @@ -221,14 +209,6 @@ open class BroadcastDispatcher constructor ( MSG_REMOVE_RECEIVER_FOR_USER -> { receiversByUser.get(msg.arg1)?.unregisterReceiver(msg.obj as BroadcastReceiver) } - - MSG_USER_SWITCH -> { - currentUser = msg.arg1 - } - MSG_SET_STARTING_USER -> { - currentUser = ActivityManager.getCurrentUser() - } - else -> super.handleMessage(msg) } } diff --git a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleExpandedView.java b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleExpandedView.java index 80150c9b7e32..33310962a6f2 100644 --- a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleExpandedView.java +++ b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleExpandedView.java @@ -164,7 +164,7 @@ public class BubbleExpandedView extends LinearLayout { ActivityOptions options = ActivityOptions.makeCustomAnimation(getContext(), 0 /* enterResId */, 0 /* exitResId */); options.setTaskAlwaysOnTop(true); - options.setLaunchWindowingMode(WINDOWING_MODE_MULTI_WINDOW); + // Soptions.setLaunchWindowingMode(WINDOWING_MODE_MULTI_WINDOW); // Post to keep the lifecycle normal post(() -> { if (DEBUG_BUBBLE_EXPANDED_VIEW) { diff --git a/packages/SystemUI/src/com/android/systemui/dagger/DependencyProvider.java b/packages/SystemUI/src/com/android/systemui/dagger/DependencyProvider.java index 0dd9488f1d3e..38e12a6ed5f8 100644 --- a/packages/SystemUI/src/com/android/systemui/dagger/DependencyProvider.java +++ b/packages/SystemUI/src/com/android/systemui/dagger/DependencyProvider.java @@ -61,11 +61,11 @@ import com.android.systemui.plugins.PluginInitializerImpl; import com.android.systemui.plugins.statusbar.StatusBarStateController; import com.android.systemui.recents.OverviewProxyService; import com.android.systemui.recents.Recents; +import com.android.systemui.settings.UserTracker; import com.android.systemui.shared.plugins.PluginManager; import com.android.systemui.shared.plugins.PluginManagerImpl; import com.android.systemui.shared.system.ActivityManagerWrapper; import com.android.systemui.shared.system.DevicePolicyManagerWrapper; -import com.android.systemui.stackdivider.SplitScreen; import com.android.systemui.statusbar.CommandQueue; import com.android.systemui.statusbar.NotificationRemoteInputManager; import com.android.systemui.statusbar.phone.AutoHideController; @@ -78,6 +78,7 @@ import com.android.systemui.statusbar.policy.DataSaverController; import com.android.systemui.statusbar.policy.DeviceProvisionedController; import com.android.systemui.statusbar.policy.NetworkController; import com.android.systemui.util.leak.LeakDetector; +import com.android.wm.shell.splitscreen.SplitScreen; import java.util.Optional; import java.util.concurrent.Executor; @@ -269,10 +270,11 @@ public class DependencyProvider { @Background Looper backgroundLooper, @Background Executor backgroundExecutor, DumpManager dumpManager, - BroadcastDispatcherLogger logger + BroadcastDispatcherLogger logger, + UserTracker userTracker ) { BroadcastDispatcher bD = new BroadcastDispatcher(context, backgroundLooper, - backgroundExecutor, dumpManager, logger); + backgroundExecutor, dumpManager, logger, userTracker); bD.initialize(); return bD; } diff --git a/packages/SystemUI/src/com/android/systemui/dagger/SystemUIBinder.java b/packages/SystemUI/src/com/android/systemui/dagger/SystemUIBinder.java index c331bd377eec..3a5ce4d82540 100644 --- a/packages/SystemUI/src/com/android/systemui/dagger/SystemUIBinder.java +++ b/packages/SystemUI/src/com/android/systemui/dagger/SystemUIBinder.java @@ -28,7 +28,6 @@ import com.android.systemui.bubbles.dagger.BubbleModule; import com.android.systemui.globalactions.GlobalActionsComponent; import com.android.systemui.keyguard.KeyguardViewMediator; import com.android.systemui.keyguard.dagger.KeyguardModule; -import com.android.systemui.onehanded.OneHandedUI; import com.android.systemui.power.PowerUI; import com.android.systemui.recents.Recents; import com.android.systemui.recents.RecentsModule; @@ -90,12 +89,6 @@ public abstract class SystemUIBinder { @ClassKey(LatencyTester.class) public abstract SystemUI bindLatencyTester(LatencyTester sysui); - /** Inject into OneHandedUI. */ - @Binds - @IntoMap - @ClassKey(OneHandedUI.class) - public abstract SystemUI bindOneHandedUI(OneHandedUI sysui); - /** Inject into PowerUI. */ @Binds @IntoMap diff --git a/packages/SystemUI/src/com/android/systemui/media/SeekBarObserver.kt b/packages/SystemUI/src/com/android/systemui/media/SeekBarObserver.kt index 1ae54d60d3fa..d789501ffdef 100644 --- a/packages/SystemUI/src/com/android/systemui/media/SeekBarObserver.kt +++ b/packages/SystemUI/src/com/android/systemui/media/SeekBarObserver.kt @@ -28,10 +28,14 @@ import com.android.systemui.R */ class SeekBarObserver(private val holder: PlayerViewHolder) : Observer<SeekBarViewModel.Progress> { - val seekBarDefaultMaxHeight = holder.seekBar.context.resources + val seekBarEnabledMaxHeight = holder.seekBar.context.resources .getDimensionPixelSize(R.dimen.qs_media_enabled_seekbar_height) val seekBarDisabledHeight = holder.seekBar.context.resources .getDimensionPixelSize(R.dimen.qs_media_disabled_seekbar_height) + val seekBarEnabledVerticalPadding = holder.seekBar.context.resources + .getDimensionPixelSize(R.dimen.qs_media_enabled_seekbar_vertical_padding) + val seekBarDisabledVerticalPadding = holder.seekBar.context.resources + .getDimensionPixelSize(R.dimen.qs_media_disabled_seekbar_vertical_padding) /** Updates seek bar views when the data model changes. */ @UiThread @@ -39,6 +43,7 @@ class SeekBarObserver(private val holder: PlayerViewHolder) : Observer<SeekBarVi if (!data.enabled) { if (holder.seekBar.maxHeight != seekBarDisabledHeight) { holder.seekBar.maxHeight = seekBarDisabledHeight + setVerticalPadding(seekBarDisabledVerticalPadding) } holder.seekBar.setEnabled(false) holder.seekBar.getThumb().setAlpha(0) @@ -51,8 +56,9 @@ class SeekBarObserver(private val holder: PlayerViewHolder) : Observer<SeekBarVi holder.seekBar.getThumb().setAlpha(if (data.seekAvailable) 255 else 0) holder.seekBar.setEnabled(data.seekAvailable) - if (holder.seekBar.maxHeight != seekBarDefaultMaxHeight) { - holder.seekBar.maxHeight = seekBarDefaultMaxHeight + if (holder.seekBar.maxHeight != seekBarEnabledMaxHeight) { + holder.seekBar.maxHeight = seekBarEnabledMaxHeight + setVerticalPadding(seekBarEnabledVerticalPadding) } data.duration?.let { @@ -67,4 +73,11 @@ class SeekBarObserver(private val holder: PlayerViewHolder) : Observer<SeekBarVi it / DateUtils.SECOND_IN_MILLIS)) } } + + @UiThread + fun setVerticalPadding(padding: Int) { + val leftPadding = holder.seekBar.paddingLeft + val rightPadding = holder.seekBar.paddingRight + holder.seekBar.setPadding(leftPadding, padding, rightPadding, padding) + } } diff --git a/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBar.java b/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBar.java index c7e78174f474..4e0df214d884 100644 --- a/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBar.java +++ b/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBar.java @@ -122,7 +122,6 @@ import com.android.systemui.recents.OverviewProxyService; import com.android.systemui.recents.Recents; import com.android.systemui.shared.system.ActivityManagerWrapper; import com.android.systemui.shared.system.QuickStepContract; -import com.android.systemui.stackdivider.SplitScreen; import com.android.systemui.statusbar.AutoHideUiElement; import com.android.systemui.statusbar.CommandQueue; import com.android.systemui.statusbar.CommandQueue.Callbacks; @@ -137,6 +136,7 @@ import com.android.systemui.statusbar.phone.StatusBar; import com.android.systemui.statusbar.policy.AccessibilityManagerWrapper; import com.android.systemui.statusbar.policy.BatteryController; import com.android.systemui.statusbar.policy.DeviceProvisionedController; +import com.android.wm.shell.splitscreen.SplitScreen; import java.io.PrintWriter; import java.util.List; diff --git a/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarController.java b/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarController.java index 9b9dc6dec583..339e504a3cf1 100644 --- a/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarController.java +++ b/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarController.java @@ -55,7 +55,6 @@ import com.android.systemui.plugins.statusbar.StatusBarStateController; import com.android.systemui.recents.OverviewProxyService; import com.android.systemui.recents.Recents; import com.android.systemui.shared.system.ActivityManagerWrapper; -import com.android.systemui.stackdivider.SplitScreen; import com.android.systemui.statusbar.CommandQueue; import com.android.systemui.statusbar.CommandQueue.Callbacks; import com.android.systemui.statusbar.NotificationRemoteInputManager; @@ -65,6 +64,7 @@ import com.android.systemui.statusbar.phone.StatusBar; import com.android.systemui.statusbar.policy.AccessibilityManagerWrapper; import com.android.systemui.statusbar.policy.ConfigurationController; import com.android.systemui.statusbar.policy.DeviceProvisionedController; +import com.android.wm.shell.splitscreen.SplitScreen; import java.io.FileDescriptor; import java.io.PrintWriter; diff --git a/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarView.java b/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarView.java index 8a468f6eb709..13b9a552d75c 100644 --- a/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarView.java +++ b/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarView.java @@ -87,12 +87,12 @@ import com.android.systemui.shared.system.ActivityManagerWrapper; import com.android.systemui.shared.system.QuickStepContract; import com.android.systemui.shared.system.SysUiStatsLog; import com.android.systemui.shared.system.WindowManagerWrapper; -import com.android.systemui.stackdivider.SplitScreen; import com.android.systemui.statusbar.CommandQueue; import com.android.systemui.statusbar.phone.AutoHideController; import com.android.systemui.statusbar.phone.LightBarTransitionsController; import com.android.systemui.statusbar.phone.NotificationPanelViewController; import com.android.systemui.statusbar.phone.StatusBar; +import com.android.wm.shell.splitscreen.SplitScreen; import java.io.PrintWriter; import java.util.function.Consumer; diff --git a/packages/SystemUI/src/com/android/systemui/onehanded/OneHanded.java b/packages/SystemUI/src/com/android/systemui/onehanded/OneHanded.java new file mode 100644 index 000000000000..b7c6262b07e0 --- /dev/null +++ b/packages/SystemUI/src/com/android/systemui/onehanded/OneHanded.java @@ -0,0 +1,80 @@ +/* + * Copyright (C) 2020 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.systemui.onehanded; + +import androidx.annotation.NonNull; + +import com.android.systemui.onehanded.OneHandedGestureHandler.OneHandedGestureEventCallback; + +import java.io.PrintWriter; + +/** + * Interface to engage one handed feature. + */ +public interface OneHanded { + /** + * Return whether the device has one handed feature or not. + */ + boolean hasOneHandedFeature(); + + /** + * Return one handed settings enabled or not. + */ + boolean isOneHandedEnabled(); + + /** + * Return swipe to notification settings enabled or not. + */ + boolean isSwipeToNotificationEnabled(); + + /** + * Enters one handed mode. + */ + void startOneHanded(); + + /** + * Exits one handed mode. + */ + void stopOneHanded(); + + /** + * Exits one handed mode with {@link OneHandedEvents}. + */ + void stopOneHanded(int event); + + /** + * Set navigation 3 button mode enabled or disabled by users. + */ + void setThreeButtonModeEnabled(boolean enabled); + + /** + * Register callback to be notified after {@link OneHandedDisplayAreaOrganizer} + * transition start or finish + */ + void registerTransitionCallback(OneHandedTransitionCallback callback); + + /** + * Register callback for one handed gesture, this gesture callbcak will be activated on + * 3 button navigation mode only + */ + void registerGestureCallback(OneHandedGestureEventCallback callback); + + /** + * Dump one handed status. + */ + void dump(@NonNull PrintWriter pw); +} diff --git a/packages/SystemUI/src/com/android/systemui/onehanded/OneHandedController.java b/packages/SystemUI/src/com/android/systemui/onehanded/OneHandedController.java index bb59449d114d..90adf838440c 100644 --- a/packages/SystemUI/src/com/android/systemui/onehanded/OneHandedController.java +++ b/packages/SystemUI/src/com/android/systemui/onehanded/OneHandedController.java @@ -16,195 +16,262 @@ package com.android.systemui.onehanded; +import static android.os.UserHandle.USER_CURRENT; import static android.view.Display.DEFAULT_DISPLAY; -import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_ONE_HANDED_ACTIVE; - -import android.content.ComponentName; import android.content.Context; +import android.content.om.IOverlayManager; +import android.content.om.OverlayInfo; +import android.database.ContentObserver; import android.graphics.Point; -import android.graphics.Rect; +import android.os.Handler; +import android.os.Looper; +import android.os.RemoteException; +import android.os.ServiceManager; import android.os.SystemProperties; -import android.view.KeyEvent; +import android.provider.Settings; +import android.util.Log; import androidx.annotation.NonNull; +import androidx.annotation.VisibleForTesting; -import com.android.internal.annotations.VisibleForTesting; -import com.android.systemui.Dumpable; -import com.android.systemui.dagger.SysUISingleton; -import com.android.systemui.model.SysUiState; -import com.android.systemui.navigationbar.NavigationModeController; -import com.android.systemui.shared.system.ActivityManagerWrapper; -import com.android.systemui.shared.system.TaskStackChangeListener; -import com.android.systemui.statusbar.CommandQueue; +import com.android.systemui.onehanded.OneHandedGestureHandler.OneHandedGestureEventCallback; import com.android.wm.shell.common.DisplayChangeController; import com.android.wm.shell.common.DisplayController; -import java.io.FileDescriptor; import java.io.PrintWriter; -import javax.inject.Inject; - /** * Manages and manipulates the one handed states, transitions, and gesture for phones. */ -@SysUISingleton -public class OneHandedController implements Dumpable { - private static final String TAG = "OneHandedManager"; +public class OneHandedController implements OneHanded { + private static final String TAG = "OneHandedController"; + private static final String ONE_HANDED_MODE_OFFSET_PERCENTAGE = "persist.debug.one_handed_offset_percentage"; + private static final String ONE_HANDED_MODE_GESTURAL_OVERLAY = + "com.android.internal.systemui.onehanded.gestural"; + + static final String SUPPORT_ONE_HANDED_MODE = "ro.support_one_handed_mode"; + private final boolean mHasOneHandedFeature; private boolean mIsOneHandedEnabled; private boolean mIsSwipeToNotificationEnabled; private boolean mTaskChangeToExit; private float mOffSetFraction; - private final CommandQueue mCommandQueue; + private final Context mContext; private final DisplayController mDisplayController; private final OneHandedGestureHandler mGestureHandler; private final OneHandedTimeoutHandler mTimeoutHandler; private final OneHandedTouchHandler mTouchHandler; private final OneHandedTutorialHandler mTutorialHandler; - private final SysUiState mSysUiFlagContainer; + private final IOverlayManager mOverlayManager; + private final Handler mMainHandler = new Handler(Looper.getMainLooper()); private OneHandedDisplayAreaOrganizer mDisplayAreaOrganizer; /** - * Handler for system task stack changes, exit when user lunch new task or bring task to front + * Handle rotation based on OnDisplayChangingListener callback */ - private final TaskStackChangeListener mTaskStackListener = new TaskStackChangeListener() { + private final DisplayChangeController.OnDisplayChangingListener mRotationController = + (display, fromRotation, toRotation, wct) -> { + if (mDisplayAreaOrganizer != null) { + mDisplayAreaOrganizer.onRotateDisplay(fromRotation, toRotation); + } + }; + + private final ContentObserver mEnabledObserver = new ContentObserver(mMainHandler) { @Override - public void onTaskCreated(int taskId, ComponentName componentName) { - if (!mIsOneHandedEnabled || !mDisplayAreaOrganizer.isInOneHanded()) { - return; - } - OneHandedEvents.writeEvent(OneHandedEvents.EVENT_ONE_HANDED_TRIGGER_APP_TAPS_OUT); - stopOneHanded(); + public void onChange(boolean selfChange) { + final boolean enabled = OneHandedSettingsUtil.getSettingsOneHandedModeEnabled( + mContext.getContentResolver()); + OneHandedEvents.writeEvent(enabled + ? OneHandedEvents.EVENT_ONE_HANDED_SETTINGS_ENABLED_ON + : OneHandedEvents.EVENT_ONE_HANDED_SETTINGS_ENABLED_OFF); + + setOneHandedEnabled(enabled); + + // Also checks swipe to notification settings since they all need gesture overlay. + setEnabledGesturalOverlay( + enabled || OneHandedSettingsUtil.getSettingsSwipeToNotificationEnabled( + mContext.getContentResolver())); } + }; + private final ContentObserver mTimeoutObserver = new ContentObserver(mMainHandler) { @Override - public void onTaskMovedToFront(int taskId) { - if (!mIsOneHandedEnabled || !mDisplayAreaOrganizer.isInOneHanded()) { - return; + public void onChange(boolean selfChange) { + final int newTimeout = OneHandedSettingsUtil.getSettingsOneHandedModeTimeout( + mContext.getContentResolver()); + int metricsId = OneHandedEvents.OneHandedSettingsTogglesEvent.INVALID.getId(); + switch (newTimeout) { + case OneHandedSettingsUtil.ONE_HANDED_TIMEOUT_NEVER: + metricsId = OneHandedEvents.EVENT_ONE_HANDED_SETTINGS_TIMEOUT_SECONDS_NEVER; + break; + case OneHandedSettingsUtil.ONE_HANDED_TIMEOUT_SHORT_IN_SECONDS: + metricsId = OneHandedEvents.EVENT_ONE_HANDED_SETTINGS_TIMEOUT_SECONDS_4; + break; + case OneHandedSettingsUtil.ONE_HANDED_TIMEOUT_MEDIUM_IN_SECONDS: + metricsId = OneHandedEvents.EVENT_ONE_HANDED_SETTINGS_TIMEOUT_SECONDS_8; + break; + case OneHandedSettingsUtil.ONE_HANDED_TIMEOUT_LONG_IN_SECONDS: + metricsId = OneHandedEvents.EVENT_ONE_HANDED_SETTINGS_TIMEOUT_SECONDS_12; + break; + default: + // do nothing + break; + } + OneHandedEvents.writeEvent(metricsId); + + if (mTimeoutHandler != null) { + mTimeoutHandler.setTimeout(newTimeout); } - OneHandedEvents.writeEvent(OneHandedEvents.EVENT_ONE_HANDED_TRIGGER_APP_TAPS_OUT); - stopOneHanded(); } }; - /** - * Handle rotation based on OnDisplayChangingListener callback - */ - private final DisplayChangeController.OnDisplayChangingListener mRotationController = - (display, fromRotation, toRotation, wct) -> { - if (mDisplayAreaOrganizer != null) { - mDisplayAreaOrganizer.onRotateDisplay(fromRotation, toRotation); + private final ContentObserver mTaskChangeExitObserver = new ContentObserver(mMainHandler) { + @Override + public void onChange(boolean selfChange) { + final boolean enabled = OneHandedSettingsUtil.getSettingsTapsAppToExit( + mContext.getContentResolver()); + OneHandedEvents.writeEvent(enabled + ? OneHandedEvents.EVENT_ONE_HANDED_SETTINGS_APP_TAPS_EXIT_ON + : OneHandedEvents.EVENT_ONE_HANDED_SETTINGS_APP_TAPS_EXIT_OFF); + + setTaskChangeToExit(enabled); + } + }; + + private final ContentObserver mSwipeToNotificationEnabledObserver = + new ContentObserver(mMainHandler) { + @Override + public void onChange(boolean selfChange) { + final boolean enabled = + OneHandedSettingsUtil.getSettingsSwipeToNotificationEnabled( + mContext.getContentResolver()); + setSwipeToNotificationEnabled(enabled); + + // Also checks one handed mode settings since they all need gesture overlay. + setEnabledGesturalOverlay( + enabled || OneHandedSettingsUtil.getSettingsOneHandedModeEnabled( + mContext.getContentResolver())); } }; /** - * Constructor of OneHandedManager + * The static constructor method to create OneHnadedController. */ - @Inject - public OneHandedController(Context context, - CommandQueue commandQueue, - DisplayController displayController, - NavigationModeController navigationModeController, - SysUiState sysUiState) { - mCommandQueue = commandQueue; - mDisplayController = displayController; - mDisplayController.addDisplayChangingController(mRotationController); - mSysUiFlagContainer = sysUiState; - mOffSetFraction = SystemProperties.getInt(ONE_HANDED_MODE_OFFSET_PERCENTAGE, 50) / 100.0f; - - mIsOneHandedEnabled = OneHandedSettingsUtil.getSettingsOneHandedModeEnabled( - context.getContentResolver()); - mIsSwipeToNotificationEnabled = OneHandedSettingsUtil.getSettingsSwipeToNotificationEnabled( - context.getContentResolver()); - mTimeoutHandler = OneHandedTimeoutHandler.get(); - mTouchHandler = new OneHandedTouchHandler(); - mTutorialHandler = new OneHandedTutorialHandler(context); - mDisplayAreaOrganizer = new OneHandedDisplayAreaOrganizer(context, displayController, - new OneHandedAnimationController(context), mTutorialHandler); - mGestureHandler = new OneHandedGestureHandler( - context, displayController, navigationModeController); - updateOneHandedEnabled(); - setupGestures(); + public static OneHandedController create( + Context context, DisplayController displayController) { + OneHandedTutorialHandler tutorialHandler = new OneHandedTutorialHandler(context); + OneHandedAnimationController animationController = + new OneHandedAnimationController(context); + OneHandedTouchHandler touchHandler = new OneHandedTouchHandler(); + OneHandedGestureHandler gestureHandler = new OneHandedGestureHandler( + context, displayController); + OneHandedDisplayAreaOrganizer organizer = new OneHandedDisplayAreaOrganizer( + context, displayController, animationController, tutorialHandler); + return new OneHandedController(context, displayController, organizer, touchHandler, + tutorialHandler, gestureHandler); } - /** - * Constructor of OneHandedManager for testing - */ - // TODO(b/161980408): Should remove extra constructor. @VisibleForTesting OneHandedController(Context context, - CommandQueue commandQueue, DisplayController displayController, OneHandedDisplayAreaOrganizer displayAreaOrganizer, OneHandedTouchHandler touchHandler, OneHandedTutorialHandler tutorialHandler, - OneHandedGestureHandler gestureHandler, - SysUiState sysUiState) { - mCommandQueue = commandQueue; + OneHandedGestureHandler gestureHandler) { + mHasOneHandedFeature = SystemProperties.getBoolean(SUPPORT_ONE_HANDED_MODE, false); + if (!mHasOneHandedFeature) { + Log.i(TAG, "Device config SUPPORT_ONE_HANDED_MODE off"); + mContext = null; + mDisplayAreaOrganizer = null; + mDisplayController = null; + mTouchHandler = null; + mTutorialHandler = null; + mGestureHandler = null; + mTimeoutHandler = null; + mOverlayManager = null; + return; + } + + mContext = context; mDisplayAreaOrganizer = displayAreaOrganizer; mDisplayController = displayController; - mDisplayController.addDisplayChangingController(mRotationController); - mSysUiFlagContainer = sysUiState; - mOffSetFraction = SystemProperties.getInt(ONE_HANDED_MODE_OFFSET_PERCENTAGE, 50) / 100.0f; + mTouchHandler = touchHandler; + mTutorialHandler = tutorialHandler; + mGestureHandler = gestureHandler; + mOverlayManager = IOverlayManager.Stub.asInterface( + ServiceManager.getService(Context.OVERLAY_SERVICE)); + mOffSetFraction = SystemProperties.getInt(ONE_HANDED_MODE_OFFSET_PERCENTAGE, 50) / 100.0f; mIsOneHandedEnabled = OneHandedSettingsUtil.getSettingsOneHandedModeEnabled( context.getContentResolver()); mIsSwipeToNotificationEnabled = OneHandedSettingsUtil.getSettingsSwipeToNotificationEnabled( context.getContentResolver()); mTimeoutHandler = OneHandedTimeoutHandler.get(); - mTouchHandler = touchHandler; - mTutorialHandler = tutorialHandler; - mGestureHandler = gestureHandler; - updateOneHandedEnabled(); - setupGestures(); + + mDisplayController.addDisplayChangingController(mRotationController); + + setupCallback(); + setupSettingObservers(); + setupTimeoutListener(); + setupGesturalOverlay(); + updateSettings(); } /** - * Set one handed enabled or disabled by OneHanded UI when user update settings + * Set one handed enabled or disabled when user update settings */ - public void setOneHandedEnabled(boolean enabled) { + void setOneHandedEnabled(boolean enabled) { mIsOneHandedEnabled = enabled; updateOneHandedEnabled(); } /** - * Set one handed enabled or disabled by OneHanded UI when user update settings + * Set one handed enabled or disabled by when user update settings */ - public void setTaskChangeToExit(boolean enabled) { - if (mTaskChangeToExit == enabled) { - return; - } + void setTaskChangeToExit(boolean enabled) { mTaskChangeToExit = enabled; - updateOneHandedEnabled(); } /** * Sets whether to enable swipe bottom to notification gesture when user update settings. */ - public void setSwipeToNotificationEnabled(boolean enabled) { + void setSwipeToNotificationEnabled(boolean enabled) { mIsSwipeToNotificationEnabled = enabled; updateOneHandedEnabled(); } - /** - * Enters one handed mode. - */ + @Override + public boolean hasOneHandedFeature() { + return mHasOneHandedFeature; + } + + @Override + public boolean isOneHandedEnabled() { + return mIsOneHandedEnabled; + } + + @Override + public boolean isSwipeToNotificationEnabled() { + return mIsSwipeToNotificationEnabled; + } + + @Override public void startOneHanded() { if (!mDisplayAreaOrganizer.isInOneHanded()) { final int yOffSet = Math.round(getDisplaySize().y * mOffSetFraction); mDisplayAreaOrganizer.scheduleOffset(0, yOffSet); mTimeoutHandler.resetTimer(); + + OneHandedEvents.writeEvent(OneHandedEvents.EVENT_ONE_HANDED_TRIGGER_GESTURE_IN); } } - /** - * Exits one handed mode. - */ + @Override public void stopOneHanded() { if (mDisplayAreaOrganizer.isInOneHanded()) { mDisplayAreaOrganizer.scheduleOffset(0, 0); @@ -212,64 +279,72 @@ public class OneHandedController implements Dumpable { } } - private void setupGestures() { - mTouchHandler.registerTouchEventListener( - new OneHandedTouchHandler.OneHandedTouchEventCallback() { - @Override - public void onStart() { - if (mIsOneHandedEnabled) { - startOneHanded(); - } - } - - @Override - public void onStop() { - if (mIsOneHandedEnabled) { - stopOneHanded(); - } - } - }); - - mGestureHandler.setGestureEventListener( - new OneHandedGestureHandler.OneHandedGestureEventCallback() { - @Override - public void onStart() { - if (mIsOneHandedEnabled) { - startOneHanded(); - } else if (mIsSwipeToNotificationEnabled) { - mCommandQueue.handleSystemKey(KeyEvent.KEYCODE_SYSTEM_NAVIGATION_DOWN); - } - } - - @Override - public void onStop() { - if (mIsOneHandedEnabled) { - stopOneHanded(); - } else if (mIsSwipeToNotificationEnabled) { - mCommandQueue.handleSystemKey(KeyEvent.KEYCODE_SYSTEM_NAVIGATION_UP); - } - } - }); - - mDisplayAreaOrganizer.registerTransitionCallback(new OneHandedTransitionCallback() { - @Override - public void onStartFinished(Rect bounds) { - mSysUiFlagContainer.setFlag(SYSUI_STATE_ONE_HANDED_ACTIVE, - true).commitUpdate(DEFAULT_DISPLAY); - } + @Override + public void stopOneHanded(int event) { + if (!mTaskChangeToExit && event == OneHandedEvents.EVENT_ONE_HANDED_TRIGGER_APP_TAPS_OUT) { + //Task change exit not enable, do nothing and return here. + return; + } - @Override - public void onStopFinished(Rect bounds) { - mSysUiFlagContainer.setFlag(SYSUI_STATE_ONE_HANDED_ACTIVE, - false).commitUpdate(DEFAULT_DISPLAY); - } - }); + if (mDisplayAreaOrganizer.isInOneHanded()) { + OneHandedEvents.writeEvent(event); + } + + stopOneHanded(); + } + + @Override + public void setThreeButtonModeEnabled(boolean enabled) { + mGestureHandler.onThreeButtonModeEnabled(enabled); + } + + @Override + public void registerTransitionCallback(OneHandedTransitionCallback callback) { + mDisplayAreaOrganizer.registerTransitionCallback(callback); + } + + @Override + public void registerGestureCallback(OneHandedGestureEventCallback callback) { + mGestureHandler.setGestureEventListener(callback); + } + private void setupCallback() { + mTouchHandler.registerTouchEventListener(() -> + stopOneHanded(OneHandedEvents.EVENT_ONE_HANDED_TRIGGER_OVERSPACE_OUT)); mDisplayAreaOrganizer.registerTransitionCallback(mTouchHandler); mDisplayAreaOrganizer.registerTransitionCallback(mGestureHandler); mDisplayAreaOrganizer.registerTransitionCallback(mTutorialHandler); } + private void setupSettingObservers() { + OneHandedSettingsUtil.registerSettingsKeyObserver(Settings.Secure.ONE_HANDED_MODE_ENABLED, + mContext.getContentResolver(), mEnabledObserver); + OneHandedSettingsUtil.registerSettingsKeyObserver(Settings.Secure.ONE_HANDED_MODE_TIMEOUT, + mContext.getContentResolver(), mTimeoutObserver); + OneHandedSettingsUtil.registerSettingsKeyObserver(Settings.Secure.TAPS_APP_TO_EXIT, + mContext.getContentResolver(), mTaskChangeExitObserver); + OneHandedSettingsUtil.registerSettingsKeyObserver( + Settings.Secure.SWIPE_BOTTOM_TO_NOTIFICATION_ENABLED, + mContext.getContentResolver(), mSwipeToNotificationEnabledObserver); + } + + private void updateSettings() { + setOneHandedEnabled(OneHandedSettingsUtil + .getSettingsOneHandedModeEnabled(mContext.getContentResolver())); + mTimeoutHandler.setTimeout(OneHandedSettingsUtil + .getSettingsOneHandedModeTimeout(mContext.getContentResolver())); + setTaskChangeToExit(OneHandedSettingsUtil + .getSettingsTapsAppToExit(mContext.getContentResolver())); + setSwipeToNotificationEnabled(OneHandedSettingsUtil + .getSettingsSwipeToNotificationEnabled(mContext.getContentResolver())); + } + + private void setupTimeoutListener() { + mTimeoutHandler.registerTimeoutListener(timeoutTime -> { + stopOneHanded(OneHandedEvents.EVENT_ONE_HANDED_TRIGGER_TIMEOUT_OUT); + }); + } + /** * Query the current display real size from {@link DisplayController} * @@ -293,25 +368,73 @@ public class OneHandedController implements Dumpable { mDisplayAreaOrganizer.registerOrganizer( OneHandedDisplayAreaOrganizer.FEATURE_ONE_HANDED); } - ActivityManagerWrapper.getInstance().unregisterTaskStackListener(mTaskStackListener); - if (mTaskChangeToExit) { - ActivityManagerWrapper.getInstance().registerTaskStackListener(mTaskStackListener); - } mTouchHandler.onOneHandedEnabled(mIsOneHandedEnabled); mGestureHandler.onOneHandedEnabled(mIsOneHandedEnabled || mIsSwipeToNotificationEnabled); } + private void setupGesturalOverlay() { + if (!OneHandedSettingsUtil.getSettingsOneHandedModeEnabled(mContext.getContentResolver())) { + return; + } + + OverlayInfo info = null; + try { + // TODO(b/157958539) migrate new RRO config file after S+ + mOverlayManager.setHighestPriority(ONE_HANDED_MODE_GESTURAL_OVERLAY, USER_CURRENT); + info = mOverlayManager.getOverlayInfo(ONE_HANDED_MODE_GESTURAL_OVERLAY, USER_CURRENT); + } catch (RemoteException e) { /* Do nothing */ } + + if (info != null && !info.isEnabled()) { + // Enable the default gestural one handed overlay. + setEnabledGesturalOverlay(true); + } + } + + @androidx.annotation.VisibleForTesting + private void setEnabledGesturalOverlay(boolean enabled) { + try { + mOverlayManager.setEnabled(ONE_HANDED_MODE_GESTURAL_OVERLAY, enabled, USER_CURRENT); + } catch (RemoteException e) { + throw e.rethrowFromSystemServer(); + } + } + @Override - public void dump(@NonNull FileDescriptor fd, @NonNull PrintWriter pw, @NonNull String[] args) { + public void dump(@NonNull PrintWriter pw) { final String innerPrefix = " "; pw.println(TAG + "states: "); - pw.print(innerPrefix + "mSysUiFlagContainer="); - pw.println(mSysUiFlagContainer.getFlags()); pw.print(innerPrefix + "mOffSetFraction="); pw.println(mOffSetFraction); if (mDisplayAreaOrganizer != null) { - mDisplayAreaOrganizer.dump(fd, pw, args); + mDisplayAreaOrganizer.dump(pw); + } + + if (mTouchHandler != null) { + mTouchHandler.dump(pw); + } + + if (mTimeoutHandler != null) { + mTimeoutHandler.dump(pw); + } + + if (mTutorialHandler != null) { + mTutorialHandler.dump(pw); + } + + OneHandedSettingsUtil.dump(pw, innerPrefix, mContext.getContentResolver()); + + if (mOverlayManager != null) { + OverlayInfo info = null; + try { + info = mOverlayManager.getOverlayInfo(ONE_HANDED_MODE_GESTURAL_OVERLAY, + USER_CURRENT); + } catch (RemoteException e) { /* Do nothing */ } + + if (info != null && !info.isEnabled()) { + pw.print(innerPrefix + "OverlayInfo="); + pw.println(info); + } } } } diff --git a/packages/SystemUI/src/com/android/systemui/onehanded/OneHandedDisplayAreaOrganizer.java b/packages/SystemUI/src/com/android/systemui/onehanded/OneHandedDisplayAreaOrganizer.java index ad9f7ea4e945..ec40bad06b71 100644 --- a/packages/SystemUI/src/com/android/systemui/onehanded/OneHandedDisplayAreaOrganizer.java +++ b/packages/SystemUI/src/com/android/systemui/onehanded/OneHandedDisplayAreaOrganizer.java @@ -38,10 +38,8 @@ import androidx.annotation.Nullable; import androidx.annotation.VisibleForTesting; import com.android.internal.os.SomeArgs; -import com.android.systemui.Dumpable; import com.android.wm.shell.common.DisplayController; -import java.io.FileDescriptor; import java.io.PrintWriter; import java.util.ArrayList; import java.util.HashMap; @@ -58,7 +56,7 @@ import java.util.Objects; * * This class is also responsible for translating one handed operations within SysUI component */ -public class OneHandedDisplayAreaOrganizer extends DisplayAreaOrganizer implements Dumpable { +public class OneHandedDisplayAreaOrganizer extends DisplayAreaOrganizer { private static final String TAG = "OneHandedDisplayAreaOrganizer"; private static final String ONE_HANDED_MODE_TRANSLATE_ANIMATION_DURATION = "persist.debug.one_handed_translate_animation_duration"; @@ -353,8 +351,7 @@ public class OneHandedDisplayAreaOrganizer extends DisplayAreaOrganizer implemen return args; } - @Override - public void dump(@NonNull FileDescriptor fd, @NonNull PrintWriter pw, @NonNull String[] args) { + void dump(@NonNull PrintWriter pw) { final String innerPrefix = " "; pw.println(TAG + "states: "); pw.print(innerPrefix + "mIsInOneHanded="); diff --git a/packages/SystemUI/src/com/android/systemui/onehanded/OneHandedGestureHandler.java b/packages/SystemUI/src/com/android/systemui/onehanded/OneHandedGestureHandler.java index f3be699ab821..4a493ba800ba 100644 --- a/packages/SystemUI/src/com/android/systemui/onehanded/OneHandedGestureHandler.java +++ b/packages/SystemUI/src/com/android/systemui/onehanded/OneHandedGestureHandler.java @@ -17,7 +17,6 @@ package com.android.systemui.onehanded; import static android.view.Display.DEFAULT_DISPLAY; -import static android.view.WindowManagerPolicyConstants.NAV_BAR_MODE_3BUTTON; import android.annotation.Nullable; import android.content.Context; @@ -40,7 +39,6 @@ import android.window.WindowContainerTransaction; import androidx.annotation.VisibleForTesting; import com.android.systemui.R; -import com.android.systemui.navigationbar.NavigationModeController; import com.android.wm.shell.common.DisplayChangeController; import com.android.wm.shell.common.DisplayController; @@ -49,7 +47,6 @@ import com.android.wm.shell.common.DisplayController; * others(e.g, 2-button, full gesture mode) are handled by Launcher quick steps. */ public class OneHandedGestureHandler implements OneHandedTransitionCallback, - NavigationModeController.ModeChangedListener, DisplayChangeController.OnDisplayChangingListener { private static final String TAG = "OneHandedGestureHandler"; private static final boolean DEBUG_GESTURE = false; @@ -66,7 +63,7 @@ public class OneHandedGestureHandler implements OneHandedTransitionCallback, private boolean mAllowGesture; private boolean mIsEnabled; private int mNavGestureHeight; - private boolean mIsThreeButtonModeEnable; + private boolean mIsThreeButtonModeEnabled; private int mRotation = Surface.ROTATION_0; @VisibleForTesting @@ -85,14 +82,10 @@ public class OneHandedGestureHandler implements OneHandedTransitionCallback, * * @param context {@link Context} * @param displayController {@link DisplayController} - * @param navigationModeController {@link NavigationModeController} */ - public OneHandedGestureHandler(Context context, DisplayController displayController, - NavigationModeController navigationModeController) { + public OneHandedGestureHandler(Context context, DisplayController displayController) { mDisplayController = displayController; displayController.addDisplayChangingController(this); - final int NavBarMode = navigationModeController.addListener(this); - mIsThreeButtonModeEnable = (NavBarMode == NAV_BAR_MODE_3BUTTON); mNavGestureHeight = context.getResources().getDimensionPixelSize( com.android.internal.R.dimen.navigation_bar_gesture_height); mDragDistThreshold = context.getResources().getDimensionPixelSize( @@ -115,6 +108,11 @@ public class OneHandedGestureHandler implements OneHandedTransitionCallback, updateIsEnabled(); } + void onThreeButtonModeEnabled(boolean isEnabled) { + mIsThreeButtonModeEnabled = isEnabled; + updateIsEnabled(); + } + /** * Register {@link OneHandedGestureEventCallback} to receive onStart(), onStop() callback */ @@ -199,7 +197,7 @@ public class OneHandedGestureHandler implements OneHandedTransitionCallback, private void updateIsEnabled() { disposeInputChannel(); - if (mIsEnabled && mIsThreeButtonModeEnable) { + if (mIsEnabled && mIsThreeButtonModeEnabled) { final Point displaySize = new Point(); if (mDisplayController != null) { final Display display = mDisplayController.getDisplay(DEFAULT_DISPLAY); @@ -224,15 +222,6 @@ public class OneHandedGestureHandler implements OneHandedTransitionCallback, } @Override - public void onNavigationModeChanged(int mode) { - if (DEBUG_GESTURE) { - Log.d(TAG, "onNavigationModeChanged, mode =" + mode); - } - mIsThreeButtonModeEnable = (mode == NAV_BAR_MODE_3BUTTON); - updateIsEnabled(); - } - - @Override public void onRotateDisplay(int displayId, int fromRotation, int toRotation, WindowContainerTransaction t) { mRotation = toRotation; diff --git a/packages/SystemUI/src/com/android/systemui/onehanded/OneHandedTimeoutHandler.java b/packages/SystemUI/src/com/android/systemui/onehanded/OneHandedTimeoutHandler.java index 6bed30425c55..21329ea1b0e6 100644 --- a/packages/SystemUI/src/com/android/systemui/onehanded/OneHandedTimeoutHandler.java +++ b/packages/SystemUI/src/com/android/systemui/onehanded/OneHandedTimeoutHandler.java @@ -25,9 +25,6 @@ import android.os.Message; import androidx.annotation.NonNull; import androidx.annotation.VisibleForTesting; -import com.android.systemui.Dumpable; - -import java.io.FileDescriptor; import java.io.PrintWriter; import java.util.ArrayList; import java.util.List; @@ -36,7 +33,7 @@ import java.util.concurrent.TimeUnit; /** * Timeout handler for stop one handed mode operations. */ -public class OneHandedTimeoutHandler implements Dumpable { +public class OneHandedTimeoutHandler { private static final String TAG = "OneHandedTimeoutHandler"; private static boolean sIsDragging = false; // Default timeout is ONE_HANDED_TIMEOUT_MEDIUM @@ -150,8 +147,7 @@ public class OneHandedTimeoutHandler implements Dumpable { } } - @Override - public void dump(@NonNull FileDescriptor fd, @NonNull PrintWriter pw, @NonNull String[] args) { + void dump(@NonNull PrintWriter pw) { final String innerPrefix = " "; pw.println(TAG + "states: "); pw.print(innerPrefix + "sTimeout="); diff --git a/packages/SystemUI/src/com/android/systemui/onehanded/OneHandedTouchHandler.java b/packages/SystemUI/src/com/android/systemui/onehanded/OneHandedTouchHandler.java index 8265da6a5f14..3d28a426f4f8 100644 --- a/packages/SystemUI/src/com/android/systemui/onehanded/OneHandedTouchHandler.java +++ b/packages/SystemUI/src/com/android/systemui/onehanded/OneHandedTouchHandler.java @@ -30,9 +30,6 @@ import android.view.MotionEvent; import androidx.annotation.NonNull; import androidx.annotation.VisibleForTesting; -import com.android.systemui.Dumpable; - -import java.io.FileDescriptor; import java.io.PrintWriter; /** @@ -40,7 +37,7 @@ import java.io.PrintWriter; * to exit, reset timer when user is in one-handed mode. * Refer {@link OneHandedGestureHandler} to see start and stop one handed gesture */ -public class OneHandedTouchHandler implements OneHandedTransitionCallback, Dumpable { +public class OneHandedTouchHandler implements OneHandedTransitionCallback { private static final String TAG = "OneHandedTouchHandler"; private final Rect mLastUpdatedBounds = new Rect(); @@ -146,8 +143,7 @@ public class OneHandedTouchHandler implements OneHandedTransitionCallback, Dumpa mIsOnStopTransitioning = false; } - @Override - public void dump(@NonNull FileDescriptor fd, @NonNull PrintWriter pw, @NonNull String[] args) { + void dump(@NonNull PrintWriter pw) { final String innerPrefix = " "; pw.println(TAG + "states: "); pw.print(innerPrefix + "mLastUpdatedBounds="); @@ -170,11 +166,6 @@ public class OneHandedTouchHandler implements OneHandedTransitionCallback, Dumpa */ public interface OneHandedTouchEventCallback { /** - * Handle the start event. - */ - void onStart(); - - /** * Handle the exit event. */ void onStop(); diff --git a/packages/SystemUI/src/com/android/systemui/onehanded/OneHandedTutorialHandler.java b/packages/SystemUI/src/com/android/systemui/onehanded/OneHandedTutorialHandler.java index 8ef9b092bc00..beccf3dbc8de 100644 --- a/packages/SystemUI/src/com/android/systemui/onehanded/OneHandedTutorialHandler.java +++ b/packages/SystemUI/src/com/android/systemui/onehanded/OneHandedTutorialHandler.java @@ -33,10 +33,8 @@ import android.widget.FrameLayout; import androidx.annotation.NonNull; -import com.android.systemui.Dumpable; import com.android.systemui.R; -import java.io.FileDescriptor; import java.io.PrintWriter; /** @@ -45,7 +43,7 @@ import java.io.PrintWriter; * Refer {@link OneHandedGestureHandler} and {@link OneHandedTouchHandler} to see start and stop * one handed gesture */ -public class OneHandedTutorialHandler implements OneHandedTransitionCallback, Dumpable { +public class OneHandedTutorialHandler implements OneHandedTransitionCallback { private static final String TAG = "OneHandedTutorialHandler"; private static final String ONE_HANDED_MODE_OFFSET_PERCENTAGE = "persist.debug.one_handed_offset_percentage"; @@ -170,8 +168,7 @@ public class OneHandedTutorialHandler implements OneHandedTransitionCallback, Du return lp; } - @Override - public void dump(@NonNull FileDescriptor fd, @NonNull PrintWriter pw, @NonNull String[] args) { + void dump(@NonNull PrintWriter pw) { final String innerPrefix = " "; pw.println(TAG + "states: "); pw.print(innerPrefix + "mLastUpdatedBounds="); diff --git a/packages/SystemUI/src/com/android/systemui/onehanded/OneHandedUI.java b/packages/SystemUI/src/com/android/systemui/onehanded/OneHandedUI.java deleted file mode 100644 index 3348a06d5cac..000000000000 --- a/packages/SystemUI/src/com/android/systemui/onehanded/OneHandedUI.java +++ /dev/null @@ -1,340 +0,0 @@ -/* - * Copyright (C) 2020 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.android.systemui.onehanded; - -import static android.os.UserHandle.USER_CURRENT; -import static android.view.Display.DEFAULT_DISPLAY; - -import android.content.Context; -import android.content.om.IOverlayManager; -import android.content.om.OverlayInfo; -import android.database.ContentObserver; -import android.inputmethodservice.InputMethodService; -import android.os.Handler; -import android.os.IBinder; -import android.os.Looper; -import android.os.RemoteException; -import android.os.ServiceManager; -import android.os.SystemProperties; -import android.provider.Settings; -import android.util.Log; - -import androidx.annotation.VisibleForTesting; - -import com.android.keyguard.KeyguardUpdateMonitor; -import com.android.keyguard.KeyguardUpdateMonitorCallback; -import com.android.systemui.Dependency; -import com.android.systemui.Dumpable; -import com.android.systemui.SystemUI; -import com.android.systemui.dagger.SysUISingleton; -import com.android.systemui.keyguard.ScreenLifecycle; -import com.android.systemui.statusbar.CommandQueue; - -import java.io.FileDescriptor; -import java.io.PrintWriter; - -import javax.inject.Inject; - -/** - * A service that controls UI of the one handed mode function. - */ -@SysUISingleton -public class OneHandedUI extends SystemUI implements CommandQueue.Callbacks, Dumpable { - private static final String TAG = "OneHandedUI"; - private static final String ONE_HANDED_MODE_GESTURAL_OVERLAY = - "com.android.internal.systemui.onehanded.gestural"; - private static final String SUPPORT_ONE_HANDED_MODE = "ro.support_one_handed_mode"; - - private final OneHandedController mOneHandedController; - private final CommandQueue mCommandQueue; - private final Handler mMainHandler = new Handler(Looper.getMainLooper()); - private final IOverlayManager mOverlayManager; - private final OneHandedTimeoutHandler mTimeoutHandler; - private final ScreenLifecycle mScreenLifecycle; - - private final ContentObserver mEnabledObserver = new ContentObserver(mMainHandler) { - @Override - public void onChange(boolean selfChange) { - final boolean enabled = OneHandedSettingsUtil.getSettingsOneHandedModeEnabled( - mContext.getContentResolver()); - OneHandedEvents.writeEvent(enabled - ? OneHandedEvents.EVENT_ONE_HANDED_SETTINGS_ENABLED_ON - : OneHandedEvents.EVENT_ONE_HANDED_SETTINGS_ENABLED_OFF); - if (mOneHandedController != null) { - mOneHandedController.setOneHandedEnabled(enabled); - } - - // Also checks swipe to notification settings since they all need gesture overlay. - setEnabledGesturalOverlay( - enabled || OneHandedSettingsUtil.getSettingsSwipeToNotificationEnabled( - mContext.getContentResolver())); - } - }; - - private final ContentObserver mTimeoutObserver = new ContentObserver(mMainHandler) { - @Override - public void onChange(boolean selfChange) { - final int newTimeout = OneHandedSettingsUtil.getSettingsOneHandedModeTimeout( - mContext.getContentResolver()); - int metricsId = OneHandedEvents.OneHandedSettingsTogglesEvent.INVALID.getId(); - switch (newTimeout) { - case OneHandedSettingsUtil.ONE_HANDED_TIMEOUT_NEVER: - metricsId = OneHandedEvents.EVENT_ONE_HANDED_SETTINGS_TIMEOUT_SECONDS_NEVER; - break; - case OneHandedSettingsUtil.ONE_HANDED_TIMEOUT_SHORT_IN_SECONDS: - metricsId = OneHandedEvents.EVENT_ONE_HANDED_SETTINGS_TIMEOUT_SECONDS_4; - break; - case OneHandedSettingsUtil.ONE_HANDED_TIMEOUT_MEDIUM_IN_SECONDS: - metricsId = OneHandedEvents.EVENT_ONE_HANDED_SETTINGS_TIMEOUT_SECONDS_8; - break; - case OneHandedSettingsUtil.ONE_HANDED_TIMEOUT_LONG_IN_SECONDS: - metricsId = OneHandedEvents.EVENT_ONE_HANDED_SETTINGS_TIMEOUT_SECONDS_12; - break; - default: - // do nothing - break; - } - OneHandedEvents.writeEvent(metricsId); - - if (mTimeoutHandler != null) { - mTimeoutHandler.setTimeout(newTimeout); - } - } - }; - - private final ContentObserver mTaskChangeExitObserver = new ContentObserver(mMainHandler) { - @Override - public void onChange(boolean selfChange) { - final boolean enabled = OneHandedSettingsUtil.getSettingsTapsAppToExit( - mContext.getContentResolver()); - OneHandedEvents.writeEvent(enabled - ? OneHandedEvents.EVENT_ONE_HANDED_SETTINGS_APP_TAPS_EXIT_ON - : OneHandedEvents.EVENT_ONE_HANDED_SETTINGS_APP_TAPS_EXIT_OFF); - - if (mOneHandedController != null) { - mOneHandedController.setTaskChangeToExit(enabled); - } - } - }; - - private final ContentObserver mSwipeToNotificationEnabledObserver = - new ContentObserver(mMainHandler) { - @Override - public void onChange(boolean selfChange) { - final boolean enabled = - OneHandedSettingsUtil.getSettingsSwipeToNotificationEnabled( - mContext.getContentResolver()); - if (mOneHandedController != null) { - mOneHandedController.setSwipeToNotificationEnabled(enabled); - } - - // Also checks one handed mode settings since they all need gesture overlay. - setEnabledGesturalOverlay( - enabled || OneHandedSettingsUtil.getSettingsOneHandedModeEnabled( - mContext.getContentResolver())); - } - }; - - @Inject - public OneHandedUI(Context context, - CommandQueue commandQueue, - OneHandedController oneHandedController, - ScreenLifecycle screenLifecycle) { - super(context); - - if (!SystemProperties.getBoolean(SUPPORT_ONE_HANDED_MODE, false)) { - Log.i(TAG, "Device config SUPPORT_ONE_HANDED_MODE off"); - mCommandQueue = null; - mOneHandedController = null; - mOverlayManager = null; - mTimeoutHandler = null; - mScreenLifecycle = null; - return; - } - - mCommandQueue = commandQueue; - mOneHandedController = oneHandedController; - mTimeoutHandler = OneHandedTimeoutHandler.get(); - mScreenLifecycle = screenLifecycle; - mOverlayManager = IOverlayManager.Stub.asInterface( - ServiceManager.getService(Context.OVERLAY_SERVICE)); - } - - @Override - public void start() { - if (!SystemProperties.getBoolean(SUPPORT_ONE_HANDED_MODE, false)) { - return; - } - mCommandQueue.addCallback(this); - setupKeyguardUpdateMonitor(); - setupScreenObserver(); - setupSettingObservers(); - setupTimeoutListener(); - setupGesturalOverlay(); - updateSettings(); - } - - private void setupGesturalOverlay() { - if (!OneHandedSettingsUtil.getSettingsOneHandedModeEnabled(mContext.getContentResolver())) { - return; - } - - OverlayInfo info = null; - try { - // TODO(b/157958539) migrate new RRO config file after S+ - mOverlayManager.setHighestPriority(ONE_HANDED_MODE_GESTURAL_OVERLAY, USER_CURRENT); - info = mOverlayManager.getOverlayInfo(ONE_HANDED_MODE_GESTURAL_OVERLAY, USER_CURRENT); - } catch (RemoteException e) { /* Do nothing */ } - - if (info != null && !info.isEnabled()) { - // Enable the default gestural one handed overlay. - setEnabledGesturalOverlay(true); - } - } - - private void setupTimeoutListener() { - mTimeoutHandler.registerTimeoutListener(timeoutTime -> { - OneHandedEvents.writeEvent(OneHandedEvents.EVENT_ONE_HANDED_TRIGGER_TIMEOUT_OUT); - stopOneHanded(); - }); - } - - private void setupKeyguardUpdateMonitor() { - final KeyguardUpdateMonitorCallback keyguardCallback = - new KeyguardUpdateMonitorCallback() { - @Override - public void onKeyguardBouncerChanged(boolean bouncer) { - if (bouncer) { - stopOneHanded(); - } - } - - @Override - public void onKeyguardVisibilityChanged(boolean showing) { - stopOneHanded(); - } - }; - Dependency.get(KeyguardUpdateMonitor.class).registerCallback(keyguardCallback); - } - - @Override - public void onCameraLaunchGestureDetected(int source) { - stopOneHanded(); - } - - private void setupScreenObserver() { - final ScreenLifecycle.Observer mScreenObserver = new ScreenLifecycle.Observer() { - @Override - public void onScreenTurningOff() { - OneHandedEvents.writeEvent(OneHandedEvents.EVENT_ONE_HANDED_TRIGGER_SCREEN_OFF_OUT); - stopOneHanded(); - } - }; - mScreenLifecycle.addObserver(mScreenObserver); - } - - private void setupSettingObservers() { - OneHandedSettingsUtil.registerSettingsKeyObserver(Settings.Secure.ONE_HANDED_MODE_ENABLED, - mContext.getContentResolver(), mEnabledObserver); - OneHandedSettingsUtil.registerSettingsKeyObserver(Settings.Secure.ONE_HANDED_MODE_TIMEOUT, - mContext.getContentResolver(), mTimeoutObserver); - OneHandedSettingsUtil.registerSettingsKeyObserver(Settings.Secure.TAPS_APP_TO_EXIT, - mContext.getContentResolver(), mTaskChangeExitObserver); - OneHandedSettingsUtil.registerSettingsKeyObserver( - Settings.Secure.SWIPE_BOTTOM_TO_NOTIFICATION_ENABLED, - mContext.getContentResolver(), mSwipeToNotificationEnabledObserver); - } - - private void updateSettings() { - mOneHandedController.setOneHandedEnabled(OneHandedSettingsUtil - .getSettingsOneHandedModeEnabled(mContext.getContentResolver())); - mTimeoutHandler.setTimeout(OneHandedSettingsUtil - .getSettingsOneHandedModeTimeout(mContext.getContentResolver())); - mOneHandedController.setTaskChangeToExit(OneHandedSettingsUtil - .getSettingsTapsAppToExit(mContext.getContentResolver())); - mOneHandedController.setSwipeToNotificationEnabled(OneHandedSettingsUtil - .getSettingsSwipeToNotificationEnabled(mContext.getContentResolver())); - } - - @Override - public void setImeWindowStatus(int displayId, IBinder token, int vis, int backDisposition, - boolean showImeSwitcher) { - if (displayId != DEFAULT_DISPLAY) { - return; - } - if ((vis & InputMethodService.IME_VISIBLE) != 0) { - OneHandedEvents.writeEvent(OneHandedEvents.EVENT_ONE_HANDED_TRIGGER_POP_IME_OUT); - stopOneHanded(); - } - } - - @VisibleForTesting - private void setEnabledGesturalOverlay(boolean enabled) { - try { - mOverlayManager.setEnabled(ONE_HANDED_MODE_GESTURAL_OVERLAY, enabled, USER_CURRENT); - } catch (RemoteException e) { - throw e.rethrowFromSystemServer(); - } - } - - /** - * Trigger one handed more - */ - public void startOneHanded() { - mOneHandedController.startOneHanded(); - OneHandedEvents.writeEvent(OneHandedEvents.EVENT_ONE_HANDED_TRIGGER_GESTURE_IN); - } - - /** - * Dismiss one handed more - */ - public void stopOneHanded() { - mOneHandedController.stopOneHanded(); - OneHandedEvents.writeEvent(OneHandedEvents.EVENT_ONE_HANDED_TRIGGER_GESTURE_OUT); - } - - /** - * Dump all one handed data of states - */ - public void dump(FileDescriptor fd, PrintWriter pw, String[] args) { - final String innerPrefix = " "; - pw.println(TAG + "one handed states: "); - - if (mOneHandedController != null) { - mOneHandedController.dump(fd, pw, args); - } - - if (mTimeoutHandler != null) { - mTimeoutHandler.dump(fd, pw, args); - } - - OneHandedSettingsUtil.dump(pw, innerPrefix, mContext.getContentResolver()); - - if (mOverlayManager != null) { - OverlayInfo info = null; - try { - info = mOverlayManager.getOverlayInfo(ONE_HANDED_MODE_GESTURAL_OVERLAY, - USER_CURRENT); - } catch (RemoteException e) { /* Do nothing */ } - - if (info != null && !info.isEnabled()) { - pw.print(innerPrefix + "OverlayInfo="); - pw.println(info); - } - } - } -} diff --git a/packages/SystemUI/src/com/android/systemui/pip/PipTaskOrganizer.java b/packages/SystemUI/src/com/android/systemui/pip/PipTaskOrganizer.java index 6f44090d2744..5793cddd7d26 100644 --- a/packages/SystemUI/src/com/android/systemui/pip/PipTaskOrganizer.java +++ b/packages/SystemUI/src/com/android/systemui/pip/PipTaskOrganizer.java @@ -57,16 +57,15 @@ import android.window.TaskOrganizer; import android.window.WindowContainerToken; import android.window.WindowContainerTransaction; import android.window.WindowContainerTransactionCallback; -import android.window.WindowOrganizer; import com.android.internal.os.SomeArgs; import com.android.systemui.dagger.SysUISingleton; import com.android.systemui.pip.phone.PipMenuActivityController; import com.android.systemui.pip.phone.PipUpdateThread; -import com.android.systemui.stackdivider.SplitScreen; import com.android.wm.shell.R; import com.android.wm.shell.ShellTaskOrganizer; import com.android.wm.shell.common.DisplayController; +import com.android.wm.shell.splitscreen.SplitScreen; import java.io.PrintWriter; import java.util.ArrayList; @@ -309,7 +308,7 @@ public class PipTaskOrganizer extends TaskOrganizer implements ShellTaskOrganize // Don't bother doing an animation if the display rotation differs or if it's in // a non-supported windowing mode applyWindowingModeChangeOnExit(wct, direction); - WindowOrganizer.applyTransaction(wct); + mTaskOrganizer.applyTransaction(wct); // Send finished callback though animation is ignored. sendOnPipTransitionFinished(direction); mInPip = false; @@ -379,7 +378,7 @@ public class PipTaskOrganizer extends TaskOrganizer implements ShellTaskOrganize // Reset the task bounds first to ensure the activity configuration is reset as well final WindowContainerTransaction wct = new WindowContainerTransaction(); wct.setBounds(mToken, null); - WindowOrganizer.applyTransaction(wct); + mTaskOrganizer.applyTransaction(wct); ActivityTaskManager.getService().removeStacksInWindowingModes( new int[]{ WINDOWING_MODE_PINNED }); @@ -932,7 +931,7 @@ public class PipTaskOrganizer extends TaskOrganizer implements ShellTaskOrganize */ public void applyFinishBoundsResize(@NonNull WindowContainerTransaction wct, @PipAnimationController.TransitionDirection int direction) { - WindowOrganizer.applyTransaction(wct); + mTaskOrganizer.applyTransaction(wct); } /** diff --git a/packages/SystemUI/src/com/android/systemui/pip/phone/PipController.java b/packages/SystemUI/src/com/android/systemui/pip/phone/PipController.java index 1a805daef77e..6998e90b3a7c 100644 --- a/packages/SystemUI/src/com/android/systemui/pip/phone/PipController.java +++ b/packages/SystemUI/src/com/android/systemui/pip/phone/PipController.java @@ -280,6 +280,7 @@ public class PipController implements Pip, PipTaskOrganizer.PipTransitionCallbac PackageManager pm = context.getPackageManager(); boolean supportsPip = pm.hasSystemFeature(FEATURE_PICTURE_IN_PICTURE); if (!supportsPip) { + Log.w(TAG, "Device not support PIP feature"); return; } diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/CellularTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/CellularTile.java index b4f1fe72f944..5e6a6ce45b46 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/tiles/CellularTile.java +++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/CellularTile.java @@ -130,7 +130,8 @@ public class CellularTile extends QSTileImpl<SignalState> { return; } String carrierName = mController.getMobileDataNetworkName(); - if (TextUtils.isEmpty(carrierName)) { + boolean isInService = mController.isMobileDataNetworkInService(); + if (TextUtils.isEmpty(carrierName) || !isInService) { carrierName = mContext.getString(R.string.mobile_data_disable_message_default_carrier); } AlertDialog dialog = new Builder(mContext) diff --git a/packages/SystemUI/src/com/android/systemui/recents/OverviewProxyRecentsImpl.java b/packages/SystemUI/src/com/android/systemui/recents/OverviewProxyRecentsImpl.java index 1a7e2290e044..47002683c6b9 100644 --- a/packages/SystemUI/src/com/android/systemui/recents/OverviewProxyRecentsImpl.java +++ b/packages/SystemUI/src/com/android/systemui/recents/OverviewProxyRecentsImpl.java @@ -38,8 +38,8 @@ import com.android.systemui.R; import com.android.systemui.dagger.SysUISingleton; import com.android.systemui.shared.recents.IOverviewProxy; import com.android.systemui.shared.system.ActivityManagerWrapper; -import com.android.systemui.stackdivider.SplitScreen; import com.android.systemui.statusbar.phone.StatusBar; +import com.android.wm.shell.splitscreen.SplitScreen; import java.util.Optional; diff --git a/packages/SystemUI/src/com/android/systemui/recents/OverviewProxyService.java b/packages/SystemUI/src/com/android/systemui/recents/OverviewProxyService.java index 62b35f9f5e2d..cba938f5e1a6 100644 --- a/packages/SystemUI/src/com/android/systemui/recents/OverviewProxyService.java +++ b/packages/SystemUI/src/com/android/systemui/recents/OverviewProxyService.java @@ -16,6 +16,7 @@ package com.android.systemui.recents; +import static android.content.pm.PackageManager.FEATURE_PICTURE_IN_PICTURE; import static android.content.pm.PackageManager.MATCH_SYSTEM_ONLY; import static android.view.MotionEvent.ACTION_CANCEL; import static android.view.MotionEvent.ACTION_DOWN; @@ -74,7 +75,8 @@ import com.android.systemui.navigationbar.NavigationBar; import com.android.systemui.navigationbar.NavigationBarController; import com.android.systemui.navigationbar.NavigationBarView; import com.android.systemui.navigationbar.NavigationModeController; -import com.android.systemui.onehanded.OneHandedUI; +import com.android.systemui.onehanded.OneHanded; +import com.android.systemui.onehanded.OneHandedEvents; import com.android.systemui.pip.Pip; import com.android.systemui.pip.PipAnimationController; import com.android.systemui.recents.OverviewProxyService.OverviewProxyListener; @@ -86,12 +88,12 @@ import com.android.systemui.shared.recents.model.Task; import com.android.systemui.shared.system.ActivityManagerWrapper; import com.android.systemui.shared.system.InputMonitorCompat; import com.android.systemui.shared.system.QuickStepContract; -import com.android.systemui.stackdivider.SplitScreen; import com.android.systemui.statusbar.CommandQueue; import com.android.systemui.statusbar.NotificationShadeWindowController; import com.android.systemui.statusbar.phone.StatusBar; import com.android.systemui.statusbar.phone.StatusBarWindowCallback; import com.android.systemui.statusbar.policy.CallbackController; +import com.android.wm.shell.splitscreen.SplitScreen; import java.io.FileDescriptor; import java.io.PrintWriter; @@ -134,7 +136,7 @@ public class OverviewProxyService extends CurrentUserTracker implements private final List<OverviewProxyListener> mConnectionCallbacks = new ArrayList<>(); private final Intent mQuickStepIntent; private final ScreenshotHelper mScreenshotHelper; - private final OneHandedUI mOneHandedUI; + private final Optional<OneHanded> mOneHandedOptional; private final CommandQueue mCommandQueue; private Region mActiveNavBarRegion; @@ -143,6 +145,7 @@ public class OverviewProxyService extends CurrentUserTracker implements private int mConnectionBackoffAttempts; private boolean mBound; private boolean mIsEnabled; + private boolean mHasPipFeature; private int mCurrentBoundedUserId = -1; private float mNavBarButtonAlpha; private boolean mInputFocusTransferStarted; @@ -383,7 +386,9 @@ public class OverviewProxyService extends CurrentUserTracker implements @Override public void setShelfHeight(boolean visible, int shelfHeight) { - if (!verifyCaller("setShelfHeight")) { + if (!verifyCaller("setShelfHeight") || !mHasPipFeature) { + Log.w(TAG_OPS, + "ByPass setShelfHeight, FEATURE_PICTURE_IN_PICTURE:" + mHasPipFeature); return; } long token = Binder.clearCallingIdentity(); @@ -409,7 +414,9 @@ public class OverviewProxyService extends CurrentUserTracker implements @Override public void notifySwipeToHomeFinished() { - if (!verifyCaller("notifySwipeToHomeFinished")) { + if (!verifyCaller("notifySwipeToHomeFinished") || !mHasPipFeature) { + Log.w(TAG_OPS, "ByPass notifySwipeToHomeFinished, FEATURE_PICTURE_IN_PICTURE:" + + mHasPipFeature); return; } long token = Binder.clearCallingIdentity(); @@ -424,7 +431,9 @@ public class OverviewProxyService extends CurrentUserTracker implements @Override public void setPinnedStackAnimationListener(IPinnedStackAnimationListener listener) { - if (!verifyCaller("setPinnedStackAnimationListener")) { + if (!verifyCaller("setPinnedStackAnimationListener") || !mHasPipFeature) { + Log.w(TAG_OPS, "ByPass setPinnedStackAnimationListener, FEATURE_PICTURE_IN_PICTURE:" + + mHasPipFeature); return; } long token = Binder.clearCallingIdentity(); @@ -456,9 +465,7 @@ public class OverviewProxyService extends CurrentUserTracker implements } long token = Binder.clearCallingIdentity(); try { - if (mOneHandedUI != null) { - mOneHandedUI.startOneHanded(); - } + mOneHandedOptional.ifPresent(oneHanded -> oneHanded.startOneHanded()); } finally { Binder.restoreCallingIdentity(token); } @@ -471,9 +478,8 @@ public class OverviewProxyService extends CurrentUserTracker implements } long token = Binder.clearCallingIdentity(); try { - if (mOneHandedUI != null) { - mOneHandedUI.stopOneHanded(); - } + mOneHandedOptional.ifPresent(oneHanded -> oneHanded.stopOneHanded( + OneHandedEvents.EVENT_ONE_HANDED_TRIGGER_GESTURE_OUT)); } finally { Binder.restoreCallingIdentity(token); } @@ -612,11 +618,13 @@ public class OverviewProxyService extends CurrentUserTracker implements NotificationShadeWindowController statusBarWinController, SysUiState sysUiState, Optional<Pip> pipOptional, Optional<SplitScreen> splitScreenOptional, - Optional<Lazy<StatusBar>> statusBarOptionalLazy, OneHandedUI oneHandedUI, + Optional<Lazy<StatusBar>> statusBarOptionalLazy, + Optional<OneHanded> oneHandedOptional, BroadcastDispatcher broadcastDispatcher) { super(broadcastDispatcher); mContext = context; mPipOptional = pipOptional; + mHasPipFeature = mContext.getPackageManager().hasSystemFeature(FEATURE_PICTURE_IN_PICTURE); mStatusBarOptionalLazy = statusBarOptionalLazy; mHandler = new Handler(); mNavBarControllerLazy = navBarControllerLazy; @@ -631,7 +639,7 @@ public class OverviewProxyService extends CurrentUserTracker implements .supportsRoundedCornersOnWindows(mContext.getResources()); mSysUiState = sysUiState; mSysUiState.addCallback(this::notifySystemUiStateFlags); - mOneHandedUI = oneHandedUI; + mOneHandedOptional = oneHandedOptional; // Assumes device always starts with back button until launcher tells it that it does not mNavBarButtonAlpha = 1.0f; diff --git a/packages/SystemUI/src/com/android/systemui/shortcut/ShortcutKeyDispatcher.java b/packages/SystemUI/src/com/android/systemui/shortcut/ShortcutKeyDispatcher.java index 0d92d1e198e7..b9b4f42a66e1 100644 --- a/packages/SystemUI/src/com/android/systemui/shortcut/ShortcutKeyDispatcher.java +++ b/packages/SystemUI/src/com/android/systemui/shortcut/ShortcutKeyDispatcher.java @@ -30,8 +30,8 @@ import com.android.internal.policy.DividerSnapAlgorithm; import com.android.systemui.SystemUI; import com.android.systemui.dagger.SysUISingleton; import com.android.systemui.recents.Recents; -import com.android.systemui.stackdivider.DividerView; -import com.android.systemui.stackdivider.SplitScreen; +import com.android.wm.shell.splitscreen.DividerView; +import com.android.wm.shell.splitscreen.SplitScreen; import java.util.Optional; diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardAffordanceView.java b/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardAffordanceView.java index 2c296353bd14..4b9d5924a8d2 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardAffordanceView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardAffordanceView.java @@ -40,6 +40,7 @@ import android.widget.ImageView; import com.android.systemui.Interpolators; import com.android.systemui.R; +import com.android.wm.shell.animation.FlingAnimationUtils; /** * An ImageView which does not have overlapping renderings commands and therefore does not need a diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationMediaManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationMediaManager.java index c01bdc4c2f28..8bf134d9c5b9 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationMediaManager.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationMediaManager.java @@ -21,6 +21,7 @@ import static com.android.systemui.statusbar.phone.StatusBar.ENABLE_LOCKSCREEN_W import static com.android.systemui.statusbar.phone.StatusBar.SHOW_LOCKSCREEN_MEDIA_ARTWORK; import android.annotation.MainThread; +import android.annotation.NonNull; import android.annotation.Nullable; import android.app.Notification; import android.content.Context; @@ -57,6 +58,7 @@ import com.android.systemui.statusbar.dagger.StatusBarModule; import com.android.systemui.statusbar.notification.NotificationEntryListener; import com.android.systemui.statusbar.notification.NotificationEntryManager; import com.android.systemui.statusbar.notification.collection.NotificationEntry; +import com.android.systemui.statusbar.notification.collection.notifcollection.NotifCollectionListener; import com.android.systemui.statusbar.phone.BiometricUnlockController; import com.android.systemui.statusbar.phone.KeyguardBypassController; import com.android.systemui.statusbar.phone.LockscreenWallpaper; @@ -233,8 +235,17 @@ public class NotificationMediaManager implements Dumpable { NotificationVisibility visibility, boolean removedByUser, int reason) { - onNotificationRemoved(entry.getKey()); - mediaDataManager.onNotificationRemoved(entry.getKey()); + removeEntry(entry); + } + }); + + // Pending entries are never inflated, and will never generate a call to onEntryRemoved(). + // This can happen when notifications are added and canceled before inflation. Add this + // separate listener for cleanup, since media inflation occurs onPendingEntryAdded(). + notificationEntryManager.addCollectionListener(new NotifCollectionListener() { + @Override + public void onEntryCleanUp(@NonNull NotificationEntry entry) { + removeEntry(entry); } }); @@ -247,6 +258,11 @@ public class NotificationMediaManager implements Dumpable { mPropertiesChangedListener); } + private void removeEntry(NotificationEntry entry) { + onNotificationRemoved(entry.getKey()); + mMediaDataManager.onNotificationRemoved(entry.getKey()); + } + /** * Check if a state should be considered actively playing * @param state a PlaybackState diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarIconView.java b/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarIconView.java index 8cf8a2299922..01d31039a749 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarIconView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarIconView.java @@ -390,17 +390,21 @@ public class StatusBarIconView extends AnimatedImageView implements StatusIconDi } private Drawable getIcon(StatusBarIcon icon) { - return getIcon(getContext(), icon); + Context notifContext = mNotification != null ? + mNotification.getPackageContext(getContext()) : getContext(); + return getIcon(getContext(), notifContext, icon); } /** * Returns the right icon to use for this item * - * @param context Context to use to get resources + * @param sysuiContext Context to use to get scale factor + * @param context Context to use to get resources of notification icon * @return Drawable for this item, or null if the package or item could not * be found */ - public static Drawable getIcon(Context context, StatusBarIcon statusBarIcon) { + public static Drawable getIcon(Context sysuiContext, + Context context, StatusBarIcon statusBarIcon) { int userId = statusBarIcon.user.getIdentifier(); if (userId == UserHandle.USER_ALL) { userId = UserHandle.USER_SYSTEM; @@ -409,7 +413,8 @@ public class StatusBarIconView extends AnimatedImageView implements StatusIconDi Drawable icon = statusBarIcon.icon.loadDrawableAsUser(context, userId); TypedValue typedValue = new TypedValue(); - context.getResources().getValue(R.dimen.status_bar_icon_scale_factor, typedValue, true); + sysuiContext.getResources().getValue(R.dimen.status_bar_icon_scale_factor, + typedValue, true); float scaleFactor = typedValue.getFloat(); // No need to scale the icon, so return it as is. diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/InstantAppNotifier.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/InstantAppNotifier.java index 838cf0c9a6d0..6f7b32b3ac74 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/InstantAppNotifier.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/InstantAppNotifier.java @@ -55,10 +55,10 @@ import com.android.systemui.R; import com.android.systemui.SystemUI; import com.android.systemui.dagger.SysUISingleton; import com.android.systemui.dagger.qualifiers.UiBackground; -import com.android.systemui.stackdivider.SplitScreen; import com.android.systemui.statusbar.CommandQueue; import com.android.systemui.statusbar.policy.KeyguardStateController; import com.android.systemui.util.NotificationChannels; +import com.android.wm.shell.splitscreen.SplitScreen; import java.util.List; import java.util.Optional; diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRowController.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRowController.java index 05d9fe757dfd..1d72557c6a89 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRowController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRowController.java @@ -145,13 +145,6 @@ public class ExpandableNotificationRowController implements NodeController { mOnUserInteractionCallback ); - mStatusBarStateController.addCallback(new StatusBarStateController.StateListener() { - @Override - public void onStateChanged(int newState) { - mView.setOnKeyguard(newState == KEYGUARD); - } - }); - mView.setOnKeyguard(mStatusBarStateController.getState() == KEYGUARD); mView.setDescendantFocusability(ViewGroup.FOCUS_BLOCK_DESCENDANTS); if (mAllowLongPress) { mView.setLongPressListener((v, x, y, item) -> { @@ -172,15 +165,26 @@ public class ExpandableNotificationRowController implements NodeController { mView.getEntry().setInitializationTime(mClock.elapsedRealtime()); mPluginManager.addPluginListener(mView, NotificationMenuRowPlugin.class, false /* Allow multiple */); + mView.setOnKeyguard(mStatusBarStateController.getState() == KEYGUARD); + mStatusBarStateController.addCallback(mStatusBarStateListener); } @Override public void onViewDetachedFromWindow(View v) { mPluginManager.removePluginListener(mView); + mStatusBarStateController.removeCallback(mStatusBarStateListener); } }); } + private final StatusBarStateController.StateListener mStatusBarStateListener = + new StatusBarStateController.StateListener() { + @Override + public void onStateChanged(int newState) { + mView.setOnKeyguard(newState == KEYGUARD); + } + }; + private void logNotificationExpansion(String key, boolean userAction, boolean expanded) { mNotificationLogger.onExpansionChanged(key, userAction, expanded); } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardAffordanceHelper.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardAffordanceHelper.java index ba9420265849..5dfb22faee7a 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardAffordanceHelper.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardAffordanceHelper.java @@ -29,8 +29,8 @@ import com.android.systemui.Interpolators; import com.android.systemui.R; import com.android.systemui.classifier.Classifier; import com.android.systemui.plugins.FalsingManager; -import com.android.systemui.statusbar.FlingAnimationUtils; import com.android.systemui.statusbar.KeyguardAffordanceView; +import com.android.wm.shell.animation.FlingAnimationUtils; /** * A touch handler of the keyguard which is responsible for launching phone and camera affordances. diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java index f62783502e5b..cd9cc0775c66 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java @@ -86,7 +86,6 @@ import com.android.systemui.plugins.statusbar.StatusBarStateController; import com.android.systemui.plugins.statusbar.StatusBarStateController.StateListener; import com.android.systemui.qs.QSFragment; import com.android.systemui.statusbar.CommandQueue; -import com.android.systemui.statusbar.FlingAnimationUtils; import com.android.systemui.statusbar.GestureRecorder; import com.android.systemui.statusbar.KeyguardAffordanceView; import com.android.systemui.statusbar.KeyguardIndicationController; @@ -123,6 +122,7 @@ import com.android.systemui.statusbar.policy.KeyguardStateController; import com.android.systemui.statusbar.policy.KeyguardUserSwitcher; import com.android.systemui.statusbar.policy.OnHeadsUpChangedListener; import com.android.systemui.util.InjectionInflationController; +import com.android.wm.shell.animation.FlingAnimationUtils; import java.io.FileDescriptor; import java.io.PrintWriter; diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelViewController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelViewController.java index 0e72506c6d94..6fa99ba41006 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelViewController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelViewController.java @@ -48,12 +48,12 @@ import com.android.systemui.R; import com.android.systemui.classifier.Classifier; import com.android.systemui.doze.DozeLog; import com.android.systemui.plugins.FalsingManager; -import com.android.systemui.statusbar.FlingAnimationUtils; import com.android.systemui.statusbar.StatusBarState; import com.android.systemui.statusbar.SysuiStatusBarStateController; import com.android.systemui.statusbar.VibratorHelper; import com.android.systemui.statusbar.phone.LockscreenGestureLogger.LockscreenUiEvent; import com.android.systemui.statusbar.policy.KeyguardStateController; +import com.android.wm.shell.animation.FlingAnimationUtils; import java.io.FileDescriptor; import java.io.PrintWriter; diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java index 298672769b56..31c1a5e5a9aa 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java @@ -177,7 +177,6 @@ import com.android.systemui.recents.Recents; import com.android.systemui.recents.ScreenPinningRequest; import com.android.systemui.shared.plugins.PluginManager; import com.android.systemui.shared.system.WindowManagerWrapper; -import com.android.systemui.stackdivider.SplitScreen; import com.android.systemui.statusbar.AutoHideUiElement; import com.android.systemui.statusbar.BackDropView; import com.android.systemui.statusbar.CommandQueue; @@ -231,6 +230,7 @@ import com.android.systemui.statusbar.policy.RemoteInputQuickSettingsDisabler; import com.android.systemui.statusbar.policy.UserInfoControllerImpl; import com.android.systemui.statusbar.policy.UserSwitcherController; import com.android.systemui.volume.VolumeComponent; +import com.android.wm.shell.splitscreen.SplitScreen; import java.io.FileDescriptor; import java.io.PrintWriter; diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/dagger/StatusBarPhoneModule.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/dagger/StatusBarPhoneModule.java index 16c3dc460a9c..b7f83145f477 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/dagger/StatusBarPhoneModule.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/dagger/StatusBarPhoneModule.java @@ -46,7 +46,6 @@ import com.android.systemui.plugins.PluginDependencyProvider; import com.android.systemui.recents.Recents; import com.android.systemui.recents.ScreenPinningRequest; import com.android.systemui.shared.plugins.PluginManager; -import com.android.systemui.stackdivider.SplitScreen; import com.android.systemui.statusbar.CommandQueue; import com.android.systemui.statusbar.KeyguardIndicationController; import com.android.systemui.statusbar.NotificationLockscreenUserManager; @@ -99,6 +98,7 @@ import com.android.systemui.statusbar.policy.RemoteInputQuickSettingsDisabler; import com.android.systemui.statusbar.policy.UserInfoControllerImpl; import com.android.systemui.statusbar.policy.UserSwitcherController; import com.android.systemui.volume.VolumeComponent; +import com.android.wm.shell.splitscreen.SplitScreen; import java.util.Optional; import java.util.concurrent.Executor; diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java index cf83603997c0..eb2d9bce6c4e 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java @@ -418,6 +418,10 @@ public class MobileSignalController extends SignalController< return (mServiceState != null && mServiceState.isEmergencyOnly()); } + public boolean isInService() { + return Utils.isInService(mServiceState); + } + private boolean isRoaming() { // During a carrier change, roaming indications need to be supressed. if (isCarrierNetworkChangeActive()) { diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java index b790c92b293c..8722fecdad96 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java @@ -35,6 +35,7 @@ public interface NetworkController extends CallbackController<SignalCallback>, D DataUsageController getMobileDataController(); DataSaverController getDataSaverController(); String getMobileDataNetworkName(); + boolean isMobileDataNetworkInService(); int getNumberSubscriptions(); boolean hasVoiceCallingFeature(); diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java index 2253ce7a62a3..62b922e23532 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java @@ -460,6 +460,12 @@ public class NetworkControllerImpl extends BroadcastReceiver } @Override + public boolean isMobileDataNetworkInService() { + MobileSignalController controller = getDataController(); + return controller != null && controller.isInService(); + } + + @Override public int getNumberSubscriptions() { return mMobileSignalControllers.size(); } diff --git a/packages/SystemUI/src/com/android/systemui/wmshell/TvWMShellModule.java b/packages/SystemUI/src/com/android/systemui/wmshell/TvWMShellModule.java index d8cb280bc7e0..0869cf739d02 100644 --- a/packages/SystemUI/src/com/android/systemui/wmshell/TvWMShellModule.java +++ b/packages/SystemUI/src/com/android/systemui/wmshell/TvWMShellModule.java @@ -31,13 +31,13 @@ import com.android.systemui.pip.PipUiEventLogger; import com.android.systemui.pip.tv.PipController; import com.android.systemui.pip.tv.PipNotification; import com.android.systemui.pip.tv.dagger.TvPipComponent; -import com.android.systemui.stackdivider.SplitScreen; -import com.android.systemui.stackdivider.SplitScreenController; import com.android.wm.shell.ShellTaskOrganizer; import com.android.wm.shell.common.DisplayController; import com.android.wm.shell.common.DisplayImeController; import com.android.wm.shell.common.SystemWindows; import com.android.wm.shell.common.TransactionPool; +import com.android.wm.shell.splitscreen.SplitScreen; +import com.android.wm.shell.splitscreen.SplitScreenController; import java.util.Optional; diff --git a/packages/SystemUI/src/com/android/systemui/wmshell/WMShell.java b/packages/SystemUI/src/com/android/systemui/wmshell/WMShell.java index e1e18a22af51..c7a9af3642e5 100644 --- a/packages/SystemUI/src/com/android/systemui/wmshell/WMShell.java +++ b/packages/SystemUI/src/com/android/systemui/wmshell/WMShell.java @@ -16,26 +16,43 @@ package com.android.systemui.wmshell; +import static android.view.Display.DEFAULT_DISPLAY; +import static android.view.WindowManagerPolicyConstants.NAV_BAR_MODE_3BUTTON; + +import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_ONE_HANDED_ACTIVE; import static com.android.systemui.shared.system.WindowManagerWrapper.WINDOWING_MODE_SPLIT_SCREEN_PRIMARY; import android.app.ActivityManager; +import android.content.ComponentName; import android.content.Context; +import android.graphics.Rect; +import android.inputmethodservice.InputMethodService; +import android.os.IBinder; +import android.view.KeyEvent; +import com.android.internal.annotations.VisibleForTesting; import com.android.keyguard.KeyguardUpdateMonitor; import com.android.keyguard.KeyguardUpdateMonitorCallback; import com.android.systemui.SystemUI; import com.android.systemui.dagger.SysUISingleton; +import com.android.systemui.keyguard.ScreenLifecycle; +import com.android.systemui.model.SysUiState; +import com.android.systemui.navigationbar.NavigationModeController; +import com.android.systemui.onehanded.OneHanded; +import com.android.systemui.onehanded.OneHandedEvents; +import com.android.systemui.onehanded.OneHandedGestureHandler.OneHandedGestureEventCallback; +import com.android.systemui.onehanded.OneHandedTransitionCallback; import com.android.systemui.pip.Pip; import com.android.systemui.shared.system.ActivityManagerWrapper; import com.android.systemui.shared.system.TaskStackChangeListener; import com.android.systemui.shared.tracing.ProtoTraceable; -import com.android.systemui.stackdivider.SplitScreen; import com.android.systemui.statusbar.CommandQueue; import com.android.systemui.tracing.ProtoTracer; import com.android.systemui.tracing.nano.SystemUiTraceProto; import com.android.wm.shell.common.DisplayImeController; import com.android.wm.shell.nano.WmShellTraceProto; import com.android.wm.shell.protolog.ShellProtoLogImpl; +import com.android.wm.shell.splitscreen.SplitScreen; import java.io.FileDescriptor; import java.io.PrintWriter; @@ -48,28 +65,42 @@ import javax.inject.Inject; * Proxy in SysUiScope to delegate events to controllers in WM Shell library. */ @SysUISingleton -public final class WMShell extends SystemUI implements ProtoTraceable<SystemUiTraceProto>, - CommandQueue.Callbacks { +public final class WMShell extends SystemUI implements ProtoTraceable<SystemUiTraceProto> { private final CommandQueue mCommandQueue; private final DisplayImeController mDisplayImeController; private final KeyguardUpdateMonitor mKeyguardUpdateMonitor; + private final ActivityManagerWrapper mActivityManagerWrapper; + private final NavigationModeController mNavigationModeController; + private final ScreenLifecycle mScreenLifecycle; + private final SysUiState mSysUiState; private final Optional<Pip> mPipOptional; private final Optional<SplitScreen> mSplitScreenOptional; + private final Optional<OneHanded> mOneHandedOptional; private final ProtoTracer mProtoTracer; @Inject public WMShell(Context context, CommandQueue commandQueue, KeyguardUpdateMonitor keyguardUpdateMonitor, + ActivityManagerWrapper activityManagerWrapper, DisplayImeController displayImeController, + NavigationModeController navigationModeController, + ScreenLifecycle screenLifecycle, + SysUiState sysUiState, Optional<Pip> pipOptional, Optional<SplitScreen> splitScreenOptional, + Optional<OneHanded> oneHandedOptional, ProtoTracer protoTracer) { super(context); mCommandQueue = commandQueue; mKeyguardUpdateMonitor = keyguardUpdateMonitor; + mActivityManagerWrapper = activityManagerWrapper; mDisplayImeController = displayImeController; + mNavigationModeController = navigationModeController; + mScreenLifecycle = screenLifecycle; + mSysUiState = sysUiState; mPipOptional = pipOptional; mSplitScreenOptional = splitScreenOptional; + mOneHandedOptional = oneHandedOptional; mProtoTracer = protoTracer; mProtoTracer.add(this); } @@ -79,14 +110,14 @@ public final class WMShell extends SystemUI implements ProtoTraceable<SystemUiTr // This is to prevent circular init problem by separating registration step out of its // constructor. And make sure the initialization of DisplayImeController won't depend on // specific feature anymore. - mCommandQueue.addCallback(this); mDisplayImeController.startMonitorDisplays(); - mPipOptional.ifPresent(this::initPip); mSplitScreenOptional.ifPresent(this::initSplitScreen); + mOneHandedOptional.ifPresent(this::initOneHanded); } - private void initPip(Pip pip) { + @VisibleForTesting + void initPip(Pip pip) { mCommandQueue.addCallback(new CommandQueue.Callbacks() { @Override public void showPictureInPictureMenu() { @@ -95,7 +126,8 @@ public final class WMShell extends SystemUI implements ProtoTraceable<SystemUiTr }); } - private void initSplitScreen(SplitScreen splitScreen) { + @VisibleForTesting + void initSplitScreen(SplitScreen splitScreen) { mKeyguardUpdateMonitor.registerCallback(new KeyguardUpdateMonitorCallback() { @Override public void onKeyguardVisibilityChanged(boolean showing) { @@ -107,7 +139,7 @@ public final class WMShell extends SystemUI implements ProtoTraceable<SystemUiTr } }); - ActivityManagerWrapper.getInstance().registerTaskStackListener( + mActivityManagerWrapper.registerTaskStackListener( new TaskStackChangeListener() { @Override public void onActivityRestartAttempt(ActivityManager.RunningTaskInfo task, @@ -141,6 +173,104 @@ public final class WMShell extends SystemUI implements ProtoTraceable<SystemUiTr }); } + @VisibleForTesting + void initOneHanded(OneHanded oneHanded) { + if (!oneHanded.hasOneHandedFeature()) { + return; + } + + int currentMode = mNavigationModeController.addListener(mode -> + oneHanded.setThreeButtonModeEnabled(mode == NAV_BAR_MODE_3BUTTON)); + oneHanded.setThreeButtonModeEnabled(currentMode == NAV_BAR_MODE_3BUTTON); + + oneHanded.registerTransitionCallback(new OneHandedTransitionCallback() { + @Override + public void onStartFinished(Rect bounds) { + mSysUiState.setFlag(SYSUI_STATE_ONE_HANDED_ACTIVE, + true).commitUpdate(DEFAULT_DISPLAY); + } + + @Override + public void onStopFinished(Rect bounds) { + mSysUiState.setFlag(SYSUI_STATE_ONE_HANDED_ACTIVE, + false).commitUpdate(DEFAULT_DISPLAY); + } + }); + + oneHanded.registerGestureCallback(new OneHandedGestureEventCallback() { + @Override + public void onStart() { + if (oneHanded.isOneHandedEnabled()) { + oneHanded.startOneHanded(); + } else if (oneHanded.isSwipeToNotificationEnabled()) { + mCommandQueue.handleSystemKey(KeyEvent.KEYCODE_SYSTEM_NAVIGATION_DOWN); + } + } + + @Override + public void onStop() { + if (oneHanded.isOneHandedEnabled()) { + oneHanded.stopOneHanded(OneHandedEvents.EVENT_ONE_HANDED_TRIGGER_GESTURE_OUT); + } else if (oneHanded.isSwipeToNotificationEnabled()) { + mCommandQueue.handleSystemKey(KeyEvent.KEYCODE_SYSTEM_NAVIGATION_UP); + } + } + }); + + mKeyguardUpdateMonitor.registerCallback(new KeyguardUpdateMonitorCallback() { + @Override + public void onKeyguardBouncerChanged(boolean bouncer) { + if (bouncer) { + oneHanded.stopOneHanded(); + } + } + + @Override + public void onKeyguardVisibilityChanged(boolean showing) { + oneHanded.stopOneHanded(); + } + }); + + mScreenLifecycle.addObserver(new ScreenLifecycle.Observer() { + @Override + public void onScreenTurningOff() { + oneHanded.stopOneHanded( + OneHandedEvents.EVENT_ONE_HANDED_TRIGGER_SCREEN_OFF_OUT); + } + }); + + mCommandQueue.addCallback(new CommandQueue.Callbacks() { + @Override + public void onCameraLaunchGestureDetected(int source) { + oneHanded.stopOneHanded(); + } + + @Override + public void setImeWindowStatus(int displayId, IBinder token, int vis, + int backDisposition, boolean showImeSwitcher) { + if (displayId != DEFAULT_DISPLAY && (vis & InputMethodService.IME_VISIBLE) == 0) { + return; + } + oneHanded.stopOneHanded(OneHandedEvents.EVENT_ONE_HANDED_TRIGGER_POP_IME_OUT); + } + }); + + mActivityManagerWrapper.registerTaskStackListener( + new TaskStackChangeListener() { + @Override + public void onTaskCreated(int taskId, ComponentName componentName) { + oneHanded.stopOneHanded( + OneHandedEvents.EVENT_ONE_HANDED_TRIGGER_APP_TAPS_OUT); + } + + @Override + public void onTaskMovedToFront(int taskId) { + oneHanded.stopOneHanded( + OneHandedEvents.EVENT_ONE_HANDED_TRIGGER_APP_TAPS_OUT); + } + }); + } + @Override public void writeToProto(SystemUiTraceProto proto) { if (proto.wmShell == null) { diff --git a/packages/SystemUI/src/com/android/systemui/wmshell/WMShellBaseModule.java b/packages/SystemUI/src/com/android/systemui/wmshell/WMShellBaseModule.java index cdf85fb549ab..adb9186d6705 100644 --- a/packages/SystemUI/src/com/android/systemui/wmshell/WMShellBaseModule.java +++ b/packages/SystemUI/src/com/android/systemui/wmshell/WMShellBaseModule.java @@ -18,22 +18,25 @@ package com.android.systemui.wmshell; import android.content.Context; import android.os.Handler; +import android.util.DisplayMetrics; import android.view.IWindowManager; import com.android.internal.logging.UiEventLogger; import com.android.systemui.dagger.SysUISingleton; import com.android.systemui.dagger.qualifiers.Main; +import com.android.systemui.onehanded.OneHanded; import com.android.systemui.pip.Pip; import com.android.systemui.pip.PipSurfaceTransactionHelper; import com.android.systemui.pip.PipUiEventLogger; -import com.android.systemui.stackdivider.SplitScreen; import com.android.systemui.statusbar.policy.ConfigurationController; import com.android.systemui.util.DeviceConfigProxy; import com.android.systemui.util.FloatingContentCoordinator; import com.android.wm.shell.ShellTaskOrganizer; +import com.android.wm.shell.animation.FlingAnimationUtils; import com.android.wm.shell.common.DisplayController; import com.android.wm.shell.common.SystemWindows; import com.android.wm.shell.common.TransactionPool; +import com.android.wm.shell.splitscreen.SplitScreen; import dagger.BindsOptionalOf; import dagger.Module; @@ -99,9 +102,19 @@ public abstract class WMShellBaseModule { return organizer; } + @SysUISingleton + @Provides + static FlingAnimationUtils.Builder provideFlingAnimationUtilsBuilder( + DisplayMetrics displayMetrics) { + return new FlingAnimationUtils.Builder(displayMetrics); + } + @BindsOptionalOf abstract Pip optionalPip(); @BindsOptionalOf abstract SplitScreen optionalSplitScreen(); + + @BindsOptionalOf + abstract OneHanded optionalOneHanded(); } diff --git a/packages/SystemUI/src/com/android/systemui/wmshell/WMShellModule.java b/packages/SystemUI/src/com/android/systemui/wmshell/WMShellModule.java index 1870b7605567..3a249d68d969 100644 --- a/packages/SystemUI/src/com/android/systemui/wmshell/WMShellModule.java +++ b/packages/SystemUI/src/com/android/systemui/wmshell/WMShellModule.java @@ -24,14 +24,14 @@ import com.android.systemui.broadcast.BroadcastDispatcher; import com.android.systemui.dagger.SysUISingleton; import com.android.systemui.dagger.qualifiers.Main; import com.android.systemui.model.SysUiState; +import com.android.systemui.onehanded.OneHanded; +import com.android.systemui.onehanded.OneHandedController; import com.android.systemui.pip.Pip; import com.android.systemui.pip.PipBoundsHandler; import com.android.systemui.pip.PipSurfaceTransactionHelper; import com.android.systemui.pip.PipTaskOrganizer; import com.android.systemui.pip.PipUiEventLogger; import com.android.systemui.pip.phone.PipController; -import com.android.systemui.stackdivider.SplitScreen; -import com.android.systemui.stackdivider.SplitScreenController; import com.android.systemui.statusbar.policy.ConfigurationController; import com.android.systemui.util.DeviceConfigProxy; import com.android.systemui.util.FloatingContentCoordinator; @@ -40,6 +40,8 @@ import com.android.wm.shell.common.DisplayController; import com.android.wm.shell.common.DisplayImeController; import com.android.wm.shell.common.SystemWindows; import com.android.wm.shell.common.TransactionPool; +import com.android.wm.shell.splitscreen.SplitScreen; +import com.android.wm.shell.splitscreen.SplitScreenController; import java.util.Optional; @@ -109,4 +111,10 @@ public class WMShellModule { pipUiEventLogger, shellTaskOrganizer); } + @SysUISingleton + @Provides + static OneHanded provideOneHandedController(Context context, + DisplayController displayController) { + return OneHandedController.create(context, displayController); + } } diff --git a/packages/SystemUI/tests/src/com/android/systemui/SysuiTestCase.java b/packages/SystemUI/tests/src/com/android/systemui/SysuiTestCase.java index b7175eabab39..0fe381746449 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/SysuiTestCase.java +++ b/packages/SystemUI/tests/src/com/android/systemui/SysuiTestCase.java @@ -39,6 +39,7 @@ import com.android.systemui.broadcast.logging.BroadcastDispatcherLogger; import com.android.systemui.classifier.FalsingManagerFake; import com.android.systemui.dump.DumpManager; import com.android.systemui.plugins.FalsingManager; +import com.android.systemui.settings.UserTracker; import com.android.systemui.statusbar.SmartReplyController; import com.android.systemui.statusbar.notification.row.NotificationBlockingHelperManager; @@ -78,7 +79,7 @@ public abstract class SysuiTestCase { Dependency.setInstance(mDependency); mFakeBroadcastDispatcher = new FakeBroadcastDispatcher(mContext, mock(Looper.class), mock(Executor.class), mock(DumpManager.class), - mock(BroadcastDispatcherLogger.class)); + mock(BroadcastDispatcherLogger.class), mock(UserTracker.class)); mRealInstrumentation = InstrumentationRegistry.getInstrumentation(); Instrumentation inst = spy(mRealInstrumentation); diff --git a/packages/SystemUI/tests/src/com/android/systemui/broadcast/BroadcastDispatcherTest.kt b/packages/SystemUI/tests/src/com/android/systemui/broadcast/BroadcastDispatcherTest.kt index 22e9594ca420..65301fe6fd3e 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/broadcast/BroadcastDispatcherTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/broadcast/BroadcastDispatcherTest.kt @@ -18,7 +18,6 @@ package com.android.systemui.broadcast import android.content.BroadcastReceiver import android.content.Context -import android.content.Intent import android.content.IntentFilter import android.os.Handler import android.os.Looper @@ -30,6 +29,7 @@ import android.testing.TestableLooper import com.android.systemui.SysuiTestCase import com.android.systemui.broadcast.logging.BroadcastDispatcherLogger import com.android.systemui.dump.DumpManager +import com.android.systemui.settings.UserTracker import com.android.systemui.util.concurrency.FakeExecutor import com.android.systemui.util.time.FakeSystemClock import junit.framework.Assert.assertSame @@ -80,6 +80,8 @@ class BroadcastDispatcherTest : SysuiTestCase() { private lateinit var mockHandler: Handler @Mock private lateinit var logger: BroadcastDispatcherLogger + @Mock + private lateinit var userTracker: UserTracker private lateinit var executor: Executor @@ -101,6 +103,7 @@ class BroadcastDispatcherTest : SysuiTestCase() { mock(Executor::class.java), mock(DumpManager::class.java), logger, + userTracker, mapOf(0 to mockUBRUser0, 1 to mockUBRUser1)) // These should be valid filters @@ -178,11 +181,7 @@ class BroadcastDispatcherTest : SysuiTestCase() { @Test fun testRegisterCurrentAsActualUser() { - val intent = Intent(Intent.ACTION_USER_SWITCHED).apply { - putExtra(Intent.EXTRA_USER_HANDLE, user1.identifier) - } - broadcastDispatcher.onReceive(mockContext, intent) - testableLooper.processAllMessages() + `when`(userTracker.userId).thenReturn(user1.identifier) broadcastDispatcher.registerReceiverWithHandler(broadcastReceiver, intentFilter, mockHandler, UserHandle.CURRENT) @@ -250,8 +249,9 @@ class BroadcastDispatcherTest : SysuiTestCase() { executor: Executor, dumpManager: DumpManager, logger: BroadcastDispatcherLogger, + userTracker: UserTracker, var mockUBRMap: Map<Int, UserBroadcastDispatcher> - ) : BroadcastDispatcher(context, bgLooper, executor, dumpManager, logger) { + ) : BroadcastDispatcher(context, bgLooper, executor, dumpManager, logger, userTracker) { override fun createUBRForUser(userId: Int): UserBroadcastDispatcher { return mockUBRMap.getOrDefault(userId, mock(UserBroadcastDispatcher::class.java)) } diff --git a/packages/SystemUI/tests/src/com/android/systemui/broadcast/FakeBroadcastDispatcher.kt b/packages/SystemUI/tests/src/com/android/systemui/broadcast/FakeBroadcastDispatcher.kt index 949932da4d50..da00e7e9518b 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/broadcast/FakeBroadcastDispatcher.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/broadcast/FakeBroadcastDispatcher.kt @@ -26,6 +26,7 @@ import android.util.Log import com.android.systemui.SysuiTestableContext import com.android.systemui.broadcast.logging.BroadcastDispatcherLogger import com.android.systemui.dump.DumpManager +import com.android.systemui.settings.UserTracker import java.util.concurrent.Executor class FakeBroadcastDispatcher( @@ -33,8 +34,9 @@ class FakeBroadcastDispatcher( looper: Looper, executor: Executor, dumpManager: DumpManager, - logger: BroadcastDispatcherLogger -) : BroadcastDispatcher(context, looper, executor, dumpManager, logger) { + logger: BroadcastDispatcherLogger, + userTracker: UserTracker +) : BroadcastDispatcher(context, looper, executor, dumpManager, logger, userTracker) { private val registeredReceivers = ArraySet<BroadcastReceiver>() diff --git a/packages/SystemUI/tests/src/com/android/systemui/navigationbar/NavigationBarControllerTest.java b/packages/SystemUI/tests/src/com/android/systemui/navigationbar/NavigationBarControllerTest.java index 57dbac5bfb10..ad5f987b59e7 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/navigationbar/NavigationBarControllerTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/navigationbar/NavigationBarControllerTest.java @@ -52,7 +52,6 @@ import com.android.systemui.model.SysUiState; import com.android.systemui.plugins.statusbar.StatusBarStateController; import com.android.systemui.recents.OverviewProxyService; import com.android.systemui.recents.Recents; -import com.android.systemui.stackdivider.SplitScreen; import com.android.systemui.statusbar.CommandQueue; import com.android.systemui.statusbar.NotificationRemoteInputManager; import com.android.systemui.statusbar.phone.ShadeController; @@ -60,6 +59,7 @@ import com.android.systemui.statusbar.phone.StatusBar; import com.android.systemui.statusbar.policy.AccessibilityManagerWrapper; import com.android.systemui.statusbar.policy.ConfigurationController; import com.android.systemui.statusbar.policy.DeviceProvisionedController; +import com.android.wm.shell.splitscreen.SplitScreen; import org.junit.After; import org.junit.Before; diff --git a/packages/SystemUI/tests/src/com/android/systemui/navigationbar/NavigationBarTest.java b/packages/SystemUI/tests/src/com/android/systemui/navigationbar/NavigationBarTest.java index 389c5a08b7c6..f308e9e479e1 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/navigationbar/NavigationBarTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/navigationbar/NavigationBarTest.java @@ -68,7 +68,6 @@ import com.android.systemui.model.SysUiState; import com.android.systemui.plugins.statusbar.StatusBarStateController; import com.android.systemui.recents.OverviewProxyService; import com.android.systemui.recents.Recents; -import com.android.systemui.stackdivider.SplitScreen; import com.android.systemui.statusbar.CommandQueue; import com.android.systemui.statusbar.NotificationRemoteInputManager; import com.android.systemui.statusbar.phone.ShadeController; @@ -77,6 +76,7 @@ import com.android.systemui.statusbar.policy.AccessibilityManagerWrapper; import com.android.systemui.statusbar.policy.DeviceProvisionedController; import com.android.systemui.statusbar.policy.KeyguardStateController; import com.android.systemui.utils.leaks.LeakCheckedTest; +import com.android.wm.shell.splitscreen.SplitScreen; import org.junit.Before; import org.junit.Rule; diff --git a/packages/SystemUI/tests/src/com/android/systemui/onehanded/OneHandedControllerTest.java b/packages/SystemUI/tests/src/com/android/systemui/onehanded/OneHandedControllerTest.java index 02d587d90655..e42cf529373e 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/onehanded/OneHandedControllerTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/onehanded/OneHandedControllerTest.java @@ -22,21 +22,20 @@ import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.anyInt; import static org.mockito.Mockito.atLeastOnce; import static org.mockito.Mockito.never; -import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; +import android.provider.Settings; import android.testing.AndroidTestingRunner; import android.testing.TestableLooper; import android.view.Display; import androidx.test.filters.SmallTest; -import com.android.systemui.model.SysUiState; -import com.android.systemui.statusbar.CommandQueue; import com.android.wm.shell.common.DisplayController; import org.junit.Before; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; @@ -52,8 +51,6 @@ public class OneHandedControllerTest extends OneHandedTestCase { OneHandedTimeoutHandler mTimeoutHandler; @Mock - CommandQueue mCommandQueue; - @Mock DisplayController mMockDisplayController; @Mock OneHandedDisplayAreaOrganizer mMockDisplayAreaOrganizer; @@ -64,21 +61,20 @@ public class OneHandedControllerTest extends OneHandedTestCase { @Mock OneHandedGestureHandler mMockGestureHandler; @Mock - SysUiState mMockSysUiState; + OneHandedTimeoutHandler mMockTimeoutHandler; @Before public void setUp() throws Exception { MockitoAnnotations.initMocks(this); mDisplay = mContext.getDisplay(); - mOneHandedController = new OneHandedController( - getContext(), - mCommandQueue, + OneHandedController oneHandedController = new OneHandedController( + mContext, mMockDisplayController, mMockDisplayAreaOrganizer, mMockTouchHandler, mMockTutorialHandler, - mMockGestureHandler, - mMockSysUiState); + mMockGestureHandler); + mOneHandedController = Mockito.spy(oneHandedController); mTimeoutHandler = Mockito.spy(OneHandedTimeoutHandler.get()); when(mMockDisplayController.getDisplay(anyInt())).thenReturn(mDisplay); @@ -97,7 +93,7 @@ public class OneHandedControllerTest extends OneHandedTestCase { @Test public void testRegisterOrganizer() { - verify(mMockDisplayAreaOrganizer).registerOrganizer(anyInt()); + verify(mMockDisplayAreaOrganizer, atLeastOnce()).registerOrganizer(anyInt()); } @Test @@ -132,7 +128,7 @@ public class OneHandedControllerTest extends OneHandedTestCase { final boolean enabled = true; mOneHandedController.setOneHandedEnabled(enabled); - verify(mMockTouchHandler, times(2)).onOneHandedEnabled(enabled); + verify(mMockTouchHandler, atLeastOnce()).onOneHandedEnabled(enabled); } @Test @@ -140,6 +136,44 @@ public class OneHandedControllerTest extends OneHandedTestCase { final boolean enabled = true; mOneHandedController.setSwipeToNotificationEnabled(enabled); - verify(mMockTouchHandler, times(2)).onOneHandedEnabled(enabled); + verify(mMockTouchHandler, atLeastOnce()).onOneHandedEnabled(enabled); + } + + @Ignore("b/161980408, fix it after migration finished") + @Test + public void tesSettingsObserver_updateTapAppToExit() { + Settings.Secure.putInt(mContext.getContentResolver(), + Settings.Secure.TAPS_APP_TO_EXIT, 1); + + verify(mOneHandedController).setTaskChangeToExit(true); + } + + @Ignore("b/161980408, fix it after migration finished") + @Test + public void tesSettingsObserver_updateEnabled() { + Settings.Secure.putInt(mContext.getContentResolver(), + Settings.Secure.ONE_HANDED_MODE_ENABLED, 1); + + verify(mOneHandedController).setOneHandedEnabled(true); + } + + @Ignore("b/161980408, fix it after migration finished") + @Test + public void tesSettingsObserver_updateTimeout() { + Settings.Secure.putInt(mContext.getContentResolver(), + Settings.Secure.ONE_HANDED_MODE_TIMEOUT, + OneHandedSettingsUtil.ONE_HANDED_TIMEOUT_MEDIUM_IN_SECONDS); + + verify(mMockTimeoutHandler).setTimeout( + OneHandedSettingsUtil.ONE_HANDED_TIMEOUT_MEDIUM_IN_SECONDS); + } + + @Ignore("b/161980408, fix it after migration finished") + @Test + public void tesSettingsObserver_updateSwipeToNotification() { + Settings.Secure.putInt(mContext.getContentResolver(), + Settings.Secure.SWIPE_BOTTOM_TO_NOTIFICATION_ENABLED, 1); + + verify(mOneHandedController).setSwipeToNotificationEnabled(true); } } diff --git a/packages/SystemUI/tests/src/com/android/systemui/onehanded/OneHandedGestureHandlerTest.java b/packages/SystemUI/tests/src/com/android/systemui/onehanded/OneHandedGestureHandlerTest.java index 756382a6c630..41af53b1c522 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/onehanded/OneHandedGestureHandlerTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/onehanded/OneHandedGestureHandlerTest.java @@ -16,12 +16,10 @@ package com.android.systemui.onehanded; -import static android.view.WindowManagerPolicyConstants.NAV_BAR_MODE_2BUTTON; - import static com.google.common.truth.Truth.assertThat; -import static org.mockito.ArgumentMatchers.any; -import static org.mockito.Mockito.times; +import static org.mockito.Mockito.atLeast; +import static org.mockito.Mockito.atLeastOnce; import static org.mockito.Mockito.verify; import android.testing.AndroidTestingRunner; @@ -29,9 +27,6 @@ import android.testing.TestableLooper; import androidx.test.filters.SmallTest; -import com.android.systemui.model.SysUiState; -import com.android.systemui.navigationbar.NavigationModeController; -import com.android.systemui.statusbar.CommandQueue; import com.android.wm.shell.common.DisplayController; import org.junit.Before; @@ -50,52 +45,55 @@ public class OneHandedGestureHandlerTest extends OneHandedTestCase { OneHandedGestureHandler mGestureHandler; OneHandedController mOneHandedController; @Mock - CommandQueue mCommandQueue; - @Mock DisplayController mMockDisplayController; @Mock OneHandedDisplayAreaOrganizer mMockDisplayAreaOrganizer; - @Mock - SysUiState mMockSysUiState; - @Mock - NavigationModeController mMockNavigationModeController; @Before public void setUp() throws Exception { MockitoAnnotations.initMocks(this); mTouchHandler = new OneHandedTouchHandler(); mTutorialHandler = new OneHandedTutorialHandler(mContext); - mGestureHandler = Mockito.spy(new OneHandedGestureHandler( - mContext, mMockDisplayController, mMockNavigationModeController)); + mGestureHandler = Mockito.spy( + new OneHandedGestureHandler(mContext, mMockDisplayController)); mOneHandedController = new OneHandedController( getContext(), - mCommandQueue, mMockDisplayController, mMockDisplayAreaOrganizer, mTouchHandler, mTutorialHandler, - mGestureHandler, - mMockSysUiState); + mGestureHandler); + mOneHandedController.setThreeButtonModeEnabled(true); } @Test public void testOneHandedManager_registerForDisplayAreaOrganizer() { - verify(mMockDisplayAreaOrganizer).registerTransitionCallback(mGestureHandler); + verify(mMockDisplayAreaOrganizer, atLeastOnce()) + .registerTransitionCallback(mGestureHandler); } @Test public void testOneHandedManager_setGestureEventListener() { - verify(mGestureHandler).setGestureEventListener(any()); - - assertThat(mGestureHandler.mGestureEventCallback).isNotNull(); + OneHandedGestureHandler.OneHandedGestureEventCallback callback = + new OneHandedGestureHandler.OneHandedGestureEventCallback() { + @Override + public void onStart() {} + + @Override + public void onStop() {} + }; + mOneHandedController.registerGestureCallback(callback); + + verify(mGestureHandler).setGestureEventListener(callback); + assertThat(mGestureHandler.mGestureEventCallback).isEqualTo(callback); } @Test public void testReceiveNewConfig_whenSetOneHandedEnabled() { // 1st called at init - verify(mGestureHandler).onOneHandedEnabled(true); + verify(mGestureHandler, atLeastOnce()).onOneHandedEnabled(true); mOneHandedController.setOneHandedEnabled(true); // 2nd called by setOneHandedEnabled() - verify(mGestureHandler, times(2)).onOneHandedEnabled(true); + verify(mGestureHandler, atLeast(2)).onOneHandedEnabled(true); } @Test @@ -108,14 +106,14 @@ public class OneHandedGestureHandlerTest extends OneHandedTestCase { } @Test - public void testChangeNavBarTo2Button_shouldDisposeInputChannel() { + public void testChangeNavBarToNon3Button_shouldDisposeInputChannel() { // 1st called at init - verify(mGestureHandler).onOneHandedEnabled(true); + verify(mGestureHandler, atLeastOnce()).onOneHandedEnabled(true); mOneHandedController.setOneHandedEnabled(true); // 2nd called by setOneHandedEnabled() - verify(mGestureHandler, times(2)).onOneHandedEnabled(true); + verify(mGestureHandler, atLeast(2)).onOneHandedEnabled(true); - mGestureHandler.onNavigationModeChanged(NAV_BAR_MODE_2BUTTON); + mGestureHandler.onThreeButtonModeEnabled(false); assertThat(mGestureHandler.mInputMonitor).isNull(); assertThat(mGestureHandler.mInputEventReceiver).isNull(); diff --git a/packages/SystemUI/tests/src/com/android/systemui/onehanded/OneHandedTestCase.java b/packages/SystemUI/tests/src/com/android/systemui/onehanded/OneHandedTestCase.java index 04ebf25e1b49..f111c4896458 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/onehanded/OneHandedTestCase.java +++ b/packages/SystemUI/tests/src/com/android/systemui/onehanded/OneHandedTestCase.java @@ -16,8 +16,12 @@ package com.android.systemui.onehanded; +import static com.android.systemui.onehanded.OneHandedController.SUPPORT_ONE_HANDED_MODE; import static com.android.systemui.onehanded.OneHandedSettingsUtil.ONE_HANDED_TIMEOUT_MEDIUM_IN_SECONDS; +import static org.junit.Assume.assumeTrue; + +import android.os.SystemProperties; import android.provider.Settings; import com.android.systemui.SysuiTestCase; @@ -54,6 +58,11 @@ public abstract class OneHandedTestCase extends SysuiTestCase { Settings.Secure.SWIPE_BOTTOM_TO_NOTIFICATION_ENABLED, 1); } + @Before + public void assumeOneHandedModeSupported() { + assumeTrue(SystemProperties.getBoolean(SUPPORT_ONE_HANDED_MODE, false)); + } + @After public void restoreSettings() { Settings.Secure.putInt(getContext().getContentResolver(), diff --git a/packages/SystemUI/tests/src/com/android/systemui/onehanded/OneHandedTouchHandlerTest.java b/packages/SystemUI/tests/src/com/android/systemui/onehanded/OneHandedTouchHandlerTest.java index 3c3ace052e47..1e408313a36e 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/onehanded/OneHandedTouchHandlerTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/onehanded/OneHandedTouchHandlerTest.java @@ -19,7 +19,8 @@ package com.android.systemui.onehanded; import static com.google.common.truth.Truth.assertThat; import static org.mockito.ArgumentMatchers.any; -import static org.mockito.Mockito.times; +import static org.mockito.Mockito.atLeast; +import static org.mockito.Mockito.atLeastOnce; import static org.mockito.Mockito.verify; import android.testing.AndroidTestingRunner; @@ -27,9 +28,6 @@ import android.testing.TestableLooper; import androidx.test.filters.SmallTest; -import com.android.systemui.model.SysUiState; -import com.android.systemui.navigationbar.NavigationModeController; -import com.android.systemui.statusbar.CommandQueue; import com.android.wm.shell.common.DisplayController; import org.junit.Before; @@ -48,31 +46,22 @@ public class OneHandedTouchHandlerTest extends OneHandedTestCase { OneHandedGestureHandler mGestureHandler; OneHandedController mOneHandedController; @Mock - CommandQueue mCommandQueue; - @Mock DisplayController mMockDisplayController; @Mock - NavigationModeController mMockNavigationModeController; - @Mock OneHandedDisplayAreaOrganizer mMockDisplayAreaOrganizer; - @Mock - SysUiState mMockSysUiState; @Before public void setUp() { MockitoAnnotations.initMocks(this); mTouchHandler = Mockito.spy(new OneHandedTouchHandler()); - mGestureHandler = new OneHandedGestureHandler(mContext, mMockDisplayController, - mMockNavigationModeController); + mGestureHandler = new OneHandedGestureHandler(mContext, mMockDisplayController); mOneHandedController = new OneHandedController( getContext(), - mCommandQueue, mMockDisplayController, mMockDisplayAreaOrganizer, mTouchHandler, mTutorialHandler, - mGestureHandler, - mMockSysUiState); + mGestureHandler); } @Test @@ -102,10 +91,10 @@ public class OneHandedTouchHandlerTest extends OneHandedTestCase { @Test public void testReceiveNewConfig_whenSetOneHandedEnabled() { - // 1st called at init - verify(mTouchHandler).onOneHandedEnabled(true); + // Called at init + verify(mTouchHandler, atLeastOnce()).onOneHandedEnabled(true); mOneHandedController.setOneHandedEnabled(true); - // 2nd called by setOneHandedEnabled() - verify(mTouchHandler, times(2)).onOneHandedEnabled(true); + // Called by setOneHandedEnabled() + verify(mTouchHandler, atLeast(2)).onOneHandedEnabled(true); } } diff --git a/packages/SystemUI/tests/src/com/android/systemui/onehanded/OneHandedTutorialHandlerTest.java b/packages/SystemUI/tests/src/com/android/systemui/onehanded/OneHandedTutorialHandlerTest.java index 1bffbf7eb8dd..8ea5524eb7e6 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/onehanded/OneHandedTutorialHandlerTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/onehanded/OneHandedTutorialHandlerTest.java @@ -23,9 +23,6 @@ import android.testing.TestableLooper; import androidx.test.filters.SmallTest; -import com.android.systemui.model.SysUiState; -import com.android.systemui.navigationbar.NavigationModeController; -import com.android.systemui.statusbar.CommandQueue; import com.android.wm.shell.common.DisplayController; import org.junit.Before; @@ -44,32 +41,23 @@ public class OneHandedTutorialHandlerTest extends OneHandedTestCase { OneHandedGestureHandler mGestureHandler; OneHandedController mOneHandedController; @Mock - CommandQueue mCommandQueue; - @Mock DisplayController mMockDisplayController; @Mock - NavigationModeController mMockNavigationModeController; - @Mock OneHandedDisplayAreaOrganizer mMockDisplayAreaOrganizer; - @Mock - SysUiState mMockSysUiState; @Before public void setUp() { MockitoAnnotations.initMocks(this); mTouchHandler = new OneHandedTouchHandler(); mTutorialHandler = Mockito.spy(new OneHandedTutorialHandler(mContext)); - mGestureHandler = new OneHandedGestureHandler(mContext, mMockDisplayController, - mMockNavigationModeController); + mGestureHandler = new OneHandedGestureHandler(mContext, mMockDisplayController); mOneHandedController = new OneHandedController( getContext(), - mCommandQueue, mMockDisplayController, mMockDisplayAreaOrganizer, mTouchHandler, mTutorialHandler, - mGestureHandler, - mMockSysUiState); + mGestureHandler); } @Test diff --git a/packages/SystemUI/tests/src/com/android/systemui/onehanded/OneHandedUITest.java b/packages/SystemUI/tests/src/com/android/systemui/onehanded/OneHandedUITest.java deleted file mode 100644 index ae3df5db30bc..000000000000 --- a/packages/SystemUI/tests/src/com/android/systemui/onehanded/OneHandedUITest.java +++ /dev/null @@ -1,136 +0,0 @@ -/* - * Copyright (C) 2020 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.android.systemui.onehanded; - -import static org.junit.Assume.assumeTrue; -import static org.mockito.Mockito.verify; - -import android.os.SystemProperties; -import android.provider.Settings; -import android.testing.AndroidTestingRunner; -import android.testing.TestableLooper; - -import androidx.test.filters.SmallTest; - -import com.android.keyguard.KeyguardUpdateMonitor; -import com.android.systemui.keyguard.ScreenLifecycle; -import com.android.systemui.statusbar.CommandQueue; - -import org.junit.Before; -import org.junit.Ignore; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.mockito.Mock; -import org.mockito.MockitoAnnotations; - -@SmallTest -@RunWith(AndroidTestingRunner.class) -@TestableLooper.RunWithLooper -public class OneHandedUITest extends OneHandedTestCase { - private static final String SUPPORT_ONE_HANDED_MODE = "ro.support_one_handed_mode"; - - CommandQueue mCommandQueue; - KeyguardUpdateMonitor mKeyguardUpdateMonitor; - OneHandedUI mOneHandedUI; - ScreenLifecycle mScreenLifecycle; - @Mock - OneHandedController mOneHandedController; - @Mock - OneHandedTimeoutHandler mMockTimeoutHandler; - - @Before - public void setUp() throws Exception { - MockitoAnnotations.initMocks(this); - mCommandQueue = new CommandQueue(mContext); - mScreenLifecycle = new ScreenLifecycle(); - mOneHandedUI = new OneHandedUI(mContext, - mCommandQueue, - mOneHandedController, - mScreenLifecycle); - mOneHandedUI.start(); - mKeyguardUpdateMonitor = mDependency.injectMockDependency(KeyguardUpdateMonitor.class); - } - - @Before - public void assumeOneHandedModeSupported() { - assumeTrue(SystemProperties.getBoolean(SUPPORT_ONE_HANDED_MODE, false)); - } - - @Test - public void testStartOneHanded() { - mOneHandedUI.startOneHanded(); - - verify(mOneHandedController).startOneHanded(); - } - - @Test - public void testStopOneHanded() { - mOneHandedUI.stopOneHanded(); - - verify(mOneHandedController).stopOneHanded(); - } - - @Test - public void tesSettingsObserver_updateTapAppToExit() { - Settings.Secure.putInt(mContext.getContentResolver(), - Settings.Secure.TAPS_APP_TO_EXIT, 1); - - verify(mOneHandedController).setTaskChangeToExit(true); - } - - @Test - public void tesSettingsObserver_updateEnabled() { - Settings.Secure.putInt(mContext.getContentResolver(), - Settings.Secure.ONE_HANDED_MODE_ENABLED, 1); - - verify(mOneHandedController).setOneHandedEnabled(true); - } - - @Test - public void tesSettingsObserver_updateTimeout() { - Settings.Secure.putInt(mContext.getContentResolver(), - Settings.Secure.ONE_HANDED_MODE_TIMEOUT, - OneHandedSettingsUtil.ONE_HANDED_TIMEOUT_MEDIUM_IN_SECONDS); - - verify(mMockTimeoutHandler).setTimeout( - OneHandedSettingsUtil.ONE_HANDED_TIMEOUT_MEDIUM_IN_SECONDS); - } - - @Test - public void tesSettingsObserver_updateSwipeToNotification() { - Settings.Secure.putInt(mContext.getContentResolver(), - Settings.Secure.SWIPE_BOTTOM_TO_NOTIFICATION_ENABLED, 1); - - verify(mOneHandedController).setSwipeToNotificationEnabled(true); - } - - @Ignore("Clarifying do not receive callback") - @Test - public void testKeyguardBouncerShowing_shouldStopOneHanded() { - mKeyguardUpdateMonitor.sendKeyguardBouncerChanged(true); - - verify(mOneHandedController).stopOneHanded(); - } - - @Test - public void testScreenTurningOff_shouldStopOneHanded() { - mScreenLifecycle.dispatchScreenTurningOff(); - - verify(mOneHandedController).stopOneHanded(); - } - -} diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NotificationPanelViewTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NotificationPanelViewTest.java index cf64ff2f8cd6..7ee27c9a8aab 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NotificationPanelViewTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NotificationPanelViewTest.java @@ -62,7 +62,6 @@ import com.android.systemui.doze.DozeLog; import com.android.systemui.media.MediaHierarchyManager; import com.android.systemui.plugins.FalsingManager; import com.android.systemui.statusbar.CommandQueue; -import com.android.systemui.statusbar.FlingAnimationUtils; import com.android.systemui.statusbar.KeyguardAffordanceView; import com.android.systemui.statusbar.NotificationLockscreenUserManager; import com.android.systemui.statusbar.NotificationShelfController; @@ -81,6 +80,7 @@ import com.android.systemui.statusbar.notification.stack.NotificationStackScroll import com.android.systemui.statusbar.policy.ConfigurationController; import com.android.systemui.statusbar.policy.KeyguardStateController; import com.android.systemui.util.InjectionInflationController; +import com.android.wm.shell.animation.FlingAnimationUtils; import org.junit.Before; import org.junit.Test; @@ -192,8 +192,6 @@ public class NotificationPanelViewTest extends SysuiTestCase { @Mock private NotificationStackScrollLayoutController mNotificationStackScrollLayoutController; - private FlingAnimationUtils.Builder mFlingAnimationUtilsBuilder; - private NotificationPanelViewController mNotificationPanelViewController; private View.AccessibilityDelegate mAccessibiltyDelegate; diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarTest.java index 5143596f0214..7d8a62607395 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarTest.java @@ -96,7 +96,6 @@ import com.android.systemui.plugins.statusbar.StatusBarStateController; import com.android.systemui.recents.Recents; import com.android.systemui.recents.ScreenPinningRequest; import com.android.systemui.shared.plugins.PluginManager; -import com.android.systemui.stackdivider.SplitScreen; import com.android.systemui.statusbar.CommandQueue; import com.android.systemui.statusbar.KeyguardIndicationController; import com.android.systemui.statusbar.NotificationListener; @@ -143,6 +142,7 @@ import com.android.systemui.statusbar.policy.UserSwitcherController; import com.android.systemui.util.concurrency.FakeExecutor; import com.android.systemui.util.time.FakeSystemClock; import com.android.systemui.volume.VolumeComponent; +import com.android.wm.shell.splitscreen.SplitScreen; import org.junit.Before; import org.junit.Test; diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/NetworkControllerDataTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/NetworkControllerDataTest.java index d8aa29e9f766..68992179de59 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/NetworkControllerDataTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/NetworkControllerDataTest.java @@ -3,6 +3,8 @@ package com.android.systemui.statusbar.policy; import static android.telephony.AccessNetworkConstants.TRANSPORT_TYPE_WWAN; import static android.telephony.NetworkRegistrationInfo.DOMAIN_PS; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; import static org.mockito.Matchers.anyInt; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; @@ -10,6 +12,7 @@ import static org.mockito.Mockito.when; import android.net.NetworkCapabilities; import android.os.Looper; import android.telephony.NetworkRegistrationInfo; +import android.telephony.ServiceState; import android.telephony.TelephonyManager; import android.test.suitebuilder.annotation.SmallTest; import android.testing.AndroidTestingRunner; @@ -259,6 +262,25 @@ public class NetworkControllerDataTest extends NetworkControllerBaseTest { assertDataNetworkNameEquals(newDataName); } + @Test + public void testIsDataInService_true() { + setupDefaultSignal(); + assertTrue(mNetworkController.isMobileDataNetworkInService()); + } + + @Test + public void testIsDataInService_noSignal_false() { + assertFalse(mNetworkController.isMobileDataNetworkInService()); + } + + @Test + public void testIsDataInService_notInService_false() { + setupDefaultSignal(); + setVoiceRegState(ServiceState.STATE_OUT_OF_SERVICE); + setDataRegState(ServiceState.STATE_OUT_OF_SERVICE); + assertFalse(mNetworkController.isMobileDataNetworkInService()); + } + private void testDataActivity(int direction, boolean in, boolean out) { updateDataActivity(direction); diff --git a/packages/SystemUI/tests/src/com/android/systemui/utils/leaks/FakeNetworkController.java b/packages/SystemUI/tests/src/com/android/systemui/utils/leaks/FakeNetworkController.java index d5ba381bfcac..e7acfae24f30 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/utils/leaks/FakeNetworkController.java +++ b/packages/SystemUI/tests/src/com/android/systemui/utils/leaks/FakeNetworkController.java @@ -95,6 +95,11 @@ public class FakeNetworkController extends BaseLeakChecker<SignalCallback> } @Override + public boolean isMobileDataNetworkInService() { + return false; + } + + @Override public int getNumberSubscriptions() { return 0; } diff --git a/packages/SystemUI/tests/src/com/android/systemui/wmshell/WMShellTest.java b/packages/SystemUI/tests/src/com/android/systemui/wmshell/WMShellTest.java index 2f3c86dfc8ae..51cc5f175444 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/wmshell/WMShellTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/wmshell/WMShellTest.java @@ -16,25 +16,30 @@ package com.android.systemui.wmshell; -import static org.mockito.Mockito.times; +import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; -import android.app.Instrumentation; -import android.content.Context; import android.test.suitebuilder.annotation.SmallTest; -import androidx.test.InstrumentationRegistry; import androidx.test.runner.AndroidJUnit4; import com.android.keyguard.KeyguardUpdateMonitor; +import com.android.keyguard.KeyguardUpdateMonitorCallback; import com.android.systemui.SysuiTestCase; +import com.android.systemui.keyguard.ScreenLifecycle; +import com.android.systemui.model.SysUiState; +import com.android.systemui.navigationbar.NavigationModeController; +import com.android.systemui.onehanded.OneHanded; +import com.android.systemui.onehanded.OneHandedGestureHandler; +import com.android.systemui.onehanded.OneHandedTransitionCallback; import com.android.systemui.pip.Pip; -import com.android.systemui.pip.tv.PipController; -import com.android.systemui.stackdivider.SplitScreen; +import com.android.systemui.shared.system.ActivityManagerWrapper; +import com.android.systemui.shared.system.TaskStackChangeListener; import com.android.systemui.statusbar.CommandQueue; import com.android.systemui.tracing.ProtoTracer; import com.android.wm.shell.common.DisplayImeController; +import com.android.wm.shell.splitscreen.SplitScreen; import org.junit.Before; import org.junit.Test; @@ -48,29 +53,66 @@ import java.util.Optional; @RunWith(AndroidJUnit4.class) public class WMShellTest extends SysuiTestCase { - Instrumentation mInstrumentation; WMShell mWMShell; - @Mock Context mContext; @Mock CommandQueue mCommandQueue; @Mock KeyguardUpdateMonitor mKeyguardUpdateMonitor; + @Mock ActivityManagerWrapper mActivityManagerWrapper; @Mock DisplayImeController mDisplayImeController; - @Mock Optional<Pip> mPipOptional; - @Mock Optional<SplitScreen> mSplitScreenOptional; - @Mock PipController mPipController; + @Mock NavigationModeController mNavigationModeController; + @Mock ScreenLifecycle mScreenLifecycle; + @Mock SysUiState mSysUiState; + @Mock Pip mPip; + @Mock SplitScreen mSplitScreen; + @Mock OneHanded mOneHanded; @Mock ProtoTracer mProtoTracer; @Before - public void setUp() throws Exception { - mInstrumentation = InstrumentationRegistry.getInstrumentation(); + public void setUp() { MockitoAnnotations.initMocks(this); mWMShell = new WMShell(mContext, mCommandQueue, mKeyguardUpdateMonitor, - mDisplayImeController, mPipOptional, mSplitScreenOptional, mProtoTracer); + mActivityManagerWrapper, mDisplayImeController, mNavigationModeController, + mScreenLifecycle, mSysUiState, Optional.of(mPip), Optional.of(mSplitScreen), + Optional.of(mOneHanded), mProtoTracer); + } + + @Test + public void start_startsMonitorDisplays() { mWMShell.start(); - when(mPipOptional.get()).thenReturn(mPipController); + + verify(mDisplayImeController).startMonitorDisplays(); + } + + @Test + public void initPip_registersCommandQueueCallback() { + mWMShell.initPip(mPip); + + verify(mCommandQueue).addCallback(any(CommandQueue.Callbacks.class)); } @Test - public void testWMShellRegisterCommandQueue() { - verify(mCommandQueue, times(1)).addCallback(mWMShell); + public void initSplitScreen_registersCallbacks() { + mWMShell.initSplitScreen(mSplitScreen); + + verify(mKeyguardUpdateMonitor).registerCallback(any(KeyguardUpdateMonitorCallback.class)); + verify(mActivityManagerWrapper).registerTaskStackListener( + any(TaskStackChangeListener.class)); + } + + @Test + public void initOneHanded_registersCallbacks() { + when(mOneHanded.hasOneHandedFeature()).thenReturn(true); + mWMShell.initOneHanded(mOneHanded); + + verify(mKeyguardUpdateMonitor).registerCallback(any(KeyguardUpdateMonitorCallback.class)); + verify(mCommandQueue).addCallback(any(CommandQueue.Callbacks.class)); + verify(mScreenLifecycle).addObserver(any(ScreenLifecycle.Observer.class)); + verify(mNavigationModeController).addListener( + any(NavigationModeController.ModeChangedListener.class)); + verify(mActivityManagerWrapper).registerTaskStackListener( + any(TaskStackChangeListener.class)); + + verify(mOneHanded).registerGestureCallback(any( + OneHandedGestureHandler.OneHandedGestureEventCallback.class)); + verify(mOneHanded).registerTransitionCallback(any(OneHandedTransitionCallback.class)); } } diff --git a/packages/Tethering/common/TetheringLib/Android.bp b/packages/Tethering/common/TetheringLib/Android.bp index c8becce7be82..bf643cdcecc5 100644 --- a/packages/Tethering/common/TetheringLib/Android.bp +++ b/packages/Tethering/common/TetheringLib/Android.bp @@ -16,19 +16,9 @@ java_sdk_library { name: "framework-tethering", defaults: ["framework-module-defaults"], + impl_library_visibility: ["//frameworks/base/packages/Tethering:__subpackages__"], - // Allow access to the stubs from anywhere. - visibility: ["//visibility:public"], - - // Restrict access to implementation library. - impl_library_visibility: [ - "//visibility:override", // Ignore the visibility property. - "//frameworks/base/packages/Tethering:__subpackages__", - ], - - srcs: [ - ":framework-tethering-srcs", - ], + srcs: [":framework-tethering-srcs"], jarjar_rules: "jarjar-rules.txt", installable: true, diff --git a/services/backup/java/com/android/server/backup/restore/FullRestoreEngine.java b/services/backup/java/com/android/server/backup/restore/FullRestoreEngine.java index b9625397d237..16077cb6082f 100644 --- a/services/backup/java/com/android/server/backup/restore/FullRestoreEngine.java +++ b/services/backup/java/com/android/server/backup/restore/FullRestoreEngine.java @@ -228,7 +228,7 @@ public class FullRestoreEngine extends RestoreEngine { PackageManagerInternal.class); RestorePolicy restorePolicy = tarBackupReader.chooseRestorePolicy( mBackupManagerService.getPackageManager(), allowApks, info, signatures, - pmi, mUserId); + pmi, mUserId, mBackupEligibilityRules); mManifestSignatures.put(info.packageName, signatures); mPackagePolicies.put(pkg, restorePolicy); mPackageInstallers.put(pkg, info.installerPackageName); diff --git a/services/backup/java/com/android/server/backup/utils/TarBackupReader.java b/services/backup/java/com/android/server/backup/utils/TarBackupReader.java index 3789fa14e87b..6963248734a3 100644 --- a/services/backup/java/com/android/server/backup/utils/TarBackupReader.java +++ b/services/backup/java/com/android/server/backup/utils/TarBackupReader.java @@ -389,13 +389,29 @@ public class TarBackupReader { public RestorePolicy chooseRestorePolicy(PackageManager packageManager, boolean allowApks, FileMetadata info, Signature[] signatures, PackageManagerInternal pmi, int userId) { + return chooseRestorePolicy(packageManager, allowApks, info, signatures, pmi, userId, + BackupEligibilityRules.forBackup(packageManager, pmi, userId)); + } + + /** + * Chooses restore policy. + * + * @param packageManager - PackageManager instance. + * @param allowApks - allow restore set to include apks. + * @param info - file metadata. + * @param signatures - array of signatures parsed from backup file. + * @param userId - ID of the user for which restore is performed. + * @param eligibilityRules - {@link BackupEligibilityRules} for this operation. + * @return a restore policy constant. + */ + public RestorePolicy chooseRestorePolicy(PackageManager packageManager, + boolean allowApks, FileMetadata info, Signature[] signatures, + PackageManagerInternal pmi, int userId, BackupEligibilityRules eligibilityRules) { if (signatures == null) { return RestorePolicy.IGNORE; } RestorePolicy policy = RestorePolicy.IGNORE; - BackupEligibilityRules eligibilityRules = BackupEligibilityRules.forBackup(packageManager, - pmi, userId); // Okay, got the manifest info we need... try { PackageInfo pkgInfo = packageManager.getPackageInfoAsUser( diff --git a/services/core/java/com/android/server/BluetoothManagerService.java b/services/core/java/com/android/server/BluetoothManagerService.java index f372c6f85ec6..0d79240a4b59 100644 --- a/services/core/java/com/android/server/BluetoothManagerService.java +++ b/services/core/java/com/android/server/BluetoothManagerService.java @@ -166,6 +166,7 @@ class BluetoothManagerService extends IBluetoothManager.Stub { private String mAddress; private String mName; private final ContentResolver mContentResolver; + private final int mUserId; private final RemoteCallbackList<IBluetoothManagerCallback> mCallbacks; private final RemoteCallbackList<IBluetoothStateChangeCallback> mStateChangeCallbacks; private IBinder mBluetoothBinder; @@ -481,6 +482,7 @@ class BluetoothManagerService extends IBluetoothManager.Stub { mName = null; mErrorRecoveryRetryCounter = 0; mContentResolver = context.getContentResolver(); + mUserId = mContentResolver.getUserId(); // Observe BLE scan only mode settings change. registerForBleScanModeChange(); mCallbacks = new RemoteCallbackList<IBluetoothManagerCallback>(); @@ -625,7 +627,8 @@ class BluetoothManagerService extends IBluetoothManager.Stub { } if (mContext.getResources() .getBoolean(com.android.internal.R.bool.config_bluetooth_address_validation) - && Settings.Secure.getInt(mContentResolver, SECURE_SETTINGS_BLUETOOTH_ADDR_VALID, 0) + && Settings.Secure.getIntForUser(mContentResolver, + SECURE_SETTINGS_BLUETOOTH_ADDR_VALID, 0, mUserId) == 0) { // if the valid flag is not set, don't load the address and name if (DBG) { @@ -633,8 +636,10 @@ class BluetoothManagerService extends IBluetoothManager.Stub { } return; } - mName = Settings.Secure.getString(mContentResolver, SECURE_SETTINGS_BLUETOOTH_NAME); - mAddress = Settings.Secure.getString(mContentResolver, SECURE_SETTINGS_BLUETOOTH_ADDRESS); + mName = Settings.Secure.getStringForUser( + mContentResolver, SECURE_SETTINGS_BLUETOOTH_NAME, mUserId); + mAddress = Settings.Secure.getStringForUser( + mContentResolver, SECURE_SETTINGS_BLUETOOTH_ADDRESS, mUserId); if (DBG) { Slog.d(TAG, "Stored bluetooth Name=" + mName + ",Address=" + mAddress); } @@ -648,26 +653,31 @@ class BluetoothManagerService extends IBluetoothManager.Stub { */ private void storeNameAndAddress(String name, String address) { if (name != null) { - Settings.Secure.putString(mContentResolver, SECURE_SETTINGS_BLUETOOTH_NAME, name); + Settings.Secure.putStringForUser(mContentResolver, SECURE_SETTINGS_BLUETOOTH_NAME, name, + mUserId); mName = name; if (DBG) { - Slog.d(TAG, "Stored Bluetooth name: " + Settings.Secure.getString(mContentResolver, - SECURE_SETTINGS_BLUETOOTH_NAME)); + Slog.d(TAG, "Stored Bluetooth name: " + Settings.Secure.getStringForUser( + mContentResolver, SECURE_SETTINGS_BLUETOOTH_NAME, + mUserId)); } } if (address != null) { - Settings.Secure.putString(mContentResolver, SECURE_SETTINGS_BLUETOOTH_ADDRESS, address); + Settings.Secure.putStringForUser(mContentResolver, SECURE_SETTINGS_BLUETOOTH_ADDRESS, + address, mUserId); mAddress = address; if (DBG) { Slog.d(TAG, - "Stored Bluetoothaddress: " + Settings.Secure.getString(mContentResolver, - SECURE_SETTINGS_BLUETOOTH_ADDRESS)); + "Stored Bluetoothaddress: " + Settings.Secure.getStringForUser( + mContentResolver, SECURE_SETTINGS_BLUETOOTH_ADDRESS, + mUserId)); } } if ((name != null) && (address != null)) { - Settings.Secure.putInt(mContentResolver, SECURE_SETTINGS_BLUETOOTH_ADDR_VALID, 1); + Settings.Secure.putIntForUser(mContentResolver, SECURE_SETTINGS_BLUETOOTH_ADDR_VALID, 1, + mUserId); } } diff --git a/services/core/java/com/android/server/DynamicSystemService.java b/services/core/java/com/android/server/DynamicSystemService.java index b09b2605a791..500e768372f5 100644 --- a/services/core/java/com/android/server/DynamicSystemService.java +++ b/services/core/java/com/android/server/DynamicSystemService.java @@ -126,6 +126,16 @@ public class DynamicSystemService extends IDynamicSystemService.Stub { } @Override + public boolean closePartition() throws RemoteException { + IGsiService service = getGsiService(); + if (service.closePartition() != 0) { + Slog.i(TAG, "Partition installation completes with error"); + return false; + } + return true; + } + + @Override public boolean finishInstallation() throws RemoteException { IGsiService service = getGsiService(); if (service.closeInstall() != 0) { diff --git a/services/core/java/com/android/server/TelephonyRegistry.java b/services/core/java/com/android/server/TelephonyRegistry.java index eb8308b56f2e..e433fbd94d4f 100644 --- a/services/core/java/com/android/server/TelephonyRegistry.java +++ b/services/core/java/com/android/server/TelephonyRegistry.java @@ -64,6 +64,7 @@ import android.telephony.DisconnectCause; import android.telephony.LocationAccessPolicy; import android.telephony.PhoneCapability; import android.telephony.PhoneStateListener; +import android.telephony.PhysicalChannelConfig; import android.telephony.PreciseCallState; import android.telephony.PreciseDataConnectionState; import android.telephony.PreciseDisconnectCause; @@ -142,13 +143,13 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub { int callerUid; int callerPid; - int events; + long events; int subId = SubscriptionManager.INVALID_SUBSCRIPTION_ID; int phoneId = SubscriptionManager.INVALID_SIM_SLOT_INDEX; - boolean matchPhoneStateListenerEvent(int events) { + boolean matchPhoneStateListenerEvent(long events) { return (callback != null) && ((events & this.events) != 0); } @@ -177,7 +178,7 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub { + onSubscriptionsChangedListenerCallback + " onOpportunisticSubscriptionsChangedListenererCallback=" + onOpportunisticSubscriptionsChangedListenerCallback + " subId=" + subId - + " phoneId=" + phoneId + " events=" + Integer.toHexString(events) + "}"; + + " phoneId=" + phoneId + " events=" + Long.toHexString(events) + "}"; } } @@ -306,6 +307,8 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub { private final LocalLog mListenLog = new LocalLog(00); + private List<PhysicalChannelConfig> mPhysicalChannelConfigs; + /** * Per-phone map of precise data connection state. The key of the map is the pair of transport * type and APN setting. This is the cache to prevent redundant callbacks to the listeners. @@ -318,19 +321,19 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub { // Starting in Q, almost all cellular location requires FINE location enforcement. // Prior to Q, cellular was available with COARSE location enforcement. Bits in this // list will be checked for COARSE on apps targeting P or earlier and FINE on Q or later. - static final int ENFORCE_LOCATION_PERMISSION_MASK = + static final long ENFORCE_LOCATION_PERMISSION_MASK = PhoneStateListener.LISTEN_CELL_LOCATION | PhoneStateListener.LISTEN_CELL_INFO | PhoneStateListener.LISTEN_REGISTRATION_FAILURE | PhoneStateListener.LISTEN_BARRING_INFO; - static final int ENFORCE_PHONE_STATE_PERMISSION_MASK = + static final long ENFORCE_PHONE_STATE_PERMISSION_MASK = PhoneStateListener.LISTEN_CALL_FORWARDING_INDICATOR | PhoneStateListener.LISTEN_MESSAGE_WAITING_INDICATOR | PhoneStateListener.LISTEN_EMERGENCY_NUMBER_LIST | PhoneStateListener.LISTEN_DISPLAY_INFO_CHANGED; - static final int ENFORCE_PRECISE_PHONE_STATE_PERMISSION_MASK = + static final long ENFORCE_PRECISE_PHONE_STATE_PERMISSION_MASK = PhoneStateListener.LISTEN_PRECISE_CALL_STATE | PhoneStateListener.LISTEN_PRECISE_DATA_CONNECTION_STATE | PhoneStateListener.LISTEN_CALL_DISCONNECT_CAUSES @@ -339,11 +342,11 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub { | PhoneStateListener.LISTEN_REGISTRATION_FAILURE | PhoneStateListener.LISTEN_BARRING_INFO; - static final int READ_ACTIVE_EMERGENCY_SESSION_PERMISSION_MASK = + static final long READ_ACTIVE_EMERGENCY_SESSION_PERMISSION_MASK = PhoneStateListener.LISTEN_OUTGOING_EMERGENCY_CALL | PhoneStateListener.LISTEN_OUTGOING_EMERGENCY_SMS; - static final int READ_PRIVILEGED_PHONE_STATE_PERMISSION_MASK = + static final long READ_PRIVILEGED_PHONE_STATE_PERMISSION_MASK = PhoneStateListener.LISTEN_OEM_HOOK_RAW_EVENT | PhoneStateListener.LISTEN_SRVCC_STATE_CHANGED | PhoneStateListener.LISTEN_RADIO_POWER_STATE_CHANGED @@ -495,6 +498,7 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub { cutListToSize(mImsReasonInfo, mNumPhones); cutListToSize(mPreciseDataConnectionStates, mNumPhones); cutListToSize(mBarringInfo, mNumPhones); + cutListToSize(mPhysicalChannelConfigs, mNumPhones); return; } @@ -528,6 +532,8 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub { mPreciseDataConnectionStates.add(new ArrayMap<>()); mBarringInfo.add(i, new BarringInfo()); mTelephonyDisplayInfos[i] = null; + mPhysicalChannelConfigs.add(i, new PhysicalChannelConfig( + PhysicalChannelConfig.CONNECTION_UNKNOWN,0)); } } @@ -588,6 +594,7 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub { mOutgoingSmsEmergencyNumber = new EmergencyNumber[numPhones]; mBarringInfo = new ArrayList<>(); mTelephonyDisplayInfos = new TelephonyDisplayInfo[numPhones]; + mPhysicalChannelConfigs = new ArrayList<>(); for (int i = 0; i < numPhones; i++) { mCallState[i] = TelephonyManager.CALL_STATE_IDLE; mDataActivity[i] = TelephonyManager.DATA_ACTIVITY_NONE; @@ -617,6 +624,8 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub { mPreciseDataConnectionStates.add(new ArrayMap<>()); mBarringInfo.add(i, new BarringInfo()); mTelephonyDisplayInfos[i] = null; + mPhysicalChannelConfigs.add(i, new PhysicalChannelConfig( + PhysicalChannelConfig.CONNECTION_UNKNOWN,0)); } mAppOps = mContext.getSystemService(AppOpsManager.class); @@ -795,23 +804,23 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub { @Override public void listenWithFeature(String callingPackage, String callingFeatureId, - IPhoneStateListener callback, int events, boolean notifyNow) { + IPhoneStateListener callback, long events, boolean notifyNow) { listenForSubscriber(SubscriptionManager.DEFAULT_SUBSCRIPTION_ID, callingPackage, callingFeatureId, callback, events, notifyNow); } @Override public void listenForSubscriber(int subId, String callingPackage, String callingFeatureId, - IPhoneStateListener callback, int events, boolean notifyNow) { + IPhoneStateListener callback, long events, boolean notifyNow) { listen(callingPackage, callingFeatureId, callback, events, notifyNow, subId); } private void listen(String callingPackage, @Nullable String callingFeatureId, - IPhoneStateListener callback, int events, boolean notifyNow, int subId) { + IPhoneStateListener callback, long events, boolean notifyNow, int subId) { int callerUserId = UserHandle.getCallingUserId(); mAppOps.checkPackage(Binder.getCallingUid(), callingPackage); String str = "listen: E pkg=" + pii(callingPackage) + " uid=" + Binder.getCallingUid() - + " events=0x" + Integer.toHexString(events) + " notifyNow=" + notifyNow + " subId=" + + " events=0x" + Long.toHexString(events) + " notifyNow=" + notifyNow + " subId=" + subId + " myUserId=" + UserHandle.myUserId() + " callerUserId=" + callerUserId; mListenLog.log(str); if (VDBG) { @@ -1098,6 +1107,14 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub { remove(r.binder); } } + if ((events & PhoneStateListener.LISTEN_PHYSICAL_CHANNEL_CONFIGURATION) != 0) { + try { + r.callback.onPhysicalChannelConfigurationChanged( + mPhysicalChannelConfigs); + } catch (RemoteException ex) { + remove(r.binder); + } + } } } } else { @@ -2258,6 +2275,47 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub { } } + /** + * Send a notification to registrants that the configs of physical channel has changed for + * a particular subscription. + * + * @param subId the subId + * @param configs a list of {@link PhysicalChannelConfig}, the configs of physical channel. + */ + public void notifyPhysicalChannelConfigurationForSubscriber( + int subId, List<PhysicalChannelConfig> configs) { + if (!checkNotifyPermission("notifyPhysicalChannelConfiguration()")) { + return; + } + + if (VDBG) { + log("notifyPhysicalChannelConfiguration: subId=" + subId + " configs=" + configs); + } + + synchronized (mRecords) { + int phoneId = SubscriptionManager.getPhoneId(subId); + if (validatePhoneId(phoneId)) { + mPhysicalChannelConfigs.set(phoneId, configs.get(phoneId)); + for (Record r : mRecords) { + if (r.matchPhoneStateListenerEvent( + PhoneStateListener.LISTEN_PHYSICAL_CHANNEL_CONFIGURATION) + && idMatch(r.subId, subId, phoneId)) { + try { + if (DBG_LOC) { + log("notifyPhysicalChannelConfiguration: " + + "mPhysicalChannelConfigs=" + + configs + " r=" + r); + } + r.callback.onPhysicalChannelConfigurationChanged(configs); + } catch (RemoteException ex) { + mRemoveList.add(r.binder); + } + } + } + } + handleRemoveListLocked(); + } + } @Override public void dump(FileDescriptor fd, PrintWriter writer, String[] args) { @@ -2310,6 +2368,7 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub { pw.println("mEmergencyNumberList=" + mEmergencyNumberList); pw.println("mDefaultPhoneId=" + mDefaultPhoneId); pw.println("mDefaultSubId=" + mDefaultSubId); + pw.println("mPhysicalChannelConfigs=" + mPhysicalChannelConfigs); pw.decreaseIndent(); @@ -2536,7 +2595,7 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub { == PackageManager.PERMISSION_GRANTED; } - private boolean checkListenerPermission(int events, int subId, String callingPackage, + private boolean checkListenerPermission(long events, int subId, String callingPackage, @Nullable String callingFeatureId, String message) { LocationAccessPolicy.LocationPermissionQuery.Builder locationQueryBuilder = new LocationAccessPolicy.LocationPermissionQuery.Builder() @@ -2742,7 +2801,7 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub { } private void checkPossibleMissNotify(Record r, int phoneId) { - int events = r.events; + long events = r.events; if ((events & PhoneStateListener.LISTEN_SERVICE_STATE) != 0) { try { diff --git a/services/core/java/com/android/server/am/ProcessList.java b/services/core/java/com/android/server/am/ProcessList.java index cd3e21052efb..87898d80bd46 100644 --- a/services/core/java/com/android/server/am/ProcessList.java +++ b/services/core/java/com/android/server/am/ProcessList.java @@ -1528,15 +1528,18 @@ public final class ProcessList { && proc.setProcState >= ActivityManager.PROCESS_STATE_CACHED_EMPTY && proc.lastCachedPss >= 4000) { // Turn this condition on to cause killing to happen regularly, for testing. - if (proc.baseProcessTracker != null) { - proc.baseProcessTracker.reportCachedKill(proc.pkgList.mPkgList, proc.lastCachedPss); - for (int ipkg = proc.pkgList.size() - 1; ipkg >= 0; ipkg--) { - ProcessStats.ProcessStateHolder holder = proc.pkgList.valueAt(ipkg); - FrameworkStatsLog.write(FrameworkStatsLog.CACHED_KILL_REPORTED, - proc.info.uid, - holder.state.getName(), - holder.state.getPackage(), - proc.lastCachedPss, holder.appVersion); + synchronized (mService.mProcessStats.mLock) { + if (proc.baseProcessTracker != null) { + proc.baseProcessTracker.reportCachedKill( + proc.pkgList.mPkgList, proc.lastCachedPss); + for (int ipkg = proc.pkgList.size() - 1; ipkg >= 0; ipkg--) { + ProcessStats.ProcessStateHolder holder = proc.pkgList.valueAt(ipkg); + FrameworkStatsLog.write(FrameworkStatsLog.CACHED_KILL_REPORTED, + proc.info.uid, + holder.state.getName(), + holder.state.getPackage(), + proc.lastCachedPss, holder.appVersion); + } } } proc.kill(Long.toString(proc.lastCachedPss) + "k from cached", @@ -1549,16 +1552,18 @@ public final class ProcessList { if (DEBUG_PSS) Slog.d(TAG_PSS, "May not keep " + proc + ": pss=" + proc .lastCachedPss); if (proc.lastCachedPss >= getCachedRestoreThresholdKb()) { - if (proc.baseProcessTracker != null) { - proc.baseProcessTracker.reportCachedKill(proc.pkgList.mPkgList, - proc.lastCachedPss); - for (int ipkg = proc.pkgList.size() - 1; ipkg >= 0; ipkg--) { - ProcessStats.ProcessStateHolder holder = proc.pkgList.valueAt(ipkg); - FrameworkStatsLog.write(FrameworkStatsLog.CACHED_KILL_REPORTED, - proc.info.uid, - holder.state.getName(), - holder.state.getPackage(), - proc.lastCachedPss, holder.appVersion); + synchronized (mService.mProcessStats.mLock) { + if (proc.baseProcessTracker != null) { + proc.baseProcessTracker.reportCachedKill(proc.pkgList.mPkgList, + proc.lastCachedPss); + for (int ipkg = proc.pkgList.size() - 1; ipkg >= 0; ipkg--) { + ProcessStats.ProcessStateHolder holder = proc.pkgList.valueAt(ipkg); + FrameworkStatsLog.write(FrameworkStatsLog.CACHED_KILL_REPORTED, + proc.info.uid, + holder.state.getName(), + holder.state.getPackage(), + proc.lastCachedPss, holder.appVersion); + } } } proc.kill(Long.toString(proc.lastCachedPss) + "k from cached", diff --git a/services/core/java/com/android/server/audio/AudioService.java b/services/core/java/com/android/server/audio/AudioService.java index 4378490d19c5..4378490d19c5 100755..100644 --- a/services/core/java/com/android/server/audio/AudioService.java +++ b/services/core/java/com/android/server/audio/AudioService.java diff --git a/services/core/java/com/android/server/audio/MediaFocusControl.java b/services/core/java/com/android/server/audio/MediaFocusControl.java index bbc29b0bf89b..bbc29b0bf89b 100755..100644 --- a/services/core/java/com/android/server/audio/MediaFocusControl.java +++ b/services/core/java/com/android/server/audio/MediaFocusControl.java diff --git a/services/core/java/com/android/server/biometrics/sensors/face/Face10.java b/services/core/java/com/android/server/biometrics/sensors/face/Face10.java index d9c62df3f3ea..c134a3faca4f 100644 --- a/services/core/java/com/android/server/biometrics/sensors/face/Face10.java +++ b/services/core/java/com/android/server/biometrics/sensors/face/Face10.java @@ -25,12 +25,14 @@ import android.app.UserSwitchObserver; import android.content.Context; import android.content.pm.UserInfo; import android.hardware.biometrics.BiometricConstants; +import android.hardware.biometrics.BiometricFaceConstants; import android.hardware.biometrics.BiometricsProtoEnums; import android.hardware.biometrics.face.V1_0.IBiometricsFace; import android.hardware.biometrics.face.V1_0.IBiometricsFaceClientCallback; import android.hardware.face.Face; import android.hardware.face.FaceSensorProperties; import android.hardware.face.IFaceServiceReceiver; +import android.os.Binder; import android.os.Build; import android.os.Handler; import android.os.IBinder; @@ -109,6 +111,9 @@ class Face10 implements IHwBinder.DeathRecipient { @Override public void onUserSwitching(int newUserId) { scheduleInternalCleanup(newUserId); + scheduleGetFeature(new Binder(), newUserId, + BiometricFaceConstants.FEATURE_REQUIRE_ATTENTION, + null, mContext.getOpPackageName()); } }; @@ -360,6 +365,9 @@ class Face10 implements IHwBinder.DeathRecipient { if (halId != 0) { scheduleLoadAuthenticatorIds(); scheduleInternalCleanup(ActivityManager.getCurrentUser()); + scheduleGetFeature(new Binder(), ActivityManager.getCurrentUser(), + BiometricFaceConstants.FEATURE_REQUIRE_ATTENTION, + null, mContext.getOpPackageName()); } else { Slog.e(TAG, "Unable to set callback"); mDaemon = null; @@ -450,7 +458,7 @@ class Face10 implements IHwBinder.DeathRecipient { } void scheduleGetFeature(@NonNull IBinder token, int userId, int feature, - @NonNull IFaceServiceReceiver receiver, @NonNull String opPackageName) { + @Nullable ClientMonitorCallbackConverter listener, @NonNull String opPackageName) { mHandler.post(() -> { final List<Face> faces = getEnrolledFaces(userId); if (faces.isEmpty()) { @@ -461,10 +469,22 @@ class Face10 implements IHwBinder.DeathRecipient { scheduleUpdateActiveUserWithoutHandler(userId); final int faceId = faces.get(0).getBiometricId(); - final FaceGetFeatureClient client = new FaceGetFeatureClient(mContext, - mLazyDaemon, token, new ClientMonitorCallbackConverter(receiver), userId, - opPackageName, mSensorId, feature, faceId); - mScheduler.scheduleClientMonitor(client); + final FaceGetFeatureClient client = new FaceGetFeatureClient(mContext, mLazyDaemon, + token, listener, userId, opPackageName, mSensorId, feature, faceId); + mScheduler.scheduleClientMonitor(client, new ClientMonitor.Callback() { + @Override + public void onClientFinished( + @NonNull ClientMonitor<?> clientMonitor, boolean success) { + if (success && feature == BiometricFaceConstants.FEATURE_REQUIRE_ATTENTION) { + final int settingsValue = client.getValue() ? 1 : 0; + Slog.d(TAG, "Updating attention value for user: " + userId + + " to value: " + settingsValue); + Settings.Secure.putIntForUser(mContext.getContentResolver(), + Settings.Secure.FACE_UNLOCK_ATTENTION_REQUIRED, + settingsValue, userId); + } + } + }); }); } diff --git a/services/core/java/com/android/server/biometrics/sensors/face/FaceGetFeatureClient.java b/services/core/java/com/android/server/biometrics/sensors/face/FaceGetFeatureClient.java index 8c7b99d6eb52..33b2b6ada24c 100644 --- a/services/core/java/com/android/server/biometrics/sensors/face/FaceGetFeatureClient.java +++ b/services/core/java/com/android/server/biometrics/sensors/face/FaceGetFeatureClient.java @@ -17,6 +17,7 @@ package com.android.server.biometrics.sensors.face; import android.annotation.NonNull; +import android.annotation.Nullable; import android.content.Context; import android.hardware.biometrics.BiometricsProtoEnums; import android.hardware.biometrics.face.V1_0.IBiometricsFace; @@ -39,9 +40,10 @@ public class FaceGetFeatureClient extends ClientMonitor<IBiometricsFace> { private final int mFeature; private final int mFaceId; + private boolean mValue; FaceGetFeatureClient(@NonNull Context context, @NonNull LazyDaemon<IBiometricsFace> lazyDaemon, - @NonNull IBinder token, @NonNull ClientMonitorCallbackConverter listener, int userId, + @NonNull IBinder token, @Nullable ClientMonitorCallbackConverter listener, int userId, @NonNull String owner, int sensorId, int feature, int faceId) { super(context, lazyDaemon, token, listener, userId, owner, 0 /* cookie */, sensorId, BiometricsProtoEnums.MODALITY_UNKNOWN, BiometricsProtoEnums.ACTION_UNKNOWN, @@ -54,7 +56,9 @@ public class FaceGetFeatureClient extends ClientMonitor<IBiometricsFace> { @Override public void unableToStart() { try { - getListener().onFeatureGet(false /* success */, mFeature, false /* value */); + if (getListener() != null) { + getListener().onFeatureGet(false /* success */, mFeature, false /* value */); + } } catch (RemoteException e) { Slog.e(TAG, "Unable to send error", e); } @@ -70,11 +74,18 @@ public class FaceGetFeatureClient extends ClientMonitor<IBiometricsFace> { protected void startHalOperation() { try { final OptionalBool result = getFreshDaemon().getFeature(mFeature, mFaceId); - getListener().onFeatureGet(result.status == Status.OK, mFeature, result.value); + mValue = result.value; + if (getListener() != null) { + getListener().onFeatureGet(result.status == Status.OK, mFeature, mValue); + } mCallback.onClientFinished(this, true /* success */); } catch (RemoteException e) { Slog.e(TAG, "Unable to getFeature", e); mCallback.onClientFinished(this, false /* success */); } } + + boolean getValue() { + return mValue; + } } diff --git a/services/core/java/com/android/server/biometrics/sensors/face/FaceService.java b/services/core/java/com/android/server/biometrics/sensors/face/FaceService.java index b689106bbc44..c6664f4d96ff 100644 --- a/services/core/java/com/android/server/biometrics/sensors/face/FaceService.java +++ b/services/core/java/com/android/server/biometrics/sensors/face/FaceService.java @@ -25,9 +25,9 @@ import android.hardware.biometrics.BiometricsProtoEnums; import android.hardware.biometrics.IBiometricSensorReceiver; import android.hardware.biometrics.IBiometricServiceLockoutResetCallback; import android.hardware.face.Face; +import android.hardware.face.FaceSensorProperties; import android.hardware.face.IFaceService; import android.hardware.face.IFaceServiceReceiver; -import android.hardware.face.FaceSensorProperties; import android.os.Binder; import android.os.IBinder; import android.os.NativeHandle; @@ -303,7 +303,8 @@ public class FaceService extends SystemService { public void getFeature(final IBinder token, int userId, int feature, IFaceServiceReceiver receiver, final String opPackageName) { Utils.checkPermission(getContext(), MANAGE_BIOMETRIC); - mFace10.scheduleGetFeature(token, userId, feature, receiver, opPackageName); + mFace10.scheduleGetFeature(token, userId, feature, + new ClientMonitorCallbackConverter(receiver), opPackageName); } @Override // Binder call diff --git a/services/core/java/com/android/server/clipboard/ClipboardService.java b/services/core/java/com/android/server/clipboard/ClipboardService.java index a0bc7d8954fb..5d2f51230c12 100644 --- a/services/core/java/com/android/server/clipboard/ClipboardService.java +++ b/services/core/java/com/android/server/clipboard/ClipboardService.java @@ -57,10 +57,12 @@ import android.text.TextUtils; import android.util.Slog; import android.util.SparseArray; import android.view.autofill.AutofillManagerInternal; +import android.widget.Toast; import com.android.server.LocalServices; import com.android.server.SystemService; import com.android.server.SystemService.TargetUser; +import com.android.server.UiThread; import com.android.server.contentcapture.ContentCaptureManagerInternal; import com.android.server.uri.UriGrantsManagerInternal; import com.android.server.wm.WindowManagerInternal; @@ -391,7 +393,9 @@ public class ClipboardService extends SystemService { return null; } addActiveOwnerLocked(intendingUid, pkg); - return getClipboard(intendingUserId).primaryClip; + PerUserClipboard clipboard = getClipboard(intendingUserId); + maybeNotify(pkg, intendingUid, intendingUserId, clipboard); + return clipboard.primaryClip; } } @@ -821,4 +825,65 @@ public class ClipboardService extends SystemService { return appOpsResult == AppOpsManager.MODE_ALLOWED; } + + /** + * Potentially notifies the user (via a toast) about an app accessing the clipboard. + * TODO(b/167676460): STOPSHIP as we don't want this code as-is to launch. Just an experiment. + */ + private void maybeNotify(String callingPackage, int uid, @UserIdInt int userId, + PerUserClipboard clipboard) { + if (clipboard.primaryClip == null) { + return; + } + if (Settings.Global.getInt(getContext().getContentResolver(), + "clipboard_access_toast_enabled", 0) == 0) { + return; + } + // Don't notify if the app accessing the clipboard is the same as the current owner. + if (UserHandle.isSameApp(uid, clipboard.primaryClipUid)) { + return; + } + // Exclude some special cases. It's a bit wasteful to check these again here, but for now + // beneficial to have all the logic contained in this single (probably temporary) method. + String defaultIme = Settings.Secure.getStringForUser(getContext().getContentResolver(), + Settings.Secure.DEFAULT_INPUT_METHOD, userId); + if (!TextUtils.isEmpty(defaultIme)) { + final String imePkg = ComponentName.unflattenFromString(defaultIme).getPackageName(); + if (imePkg.equals(callingPackage)) { + return; + } + } + if (mContentCaptureInternal != null + && mContentCaptureInternal.isContentCaptureServiceForUser(uid, userId)) { + return; + } + if (mAutofillInternal != null + && mAutofillInternal.isAugmentedAutofillServiceForUser(uid, userId)) { + return; + } + // Load the labels for the calling app and the app that set the clipboard content. + final long ident = Binder.clearCallingIdentity(); + try { + final IPackageManager pm = AppGlobals.getPackageManager(); + String message; + final CharSequence callingLabel = mPm.getApplicationLabel( + pm.getApplicationInfo(callingPackage, 0, userId)); + final String[] packagesForUid = pm.getPackagesForUid(clipboard.primaryClipUid); + if (packagesForUid != null && packagesForUid.length > 0) { + final CharSequence clipLabel = mPm.getApplicationLabel( + pm.getApplicationInfo(packagesForUid[0], 0, + UserHandle.getUserId(clipboard.primaryClipUid))); + message = callingLabel + " pasted from " + clipLabel; + } else { + message = callingLabel + " pasted from clipboard"; + } + Slog.i(TAG, message); + Toast.makeText(getContext(), UiThread.get().getLooper(), message, Toast.LENGTH_SHORT) + .show(); + } catch (RemoteException e) { + /* ignore */ + } finally { + Binder.restoreCallingIdentity(ident); + } + } } diff --git a/services/core/java/com/android/server/display/DisplayManagerService.java b/services/core/java/com/android/server/display/DisplayManagerService.java index 2c632d96e738..4a12ee71adbe 100644 --- a/services/core/java/com/android/server/display/DisplayManagerService.java +++ b/services/core/java/com/android/server/display/DisplayManagerService.java @@ -83,6 +83,7 @@ import android.os.UserHandle; import android.os.UserManager; import android.provider.Settings; import android.text.TextUtils; +import android.util.EventLog; import android.util.IntArray; import android.util.Pair; import android.util.Slog; @@ -283,6 +284,7 @@ public final class DisplayManagerService extends SystemService { // Temporary display info, used for comparing display configurations. private final DisplayInfo mTempDisplayInfo = new DisplayInfo(); + private final DisplayInfo mTempNonOverrideDisplayInfo = new DisplayInfo(); // Temporary viewports, used when sending new viewport information to the // input system. May be used outside of the lock but only on the handler thread. @@ -507,7 +509,8 @@ public final class DisplayManagerService extends SystemService { mDisplayTransactionListeners.remove(listener); } - private void setDisplayInfoOverrideFromWindowManagerInternal( + @VisibleForTesting + void setDisplayInfoOverrideFromWindowManagerInternal( int displayId, DisplayInfo info) { synchronized (mSyncRoot) { LogicalDisplay display = mLogicalDisplays.get(displayId); @@ -935,7 +938,8 @@ public final class DisplayManagerService extends SystemService { adapter.registerLocked(); } - private void handleDisplayDeviceAdded(DisplayDevice device) { + @VisibleForTesting + void handleDisplayDeviceAdded(DisplayDevice device) { synchronized (mSyncRoot) { handleDisplayDeviceAddedLocked(device); } @@ -947,7 +951,6 @@ public final class DisplayManagerService extends SystemService { Slog.w(TAG, "Attempted to add already added display device: " + info); return; } - Slog.i(TAG, "Display device added: " + info); device.mDebugLastLoggedDeviceInfo = info; @@ -960,7 +963,8 @@ public final class DisplayManagerService extends SystemService { scheduleTraversalLocked(false); } - private void handleDisplayDeviceChanged(DisplayDevice device) { + @VisibleForTesting + void handleDisplayDeviceChanged(DisplayDevice device) { synchronized (mSyncRoot) { DisplayDeviceInfo info = device.getDisplayDeviceInfoLocked(); if (!mDisplayDevices.contains(device)) { @@ -1234,6 +1238,7 @@ public final class DisplayManagerService extends SystemService { LogicalDisplay display = mLogicalDisplays.valueAt(i); mTempDisplayInfo.copyFrom(display.getDisplayInfoLocked()); + display.getNonOverrideDisplayInfoLocked(mTempNonOverrideDisplayInfo); display.updateLocked(mDisplayDevices); if (!display.isValidLocked()) { mLogicalDisplays.removeAt(i); @@ -1242,6 +1247,15 @@ public final class DisplayManagerService extends SystemService { } else if (!mTempDisplayInfo.equals(display.getDisplayInfoLocked())) { handleLogicalDisplayChanged(displayId, display); changed = true; + } else { + // While applications shouldn't know nor care about the non-overridden info, we + // still need to let WindowManager know so it can update its own internal state for + // things like display cutouts. + display.getNonOverrideDisplayInfoLocked(mTempDisplayInfo); + if (!mTempNonOverrideDisplayInfo.equals(mTempDisplayInfo)) { + handleLogicalDisplayChanged(displayId, display); + changed = true; + } } } return changed; @@ -2176,6 +2190,8 @@ public final class DisplayManagerService extends SystemService { if (callingUid != Process.SYSTEM_UID && (flags & VIRTUAL_DISPLAY_FLAG_TRUSTED) != 0) { if (!checkCallingPermission(ADD_TRUSTED_DISPLAY, "createVirtualDisplay()")) { + EventLog.writeEvent(0x534e4554, "162627132", callingUid, + "Attempt to create a trusted display without holding permission!"); throw new SecurityException("Requires ADD_TRUSTED_DISPLAY permission to " + "create a trusted virtual display."); } diff --git a/services/core/java/com/android/server/hdmi/ActiveSourceAction.java b/services/core/java/com/android/server/hdmi/ActiveSourceAction.java index c90f297e1485..179602737985 100644 --- a/services/core/java/com/android/server/hdmi/ActiveSourceAction.java +++ b/services/core/java/com/android/server/hdmi/ActiveSourceAction.java @@ -51,7 +51,7 @@ public class ActiveSourceAction extends HdmiCecFeatureAction { Constants.MENU_STATE_ACTIVATED)); } - source().setActiveSource(logicalAddress, physicalAddress); + source().setActiveSource(logicalAddress, physicalAddress, "ActiveSourceAction"); mState = STATE_FINISHED; finish(); return true; diff --git a/services/core/java/com/android/server/hdmi/ActiveSourceHandler.java b/services/core/java/com/android/server/hdmi/ActiveSourceHandler.java index 01547c16e9b5..8405bbe38b12 100644 --- a/services/core/java/com/android/server/hdmi/ActiveSourceHandler.java +++ b/services/core/java/com/android/server/hdmi/ActiveSourceHandler.java @@ -17,9 +17,9 @@ package com.android.server.hdmi; import android.annotation.Nullable; -import android.hardware.hdmi.IHdmiControlCallback; -import android.hardware.hdmi.HdmiDeviceInfo; import android.hardware.hdmi.HdmiControlManager; +import android.hardware.hdmi.HdmiDeviceInfo; +import android.hardware.hdmi.IHdmiControlCallback; import android.os.RemoteException; import android.util.Slog; @@ -69,7 +69,7 @@ final class ActiveSourceHandler { if (!tv.isProhibitMode()) { ActiveSource old = ActiveSource.of(tv.getActiveSource()); - tv.updateActiveSource(newActive); + tv.updateActiveSource(newActive, "ActiveSourceHandler"); boolean notifyInputChange = (mCallback == null); if (!old.equals(newActive)) { tv.setPrevPortId(tv.getActivePortId()); @@ -85,7 +85,7 @@ final class ActiveSourceHandler { HdmiCecMessage activeSourceCommand = HdmiCecMessageBuilder.buildActiveSource( current.logicalAddress, current.physicalAddress); mService.sendCecCommand(activeSourceCommand); - tv.updateActiveSource(current); + tv.updateActiveSource(current, "ActiveSourceHandler"); invokeCallback(HdmiControlManager.RESULT_SUCCESS); } else { tv.startRoutingControl(newActive.physicalAddress, current.physicalAddress, true, diff --git a/services/core/java/com/android/server/hdmi/HdmiCecController.java b/services/core/java/com/android/server/hdmi/HdmiCecController.java index 66652ca26e54..7dc4d6e8efcf 100644 --- a/services/core/java/com/android/server/hdmi/HdmiCecController.java +++ b/services/core/java/com/android/server/hdmi/HdmiCecController.java @@ -688,16 +688,24 @@ final class HdmiCecController { } void dump(final IndentingPrintWriter pw) { + final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + for (int i = 0; i < mLocalDevices.size(); ++i) { pw.println("HdmiCecLocalDevice #" + mLocalDevices.keyAt(i) + ":"); pw.increaseIndent(); mLocalDevices.valueAt(i).dump(pw); + + pw.println("Active Source history:"); + pw.increaseIndent(); + for (Dumpable activeSourceEvent : mLocalDevices.valueAt(i).getActiveSourceHistory()) { + activeSourceEvent.dump(pw, sdf); + } + pw.decreaseIndent(); pw.decreaseIndent(); } pw.println("CEC message history:"); pw.increaseIndent(); - final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); for (Dumpable record : mMessageHistory) { record.dump(pw, sdf); } @@ -885,7 +893,7 @@ final class HdmiCecController { @Override public void serviceDied(long cookie) { if (cookie == HDMI_CEC_HAL_DEATH_COOKIE) { - HdmiLogger.error(TAG, "Service died cokkie : " + cookie + "; reconnecting"); + HdmiLogger.error("Service died cookie : " + cookie + "; reconnecting"); connectToHal(); } } @@ -917,7 +925,7 @@ final class HdmiCecController { } } - private abstract static class Dumpable { + public abstract static class Dumpable { protected final long mTime; Dumpable() { diff --git a/services/core/java/com/android/server/hdmi/HdmiCecLocalDevice.java b/services/core/java/com/android/server/hdmi/HdmiCecLocalDevice.java index 86e6a3220507..b88a37e7b8b4 100755 --- a/services/core/java/com/android/server/hdmi/HdmiCecLocalDevice.java +++ b/services/core/java/com/android/server/hdmi/HdmiCecLocalDevice.java @@ -38,10 +38,13 @@ import com.android.server.hdmi.Constants.LocalActivePort; import com.android.server.hdmi.HdmiAnnotations.ServiceThreadOnly; import com.android.server.hdmi.HdmiControlService.SendMessageCallback; +import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Collections; +import java.util.Date; import java.util.Iterator; import java.util.List; +import java.util.concurrent.ArrayBlockingQueue; /** * Class that models a logical CEC device hosted in this system. Handles initialization, CEC @@ -50,6 +53,7 @@ import java.util.List; abstract class HdmiCecLocalDevice { private static final String TAG = "HdmiCecLocalDevice"; + private static final int MAX_HDMI_ACTIVE_SOURCE_HISTORY = 10; private static final int MSG_DISABLE_DEVICE_TIMEOUT = 1; private static final int MSG_USER_CONTROL_RELEASE_TIMEOUT = 2; // Timeout in millisecond for device clean up (5s). @@ -68,6 +72,10 @@ abstract class HdmiCecLocalDevice { protected int mLastKeycode = HdmiCecKeycode.UNSUPPORTED_KEYCODE; protected int mLastKeyRepeatCount = 0; + // Stores recent changes to the active source in the CEC network. + private final ArrayBlockingQueue<HdmiCecController.Dumpable> mActiveSourceHistory = + new ArrayBlockingQueue<>(MAX_HDMI_ACTIVE_SOURCE_HISTORY); + static class ActiveSource { int logicalAddress; int physicalAddress; @@ -893,16 +901,16 @@ abstract class HdmiCecLocalDevice { return mService.getLocalActiveSource(); } - void setActiveSource(ActiveSource newActive) { - setActiveSource(newActive.logicalAddress, newActive.physicalAddress); + void setActiveSource(ActiveSource newActive, String caller) { + setActiveSource(newActive.logicalAddress, newActive.physicalAddress, caller); } - void setActiveSource(HdmiDeviceInfo info) { - setActiveSource(info.getLogicalAddress(), info.getPhysicalAddress()); + void setActiveSource(HdmiDeviceInfo info, String caller) { + setActiveSource(info.getLogicalAddress(), info.getPhysicalAddress(), caller); } - void setActiveSource(int logicalAddress, int physicalAddress) { - mService.setActiveSource(logicalAddress, physicalAddress); + void setActiveSource(int logicalAddress, int physicalAddress, String caller) { + mService.setActiveSource(logicalAddress, physicalAddress, caller); mService.setLastInputForMhl(Constants.INVALID_PORT_ID); } @@ -1120,6 +1128,20 @@ abstract class HdmiCecLocalDevice { HdmiCecMessageBuilder.buildUserControlReleased(mAddress, targetAddress)); } + void addActiveSourceHistoryItem(ActiveSource activeSource, boolean isActiveSource, + String caller) { + ActiveSourceHistoryRecord record = new ActiveSourceHistoryRecord(activeSource, + isActiveSource, caller); + if (!mActiveSourceHistory.offer(record)) { + mActiveSourceHistory.poll(); + mActiveSourceHistory.offer(record); + } + } + + public ArrayBlockingQueue<HdmiCecController.Dumpable> getActiveSourceHistory() { + return this.mActiveSourceHistory; + } + /** Dump internal status of HdmiCecLocalDevice object. */ protected void dump(final IndentingPrintWriter pw) { pw.println("mDeviceType: " + mDeviceType); @@ -1152,4 +1174,29 @@ abstract class HdmiCecLocalDevice { } return finalMask | myPhysicalAddress; } + + private static final class ActiveSourceHistoryRecord extends HdmiCecController.Dumpable { + private final ActiveSource mActiveSource; + private final boolean mIsActiveSource; + private final String mCaller; + + private ActiveSourceHistoryRecord(ActiveSource mActiveSource, boolean mIsActiveSource, + String caller) { + this.mActiveSource = mActiveSource; + this.mIsActiveSource = mIsActiveSource; + this.mCaller = caller; + } + + @Override + void dump(final IndentingPrintWriter pw, SimpleDateFormat sdf) { + pw.print("time="); + pw.print(sdf.format(new Date(mTime))); + pw.print(" active source="); + pw.print(mActiveSource); + pw.print(" isActiveSource="); + pw.print(mIsActiveSource); + pw.print(" from="); + pw.println(mCaller); + } + } } diff --git a/services/core/java/com/android/server/hdmi/HdmiCecLocalDeviceAudioSystem.java b/services/core/java/com/android/server/hdmi/HdmiCecLocalDeviceAudioSystem.java index af815973d3c3..68473c1830ae 100644 --- a/services/core/java/com/android/server/hdmi/HdmiCecLocalDeviceAudioSystem.java +++ b/services/core/java/com/android/server/hdmi/HdmiCecLocalDeviceAudioSystem.java @@ -361,7 +361,8 @@ public class HdmiCecLocalDeviceAudioSystem extends HdmiCecLocalDeviceSource { assertRunOnServiceThread(); // Invalidate the internal active source record when goes to standby // This set will also update mIsActiveSource - mService.setActiveSource(Constants.ADDR_INVALID, Constants.INVALID_PHYSICAL_ADDRESS); + mService.setActiveSource(Constants.ADDR_INVALID, Constants.INVALID_PHYSICAL_ADDRESS, + "HdmiCecLocalDeviceAudioSystem#onStandby()"); mTvSystemAudioModeSupport = null; // Record the last state of System Audio Control before going to standby synchronized (mLock) { diff --git a/services/core/java/com/android/server/hdmi/HdmiCecLocalDevicePlayback.java b/services/core/java/com/android/server/hdmi/HdmiCecLocalDevicePlayback.java index d675b81629a4..f2f6dbe9bde5 100644 --- a/services/core/java/com/android/server/hdmi/HdmiCecLocalDevicePlayback.java +++ b/services/core/java/com/android/server/hdmi/HdmiCecLocalDevicePlayback.java @@ -190,7 +190,8 @@ public class HdmiCecLocalDevicePlayback extends HdmiCecLocalDeviceSource { boolean wasActiveSource = mIsActiveSource; // Invalidate the internal active source record when goes to standby // This set will also update mIsActiveSource - mService.setActiveSource(Constants.ADDR_INVALID, Constants.INVALID_PHYSICAL_ADDRESS); + mService.setActiveSource(Constants.ADDR_INVALID, Constants.INVALID_PHYSICAL_ADDRESS, + "HdmiCecLocalDevicePlayback#onStandby()"); if (initiatedByCec || !mAutoTvOff || !wasActiveSource) { return; } @@ -399,7 +400,8 @@ public class HdmiCecLocalDevicePlayback extends HdmiCecLocalDeviceSource { protected void handleRoutingChangeAndInformation(int physicalAddress, HdmiCecMessage message) { assertRunOnServiceThread(); if (physicalAddress != mService.getPhysicalAddress()) { - setActiveSource(physicalAddress); + setActiveSource(physicalAddress, + "HdmiCecLocalDevicePlayback#handleRoutingChangeAndInformation()"); return; } switch (mPlaybackDeviceActionOnRoutingControl) { diff --git a/services/core/java/com/android/server/hdmi/HdmiCecLocalDeviceSource.java b/services/core/java/com/android/server/hdmi/HdmiCecLocalDeviceSource.java index 44ad8eea65ca..4ff36c4b65db 100644 --- a/services/core/java/com/android/server/hdmi/HdmiCecLocalDeviceSource.java +++ b/services/core/java/com/android/server/hdmi/HdmiCecLocalDeviceSource.java @@ -119,11 +119,11 @@ abstract class HdmiCecLocalDeviceSource extends HdmiCecLocalDevice { } @ServiceThreadOnly - protected void setActiveSource(int physicalAddress) { + protected void setActiveSource(int physicalAddress, String caller) { assertRunOnServiceThread(); // Invalidate the internal active source record. This will also update mIsActiveSource. ActiveSource activeSource = ActiveSource.of(Constants.ADDR_INVALID, physicalAddress); - setActiveSource(activeSource); + setActiveSource(activeSource, caller); } @ServiceThreadOnly @@ -133,7 +133,7 @@ abstract class HdmiCecLocalDeviceSource extends HdmiCecLocalDevice { int physicalAddress = HdmiUtils.twoBytesToInt(message.getParams()); ActiveSource activeSource = ActiveSource.of(logicalAddress, physicalAddress); if (!getActiveSource().equals(activeSource)) { - setActiveSource(activeSource); + setActiveSource(activeSource, "HdmiCecLocalDeviceSource#handleActiveSource()"); } setIsActiveSource(physicalAddress == mService.getPhysicalAddress()); updateDevicePowerStatus(logicalAddress, HdmiControlManager.POWER_STATUS_ON); @@ -162,7 +162,7 @@ abstract class HdmiCecLocalDeviceSource extends HdmiCecLocalDevice { setAndBroadcastActiveSource(message, physicalAddress); } if (physicalAddress != mService.getPhysicalAddress()) { - setActiveSource(physicalAddress); + setActiveSource(physicalAddress, "HdmiCecLocalDeviceSource#handleSetStreamPath()"); } switchInputOnReceivingNewActivePath(physicalAddress); return true; @@ -174,7 +174,7 @@ abstract class HdmiCecLocalDeviceSource extends HdmiCecLocalDevice { assertRunOnServiceThread(); int physicalAddress = HdmiUtils.twoBytesToInt(message.getParams(), 2); if (physicalAddress != mService.getPhysicalAddress()) { - setActiveSource(physicalAddress); + setActiveSource(physicalAddress, "HdmiCecLocalDeviceSource#handleRoutingChange()"); } if (!isRoutingControlFeatureEnabled()) { mService.maySendFeatureAbortCommand(message, Constants.ABORT_REFUSED); @@ -196,7 +196,7 @@ abstract class HdmiCecLocalDeviceSource extends HdmiCecLocalDevice { assertRunOnServiceThread(); int physicalAddress = HdmiUtils.twoBytesToInt(message.getParams()); if (physicalAddress != mService.getPhysicalAddress()) { - setActiveSource(physicalAddress); + setActiveSource(physicalAddress, "HdmiCecLocalDeviceSource#handleRoutingInformation()"); } if (!isRoutingControlFeatureEnabled()) { mService.maySendFeatureAbortCommand(message, Constants.ABORT_REFUSED); diff --git a/services/core/java/com/android/server/hdmi/HdmiCecLocalDeviceTv.java b/services/core/java/com/android/server/hdmi/HdmiCecLocalDeviceTv.java index 804cc92cca08..0325ad929849 100644 --- a/services/core/java/com/android/server/hdmi/HdmiCecLocalDeviceTv.java +++ b/services/core/java/com/android/server/hdmi/HdmiCecLocalDeviceTv.java @@ -288,13 +288,14 @@ final class HdmiCecLocalDeviceTv extends HdmiCecLocalDevice { if (targetAddress == Constants.ADDR_INTERNAL) { handleSelectInternalSource(); // Switching to internal source is always successful even when CEC control is disabled. - setActiveSource(targetAddress, mService.getPhysicalAddress()); + setActiveSource(targetAddress, mService.getPhysicalAddress(), + "HdmiCecLocalDeviceTv#deviceSelect()"); setActivePath(mService.getPhysicalAddress()); invokeCallback(callback, HdmiControlManager.RESULT_SUCCESS); return; } if (!mService.isControlEnabled()) { - setActiveSource(targetDevice); + setActiveSource(targetDevice, "HdmiCecLocalDeviceTv#deviceSelect()"); invokeCallback(callback, HdmiControlManager.RESULT_INCORRECT_MODE); return; } @@ -307,7 +308,8 @@ final class HdmiCecLocalDeviceTv extends HdmiCecLocalDevice { assertRunOnServiceThread(); // Seq #18 if (mService.isControlEnabled() && getActiveSource().logicalAddress != mAddress) { - updateActiveSource(mAddress, mService.getPhysicalAddress()); + updateActiveSource(mAddress, mService.getPhysicalAddress(), + "HdmiCecLocalDeviceTv#handleSelectInternalSource()"); if (mSkipRoutingControl) { mSkipRoutingControl = false; return; @@ -319,19 +321,19 @@ final class HdmiCecLocalDeviceTv extends HdmiCecLocalDevice { } @ServiceThreadOnly - void updateActiveSource(int logicalAddress, int physicalAddress) { + void updateActiveSource(int logicalAddress, int physicalAddress, String caller) { assertRunOnServiceThread(); - updateActiveSource(ActiveSource.of(logicalAddress, physicalAddress)); + updateActiveSource(ActiveSource.of(logicalAddress, physicalAddress), caller); } @ServiceThreadOnly - void updateActiveSource(ActiveSource newActive) { + void updateActiveSource(ActiveSource newActive, String caller) { assertRunOnServiceThread(); // Seq #14 if (getActiveSource().equals(newActive)) { return; } - setActiveSource(newActive); + setActiveSource(newActive, caller); int logicalAddress = newActive.logicalAddress; if (getCecDeviceInfo(logicalAddress) != null && logicalAddress != mAddress) { if (mService.pathToPortId(newActive.physicalAddress) == getActivePortId()) { diff --git a/services/core/java/com/android/server/hdmi/HdmiControlService.java b/services/core/java/com/android/server/hdmi/HdmiControlService.java index 70ffaae1a9af..44b6a63faea1 100644 --- a/services/core/java/com/android/server/hdmi/HdmiControlService.java +++ b/services/core/java/com/android/server/hdmi/HdmiControlService.java @@ -3228,7 +3228,7 @@ public class HdmiControlService extends SystemService { } } - void setActiveSource(int logicalAddress, int physicalAddress) { + void setActiveSource(int logicalAddress, int physicalAddress, String caller) { synchronized (mLock) { mActiveSource.logicalAddress = logicalAddress; mActiveSource.physicalAddress = physicalAddress; @@ -3239,14 +3239,17 @@ public class HdmiControlService extends SystemService { // mIsActiveSource only exists in source device, ignore this setting if the current // device is not an HdmiCecLocalDeviceSource. if (!(device instanceof HdmiCecLocalDeviceSource)) { + device.addActiveSourceHistoryItem(new ActiveSource(logicalAddress, physicalAddress), + false, caller); continue; } - if (logicalAddress == device.getDeviceInfo().getLogicalAddress() - && physicalAddress == getPhysicalAddress()) { - ((HdmiCecLocalDeviceSource) device).setIsActiveSource(true); - } else { - ((HdmiCecLocalDeviceSource) device).setIsActiveSource(false); - } + boolean deviceIsActiveSource = + logicalAddress == device.getDeviceInfo().getLogicalAddress() + && physicalAddress == getPhysicalAddress(); + + ((HdmiCecLocalDeviceSource) device).setIsActiveSource(deviceIsActiveSource); + device.addActiveSourceHistoryItem(new ActiveSource(logicalAddress, physicalAddress), + deviceIsActiveSource, caller); } } diff --git a/services/core/java/com/android/server/integrity/AppIntegrityManagerServiceImpl.java b/services/core/java/com/android/server/integrity/AppIntegrityManagerServiceImpl.java index 817902d9d566..b61c6a7ca569 100644 --- a/services/core/java/com/android/server/integrity/AppIntegrityManagerServiceImpl.java +++ b/services/core/java/com/android/server/integrity/AppIntegrityManagerServiceImpl.java @@ -205,8 +205,13 @@ public class AppIntegrityManagerServiceImpl extends IAppIntegrityManager.Stub { } if (DEBUG_INTEGRITY_COMPONENT) { - Slog.i(TAG, String.format("Successfully pushed rule set: %s", version)); + Slog.i( + TAG, + String.format( + "Successfully pushed rule set to version '%s' from '%s'", + version, ruleProvider)); } + FrameworkStatsLog.write( FrameworkStatsLog.INTEGRITY_RULES_PUSHED, success, @@ -324,13 +329,12 @@ public class AppIntegrityManagerServiceImpl extends IAppIntegrityManager.Stub { + getAllowedInstallers(packageInfo)); } IntegrityCheckResult result = mEvaluationEngine.evaluate(appInstallMetadata); - if (DEBUG_INTEGRITY_COMPONENT) { + if (!result.getMatchedRules().isEmpty() || DEBUG_INTEGRITY_COMPONENT) { Slog.i( TAG, - "Integrity check result: " - + result.getEffect() - + " due to " - + result.getMatchedRules()); + String.format( + "Integrity check of %s result: %s due to %s", + packageName, result.getEffect(), result.getMatchedRules())); } FrameworkStatsLog.write( @@ -673,8 +677,10 @@ public class AppIntegrityManagerServiceImpl extends IAppIntegrityManager.Stub { // Obtain the system apps that are whitelisted in config_integrityRuleProviderPackages. List<String> allowedRuleProviders = getAllowedRuleProviderSystemApps(); if (DEBUG_INTEGRITY_COMPONENT) { - Slog.i(TAG, String.format( - "Rule provider system app list contains: %s", allowedRuleProviders)); + Slog.i( + TAG, + String.format( + "Rule provider system app list contains: %s", allowedRuleProviders)); } // Identify the package names in the caller list. @@ -730,9 +736,9 @@ public class AppIntegrityManagerServiceImpl extends IAppIntegrityManager.Stub { private boolean integrityCheckIncludesRuleProvider() { return Settings.Global.getInt( - mContext.getContentResolver(), - Settings.Global.INTEGRITY_CHECK_INCLUDES_RULE_PROVIDER, - 0) + mContext.getContentResolver(), + Settings.Global.INTEGRITY_CHECK_INCLUDES_RULE_PROVIDER, + 0) == 1; } diff --git a/services/core/java/com/android/server/location/LocationManagerService.java b/services/core/java/com/android/server/location/LocationManagerService.java index 534533f2fc97..f4d0a6254318 100644 --- a/services/core/java/com/android/server/location/LocationManagerService.java +++ b/services/core/java/com/android/server/location/LocationManagerService.java @@ -697,7 +697,8 @@ public class LocationManagerService extends ILocationManager.Stub { return null; } - Location location = manager.getLastLocation(request, identity, permissionLevel); + Location location = manager.getLastLocation(identity, permissionLevel, + request.isLocationSettingsIgnored()); // lastly - note app ops if (!mInjector.getAppOpsHelper().noteOpNoThrow(LocationPermissions.asAppOp(permissionLevel), @@ -740,13 +741,9 @@ public class LocationManagerService extends ILocationManager.Stub { return null; } - // create a location request that works in almost all circumstances - LocationRequest request = LocationRequest.createFromDeprecatedProvider(GPS_PROVIDER, 0, - 0, true); - - // use our own identity rather than the caller - CallerIdentity identity = CallerIdentity.fromContext(mContext); - Location location = gpsManager.getLastLocation(request, identity, PERMISSION_FINE); + // use fine permission level to avoid creating unnecessary coarse locations + Location location = gpsManager.getLastLocationUnsafe(UserHandle.USER_ALL, + PERMISSION_FINE, false); if (location == null) { return null; } diff --git a/services/core/java/com/android/server/location/LocationProviderManager.java b/services/core/java/com/android/server/location/LocationProviderManager.java index 66245a279666..1815a8554705 100644 --- a/services/core/java/com/android/server/location/LocationProviderManager.java +++ b/services/core/java/com/android/server/location/LocationProviderManager.java @@ -434,18 +434,17 @@ class LocationProviderManager extends } LocationRequest newRequest = calculateProviderLocationRequest(); - if (!mProviderLocationRequest.equals(newRequest)) { - LocationRequest oldRequest = mProviderLocationRequest; - mProviderLocationRequest = newRequest; - onHighPowerUsageChanged(); - updateService(); - - // if location settings ignored has changed then the active state may have changed - return oldRequest.isLocationSettingsIgnored() - != newRequest.isLocationSettingsIgnored(); + if (mProviderLocationRequest.equals(newRequest)) { + return false; } - return false; + LocationRequest oldRequest = mProviderLocationRequest; + mProviderLocationRequest = newRequest; + onHighPowerUsageChanged(); + updateService(); + + // if location settings ignored has changed then the active state may have changed + return oldRequest.isLocationSettingsIgnored() != newRequest.isLocationSettingsIgnored(); } private LocationRequest calculateProviderLocationRequest() { @@ -1229,10 +1228,8 @@ class LocationProviderManager extends } @Nullable - public Location getLastLocation(LocationRequest request, CallerIdentity identity, - @PermissionLevel int permissionLevel) { - Preconditions.checkArgument(mName.equals(request.getProvider())); - + public Location getLastLocation(CallerIdentity identity, @PermissionLevel int permissionLevel, + boolean ignoreLocationSettings) { if (mSettingsHelper.isLocationPackageBlacklisted(identity.getUserId(), identity.getPackageName())) { return null; @@ -1240,12 +1237,12 @@ class LocationProviderManager extends if (!mUserInfoHelper.isCurrentUserId(identity.getUserId())) { return null; } - if (!request.isLocationSettingsIgnored() && !isEnabled(identity.getUserId())) { + if (!ignoreLocationSettings && !isEnabled(identity.getUserId())) { return null; } - Location location = getLastLocation(identity.getUserId(), permissionLevel, - request.isLocationSettingsIgnored()); + Location location = getLastLocationUnsafe(identity.getUserId(), permissionLevel, + ignoreLocationSettings); // we don't note op here because we don't know what the client intends to do with the // location, the client is responsible for noting if necessary @@ -1259,9 +1256,30 @@ class LocationProviderManager extends } } + /** + * This function does not perform any permissions or safety checks, by calling it you are + * committing to performing all applicable checks yourself. Prefer + * {@link #getLastLocation(CallerIdentity, int, boolean)} where possible. + */ @Nullable - private Location getLastLocation(int userId, @PermissionLevel int permissionLevel, + public Location getLastLocationUnsafe(int userId, @PermissionLevel int permissionLevel, boolean ignoreLocationSettings) { + if (userId == UserHandle.USER_ALL) { + Location lastLocation = null; + final int[] runningUserIds = mUserInfoHelper.getRunningUserIds(); + for (int i = 0; i < runningUserIds.length; i++) { + Location next = getLastLocationUnsafe(runningUserIds[i], permissionLevel, + ignoreLocationSettings); + if (lastLocation == null || (next != null && next.getElapsedRealtimeNanos() + > lastLocation.getElapsedRealtimeNanos())) { + lastLocation = next; + } + } + return lastLocation; + } + + Preconditions.checkArgument(userId >= 0); + synchronized (mLock) { LastLocation lastLocation = mLastLocations.get(userId); if (lastLocation == null) { @@ -1273,7 +1291,7 @@ class LocationProviderManager extends public void injectLastLocation(Location location, int userId) { synchronized (mLock) { - if (getLastLocation(userId, PERMISSION_FINE, false) == null) { + if (getLastLocationUnsafe(userId, PERMISSION_FINE, false) == null) { setLastLocation(location, userId); } } @@ -1322,7 +1340,22 @@ class LocationProviderManager extends permissionLevel); synchronized (mLock) { - Location lastLocation = getLastLocation(request, callerIdentity, permissionLevel); + if (mSettingsHelper.isLocationPackageBlacklisted(callerIdentity.getUserId(), + callerIdentity.getPackageName())) { + registration.deliverLocation(null); + return; + } + if (!mUserInfoHelper.isCurrentUserId(callerIdentity.getUserId())) { + registration.deliverLocation(null); + return; + } + if (!request.isLocationSettingsIgnored() && !isEnabled(callerIdentity.getUserId())) { + registration.deliverLocation(null); + return; + } + + Location lastLocation = getLastLocationUnsafe(callerIdentity.getUserId(), + permissionLevel, request.isLocationSettingsIgnored()); if (lastLocation != null) { long locationAgeMs = NANOSECONDS.toMillis( SystemClock.elapsedRealtimeNanos() @@ -1346,17 +1379,17 @@ class LocationProviderManager extends } finally { Binder.restoreCallingIdentity(identity); } + } - CancellationSignal cancellationSignal = CancellationSignal.fromTransport( - cancellationTransport); - if (cancellationSignal != null) { - cancellationSignal.setOnCancelListener( - () -> { - synchronized (mLock) { - removeRegistration(callback.asBinder(), registration); - } - }); - } + CancellationSignal cancellationSignal = CancellationSignal.fromTransport( + cancellationTransport); + if (cancellationSignal != null) { + cancellationSignal.setOnCancelListener(SingleUseCallback.wrap( + () -> { + synchronized (mLock) { + removeRegistration(callback.asBinder(), registration); + } + })); } } @@ -1934,7 +1967,8 @@ class LocationProviderManager extends ipw.println("user " + userId + ":"); ipw.increaseIndent(); } - ipw.println("last location=" + getLastLocation(userId, PERMISSION_FINE, false)); + ipw.println( + "last location=" + getLastLocationUnsafe(userId, PERMISSION_FINE, false)); ipw.println("enabled=" + isEnabled(userId)); if (userIds.length != 1) { ipw.decreaseIndent(); @@ -2007,7 +2041,7 @@ class LocationProviderManager extends } // update last coarse interval only if enough time has passed long timeDeltaMs = NANOSECONDS.toMillis(newCoarse.getElapsedRealtimeNanos()) - - NANOSECONDS.toMillis(oldCoarse.getElapsedRealtimeNanos()); + - NANOSECONDS.toMillis(oldCoarse.getElapsedRealtimeNanos()); if (timeDeltaMs > FASTEST_COARSE_INTERVAL_MS) { return newCoarse; } else { @@ -2016,10 +2050,11 @@ class LocationProviderManager extends } } - private static class SingleUseCallback extends IRemoteCallback.Stub { + private static class SingleUseCallback extends IRemoteCallback.Stub implements Runnable, + CancellationSignal.OnCancelListener { @Nullable - public static IRemoteCallback wrap(@Nullable Runnable callback) { + public static SingleUseCallback wrap(@Nullable Runnable callback) { return callback == null ? null : new SingleUseCallback(callback); } @@ -2032,6 +2067,16 @@ class LocationProviderManager extends @Override public void sendResult(Bundle data) { + run(); + } + + @Override + public void onCancel() { + run(); + } + + @Override + public void run() { Runnable callback; synchronized (this) { callback = mCallback; diff --git a/services/core/java/com/android/server/location/gnss/GnssLocationProvider.java b/services/core/java/com/android/server/location/gnss/GnssLocationProvider.java index 3e5b6e3f462f..a4486d7b5898 100644 --- a/services/core/java/com/android/server/location/gnss/GnssLocationProvider.java +++ b/services/core/java/com/android/server/location/gnss/GnssLocationProvider.java @@ -85,7 +85,9 @@ import java.io.FileDescriptor; import java.io.PrintWriter; import java.util.ArrayList; import java.util.Arrays; +import java.util.HashSet; import java.util.List; +import java.util.Set; /** * A GNSS implementation of LocationProvider used by LocationManager. @@ -181,7 +183,6 @@ public class GnssLocationProvider extends AbstractLocationProvider implements private static final int INJECT_NTP_TIME = 5; // PSDS stands for Predicted Satellite Data Service private static final int DOWNLOAD_PSDS_DATA = 6; - private static final int DOWNLOAD_PSDS_DATA_FINISHED = 11; private static final int INITIALIZE_HANDLER = 13; private static final int REQUEST_LOCATION = 16; private static final int REPORT_LOCATION = 17; // HAL reports location @@ -288,6 +289,7 @@ public class GnssLocationProvider extends AbstractLocationProvider implements private static final long DOWNLOAD_PSDS_DATA_TIMEOUT_MS = 60 * 1000; private static final long WAKELOCK_TIMEOUT_MILLIS = 30 * 1000; + @GuardedBy("mLock") private final ExponentialBackOff mPsdsBackOff = new ExponentialBackOff(RETRY_INTERVAL, MAX_RETRY_INTERVAL); @@ -297,14 +299,8 @@ public class GnssLocationProvider extends AbstractLocationProvider implements private boolean mShutdown; - // states for injecting ntp and downloading psds data - private static final int STATE_PENDING_NETWORK = 0; - private static final int STATE_DOWNLOADING = 1; - private static final int STATE_IDLE = 2; - - // flags to trigger NTP or PSDS data download when network becomes available - // initialized to true so we do NTP and PSDS when the network comes up after booting - private int mDownloadPsdsDataPending = STATE_PENDING_NETWORK; + @GuardedBy("mLock") + private Set<Integer> mPendingDownloadPsdsTypes = new HashSet<>(); // true if GPS is navigating private boolean mNavigating; @@ -610,6 +606,8 @@ public class GnssLocationProvider extends AbstractLocationProvider implements mNIHandler = new GpsNetInitiatedHandler(context, mNetInitiatedListener, mSuplEsEnabled); + // Trigger PSDS data download when the network comes up after booting. + mPendingDownloadPsdsTypes.add(GnssPsdsDownloader.LONG_TERM_PSDS_SERVER_INDEX); mNetworkConnectivityHandler = new GnssNetworkConnectivityHandler(context, GnssLocationProvider.this::onNetworkAvailable, mLooper, mNIHandler); @@ -670,10 +668,13 @@ public class GnssLocationProvider extends AbstractLocationProvider implements */ private void onNetworkAvailable() { mNtpTimeHelper.onNetworkAvailable(); - if (mDownloadPsdsDataPending == STATE_PENDING_NETWORK) { - if (mSupportsPsds) { - // Download only if supported, (prevents an unnecessary on-boot download) - psdsDownloadRequest(/* psdsType= */ GnssPsdsDownloader.LONG_TERM_PSDS_SERVER_INDEX); + // Download only if supported, (prevents an unnecessary on-boot download) + if (mSupportsPsds) { + synchronized (mLock) { + for (int psdsType : mPendingDownloadPsdsTypes) { + downloadPsdsData(psdsType); + } + mPendingDownloadPsdsTypes.clear(); } } } @@ -799,17 +800,13 @@ public class GnssLocationProvider extends AbstractLocationProvider implements Log.d(TAG, "handleDownloadPsdsData() called when PSDS not supported"); return; } - if (mDownloadPsdsDataPending == STATE_DOWNLOADING) { - // already downloading data - return; - } if (!mNetworkConnectivityHandler.isDataNetworkConnected()) { // try again when network is up - mDownloadPsdsDataPending = STATE_PENDING_NETWORK; + synchronized (mLock) { + mPendingDownloadPsdsTypes.add(psdsType); + } return; } - mDownloadPsdsDataPending = STATE_DOWNLOADING; - synchronized (mLock) { // hold wake lock while task runs mDownloadPsdsWakeLock.acquire(DOWNLOAD_PSDS_DATA_TIMEOUT_MS); @@ -820,20 +817,24 @@ public class GnssLocationProvider extends AbstractLocationProvider implements mGnssConfiguration.getProperties()); byte[] data = psdsDownloader.downloadPsdsData(psdsType); if (data != null) { - if (DEBUG) Log.d(TAG, "calling native_inject_psds_data"); - native_inject_psds_data(data, data.length, psdsType); - mPsdsBackOff.reset(); - } - - sendMessage(DOWNLOAD_PSDS_DATA_FINISHED, 0, null); - - if (data == null) { - // try again later - // since this is delayed and not urgent we do not hold a wake lock here - // the arg2 below should not be 1 otherwise the wakelock will be under-locked. + mHandler.post(() -> { + if (DEBUG) Log.d(TAG, "calling native_inject_psds_data"); + native_inject_psds_data(data, data.length, psdsType); + synchronized (mLock) { + mPsdsBackOff.reset(); + } + }); + } else { + // Try download PSDS data again later according to backoff time. + // Since this is delayed and not urgent, we do not hold a wake lock here. + // The arg2 below should not be 1 otherwise the wakelock will be under-locked. + long backoffMillis; + synchronized (mLock) { + backoffMillis = mPsdsBackOff.nextBackoffMillis(); + } mHandler.sendMessageDelayed( mHandler.obtainMessage(DOWNLOAD_PSDS_DATA, psdsType, 0, null), - mPsdsBackOff.nextBackoffMillis()); + backoffMillis); } // Release wake lock held by task, synchronize on mLock in case multiple @@ -1128,7 +1129,7 @@ public class GnssLocationProvider extends AbstractLocationProvider implements requestUtcTime(); } else if ("force_psds_injection".equals(command)) { if (mSupportsPsds) { - psdsDownloadRequest(/* psdsType= */ + downloadPsdsData(/* psdsType= */ GnssPsdsDownloader.LONG_TERM_PSDS_SERVER_INDEX); } } else { @@ -1581,8 +1582,8 @@ public class GnssLocationProvider extends AbstractLocationProvider implements reportLocation(locations); } - void psdsDownloadRequest(int psdsType) { - if (DEBUG) Log.d(TAG, "psdsDownloadRequest. psdsType: " + psdsType); + void downloadPsdsData(int psdsType) { + if (DEBUG) Log.d(TAG, "downloadPsdsData. psdsType: " + psdsType); sendMessage(DOWNLOAD_PSDS_DATA, psdsType, null); } @@ -1896,9 +1897,6 @@ public class GnssLocationProvider extends AbstractLocationProvider implements case DOWNLOAD_PSDS_DATA: handleDownloadPsdsData(msg.arg1); break; - case DOWNLOAD_PSDS_DATA_FINISHED: - mDownloadPsdsDataPending = STATE_IDLE; - break; case INITIALIZE_HANDLER: handleInitialize(); break; @@ -2007,8 +2005,6 @@ public class GnssLocationProvider extends AbstractLocationProvider implements return "REQUEST_LOCATION"; case DOWNLOAD_PSDS_DATA: return "DOWNLOAD_PSDS_DATA"; - case DOWNLOAD_PSDS_DATA_FINISHED: - return "DOWNLOAD_PSDS_DATA_FINISHED"; case INITIALIZE_HANDLER: return "INITIALIZE_HANDLER"; case REPORT_LOCATION: diff --git a/services/core/java/com/android/server/location/gnss/GnssManagerService.java b/services/core/java/com/android/server/location/gnss/GnssManagerService.java index 8e81f29550d6..2bf6af25422a 100644 --- a/services/core/java/com/android/server/location/gnss/GnssManagerService.java +++ b/services/core/java/com/android/server/location/gnss/GnssManagerService.java @@ -519,7 +519,7 @@ public class GnssManagerService implements GnssNative.Callbacks { @Override public void psdsDownloadRequest(int psdsType) { - mGnssLocationProvider.psdsDownloadRequest(psdsType); + mGnssLocationProvider.downloadPsdsData(psdsType); } @Override diff --git a/services/core/java/com/android/server/locksettings/LockSettingsService.java b/services/core/java/com/android/server/locksettings/LockSettingsService.java index 26c3132167d3..dbc725ea93e8 100644 --- a/services/core/java/com/android/server/locksettings/LockSettingsService.java +++ b/services/core/java/com/android/server/locksettings/LockSettingsService.java @@ -837,7 +837,7 @@ public class LockSettingsService extends ILockSettings.Stub { if (getString("migrated", null, 0) == null) { final ContentResolver cr = mContext.getContentResolver(); for (String validSetting : VALID_SETTINGS) { - String value = Settings.Secure.getString(cr, validSetting); + String value = Settings.Secure.getStringForUser(cr, validSetting, cr.getUserId()); if (value != null) { setString(validSetting, value, 0); } diff --git a/services/core/java/com/android/server/notification/NotificationManagerService.java b/services/core/java/com/android/server/notification/NotificationManagerService.java index 12419a9fcafa..5bc6e237ef37 100755 --- a/services/core/java/com/android/server/notification/NotificationManagerService.java +++ b/services/core/java/com/android/server/notification/NotificationManagerService.java @@ -6259,6 +6259,8 @@ public class NotificationManagerService extends SystemService { for (NotificationRecord r : enqueued) { if (r.mUpdateTimeMs > mWhen) { // At least one enqueue was posted after the cancel, so we're invalid + Slog.i(TAG, "notification cancel ignored due to newer enqueued entry" + + "key=" + r.getSbn().getKey()); return; } } diff --git a/services/core/java/com/android/server/pm/PackageInstallerService.java b/services/core/java/com/android/server/pm/PackageInstallerService.java index 162bfee8848d..155af82289d4 100644 --- a/services/core/java/com/android/server/pm/PackageInstallerService.java +++ b/services/core/java/com/android/server/pm/PackageInstallerService.java @@ -656,7 +656,7 @@ public class PackageInstallerService extends IPackageInstaller.Stub implements throw new IllegalArgumentException("Invalid install mode: " + params.mode); } - // If caller requested explicit location, sanity check it, otherwise + // If caller requested explicit location, validity check it, otherwise // resolve the best internal or adopted location. if ((params.installFlags & PackageManager.INSTALL_INTERNAL) != 0) { if (!PackageHelper.fitsOnInternal(mContext, params)) { @@ -688,7 +688,7 @@ public class PackageInstallerService extends IPackageInstaller.Stub implements final int sessionId; final PackageInstallerSession session; synchronized (mSessions) { - // Sanity check that installer isn't going crazy + // Check that the installer does not have too many active sessions. final int activeCount = getSessionCount(mSessions, callingUid); if (mContext.checkCallingOrSelfPermission(Manifest.permission.INSTALL_PACKAGES) == PackageManager.PERMISSION_GRANTED) { diff --git a/services/core/java/com/android/server/pm/PackageInstallerSession.java b/services/core/java/com/android/server/pm/PackageInstallerSession.java index 51164ba412b3..ca125320bbf2 100644 --- a/services/core/java/com/android/server/pm/PackageInstallerSession.java +++ b/services/core/java/com/android/server/pm/PackageInstallerSession.java @@ -249,6 +249,9 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub { private final PackageManagerService mPm; private final Handler mHandler; private final PackageSessionProvider mSessionProvider; + /** + * Note all calls must be done outside {@link #mLock} to prevent lock inversion. + */ private final StagingManager mStagingManager; final int sessionId; @@ -389,6 +392,20 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub { private String mStagedSessionErrorMessage; /** + * The callback to run when pre-reboot verification has ended. Used by {@link #abandonStaged()} + * to delay session clean-up until it is safe to do so. + */ + @GuardedBy("mLock") + @Nullable + private Runnable mPendingAbandonCallback; + /** + * {@code true} if pre-reboot verification is ongoing which means it is not safe for + * {@link #abandon()} to clean up staging directories. + */ + @GuardedBy("mLock") + private boolean mInPreRebootVerification; + + /** * Path to the validated base APK for this session, which may point at an * APK inside the session (when the session defines the base), or it may * point at the existing base APK (when adding splits to an existing app). @@ -978,7 +995,7 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub { private ParcelFileDescriptor doWriteInternal(String name, long offsetBytes, long lengthBytes, ParcelFileDescriptor incomingFd) throws IOException { - // Quick sanity check of state, and allocate a pipe for ourselves. We + // Quick validity check of state, and allocate a pipe for ourselves. We // then do heavy disk allocation outside the lock, but this open pipe // will block any attempted install transitions. final RevocableFileDescriptor fd; @@ -1454,26 +1471,54 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub { // TODO(patb): since the work done here for a parent session in a multi-package install is // mostly superficial, consider splitting this method for the parent and // single / child sessions. - synchronized (mLock) { - if (mCommitted) { - return true; + try { + synchronized (mLock) { + if (mCommitted) { + return true; + } + // Read transfers from the original owner stay open, but as the session's data + // cannot be modified anymore, there is no leak of information. For staged sessions, + // further validation is performed by the staging manager. + if (!params.isMultiPackage) { + if (!prepareDataLoaderLocked()) { + return false; + } + + if (isApexInstallation()) { + validateApexInstallLocked(); + } else { + validateApkInstallLocked(); + } + } } - if (!streamAndValidateLocked()) { - return false; + if (params.isStaged) { + mStagingManager.checkNonOverlappingWithStagedSessions(this); } - // Client staging is fully done at this point - mClientProgress = 1f; - computeProgressLocked(true); + synchronized (mLock) { + if (mDestroyed) { + throw new PackageManagerException(INSTALL_FAILED_INTERNAL_ERROR, + "Session destroyed"); + } + // Client staging is fully done at this point + mClientProgress = 1f; + computeProgressLocked(true); - // This ongoing commit should keep session active, even though client - // will probably close their end. - mActiveCount.incrementAndGet(); + // This ongoing commit should keep session active, even though client + // will probably close their end. + mActiveCount.incrementAndGet(); - mCommitted = true; + mCommitted = true; + } + return true; + } catch (PackageManagerException e) { + throw onSessionValidationFailure(e); + } catch (Throwable e) { + // Convert all exceptions into package manager exceptions as only those are handled + // in the code above. + throw onSessionValidationFailure(new PackageManagerException(e)); } - return true; } @GuardedBy("mLock") @@ -1511,44 +1556,6 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub { } } - /** - * Prepare DataLoader and stream content for DataLoader sessions. - * Validate the contents of all session. - * - * @return false if the data loader could not be prepared. - * @throws PackageManagerException when an unrecoverable exception is encountered - */ - @GuardedBy("mLock") - private boolean streamAndValidateLocked() throws PackageManagerException { - try { - // Read transfers from the original owner stay open, but as the session's data cannot - // be modified anymore, there is no leak of information. For staged sessions, further - // validation is performed by the staging manager. - if (!params.isMultiPackage) { - if (!prepareDataLoaderLocked()) { - return false; - } - - if (isApexInstallation()) { - validateApexInstallLocked(); - } else { - validateApkInstallLocked(); - } - } - - if (params.isStaged) { - mStagingManager.checkNonOverlappingWithStagedSessions(this); - } - return true; - } catch (PackageManagerException e) { - throw onSessionValidationFailure(e); - } catch (Throwable e) { - // Convert all exceptions into package manager exceptions as only those are handled - // in the code above. - throw onSessionValidationFailure(new PackageManagerException(e)); - } - } - private PackageManagerException onSessionValidationFailure(PackageManagerException e) { onSessionValidationFailure(e.error, ExceptionUtils.getCompleteMessage(e)); return e; @@ -1571,7 +1578,7 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub { SessionInfo.STAGED_SESSION_VERIFICATION_FAILED, msgWithErrorCode); // TODO(b/136257624): Remove this once all verification logic has been transferred out // of StagingManager. - mStagingManager.notifyVerificationComplete(sessionId); + mStagingManager.notifyVerificationComplete(this); } else { // Dispatch message to remove session from PackageInstallerService. dispatchSessionFinished(error, msg, null); @@ -1837,21 +1844,6 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub { throws PackageManagerException { assertNotLocked("makeSessionActive"); - synchronized (mLock) { - if (mRelinquished) { - throw new PackageManagerException(INSTALL_FAILED_INTERNAL_ERROR, - "Session relinquished"); - } - if (mDestroyed) { - throw new PackageManagerException(INSTALL_FAILED_INTERNAL_ERROR, - "Session destroyed"); - } - if (!mSealed) { - throw new PackageManagerException(INSTALL_FAILED_INTERNAL_ERROR, - "Session not sealed"); - } - } - // TODO(b/159331446): Move this to makeSessionActiveForInstall and update javadoc if (!params.isMultiPackage && needToAskForPermissions()) { // User needs to confirm installation; @@ -1881,6 +1873,19 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub { @GuardedBy("mLock") private PackageManagerService.VerificationParams makeVerificationParamsLocked() throws PackageManagerException { + if (mRelinquished) { + throw new PackageManagerException(INSTALL_FAILED_INTERNAL_ERROR, + "Session relinquished"); + } + if (mDestroyed) { + throw new PackageManagerException(INSTALL_FAILED_INTERNAL_ERROR, + "Session destroyed"); + } + if (!mSealed) { + throw new PackageManagerException(INSTALL_FAILED_INTERNAL_ERROR, + "Session not sealed"); + } + // TODO(b/136257624): Some logic in this if block probably belongs in // makeInstallParams(). if (!params.isMultiPackage && !isApexInstallation()) { @@ -2787,14 +2792,9 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub { } private void abandonStaged() { + final Runnable r; synchronized (mLock) { - if (mDestroyed) { - // If a user abandons staged session in an unsafe state, then system will try to - // abandon the destroyed staged session when it is safe on behalf of the user. - assertCallerIsOwnerOrRootOrSystemLocked(); - } else { - assertCallerIsOwnerOrRootLocked(); - } + assertCallerIsOwnerOrRootLocked(); if (isStagedAndInTerminalState()) { // We keep the session in the database if it's in a finalized state. It will be // removed by PackageInstallerService when the last update time is old enough. @@ -2803,17 +2803,25 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub { return; } mDestroyed = true; - if (mCommitted) { - if (!mStagingManager.abortCommittedSessionLocked(this)) { - // Do not clean up the staged session from system. It is not safe yet. - mCallback.onStagedSessionChanged(this); - return; + boolean isCommitted = mCommitted; + List<PackageInstallerSession> childSessions = getChildSessionsLocked(); + r = () -> { + assertNotLocked("abandonStaged"); + if (isCommitted) { + mStagingManager.abortCommittedSession(this); } + cleanStageDir(childSessions); + destroyInternal(); + dispatchSessionFinished(INSTALL_FAILED_ABORTED, "Session was abandoned", null); + }; + if (mInPreRebootVerification) { + // Pre-reboot verification is ongoing. It is not safe to clean up the session yet. + mPendingAbandonCallback = r; + mCallback.onStagedSessionChanged(this); + return; } - cleanStageDir(getChildSessionsLocked()); - destroyInternal(); } - dispatchSessionFinished(INSTALL_FAILED_ABORTED, "Session was abandoned", null); + r.run(); } @Override @@ -2830,6 +2838,50 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub { } } + /** + * Notified by the staging manager that pre-reboot verification is about to start. The return + * value should be checked to decide whether it is OK to start pre-reboot verification. In + * the case of a destroyed session, {@code false} is returned and there is no need to start + * pre-reboot verification. + */ + boolean notifyStagedStartPreRebootVerification() { + synchronized (mLock) { + if (mInPreRebootVerification) { + throw new IllegalStateException("Pre-reboot verification has started"); + } + if (mDestroyed) { + return false; + } + mInPreRebootVerification = true; + return true; + } + } + + private void dispatchPendingAbandonCallback() { + final Runnable callback; + synchronized (mLock) { + callback = mPendingAbandonCallback; + mPendingAbandonCallback = null; + } + if (callback != null) { + callback.run(); + } + } + + /** + * Notified by the staging manager that pre-reboot verification has ended. Now it is safe to + * clean up the session if {@link #abandon()} has been called previously. + */ + void notifyStagedEndPreRebootVerification() { + synchronized (mLock) { + if (!mInPreRebootVerification) { + throw new IllegalStateException("Pre-reboot verification not started"); + } + mInPreRebootVerification = false; + } + dispatchPendingAbandonCallback(); + } + @Override public boolean isMultiPackage() { return params.isMultiPackage; @@ -3744,7 +3796,7 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub { out.endTag(null, TAG_SESSION); } - // Sanity check to be performed when the session is restored from an external file. Only one + // Validity check to be performed when the session is restored from an external file. Only one // of the session states should be true, or none of them. private static boolean isStagedSessionStateValid(boolean isReady, boolean isApplied, boolean isFailed) { diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java index c6269eba8120..9f78f0f08fd1 100644 --- a/services/core/java/com/android/server/pm/PackageManagerService.java +++ b/services/core/java/com/android/server/pm/PackageManagerService.java @@ -3344,6 +3344,7 @@ public class PackageManagerService extends IPackageManager.Stub // Remove disable package settings for updated system apps that were // removed via an OTA. If the update is no longer present, remove the // app completely. Otherwise, revoke their system privileges. + final int[] userIds = mUserManager.getUserIds(); for (int i = possiblyDeletedUpdatedSystemApps.size() - 1; i >= 0; --i) { final String packageName = possiblyDeletedUpdatedSystemApps.get(i); final AndroidPackage pkg = mPackages.get(packageName); @@ -3386,7 +3387,7 @@ public class PackageManagerService extends IPackageManager.Stub // partition], completely remove the package data. final PackageSetting ps = mSettings.mPackages.get(packageName); if (ps != null && mPackages.get(packageName) == null) { - removePackageDataLIF(ps, null, null, 0, false); + removePackageDataLIF(ps, userIds, null, 0, false); } logCriticalInfo(Log.WARN, msg); @@ -3853,8 +3854,9 @@ public class PackageManagerService extends IPackageManager.Stub // If we don't, installing the system package fails during scan enableSystemPackageLPw(stubPkg); } - installPackageFromSystemLIF(stubPkg.getCodePath(), null /*allUserHandles*/, - null /*origUserHandles*/, true /*writeSettings*/); + installPackageFromSystemLIF(stubPkg.getCodePath(), + mUserManager.getUserIds() /*allUserHandles*/, null /*origUserHandles*/, + true /*writeSettings*/); } catch (PackageManagerException pme) { // Serious WTF; we have to be able to install the stub Slog.wtf(TAG, "Failed to restore system package:" + stubPkg.getPackageName(), @@ -9582,8 +9584,8 @@ public class PackageManagerService extends IPackageManager.Stub try (@SuppressWarnings("unused") PackageFreezer freezer = freezePackage( parsedPackage.getPackageName(), "scanPackageInternalLI")) { - deletePackageLIF(parsedPackage.getPackageName(), null, true, null, 0, null, - false, null); + deletePackageLIF(parsedPackage.getPackageName(), null, true, + mUserManager.getUserIds(), 0, null, false, null); } pkgSetting = null; } else if (newPkgVersionGreater) { @@ -16388,9 +16390,11 @@ public class PackageManagerService extends IPackageManager.Stub */ private static class CommitRequest { final Map<String, ReconciledPackage> reconciledPackages; + @NonNull final int[] mAllUsers; - private CommitRequest(Map<String, ReconciledPackage> reconciledPackages, int[] allUsers) { + private CommitRequest(Map<String, ReconciledPackage> reconciledPackages, + @NonNull int[] allUsers) { this.reconciledPackages = reconciledPackages; this.mAllUsers = allUsers; } @@ -18903,7 +18907,7 @@ public class PackageManagerService extends IPackageManager.Stub * make sure this flag is set for partially installed apps. If not its meaningless to * delete a partially installed application. */ - private void removePackageDataLIF(final PackageSetting deletedPs, int[] allUserHandles, + private void removePackageDataLIF(final PackageSetting deletedPs, @NonNull int[] allUserHandles, PackageRemovedInfo outInfo, int flags, boolean writeSettings) { String packageName = deletedPs.name; if (DEBUG_REMOVE) Slog.d(TAG, "removePackageDataLI: " + deletedPs); @@ -18991,7 +18995,7 @@ public class PackageManagerService extends IPackageManager.Stub } // make sure to preserve per-user disabled state if this removal was just // a downgrade of a system app to the factory package - if (allUserHandles != null && outInfo != null && outInfo.origUsers != null) { + if (outInfo != null && outInfo.origUsers != null) { if (DEBUG_REMOVE) { Slog.d(TAG, "Propagating install state across downgrade"); } @@ -19044,11 +19048,10 @@ public class PackageManagerService extends IPackageManager.Stub * Tries to delete system package. */ private void deleteSystemPackageLIF(DeletePackageAction action, PackageSetting deletedPs, - int[] allUserHandles, int flags, @Nullable PackageRemovedInfo outInfo, + @NonNull int[] allUserHandles, int flags, @Nullable PackageRemovedInfo outInfo, boolean writeSettings) throws SystemDeleteException { - final boolean applyUserRestrictions = - (allUserHandles != null) && outInfo != null && (outInfo.origUsers != null); + final boolean applyUserRestrictions = outInfo != null && (outInfo.origUsers != null); final AndroidPackage deletedPkg = deletedPs.pkg; // Confirm if the system package has been updated // An updated system app can be deleted. This will also have to restore @@ -19132,7 +19135,7 @@ public class PackageManagerService extends IPackageManager.Stub * Installs a package that's already on the system partition. */ private AndroidPackage installPackageFromSystemLIF(@NonNull String codePathString, - @Nullable int[] allUserHandles, @Nullable int[] origUserHandles, boolean writeSettings) + @NonNull int[] allUserHandles, @Nullable int[] origUserHandles, boolean writeSettings) throws PackageManagerException { final File codePath = new File(codePathString); @ParseFlags int parseFlags = @@ -19174,8 +19177,7 @@ public class PackageManagerService extends IPackageManager.Stub // and granting install permissions. mPermissionManager.updatePermissions(pkg.getPackageName(), pkg); - final boolean applyUserRestrictions - = (allUserHandles != null) && (origUserHandles != null); + final boolean applyUserRestrictions = origUserHandles != null; if (applyUserRestrictions) { boolean installedStateChanged = false; if (DEBUG_REMOVE) { @@ -19212,7 +19214,7 @@ public class PackageManagerService extends IPackageManager.Stub } private void deleteInstalledPackageLIF(PackageSetting ps, - boolean deleteCodeAndResources, int flags, int[] allUserHandles, + boolean deleteCodeAndResources, int flags, @NonNull int[] allUserHandles, PackageRemovedInfo outInfo, boolean writeSettings) { synchronized (mLock) { if (outInfo != null) { @@ -19332,7 +19334,7 @@ public class PackageManagerService extends IPackageManager.Stub * This method handles package deletion in general */ private boolean deletePackageLIF(@NonNull String packageName, UserHandle user, - boolean deleteCodeAndResources, int[] allUserHandles, int flags, + boolean deleteCodeAndResources, @NonNull int[] allUserHandles, int flags, PackageRemovedInfo outInfo, boolean writeSettings, ParsedPackage replacingPackage) { final DeletePackageAction action; @@ -19369,7 +19371,7 @@ public class PackageManagerService extends IPackageManager.Stub /** Deletes a package. Only throws when install of a disabled package fails. */ private void executeDeletePackageLIF(DeletePackageAction action, String packageName, boolean deleteCodeAndResources, - int[] allUserHandles, boolean writeSettings, + @NonNull int[] allUserHandles, boolean writeSettings, ParsedPackage replacingPackage) throws SystemDeleteException { final PackageSetting ps = action.deletingPs; final PackageRemovedInfo outInfo = action.outInfo; @@ -22784,6 +22786,7 @@ public class PackageManagerService extends IPackageManager.Stub return; } + final int[] userIds = mUserManager.getUserIds(); final ArrayList<AndroidPackage> unloaded = new ArrayList<>(); synchronized (mInstallLock) { synchronized (mLock) { @@ -22797,7 +22800,7 @@ public class PackageManagerService extends IPackageManager.Stub try (PackageFreezer freezer = freezePackageForDelete(ps.name, deleteFlags, "unloadPrivatePackagesInner")) { - if (deletePackageLIF(ps.name, null, false, null, deleteFlags, outInfo, + if (deletePackageLIF(ps.name, null, false, userIds, deleteFlags, outInfo, false, null)) { unloaded.add(pkg); } else { diff --git a/services/core/java/com/android/server/pm/PackageManagerShellCommandDataLoader.java b/services/core/java/com/android/server/pm/PackageManagerShellCommandDataLoader.java index 3614cc047bf8..2bbca79741bd 100644 --- a/services/core/java/com/android/server/pm/PackageManagerShellCommandDataLoader.java +++ b/services/core/java/com/android/server/pm/PackageManagerShellCommandDataLoader.java @@ -67,7 +67,6 @@ public class PackageManagerShellCommandDataLoader extends DataLoaderService { } } - // Sanity check. if (sShellCommands.size() > TOO_MANY_PENDING_SHELL_COMMANDS) { Slog.e(TAG, "Too many pending shell commands: " + sShellCommands.size()); } diff --git a/services/core/java/com/android/server/pm/StagingManager.java b/services/core/java/com/android/server/pm/StagingManager.java index 0c4eaec32ba5..462b21535371 100644 --- a/services/core/java/com/android/server/pm/StagingManager.java +++ b/services/core/java/com/android/server/pm/StagingManager.java @@ -60,7 +60,6 @@ import android.util.ArraySet; import android.util.IntArray; import android.util.Slog; import android.util.SparseArray; -import android.util.SparseBooleanArray; import android.util.SparseIntArray; import android.util.apk.ApkSignatureVerifier; @@ -1028,22 +1027,12 @@ public class StagingManager { /** * <p>Abort committed staged session - * - * <p>This method must be called while holding {@link PackageInstallerSession#mLock}. - * - * <p>The method returns {@code false} to indicate it is not safe to clean up the session from - * system yet. When it is safe, the method returns {@code true}. - * - * <p> When it is safe to clean up, {@link StagingManager} will call - * {@link PackageInstallerSession#abandon()} on the session again. - * - * @return {@code true} if it is safe to cleanup the session resources, otherwise {@code false}. */ - boolean abortCommittedSessionLocked(@NonNull PackageInstallerSession session) { + void abortCommittedSession(@NonNull PackageInstallerSession session) { int sessionId = session.sessionId; - if (session.isStagedSessionApplied()) { - Slog.w(TAG, "Cannot abort applied session : " + sessionId); - return false; + if (session.isStagedAndInTerminalState()) { + Slog.w(TAG, "Cannot abort session in final state: " + sessionId); + return; } if (!session.isDestroyed()) { throw new IllegalStateException("Committed session must be destroyed before aborting it" @@ -1051,15 +1040,7 @@ public class StagingManager { } if (getStagedSession(sessionId) == null) { Slog.w(TAG, "Session " + sessionId + " has been abandoned already"); - return false; - } - - // If pre-reboot verification is running, then return false. StagingManager will call - // abandon again when pre-reboot verification ends. - if (mPreRebootVerificationHandler.isVerificationRunning(sessionId)) { - Slog.w(TAG, "Session " + sessionId + " aborted before pre-reboot " - + "verification completed."); - return false; + return; } // A session could be marked ready once its pre-reboot verification ends @@ -1075,7 +1056,6 @@ public class StagingManager { // Session was successfully aborted from apexd (if required) and pre-reboot verification // is also complete. It is now safe to clean up the session from system. abortSession(session); - return true; } /** @@ -1264,8 +1244,8 @@ public class StagingManager { // TODO(b/136257624): Temporary API to let PMS communicate with StagingManager. When all // verification logic is extracted out of StagingManager into PMS, we can remove // this. - void notifyVerificationComplete(int sessionId) { - mPreRebootVerificationHandler.onPreRebootVerificationComplete(sessionId); + void notifyVerificationComplete(PackageInstallerSession session) { + mPreRebootVerificationHandler.onPreRebootVerificationComplete(session); } // TODO(b/136257624): Temporary API to let PMS communicate with StagingManager. When all @@ -1279,8 +1259,6 @@ public class StagingManager { // Hold session ids before handler gets ready to do the verification. private IntArray mPendingSessionIds; private boolean mIsReady; - @GuardedBy("mVerificationRunning") - private final SparseBooleanArray mVerificationRunning = new SparseBooleanArray(); PreRebootVerificationHandler(Looper looper) { super(looper); @@ -1316,7 +1294,7 @@ public class StagingManager { } if (session.isDestroyed() || session.isStagedSessionFailed()) { // No point in running verification on a destroyed/failed session - onPreRebootVerificationComplete(sessionId); + onPreRebootVerificationComplete(session); return; } switch (msg.what) { @@ -1357,15 +1335,10 @@ public class StagingManager { } PackageInstallerSession session = getStagedSession(sessionId); - synchronized (mVerificationRunning) { - // Do not start verification on a session that has been abandoned - if (session == null || session.isDestroyed()) { - return; - } + if (session != null && session.notifyStagedStartPreRebootVerification()) { Slog.d(TAG, "Starting preRebootVerification for session " + sessionId); - mVerificationRunning.put(sessionId, true); + obtainMessage(MSG_PRE_REBOOT_VERIFICATION_START, sessionId, 0).sendToTarget(); } - obtainMessage(MSG_PRE_REBOOT_VERIFICATION_START, sessionId, 0).sendToTarget(); } private void onPreRebootVerificationFailure(PackageInstallerSession session, @@ -1376,28 +1349,14 @@ public class StagingManager { // failed on next step and staging directory for session will be deleted. } session.setStagedSessionFailed(errorCode, errorMessage); - onPreRebootVerificationComplete(session.sessionId); + onPreRebootVerificationComplete(session); } // Things to do when pre-reboot verification completes for a particular sessionId - private void onPreRebootVerificationComplete(int sessionId) { - // Remove it from mVerificationRunning so that verification is considered complete - synchronized (mVerificationRunning) { - Slog.d(TAG, "Stopping preRebootVerification for session " + sessionId); - mVerificationRunning.delete(sessionId); - } - // Check if the session was destroyed while pre-reboot verification was running. If so, - // abandon it again. - PackageInstallerSession session = getStagedSession(sessionId); - if (session != null && session.isDestroyed()) { - session.abandon(); - } - } - - private boolean isVerificationRunning(int sessionId) { - synchronized (mVerificationRunning) { - return mVerificationRunning.get(sessionId); - } + private void onPreRebootVerificationComplete(PackageInstallerSession session) { + int sessionId = session.sessionId; + Slog.d(TAG, "Stopping preRebootVerification for session " + sessionId); + session.notifyStagedEndPreRebootVerification(); } private void notifyPreRebootVerification_Start_Complete(int sessionId) { @@ -1516,7 +1475,7 @@ public class StagingManager { // or activate its apex, there won't be any files to work with as they will be cleaned // up by the system as part of abandonment. If session is abandoned before this point, // then the session is already destroyed and cannot be marked ready anymore. - onPreRebootVerificationComplete(session.sessionId); + onPreRebootVerificationComplete(session); // Proactively mark session as ready before calling apexd. Although this call order // looks counter-intuitive, this is the easiest way to ensure that session won't end up diff --git a/services/core/java/com/android/server/policy/PermissionPolicyService.java b/services/core/java/com/android/server/policy/PermissionPolicyService.java index ae2b040d0a89..e1cd9e334f4c 100644 --- a/services/core/java/com/android/server/policy/PermissionPolicyService.java +++ b/services/core/java/com/android/server/policy/PermissionPolicyService.java @@ -31,6 +31,7 @@ import android.annotation.UserIdInt; import android.app.AppOpsManager; import android.app.AppOpsManagerInternal; import android.content.BroadcastReceiver; +import android.content.ContentResolver; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; @@ -242,8 +243,9 @@ public final class PermissionPolicyService extends SystemService { public void onReceive(Context context, Intent intent) { boolean hasSetupRun = true; try { - hasSetupRun = Settings.Secure.getInt(getContext().getContentResolver(), - Settings.Secure.USER_SETUP_COMPLETE) != 0; + final ContentResolver cr = getContext().getContentResolver(); + hasSetupRun = Settings.Secure.getIntForUser(cr, + Settings.Secure.USER_SETUP_COMPLETE, cr.getUserId()) != 0; } catch (Settings.SettingNotFoundException e) { // Ignore error, assume setup has run } diff --git a/services/core/java/com/android/server/timezonedetector/ConfigurationInternal.java b/services/core/java/com/android/server/timezonedetector/ConfigurationInternal.java index aee3d8d3499b..b68c54fc6365 100644 --- a/services/core/java/com/android/server/timezonedetector/ConfigurationInternal.java +++ b/services/core/java/com/android/server/timezonedetector/ConfigurationInternal.java @@ -25,6 +25,7 @@ import android.annotation.NonNull; import android.annotation.UserIdInt; import android.app.timezonedetector.TimeZoneCapabilities; import android.app.timezonedetector.TimeZoneConfiguration; +import android.os.UserHandle; import java.util.Objects; @@ -56,6 +57,12 @@ public final class ConfigurationInternal { return mUserId; } + /** Returns the handle of the user this configuration is associated with. */ + @NonNull + public UserHandle getUserHandle() { + return UserHandle.of(mUserId); + } + /** Returns true if the user allowed to modify time zone configuration. */ public boolean isUserConfigAllowed() { return mUserConfigAllowed; @@ -198,13 +205,13 @@ public final class ConfigurationInternal { @Override public String toString() { - return "TimeZoneDetectorConfiguration{" + return "ConfigurationInternal{" + "mUserId=" + mUserId - + "mUserConfigAllowed=" + mUserConfigAllowed - + "mAutoDetectionSupported=" + mAutoDetectionSupported - + "mAutoDetectionEnabled=" + mAutoDetectionEnabled - + "mLocationEnabled=" + mLocationEnabled - + "mGeoDetectionEnabled=" + mGeoDetectionEnabled + + ", mUserConfigAllowed=" + mUserConfigAllowed + + ", mAutoDetectionSupported=" + mAutoDetectionSupported + + ", mAutoDetectionEnabled=" + mAutoDetectionEnabled + + ", mLocationEnabled=" + mLocationEnabled + + ", mGeoDetectionEnabled=" + mGeoDetectionEnabled + '}'; } diff --git a/services/core/java/com/android/server/timezonedetector/TimeZoneDetectorShellCommand.java b/services/core/java/com/android/server/timezonedetector/TimeZoneDetectorShellCommand.java index 3230ef192b4b..a8d5c0282025 100644 --- a/services/core/java/com/android/server/timezonedetector/TimeZoneDetectorShellCommand.java +++ b/services/core/java/com/android/server/timezonedetector/TimeZoneDetectorShellCommand.java @@ -23,7 +23,7 @@ import java.io.PrintWriter; import java.util.function.Consumer; import java.util.function.Supplier; -/** Implemented the shell command interface for {@link TimeZoneDetectorService}. */ +/** Implements the shell command interface for {@link TimeZoneDetectorService}. */ class TimeZoneDetectorShellCommand extends ShellCommand { private final TimeZoneDetectorService mInterface; diff --git a/services/core/java/com/android/server/trust/TrustManagerService.java b/services/core/java/com/android/server/trust/TrustManagerService.java index 386f390c6cb9..89b108c24630 100644 --- a/services/core/java/com/android/server/trust/TrustManagerService.java +++ b/services/core/java/com/android/server/trust/TrustManagerService.java @@ -126,6 +126,8 @@ public class TrustManagerService extends SystemService { private static final String TRUST_TIMEOUT_ALARM_TAG = "TrustManagerService.trustTimeoutForUser"; private static final long TRUST_TIMEOUT_IN_MILLIS = 4 * 60 * 60 * 1000; + private static final String PRIV_NAMESPACE = "http://schemas.android.com/apk/prv/res/android"; + private final ArraySet<AgentInfo> mActiveAgents = new ArraySet<>(); private final ArrayList<ITrustListener> mTrustListeners = new ArrayList<>(); private final Receiver mReceiver = new Receiver(); @@ -811,8 +813,8 @@ public class TrustManagerService extends SystemService { TypedArray sa = res .obtainAttributes(attrs, com.android.internal.R.styleable.TrustAgent); cn = sa.getString(com.android.internal.R.styleable.TrustAgent_settingsActivity); - canUnlockProfile = sa.getBoolean( - com.android.internal.R.styleable.TrustAgent_unlockProfile, false); + canUnlockProfile = attrs.getAttributeBooleanValue( + PRIV_NAMESPACE, "unlockProfile", false); sa.recycle(); } catch (PackageManager.NameNotFoundException e) { caughtException = e; diff --git a/services/core/java/com/android/server/uri/UriGrantsManagerService.java b/services/core/java/com/android/server/uri/UriGrantsManagerService.java index 0b0bb7059f3b..53d51463295f 100644 --- a/services/core/java/com/android/server/uri/UriGrantsManagerService.java +++ b/services/core/java/com/android/server/uri/UriGrantsManagerService.java @@ -115,7 +115,7 @@ public class UriGrantsManagerService extends IUriGrantsManager.Stub { private static final String TAG = "UriGrantsManagerService"; // Maximum number of persisted Uri grants a package is allowed private static final int MAX_PERSISTED_URI_GRANTS = 512; - private static final boolean ENABLE_DYNAMIC_PERMISSIONS = true; + private static final boolean ENABLE_DYNAMIC_PERMISSIONS = false; private final Object mLock = new Object(); private final H mH; diff --git a/services/core/java/com/android/server/wm/ActivityRecord.java b/services/core/java/com/android/server/wm/ActivityRecord.java index 9f68d627622c..6df46ed2532b 100644 --- a/services/core/java/com/android/server/wm/ActivityRecord.java +++ b/services/core/java/com/android/server/wm/ActivityRecord.java @@ -133,6 +133,7 @@ import static com.android.server.wm.ActivityRecordProto.LAST_SURFACE_SHOWING; import static com.android.server.wm.ActivityRecordProto.NAME; import static com.android.server.wm.ActivityRecordProto.NUM_DRAWN_WINDOWS; import static com.android.server.wm.ActivityRecordProto.NUM_INTERESTING_WINDOWS; +import static com.android.server.wm.ActivityRecordProto.PIP_AUTO_ENTER_ALLOWED; import static com.android.server.wm.ActivityRecordProto.PROC_ID; import static com.android.server.wm.ActivityRecordProto.REPORTED_DRAWN; import static com.android.server.wm.ActivityRecordProto.REPORTED_VISIBLE; @@ -4741,6 +4742,11 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A // returns. Just need to confirm this reasoning makes sense. final boolean deferHidingClient = canEnterPictureInPicture && !isState(STARTED, STOPPING, STOPPED, PAUSED); + if (deferHidingClient && pictureInPictureArgs.isAutoEnterAllowed()) { + // Go ahead and just put the activity in pip if it supports auto-pip. + mAtmService.enterPictureInPictureMode(this, pictureInPictureArgs); + return; + } setDeferHidingClient(deferHidingClient); setVisibility(false); @@ -7678,6 +7684,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A if (hasProcess()) { proto.write(PROC_ID, app.getPid()); } + proto.write(PIP_AUTO_ENTER_ALLOWED, pictureInPictureArgs.isAutoEnterAllowed()); } @Override @@ -7786,42 +7793,40 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A /** Gets the horizontal centered container bounds for size compatibility mode. */ void getContainerBounds(Rect outAppBounds, Rect outBounds, int rotation, int orientation, boolean orientationRequested, boolean canChangeOrientation) { + getFrameByOrientation(outBounds, orientation); if (mIsFloating) { - getFrameByOrientation(outBounds, orientation); outAppBounds.set(outBounds); return; } - if (canChangeOrientation) { - getBoundsByRotation(outBounds, rotation); - if (orientationRequested) { - getFrameByOrientation(outAppBounds, orientation); - } else { - outAppBounds.set(outBounds); - } - } else { - if (orientationRequested) { - getFrameByOrientation(outBounds, orientation); - if ((outBounds.width() > outBounds.height()) != (mWidth > mHeight)) { - // The orientation is mismatched but the display cannot rotate. The bounds - // will fit to the short side of display. - if (orientation == ORIENTATION_LANDSCAPE) { - outBounds.bottom = (int) ((float) mWidth * mWidth / mHeight); - outBounds.right = mWidth; - } else { - outBounds.bottom = mHeight; - outBounds.right = (int) ((float) mHeight * mHeight / mWidth); - } - outBounds.offset( - getHorizontalCenterOffset(mWidth, outBounds.width()), 0 /* dy */); - } + getBoundsByRotation(outAppBounds, rotation); + final int dW = outAppBounds.width(); + final int dH = outAppBounds.height(); + final boolean isOrientationMismatched = + ((outBounds.width() > outBounds.height()) != (dW > dH)); + + if (isOrientationMismatched && !canChangeOrientation && orientationRequested) { + // The orientation is mismatched but the display cannot rotate. The bounds will fit + // to the short side of container. + if (orientation == ORIENTATION_LANDSCAPE) { + outBounds.bottom = (int) ((float) dW * dW / dH); + outBounds.right = dW; } else { - outBounds.set(0, 0, mWidth, mHeight); + outBounds.bottom = dH; + outBounds.right = (int) ((float) dH * dH / dW); } - outAppBounds.set(outBounds); - } - - if (rotation != ROTATION_UNDEFINED) { + outBounds.offset(getHorizontalCenterOffset(mWidth, outBounds.width()), 0 /* dy */); + } + outAppBounds.set(outBounds); + + if (isOrientationMismatched) { + // One side of container is smaller than the requested size, then it will be scaled + // and the final position will be calculated according to the parent container and + // scale, so the original size shouldn't be shrunk by insets. + final Rect insets = mNonDecorInsets[rotation]; + outBounds.offset(insets.left, insets.top); + outAppBounds.offset(insets.left, insets.top); + } else if (rotation != ROTATION_UNDEFINED) { // Ensure the app bounds won't overlap with insets. Task.intersectWithInsetsIfFits(outAppBounds, outBounds, mNonDecorInsets[rotation]); } diff --git a/services/core/java/com/android/server/wm/ActivityTaskManagerService.java b/services/core/java/com/android/server/wm/ActivityTaskManagerService.java index 505233cd8a4a..080a438df357 100644 --- a/services/core/java/com/android/server/wm/ActivityTaskManagerService.java +++ b/services/core/java/com/android/server/wm/ActivityTaskManagerService.java @@ -253,7 +253,6 @@ import com.android.internal.util.function.pooled.PooledLambda; import com.android.server.AttributeCache; import com.android.server.LocalServices; import com.android.server.SystemService; -import com.android.server.SystemService.TargetUser; import com.android.server.SystemServiceManager; import com.android.server.UiThread; import com.android.server.Watchdog; @@ -4059,6 +4058,60 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub { && r.getRootTask().isInTask(r) != null; } + /** + * Puts the given activity in picture in picture mode if possible. + * + * @return true if the activity is now in picture-in-picture mode, or false if it could not + * enter picture-in-picture mode. + */ + boolean enterPictureInPictureMode(ActivityRecord r, final PictureInPictureParams params) { + // If the activity is already in picture in picture mode, then just return early + if (isInPictureInPictureMode(r)) { + return true; + } + + // Activity supports picture-in-picture, now check that we can enter PiP at this + // point, if it is + if (!r.checkEnterPictureInPictureState("enterPictureInPictureMode", + false /* beforeStopping */)) { + return false; + } + + final Runnable enterPipRunnable = () -> { + synchronized (mGlobalLock) { + if (r.getParent() == null) { + Slog.e(TAG, "Skip enterPictureInPictureMode, destroyed " + r); + return; + } + // Only update the saved args from the args that are set + r.setPictureInPictureParams(params); + final float aspectRatio = r.pictureInPictureArgs.getAspectRatio(); + final List<RemoteAction> actions = r.pictureInPictureArgs.getActions(); + mRootWindowContainer.moveActivityToPinnedStack( + r, "enterPictureInPictureMode"); + final Task stack = r.getRootTask(); + stack.setPictureInPictureAspectRatio(aspectRatio); + stack.setPictureInPictureActions(actions); + } + }; + + if (isKeyguardLocked()) { + // If the keyguard is showing or occluded, then try and dismiss it before + // entering picture-in-picture (this will prompt the user to authenticate if the + // device is currently locked). + dismissKeyguard(r.appToken, new KeyguardDismissCallback() { + @Override + public void onDismissSucceeded() { + mH.post(enterPipRunnable); + } + }, null /* message */); + } else { + // Enter picture in picture immediately otherwise + enterPipRunnable.run(); + } + return true; + } + @Override public boolean enterPictureInPictureMode(IBinder token, final PictureInPictureParams params) { final long origId = Binder.clearCallingIdentity(); @@ -4066,52 +4119,7 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub { synchronized (mGlobalLock) { final ActivityRecord r = ensureValidPictureInPictureActivityParamsLocked( "enterPictureInPictureMode", token, params); - - // If the activity is already in picture in picture mode, then just return early - if (isInPictureInPictureMode(r)) { - return true; - } - - // Activity supports picture-in-picture, now check that we can enter PiP at this - // point, if it is - if (!r.checkEnterPictureInPictureState("enterPictureInPictureMode", - false /* beforeStopping */)) { - return false; - } - - final Runnable enterPipRunnable = () -> { - synchronized (mGlobalLock) { - if (r.getParent() == null) { - Slog.e(TAG, "Skip enterPictureInPictureMode, destroyed " + r); - return; - } - // Only update the saved args from the args that are set - r.setPictureInPictureParams(params); - final float aspectRatio = r.pictureInPictureArgs.getAspectRatio(); - final List<RemoteAction> actions = r.pictureInPictureArgs.getActions(); - mRootWindowContainer.moveActivityToPinnedStack( - r, "enterPictureInPictureMode"); - final Task stack = r.getRootTask(); - stack.setPictureInPictureAspectRatio(aspectRatio); - stack.setPictureInPictureActions(actions); - } - }; - - if (isKeyguardLocked()) { - // If the keyguard is showing or occluded, then try and dismiss it before - // entering picture-in-picture (this will prompt the user to authenticate if the - // device is currently locked). - dismissKeyguard(token, new KeyguardDismissCallback() { - @Override - public void onDismissSucceeded() { - mH.post(enterPipRunnable); - } - }, null /* message */); - } else { - // Enter picture in picture immediately otherwise - enterPipRunnable.run(); - } - return true; + return enterPictureInPictureMode(r, params); } } finally { Binder.restoreCallingIdentity(origId); @@ -4857,6 +4865,11 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub { "Requested PIP on an activity that doesn't support it"); } + if (activity.pictureInPictureArgs.isAutoEnterAllowed()) { + enterPictureInPictureMode(activity, activity.pictureInPictureArgs); + return; + } + try { final ClientTransaction transaction = ClientTransaction.obtain( activity.app.getThread(), diff --git a/services/core/java/com/android/server/wm/DisplayContent.java b/services/core/java/com/android/server/wm/DisplayContent.java index aa8069a76330..8ccbd1166a44 100644 --- a/services/core/java/com/android/server/wm/DisplayContent.java +++ b/services/core/java/com/android/server/wm/DisplayContent.java @@ -3488,7 +3488,11 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp return false; } return mWmService.mDisplayWindowSettings.shouldShowImeLocked(this) - || mWmService.mForceDesktopModeOnExternalDisplays; + || forceDesktopMode(); + } + + boolean forceDesktopMode() { + return mWmService.mForceDesktopModeOnExternalDisplays && !isDefaultDisplay && !isPrivate(); } private void setInputMethodTarget(WindowState target, boolean targetWaitingAnim) { @@ -4542,7 +4546,7 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp boolean supportsSystemDecorations() { return (mWmService.mDisplayWindowSettings.shouldShowSystemDecorsLocked(this) || (mDisplay.getFlags() & FLAG_SHOULD_SHOW_SYSTEM_DECORATIONS) != 0 - || mWmService.mForceDesktopModeOnExternalDisplays) + || forceDesktopMode()) // VR virtual display will be used to run and render 2D app within a VR experience. && mDisplayId != mWmService.mVr2dDisplayId // Do not show system decorations on untrusted virtual display. diff --git a/services/core/java/com/android/server/wm/DisplayPolicy.java b/services/core/java/com/android/server/wm/DisplayPolicy.java index abfbf2eb8b67..779f6b2d30cc 100644 --- a/services/core/java/com/android/server/wm/DisplayPolicy.java +++ b/services/core/java/com/android/server/wm/DisplayPolicy.java @@ -29,6 +29,7 @@ import static android.view.InsetsState.ITYPE_BOTTOM_DISPLAY_CUTOUT; import static android.view.InsetsState.ITYPE_BOTTOM_GESTURES; import static android.view.InsetsState.ITYPE_BOTTOM_TAPPABLE_ELEMENT; import static android.view.InsetsState.ITYPE_CAPTION_BAR; +import static android.view.InsetsState.ITYPE_IME; import static android.view.InsetsState.ITYPE_LEFT_DISPLAY_CUTOUT; import static android.view.InsetsState.ITYPE_LEFT_GESTURES; import static android.view.InsetsState.ITYPE_NAVIGATION_BAR; @@ -63,6 +64,7 @@ import static android.view.WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_M import static android.view.WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES; import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_FORCE_DRAW_BAR_BACKGROUNDS; import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_FORCE_SHOW_STATUS_BAR; +import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_INSET_PARENT_FRAME_BY_IME; import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_IS_SCREEN_DECOR; import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_STATUS_FORCE_SHOW_NAVIGATION; import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_TRUSTED_OVERLAY; @@ -898,10 +900,6 @@ public class DisplayPolicy { (int) attrs.hideTimeoutMilliseconds, AccessibilityManager.FLAG_CONTENT_TEXT); attrs.windowAnimations = com.android.internal.R.style.Animation_Toast; - // Toast can show with below conditions when the screen is locked. - if (canToastShowWhenLocked(callingPid)) { - attrs.flags |= WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED; - } // Toasts can't be clickable attrs.flags |= WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE; break; @@ -932,16 +930,6 @@ public class DisplayPolicy { } /** - * @return {@code true} if the calling activity initiate toast and is visible with - * {@link WindowManager.LayoutParams#FLAG_SHOW_WHEN_LOCKED} flag. - */ - boolean canToastShowWhenLocked(int callingPid) { - return mDisplayContent.forAllWindows(w -> { - return callingPid == w.mSession.mPid && w.isVisible() && w.canShowWhenLocked(); - }, true /* traverseTopToBottom */); - } - - /** * Check if a window can be added to the system. * * Currently enforces that two window types are singletons per display: @@ -1526,7 +1514,7 @@ public class DisplayPolicy { if (mInputConsumer == null) { return; } - showNavigationBar(); + showSystemBars(); // Any user activity always causes us to show the // navigation controls, if they had been hidden. // We also clear the low profile and only content @@ -1561,13 +1549,13 @@ public class DisplayPolicy { } } - private void showNavigationBar() { + private void showSystemBars() { final InsetsSourceProvider provider = mDisplayContent.getInsetsStateController() .peekSourceProvider(ITYPE_NAVIGATION_BAR); final InsetsControlTarget target = provider != null ? provider.getControlTarget() : null; if (target != null) { - target.showInsets(Type.navigationBars(), false /* fromIme */); + target.showInsets(Type.systemBars(), false /* fromIme */); } } } @@ -2055,6 +2043,7 @@ public class DisplayPolicy { final int type = attrs.type; final int fl = PolicyControl.getWindowFlags(win, attrs); + final int pfl = attrs.privateFlags; final int sim = attrs.softInputMode; displayFrames = win.getDisplayFrames(displayFrames); @@ -2102,6 +2091,13 @@ public class DisplayPolicy { df.set(dfu.left + left, dfu.top + top, dfu.right - right, dfu.bottom - bottom); if (attached == null) { pf.set(df); + if ((pfl & PRIVATE_FLAG_INSET_PARENT_FRAME_BY_IME) != 0) { + final InsetsSource source = mDisplayContent.getInsetsPolicy() + .getInsetsForDispatch(win).peekSource(ITYPE_IME); + if (source != null) { + pf.inset(source.calculateInsets(pf, false /* ignoreVisibility */)); + } + } vf.set(adjust != SOFT_INPUT_ADJUST_NOTHING ? displayFrames.mCurrent : displayFrames.mDock); } else { @@ -2118,8 +2114,8 @@ public class DisplayPolicy { if (cutoutMode != LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS) { final boolean attachedInParent = attached != null && !layoutInScreen; final InsetsState requestedInsetsState = win.getRequestedInsetsState(); - final boolean requestedFullscreen = - !requestedInsetsState.getSourceOrDefaultVisibility(ITYPE_STATUS_BAR); + final boolean requestedFullscreen = (fl & FLAG_FULLSCREEN) != 0 + || !requestedInsetsState.getSourceOrDefaultVisibility(ITYPE_STATUS_BAR); final boolean requestedHideNavigation = !requestedInsetsState.getSourceOrDefaultVisibility(ITYPE_NAVIGATION_BAR); diff --git a/services/core/java/com/android/server/wm/DisplayRotation.java b/services/core/java/com/android/server/wm/DisplayRotation.java index 0206787ef226..0f43e49b568b 100644 --- a/services/core/java/com/android/server/wm/DisplayRotation.java +++ b/services/core/java/com/android/server/wm/DisplayRotation.java @@ -330,10 +330,8 @@ public class DisplayRotation { // It's also not likely to rotate a TV screen. final boolean isTv = mContext.getPackageManager().hasSystemFeature( PackageManager.FEATURE_LEANBACK); - final boolean forceDesktopMode = - mService.mForceDesktopModeOnExternalDisplays && !isDefaultDisplay; mDefaultFixedToUserRotation = - (isCar || isTv || mService.mIsPc || forceDesktopMode) + (isCar || isTv || mService.mIsPc || mDisplayContent.forceDesktopMode()) // For debug purposes the next line turns this feature off with: // $ adb shell setprop config.override_forced_orient true // $ adb shell wm size reset diff --git a/services/core/java/com/android/server/wm/DisplayWindowSettings.java b/services/core/java/com/android/server/wm/DisplayWindowSettings.java index df7c07055e87..c8c83a6e34f0 100644 --- a/services/core/java/com/android/server/wm/DisplayWindowSettings.java +++ b/services/core/java/com/android/server/wm/DisplayWindowSettings.java @@ -248,7 +248,7 @@ class DisplayWindowSettings { writeSettingsIfNeeded(entry, displayInfo); } - private int getWindowingModeLocked(Entry entry, int displayId) { + private int getWindowingModeLocked(Entry entry, DisplayContent dc) { int windowingMode = entry != null ? entry.mWindowingMode : WindowConfiguration.WINDOWING_MODE_UNDEFINED; // This display used to be in freeform, but we don't support freeform anymore, so fall @@ -259,10 +259,8 @@ class DisplayWindowSettings { } // No record is present so use default windowing mode policy. if (windowingMode == WindowConfiguration.WINDOWING_MODE_UNDEFINED) { - final boolean forceDesktopMode = mService.mForceDesktopModeOnExternalDisplays - && displayId != Display.DEFAULT_DISPLAY; windowingMode = mService.mAtmService.mSupportsFreeformWindowManagement - && (mService.mIsPc || forceDesktopMode) + && (mService.mIsPc || dc.forceDesktopMode()) ? WindowConfiguration.WINDOWING_MODE_FREEFORM : WindowConfiguration.WINDOWING_MODE_FULLSCREEN; } @@ -272,7 +270,7 @@ class DisplayWindowSettings { int getWindowingModeLocked(DisplayContent dc) { final DisplayInfo displayInfo = dc.getDisplayInfo(); final Entry entry = getEntry(displayInfo); - return getWindowingModeLocked(entry, dc.getDisplayId()); + return getWindowingModeLocked(entry, dc); } void setWindowingModeLocked(DisplayContent dc, int mode) { @@ -382,7 +380,7 @@ class DisplayWindowSettings { final Entry entry = getOrCreateEntry(displayInfo); // Setting windowing mode first, because it may override overscan values later. - dc.setWindowingMode(getWindowingModeLocked(entry, dc.getDisplayId())); + dc.setWindowingMode(getWindowingModeLocked(entry, dc)); dc.getDisplayRotation().restoreSettings(entry.mUserRotationMode, entry.mUserRotation, entry.mFixedToUserRotation); diff --git a/services/core/java/com/android/server/wm/OWNERS b/services/core/java/com/android/server/wm/OWNERS index 4be4c896cbff..1077736cebb5 100644 --- a/services/core/java/com/android/server/wm/OWNERS +++ b/services/core/java/com/android/server/wm/OWNERS @@ -11,3 +11,4 @@ erosky@google.com riddlehsu@google.com louischang@google.com winsonc@google.com +tigerhuang@google.com diff --git a/services/core/java/com/android/server/wm/Task.java b/services/core/java/com/android/server/wm/Task.java index 70fd860f21f2..c35d73282442 100644 --- a/services/core/java/com/android/server/wm/Task.java +++ b/services/core/java/com/android/server/wm/Task.java @@ -5428,6 +5428,7 @@ class Task extends WindowContainer<WindowContainer> { mAtmService.updateCpuStats(); boolean pauseImmediately = false; + boolean shouldAutoPip = false; if (resuming != null && (resuming.info.flags & FLAG_RESUME_WHILE_PAUSING) != 0) { // If the flag RESUME_WHILE_PAUSING is set, then continue to schedule the previous // activity to be paused, while at the same time resuming the new resume activity @@ -5435,26 +5436,39 @@ class Task extends WindowContainer<WindowContainer> { // activities a chance to enter Pip before resuming the next activity. final boolean lastResumedCanPip = prev != null && prev.checkEnterPictureInPictureState( "shouldResumeWhilePausing", userLeaving); - if (!lastResumedCanPip) { + if (lastResumedCanPip && prev.pictureInPictureArgs.isAutoEnterAllowed()) { + shouldAutoPip = true; + } else if (!lastResumedCanPip) { pauseImmediately = true; + } else { + // The previous activity may still enter PIP even though it did not allow auto-PIP. } } + boolean didAutoPip = false; if (prev.attachedToProcess()) { - if (DEBUG_PAUSE) Slog.v(TAG_PAUSE, "Enqueueing pending pause: " + prev); - try { - EventLogTags.writeWmPauseActivity(prev.mUserId, System.identityHashCode(prev), - prev.shortComponentName, "userLeaving=" + userLeaving); - - mAtmService.getLifecycleManager().scheduleTransaction(prev.app.getThread(), - prev.appToken, PauseActivityItem.obtain(prev.finishing, userLeaving, - prev.configChangeFlags, pauseImmediately)); - } catch (Exception e) { - // Ignore exception, if process died other code will cleanup. - Slog.w(TAG, "Exception thrown during pause", e); + if (shouldAutoPip) { + if (DEBUG_PAUSE) { + Slog.d(TAG_PAUSE, "Auto-PIP allowed, entering PIP mode directly: " + prev); + } + didAutoPip = mAtmService.enterPictureInPictureMode(prev, prev.pictureInPictureArgs); mPausingActivity = null; - mLastPausedActivity = null; - mLastNoHistoryActivity = null; + } else { + if (DEBUG_PAUSE) Slog.v(TAG_PAUSE, "Enqueueing pending pause: " + prev); + try { + EventLogTags.writeWmPauseActivity(prev.mUserId, System.identityHashCode(prev), + prev.shortComponentName, "userLeaving=" + userLeaving); + + mAtmService.getLifecycleManager().scheduleTransaction(prev.app.getThread(), + prev.appToken, PauseActivityItem.obtain(prev.finishing, userLeaving, + prev.configChangeFlags, pauseImmediately)); + } catch (Exception e) { + // Ignore exception, if process died other code will cleanup. + Slog.w(TAG, "Exception thrown during pause", e); + mPausingActivity = null; + mLastPausedActivity = null; + mLastNoHistoryActivity = null; + } } } else { mPausingActivity = null; @@ -5468,6 +5482,11 @@ class Task extends WindowContainer<WindowContainer> { mStackSupervisor.acquireLaunchWakelock(); } + if (didAutoPip) { + // Already entered PIP mode, no need to keep pausing. + return true; + } + if (mPausingActivity != null) { // Have the window manager pause its key dispatching until the new // activity has started. If we're pausing the activity just because diff --git a/services/core/java/com/android/server/wm/TaskOrganizerController.java b/services/core/java/com/android/server/wm/TaskOrganizerController.java index 63a595e3bc17..d9290fb18f08 100644 --- a/services/core/java/com/android/server/wm/TaskOrganizerController.java +++ b/services/core/java/com/android/server/wm/TaskOrganizerController.java @@ -38,7 +38,6 @@ import android.os.Binder; import android.os.IBinder; import android.os.RemoteException; import android.util.Slog; -import android.util.SparseBooleanArray; import android.view.SurfaceControl; import android.window.ITaskOrganizer; import android.window.ITaskOrganizerController; @@ -54,7 +53,6 @@ import java.util.HashMap; import java.util.HashSet; import java.util.LinkedList; import java.util.List; -import java.util.Set; import java.util.WeakHashMap; import java.util.function.Consumer; diff --git a/services/core/java/com/android/server/wm/TaskSnapshotController.java b/services/core/java/com/android/server/wm/TaskSnapshotController.java index e3112efdead2..f39fa1b7fbc8 100644 --- a/services/core/java/com/android/server/wm/TaskSnapshotController.java +++ b/services/core/java/com/android/server/wm/TaskSnapshotController.java @@ -16,7 +16,9 @@ package com.android.server.wm; +import static android.app.WindowConfiguration.WINDOWING_MODE_UNDEFINED; import static android.view.WindowManager.LayoutParams.FLAG_SHOW_WALLPAPER; +import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION; import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_SCREENSHOT; import static com.android.server.wm.WindowManagerDebugConfig.TAG_WITH_CLASS_NAME; @@ -615,8 +617,8 @@ class TaskSnapshotController { return state.calculateInsets(frame, null /* ignoringVisibilityState */, false /* isScreenRound */, false /* alwaysConsumeSystemBars */, null /* displayCutout */, 0 /* legacySoftInputMode */, 0 /* legacyWindowFlags */, - 0 /* legacySystemUiFlags */, null /* typeSideMap */).getInsets( - WindowInsets.Type.systemBars()).toRect(); + 0 /* legacySystemUiFlags */, TYPE_APPLICATION, WINDOWING_MODE_UNDEFINED, + null /* typeSideMap */).getInsets(WindowInsets.Type.systemBars()).toRect(); } void dump(PrintWriter pw, String prefix) { diff --git a/services/core/java/com/android/server/wm/WindowManagerService.java b/services/core/java/com/android/server/wm/WindowManagerService.java index 19179a808d7c..017747f03ca0 100644 --- a/services/core/java/com/android/server/wm/WindowManagerService.java +++ b/services/core/java/com/android/server/wm/WindowManagerService.java @@ -1410,7 +1410,8 @@ public class WindowManagerService extends IWindowManager.Stub if (!displayContent.hasAccess(session.mUid)) { ProtoLog.w(WM_ERROR, "Attempted to add window to a display for which the application " - + "does not have access: %d. Aborting.", displayId); + + "does not have access: %d. Aborting.", + displayContent.getDisplayId()); return WindowManagerGlobal.ADD_INVALID_DISPLAY; } diff --git a/services/tests/mockingservicestests/src/com/android/server/DeviceIdleControllerTest.java b/services/tests/mockingservicestests/src/com/android/server/DeviceIdleControllerTest.java index 6cd083e11754..f4c6918c0e96 100644 --- a/services/tests/mockingservicestests/src/com/android/server/DeviceIdleControllerTest.java +++ b/services/tests/mockingservicestests/src/com/android/server/DeviceIdleControllerTest.java @@ -67,7 +67,6 @@ import static org.mockito.Mockito.verify; import android.app.ActivityManagerInternal; import android.app.AlarmManager; import android.app.IActivityManager; -import android.content.ContentResolver; import android.content.Context; import android.content.Intent; import android.hardware.Sensor; @@ -87,6 +86,7 @@ import android.os.PowerManager; import android.os.PowerManagerInternal; import android.os.PowerSaveState; import android.os.SystemClock; +import android.provider.DeviceConfig; import androidx.test.runner.AndroidJUnit4; @@ -99,6 +99,7 @@ import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.ArgumentCaptor; +import org.mockito.ArgumentMatchers; import org.mockito.InOrder; import org.mockito.Mock; import org.mockito.MockitoSession; @@ -106,6 +107,8 @@ import org.mockito.invocation.InvocationOnMock; import org.mockito.quality.Strictness; import org.mockito.stubbing.Answer; +import java.util.concurrent.Executor; + /** * Tests for {@link com.android.server.DeviceIdleController}. */ @@ -124,8 +127,6 @@ public class DeviceIdleControllerTest { @Mock private ConnectivityManager mConnectivityManager; @Mock - private ContentResolver mContentResolver; - @Mock private IActivityManager mIActivityManager; @Mock private LocationManager mLocationManager; @@ -294,6 +295,7 @@ public class DeviceIdleControllerTest { mMockingSession = mockitoSession() .initMocks(this) .strictness(Strictness.LENIENT) + .spyStatic(DeviceConfig.class) .spyStatic(LocalServices.class) .startMocking(); spyOn(getContext()); @@ -310,6 +312,14 @@ public class DeviceIdleControllerTest { .thenReturn(mock(PowerSaveState.class)); doReturn(mock(NetworkPolicyManagerInternal.class)) .when(() -> LocalServices.getService(NetworkPolicyManagerInternal.class)); + doAnswer((Answer<Void>) invocationOnMock -> null) + .when(() -> DeviceConfig.addOnPropertiesChangedListener( + anyString(), any(Executor.class), + any(DeviceConfig.OnPropertiesChangedListener.class))); + doAnswer((Answer<DeviceConfig.Properties>) invocationOnMock + -> mock(DeviceConfig.Properties.class)) + .when(() -> DeviceConfig.getProperties( + anyString(), ArgumentMatchers.<String>any())); when(mPowerManager.newWakeLock(anyInt(), anyString())).thenReturn(mWakeLock); doNothing().when(mWakeLock).acquire(); doNothing().when(mAlarmManager).set(anyInt(), anyLong(), anyString(), any(), any()); @@ -319,7 +329,6 @@ public class DeviceIdleControllerTest { mAppStateTracker = new AppStateTrackerForTest(getContext(), Looper.getMainLooper()); mAnyMotionDetector = new AnyMotionDetectorForTest(); mInjector = new InjectorForTest(getContext()); - doNothing().when(mContentResolver).registerContentObserver(any(), anyBoolean(), any()); mDeviceIdleController = new DeviceIdleController(getContext(), mInjector); spyOn(mDeviceIdleController); @@ -330,8 +339,7 @@ public class DeviceIdleControllerTest { mDeviceIdleController.setLightEnabledForTest(true); // Get the same Constants object that mDeviceIdleController got. - mConstants = mInjector.getConstants(mDeviceIdleController, - mInjector.getHandler(mDeviceIdleController), mContentResolver); + mConstants = mInjector.getConstants(mDeviceIdleController); } @After diff --git a/services/tests/mockingservicestests/src/com/android/server/location/LocationProviderManagerTest.java b/services/tests/mockingservicestests/src/com/android/server/location/LocationProviderManagerTest.java index d6894cf2a4e8..80ad0a838bbb 100644 --- a/services/tests/mockingservicestests/src/com/android/server/location/LocationProviderManagerTest.java +++ b/services/tests/mockingservicestests/src/com/android/server/location/LocationProviderManagerTest.java @@ -274,60 +274,55 @@ public class LocationProviderManagerTest { @Test public void testGetLastLocation_Fine() { - LocationRequest request = LocationRequest.createFromDeprecatedProvider(NAME, 0, 0, false); - assertThat(mManager.getLastLocation(request, IDENTITY, PERMISSION_FINE)).isNull(); + assertThat(mManager.getLastLocation(IDENTITY, PERMISSION_FINE, false)).isNull(); Location loc = createLocation(NAME, mRandom); mProvider.setProviderLocation(loc); - assertThat(mManager.getLastLocation(request, IDENTITY, PERMISSION_FINE)).isEqualTo(loc); + assertThat(mManager.getLastLocation(IDENTITY, PERMISSION_FINE, false)).isEqualTo(loc); } @Test public void testGetLastLocation_Coarse() { - LocationRequest request = LocationRequest.createFromDeprecatedProvider(NAME, 0, 0, false); - assertThat(mManager.getLastLocation(request, IDENTITY, PERMISSION_FINE)).isNull(); + assertThat(mManager.getLastLocation(IDENTITY, PERMISSION_FINE, false)).isNull(); Location loc = createLocation(NAME, mRandom); mProvider.setProviderLocation(loc); - Location coarse = mManager.getLastLocation(request, IDENTITY, PERMISSION_COARSE); + Location coarse = mManager.getLastLocation(IDENTITY, PERMISSION_COARSE, false); assertThat(coarse).isNotEqualTo(loc); assertThat(coarse).isNearby(loc, 5000); } @Test public void testGetLastLocation_Bypass() { - LocationRequest request = LocationRequest.createFromDeprecatedProvider(NAME, 0, 0, false); - LocationRequest bypassRequest = LocationRequest.createFromDeprecatedProvider(NAME, 0, 0, - false).setLocationSettingsIgnored(true); - assertThat(mManager.getLastLocation(request, IDENTITY, PERMISSION_FINE)).isNull(); - assertThat(mManager.getLastLocation(bypassRequest, IDENTITY, PERMISSION_FINE)).isNull(); + assertThat(mManager.getLastLocation(IDENTITY, PERMISSION_FINE, false)).isNull(); + assertThat(mManager.getLastLocation(IDENTITY, PERMISSION_FINE, true)).isNull(); Location loc = createLocation(NAME, mRandom); mProvider.setProviderLocation(loc); - assertThat(mManager.getLastLocation(request, IDENTITY, PERMISSION_FINE)).isEqualTo(loc); - assertThat(mManager.getLastLocation(bypassRequest, IDENTITY, PERMISSION_FINE)).isEqualTo( + assertThat(mManager.getLastLocation(IDENTITY, PERMISSION_FINE, false)).isEqualTo(loc); + assertThat(mManager.getLastLocation(IDENTITY, PERMISSION_FINE, true)).isEqualTo( loc); mProvider.setProviderAllowed(false); - assertThat(mManager.getLastLocation(request, IDENTITY, PERMISSION_FINE)).isNull(); - assertThat(mManager.getLastLocation(bypassRequest, IDENTITY, PERMISSION_FINE)).isEqualTo( + assertThat(mManager.getLastLocation(IDENTITY, PERMISSION_FINE, false)).isNull(); + assertThat(mManager.getLastLocation(IDENTITY, PERMISSION_FINE, true)).isEqualTo( loc); loc = createLocation(NAME, mRandom); mProvider.setProviderLocation(loc); - assertThat(mManager.getLastLocation(request, IDENTITY, PERMISSION_FINE)).isNull(); - assertThat(mManager.getLastLocation(bypassRequest, IDENTITY, PERMISSION_FINE)).isEqualTo( + assertThat(mManager.getLastLocation(IDENTITY, PERMISSION_FINE, false)).isNull(); + assertThat(mManager.getLastLocation(IDENTITY, PERMISSION_FINE, true)).isEqualTo( loc); mProvider.setProviderAllowed(true); - assertThat(mManager.getLastLocation(request, IDENTITY, PERMISSION_FINE)).isNull(); - assertThat(mManager.getLastLocation(bypassRequest, IDENTITY, PERMISSION_FINE)).isEqualTo( + assertThat(mManager.getLastLocation(IDENTITY, PERMISSION_FINE, false)).isNull(); + assertThat(mManager.getLastLocation(IDENTITY, PERMISSION_FINE, true)).isEqualTo( loc); loc = createLocation(NAME, mRandom); mProvider.setProviderLocation(loc); - assertThat(mManager.getLastLocation(request, IDENTITY, PERMISSION_FINE)).isEqualTo(loc); - assertThat(mManager.getLastLocation(bypassRequest, IDENTITY, PERMISSION_FINE)).isEqualTo( + assertThat(mManager.getLastLocation(IDENTITY, PERMISSION_FINE, false)).isEqualTo(loc); + assertThat(mManager.getLastLocation(IDENTITY, PERMISSION_FINE, true)).isEqualTo( loc); } @@ -337,13 +332,12 @@ public class LocationProviderManagerTest { mockProvider.setAllowed(true); mManager.setMockProvider(mockProvider); - LocationRequest request = LocationRequest.createFromDeprecatedProvider(NAME, 0, 0, false); Location loc = createLocation(NAME, mRandom); mockProvider.setProviderLocation(loc); - assertThat(mManager.getLastLocation(request, IDENTITY, PERMISSION_FINE)).isEqualTo(loc); + assertThat(mManager.getLastLocation(IDENTITY, PERMISSION_FINE, false)).isEqualTo(loc); mManager.setMockProvider(null); - assertThat(mManager.getLastLocation(request, IDENTITY, PERMISSION_FINE)).isNull(); + assertThat(mManager.getLastLocation(IDENTITY, PERMISSION_FINE, false)).isNull(); } @Test @@ -351,13 +345,12 @@ public class LocationProviderManagerTest { Location loc1 = createLocation(NAME, mRandom); mManager.injectLastLocation(loc1, CURRENT_USER); - LocationRequest request = LocationRequest.createFromDeprecatedProvider(NAME, 0, 0, false); - assertThat(mManager.getLastLocation(request, IDENTITY, PERMISSION_FINE)).isEqualTo(loc1); + assertThat(mManager.getLastLocation(IDENTITY, PERMISSION_FINE, false)).isEqualTo(loc1); Location loc2 = createLocation(NAME, mRandom); mManager.injectLastLocation(loc2, CURRENT_USER); - assertThat(mManager.getLastLocation(request, IDENTITY, PERMISSION_FINE)).isEqualTo(loc1); + assertThat(mManager.getLastLocation(IDENTITY, PERMISSION_FINE, false)).isEqualTo(loc1); } @Test @@ -381,9 +374,7 @@ public class LocationProviderManagerTest { Location loc = createLocation(NAME, mRandom); mProvider.setProviderLocation(loc); - LocationRequest request = LocationRequest.createFromDeprecatedProvider(PASSIVE_PROVIDER, 0, - 0, false); - assertThat(mPassive.getLastLocation(request, IDENTITY, PERMISSION_FINE)).isEqualTo(loc); + assertThat(mPassive.getLastLocation(IDENTITY, PERMISSION_FINE, false)).isEqualTo(loc); } @Test diff --git a/services/tests/servicestests/src/com/android/server/display/DisplayManagerServiceTest.java b/services/tests/servicestests/src/com/android/server/display/DisplayManagerServiceTest.java index b1f3871274ac..73dda0736d2f 100644 --- a/services/tests/servicestests/src/com/android/server/display/DisplayManagerServiceTest.java +++ b/services/tests/servicestests/src/com/android/server/display/DisplayManagerServiceTest.java @@ -19,6 +19,7 @@ package com.android.server.display; import static com.android.server.display.VirtualDisplayAdapter.UNIQUE_ID_PREFIX; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; @@ -28,18 +29,23 @@ import static org.mockito.Mockito.when; import android.app.PropertyInvalidatedCache; import android.content.Context; +import android.graphics.Insets; +import android.graphics.Rect; import android.hardware.display.BrightnessConfiguration; import android.hardware.display.Curve; import android.hardware.display.DisplayManager; +import android.hardware.display.DisplayManagerGlobal; import android.hardware.display.DisplayViewport; import android.hardware.display.DisplayedContentSample; import android.hardware.display.DisplayedContentSamplingAttributes; +import android.hardware.display.IDisplayManagerCallback; import android.hardware.display.IVirtualDisplayCallback; import android.hardware.display.VirtualDisplayConfig; import android.hardware.input.InputManagerInternal; import android.os.Handler; import android.os.IBinder; import android.view.Display; +import android.view.DisplayCutout; import android.view.DisplayInfo; import android.view.Surface; import android.view.SurfaceControl; @@ -282,6 +288,68 @@ public class DisplayManagerServiceTest { } /** + * Tests that there should be a display change notification to WindowManager to update its own + * internal state for things like display cutout when nonOverrideDisplayInfo is changed. + */ + @Test + public void testShouldNotifyChangeWhenNonOverrideDisplayInfoChanged() throws Exception { + DisplayManagerService displayManager = + new DisplayManagerService(mContext, mShortMockedInjector); + registerDefaultDisplays(displayManager); + displayManager.onBootPhase(SystemService.PHASE_WAIT_FOR_DEFAULT_DISPLAY); + + // Add the FakeDisplayDevice + FakeDisplayDevice displayDevice = new FakeDisplayDevice(); + DisplayDeviceInfo displayDeviceInfo = new DisplayDeviceInfo(); + displayDeviceInfo.width = 100; + displayDeviceInfo.height = 200; + final Rect zeroRect = new Rect(); + displayDeviceInfo.displayCutout = new DisplayCutout( + Insets.of(0, 10, 0, 0), + zeroRect, new Rect(0, 0, 10, 10), zeroRect, zeroRect); + displayDeviceInfo.flags = DisplayDeviceInfo.FLAG_DEFAULT_DISPLAY; + displayDevice.setDisplayDeviceInfo(displayDeviceInfo); + displayManager.handleDisplayDeviceAdded(displayDevice); + + // Find the display id of the added FakeDisplayDevice + DisplayManagerService.BinderService bs = displayManager.new BinderService(); + final int[] displayIds = bs.getDisplayIds(); + assertTrue(displayIds.length > 0); + int displayId = Display.INVALID_DISPLAY; + for (int i = 0; i < displayIds.length; i++) { + DisplayDeviceInfo ddi = displayManager.getDisplayDeviceInfoInternal(displayIds[i]); + if (displayDeviceInfo.equals(ddi)) { + displayId = displayIds[i]; + break; + } + } + assertFalse(displayId == Display.INVALID_DISPLAY); + + // Setup override DisplayInfo + DisplayInfo overrideInfo = bs.getDisplayInfo(displayId); + displayManager.setDisplayInfoOverrideFromWindowManagerInternal(displayId, overrideInfo); + + Handler handler = displayManager.getDisplayHandler(); + handler.runWithScissors(() -> { + }, 0 /* now */); + + // register display listener callback + FakeDisplayManagerCallback callback = new FakeDisplayManagerCallback(displayId); + bs.registerCallback(callback); + + // Simulate DisplayDevice change + DisplayDeviceInfo displayDeviceInfo2 = new DisplayDeviceInfo(); + displayDeviceInfo2.copyFrom(displayDeviceInfo); + displayDeviceInfo2.displayCutout = null; + displayDevice.setDisplayDeviceInfo(displayDeviceInfo2); + displayManager.handleDisplayDeviceChanged(displayDevice); + + handler.runWithScissors(() -> { + }, 0 /* now */); + assertTrue(callback.mCalled); + } + + /** * Tests that we get a Runtime exception when we cannot initialize the default display. */ @Test @@ -512,4 +580,42 @@ public class DisplayManagerServiceTest { // flush the handler handler.runWithScissors(() -> {}, 0 /* now */); } + + private class FakeDisplayManagerCallback extends IDisplayManagerCallback.Stub { + int mDisplayId; + boolean mCalled = false; + + FakeDisplayManagerCallback(int displayId) { + mDisplayId = displayId; + } + + @Override + public void onDisplayEvent(int displayId, int event) { + if (displayId == mDisplayId && event == DisplayManagerGlobal.EVENT_DISPLAY_CHANGED) { + mCalled = true; + } + } + } + + private class FakeDisplayDevice extends DisplayDevice { + private DisplayDeviceInfo mDisplayDeviceInfo; + + FakeDisplayDevice() { + super(null, null, ""); + } + + public void setDisplayDeviceInfo(DisplayDeviceInfo displayDeviceInfo) { + mDisplayDeviceInfo = displayDeviceInfo; + } + + @Override + public boolean hasStableUniqueId() { + return false; + } + + @Override + public DisplayDeviceInfo getDisplayDeviceInfoLocked() { + return mDisplayDeviceInfo; + } + } } diff --git a/services/tests/servicestests/src/com/android/server/hdmi/HdmiCecLocalDevicePlaybackTest.java b/services/tests/servicestests/src/com/android/server/hdmi/HdmiCecLocalDevicePlaybackTest.java index 3f324a279270..0c35797b38ea 100644 --- a/services/tests/servicestests/src/com/android/server/hdmi/HdmiCecLocalDevicePlaybackTest.java +++ b/services/tests/servicestests/src/com/android/server/hdmi/HdmiCecLocalDevicePlaybackTest.java @@ -697,7 +697,8 @@ public class HdmiCecLocalDevicePlaybackTest { public void sendVolumeKeyEvent_toTv_activeSource() { mHdmiControlService.setHdmiCecVolumeControlEnabled(true); mHdmiControlService.setSystemAudioActivated(false); - mHdmiControlService.setActiveSource(mPlaybackLogicalAddress, mPlaybackPhysicalAddress); + mHdmiControlService.setActiveSource(mPlaybackLogicalAddress, mPlaybackPhysicalAddress, + "HdmiCecLocalDevicePlaybackTest"); mHdmiCecLocalDevicePlayback.sendVolumeKeyEvent(KeyEvent.KEYCODE_VOLUME_UP, true); mHdmiCecLocalDevicePlayback.sendVolumeKeyEvent(KeyEvent.KEYCODE_VOLUME_UP, false); @@ -716,7 +717,8 @@ public class HdmiCecLocalDevicePlaybackTest { public void sendVolumeKeyEvent_toAudio_activeSource() { mHdmiControlService.setHdmiCecVolumeControlEnabled(true); mHdmiControlService.setSystemAudioActivated(true); - mHdmiControlService.setActiveSource(mPlaybackLogicalAddress, mPlaybackPhysicalAddress); + mHdmiControlService.setActiveSource(mPlaybackLogicalAddress, mPlaybackPhysicalAddress, + "HdmiCecLocalDevicePlaybackTest"); mHdmiCecLocalDevicePlayback.sendVolumeKeyEvent(KeyEvent.KEYCODE_VOLUME_UP, true); mHdmiCecLocalDevicePlayback.sendVolumeKeyEvent(KeyEvent.KEYCODE_VOLUME_UP, false); @@ -735,7 +737,7 @@ public class HdmiCecLocalDevicePlaybackTest { public void sendVolumeKeyEvent_toTv_inactiveSource() { mHdmiControlService.setHdmiCecVolumeControlEnabled(true); mHdmiControlService.setSystemAudioActivated(false); - mHdmiControlService.setActiveSource(ADDR_TV, 0x0000); + mHdmiControlService.setActiveSource(ADDR_TV, 0x0000, "HdmiCecLocalDevicePlaybackTest"); mHdmiCecLocalDevicePlayback.sendVolumeKeyEvent(KeyEvent.KEYCODE_VOLUME_UP, true); mHdmiCecLocalDevicePlayback.sendVolumeKeyEvent(KeyEvent.KEYCODE_VOLUME_UP, false); @@ -754,7 +756,7 @@ public class HdmiCecLocalDevicePlaybackTest { public void sendVolumeKeyEvent_toAudio_inactiveSource() { mHdmiControlService.setHdmiCecVolumeControlEnabled(true); mHdmiControlService.setSystemAudioActivated(true); - mHdmiControlService.setActiveSource(ADDR_TV, 0x0000); + mHdmiControlService.setActiveSource(ADDR_TV, 0x0000, "HdmiCecLocalDevicePlaybackTest"); mHdmiCecLocalDevicePlayback.sendVolumeKeyEvent(KeyEvent.KEYCODE_VOLUME_UP, true); mHdmiCecLocalDevicePlayback.sendVolumeKeyEvent(KeyEvent.KEYCODE_VOLUME_UP, false); diff --git a/services/tests/servicestests/src/com/android/server/hdmi/HdmiControlServiceTest.java b/services/tests/servicestests/src/com/android/server/hdmi/HdmiControlServiceTest.java index 775e88750cef..31cf59ee7bde 100644 --- a/services/tests/servicestests/src/com/android/server/hdmi/HdmiControlServiceTest.java +++ b/services/tests/servicestests/src/com/android/server/hdmi/HdmiControlServiceTest.java @@ -63,7 +63,7 @@ import java.util.ArrayList; @RunWith(JUnit4.class) public class HdmiControlServiceTest { - private class HdmiCecLocalDeviceMyDevice extends HdmiCecLocalDevice { + private class HdmiCecLocalDeviceMyDevice extends HdmiCecLocalDeviceSource { private boolean mCanGoToStandby; private boolean mIsStandby; @@ -405,6 +405,83 @@ public class HdmiControlServiceTest { assertThat(callback2.mVolumeControlEnabled).isTrue(); } + @Test + public void setActiveSource_localDevice_playback() { + int physicalAddress = 0x1000; + mNativeWrapper.setPhysicalAddress(physicalAddress); + + mHdmiControlService.setActiveSource(mMyPlaybackDevice.mAddress, physicalAddress, + "HdmiControlServiceTest"); + + assertThat(mHdmiControlService.getLocalActiveSource().logicalAddress).isEqualTo( + mMyPlaybackDevice.mAddress); + assertThat(mHdmiControlService.getLocalActiveSource().physicalAddress).isEqualTo( + physicalAddress); + assertThat(mMyPlaybackDevice.mIsActiveSource).isTrue(); + assertThat(mMyAudioSystemDevice.mIsActiveSource).isFalse(); + } + + @Test + public void setActiveSource_localDevice_audio() { + int physicalAddress = 0x1000; + mNativeWrapper.setPhysicalAddress(physicalAddress); + + mHdmiControlService.setActiveSource(mMyAudioSystemDevice.mAddress, physicalAddress, + "HdmiControlServiceTest"); + + assertThat(mHdmiControlService.getLocalActiveSource().logicalAddress).isEqualTo( + mMyAudioSystemDevice.mAddress); + assertThat(mHdmiControlService.getLocalActiveSource().physicalAddress).isEqualTo( + physicalAddress); + assertThat(mMyPlaybackDevice.mIsActiveSource).isFalse(); + assertThat(mMyAudioSystemDevice.mIsActiveSource).isTrue(); + } + + @Test + public void setActiveSource_remoteDevice() { + int physicalAddress = 0x1000; + mNativeWrapper.setPhysicalAddress(physicalAddress); + + mHdmiControlService.setActiveSource(Constants.ADDR_TV, 0x0000, "HdmiControlServiceTest"); + + assertThat(mHdmiControlService.getLocalActiveSource().logicalAddress).isEqualTo( + Constants.ADDR_TV); + assertThat(mHdmiControlService.getLocalActiveSource().physicalAddress).isEqualTo(0x000); + assertThat(mMyPlaybackDevice.mIsActiveSource).isFalse(); + assertThat(mMyAudioSystemDevice.mIsActiveSource).isFalse(); + } + + @Test + public void setActiveSource_nonCecDevice() { + int physicalAddress = 0x1000; + mNativeWrapper.setPhysicalAddress(physicalAddress); + + mHdmiControlService.setActiveSource(Constants.ADDR_INVALID, 0x1234, + "HdmiControlServiceTest"); + + assertThat(mHdmiControlService.getLocalActiveSource().logicalAddress).isEqualTo( + Constants.ADDR_INVALID); + assertThat(mHdmiControlService.getLocalActiveSource().physicalAddress).isEqualTo(0x1234); + assertThat(mMyPlaybackDevice.mIsActiveSource).isFalse(); + assertThat(mMyAudioSystemDevice.mIsActiveSource).isFalse(); + } + + @Test + public void setActiveSource_unknown() { + int physicalAddress = 0x1000; + mNativeWrapper.setPhysicalAddress(physicalAddress); + + mHdmiControlService.setActiveSource(Constants.ADDR_INVALID, + Constants.INVALID_PHYSICAL_ADDRESS, "HdmiControlServiceTest"); + + assertThat(mHdmiControlService.getLocalActiveSource().logicalAddress).isEqualTo( + Constants.ADDR_INVALID); + assertThat(mHdmiControlService.getLocalActiveSource().physicalAddress).isEqualTo( + Constants.INVALID_PHYSICAL_ADDRESS); + assertThat(mMyPlaybackDevice.mIsActiveSource).isFalse(); + assertThat(mMyAudioSystemDevice.mIsActiveSource).isFalse(); + } + private static class VolumeControlFeatureCallback extends IHdmiCecVolumeControlFeatureListener.Stub { boolean mCallbackReceived = false; diff --git a/services/tests/servicestests/src/com/android/server/timezonedetector/TestState.java b/services/tests/servicestests/src/com/android/server/timezonedetector/TestState.java new file mode 100644 index 000000000000..7049efa1cc2f --- /dev/null +++ b/services/tests/servicestests/src/com/android/server/timezonedetector/TestState.java @@ -0,0 +1,92 @@ +/* + * Copyright (C) 2020 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.server.timezonedetector; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; + +import java.util.ArrayList; + +/** + * A test support class used for tracking a piece of state in test objects like fakes and mocks. + * State can optionally be initialized using {@link #init}, which sets the value to an initial + * value, but is not treated as a change. Calls to {@link #set} are tracked and can be checked for + * during tests. The change-tracking can be cleared by calling {@link #commitLatest}, which puts the + * object into an unchanged state and sets the initial value to the latest value passed to + * {@link #set}. + */ +public class TestState<T> { + private T mInitialValue; + private final ArrayList<T> mValues = new ArrayList<>(5); + + /** Sets the initial value for the state. */ + public void init(T value) { + mValues.clear(); + mInitialValue = value; + } + + /** Sets the latest value for the state. */ + public void set(T value) { + mValues.add(value); + } + + /** Returns {@code true} if {@link #set} has been called. */ + public boolean hasBeenSet() { + return mValues.size() > 0; + } + + /** Fails if {@link #set} has been called. */ + public void assertHasNotBeenSet() { + assertFalse(hasBeenSet()); + } + + /** Fails if {@link #set} has not been called. */ + public void assertHasBeenSet() { + assertTrue(hasBeenSet()); + } + + /** + * Clears tracked changes and re-initializes using the latest set value as the initial value. + */ + public void commitLatest() { + if (hasBeenSet()) { + mInitialValue = mValues.get(mValues.size() - 1); + mValues.clear(); + } + } + + /** Asserts the latest value passed to {@link #set} equals {@code expected}. */ + public void assertLatestEquals(T expected) { + assertEquals(expected, getLatest()); + } + + /** Asserts the number of times {@link #set} has been called. */ + public void assertChangeCount(int expectedCount) { + assertEquals(expectedCount, mValues.size()); + } + + /** + * Returns the latest value passed to {@link #set}. If {@link #set} hasn't been called then the + * initial value is returned. + */ + public T getLatest() { + if (hasBeenSet()) { + return mValues.get(mValues.size() - 1); + } + return mInitialValue; + } +} diff --git a/services/tests/servicestests/src/com/android/server/timezonedetector/TimeZoneDetectorStrategyImplTest.java b/services/tests/servicestests/src/com/android/server/timezonedetector/TimeZoneDetectorStrategyImplTest.java index 2bee5e5e7295..1cdf19319209 100644 --- a/services/tests/servicestests/src/com/android/server/timezonedetector/TimeZoneDetectorStrategyImplTest.java +++ b/services/tests/servicestests/src/com/android/server/timezonedetector/TimeZoneDetectorStrategyImplTest.java @@ -54,7 +54,6 @@ import org.junit.Test; import java.io.StringWriter; import java.util.Arrays; import java.util.Collections; -import java.util.LinkedList; import java.util.List; import java.util.concurrent.atomic.AtomicBoolean; @@ -994,55 +993,6 @@ public class TimeZoneDetectorStrategyImplTest { } } - /** Some piece of state that tests want to track. */ - private static class TestState<T> { - private T mInitialValue; - private LinkedList<T> mValues = new LinkedList<>(); - - void init(T value) { - mValues.clear(); - mInitialValue = value; - } - - void set(T value) { - mValues.addFirst(value); - } - - boolean hasBeenSet() { - return mValues.size() > 0; - } - - void assertHasNotBeenSet() { - assertFalse(hasBeenSet()); - } - - void assertHasBeenSet() { - assertTrue(hasBeenSet()); - } - - void commitLatest() { - if (hasBeenSet()) { - mInitialValue = mValues.getLast(); - mValues.clear(); - } - } - - void assertLatestEquals(T expected) { - assertEquals(expected, getLatest()); - } - - void assertChangeCount(int expectedCount) { - assertEquals(expectedCount, mValues.size()); - } - - public T getLatest() { - if (hasBeenSet()) { - return mValues.getFirst(); - } - return mInitialValue; - } - } - /** * A "fluent" class allows reuse of code in tests: initialization, simulation and verification * logic. diff --git a/services/tests/servicestests/src/com/android/server/usage/AppStandbyControllerTests.java b/services/tests/servicestests/src/com/android/server/usage/AppStandbyControllerTests.java index 7c7b1a296673..2aeab209162a 100644 --- a/services/tests/servicestests/src/com/android/server/usage/AppStandbyControllerTests.java +++ b/services/tests/servicestests/src/com/android/server/usage/AppStandbyControllerTests.java @@ -139,10 +139,13 @@ public class AppStandbyControllerTests { private AppStandbyController mController; private CountDownLatch mStateChangedLatch = new CountDownLatch(1); + private String mLatchPkgName = null; private AppIdleStateChangeListener mListener = new AppIdleStateChangeListener() { @Override public void onAppIdleStateChanged(String packageName, int userId, boolean idle, int bucket, int reason) { + // Ignore events not related to mLatchPkgName, if set. + if (mLatchPkgName != null && !mLatchPkgName.equals(packageName)) return; mStateChangedLatch.countDown(); } }; @@ -374,6 +377,7 @@ public class AppStandbyControllerTests { mInjector.mElapsedRealtime, false)); controller.addListener(mListener); + mLatchPkgName = null; return controller; } @@ -1377,7 +1381,7 @@ public class AppStandbyControllerTests { @Test public void testUnexemptedSyncScheduled() throws Exception { - mStateChangedLatch = new CountDownLatch(1); + rearmLatch(PACKAGE_1); mController.addListener(mListener); assertEquals("Test package did not start in the Never bucket", STANDBY_BUCKET_NEVER, getStandbyBucket(mController, PACKAGE_1)); @@ -1389,7 +1393,7 @@ public class AppStandbyControllerTests { setAndAssertBucket(PACKAGE_1, USER_ID, STANDBY_BUCKET_RARE, REASON_MAIN_FORCED_BY_SYSTEM); - mStateChangedLatch = new CountDownLatch(1); + rearmLatch(PACKAGE_1); mController.postReportSyncScheduled(PACKAGE_1, USER_ID, false); mStateChangedLatch.await(1000, TimeUnit.MILLISECONDS); assertEquals("Unexempted sync scheduled should not elevate a non Never bucket", @@ -1400,7 +1404,7 @@ public class AppStandbyControllerTests { public void testExemptedSyncScheduled() throws Exception { setAndAssertBucket(PACKAGE_1, USER_ID, STANDBY_BUCKET_RARE, REASON_MAIN_FORCED_BY_SYSTEM); mInjector.mDeviceIdleMode = true; - mStateChangedLatch = new CountDownLatch(1); + rearmLatch(PACKAGE_1); mController.postReportSyncScheduled(PACKAGE_1, USER_ID, true); mStateChangedLatch.await(1000, TimeUnit.MILLISECONDS); assertEquals("Exempted sync scheduled in doze should set bucket to working set", @@ -1408,7 +1412,7 @@ public class AppStandbyControllerTests { setAndAssertBucket(PACKAGE_1, USER_ID, STANDBY_BUCKET_RARE, REASON_MAIN_FORCED_BY_SYSTEM); mInjector.mDeviceIdleMode = false; - mStateChangedLatch = new CountDownLatch(1); + rearmLatch(PACKAGE_1); mController.postReportSyncScheduled(PACKAGE_1, USER_ID, true); mStateChangedLatch.await(1000, TimeUnit.MILLISECONDS); assertEquals("Exempted sync scheduled while not in doze should set bucket to active", @@ -1558,10 +1562,19 @@ public class AppStandbyControllerTests { } private void setAndAssertBucket(String pkg, int user, int bucket, int reason) throws Exception { - mStateChangedLatch = new CountDownLatch(1); + rearmLatch(pkg); mController.setAppStandbyBucket(pkg, user, bucket, reason); mStateChangedLatch.await(100, TimeUnit.MILLISECONDS); assertEquals("Failed to set package bucket", bucket, getStandbyBucket(mController, PACKAGE_1)); } + + private void rearmLatch(String pkgName) { + mLatchPkgName = pkgName; + mStateChangedLatch = new CountDownLatch(1); + } + + private void rearmLatch() { + rearmLatch(null); + } } diff --git a/services/tests/wmtests/src/com/android/server/wm/ActivityDisplayTests.java b/services/tests/wmtests/src/com/android/server/wm/ActivityDisplayTests.java index 1eb45d587d33..cf07183a007d 100644 --- a/services/tests/wmtests/src/com/android/server/wm/ActivityDisplayTests.java +++ b/services/tests/wmtests/src/com/android/server/wm/ActivityDisplayTests.java @@ -67,7 +67,7 @@ public class ActivityDisplayTests extends WindowTestsBase { final TaskDisplayArea taskDisplayAreas = mRootWindowContainer.getDefaultDisplay().getDefaultTaskDisplayArea(); final Task stack = - new StackBuilder(mRootWindowContainer).setOnTop(!ON_TOP).build(); + new TaskBuilder(mSupervisor).setOnTop(!ON_TOP).setCreateActivity(true).build(); final Task prevFocusedStack = taskDisplayAreas.getFocusedStack(); stack.moveToFront("moveStackToFront"); @@ -90,7 +90,7 @@ public class ActivityDisplayTests extends WindowTestsBase { final Task pinnedStack = mRootWindowContainer.getDefaultTaskDisplayArea() .createStack(WINDOWING_MODE_PINNED, ACTIVITY_TYPE_STANDARD, ON_TOP); final Task pinnedTask = new TaskBuilder(mAtm.mStackSupervisor) - .setStack(pinnedStack).build(); + .setParentTask(pinnedStack).build(); new ActivityBuilder(mAtm).setActivityFlags(FLAG_ALWAYS_FOCUSABLE) .setTask(pinnedTask).build(); pinnedStack.moveToFront("movePinnedStackToFront"); @@ -144,7 +144,7 @@ public class ActivityDisplayTests extends WindowTestsBase { doReturn(false).when(display).shouldDestroyContentOnRemove(); // Put home stack on the display. - final Task homeStack = new StackBuilder(mRootWindowContainer) + final Task homeStack = new TaskBuilder(mSupervisor) .setDisplay(display).setActivityType(ACTIVITY_TYPE_HOME).build(); // Put a finishing standard activity which will be reparented. @@ -163,7 +163,7 @@ public class ActivityDisplayTests extends WindowTestsBase { final Task fullscreenStack = display.getDefaultTaskDisplayArea().createStack( WINDOWING_MODE_FULLSCREEN, ACTIVITY_TYPE_STANDARD, ON_TOP); final Task fullscreenTask = new TaskBuilder(mAtm.mStackSupervisor) - .setStack(fullscreenStack).build(); + .setParentTask(fullscreenStack).build(); new ActivityBuilder(mAtm).setTask(fullscreenTask).build(); return fullscreenStack; } @@ -175,12 +175,11 @@ public class ActivityDisplayTests extends WindowTestsBase { public void testTopRunningActivity() { final DisplayContent display = mRootWindowContainer.getDefaultDisplay(); final KeyguardController keyguard = mSupervisor.getKeyguardController(); - final Task stack = new StackBuilder(mRootWindowContainer).build(); + final Task stack = new TaskBuilder(mSupervisor).setCreateActivity(true).build(); final ActivityRecord activity = stack.getTopNonFinishingActivity(); // Create empty stack on top. - final Task emptyStack = - new StackBuilder(mRootWindowContainer).setCreateActivity(false).build(); + final Task emptyStack = new TaskBuilder(mSupervisor).build(); // Make sure the top running activity is not affected when keyguard is not locked. assertTopRunningActivity(activity, display); @@ -322,10 +321,10 @@ public class ActivityDisplayTests extends WindowTestsBase { ACTIVITY_TYPE_STANDARD, ON_TOP); final Task stack4 = taskDisplayArea.createStack(WINDOWING_MODE_FULLSCREEN, ACTIVITY_TYPE_STANDARD, ON_TOP); - final Task task1 = new TaskBuilder(mAtm.mStackSupervisor).setStack(stack1).build(); - final Task task2 = new TaskBuilder(mAtm.mStackSupervisor).setStack(stack2).build(); - final Task task3 = new TaskBuilder(mAtm.mStackSupervisor).setStack(stack3).build(); - final Task task4 = new TaskBuilder(mAtm.mStackSupervisor).setStack(stack4).build(); + final Task task1 = new TaskBuilder(mAtm.mStackSupervisor).setParentTask(stack1).build(); + final Task task2 = new TaskBuilder(mAtm.mStackSupervisor).setParentTask(stack2).build(); + final Task task3 = new TaskBuilder(mAtm.mStackSupervisor).setParentTask(stack3).build(); + final Task task4 = new TaskBuilder(mAtm.mStackSupervisor).setParentTask(stack4).build(); // Reordering stacks while removing stacks. doAnswer(invocation -> { diff --git a/services/tests/wmtests/src/com/android/server/wm/ActivityMetricsLaunchObserverTests.java b/services/tests/wmtests/src/com/android/server/wm/ActivityMetricsLaunchObserverTests.java index eb78172cd562..e860f2508983 100644 --- a/services/tests/wmtests/src/com/android/server/wm/ActivityMetricsLaunchObserverTests.java +++ b/services/tests/wmtests/src/com/android/server/wm/ActivityMetricsLaunchObserverTests.java @@ -341,9 +341,8 @@ public class ActivityMetricsLaunchObserverTests extends WindowTestsBase { public void testConsecutiveLaunchOnDifferentDisplay() { onActivityLaunched(mTopActivity); - final Task stack = new StackBuilder(mRootWindowContainer) + final Task stack = new TaskBuilder(mSupervisor) .setDisplay(addNewDisplayContentAt(DisplayContent.POSITION_BOTTOM)) - .setCreateActivity(false) .build(); final ActivityRecord activityOnNewDisplay = new ActivityBuilder(mAtm) .setStack(stack) diff --git a/services/tests/wmtests/src/com/android/server/wm/ActivityRecordTests.java b/services/tests/wmtests/src/com/android/server/wm/ActivityRecordTests.java index bca990c659ae..09375db01888 100644 --- a/services/tests/wmtests/src/com/android/server/wm/ActivityRecordTests.java +++ b/services/tests/wmtests/src/com/android/server/wm/ActivityRecordTests.java @@ -131,7 +131,7 @@ public class ActivityRecordTests extends WindowTestsBase { @Before public void setUp() throws Exception { - mStack = new StackBuilder(mRootWindowContainer).build(); + mStack = new TaskBuilder(mSupervisor).setCreateActivity(true).build(); mTask = mStack.getBottomMostTask(); mActivity = mTask.getTopNonFinishingActivity(); @@ -172,7 +172,7 @@ public class ActivityRecordTests extends WindowTestsBase { @Test public void testNoCleanupMovingActivityInSameStack() { - final Task newTask = new TaskBuilder(mAtm.mStackSupervisor).setStack(mStack).build(); + final Task newTask = new TaskBuilder(mAtm.mStackSupervisor).setParentTask(mStack).build(); mActivity.reparent(newTask, 0, null /*reason*/); verify(mStack, times(0)).cleanUpActivityReferences(any()); } @@ -262,7 +262,7 @@ public class ActivityRecordTests extends WindowTestsBase { // Set options for two ActivityRecords in separate Tasks. Apply one ActivityRecord options. // Pending options should be cleared for only ActivityRecord that was applied - Task task2 = new TaskBuilder(mAtm.mStackSupervisor).setStack(mStack).build(); + Task task2 = new TaskBuilder(mAtm.mStackSupervisor).setParentTask(mStack).build(); activity2 = new ActivityBuilder(mAtm).setTask(task2).build(); activity2.updateOptionsLocked(activityOptions); mActivity.updateOptionsLocked(activityOptions); @@ -548,7 +548,7 @@ public class ActivityRecordTests extends WindowTestsBase { .build(); mActivity.setState(Task.ActivityState.STOPPED, "Testing"); - final Task stack = new StackBuilder(mRootWindowContainer).build(); + final Task stack = new TaskBuilder(mSupervisor).setCreateActivity(true).build(); try { doReturn(false).when(stack).isTranslucent(any()); assertFalse(mStack.shouldBeVisible(null /* starting */)); @@ -756,14 +756,14 @@ public class ActivityRecordTests extends WindowTestsBase { @Test public void testFinishActivityIfPossible_adjustStackOrder() { // Prepare the stacks with order (top to bottom): mStack, stack1, stack2. - final Task stack1 = new StackBuilder(mRootWindowContainer).build(); + final Task stack1 = new TaskBuilder(mSupervisor).setCreateActivity(true).build(); mStack.moveToFront("test"); // The stack2 is needed here for moving back to simulate the // {@link DisplayContent#mPreferredTopFocusableStack} is cleared, so // {@link DisplayContent#getFocusedStack} will rely on the order of focusable-and-visible // stacks. Then when mActivity is finishing, its stack will be invisible (no running // activities in the stack) that is the key condition to verify. - final Task stack2 = new StackBuilder(mRootWindowContainer).build(); + final Task stack2 = new TaskBuilder(mSupervisor).setCreateActivity(true).build(); stack2.moveToBack("test", stack2.getBottomMostTask()); assertTrue(mStack.isTopStackInDisplayArea()); @@ -973,7 +973,7 @@ public class ActivityRecordTests extends WindowTestsBase { // Simulates that {@code currentTop} starts an existing activity from background (so its // state is stopped) and the starting flow just goes to place it at top. - final Task nextStack = new StackBuilder(mRootWindowContainer).build(); + final Task nextStack = new TaskBuilder(mSupervisor).setCreateActivity(true).build(); final ActivityRecord nextTop = nextStack.getTopNonFinishingActivity(); nextTop.setState(STOPPED, "test"); @@ -1095,7 +1095,7 @@ public class ActivityRecordTests extends WindowTestsBase { // Add another stack to become focused and make the activity there visible. This way it // simulates finishing in non-focused stack in split-screen. - final Task stack = new StackBuilder(mRootWindowContainer).build(); + final Task stack = new TaskBuilder(mSupervisor).setCreateActivity(true).build(); final ActivityRecord focusedActivity = stack.getTopMostActivity(); focusedActivity.nowVisible = true; focusedActivity.mVisibleRequested = true; @@ -1581,7 +1581,7 @@ public class ActivityRecordTests extends WindowTestsBase { // Create a new task with custom config to reparent the activity to. final Task newTask = - new TaskBuilder(mSupervisor).setStack(initialTask.getRootTask()).build(); + new TaskBuilder(mSupervisor).setParentTask(initialTask.getRootTask()).build(); final Configuration newConfig = newTask.getConfiguration(); newConfig.densityDpi += 100; newTask.onRequestedOverrideConfigurationChanged(newConfig); @@ -1613,7 +1613,7 @@ public class ActivityRecordTests extends WindowTestsBase { // Create a new task with custom config to reparent the second activity to. final Task newTask = - new TaskBuilder(mSupervisor).setStack(initialTask.getRootTask()).build(); + new TaskBuilder(mSupervisor).setParentTask(initialTask.getRootTask()).build(); final Configuration newConfig = newTask.getConfiguration(); newConfig.densityDpi += 100; newTask.onRequestedOverrideConfigurationChanged(newConfig); @@ -1750,7 +1750,7 @@ public class ActivityRecordTests extends WindowTestsBase { } final Task stack = display.getDefaultTaskDisplayArea() .createStack(WINDOWING_MODE_UNDEFINED, ACTIVITY_TYPE_STANDARD, true /* onTop */); - final Task task = new TaskBuilder(mSupervisor).setStack(stack).build(); + final Task task = new TaskBuilder(mSupervisor).setParentTask(stack).build(); return new ActivityBuilder(mAtm).setTask(task).setUseProcess(process).build(); } } diff --git a/services/tests/wmtests/src/com/android/server/wm/ActivityStackSupervisorTests.java b/services/tests/wmtests/src/com/android/server/wm/ActivityStackSupervisorTests.java index 27e2d1370fae..f9ad49bb5034 100644 --- a/services/tests/wmtests/src/com/android/server/wm/ActivityStackSupervisorTests.java +++ b/services/tests/wmtests/src/com/android/server/wm/ActivityStackSupervisorTests.java @@ -115,8 +115,8 @@ public class ActivityStackSupervisorTests extends WindowTestsBase { public void testHandleNonResizableTaskOnSecondaryDisplay() { // Create an unresizable task on secondary display. final DisplayContent newDisplay = addNewDisplayContentAt(DisplayContent.POSITION_TOP); - final Task stack = new StackBuilder(mRootWindowContainer) - .setDisplay(newDisplay).build(); + final Task stack = new TaskBuilder(mSupervisor) + .setDisplay(newDisplay).setCreateActivity(true).build(); final ActivityRecord unresizableActivity = stack.getTopNonFinishingActivity(); final Task task = unresizableActivity.getTask(); unresizableActivity.info.resizeMode = ActivityInfo.RESIZE_MODE_UNRESIZEABLE; diff --git a/services/tests/wmtests/src/com/android/server/wm/ActivityStackTests.java b/services/tests/wmtests/src/com/android/server/wm/ActivityStackTests.java index 524f32deb864..4951658bbd78 100644 --- a/services/tests/wmtests/src/com/android/server/wm/ActivityStackTests.java +++ b/services/tests/wmtests/src/com/android/server/wm/ActivityStackTests.java @@ -100,7 +100,7 @@ public class ActivityStackTests extends WindowTestsBase { mStack = mDefaultTaskDisplayArea.createStack(WINDOWING_MODE_UNDEFINED, ACTIVITY_TYPE_STANDARD, true /* onTop */); spyOn(mStack); - mTask = new TaskBuilder(mSupervisor).setStack(mStack).build(); + mTask = new TaskBuilder(mSupervisor).setParentTask(mStack).build(); } @Test @@ -330,7 +330,7 @@ public class ActivityStackTests extends WindowTestsBase { targetActivity); final ComponentName alias = new ComponentName(DEFAULT_COMPONENT_PACKAGE_NAME, aliasActivity); - final Task task = new TaskBuilder(mAtm.mStackSupervisor).setStack(mStack).build(); + final Task task = new TaskBuilder(mAtm.mStackSupervisor).setParentTask(mStack).build(); task.origActivity = alias; task.realActivity = target; new ActivityBuilder(mAtm).setComponent(target).setTask(task).setTargetActivity( @@ -995,7 +995,7 @@ public class ActivityStackTests extends WindowTestsBase { mDefaultTaskDisplayArea.positionChildAt(onTop ? POSITION_TOP : POSITION_BOTTOM, task, false /* includingParents */); } else { - task = new StackBuilder(mRootWindowContainer) + task = new TaskBuilder(mSupervisor) .setTaskDisplayArea(taskDisplayArea) .setWindowingMode(windowingMode) .setActivityType(activityType) diff --git a/services/tests/wmtests/src/com/android/server/wm/ActivityStarterTests.java b/services/tests/wmtests/src/com/android/server/wm/ActivityStarterTests.java index e537b7c204cc..076047b35604 100644 --- a/services/tests/wmtests/src/com/android/server/wm/ActivityStarterTests.java +++ b/services/tests/wmtests/src/com/android/server/wm/ActivityStarterTests.java @@ -217,7 +217,10 @@ public class ActivityStarterTests extends WindowTestsBase { // Create source token final ActivityBuilder builder = new ActivityBuilder(service).setTask( - new TaskBuilder(service.mStackSupervisor).setVoiceSession(voiceSession).build()); + new TaskBuilder(service.mStackSupervisor) + .setVoiceSession(voiceSession) + .setCreateParentTask(true) + .build()); if (aInfo != null) { aInfo.applicationInfo = new ApplicationInfo(); @@ -706,7 +709,9 @@ public class ActivityStarterTests extends WindowTestsBase { @Test public void testBringTaskToFrontWhenFocusedStackIsFinising() { // Put 2 tasks in the same stack (simulate the behavior of home stack). + final Task rootTask = new TaskBuilder(mSupervisor).build(); final ActivityRecord activity = new ActivityBuilder(mAtm) + .setStack(rootTask) .setCreateTask(true).build(); new ActivityBuilder(mAtm) .setStack(activity.getRootTask()) @@ -792,7 +797,7 @@ public class ActivityStarterTests extends WindowTestsBase { // Create another activity on top of the secondary display. final Task topStack = secondaryTaskContainer.createStack(WINDOWING_MODE_FULLSCREEN, ACTIVITY_TYPE_STANDARD, true /* onTop */); - final Task topTask = new TaskBuilder(mSupervisor).setStack(topStack).build(); + final Task topTask = new TaskBuilder(mSupervisor).setParentTask(topStack).build(); new ActivityBuilder(mAtm).setTask(topTask).build(); // Start activity with the same intent as {@code singleTaskActivity} on secondary display. @@ -851,7 +856,7 @@ public class ActivityStarterTests extends WindowTestsBase { DEFAULT_COMPONENT_PACKAGE_NAME + ".SingleTaskActivity"); final Task task = new TaskBuilder(mSupervisor) .setComponent(componentName) - .setStack(stack) + .setParentTask(stack) .build(); return new ActivityBuilder(mAtm) .setComponent(componentName) @@ -987,7 +992,7 @@ public class ActivityStarterTests extends WindowTestsBase { final ActivityStarter starter = prepareStarter(0 /* flags */); starter.mStartActivity = new ActivityBuilder(mAtm).build(); final Task task = new TaskBuilder(mAtm.mStackSupervisor) - .setStack(mAtm.mRootWindowContainer.getDefaultTaskDisplayArea().createStack( + .setParentTask(mAtm.mRootWindowContainer.getDefaultTaskDisplayArea().createStack( WINDOWING_MODE_FULLSCREEN, ACTIVITY_TYPE_STANDARD, true /* onTop */)) .setUserId(10) .build(); diff --git a/services/tests/wmtests/src/com/android/server/wm/ActivityTaskManagerServiceTests.java b/services/tests/wmtests/src/com/android/server/wm/ActivityTaskManagerServiceTests.java index 567610018fc1..031165727207 100644 --- a/services/tests/wmtests/src/com/android/server/wm/ActivityTaskManagerServiceTests.java +++ b/services/tests/wmtests/src/com/android/server/wm/ActivityTaskManagerServiceTests.java @@ -73,7 +73,7 @@ public class ActivityTaskManagerServiceTests extends WindowTestsBase { /** Verify that activity is finished correctly upon request. */ @Test public void testActivityFinish() { - final Task stack = new StackBuilder(mRootWindowContainer).build(); + final Task stack = new TaskBuilder(mSupervisor).setCreateActivity(true).build(); final ActivityRecord activity = stack.getBottomMostTask().getTopNonFinishingActivity(); assertTrue("Activity must be finished", mAtm.finishActivity(activity.appToken, 0 /* resultCode */, null /* resultData */, @@ -87,7 +87,7 @@ public class ActivityTaskManagerServiceTests extends WindowTestsBase { @Test public void testOnPictureInPictureRequested() throws RemoteException { - final Task stack = new StackBuilder(mRootWindowContainer).build(); + final Task stack = new TaskBuilder(mSupervisor).setCreateActivity(true).build(); final ActivityRecord activity = stack.getBottomMostTask().getTopNonFinishingActivity(); final ClientLifecycleManager mockLifecycleManager = mock(ClientLifecycleManager.class); doReturn(mockLifecycleManager).when(mAtm).getLifecycleManager(); @@ -106,7 +106,7 @@ public class ActivityTaskManagerServiceTests extends WindowTestsBase { @Test(expected = IllegalStateException.class) public void testOnPictureInPictureRequested_cannotEnterPip() throws RemoteException { - final Task stack = new StackBuilder(mRootWindowContainer).build(); + final Task stack = new TaskBuilder(mSupervisor).setCreateActivity(true).build(); final ActivityRecord activity = stack.getBottomMostTask().getTopNonFinishingActivity(); ClientLifecycleManager lifecycleManager = mAtm.getLifecycleManager(); doReturn(false).when(activity).inPinnedWindowingMode(); @@ -120,7 +120,7 @@ public class ActivityTaskManagerServiceTests extends WindowTestsBase { @Test(expected = IllegalStateException.class) public void testOnPictureInPictureRequested_alreadyInPIPMode() throws RemoteException { - final Task stack = new StackBuilder(mRootWindowContainer).build(); + final Task stack = new TaskBuilder(mSupervisor).setCreateActivity(true).build(); final ActivityRecord activity = stack.getBottomMostTask().getTopNonFinishingActivity(); ClientLifecycleManager lifecycleManager = mAtm.getLifecycleManager(); doReturn(true).when(activity).inPinnedWindowingMode(); diff --git a/services/tests/wmtests/src/com/android/server/wm/DisplayContentTests.java b/services/tests/wmtests/src/com/android/server/wm/DisplayContentTests.java index f8baf8497069..7f904265de15 100644 --- a/services/tests/wmtests/src/com/android/server/wm/DisplayContentTests.java +++ b/services/tests/wmtests/src/com/android/server/wm/DisplayContentTests.java @@ -28,6 +28,7 @@ import static android.content.pm.ActivityInfo.SCREEN_ORIENTATION_USER; import static android.os.Build.VERSION_CODES.P; import static android.os.Build.VERSION_CODES.Q; import static android.view.Display.DEFAULT_DISPLAY; +import static android.view.Display.FLAG_PRIVATE; import static android.view.DisplayCutout.BOUNDS_POSITION_LEFT; import static android.view.DisplayCutout.BOUNDS_POSITION_TOP; import static android.view.DisplayCutout.fromBoundingRect; @@ -95,6 +96,7 @@ import android.os.SystemClock; import android.platform.test.annotations.Presubmit; import android.util.DisplayMetrics; import android.view.DisplayCutout; +import android.view.DisplayInfo; import android.view.Gravity; import android.view.IDisplayWindowRotationCallback; import android.view.IDisplayWindowRotationController; @@ -847,17 +849,17 @@ public class DisplayContentTests extends WindowTestsBase { dc.getDisplayRotation().setFixedToUserRotation( IWindowManager.FIXED_TO_USER_ROTATION_DISABLED); - final Task stack = - new StackBuilder(mWm.mAtmService.mRootWindowContainer) - .setDisplay(dc) - .build(); + final Task stack = new TaskBuilder(mSupervisor) + .setDisplay(dc) + .setCreateActivity(true) + .build(); doReturn(true).when(stack).isVisible(); - final Task freeformStack = - new StackBuilder(mWm.mAtmService.mRootWindowContainer) - .setDisplay(dc) - .setWindowingMode(WINDOWING_MODE_FREEFORM) - .build(); + final Task freeformStack = new TaskBuilder(mSupervisor) + .setDisplay(dc) + .setCreateActivity(true) + .setWindowingMode(WINDOWING_MODE_FREEFORM) + .build(); doReturn(true).when(freeformStack).isVisible(); freeformStack.getTopChild().setBounds(100, 100, 300, 400); @@ -879,8 +881,8 @@ public class DisplayContentTests extends WindowTestsBase { IWindowManager.FIXED_TO_USER_ROTATION_DISABLED); final int newOrientation = getRotatedOrientation(dc); - final Task stack = new StackBuilder(mWm.mAtmService.mRootWindowContainer) - .setDisplay(dc).build(); + final Task stack = new TaskBuilder(mSupervisor) + .setDisplay(dc).setCreateActivity(true).build(); final ActivityRecord activity = stack.getTopMostTask().getTopNonFinishingActivity(); activity.setRequestedOrientation(newOrientation); @@ -898,8 +900,8 @@ public class DisplayContentTests extends WindowTestsBase { IWindowManager.FIXED_TO_USER_ROTATION_ENABLED); final int newOrientation = getRotatedOrientation(dc); - final Task stack = new StackBuilder(mWm.mAtmService.mRootWindowContainer) - .setDisplay(dc).build(); + final Task stack = new TaskBuilder(mSupervisor) + .setDisplay(dc).setCreateActivity(true).build(); final ActivityRecord activity = stack.getTopMostTask().getTopNonFinishingActivity(); activity.setRequestedOrientation(newOrientation); @@ -1209,8 +1211,8 @@ public class DisplayContentTests extends WindowTestsBase { verify(t, never()).setPosition(any(), eq(0), eq(0)); // Launch another activity before the transition is finished. - final ActivityRecord app2 = new StackBuilder(mWm.mRoot) - .setDisplay(mDisplayContent).build().getTopMostActivity(); + final ActivityRecord app2 = new TaskBuilder(mSupervisor) + .setDisplay(mDisplayContent).setCreateActivity(true).build().getTopMostActivity(); app2.setVisible(false); mDisplayContent.mOpeningApps.add(app2); app2.setRequestedOrientation(newOrientation); @@ -1508,7 +1510,7 @@ public class DisplayContentTests extends WindowTestsBase { @Test public void testSetWindowingModeAtomicallyUpdatesWindoingModeAndDisplayWindowingMode() { final DisplayContent dc = createNewDisplay(); - final Task stack = new StackBuilder(mWm.mAtmService.mRootWindowContainer) + final Task stack = new TaskBuilder(mSupervisor) .setDisplay(dc) .build(); doAnswer(invocation -> { @@ -1522,6 +1524,28 @@ public class DisplayContentTests extends WindowTestsBase { dc.setWindowingMode(WINDOWING_MODE_FULLSCREEN); } + @Test + public void testForceDesktopMode() { + mWm.mForceDesktopModeOnExternalDisplays = true; + // Not applicable for default display + assertFalse(mDefaultDisplay.forceDesktopMode()); + + // Not applicable for private secondary display. + final DisplayInfo displayInfo = new DisplayInfo(); + displayInfo.copyFrom(mDisplayInfo); + displayInfo.flags = FLAG_PRIVATE; + final DisplayContent privateDc = createNewDisplay(displayInfo); + assertFalse(privateDc.forceDesktopMode()); + + // Applicable for public secondary display. + final DisplayContent publicDc = createNewDisplay(); + assertTrue(publicDc.forceDesktopMode()); + + // Make sure forceDesktopMode() is false when the force config is disabled. + mWm.mForceDesktopModeOnExternalDisplays = false; + assertFalse(publicDc.forceDesktopMode()); + } + private boolean isOptionsPanelAtRight(int displayId) { return (mWm.getPreferredOptionsPanelGravity(displayId) & Gravity.RIGHT) == Gravity.RIGHT; } diff --git a/services/tests/wmtests/src/com/android/server/wm/DisplayPolicyLayoutTests.java b/services/tests/wmtests/src/com/android/server/wm/DisplayPolicyLayoutTests.java index a5585c0f02b1..94e40413f9f8 100644 --- a/services/tests/wmtests/src/com/android/server/wm/DisplayPolicyLayoutTests.java +++ b/services/tests/wmtests/src/com/android/server/wm/DisplayPolicyLayoutTests.java @@ -34,6 +34,7 @@ import static android.view.WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE; import static android.view.WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS; import static android.view.WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_NEVER; import static android.view.WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES; +import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_INSET_PARENT_FRAME_BY_IME; import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_IS_SCREEN_DECOR; import static android.view.WindowManager.LayoutParams.SOFT_INPUT_ADJUST_NOTHING; import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION; @@ -369,6 +370,24 @@ public class DisplayPolicyLayoutTests extends DisplayPolicyTestsBase { } @Test + public void layoutWindowLw_insetParentFrameByIme() { + final InsetsState state = + mDisplayContent.getInsetsStateController().getRawInsetsState(); + state.getSource(InsetsState.ITYPE_IME).setVisible(true); + state.getSource(InsetsState.ITYPE_IME).setFrame( + 0, DISPLAY_HEIGHT - IME_HEIGHT, DISPLAY_WIDTH, DISPLAY_HEIGHT); + mWindow.mAttrs.privateFlags |= PRIVATE_FLAG_INSET_PARENT_FRAME_BY_IME; + mWindow.mBehindIme = true; + addWindow(mWindow); + + mDisplayPolicy.beginLayoutLw(mFrames, 0 /* UI mode */); + mDisplayPolicy.layoutWindowLw(mWindow, null, mFrames); + + assertInsetByTopBottom(mWindow.getDisplayFrame(), STATUS_BAR_HEIGHT, NAV_BAR_HEIGHT); + assertInsetByTopBottom(mWindow.getParentFrame(), STATUS_BAR_HEIGHT, IME_HEIGHT); + } + + @Test public void layoutWindowLw_fitDisplayCutout() { addDisplayCutout(); 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 b50530ed3059..b77d21c0f711 100644 --- a/services/tests/wmtests/src/com/android/server/wm/DisplayPolicyTests.java +++ b/services/tests/wmtests/src/com/android/server/wm/DisplayPolicyTests.java @@ -27,11 +27,9 @@ import static android.view.WindowInsetsController.BEHAVIOR_SHOW_BARS_BY_TOUCH; import static android.view.WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM; import static android.view.WindowManager.LayoutParams.FLAG_DIM_BEHIND; import static android.view.WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS; -import static android.view.WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON; import static android.view.WindowManager.LayoutParams.FLAG_LAYOUT_INSET_DECOR; import static android.view.WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN; import static android.view.WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE; -import static android.view.WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE; import static android.view.WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED; import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_FORCE_DRAW_BAR_BACKGROUNDS; import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_STATUS_FORCE_SHOW_NAVIGATION; @@ -39,7 +37,6 @@ import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION; import static android.view.WindowManager.LayoutParams.TYPE_BASE_APPLICATION; import static android.view.WindowManager.LayoutParams.TYPE_INPUT_METHOD; import static android.view.WindowManager.LayoutParams.TYPE_NAVIGATION_BAR; -import static android.view.WindowManager.LayoutParams.TYPE_TOAST; import static com.android.dx.mockito.inline.extended.ExtendedMockito.spyOn; import static com.android.server.policy.WindowManagerPolicy.NAV_BAR_BOTTOM; @@ -47,7 +44,6 @@ import static com.android.server.policy.WindowManagerPolicy.NAV_BAR_RIGHT; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; @@ -235,18 +231,6 @@ public class DisplayPolicyTests extends WindowTestsBase { assertEquals(mAppWindow, policy.getTopFullscreenOpaqueWindow()); } - @Test - public void testShouldShowToastWhenScreenLocked() { - final DisplayPolicy policy = mDisplayContent.getDisplayPolicy(); - final WindowState activity = createApplicationWindow(); - final WindowState toast = createToastWindow(); - - policy.adjustWindowParamsLw(toast, toast.mAttrs, 0 /* callingPid */, 0 /* callingUid */); - - assertTrue(policy.canToastShowWhenLocked(0 /* callingUid */)); - assertNotEquals(0, toast.getAttrs().flags & FLAG_SHOW_WHEN_LOCKED); - } - @Test(expected = RuntimeException.class) public void testMainAppWindowDisallowFitSystemWindowTypes() { final DisplayPolicy policy = mDisplayContent.getDisplayPolicy(); @@ -257,16 +241,6 @@ public class DisplayPolicyTests extends WindowTestsBase { 0 /* callingUid */); } - private WindowState createToastWindow() { - final WindowState win = createWindow(null, TYPE_TOAST, "Toast"); - final WindowManager.LayoutParams attrs = win.mAttrs; - attrs.width = WRAP_CONTENT; - attrs.height = WRAP_CONTENT; - attrs.flags = FLAG_KEEP_SCREEN_ON | FLAG_NOT_FOCUSABLE | FLAG_NOT_TOUCHABLE; - attrs.format = PixelFormat.TRANSLUCENT; - return win; - } - private WindowState createApplicationWindow() { final WindowState win = createWindow(null, TYPE_APPLICATION, "Application"); final WindowManager.LayoutParams attrs = win.mAttrs; diff --git a/services/tests/wmtests/src/com/android/server/wm/DisplayPolicyTestsBase.java b/services/tests/wmtests/src/com/android/server/wm/DisplayPolicyTestsBase.java index b4e1c375993d..af8cb02a86fe 100644 --- a/services/tests/wmtests/src/com/android/server/wm/DisplayPolicyTestsBase.java +++ b/services/tests/wmtests/src/com/android/server/wm/DisplayPolicyTestsBase.java @@ -62,7 +62,7 @@ public class DisplayPolicyTestsBase extends WindowTestsBase { static final int STATUS_BAR_HEIGHT = 10; static final int NAV_BAR_HEIGHT = 15; static final int DISPLAY_CUTOUT_HEIGHT = 8; - static final int INPUT_METHOD_WINDOW_TOP = 585; + static final int IME_HEIGHT = 415; DisplayPolicy mDisplayPolicy; diff --git a/services/tests/wmtests/src/com/android/server/wm/LaunchParamsPersisterTests.java b/services/tests/wmtests/src/com/android/server/wm/LaunchParamsPersisterTests.java index 18a2d1337d4b..d701a9df7cb8 100644 --- a/services/tests/wmtests/src/com/android/server/wm/LaunchParamsPersisterTests.java +++ b/services/tests/wmtests/src/com/android/server/wm/LaunchParamsPersisterTests.java @@ -116,7 +116,7 @@ public class LaunchParamsPersisterTests extends WindowTestsBase { Task stack = mTestDisplay.getDefaultTaskDisplayArea() .createStack(TEST_WINDOWING_MODE, ACTIVITY_TYPE_STANDARD, /* onTop */ true); - mTestTask = new TaskBuilder(mSupervisor).setComponent(TEST_COMPONENT).setStack(stack) + mTestTask = new TaskBuilder(mSupervisor).setComponent(TEST_COMPONENT).setParentTask(stack) .build(); mTestTask.mUserId = TEST_USER_ID; mTestTask.mLastNonFullscreenBounds = TEST_BOUNDS; @@ -342,7 +342,7 @@ public class LaunchParamsPersisterTests extends WindowTestsBase { final Task anotherTaskOfTheSameUser = new TaskBuilder(mSupervisor) .setComponent(ALTERNATIVE_COMPONENT) .setUserId(TEST_USER_ID) - .setStack(stack) + .setParentTask(stack) .build(); anotherTaskOfTheSameUser.setWindowingMode(WINDOWING_MODE_FREEFORM); anotherTaskOfTheSameUser.setBounds(200, 300, 400, 500); @@ -354,7 +354,7 @@ public class LaunchParamsPersisterTests extends WindowTestsBase { final Task anotherTaskOfDifferentUser = new TaskBuilder(mSupervisor) .setComponent(TEST_COMPONENT) .setUserId(ALTERNATIVE_USER_ID) - .setStack(stack) + .setParentTask(stack) .build(); anotherTaskOfDifferentUser.setWindowingMode(WINDOWING_MODE_FREEFORM); anotherTaskOfDifferentUser.setBounds(300, 400, 500, 600); diff --git a/services/tests/wmtests/src/com/android/server/wm/RecentTasksTest.java b/services/tests/wmtests/src/com/android/server/wm/RecentTasksTest.java index 9954f484f0a6..253fbae4579b 100644 --- a/services/tests/wmtests/src/com/android/server/wm/RecentTasksTest.java +++ b/services/tests/wmtests/src/com/android/server/wm/RecentTasksTest.java @@ -333,10 +333,10 @@ public class RecentTasksTest extends WindowTestsBase { // other task Task task1 = createTaskBuilder(".Task1") .setFlags(FLAG_ACTIVITY_NEW_TASK | FLAG_ACTIVITY_MULTIPLE_TASK) - .setStack(mTaskContainer.getRootHomeTask()).build(); + .setParentTask(mTaskContainer.getRootHomeTask()).build(); Task task2 = createTaskBuilder(".Task1") .setFlags(FLAG_ACTIVITY_NEW_TASK | FLAG_ACTIVITY_MULTIPLE_TASK) - .setStack(mStack).build(); + .setParentTask(mStack).build(); mRecentTasks.add(task1); mRecentTasks.add(task2); assertThat(mCallbacksRecorder.mAdded).hasSize(2); @@ -352,7 +352,7 @@ public class RecentTasksTest extends WindowTestsBase { // and we want to ensure that a new task will match a restored task Task task1 = createTaskBuilder(".Task1") .setFlags(FLAG_ACTIVITY_NEW_TASK) - .setStack(mStack) + .setParentTask(mStack) .build(); setTaskActivityType(task1, ACTIVITY_TYPE_UNDEFINED); assertThat(task1.getActivityType()).isEqualTo(ACTIVITY_TYPE_UNDEFINED); @@ -361,7 +361,7 @@ public class RecentTasksTest extends WindowTestsBase { Task task2 = createTaskBuilder(".Task1") .setFlags(FLAG_ACTIVITY_NEW_TASK) - .setStack(mStack) + .setParentTask(mStack) .build(); assertEquals(ACTIVITY_TYPE_STANDARD, task2.getActivityType()); mRecentTasks.add(task2); @@ -376,7 +376,7 @@ public class RecentTasksTest extends WindowTestsBase { public void testAddTaskCompatibleActivityTypeDifferentUser_expectNoRemove() { Task task1 = createTaskBuilder(".Task1") .setFlags(FLAG_ACTIVITY_NEW_TASK) - .setStack(mStack) + .setParentTask(mStack) .setUserId(TEST_USER_0_ID) .build(); setTaskActivityType(task1, ACTIVITY_TYPE_UNDEFINED); @@ -386,7 +386,7 @@ public class RecentTasksTest extends WindowTestsBase { Task task2 = createTaskBuilder(".Task1") .setFlags(FLAG_ACTIVITY_NEW_TASK) - .setStack(mStack) + .setParentTask(mStack) .setUserId(TEST_USER_1_ID) .build(); assertEquals(ACTIVITY_TYPE_STANDARD, task2.getActivityType()); @@ -401,7 +401,7 @@ public class RecentTasksTest extends WindowTestsBase { public void testAddTaskCompatibleWindowingMode_expectRemove() { Task task1 = createTaskBuilder(".Task1") .setFlags(FLAG_ACTIVITY_NEW_TASK) - .setStack(mStack) + .setParentTask(mStack) .build(); setTaskWindowingMode(task1, WINDOWING_MODE_UNDEFINED); assertEquals(WINDOWING_MODE_UNDEFINED, task1.getWindowingMode()); @@ -410,7 +410,7 @@ public class RecentTasksTest extends WindowTestsBase { Task task2 = createTaskBuilder(".Task1") .setFlags(FLAG_ACTIVITY_NEW_TASK) - .setStack(mStack) + .setParentTask(mStack) .build(); setTaskWindowingMode(task2, WINDOWING_MODE_FULLSCREEN); assertEquals(WINDOWING_MODE_FULLSCREEN, task2.getWindowingMode()); @@ -427,7 +427,7 @@ public class RecentTasksTest extends WindowTestsBase { public void testAddTaskIncompatibleWindowingMode_expectNoRemove() { Task task1 = createTaskBuilder(".Task1") .setFlags(FLAG_ACTIVITY_NEW_TASK) - .setStack(mStack) + .setParentTask(mStack) .build(); setTaskWindowingMode(task1, WINDOWING_MODE_FULLSCREEN); assertEquals(WINDOWING_MODE_FULLSCREEN, task1.getWindowingMode()); @@ -435,7 +435,7 @@ public class RecentTasksTest extends WindowTestsBase { Task task2 = createTaskBuilder(".Task1") .setFlags(FLAG_ACTIVITY_NEW_TASK) - .setStack(mStack) + .setParentTask(mStack) .build(); setTaskWindowingMode(task2, WINDOWING_MODE_PINNED); assertEquals(WINDOWING_MODE_PINNED, task2.getWindowingMode()); @@ -453,19 +453,19 @@ public class RecentTasksTest extends WindowTestsBase { // Add task to recents final String taskAffinity = "affinity"; final int uid = 10123; - final Task task1 = createTaskBuilder(".Task1").setStack(mStack).build(); + final Task task1 = createTaskBuilder(".Task1").setParentTask(mStack).build(); task1.affinity = ActivityRecord.computeTaskAffinity(taskAffinity, uid, LAUNCH_MULTIPLE); mRecentTasks.add(task1); // Add another task to recents, and make sure the previous task was removed. - final Task task2 = createTaskBuilder(".Task2").setStack(mStack).build(); + final Task task2 = createTaskBuilder(".Task2").setParentTask(mStack).build(); task2.affinity = ActivityRecord.computeTaskAffinity(taskAffinity, uid, LAUNCH_MULTIPLE); mRecentTasks.add(task2); assertEquals(1, mRecentTasks.getRecentTasks(MAX_VALUE, 0 /* flags */, true /* getTasksAllowed */, TEST_USER_0_ID, 0).getList().size()); // Add another single-instance task to recents, and make sure no task is removed. - final Task task3 = createTaskBuilder(".Task3").setStack(mStack).build(); + final Task task3 = createTaskBuilder(".Task3").setParentTask(mStack).build(); task3.affinity = ActivityRecord.computeTaskAffinity(taskAffinity, uid, LAUNCH_SINGLE_INSTANCE); mRecentTasks.add(task3); @@ -497,7 +497,7 @@ public class RecentTasksTest extends WindowTestsBase { // tasks because their intents are identical. mRecentTasks.add(task1); // Go home to trigger the removal of untracked tasks. - mRecentTasks.add(createTaskBuilder(".Home").setStack(mTaskContainer.getRootHomeTask()) + mRecentTasks.add(createTaskBuilder(".Home").setParentTask(mTaskContainer.getRootHomeTask()) .build()); // The task was added into recents again so it is not hidden and shouldn't be removed. @@ -883,10 +883,10 @@ public class RecentTasksTest extends WindowTestsBase { // Add a number of tasks (beyond the max) but ensure that nothing is trimmed because all // the tasks belong in stacks above the home stack - mRecentTasks.add(createTaskBuilder(".HomeTask1").setStack(homeStack).build()); - mRecentTasks.add(createTaskBuilder(".Task1").setStack(aboveHomeStack).build()); - mRecentTasks.add(createTaskBuilder(".Task2").setStack(aboveHomeStack).build()); - mRecentTasks.add(createTaskBuilder(".Task3").setStack(aboveHomeStack).build()); + mRecentTasks.add(createTaskBuilder(".HomeTask1").setParentTask(homeStack).build()); + mRecentTasks.add(createTaskBuilder(".Task1").setParentTask(aboveHomeStack).build()); + mRecentTasks.add(createTaskBuilder(".Task2").setParentTask(aboveHomeStack).build()); + mRecentTasks.add(createTaskBuilder(".Task3").setParentTask(aboveHomeStack).build()); assertNoTasksTrimmed(); } @@ -904,11 +904,11 @@ public class RecentTasksTest extends WindowTestsBase { // Add a number of tasks (beyond the max) but ensure that only the task in the stack behind // the home stack is trimmed once a new task is added final Task behindHomeTask = createTaskBuilder(".Task1") - .setStack(behindHomeStack) + .setParentTask(behindHomeStack) .build(); mRecentTasks.add(behindHomeTask); - mRecentTasks.add(createTaskBuilder(".HomeTask1").setStack(homeStack).build()); - mRecentTasks.add(createTaskBuilder(".Task2").setStack(aboveHomeStack).build()); + mRecentTasks.add(createTaskBuilder(".HomeTask1").setParentTask(homeStack).build()); + mRecentTasks.add(createTaskBuilder(".Task2").setParentTask(aboveHomeStack).build()); assertTrimmed(behindHomeTask); } @@ -924,10 +924,10 @@ public class RecentTasksTest extends WindowTestsBase { // Add a number of tasks (beyond the max) on each display, ensure that the tasks are not // removed - mRecentTasks.add(createTaskBuilder(".HomeTask1").setStack(homeStack).build()); - mRecentTasks.add(createTaskBuilder(".Task1").setStack(otherDisplayStack).build()); - mRecentTasks.add(createTaskBuilder(".Task2").setStack(otherDisplayStack).build()); - mRecentTasks.add(createTaskBuilder(".HomeTask2").setStack(homeStack).build()); + mRecentTasks.add(createTaskBuilder(".HomeTask1").setParentTask(homeStack).build()); + mRecentTasks.add(createTaskBuilder(".Task1").setParentTask(otherDisplayStack).build()); + mRecentTasks.add(createTaskBuilder(".Task2").setParentTask(otherDisplayStack).build()); + mRecentTasks.add(createTaskBuilder(".HomeTask2").setParentTask(homeStack).build()); assertNoTasksTrimmed(); } @@ -1214,7 +1214,7 @@ public class RecentTasksTest extends WindowTestsBase { private TaskBuilder createTaskBuilder(String packageName, String className) { return new TaskBuilder(mAtm.mStackSupervisor) .setComponent(new ComponentName(packageName, className)) - .setStack(mStack) + .setParentTask(mStack) .setUserId(TEST_USER_0_ID); } diff --git a/services/tests/wmtests/src/com/android/server/wm/RootActivityContainerTests.java b/services/tests/wmtests/src/com/android/server/wm/RootActivityContainerTests.java index 26b0bfb1dd7c..901ed36254ea 100644 --- a/services/tests/wmtests/src/com/android/server/wm/RootActivityContainerTests.java +++ b/services/tests/wmtests/src/com/android/server/wm/RootActivityContainerTests.java @@ -195,8 +195,7 @@ public class RootActivityContainerTests extends WindowTestsBase { public void testApplySleepTokens() { final DisplayContent display = mRootWindowContainer.getDefaultDisplay(); final KeyguardController keyguard = mSupervisor.getKeyguardController(); - final Task stack = new StackBuilder(mRootWindowContainer) - .setCreateActivity(false) + final Task stack = new TaskBuilder(mSupervisor) .setDisplay(display) .setOnTop(false) .build(); @@ -384,7 +383,7 @@ public class RootActivityContainerTests extends WindowTestsBase { final Task primaryStack = mRootWindowContainer.getDefaultTaskDisplayArea() .createStack(WINDOWING_MODE_SPLIT_SCREEN_PRIMARY, ACTIVITY_TYPE_STANDARD, true /* onTop */); - final Task task = new TaskBuilder(mSupervisor).setStack(primaryStack).build(); + final Task task = new TaskBuilder(mSupervisor).setParentTask(primaryStack).build(); final ActivityRecord r = new ActivityBuilder(mAtm).setTask(task).build(); // Find a launch stack for the top activity in split-screen primary, while requesting @@ -404,14 +403,17 @@ public class RootActivityContainerTests extends WindowTestsBase { @Test public void testFindTaskToMoveToFrontWhenRecentsOnTop() { // Create stack/task on default display. - final Task targetStack = new StackBuilder(mRootWindowContainer) + final Task targetStack = new TaskBuilder(mSupervisor) + .setCreateActivity(true) .setOnTop(false) .build(); final Task targetTask = targetStack.getBottomMostTask(); // Create Recents on top of the display. - final Task stack = new StackBuilder(mRootWindowContainer).setActivityType( - ACTIVITY_TYPE_RECENTS).build(); + final Task stack = new TaskBuilder(mSupervisor) + .setCreateActivity(true) + .setActivityType(ACTIVITY_TYPE_RECENTS) + .build(); final String reason = "findTaskToMoveToFront"; mSupervisor.findTaskToMoveToFront(targetTask, 0, ActivityOptions.makeBasic(), reason, @@ -431,14 +433,14 @@ public class RootActivityContainerTests extends WindowTestsBase { final TaskDisplayArea taskDisplayArea = mRootWindowContainer.getDefaultTaskDisplayArea(); final Task targetStack = taskDisplayArea.createStack(WINDOWING_MODE_FULLSCREEN, ACTIVITY_TYPE_STANDARD, false /* onTop */); - final Task targetTask = new TaskBuilder(mSupervisor).setStack(targetStack).build(); + final Task targetTask = new TaskBuilder(mSupervisor).setParentTask(targetStack).build(); // Create Recents on secondary display. final TestDisplayContent secondDisplay = addNewDisplayContentAt( DisplayContent.POSITION_TOP); final Task stack = secondDisplay.getDefaultTaskDisplayArea() .createStack(WINDOWING_MODE_FULLSCREEN, ACTIVITY_TYPE_RECENTS, true /* onTop */); - final Task task = new TaskBuilder(mSupervisor).setStack(stack).build(); + final Task task = new TaskBuilder(mSupervisor).setParentTask(stack).build(); new ActivityBuilder(mAtm).setTask(task).build(); final String reason = "findTaskToMoveToFront"; @@ -458,7 +460,7 @@ public class RootActivityContainerTests extends WindowTestsBase { final TaskDisplayArea taskDisplayArea = mRootWindowContainer.getDefaultTaskDisplayArea(); final Task targetStack = spy(taskDisplayArea.createStack(WINDOWING_MODE_FULLSCREEN, ACTIVITY_TYPE_STANDARD, false /* onTop */)); - final Task task = new TaskBuilder(mSupervisor).setStack(targetStack).build(); + final Task task = new TaskBuilder(mSupervisor).setParentTask(targetStack).build(); final ActivityRecord activity = new ActivityBuilder(mAtm).setTask(task).build(); taskDisplayArea.positionChildAt(POSITION_BOTTOM, targetStack, false /*includingParents*/); @@ -514,7 +516,7 @@ public class RootActivityContainerTests extends WindowTestsBase { DisplayContent.POSITION_TOP); final Task stack = secondDisplay.getDefaultTaskDisplayArea() .createStack(WINDOWING_MODE_FULLSCREEN, ACTIVITY_TYPE_STANDARD, true /* onTop */); - final Task task = new TaskBuilder(mSupervisor).setStack(stack).build(); + final Task task = new TaskBuilder(mSupervisor).setParentTask(stack).build(); new ActivityBuilder(mAtm).setTask(task).build(); doReturn(true).when(mRootWindowContainer).resumeHomeActivity(any(), any(), any()); @@ -538,7 +540,7 @@ public class RootActivityContainerTests extends WindowTestsBase { final TaskDisplayArea taskDisplayArea = mRootWindowContainer.getDefaultTaskDisplayArea(); final Task targetStack = spy(taskDisplayArea.createStack(WINDOWING_MODE_FULLSCREEN, ACTIVITY_TYPE_STANDARD, false /* onTop */)); - final Task task = new TaskBuilder(mSupervisor).setStack(targetStack).build(); + final Task task = new TaskBuilder(mSupervisor).setParentTask(targetStack).build(); final ActivityRecord activity = new ActivityBuilder(mAtm).setTask(task).build(); activity.setState(ActivityState.RESUMED, "test"); @@ -558,7 +560,7 @@ public class RootActivityContainerTests extends WindowTestsBase { final TaskDisplayArea taskDisplayArea = mRootWindowContainer.getDefaultTaskDisplayArea(); final Task targetStack = spy(taskDisplayArea.createStack(WINDOWING_MODE_FULLSCREEN, ACTIVITY_TYPE_STANDARD, false /* onTop */)); - final Task task = new TaskBuilder(mSupervisor).setStack(targetStack).build(); + final Task task = new TaskBuilder(mSupervisor).setParentTask(targetStack).build(); final ActivityRecord activity = new ActivityBuilder(mAtm).setTask(task).build(); activity.setState(ActivityState.RESUMED, "test"); taskDisplayArea.positionChildAt(POSITION_BOTTOM, targetStack, false /*includingParents*/); @@ -884,7 +886,7 @@ public class RootActivityContainerTests extends WindowTestsBase { // Create a root task with an activity on secondary display. final TestDisplayContent secondaryDisplay = new TestDisplayContent.Builder(mAtm, 300, 600).build(); - final Task task = new StackBuilder(mRootWindowContainer) + final Task task = new TaskBuilder(mSupervisor) .setDisplay(secondaryDisplay).build(); final ActivityRecord activity = new ActivityBuilder(mAtm).setTask(task).build(); diff --git a/services/tests/wmtests/src/com/android/server/wm/RootWindowContainerTests.java b/services/tests/wmtests/src/com/android/server/wm/RootWindowContainerTests.java index 191c33c61aca..3053fe6ec55f 100644 --- a/services/tests/wmtests/src/com/android/server/wm/RootWindowContainerTests.java +++ b/services/tests/wmtests/src/com/android/server/wm/RootWindowContainerTests.java @@ -174,7 +174,7 @@ public class RootWindowContainerTests extends WindowTestsBase { @Test public void testForceStopPackage() { - final Task task = new StackBuilder(mWm.mRoot).build(); + final Task task = new TaskBuilder(mSupervisor).setCreateActivity(true).build(); final ActivityRecord activity = task.getTopMostActivity(); final WindowProcessController wpc = activity.app; final ActivityRecord[] activities = { diff --git a/services/tests/wmtests/src/com/android/server/wm/RunningTasksTest.java b/services/tests/wmtests/src/com/android/server/wm/RunningTasksTest.java index 341509310e26..8a5b13c0bdce 100644 --- a/services/tests/wmtests/src/com/android/server/wm/RunningTasksTest.java +++ b/services/tests/wmtests/src/com/android/server/wm/RunningTasksTest.java @@ -62,8 +62,7 @@ public class RunningTasksTest extends WindowTestsBase { final int numStacks = 2; for (int stackIndex = 0; stackIndex < numStacks; stackIndex++) { - final Task stack = new StackBuilder(mRootWindowContainer) - .setCreateActivity(false) + final Task stack = new TaskBuilder(mSupervisor) .setDisplay(display) .setOnTop(false) .build(); @@ -104,8 +103,7 @@ public class RunningTasksTest extends WindowTestsBase { final DisplayContent display = new TestDisplayContent.Builder(mAtm, 1000, 2500).build(); final int numTasks = 10; for (int i = 0; i < numTasks; i++) { - final Task stack = new StackBuilder(mRootWindowContainer) - .setCreateActivity(false) + final Task stack = new TaskBuilder(mSupervisor) .setDisplay(display) .setOnTop(true) .build(); @@ -135,7 +133,7 @@ public class RunningTasksTest extends WindowTestsBase { final Task task = new TaskBuilder(mAtm.mStackSupervisor) .setComponent(new ComponentName(mContext.getPackageName(), className)) .setTaskId(taskId) - .setStack(stack) + .setParentTask(stack) .build(); task.lastActiveTime = lastActiveTime; final ActivityRecord activity = new ActivityBuilder(mAtm) diff --git a/services/tests/wmtests/src/com/android/server/wm/SizeCompatTests.java b/services/tests/wmtests/src/com/android/server/wm/SizeCompatTests.java index 6c648a894821..29081d389225 100644 --- a/services/tests/wmtests/src/com/android/server/wm/SizeCompatTests.java +++ b/services/tests/wmtests/src/com/android/server/wm/SizeCompatTests.java @@ -35,7 +35,9 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotEquals; import static org.junit.Assert.assertTrue; +import static org.mockito.ArgumentMatchers.anyBoolean; import static org.mockito.ArgumentMatchers.anyString; +import static org.mockito.Mockito.doCallRealMethod; import android.app.ActivityManager; import android.app.ActivityManagerInternal; @@ -70,7 +72,7 @@ public class SizeCompatTests extends WindowTestsBase { private ActivityRecord mActivity; private void setUpApp(DisplayContent display) { - mStack = new StackBuilder(mRootWindowContainer).setDisplay(display).build(); + mStack = new TaskBuilder(mSupervisor).setDisplay(display).setCreateActivity(true).build(); mTask = mStack.getBottomMostTask(); mActivity = mTask.getTopNonFinishingActivity(); } @@ -216,22 +218,50 @@ public class SizeCompatTests extends WindowTestsBase { final Rect origBounds = new Rect(mActivity.getBounds()); final Rect currentBounds = mActivity.getWindowConfiguration().getBounds(); + final DisplayContent display = mActivity.mDisplayContent; // Change the size of current display. - resizeDisplay(mStack.mDisplayContent, 1000, 2000); - + resizeDisplay(display, 1000, 2000); + // The bounds should be [100, 0 - 1100, 2500]. assertEquals(origBounds.width(), currentBounds.width()); assertEquals(origBounds.height(), currentBounds.height()); assertScaled(); + // The scale is 2000/2500=0.8. The horizontal centered offset is (1000-(1000*0.8))/2=100. + final float scale = (float) display.mBaseDisplayHeight / currentBounds.height(); + final int offsetX = (int) (display.mBaseDisplayWidth - (origBounds.width() * scale)) / 2; + assertEquals(offsetX, currentBounds.left); + // The position of configuration bounds should be the same as compat bounds. assertEquals(mActivity.getBounds().left, currentBounds.left); assertEquals(mActivity.getBounds().top, currentBounds.top); // Change display size to a different orientation - resizeDisplay(mStack.mDisplayContent, 2000, 1000); + resizeDisplay(display, 2000, 1000); + // The bounds should be [800, 0 - 1800, 2500]. assertEquals(origBounds.width(), currentBounds.width()); assertEquals(origBounds.height(), currentBounds.height()); + assertEquals(Configuration.ORIENTATION_LANDSCAPE, display.getConfiguration().orientation); + assertEquals(Configuration.ORIENTATION_PORTRAIT, mActivity.getConfiguration().orientation); + + // The previous resize operation doesn't consider the rotation change after size changed. + // These setups apply the requested orientation to rotation as real case that the top fixed + // portrait activity will determine the display rotation. + final DisplayRotation displayRotation = display.getDisplayRotation(); + doCallRealMethod().when(displayRotation).updateRotationUnchecked(anyBoolean()); + // Skip unrelated layout procedures. + mAtm.deferWindowLayout(); + display.reconfigureDisplayLocked(); + displayRotation.updateOrientation(display.getOrientation(), true /* forceUpdate */); + display.sendNewConfiguration(); + + assertEquals(Configuration.ORIENTATION_PORTRAIT, display.getConfiguration().orientation); + assertEquals(Configuration.ORIENTATION_PORTRAIT, mActivity.getConfiguration().orientation); + // The size should still be in portrait [100, 0 - 1100, 2500] = 1000x2500. + assertEquals(origBounds.width(), currentBounds.width()); + assertEquals(origBounds.height(), currentBounds.height()); + assertEquals(offsetX, currentBounds.left); + assertScaled(); } @Test diff --git a/services/tests/wmtests/src/com/android/server/wm/TaskDisplayAreaTests.java b/services/tests/wmtests/src/com/android/server/wm/TaskDisplayAreaTests.java index 260f1e9a9259..bc3b3a4d7ad1 100644 --- a/services/tests/wmtests/src/com/android/server/wm/TaskDisplayAreaTests.java +++ b/services/tests/wmtests/src/com/android/server/wm/TaskDisplayAreaTests.java @@ -218,7 +218,7 @@ public class TaskDisplayAreaTests extends WindowTestsBase { final Task rootHomeTask = defaultTaskDisplayArea.getRootHomeTask(); rootHomeTask.mResizeMode = RESIZE_MODE_UNRESIZEABLE; - final Task primarySplitTask = new StackBuilder(rootWindowContainer) + final Task primarySplitTask = new TaskBuilder(mSupervisor) .setTaskDisplayArea(defaultTaskDisplayArea) .setWindowingMode(WINDOWING_MODE_SPLIT_SCREEN_PRIMARY) .setActivityType(ACTIVITY_TYPE_STANDARD) diff --git a/services/tests/wmtests/src/com/android/server/wm/TaskLaunchParamsModifierTests.java b/services/tests/wmtests/src/com/android/server/wm/TaskLaunchParamsModifierTests.java index 42de5e6b429d..1d32e17dd5e1 100644 --- a/services/tests/wmtests/src/com/android/server/wm/TaskLaunchParamsModifierTests.java +++ b/services/tests/wmtests/src/com/android/server/wm/TaskLaunchParamsModifierTests.java @@ -1358,7 +1358,7 @@ public class TaskLaunchParamsModifierTests extends WindowTestsBase { final Task stack = display.getDefaultTaskDisplayArea() .createStack(display.getWindowingMode(), ACTIVITY_TYPE_STANDARD, true); stack.setWindowingMode(WINDOWING_MODE_FREEFORM); - final Task task = new TaskBuilder(mSupervisor).setStack(stack).build(); + final Task task = new TaskBuilder(mSupervisor).setParentTask(stack).build(); // Just work around the unnecessary adjustments for bounds. task.getWindowConfiguration().setBounds(bounds); } diff --git a/services/tests/wmtests/src/com/android/server/wm/TaskRecordTests.java b/services/tests/wmtests/src/com/android/server/wm/TaskRecordTests.java index 08537a4ea9c1..a908bfef98de 100644 --- a/services/tests/wmtests/src/com/android/server/wm/TaskRecordTests.java +++ b/services/tests/wmtests/src/com/android/server/wm/TaskRecordTests.java @@ -176,7 +176,7 @@ public class TaskRecordTests extends WindowTestsBase { TaskDisplayArea taskDisplayArea = mAtm.mRootWindowContainer.getDefaultTaskDisplayArea(); Task stack = taskDisplayArea.createStack(WINDOWING_MODE_FREEFORM, ACTIVITY_TYPE_STANDARD, true /* onTop */); - Task task = new TaskBuilder(mSupervisor).setStack(stack).build(); + Task task = new TaskBuilder(mSupervisor).setParentTask(stack).build(); final Configuration parentConfig = stack.getConfiguration(); parentConfig.windowConfiguration.setBounds(parentBounds); parentConfig.densityDpi = DisplayMetrics.DENSITY_DEFAULT; @@ -212,7 +212,7 @@ public class TaskRecordTests extends WindowTestsBase { @Test public void testBoundsOnModeChangeFreeformToFullscreen() { DisplayContent display = mAtm.mRootWindowContainer.getDefaultDisplay(); - Task stack = new StackBuilder(mRootWindowContainer).setDisplay(display) + Task stack = new TaskBuilder(mSupervisor).setDisplay(display).setCreateActivity(true) .setWindowingMode(WINDOWING_MODE_FREEFORM).build(); Task task = stack.getBottomMostTask(); task.getRootActivity().setOrientation(SCREEN_ORIENTATION_UNSPECIFIED); @@ -253,7 +253,7 @@ public class TaskRecordTests extends WindowTestsBase { dr.setFixedToUserRotation(FIXED_TO_USER_ROTATION_ENABLED); dr.setUserRotation(USER_ROTATION_FREE, ROTATION_0); - final Task stack = new StackBuilder(mRootWindowContainer) + final Task stack = new TaskBuilder(mSupervisor).setCreateActivity(true) .setWindowingMode(WINDOWING_MODE_FULLSCREEN).setDisplay(display).build(); final Task task = stack.getBottomMostTask(); final ActivityRecord root = task.getTopNonFinishingActivity(); @@ -317,7 +317,7 @@ public class TaskRecordTests extends WindowTestsBase { dr.setFixedToUserRotation(FIXED_TO_USER_ROTATION_ENABLED); dr.setUserRotation(USER_ROTATION_FREE, ROTATION_0); - final Task stack = new StackBuilder(mRootWindowContainer) + final Task stack = new TaskBuilder(mSupervisor).setCreateActivity(true) .setWindowingMode(WINDOWING_MODE_FULLSCREEN).setDisplay(display).build(); final Task task = stack.getBottomMostTask(); ActivityRecord root = task.getTopNonFinishingActivity(); @@ -341,7 +341,7 @@ public class TaskRecordTests extends WindowTestsBase { Configuration.ORIENTATION_LANDSCAPE; display.onRequestedOverrideConfigurationChanged( display.getRequestedOverrideConfiguration()); - Task stack = new StackBuilder(mRootWindowContainer) + Task stack = new TaskBuilder(mSupervisor).setCreateActivity(true) .setWindowingMode(WINDOWING_MODE_FULLSCREEN).setDisplay(display).build(); Task task = stack.getBottomMostTask(); ActivityRecord root = task.getTopNonFinishingActivity(); @@ -497,7 +497,7 @@ public class TaskRecordTests extends WindowTestsBase { DisplayInfo displayInfo = new DisplayInfo(); mAtm.mContext.getDisplay().getDisplayInfo(displayInfo); final int displayHeight = displayInfo.logicalHeight; - final Task task = new TaskBuilder(mSupervisor).setStack(stack).build(); + final Task task = new TaskBuilder(mSupervisor).setParentTask(stack).build(); final Configuration inOutConfig = new Configuration(); final Configuration parentConfig = new Configuration(); final int longSide = 1200; @@ -1029,7 +1029,7 @@ public class TaskRecordTests extends WindowTestsBase { } private Task getTestTask() { - final Task stack = new StackBuilder(mRootWindowContainer).build(); + final Task stack = new TaskBuilder(mSupervisor).setCreateActivity(true).build(); return stack.getBottomMostTask(); } @@ -1039,7 +1039,7 @@ public class TaskRecordTests extends WindowTestsBase { TaskDisplayArea taskDisplayArea = mAtm.mRootWindowContainer.getDefaultTaskDisplayArea(); Task stack = taskDisplayArea.createStack(windowingMode, ACTIVITY_TYPE_STANDARD, true /* onTop */); - Task task = new TaskBuilder(mSupervisor).setStack(stack).build(); + Task task = new TaskBuilder(mSupervisor).setParentTask(stack).build(); final Configuration parentConfig = stack.getConfiguration(); parentConfig.windowConfiguration.setAppBounds(parentBounds); diff --git a/services/tests/wmtests/src/com/android/server/wm/WindowContainerTests.java b/services/tests/wmtests/src/com/android/server/wm/WindowContainerTests.java index 4163a9a546a0..36f3a21e38f1 100644 --- a/services/tests/wmtests/src/com/android/server/wm/WindowContainerTests.java +++ b/services/tests/wmtests/src/com/android/server/wm/WindowContainerTests.java @@ -829,7 +829,7 @@ public class WindowContainerTests extends WindowTestsBase { final DisplayContent displayContent = createNewDisplay(); // Do not reparent activity to default display when removing the display. doReturn(true).when(displayContent).shouldDestroyContentOnRemove(); - final ActivityRecord r = new StackBuilder(mWm.mRoot) + final ActivityRecord r = new TaskBuilder(mSupervisor).setCreateActivity(true) .setDisplay(displayContent).build().getTopMostActivity(); // Add a window and make the activity animating so the removal of activity is deferred. createWindow(null, TYPE_BASE_APPLICATION, r, "win"); diff --git a/services/tests/wmtests/src/com/android/server/wm/WindowOrganizerTests.java b/services/tests/wmtests/src/com/android/server/wm/WindowOrganizerTests.java index 46a6a82faba5..38909f6a28d4 100644 --- a/services/tests/wmtests/src/com/android/server/wm/WindowOrganizerTests.java +++ b/services/tests/wmtests/src/com/android/server/wm/WindowOrganizerTests.java @@ -290,7 +290,7 @@ public class WindowOrganizerTests extends WindowTestsBase { @Test public void testTaskTransaction() { removeGlobalMinSizeRestriction(); - final Task stack = new StackBuilder(mWm.mRoot) + final Task stack = new TaskBuilder(mSupervisor) .setWindowingMode(WINDOWING_MODE_FREEFORM).build(); final Task task = stack.getTopMostTask(); testTransaction(task); @@ -299,7 +299,7 @@ public class WindowOrganizerTests extends WindowTestsBase { @Test public void testStackTransaction() { removeGlobalMinSizeRestriction(); - final Task stack = new StackBuilder(mWm.mRoot) + final Task stack = new TaskBuilder(mSupervisor) .setWindowingMode(WINDOWING_MODE_FREEFORM).build(); StackInfo info = mWm.mAtmService.getStackInfo(WINDOWING_MODE_FREEFORM, ACTIVITY_TYPE_STANDARD); @@ -324,7 +324,7 @@ public class WindowOrganizerTests extends WindowTestsBase { @Test public void testSetWindowingMode() { - final Task stack = new StackBuilder(mWm.mRoot) + final Task stack = new TaskBuilder(mSupervisor) .setWindowingMode(WINDOWING_MODE_FREEFORM).build(); testSetWindowingMode(stack); @@ -358,7 +358,7 @@ public class WindowOrganizerTests extends WindowTestsBase { @Test public void testContainerFocusableChanges() { removeGlobalMinSizeRestriction(); - final Task stack = new StackBuilder(mWm.mRoot) + final Task stack = new TaskBuilder(mSupervisor) .setWindowingMode(WINDOWING_MODE_FREEFORM).build(); final Task task = stack.getTopMostTask(); WindowContainerTransaction t = new WindowContainerTransaction(); @@ -374,7 +374,7 @@ public class WindowOrganizerTests extends WindowTestsBase { @Test public void testContainerHiddenChanges() { removeGlobalMinSizeRestriction(); - final Task stack = new StackBuilder(mWm.mRoot) + final Task stack = new TaskBuilder(mSupervisor).setCreateActivity(true) .setWindowingMode(WINDOWING_MODE_FREEFORM).build(); WindowContainerTransaction t = new WindowContainerTransaction(); assertTrue(stack.shouldBeVisible(null)); @@ -389,7 +389,7 @@ public class WindowOrganizerTests extends WindowTestsBase { @Test public void testOverrideConfigSize() { removeGlobalMinSizeRestriction(); - final Task stack = new StackBuilder(mWm.mRoot) + final Task stack = new TaskBuilder(mSupervisor) .setWindowingMode(WINDOWING_MODE_FREEFORM).build(); final Task task = stack.getTopMostTask(); WindowContainerTransaction t = new WindowContainerTransaction(); diff --git a/services/tests/wmtests/src/com/android/server/wm/WindowTestsBase.java b/services/tests/wmtests/src/com/android/server/wm/WindowTestsBase.java index 38c4e0a7de02..7daddd8720ab 100644 --- a/services/tests/wmtests/src/com/android/server/wm/WindowTestsBase.java +++ b/services/tests/wmtests/src/com/android/server/wm/WindowTestsBase.java @@ -90,6 +90,7 @@ import com.android.server.AttributeCache; import org.junit.Before; import org.junit.BeforeClass; import org.junit.runner.Description; +import org.mockito.Mockito; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; @@ -398,22 +399,20 @@ class WindowTestsBase extends SystemServiceTestsBase { } Task createTaskStackOnDisplay(int windowingMode, int activityType, DisplayContent dc) { - return new StackBuilder(dc.mWmService.mRoot) + return new TaskBuilder(dc.mAtmService.mStackSupervisor) .setDisplay(dc) .setWindowingMode(windowingMode) .setActivityType(activityType) - .setCreateActivity(false) .setIntent(new Intent()) .build(); } Task createTaskStackOnTaskDisplayArea(int windowingMode, int activityType, TaskDisplayArea tda) { - return new StackBuilder(tda.mWmService.mRoot) + return new TaskBuilder(tda.mDisplayContent.mAtmService.mStackSupervisor) .setTaskDisplayArea(tda) .setWindowingMode(windowingMode) .setActivityType(activityType) - .setCreateActivity(false) .setIntent(new Intent()) .build(); } @@ -422,7 +421,7 @@ class WindowTestsBase extends SystemServiceTestsBase { Task createTaskInStack(Task stack, int userId) { final Task task = new TaskBuilder(stack.mStackSupervisor) .setUserId(userId) - .setStack(stack) + .setParentTask(stack) .build(); return task; } @@ -733,7 +732,7 @@ class WindowTestsBase extends SystemServiceTestsBase { if (mCreateTask) { mTask = new TaskBuilder(mService.mStackSupervisor) .setComponent(mComponent) - .setStack(mStack).build(); + .setParentTask(mStack).build(); } else if (mTask == null && mStack != null && DisplayContent.alwaysCreateStack( mStack.getWindowingMode(), mStack.getActivityType())) { // The stack can be the task root. @@ -813,43 +812,51 @@ class WindowTestsBase extends SystemServiceTestsBase { protected static class TaskBuilder { private final ActivityStackSupervisor mSupervisor; + private TaskDisplayArea mTaskDisplayArea; private ComponentName mComponent; private String mPackage; private int mFlags = 0; - // Task id 0 is reserved in ARC for the home app. - private int mTaskId = SystemServicesTestRule.sNextTaskId++; + private int mTaskId = -1; private int mUserId = 0; + private int mWindowingMode = WINDOWING_MODE_UNDEFINED; + private int mActivityType = ACTIVITY_TYPE_STANDARD; + private ActivityInfo mActivityInfo; + private Intent mIntent; + private boolean mOnTop = true; private IVoiceInteractionSession mVoiceSession; - private boolean mCreateStack = true; - private Task mStack; - private TaskDisplayArea mTaskDisplayArea; + private boolean mCreateParentTask = false; + private Task mParentTask; + + private boolean mCreateActivity = false; TaskBuilder(ActivityStackSupervisor supervisor) { mSupervisor = supervisor; + mTaskDisplayArea = mSupervisor.mRootWindowContainer.getDefaultTaskDisplayArea(); } - TaskBuilder setComponent(ComponentName component) { - mComponent = component; + /** + * Set the parent {@link DisplayContent} and use the default task display area. Overrides + * the task display area, if was set before. + */ + TaskBuilder setDisplay(DisplayContent display) { + mTaskDisplayArea = display.getDefaultTaskDisplayArea(); return this; } - TaskBuilder setPackage(String packageName) { - mPackage = packageName; + /** Set the parent {@link TaskDisplayArea}. Overrides the display, if was set before. */ + TaskBuilder setTaskDisplayArea(TaskDisplayArea taskDisplayArea) { + mTaskDisplayArea = taskDisplayArea; return this; } - /** - * Set to {@code true} by default, set to {@code false} to prevent the task from - * automatically creating a parent stack. - */ - TaskBuilder setCreateStack(boolean createStack) { - mCreateStack = createStack; + TaskBuilder setComponent(ComponentName component) { + mComponent = component; return this; } - TaskBuilder setVoiceSession(IVoiceInteractionSession session) { - mVoiceSession = session; + TaskBuilder setPackage(String packageName) { + mPackage = packageName; return this; } @@ -868,156 +875,117 @@ class WindowTestsBase extends SystemServiceTestsBase { return this; } - TaskBuilder setStack(Task stack) { - mStack = stack; - return this; - } - - TaskBuilder setDisplay(DisplayContent display) { - mTaskDisplayArea = display.getDefaultTaskDisplayArea(); - return this; - } - - Task build() { - SystemServicesTestRule.checkHoldsLock(mSupervisor.mService.mGlobalLock); - - if (mStack == null && mCreateStack) { - TaskDisplayArea displayArea = mTaskDisplayArea != null ? mTaskDisplayArea - : mSupervisor.mRootWindowContainer.getDefaultTaskDisplayArea(); - mStack = displayArea.createStack( - WINDOWING_MODE_FULLSCREEN, ACTIVITY_TYPE_STANDARD, true /* onTop */); - spyOn(mStack); - } - - final ActivityInfo aInfo = new ActivityInfo(); - aInfo.applicationInfo = new ApplicationInfo(); - aInfo.applicationInfo.packageName = mPackage; - - Intent intent = new Intent(); - if (mComponent == null) { - mComponent = ComponentName.createRelative(DEFAULT_COMPONENT_PACKAGE_NAME, - DEFAULT_COMPONENT_CLASS_NAME); - } - - intent.setComponent(mComponent); - intent.setFlags(mFlags); - - final Task task = new Task(mSupervisor.mService, mTaskId, aInfo, - intent /*intent*/, mVoiceSession, null /*_voiceInteractor*/, - null /*taskDescription*/, mStack); - spyOn(task); - task.mUserId = mUserId; - - if (mStack != null) { - mStack.moveToFront("test"); - mStack.addChild(task, true, true); - } - - return task; - } - } - - static class StackBuilder { - private final RootWindowContainer mRootWindowContainer; - private DisplayContent mDisplay; - private TaskDisplayArea mTaskDisplayArea; - private int mStackId = -1; - private int mWindowingMode = WINDOWING_MODE_UNDEFINED; - private int mActivityType = ACTIVITY_TYPE_STANDARD; - private boolean mOnTop = true; - private boolean mCreateActivity = true; - private ActivityInfo mInfo; - private Intent mIntent; - - StackBuilder(RootWindowContainer root) { - mRootWindowContainer = root; - mDisplay = mRootWindowContainer.getDefaultDisplay(); - mTaskDisplayArea = mDisplay.getDefaultTaskDisplayArea(); - } - - StackBuilder setWindowingMode(int windowingMode) { + TaskBuilder setWindowingMode(int windowingMode) { mWindowingMode = windowingMode; return this; } - StackBuilder setActivityType(int activityType) { + TaskBuilder setActivityType(int activityType) { mActivityType = activityType; return this; } - StackBuilder setStackId(int stackId) { - mStackId = stackId; + TaskBuilder setActivityInfo(ActivityInfo info) { + mActivityInfo = info; return this; } - /** - * Set the parent {@link DisplayContent} and use the default task display area. Overrides - * the task display area, if was set before. - */ - StackBuilder setDisplay(DisplayContent display) { - mDisplay = display; - mTaskDisplayArea = mDisplay.getDefaultTaskDisplayArea(); + TaskBuilder setIntent(Intent intent) { + mIntent = intent; return this; } - /** Set the parent {@link TaskDisplayArea}. Overrides the display, if was set before. */ - StackBuilder setTaskDisplayArea(TaskDisplayArea taskDisplayArea) { - mTaskDisplayArea = taskDisplayArea; - mDisplay = mTaskDisplayArea.mDisplayContent; + TaskBuilder setOnTop(boolean onTop) { + mOnTop = onTop; return this; } - StackBuilder setOnTop(boolean onTop) { - mOnTop = onTop; + TaskBuilder setVoiceSession(IVoiceInteractionSession session) { + mVoiceSession = session; return this; } - StackBuilder setCreateActivity(boolean createActivity) { - mCreateActivity = createActivity; + TaskBuilder setCreateParentTask(boolean createParentTask) { + mCreateParentTask = createParentTask; return this; } - StackBuilder setActivityInfo(ActivityInfo info) { - mInfo = info; + TaskBuilder setParentTask(Task parentTask) { + mParentTask = parentTask; return this; } - StackBuilder setIntent(Intent intent) { - mIntent = intent; + TaskBuilder setCreateActivity(boolean createActivity) { + mCreateActivity = createActivity; return this; } Task build() { - SystemServicesTestRule.checkHoldsLock(mRootWindowContainer.mWmService.mGlobalLock); + SystemServicesTestRule.checkHoldsLock(mSupervisor.mService.mGlobalLock); + + // Create parent task. + if (mParentTask == null && mCreateParentTask) { + mParentTask = mTaskDisplayArea.createStack( + WINDOWING_MODE_FULLSCREEN, ACTIVITY_TYPE_STANDARD, true /* onTop */); + } + if (mParentTask != null && !Mockito.mockingDetails(mParentTask).isSpy()) { + spyOn(mParentTask); + } + + // Create task. + if (mActivityInfo == null) { + mActivityInfo = new ActivityInfo(); + mActivityInfo.applicationInfo = new ApplicationInfo(); + mActivityInfo.applicationInfo.packageName = mPackage; + } - final int stackId = mStackId >= 0 ? mStackId : mTaskDisplayArea.getNextStackId(); - final Task stack = mTaskDisplayArea.createStackUnchecked( - mWindowingMode, mActivityType, stackId, mOnTop, mInfo, mIntent, - false /* createdByOrganizer */); - final ActivityStackSupervisor supervisor = mRootWindowContainer.mStackSupervisor; + if (mIntent == null) { + mIntent = new Intent(); + if (mComponent == null) { + mComponent = ComponentName.createRelative(DEFAULT_COMPONENT_PACKAGE_NAME, + DEFAULT_COMPONENT_CLASS_NAME); + } + mIntent.setComponent(mComponent); + mIntent.setFlags(mFlags); + } + Task task; + final int taskId = mTaskId >= 0 ? mTaskId : mTaskDisplayArea.getNextStackId(); + if (mParentTask == null) { + task = mTaskDisplayArea.createStackUnchecked( + mWindowingMode, mActivityType, taskId, mOnTop, mActivityInfo, + mIntent, false /* createdByOrganizer */); + } else { + task = new Task(mSupervisor.mService, taskId, mActivityInfo, + mIntent /*intent*/, mVoiceSession, null /*_voiceInteractor*/, + null /*taskDescription*/, mParentTask); + mParentTask.moveToFront("build-task"); + mParentTask.addChild(task, true, true); + } + spyOn(task); + task.mUserId = mUserId; + Task rootTask = task.getRootTask(); + doNothing().when(rootTask).startActivityLocked( + any(), any(), anyBoolean(), anyBoolean(), any()); + + // Create child task with activity. if (mCreateActivity) { - new ActivityBuilder(supervisor.mService) + new ActivityBuilder(mSupervisor.mService) .setCreateTask(true) - .setStack(stack) + .setStack(task) .build(); if (mOnTop) { // We move the task to front again in order to regain focus after activity - // added to the stack. Or {@link DisplayContent#mPreferredTopFocusableStack} + // added to the stack. Or {@link TaskDisplayArea#mPreferredTopFocusableStack} // could be other stacks (e.g. home stack). - stack.moveToFront("createActivityStack"); + task.moveToFront("createActivityTask"); } else { - stack.moveToBack("createActivityStack", null); + task.moveToBack("createActivityTask", null); } } - spyOn(stack); - - doNothing().when(stack).startActivityLocked( - any(), any(), anyBoolean(), anyBoolean(), any()); - return stack; + return task; } - } static class TestSplitOrganizer extends ITaskOrganizer.Stub { diff --git a/telephony/api/system-current.txt b/telephony/api/system-current.txt index 944edd542e40..72e11c867a2b 100644 --- a/telephony/api/system-current.txt +++ b/telephony/api/system-current.txt @@ -291,6 +291,22 @@ package android.telephony { method public static boolean isVoiceMailNumber(@NonNull android.content.Context, int, @Nullable String); } + public final class PhysicalChannelConfig implements android.os.Parcelable { + method public int describeContents(); + method public int getCellBandwidthDownlink(); + method public int getChannelNumber(); + method public int getConnectionStatus(); + method public int getNetworkType(); + method @IntRange(from=0, to=1007) public int getPhysicalCellId(); + method public void writeToParcel(@NonNull android.os.Parcel, int); + field public static final int CHANNEL_NUMBER_UNKNOWN = -1; // 0xffffffff + field public static final int CONNECTION_PRIMARY_SERVING = 1; // 0x1 + field public static final int CONNECTION_SECONDARY_SERVING = 2; // 0x2 + field public static final int CONNECTION_UNKNOWN = -1; // 0xffffffff + field @NonNull public static final android.os.Parcelable.Creator<android.telephony.PhysicalChannelConfig> CREATOR; + field public static final int PHYSICAL_CELL_ID_UNKNOWN = -1; // 0xffffffff + } + public final class PreciseCallState implements android.os.Parcelable { ctor public PreciseCallState(int, int, int, int, int); method public int describeContents(); diff --git a/telephony/java/android/telephony/PhysicalChannelConfig.java b/telephony/java/android/telephony/PhysicalChannelConfig.java index af62ba4b93a1..8d49e15da934 100644 --- a/telephony/java/android/telephony/PhysicalChannelConfig.java +++ b/telephony/java/android/telephony/PhysicalChannelConfig.java @@ -17,6 +17,9 @@ package android.telephony; import android.annotation.IntDef; +import android.annotation.IntRange; +import android.annotation.NonNull; +import android.annotation.SystemApi; import android.os.Parcel; import android.os.Parcelable; import android.telephony.Annotation.NetworkType; @@ -29,9 +32,11 @@ import java.util.Objects; /** * @hide */ +@SystemApi public final class PhysicalChannelConfig implements Parcelable { // TODO(b/72993578) consolidate these enums in a central location. + /** @hide */ @Retention(RetentionPolicy.SOURCE) @IntDef({CONNECTION_PRIMARY_SERVING, CONNECTION_SECONDARY_SERVING, CONNECTION_UNKNOWN}) public @interface ConnectionStatus {} @@ -47,7 +52,13 @@ public final class PhysicalChannelConfig implements Parcelable { public static final int CONNECTION_SECONDARY_SERVING = 2; /** Connection status is unknown. */ - public static final int CONNECTION_UNKNOWN = Integer.MAX_VALUE; + public static final int CONNECTION_UNKNOWN = -1; + + /** Channel number is unknown. */ + public static final int CHANNEL_NUMBER_UNKNOWN = -1; + + /** Physical Cell Id is unknown. */ + public static final int PHYSICAL_CELL_ID_UNKNOWN = -1; /** * Connection status of the cell. @@ -75,7 +86,7 @@ public final class PhysicalChannelConfig implements Parcelable { private int mFrequencyRange; /** - * The absolute radio frequency channel number, {@link Integer#MAX_VALUE} if unknown. + * The absolute radio frequency channel number, {@link CHANNEL_NUMBER_UNKNOWN} if unknown. */ private int mChannelNumber; @@ -86,7 +97,8 @@ public final class PhysicalChannelConfig implements Parcelable { private int[] mContextIds; /** - * The physical cell identifier for this cell - PCI, PSC, {@link Integer#MAX_VALUE} if known. + * The physical cell identifier for this cell - PCI, PSC, {@link PHYSICAL_CELL_ID_UNKNOWN} + * if unknown. */ private int mPhysicalCellId; @@ -96,7 +108,7 @@ public final class PhysicalChannelConfig implements Parcelable { } @Override - public void writeToParcel(Parcel dest, int flags) { + public void writeToParcel(@NonNull Parcel dest, int flags) { dest.writeInt(mCellConnectionStatus); dest.writeInt(mCellBandwidthDownlinkKhz); dest.writeInt(mRat); @@ -120,6 +132,7 @@ public final class PhysicalChannelConfig implements Parcelable { * physical channel has no data call mapped to it. * * @return an integer list indicates the data call ids. + * @hide */ public int[] getContextIds() { return mContextIds; @@ -131,6 +144,7 @@ public final class PhysicalChannelConfig implements Parcelable { * @see {@link ServiceState#FREQUENCY_RANGE_MID} * @see {@link ServiceState#FREQUENCY_RANGE_HIGH} * @see {@link ServiceState#FREQUENCY_RANGE_MMWAVE} + * @hide */ @ServiceState.FrequencyRange public int getFrequencyRange() { @@ -139,7 +153,7 @@ public final class PhysicalChannelConfig implements Parcelable { /** * @return the absolute radio frequency channel number for this physical channel, - * {@link Integer#MAX_VALUE} if unknown. + * {@link CHANNEL_NUMBER_UNKNOWN} if unknown. */ public int getChannelNumber() { return mChannelNumber; @@ -152,18 +166,20 @@ public final class PhysicalChannelConfig implements Parcelable { * In EUTRAN, this value is physical layer cell identity. The range is [0, 503]. * Reference: 3GPP TS 36.211 section 6.11. * - * In 5G RAN, this value is physical layer cell identity. The range is [0, 1008]. + * In 5G RAN, this value is physical layer cell identity. The range is [0, 1007]. * Reference: 3GPP TS 38.211 section 7.4.2.1. * - * @return the physical cell identifier for this cell, {@link Integer#MAX_VALUE} if unknown. + * @return the physical cell identifier for this cell, {@link PHYSICAL_CELL_ID_UNKNOWN} + * if {@link android.telephony.CellInfo#UNAVAILABLE}. */ + @IntRange(from = 0, to = 1007) public int getPhysicalCellId() { return mPhysicalCellId; } /**The radio technology for this physical channel. */ @NetworkType - public int getRat() { + public int getNetworkType() { return mRat; } @@ -181,7 +197,10 @@ public final class PhysicalChannelConfig implements Parcelable { return mCellConnectionStatus; } - /** @return String representation of the connection status */ + /** + * @return String representation of the connection status + * @hide + */ private String getConnectionStatusString() { switch(mCellConnectionStatus) { case CONNECTION_PRIMARY_SERVING: @@ -254,6 +273,12 @@ public final class PhysicalChannelConfig implements Parcelable { .toString(); } + /** @hide */ + public PhysicalChannelConfig(int status, int bandwidth) { + mCellConnectionStatus = status; + mCellBandwidthDownlinkKhz = bandwidth; + } + private PhysicalChannelConfig(Parcel in) { mCellConnectionStatus = in.readInt(); mCellBandwidthDownlinkKhz = in.readInt(); @@ -274,7 +299,10 @@ public final class PhysicalChannelConfig implements Parcelable { mPhysicalCellId = builder.mPhysicalCellId; } - /** The builder of {@code PhysicalChannelConfig}. */ + /** + * The builder of {@code PhysicalChannelConfig}. + * @hide + */ public static final class Builder { private int mRat; private int mFrequencyRange; @@ -284,60 +312,51 @@ public final class PhysicalChannelConfig implements Parcelable { private int[] mContextIds; private int mPhysicalCellId; - /** @hide */ public Builder() { mRat = ServiceState.RIL_RADIO_TECHNOLOGY_UNKNOWN; mFrequencyRange = ServiceState.FREQUENCY_RANGE_UNKNOWN; - mChannelNumber = Integer.MAX_VALUE; + mChannelNumber = CHANNEL_NUMBER_UNKNOWN; mCellBandwidthDownlinkKhz = 0; mCellConnectionStatus = CONNECTION_UNKNOWN; mContextIds = new int[0]; - mPhysicalCellId = Integer.MAX_VALUE; + mPhysicalCellId = PHYSICAL_CELL_ID_UNKNOWN; } - /** @hide */ public PhysicalChannelConfig build() { return new PhysicalChannelConfig(this); } - /** @hide */ public Builder setRat(int rat) { this.mRat = rat; return this; } - /** @hide */ public Builder setFrequencyRange(int frequencyRange) { this.mFrequencyRange = frequencyRange; return this; } - /** @hide */ public Builder setChannelNumber(int channelNumber) { this.mChannelNumber = channelNumber; return this; } - /** @hide */ public Builder setCellBandwidthDownlinkKhz(int cellBandwidthDownlinkKhz) { this.mCellBandwidthDownlinkKhz = cellBandwidthDownlinkKhz; return this; } - /** @hide */ public Builder setCellConnectionStatus(int connectionStatus) { this.mCellConnectionStatus = connectionStatus; return this; } - /** @hide */ public Builder setContextIds(int[] contextIds) { if (contextIds != null) Arrays.sort(contextIds); this.mContextIds = contextIds; return this; } - /** @hide */ public Builder setPhysicalCellId(int physicalCellId) { this.mPhysicalCellId = physicalCellId; return this; diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java index 7a7792242c12..969016b1c017 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -5555,8 +5555,49 @@ public class TelephonyManager { * @param events The telephony state(s) of interest to the listener, * as a bitwise-OR combination of {@link PhoneStateListener} * LISTEN_ flags. + * @deprecated use {@link #listen(long, PhoneStateListener) instead due to the event number + * limit increased to 64. */ + @Deprecated public void listen(PhoneStateListener listener, int events) { + listen(events, listener); + } + + /** + * Registers a listener object to receive notification of changes + * in specified telephony states. + * <p> + * To register a listener, pass a {@link PhoneStateListener} and specify at least one telephony + * state of interest in the events argument. + * + * At registration, and when a specified telephony state changes, the telephony manager invokes + * the appropriate callback method on the listener object and passes the current (updated) + * values. + * <p> + * To un-register a listener, pass the listener object and set the events argument to + * {@link PhoneStateListener#LISTEN_NONE LISTEN_NONE} (0). + * + * If this TelephonyManager object has been created with {@link #createForSubscriptionId}, + * applies to the given subId. Otherwise, applies to + * {@link SubscriptionManager#getDefaultSubscriptionId()}. To listen events for multiple subIds, + * pass a separate listener object to each TelephonyManager object created with + * {@link #createForSubscriptionId}. + * + * Note: if you call this method while in the middle of a binder transaction, you <b>must</b> + * call {@link android.os.Binder#clearCallingIdentity()} before calling this method. A + * {@link SecurityException} will be thrown otherwise. + * + * This API should be used sparingly -- large numbers of listeners will cause system + * instability. If a process has registered too many listeners without unregistering them, it + * may encounter an {@link IllegalStateException} when trying to register more listeners. + * + * @param events The telephony state(s) of interest to the listener, + * as a bitwise-OR combination of {@link PhoneStateListener} + * LISTEN_ flags. + * @param listener The {@link PhoneStateListener} object to register + * (or unregister) + */ + public void listen(long events, @NonNull PhoneStateListener listener) { if (mContext == null) return; boolean notifyNow = (getITelephony() != null); TelephonyRegistryManager telephonyRegistry = diff --git a/tests/FlickerTests/src/com/android/server/wm/flicker/launch/OpenAppColdTest.kt b/tests/FlickerTests/src/com/android/server/wm/flicker/launch/OpenAppColdTest.kt index 254209aee450..17590723da8d 100644 --- a/tests/FlickerTests/src/com/android/server/wm/flicker/launch/OpenAppColdTest.kt +++ b/tests/FlickerTests/src/com/android/server/wm/flicker/launch/OpenAppColdTest.kt @@ -80,7 +80,7 @@ class OpenAppColdTest( noUncoveredRegions(Surface.ROTATION_0, rotation, bugId = 141361128) navBarLayerRotatesAndScales(Surface.ROTATION_0, rotation) statusBarLayerRotatesScales(Surface.ROTATION_0, rotation) - navBarLayerIsAlwaysVisible() + navBarLayerIsAlwaysVisible(enabled = rotation == Surface.ROTATION_0) statusBarLayerIsAlwaysVisible(enabled = false) wallpaperLayerBecomesInvisible() } diff --git a/tests/FlickerTests/src/com/android/server/wm/flicker/launch/OpenAppWarmTest.kt b/tests/FlickerTests/src/com/android/server/wm/flicker/launch/OpenAppWarmTest.kt index dda41a3021a0..afadb58eeed5 100644 --- a/tests/FlickerTests/src/com/android/server/wm/flicker/launch/OpenAppWarmTest.kt +++ b/tests/FlickerTests/src/com/android/server/wm/flicker/launch/OpenAppWarmTest.kt @@ -88,7 +88,7 @@ class OpenAppWarmTest( noUncoveredRegions(Surface.ROTATION_0, rotation, bugId = 141361128) navBarLayerRotatesAndScales(Surface.ROTATION_0, rotation) statusBarLayerRotatesScales(Surface.ROTATION_0, rotation) - navBarLayerIsAlwaysVisible(bugId = 140855415) + navBarLayerIsAlwaysVisible(enabled = rotation == Surface.ROTATION_0) statusBarLayerIsAlwaysVisible(enabled = false) wallpaperLayerBecomesInvisible() } diff --git a/tests/SilkFX/Android.bp b/tests/SilkFX/Android.bp index ca0a091e65bb..92e3efa7fd55 100644 --- a/tests/SilkFX/Android.bp +++ b/tests/SilkFX/Android.bp @@ -19,4 +19,10 @@ android_test { srcs: ["**/*.java", "**/*.kt"], platform_apis: true, certificate: "platform", + static_libs: [ + "androidx.core_core", + "androidx.appcompat_appcompat", + "com.google.android.material_material", + "androidx-constraintlayout_constraintlayout", + ], } diff --git a/tests/SilkFX/AndroidManifest.xml b/tests/SilkFX/AndroidManifest.xml index ca9550a9eeab..050e9c33aeac 100644 --- a/tests/SilkFX/AndroidManifest.xml +++ b/tests/SilkFX/AndroidManifest.xml @@ -39,5 +39,8 @@ <activity android:name=".hdr.GlowActivity" android:label="Glow Examples"/> + <activity android:name=".materials.GlassActivity" + android:label="Glass Examples"/> + </application> </manifest> diff --git a/tests/SilkFX/res/drawable-hdpi/background1.jpeg b/tests/SilkFX/res/drawable-hdpi/background1.jpeg Binary files differnew file mode 100644 index 000000000000..dcdfa7b850bc --- /dev/null +++ b/tests/SilkFX/res/drawable-hdpi/background1.jpeg diff --git a/tests/SilkFX/res/drawable-hdpi/background2.jpeg b/tests/SilkFX/res/drawable-hdpi/background2.jpeg Binary files differnew file mode 100644 index 000000000000..dc7ce84e6784 --- /dev/null +++ b/tests/SilkFX/res/drawable-hdpi/background2.jpeg diff --git a/tests/SilkFX/res/drawable-hdpi/background3.jpeg b/tests/SilkFX/res/drawable-hdpi/background3.jpeg Binary files differnew file mode 100644 index 000000000000..12b3429e3920 --- /dev/null +++ b/tests/SilkFX/res/drawable-hdpi/background3.jpeg diff --git a/tests/SilkFX/res/drawable-hdpi/noise.png b/tests/SilkFX/res/drawable-hdpi/noise.png Binary files differnew file mode 100644 index 000000000000..053995dad760 --- /dev/null +++ b/tests/SilkFX/res/drawable-hdpi/noise.png diff --git a/tests/SilkFX/res/layout/activity_glass.xml b/tests/SilkFX/res/layout/activity_glass.xml new file mode 100644 index 000000000000..a7b76bdeba09 --- /dev/null +++ b/tests/SilkFX/res/layout/activity_glass.xml @@ -0,0 +1,281 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +** Copyright 2012, 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. +--> +<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="match_parent" + tools:context=".MainActivity"> + + <ImageView + android:id="@+id/background" + android:layout_width="0dp" + android:layout_height="0dp" + android:scaleType="matrix" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" + tools:srcCompat="@drawable/background1" /> + + <com.android.test.silkfx.materials.GlassView + android:id="@+id/materialView" + android:layout_width="0dp" + android:layout_height="180dp" + android:layout_marginEnd="64dp" + android:layout_marginStart="64dp" + app:layout_constraintBottom_toTopOf="@+id/bottomPanel" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" /> + + <androidx.constraintlayout.widget.ConstraintLayout + android:id="@+id/bottomPanel" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:background="?android:attr/colorBackground" + android:paddingTop="24dp" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintBottom_toBottomOf="parent"> + + <SeekBar + android:id="@+id/materialOpacity" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_marginStart="12dp" + android:layout_marginEnd="12dp" + android:layout_marginBottom="16dp" + android:max="100" + android:progress="12" + app:layout_constraintBottom_toTopOf="@+id/scrimOpacityTitle" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintHorizontal_bias="1.0" + app:layout_constraintStart_toStartOf="parent" /> + + <SeekBar + android:id="@+id/zoom" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_marginBottom="16dp" + android:layout_marginEnd="12dp" + android:layout_marginStart="12dp" + android:min="-100" + android:max="100" + android:progress="-15" + app:layout_constraintBottom_toTopOf="@+id/blurRadiusTitle" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintHorizontal_bias="1.0" + app:layout_constraintStart_toStartOf="parent" /> + + <SeekBar + android:id="@+id/blurRadius" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_marginBottom="16dp" + android:layout_marginEnd="12dp" + android:layout_marginStart="12dp" + android:max="150" + android:progress="20" + app:layout_constraintBottom_toTopOf="@+id/materialOpacityTitle" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintHorizontal_bias="1.0" + app:layout_constraintStart_toStartOf="parent" /> + + <SeekBar + android:id="@+id/scrimOpacity" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_marginStart="12dp" + android:layout_marginEnd="12dp" + android:layout_marginBottom="16dp" + android:max="100" + android:progress="50" + app:layout_constraintBottom_toTopOf="@+id/noiseOpacityTitle" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintHorizontal_bias="1.0" + app:layout_constraintStart_toStartOf="parent" /> + + <SeekBar + android:id="@+id/noiseOpacity" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_marginStart="12dp" + android:layout_marginEnd="12dp" + android:layout_marginBottom="24dp" + android:max="100" + android:progress="5" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintHorizontal_bias="0.0" + app:layout_constraintStart_toStartOf="parent" /> + + <TextView + android:id="@+id/scrimOpacityTitle" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginStart="24dp" + android:layout_marginBottom="8dp" + android:text="Scrim Opacity" + android:textColor="@android:color/white" + app:layout_constraintBottom_toTopOf="@+id/scrimOpacity" + app:layout_constraintStart_toStartOf="parent" /> + + <TextView + android:id="@+id/materialOpacityTitle" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginStart="24dp" + android:layout_marginBottom="8dp" + android:text="Material Opacity" + android:textColor="@android:color/white" + app:layout_constraintBottom_toTopOf="@+id/materialOpacity" + app:layout_constraintStart_toStartOf="parent" /> + + <TextView + android:id="@+id/zoomTitle" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginStart="24dp" + android:layout_marginBottom="8dp" + android:text="Zoom" + android:textColor="@android:color/white" + app:layout_constraintBottom_toTopOf="@+id/zoom" + app:layout_constraintStart_toStartOf="parent" /> + + <TextView + android:id="@+id/blurRadiusTitle" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginStart="24dp" + android:layout_marginBottom="8dp" + android:text="Blur Radius" + android:textColor="@android:color/white" + app:layout_constraintBottom_toTopOf="@+id/blurRadius" + app:layout_constraintStart_toStartOf="parent" /> + + <TextView + android:id="@+id/noiseOpacityTitle" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginStart="24dp" + android:layout_marginBottom="8dp" + android:textColor="@android:color/white" + android:text="Noise Opacity" + app:layout_constraintBottom_toTopOf="@+id/noiseOpacity" + app:layout_constraintStart_toStartOf="parent" /> + + <ImageView + android:id="@+id/background1" + android:layout_width="64dp" + android:layout_height="64dp" + android:layout_marginStart="24dp" + android:layout_marginBottom="16dp" + android:foreground="?android:attr/selectableItemBackgroundBorderless" + android:clickable="true" + android:onClick="onBackgroundClick" + android:scaleType="centerCrop" + app:layout_constraintBottom_toTopOf="@+id/lightMaterialSwitch" + app:layout_constraintStart_toStartOf="parent" + android:src="@drawable/background1" /> + + <ImageView + android:id="@+id/background2" + android:layout_width="64dp" + android:layout_height="64dp" + android:layout_marginStart="8dp" + android:foreground="?android:attr/selectableItemBackgroundBorderless" + android:clickable="true" + android:onClick="onBackgroundClick" + android:scaleType="centerCrop" + app:layout_constraintBottom_toBottomOf="@+id/background1" + app:layout_constraintStart_toEndOf="@+id/background1" + android:src="@drawable/background2" /> + + <ImageView + android:id="@+id/background3" + android:layout_width="64dp" + android:layout_height="64dp" + android:layout_marginStart="8dp" + android:scaleType="centerCrop" + android:foreground="?android:attr/selectableItemBackgroundBorderless" + android:clickable="true" + android:onClick="onBackgroundClick" + app:layout_constraintBottom_toBottomOf="@+id/background1" + app:layout_constraintStart_toEndOf="@+id/background2" + android:src="@drawable/background3" /> + + <Switch + android:id="@+id/lightMaterialSwitch" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginStart="24dp" + android:layout_marginBottom="8dp" + android:text="Light Material" + app:layout_constraintBottom_toTopOf="@+id/zoomTitle" + app:layout_constraintStart_toStartOf="parent" /> + + <TextView + android:id="@+id/blurRadiusValue" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="TextView" + android:layout_marginLeft="8dp" + app:layout_constraintBottom_toBottomOf="@+id/blurRadiusTitle" + app:layout_constraintStart_toEndOf="@+id/blurRadiusTitle" /> + + <TextView + android:id="@+id/zoomValue" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="TextView" + android:layout_marginLeft="8dp" + app:layout_constraintBottom_toBottomOf="@+id/zoomTitle" + app:layout_constraintStart_toEndOf="@+id/zoomTitle" /> + + <TextView + android:id="@+id/materialOpacityValue" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="TextView" + android:layout_marginLeft="8dp" + app:layout_constraintBottom_toBottomOf="@+id/materialOpacityTitle" + app:layout_constraintStart_toEndOf="@+id/materialOpacityTitle" /> + + <TextView + android:id="@+id/noiseOpacityValue" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="TextView" + android:layout_marginLeft="8dp" + app:layout_constraintBottom_toBottomOf="@+id/noiseOpacityTitle" + app:layout_constraintStart_toEndOf="@+id/noiseOpacityTitle" /> + + + <TextView + android:id="@+id/scrimOpacityValue" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="TextView" + android:layout_marginLeft="8dp" + app:layout_constraintBottom_toBottomOf="@+id/scrimOpacityTitle" + app:layout_constraintStart_toEndOf="@+id/scrimOpacityTitle" /> + + </androidx.constraintlayout.widget.ConstraintLayout> + + +</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file diff --git a/tests/SilkFX/src/com/android/test/silkfx/Main.kt b/tests/SilkFX/src/com/android/test/silkfx/Main.kt index 76e62a6c8cff..9ed8d2f5edf7 100644 --- a/tests/SilkFX/src/com/android/test/silkfx/Main.kt +++ b/tests/SilkFX/src/com/android/test/silkfx/Main.kt @@ -29,6 +29,7 @@ import com.android.test.silkfx.app.CommonDemoActivity import com.android.test.silkfx.app.EXTRA_LAYOUT import com.android.test.silkfx.app.EXTRA_TITLE import com.android.test.silkfx.hdr.GlowActivity +import com.android.test.silkfx.materials.GlassActivity import kotlin.reflect.KClass class Demo(val name: String, val makeIntent: (Context) -> Intent) { @@ -48,6 +49,9 @@ private val AllDemos = listOf( DemoGroup("HDR", listOf( Demo("Glow", GlowActivity::class), Demo("Blingy Notifications", R.layout.bling_notifications) + )), + DemoGroup("Materials", listOf( + Demo("Glass", GlassActivity::class) )) ) diff --git a/tests/SilkFX/src/com/android/test/silkfx/materials/GlassActivity.kt b/tests/SilkFX/src/com/android/test/silkfx/materials/GlassActivity.kt new file mode 100644 index 000000000000..72b342c54d19 --- /dev/null +++ b/tests/SilkFX/src/com/android/test/silkfx/materials/GlassActivity.kt @@ -0,0 +1,134 @@ +/* + * Copyright (C) 2020 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.test.silkfx.materials + +import android.app.Activity +import android.graphics.Bitmap +import android.graphics.BitmapFactory +import android.graphics.Color +import android.os.Bundle +import android.util.TypedValue +import android.view.View +import android.widget.ImageView +import android.widget.SeekBar +import android.widget.Switch +import android.widget.TextView +import com.android.test.silkfx.R + +class GlassActivity : Activity(), SeekBar.OnSeekBarChangeListener { + + lateinit var backgroundButton1: ImageView + lateinit var backgroundButton2: ImageView + lateinit var backgroundButton3: ImageView + lateinit var backgroundView: ImageView + lateinit var materialView: GlassView + lateinit var lightMaterialSwitch: Switch + lateinit var noiseOpacitySeekBar: SeekBar + lateinit var materialOpacitySeekBar: SeekBar + lateinit var scrimOpacitySeekBar: SeekBar + lateinit var zoomSeekBar: SeekBar + lateinit var blurRadiusSeekBar: SeekBar + lateinit var noiseOpacityValue: TextView + lateinit var materialOpacityValue: TextView + lateinit var scrimOpacityValue: TextView + lateinit var blurRadiusValue: TextView + lateinit var zoomValue: TextView + + lateinit var background: Bitmap + + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_glass) + backgroundButton1 = requireViewById(R.id.background1) + backgroundButton2 = requireViewById(R.id.background2) + backgroundButton3 = requireViewById(R.id.background3) + backgroundView = requireViewById(R.id.background) + lightMaterialSwitch = requireViewById(R.id.lightMaterialSwitch) + materialView = requireViewById(R.id.materialView) + materialOpacitySeekBar = requireViewById(R.id.materialOpacity) + blurRadiusSeekBar = requireViewById(R.id.blurRadius) + zoomSeekBar = requireViewById(R.id.zoom) + noiseOpacitySeekBar = requireViewById(R.id.noiseOpacity) + scrimOpacitySeekBar = requireViewById(R.id.scrimOpacity) + noiseOpacityValue = requireViewById(R.id.noiseOpacityValue) + materialOpacityValue = requireViewById(R.id.materialOpacityValue) + scrimOpacityValue = requireViewById(R.id.scrimOpacityValue) + blurRadiusValue = requireViewById(R.id.blurRadiusValue) + zoomValue = requireViewById(R.id.zoomValue) + + background = BitmapFactory.decodeResource(resources, R.drawable.background1) + backgroundView.setImageBitmap(background) + materialView.backgroundBitmap = background + + blurRadiusSeekBar.setOnSeekBarChangeListener(this) + materialOpacitySeekBar.setOnSeekBarChangeListener(this) + noiseOpacitySeekBar.setOnSeekBarChangeListener(this) + scrimOpacitySeekBar.setOnSeekBarChangeListener(this) + + arrayOf(blurRadiusSeekBar, materialOpacitySeekBar, noiseOpacitySeekBar, + scrimOpacitySeekBar, zoomSeekBar).forEach { + it.setOnSeekBarChangeListener(this) + onProgressChanged(it, it.progress, fromUser = false) + } + + lightMaterialSwitch.setOnCheckedChangeListener { _, isChecked -> + materialView.color = if (isChecked) Color.WHITE else Color.BLACK + } + } + + override fun onProgressChanged(seekBar: SeekBar?, progress: Int, fromUser: Boolean) { + when (seekBar) { + blurRadiusSeekBar -> { + materialView.blurRadius = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, + progress.toFloat(), resources.displayMetrics) + blurRadiusValue.text = progress.toString() + } + materialOpacitySeekBar -> { + materialView.materialOpacity = progress / seekBar.max.toFloat() + materialOpacityValue.text = progress.toString() + } + noiseOpacitySeekBar -> { + materialView.noiseOpacity = progress / seekBar.max.toFloat() + noiseOpacityValue.text = progress.toString() + } + scrimOpacitySeekBar -> { + materialView.scrimOpacity = progress / seekBar.max.toFloat() + scrimOpacityValue.text = progress.toString() + } + zoomSeekBar -> { + materialView.zoom = progress / seekBar.max.toFloat() + zoomValue.text = progress.toString() + } + else -> throw IllegalArgumentException("Unknown seek bar") + } + } + + override fun onStartTrackingTouch(seekBar: SeekBar?) {} + override fun onStopTrackingTouch(seekBar: SeekBar?) {} + + fun onBackgroundClick(view: View) { + val resource = when (view) { + backgroundButton1 -> R.drawable.background1 + backgroundButton2 -> R.drawable.background2 + backgroundButton3 -> R.drawable.background3 + else -> throw IllegalArgumentException("Invalid button") + } + + background = BitmapFactory.decodeResource(resources, resource) + backgroundView.setImageBitmap(background) + materialView.backgroundBitmap = background + } +}
\ No newline at end of file diff --git a/tests/SilkFX/src/com/android/test/silkfx/materials/GlassView.kt b/tests/SilkFX/src/com/android/test/silkfx/materials/GlassView.kt new file mode 100644 index 000000000000..60797680b79e --- /dev/null +++ b/tests/SilkFX/src/com/android/test/silkfx/materials/GlassView.kt @@ -0,0 +1,128 @@ +/* + * Copyright (C) 2020 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.test.silkfx.materials + +import android.content.Context +import android.graphics.Bitmap +import android.graphics.BitmapFactory +import android.graphics.BitmapShader +import android.graphics.BlendMode +import android.graphics.BlurShader +import android.graphics.Canvas +import android.graphics.Color +import android.graphics.Outline +import android.graphics.Paint +import android.graphics.Rect +import android.graphics.Shader +import android.util.AttributeSet +import android.view.View +import android.view.ViewOutlineProvider +import com.android.test.silkfx.R + +class GlassView(context: Context, attributeSet: AttributeSet) : View(context, attributeSet) { + + var noise = BitmapFactory.decodeResource(resources, R.drawable.noise) + var materialPaint = Paint() + var scrimPaint = Paint() + var noisePaint = Paint() + var blurPaint = Paint() + + val src = Rect() + val dst = Rect() + + var backgroundBitmap: Bitmap = Bitmap.createBitmap(1, 1, Bitmap.Config.ARGB_8888) + set(value) { + field = value + invalidate() + } + + var noiseOpacity = 0.0f + set(value) { + field = value + noisePaint.alpha = (value * 255).toInt() + invalidate() + } + + var materialOpacity = 0.0f + set(value) { + field = value + materialPaint.alpha = (value * 255).toInt() + invalidate() + } + + var scrimOpacity = 0.5f + set(value) { + field = value + scrimPaint.alpha = (value * 255).toInt() + invalidate() + } + + var zoom = 0.0f + set(value) { + field = value + invalidate() + } + + var color = Color.BLACK + set(value) { + field = value + var alpha = materialPaint.alpha + materialPaint.color = color + materialPaint.alpha = alpha + + alpha = scrimPaint.alpha + scrimPaint.color = color + scrimPaint.alpha = alpha + invalidate() + } + + var blurRadius = 150f + set(value) { + field = value + blurPaint.shader = BlurShader(value, value, null) + invalidate() + } + + init { + materialPaint.blendMode = BlendMode.SOFT_LIGHT + noisePaint.blendMode = BlendMode.SOFT_LIGHT + noisePaint.shader = BitmapShader(noise, Shader.TileMode.REPEAT, Shader.TileMode.REPEAT) + scrimPaint.alpha = (scrimOpacity * 255).toInt() + noisePaint.alpha = (noiseOpacity * 255).toInt() + materialPaint.alpha = (materialOpacity * 255).toInt() + blurPaint.shader = BlurShader(blurRadius, blurRadius, null) + outlineProvider = object : ViewOutlineProvider() { + override fun getOutline(view: View?, outline: Outline?) { + outline?.setRoundRect(Rect(0, 0, width, height), 100f) + } + } + clipToOutline = true + } + + override fun onDraw(canvas: Canvas?) { + src.set(-width/2, -height/2, width/2, height/2) + src.scale(1.0f + zoom) + val centerX = left + width / 2 + val centerY = top + height / 2 + src.set(src.left + centerX, src.top + centerY, src.right + centerX, src.bottom + centerY) + + dst.set(0, 0, width, height) + canvas?.drawBitmap(backgroundBitmap, src, dst, blurPaint) + canvas?.drawRect(dst, materialPaint) + canvas?.drawRect(dst, noisePaint) + canvas?.drawRect(dst, scrimPaint) + } +}
\ No newline at end of file diff --git a/wifi/Android.bp b/wifi/Android.bp index 941ff61b3ba5..3040041038cb 100644 --- a/wifi/Android.bp +++ b/wifi/Android.bp @@ -129,12 +129,8 @@ java_sdk_library { }, hostdex: true, // for hiddenapi check - // Allow access to the stubs from anywhere. - visibility: ["//visibility:public"], - // Restrict access to implementation library. impl_library_visibility: [ - "//visibility:override", // Ignore the visibility property. "//frameworks/opt/net/wifi/service:__subpackages__", ] + test_access_hidden_api_whitelist, diff --git a/wifi/api/current.txt b/wifi/api/current.txt index b104decab73c..ae9b5ab07851 100644 --- a/wifi/api/current.txt +++ b/wifi/api/current.txt @@ -579,6 +579,7 @@ package android.net.wifi.aware { method public void onPublishStarted(@NonNull android.net.wifi.aware.PublishDiscoverySession); method public void onServiceDiscovered(android.net.wifi.aware.PeerHandle, byte[], java.util.List<byte[]>); method public void onServiceDiscoveredWithinRange(android.net.wifi.aware.PeerHandle, byte[], java.util.List<byte[]>, int); + method public void onServiceLost(@NonNull android.net.wifi.aware.PeerHandle); method public void onSessionConfigFailed(); method public void onSessionConfigUpdated(); method public void onSessionTerminated(); diff --git a/wifi/java/android/net/wifi/ScanResult.java b/wifi/java/android/net/wifi/ScanResult.java index 9302f78b7fca..54ec1e1c7c0b 100644 --- a/wifi/java/android/net/wifi/ScanResult.java +++ b/wifi/java/android/net/wifi/ScanResult.java @@ -595,6 +595,27 @@ public final class ScanResult implements Parcelable { public static final int BAND_6_GHZ_END_FREQ_MHZ = 7105; /** + * 60 GHz band first channel number + * @hide + */ + public static final int BAND_60_GHZ_FIRST_CH_NUM = 1; + /** + * 60 GHz band last channel number + * @hide + */ + public static final int BAND_60_GHZ_LAST_CH_NUM = 6; + /** + * 60 GHz band frequency of first channel in MHz + * @hide + */ + public static final int BAND_60_GHZ_START_FREQ_MHZ = 58320; + /** + * 60 GHz band frequency of last channel in MHz + * @hide + */ + public static final int BAND_60_GHZ_END_FREQ_MHZ = 70200; + + /** * Utility function to check if a frequency within 2.4 GHz band * @param freqMhz frequency in MHz * @return true if within 2.4GHz, false otherwise @@ -628,6 +649,17 @@ public final class ScanResult implements Parcelable { } /** + * Utility function to check if a frequency within 60 GHz band + * @param freqMhz + * @return true if within 60GHz, false otherwise + * + * @hide + */ + public static boolean is60GHz(int freqMhz) { + return freqMhz >= BAND_60_GHZ_START_FREQ_MHZ && freqMhz <= BAND_60_GHZ_END_FREQ_MHZ; + } + + /** * Utility function to convert channel number/band to frequency in MHz * @param channel number to convert * @param band of channel to convert @@ -707,6 +739,13 @@ public final class ScanResult implements Parcelable { } /** + * @hide + */ + public boolean is60GHz() { + return ScanResult.is60GHz(frequency); + } + + /** * @hide * anqp lines from supplicant BSS response */ diff --git a/wifi/java/android/net/wifi/WifiConfiguration.java b/wifi/java/android/net/wifi/WifiConfiguration.java index 1588bf72c969..656444ea98db 100644 --- a/wifi/java/android/net/wifi/WifiConfiguration.java +++ b/wifi/java/android/net/wifi/WifiConfiguration.java @@ -596,6 +596,12 @@ public class WifiConfiguration implements Parcelable { public static final int AP_BAND_5GHZ = 1; /** + * 60GHz band + * @hide + */ + public static final int AP_BAND_60GHZ = 2; + + /** * Device is allowed to choose the optimal band (2Ghz or 5Ghz) based on device capability, * operating country code and current radio conditions. * @hide @@ -2509,7 +2515,18 @@ public class WifiConfiguration implements Parcelable { @KeyMgmt.KeyMgmtScheme public int getAuthType() { if (allowedKeyManagement.cardinality() > 1) { - throw new IllegalStateException("More than one auth type set"); + if (allowedKeyManagement.get(KeyMgmt.WPA_EAP)) { + if (allowedKeyManagement.cardinality() == 2 + && allowedKeyManagement.get(KeyMgmt.IEEE8021X)) { + return KeyMgmt.WPA_EAP; + } + if (allowedKeyManagement.cardinality() == 3 + && allowedKeyManagement.get(KeyMgmt.IEEE8021X) + && allowedKeyManagement.get(KeyMgmt.SUITE_B_192)) { + return KeyMgmt.SUITE_B_192; + } + } + throw new IllegalStateException("Invalid auth type set: " + allowedKeyManagement); } if (allowedKeyManagement.get(KeyMgmt.WPA_PSK)) { return KeyMgmt.WPA_PSK; diff --git a/wifi/java/android/net/wifi/WifiEnterpriseConfig.java b/wifi/java/android/net/wifi/WifiEnterpriseConfig.java index 77fa673f1960..90edc4523b7b 100644 --- a/wifi/java/android/net/wifi/WifiEnterpriseConfig.java +++ b/wifi/java/android/net/wifi/WifiEnterpriseConfig.java @@ -30,6 +30,9 @@ import java.lang.annotation.RetentionPolicy; import java.nio.charset.StandardCharsets; import java.security.PrivateKey; import java.security.cert.X509Certificate; +import java.security.interfaces.ECPublicKey; +import java.security.interfaces.RSAPublicKey; +import java.security.spec.ECParameterSpec; import java.util.Arrays; import java.util.HashMap; import java.util.List; @@ -1442,4 +1445,50 @@ public class WifiEnterpriseConfig implements Parcelable { } return TextUtils.isEmpty(getCaPath()); } + + /** + * Check if a given certificate Get the Suite-B cipher from the certificate + * + * @param x509Certificate Certificate to process + * @return true if the certificate OID matches the Suite-B requirements for RSA or ECDSA + * certificates, or false otherwise. + * @hide + */ + public static boolean isSuiteBCipherCert(@Nullable X509Certificate x509Certificate) { + if (x509Certificate == null) { + return false; + } + final String sigAlgOid = x509Certificate.getSigAlgOID(); + + // Wi-Fi alliance requires the use of both ECDSA secp384r1 and RSA 3072 certificates + // in WPA3-Enterprise 192-bit security networks, which are also known as Suite-B-192 + // networks, even though NSA Suite-B-192 mandates ECDSA only. The use of the term + // Suite-B was already coined in the IEEE 802.11-2016 specification for + // AKM 00-0F-AC but the test plan for WPA3-Enterprise 192-bit for APs mandates + // support for both RSA and ECDSA, and for STAs it mandates ECDSA and optionally + // RSA. In order to be compatible with all WPA3-Enterprise 192-bit deployments, + // we are supporting both types here. + if (sigAlgOid.equals("1.2.840.113549.1.1.12")) { + // sha384WithRSAEncryption + if (x509Certificate.getPublicKey() instanceof RSAPublicKey) { + final RSAPublicKey rsaPublicKey = (RSAPublicKey) x509Certificate.getPublicKey(); + if (rsaPublicKey.getModulus() != null + && rsaPublicKey.getModulus().bitLength() >= 3072) { + return true; + } + } + } else if (sigAlgOid.equals("1.2.840.10045.4.3.3")) { + // ecdsa-with-SHA384 + if (x509Certificate.getPublicKey() instanceof ECPublicKey) { + final ECPublicKey ecPublicKey = (ECPublicKey) x509Certificate.getPublicKey(); + final ECParameterSpec ecParameterSpec = ecPublicKey.getParams(); + + if (ecParameterSpec != null && ecParameterSpec.getOrder() != null + && ecParameterSpec.getOrder().bitLength() >= 384) { + return true; + } + } + } + return false; + } } diff --git a/wifi/java/android/net/wifi/WifiNetworkSpecifier.java b/wifi/java/android/net/wifi/WifiNetworkSpecifier.java index b0213b0ef502..e12bb9178235 100644 --- a/wifi/java/android/net/wifi/WifiNetworkSpecifier.java +++ b/wifi/java/android/net/wifi/WifiNetworkSpecifier.java @@ -78,12 +78,12 @@ public final class WifiNetworkSpecifier extends NetworkSpecifier implements Parc private @Nullable String mWpa3SaePassphrase; /** * The enterprise configuration details specifying the EAP method, - * certificates and other settings associated with the WPA-EAP networks. + * certificates and other settings associated with the WPA/WPA2-Enterprise networks. */ private @Nullable WifiEnterpriseConfig mWpa2EnterpriseConfig; /** * The enterprise configuration details specifying the EAP method, - * certificates and other settings associated with the SuiteB networks. + * certificates and other settings associated with the WPA3-Enterprise networks. */ private @Nullable WifiEnterpriseConfig mWpa3EnterpriseConfig; /** @@ -243,7 +243,11 @@ public final class WifiNetworkSpecifier extends NetworkSpecifier implements Parc /** * Set the associated enterprise configuration for this network. Needed for authenticating - * to WPA3-SuiteB networks. See {@link WifiEnterpriseConfig} for description. + * to WPA3-Enterprise networks (standard and 192-bit security). See + * {@link WifiEnterpriseConfig} for description. For 192-bit security networks, both the + * client and CA certificates must be provided, and must be of type of either + * sha384WithRSAEncryption (OID 1.2.840.113549.1.1.12) or ecdsa-with-SHA384 + * (OID 1.2.840.10045.4.3.3). * * @param enterpriseConfig Instance of {@link WifiEnterpriseConfig}. * @return Instance of {@link Builder} to enable chaining of the builder method. @@ -284,8 +288,25 @@ public final class WifiNetworkSpecifier extends NetworkSpecifier implements Parc } else if (mWpa2EnterpriseConfig != null) { // WPA-EAP network configuration.setSecurityParams(WifiConfiguration.SECURITY_TYPE_EAP); configuration.enterpriseConfig = mWpa2EnterpriseConfig; - } else if (mWpa3EnterpriseConfig != null) { // WPA3-SuiteB network - configuration.setSecurityParams(WifiConfiguration.SECURITY_TYPE_EAP_SUITE_B); + } else if (mWpa3EnterpriseConfig != null) { // WPA3-Enterprise + if (mWpa3EnterpriseConfig.getEapMethod() == WifiEnterpriseConfig.Eap.TLS + && WifiEnterpriseConfig.isSuiteBCipherCert( + mWpa3EnterpriseConfig.getClientCertificate()) + && WifiEnterpriseConfig.isSuiteBCipherCert( + mWpa3EnterpriseConfig.getCaCertificate())) { + // WPA3-Enterprise in 192-bit security mode (Suite-B) + configuration.setSecurityParams(WifiConfiguration.SECURITY_TYPE_EAP_SUITE_B); + } else { + // WPA3-Enterprise + configuration.setSecurityParams(WifiConfiguration.SECURITY_TYPE_EAP); + configuration.allowedProtocols.set(WifiConfiguration.Protocol.RSN); + configuration.allowedPairwiseCiphers.set(WifiConfiguration.PairwiseCipher.CCMP); + configuration.allowedPairwiseCiphers.set( + WifiConfiguration.PairwiseCipher.GCMP_256); + configuration.allowedGroupCiphers.set(WifiConfiguration.GroupCipher.CCMP); + configuration.allowedGroupCiphers.set(WifiConfiguration.GroupCipher.GCMP_256); + configuration.requirePmf = true; + } configuration.enterpriseConfig = mWpa3EnterpriseConfig; } else if (mIsEnhancedOpen) { // OWE network configuration.setSecurityParams(WifiConfiguration.SECURITY_TYPE_OWE); diff --git a/wifi/java/android/net/wifi/WifiNetworkSuggestion.java b/wifi/java/android/net/wifi/WifiNetworkSuggestion.java index e4e900ffe12a..aa699634dac4 100644 --- a/wifi/java/android/net/wifi/WifiNetworkSuggestion.java +++ b/wifi/java/android/net/wifi/WifiNetworkSuggestion.java @@ -72,12 +72,12 @@ public final class WifiNetworkSuggestion implements Parcelable { private @Nullable String mWpa3SaePassphrase; /** * The enterprise configuration details specifying the EAP method, - * certificates and other settings associated with the WPA-EAP networks. + * certificates and other settings associated with the WPA/WPA2-Enterprise networks. */ private @Nullable WifiEnterpriseConfig mWpa2EnterpriseConfig; /** * The enterprise configuration details specifying the EAP method, - * certificates and other settings associated with the SuiteB networks. + * certificates and other settings associated with the WPA3-Enterprise networks. */ private @Nullable WifiEnterpriseConfig mWpa3EnterpriseConfig; /** @@ -288,7 +288,11 @@ public final class WifiNetworkSuggestion implements Parcelable { /** * Set the associated enterprise configuration for this network. Needed for authenticating - * to WPA3 enterprise networks. See {@link WifiEnterpriseConfig} for description. + * to WPA3-Enterprise networks (standard and 192-bit security). See + * {@link WifiEnterpriseConfig} for description. For 192-bit security networks, both the + * client and CA certificates must be provided, and must be of type of either + * sha384WithRSAEncryption (OID 1.2.840.113549.1.1.12) or ecdsa-with-SHA384 + * (OID 1.2.840.10045.4.3.3). * * @param enterpriseConfig Instance of {@link WifiEnterpriseConfig}. * @return Instance of {@link Builder} to enable chaining of the builder method. @@ -570,8 +574,25 @@ public final class WifiNetworkSuggestion implements Parcelable { } else if (mWpa2EnterpriseConfig != null) { // WPA-EAP network configuration.setSecurityParams(WifiConfiguration.SECURITY_TYPE_EAP); configuration.enterpriseConfig = mWpa2EnterpriseConfig; - } else if (mWpa3EnterpriseConfig != null) { // WPA3-SuiteB network - configuration.setSecurityParams(WifiConfiguration.SECURITY_TYPE_EAP_SUITE_B); + } else if (mWpa3EnterpriseConfig != null) { // WPA3-Enterprise + if (mWpa3EnterpriseConfig.getEapMethod() == WifiEnterpriseConfig.Eap.TLS + && WifiEnterpriseConfig.isSuiteBCipherCert( + mWpa3EnterpriseConfig.getClientCertificate()) + && WifiEnterpriseConfig.isSuiteBCipherCert( + mWpa3EnterpriseConfig.getCaCertificate())) { + // WPA3-Enterprise in 192-bit security mode (Suite-B) + configuration.setSecurityParams(WifiConfiguration.SECURITY_TYPE_EAP_SUITE_B); + } else { + // WPA3-Enterprise + configuration.setSecurityParams(WifiConfiguration.SECURITY_TYPE_EAP); + configuration.allowedProtocols.set(WifiConfiguration.Protocol.RSN); + configuration.allowedPairwiseCiphers.set(WifiConfiguration.PairwiseCipher.CCMP); + configuration.allowedPairwiseCiphers.set( + WifiConfiguration.PairwiseCipher.GCMP_256); + configuration.allowedGroupCiphers.set(WifiConfiguration.GroupCipher.CCMP); + configuration.allowedGroupCiphers.set(WifiConfiguration.GroupCipher.GCMP_256); + configuration.requirePmf = true; + } configuration.enterpriseConfig = mWpa3EnterpriseConfig; } else if (mIsEnhancedOpen) { // OWE network configuration.setSecurityParams(WifiConfiguration.SECURITY_TYPE_OWE); diff --git a/wifi/java/android/net/wifi/aware/DiscoverySessionCallback.java b/wifi/java/android/net/wifi/aware/DiscoverySessionCallback.java index bfb0462952b1..e3800ad6ef36 100644 --- a/wifi/java/android/net/wifi/aware/DiscoverySessionCallback.java +++ b/wifi/java/android/net/wifi/aware/DiscoverySessionCallback.java @@ -189,4 +189,16 @@ public class DiscoverySessionCallback { public void onMessageReceived(PeerHandle peerHandle, byte[] message) { /* empty */ } + + /** + * Called when the discovered peer is no longer visible. All further operations on this + * discovery session will fail. If the peer is visible again, + * {@link #onServiceDiscovered(PeerHandle, byte[], List)} or + * {@link #onServiceDiscoveredWithinRange(PeerHandle, byte[], List, int)} will be called. + * + * @param peerHandle An opaque handle to the peer matching our discovery operation. + */ + public void onServiceLost(@NonNull PeerHandle peerHandle) { + /* empty */ + } } diff --git a/wifi/java/android/net/wifi/aware/IWifiAwareDiscoverySessionCallback.aidl b/wifi/java/android/net/wifi/aware/IWifiAwareDiscoverySessionCallback.aidl index 421a8af2073e..e3e7c8e6c747 100644 --- a/wifi/java/android/net/wifi/aware/IWifiAwareDiscoverySessionCallback.aidl +++ b/wifi/java/android/net/wifi/aware/IWifiAwareDiscoverySessionCallback.aidl @@ -35,4 +35,5 @@ oneway interface IWifiAwareDiscoverySessionCallback void onMessageSendSuccess(int messageId); void onMessageSendFail(int messageId, int reason); void onMessageReceived(int peerId, in byte[] message); + void onMatchExpired(int peerId); } diff --git a/wifi/java/android/net/wifi/aware/WifiAwareManager.java b/wifi/java/android/net/wifi/aware/WifiAwareManager.java index c2ae17c4bdeb..6352a2f4305c 100644 --- a/wifi/java/android/net/wifi/aware/WifiAwareManager.java +++ b/wifi/java/android/net/wifi/aware/WifiAwareManager.java @@ -587,6 +587,7 @@ public class WifiAwareManager { private static final int CALLBACK_MESSAGE_SEND_FAIL = 6; private static final int CALLBACK_MESSAGE_RECEIVED = 7; private static final int CALLBACK_MATCH_WITH_DISTANCE = 8; + private static final int CALLBACK_MATCH_EXPIRED = 9; private static final String MESSAGE_BUNDLE_KEY_MESSAGE = "message"; private static final String MESSAGE_BUNDLE_KEY_MESSAGE2 = "message2"; @@ -676,6 +677,9 @@ public class WifiAwareManager { mOriginalCallback.onMessageReceived(new PeerHandle(msg.arg1), (byte[]) msg.obj); break; + case CALLBACK_MATCH_EXPIRED: + mOriginalCallback + .onServiceLost(new PeerHandle(msg.arg1)); } } }; @@ -746,6 +750,15 @@ public class WifiAwareManager { onMatchCommon(CALLBACK_MATCH_WITH_DISTANCE, peerId, serviceSpecificInfo, matchFilter, distanceMm); } + @Override + public void onMatchExpired(int peerId) { + if (VDBG) { + Log.v(TAG, "onMatchExpired: peerId=" + peerId); + } + Message msg = mHandler.obtainMessage(CALLBACK_MATCH_EXPIRED); + msg.arg1 = peerId; + mHandler.sendMessage(msg); + } @Override public void onMessageSendSuccess(int messageId) { diff --git a/wifi/java/android/net/wifi/util/SdkLevelUtil.java b/wifi/java/android/net/wifi/util/SdkLevelUtil.java new file mode 100644 index 000000000000..f29b0a6f3611 --- /dev/null +++ b/wifi/java/android/net/wifi/util/SdkLevelUtil.java @@ -0,0 +1,63 @@ +/* + * Copyright (C) 2020 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.net.wifi.util; + +import android.os.Build; + +/** + * Utility to check the SDK version of the device that the code is running on. + * + * This can be used to disable new Wifi APIs added in Mainline updates on older SDK versions. + * + * @hide + */ +public class SdkLevelUtil { + + /** This class is instantiable to allow easy mocking. */ + public SdkLevelUtil() { } + + /** Returns true if the Android platform SDK is at least "S", false otherwise. */ + public boolean isAtLeastS() { + // TODO(b/167575586): after S SDK finalization, this method should just be + // `return Build.VERSION.SDK_INT >= Build.VERSION_CODES.S;` + + // at least S: return true + // this condition only evaluates to true after S SDK finalization when VERSION_CODES.S + // is set to something like "31", before SDK finalization the value is "10000" + // Note that Build.VERSION_CODES.S is inlined at compile time. If it's inlined to 10000, + // this condition never evaluates to true. + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) { + return true; + } + + // Assume for now that S = R + 1 + if (Build.VERSION.SDK_INT > Build.VERSION_CODES.R) { + return true; + } + + // R: check CODENAME + // Before S SDK finalization, SDK_INT = R = 30 i.e. remains on the previous version + if (Build.VERSION.SDK_INT == Build.VERSION_CODES.R) { + // CODENAME = "REL" on R release builds + // CODENAME = "S" on S development builds + return "S".equals(Build.VERSION.CODENAME); + } + + // older than R: return false + return false; + } +} diff --git a/wifi/tests/src/android/net/wifi/FakeKeys.java b/wifi/tests/src/android/net/wifi/FakeKeys.java index 641b891a1f4d..8aa6add4a4e4 100644 --- a/wifi/tests/src/android/net/wifi/FakeKeys.java +++ b/wifi/tests/src/android/net/wifi/FakeKeys.java @@ -212,7 +212,57 @@ public class FakeKeys { (byte) 0xbc, (byte) 0xa7, (byte) 0x92, (byte) 0x90, (byte) 0xdd, (byte) 0xa1, (byte) 0x9c, (byte) 0xce, (byte) 0xa1, (byte) 0x87, (byte) 0x11, (byte) 0x51 }; - public static final PrivateKey RSA_KEY1 = loadPrivateRSAKey(FAKE_RSA_KEY_1); + public static final PrivateKey RSA_KEY1 = loadPrivateKey("RSA", FAKE_RSA_KEY_1); + + private static final String CA_SUITE_B_RSA3072_CERT_STRING = + "-----BEGIN CERTIFICATE-----\n" + + "MIIEnTCCAwWgAwIBAgIUD87Y8fFLzLr1HQ/64aEnjNq2R/4wDQYJKoZIhvcNAQEM\n" + + "BQAwXjELMAkGA1UEBhMCVVMxCzAJBgNVBAgMAkNBMQwwCgYDVQQHDANNVFYxEDAO\n" + + "BgNVBAoMB0FuZHJvaWQxDjAMBgNVBAsMBVdpLUZpMRIwEAYDVQQDDAl1bml0ZXN0\n" + + "Q0EwHhcNMjAwNzIxMDIxNzU0WhcNMzAwNTMwMDIxNzU0WjBeMQswCQYDVQQGEwJV\n" + + "UzELMAkGA1UECAwCQ0ExDDAKBgNVBAcMA01UVjEQMA4GA1UECgwHQW5kcm9pZDEO\n" + + "MAwGA1UECwwFV2ktRmkxEjAQBgNVBAMMCXVuaXRlc3RDQTCCAaIwDQYJKoZIhvcN\n" + + "AQEBBQADggGPADCCAYoCggGBAMtrsT0otlxh0QS079KpRRbU1PQjCihSoltXnrxF\n" + + "sTWZs2weVEeYVyYU5LaauCDDgISCMtjtfbfylMBeYjpWB5hYzYQOiTzo0anWhMyb\n" + + "Ngb7gpMVZuIl6lwMYRyVRKwHWnTo2EUg1ZzW5rGe5fs/KHj6//hoNFm+3Oju0TQd\n" + + "nraQULpoERPF5B7p85Cssk8uNbviBfZXvtCuJ4N6w7PNceOY/9bbwc1mC+pPZmzV\n" + + "SOAg0vvbIQRzChm63C3jBC3xmxSOOZVrKN4zKDG2s8P0oCNGt0NlgRMrgbPRekzg\n" + + "4avkbA0vTuc2AyriTEYkdea/Mt4EpRg9XuOb43U/GJ/d/vQv2/9fsxhXmsZrn8kr\n" + + "Qo5MMHJFUd96GgHmvYSU3Mf/5r8gF626lvqHioGuTAuHUSnr02ri1WUxZ15LDRgY\n" + + "quMjDCFZfucjJPDAdtiHcFSej/4SLJlN39z8oKKNPn3aL9Gv49oAKs9S8tfDVzMk\n" + + "fDLROQFHFuW715GnnMgEAoOpRwIDAQABo1MwUTAdBgNVHQ4EFgQUeVuGmSVN4ARs\n" + + "mesUMWSJ2qWLbxUwHwYDVR0jBBgwFoAUeVuGmSVN4ARsmesUMWSJ2qWLbxUwDwYD\n" + + "VR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQwFAAOCAYEAit1Lo/hegZpPuT9dlWZJ\n" + + "bC8JvAf95O8lnn6LFb69pgYOHCLgCIlvYXu9rdBUJgZo+V1MzJJljiO6RxWRfKbQ\n" + + "8WBYkoqR1EqriR3Kn8q/SjIZCdFSaznTyU1wQMveBQ6RJWXSUhYVfE9RjyFTp7B4\n" + + "UyH2uCluR/0T06HQNGfH5XpIYQqCk1Zgng5lmEmheLDPoJpa92lKeQFJMC6eYz9g\n" + + "lF1GHxPxkPfbMJ6ZDp5X6Yopu6Q6uEXhVKM/iQVcgzRkx9rid+xTYl+nOKyK/XfC\n" + + "z8P0/TFIoPTW02DLge5wKagdoCpy1B7HdrAXyUjoH4B8MsUkq3kYPFSjPzScuTtV\n" + + "kUuDw5ipCNeXCRnhbYqRDk6PX5GUu2cmN9jtaH3tbgm3fKNOsd/BO1fLIl7qjXlR\n" + + "27HHbC0JXjNvlm2DLp23v4NTxS7WZGYsxyUj5DZrxBxqCsTXu/01w1BrQKWKh9FM\n" + + "aVrlA8omfVODK2CSuw+KhEMHepRv/AUgsLl4L4+RMoa+\n" + + "-----END CERTIFICATE-----\n"; + public static final X509Certificate CA_SUITE_B_RSA3072_CERT = + loadCertificate(CA_SUITE_B_RSA3072_CERT_STRING); + + private static final String CA_SUITE_B_ECDSA_CERT_STRING = + "-----BEGIN CERTIFICATE-----\n" + + "MIICTzCCAdSgAwIBAgIUdnLttwNPnQzFufplGOr9bTrGCqMwCgYIKoZIzj0EAwMw\n" + + "XjELMAkGA1UEBhMCVVMxCzAJBgNVBAgMAkNBMQwwCgYDVQQHDANNVFYxEDAOBgNV\n" + + "BAoMB0FuZHJvaWQxDjAMBgNVBAsMBVdpLUZpMRIwEAYDVQQDDAl1bml0ZXN0Q0Ew\n" + + "HhcNMjAwNzIxMDIyNDA1WhcNMzAwNTMwMDIyNDA1WjBeMQswCQYDVQQGEwJVUzEL\n" + + "MAkGA1UECAwCQ0ExDDAKBgNVBAcMA01UVjEQMA4GA1UECgwHQW5kcm9pZDEOMAwG\n" + + "A1UECwwFV2ktRmkxEjAQBgNVBAMMCXVuaXRlc3RDQTB2MBAGByqGSM49AgEGBSuB\n" + + "BAAiA2IABFmntXwk9icqhDQFUP1xy04WyEpaGW4q6Q+8pujlSl/X3iotPZ++GZfp\n" + + "Mfv3YDHDBl6sELPQ2BEjyPXmpsKjOUdiUe69e88oGEdeqT2xXiQ6uzpTfJD4170i\n" + + "O/TwLrQGKKNTMFEwHQYDVR0OBBYEFCjptsX3g4g5W0L4oEP6N3gfyiZXMB8GA1Ud\n" + + "IwQYMBaAFCjptsX3g4g5W0L4oEP6N3gfyiZXMA8GA1UdEwEB/wQFMAMBAf8wCgYI\n" + + "KoZIzj0EAwMDaQAwZgIxAK61brUYRbLmQKiaEboZgrHtnPAcGo7Yzx3MwHecx3Dm\n" + + "5soIeLVYc8bPYN1pbhXW1gIxALdEe2sh03nBHyQH4adYoZungoCwt8mp/7sJFxou\n" + + "9UnRegyBgGzf74ROWdpZHzh+Pg==\n" + + "-----END CERTIFICATE-----\n"; + public static final X509Certificate CA_SUITE_B_ECDSA_CERT = + loadCertificate(CA_SUITE_B_ECDSA_CERT_STRING); private static final String CLIENT_SUITE_B_RSA3072_CERT_STRING = "-----BEGIN CERTIFICATE-----\n" @@ -243,6 +293,363 @@ public class FakeKeys { public static final X509Certificate CLIENT_SUITE_B_RSA3072_CERT = loadCertificate(CLIENT_SUITE_B_RSA3072_CERT_STRING); + private static final byte[] CLIENT_SUITE_B_RSA3072_KEY_DATA = new byte[]{ + (byte) 0x30, (byte) 0x82, (byte) 0x06, (byte) 0xfe, (byte) 0x02, (byte) 0x01, + (byte) 0x00, (byte) 0x30, (byte) 0x0d, (byte) 0x06, (byte) 0x09, (byte) 0x2a, + (byte) 0x86, (byte) 0x48, (byte) 0x86, (byte) 0xf7, (byte) 0x0d, (byte) 0x01, + (byte) 0x01, (byte) 0x01, (byte) 0x05, (byte) 0x00, (byte) 0x04, (byte) 0x82, + (byte) 0x06, (byte) 0xe8, (byte) 0x30, (byte) 0x82, (byte) 0x06, (byte) 0xe4, + (byte) 0x02, (byte) 0x01, (byte) 0x00, (byte) 0x02, (byte) 0x82, (byte) 0x01, + (byte) 0x81, (byte) 0x00, (byte) 0xc1, (byte) 0x22, (byte) 0xb7, (byte) 0x0b, + (byte) 0x92, (byte) 0xb9, (byte) 0xb9, (byte) 0xdb, (byte) 0x42, (byte) 0x29, + (byte) 0x39, (byte) 0xc4, (byte) 0xd7, (byte) 0x87, (byte) 0xbc, (byte) 0xcf, + (byte) 0x67, (byte) 0x19, (byte) 0xbf, (byte) 0x09, (byte) 0x81, (byte) 0xe1, + (byte) 0x77, (byte) 0xbe, (byte) 0x6b, (byte) 0xcf, (byte) 0xbb, (byte) 0x40, + (byte) 0xbb, (byte) 0x9d, (byte) 0x1e, (byte) 0x8a, (byte) 0x1c, (byte) 0xfe, + (byte) 0x54, (byte) 0x33, (byte) 0x0a, (byte) 0x58, (byte) 0x0a, (byte) 0xe0, + (byte) 0xc6, (byte) 0xd5, (byte) 0x50, (byte) 0x2d, (byte) 0x03, (byte) 0xdc, + (byte) 0x51, (byte) 0x3e, (byte) 0x53, (byte) 0x7d, (byte) 0x82, (byte) 0xef, + (byte) 0xc4, (byte) 0xb1, (byte) 0x2a, (byte) 0x84, (byte) 0xda, (byte) 0x45, + (byte) 0x6b, (byte) 0x6f, (byte) 0x3e, (byte) 0x63, (byte) 0x66, (byte) 0xf9, + (byte) 0x46, (byte) 0x85, (byte) 0x4f, (byte) 0xc2, (byte) 0xa4, (byte) 0xc3, + (byte) 0x25, (byte) 0x27, (byte) 0xa3, (byte) 0xf7, (byte) 0x6f, (byte) 0xfb, + (byte) 0x65, (byte) 0xc3, (byte) 0xa5, (byte) 0xdf, (byte) 0xf3, (byte) 0x01, + (byte) 0x14, (byte) 0x3e, (byte) 0xdc, (byte) 0x5c, (byte) 0x00, (byte) 0x7d, + (byte) 0x6a, (byte) 0x29, (byte) 0x02, (byte) 0x11, (byte) 0x32, (byte) 0x09, + (byte) 0x54, (byte) 0xb1, (byte) 0xc2, (byte) 0xc0, (byte) 0x9a, (byte) 0xfa, + (byte) 0xc9, (byte) 0x50, (byte) 0xe2, (byte) 0x3b, (byte) 0x91, (byte) 0x20, + (byte) 0xc2, (byte) 0x2e, (byte) 0x50, (byte) 0x2d, (byte) 0x4c, (byte) 0x9b, + (byte) 0x43, (byte) 0x5a, (byte) 0xa6, (byte) 0xd6, (byte) 0x72, (byte) 0x33, + (byte) 0x74, (byte) 0xe3, (byte) 0xfc, (byte) 0x80, (byte) 0x90, (byte) 0x11, + (byte) 0xfa, (byte) 0x64, (byte) 0xa3, (byte) 0xda, (byte) 0x95, (byte) 0x21, + (byte) 0xb8, (byte) 0x8a, (byte) 0xe9, (byte) 0xea, (byte) 0x09, (byte) 0x31, + (byte) 0x39, (byte) 0x18, (byte) 0xf0, (byte) 0x45, (byte) 0x9f, (byte) 0x02, + (byte) 0x7e, (byte) 0xd1, (byte) 0x4c, (byte) 0x57, (byte) 0x5f, (byte) 0x47, + (byte) 0x53, (byte) 0x8b, (byte) 0xb8, (byte) 0xed, (byte) 0x26, (byte) 0x54, + (byte) 0xe8, (byte) 0xe0, (byte) 0x2d, (byte) 0x6f, (byte) 0x7f, (byte) 0xfa, + (byte) 0xea, (byte) 0x58, (byte) 0xbf, (byte) 0xa8, (byte) 0x59, (byte) 0xd7, + (byte) 0xd9, (byte) 0xc0, (byte) 0x30, (byte) 0x0c, (byte) 0x70, (byte) 0xe1, + (byte) 0x04, (byte) 0xc9, (byte) 0xc7, (byte) 0xb9, (byte) 0x4b, (byte) 0xc0, + (byte) 0x02, (byte) 0xd7, (byte) 0xec, (byte) 0x1f, (byte) 0xad, (byte) 0x0d, + (byte) 0x83, (byte) 0x44, (byte) 0x64, (byte) 0x70, (byte) 0xea, (byte) 0x60, + (byte) 0xbd, (byte) 0xb3, (byte) 0xca, (byte) 0xf4, (byte) 0x16, (byte) 0x02, + (byte) 0x3d, (byte) 0x87, (byte) 0x0a, (byte) 0x57, (byte) 0xab, (byte) 0x7b, + (byte) 0xc4, (byte) 0x18, (byte) 0x20, (byte) 0xbc, (byte) 0x64, (byte) 0xbe, + (byte) 0x4b, (byte) 0x60, (byte) 0x06, (byte) 0x0d, (byte) 0x9c, (byte) 0xac, + (byte) 0x42, (byte) 0x49, (byte) 0x7b, (byte) 0x85, (byte) 0xdb, (byte) 0x0c, + (byte) 0x7e, (byte) 0xcb, (byte) 0x03, (byte) 0x7a, (byte) 0xeb, (byte) 0x5e, + (byte) 0x6b, (byte) 0x22, (byte) 0xa9, (byte) 0xfd, (byte) 0x59, (byte) 0x6d, + (byte) 0xf1, (byte) 0x45, (byte) 0x13, (byte) 0x32, (byte) 0xbd, (byte) 0x34, + (byte) 0x5a, (byte) 0xa8, (byte) 0xbc, (byte) 0xbf, (byte) 0xaa, (byte) 0x1a, + (byte) 0x1f, (byte) 0xb3, (byte) 0x20, (byte) 0xff, (byte) 0xb9, (byte) 0xf3, + (byte) 0xc4, (byte) 0xa1, (byte) 0x24, (byte) 0x53, (byte) 0xbd, (byte) 0x1f, + (byte) 0xf4, (byte) 0x43, (byte) 0x9c, (byte) 0x3a, (byte) 0x62, (byte) 0x4e, + (byte) 0x70, (byte) 0x05, (byte) 0x4d, (byte) 0x65, (byte) 0xd0, (byte) 0x75, + (byte) 0x3c, (byte) 0x20, (byte) 0xb3, (byte) 0x34, (byte) 0x92, (byte) 0xd1, + (byte) 0x5c, (byte) 0x36, (byte) 0x3c, (byte) 0x1f, (byte) 0x89, (byte) 0xa8, + (byte) 0x40, (byte) 0x01, (byte) 0x01, (byte) 0xaf, (byte) 0x43, (byte) 0x78, + (byte) 0xcb, (byte) 0xd7, (byte) 0x4f, (byte) 0x53, (byte) 0xb2, (byte) 0xf8, + (byte) 0xd6, (byte) 0x37, (byte) 0x22, (byte) 0xd3, (byte) 0xc7, (byte) 0xcb, + (byte) 0x2e, (byte) 0xb7, (byte) 0x9d, (byte) 0x06, (byte) 0x55, (byte) 0x23, + (byte) 0x6a, (byte) 0xd7, (byte) 0x00, (byte) 0xdc, (byte) 0x38, (byte) 0x36, + (byte) 0x1c, (byte) 0x12, (byte) 0xd1, (byte) 0x9e, (byte) 0x83, (byte) 0x17, + (byte) 0xe4, (byte) 0x2c, (byte) 0x4c, (byte) 0xda, (byte) 0xe3, (byte) 0xf8, + (byte) 0x65, (byte) 0x3b, (byte) 0x7b, (byte) 0x84, (byte) 0x86, (byte) 0xfc, + (byte) 0x41, (byte) 0x91, (byte) 0xf1, (byte) 0x2b, (byte) 0xe5, (byte) 0x76, + (byte) 0x36, (byte) 0x1f, (byte) 0x41, (byte) 0x35, (byte) 0x85, (byte) 0x2e, + (byte) 0x0d, (byte) 0x65, (byte) 0xfd, (byte) 0x44, (byte) 0xf5, (byte) 0x84, + (byte) 0xe3, (byte) 0xa4, (byte) 0x41, (byte) 0x9c, (byte) 0x1d, (byte) 0xb1, + (byte) 0xa5, (byte) 0xb5, (byte) 0xce, (byte) 0x02, (byte) 0xb2, (byte) 0x7a, + (byte) 0xe8, (byte) 0x85, (byte) 0x07, (byte) 0x62, (byte) 0x9d, (byte) 0x32, + (byte) 0x66, (byte) 0xc0, (byte) 0x4a, (byte) 0xaf, (byte) 0x94, (byte) 0xc7, + (byte) 0x52, (byte) 0xf5, (byte) 0x28, (byte) 0x80, (byte) 0xa8, (byte) 0xd0, + (byte) 0x88, (byte) 0x25, (byte) 0xc1, (byte) 0x67, (byte) 0x01, (byte) 0xff, + (byte) 0xc9, (byte) 0xe7, (byte) 0x02, (byte) 0x03, (byte) 0x01, (byte) 0x00, + (byte) 0x01, (byte) 0x02, (byte) 0x82, (byte) 0x01, (byte) 0x80, (byte) 0x04, + (byte) 0xb1, (byte) 0xcc, (byte) 0x53, (byte) 0x3a, (byte) 0xb0, (byte) 0xcb, + (byte) 0x04, (byte) 0xba, (byte) 0x59, (byte) 0xf8, (byte) 0x2e, (byte) 0x81, + (byte) 0xb2, (byte) 0xa9, (byte) 0xf3, (byte) 0x3c, (byte) 0xa5, (byte) 0x52, + (byte) 0x90, (byte) 0x6f, (byte) 0x98, (byte) 0xc4, (byte) 0x69, (byte) 0x5b, + (byte) 0x83, (byte) 0x84, (byte) 0x20, (byte) 0xb1, (byte) 0xae, (byte) 0xc3, + (byte) 0x04, (byte) 0x46, (byte) 0x6a, (byte) 0x24, (byte) 0x2f, (byte) 0xcd, + (byte) 0x6b, (byte) 0x90, (byte) 0x70, (byte) 0x20, (byte) 0x45, (byte) 0x25, + (byte) 0x1a, (byte) 0xc3, (byte) 0x02, (byte) 0x42, (byte) 0xf3, (byte) 0x49, + (byte) 0xe2, (byte) 0x3e, (byte) 0x21, (byte) 0x87, (byte) 0xdd, (byte) 0x6a, + (byte) 0x94, (byte) 0x2a, (byte) 0x1e, (byte) 0x0f, (byte) 0xdb, (byte) 0x77, + (byte) 0x5f, (byte) 0xc1, (byte) 0x2c, (byte) 0x03, (byte) 0xfb, (byte) 0xcf, + (byte) 0x91, (byte) 0x82, (byte) 0xa1, (byte) 0xbf, (byte) 0xb0, (byte) 0x73, + (byte) 0xfa, (byte) 0xda, (byte) 0xbc, (byte) 0xf8, (byte) 0x9f, (byte) 0x45, + (byte) 0xd3, (byte) 0xe8, (byte) 0xbb, (byte) 0x38, (byte) 0xfb, (byte) 0xc2, + (byte) 0x2d, (byte) 0x76, (byte) 0x51, (byte) 0x96, (byte) 0x18, (byte) 0x03, + (byte) 0x15, (byte) 0xd9, (byte) 0xea, (byte) 0x82, (byte) 0x25, (byte) 0x83, + (byte) 0xff, (byte) 0x5c, (byte) 0x85, (byte) 0x06, (byte) 0x09, (byte) 0xb2, + (byte) 0x46, (byte) 0x12, (byte) 0x64, (byte) 0x02, (byte) 0x74, (byte) 0x4f, + (byte) 0xbc, (byte) 0x9a, (byte) 0x25, (byte) 0x18, (byte) 0x01, (byte) 0x07, + (byte) 0x17, (byte) 0x25, (byte) 0x55, (byte) 0x7c, (byte) 0xdc, (byte) 0xe1, + (byte) 0xd1, (byte) 0x5a, (byte) 0x2f, (byte) 0x25, (byte) 0xaf, (byte) 0xf6, + (byte) 0x8f, (byte) 0xa4, (byte) 0x9a, (byte) 0x5a, (byte) 0x3a, (byte) 0xfe, + (byte) 0x2e, (byte) 0x93, (byte) 0x24, (byte) 0xa0, (byte) 0x27, (byte) 0xac, + (byte) 0x07, (byte) 0x75, (byte) 0x33, (byte) 0x01, (byte) 0x54, (byte) 0x23, + (byte) 0x0f, (byte) 0xe8, (byte) 0x9f, (byte) 0xfa, (byte) 0x36, (byte) 0xe6, + (byte) 0x3a, (byte) 0xd5, (byte) 0x78, (byte) 0xb0, (byte) 0xe4, (byte) 0x6a, + (byte) 0x16, (byte) 0x50, (byte) 0xbd, (byte) 0x0f, (byte) 0x9f, (byte) 0x32, + (byte) 0xa1, (byte) 0x6b, (byte) 0xf5, (byte) 0xa4, (byte) 0x34, (byte) 0x58, + (byte) 0xb6, (byte) 0xa4, (byte) 0xb3, (byte) 0xc3, (byte) 0x83, (byte) 0x08, + (byte) 0x18, (byte) 0xc7, (byte) 0xef, (byte) 0x95, (byte) 0xe2, (byte) 0x1b, + (byte) 0xba, (byte) 0x35, (byte) 0x61, (byte) 0xa3, (byte) 0xb4, (byte) 0x30, + (byte) 0xe0, (byte) 0xd1, (byte) 0xc1, (byte) 0xa2, (byte) 0x3a, (byte) 0xc6, + (byte) 0xb4, (byte) 0xd2, (byte) 0x80, (byte) 0x5a, (byte) 0xaf, (byte) 0xa4, + (byte) 0x54, (byte) 0x3c, (byte) 0x66, (byte) 0x5a, (byte) 0x1c, (byte) 0x4d, + (byte) 0xe1, (byte) 0xd9, (byte) 0x98, (byte) 0x44, (byte) 0x01, (byte) 0x1b, + (byte) 0x8c, (byte) 0xe9, (byte) 0x80, (byte) 0x54, (byte) 0x83, (byte) 0x3d, + (byte) 0x96, (byte) 0x25, (byte) 0x41, (byte) 0x1c, (byte) 0xad, (byte) 0xae, + (byte) 0x3b, (byte) 0x7a, (byte) 0xd7, (byte) 0x9d, (byte) 0x10, (byte) 0x7c, + (byte) 0xd1, (byte) 0xa7, (byte) 0x96, (byte) 0x39, (byte) 0xa5, (byte) 0x2f, + (byte) 0xbe, (byte) 0xc3, (byte) 0x2c, (byte) 0x64, (byte) 0x01, (byte) 0xfe, + (byte) 0xa2, (byte) 0xd1, (byte) 0x6a, (byte) 0xcf, (byte) 0x4c, (byte) 0x76, + (byte) 0x3b, (byte) 0xc8, (byte) 0x35, (byte) 0x21, (byte) 0xda, (byte) 0x98, + (byte) 0xcf, (byte) 0xf9, (byte) 0x29, (byte) 0xff, (byte) 0x30, (byte) 0x59, + (byte) 0x36, (byte) 0x53, (byte) 0x0b, (byte) 0xbb, (byte) 0xfa, (byte) 0xba, + (byte) 0xc4, (byte) 0x03, (byte) 0x23, (byte) 0xe0, (byte) 0xd3, (byte) 0x33, + (byte) 0xff, (byte) 0x32, (byte) 0xdb, (byte) 0x30, (byte) 0x64, (byte) 0xc7, + (byte) 0x56, (byte) 0xca, (byte) 0x55, (byte) 0x14, (byte) 0xee, (byte) 0x58, + (byte) 0xfe, (byte) 0x96, (byte) 0x7e, (byte) 0x1c, (byte) 0x34, (byte) 0x16, + (byte) 0xeb, (byte) 0x76, (byte) 0x26, (byte) 0x48, (byte) 0xe2, (byte) 0xe5, + (byte) 0x5c, (byte) 0xd5, (byte) 0x83, (byte) 0x37, (byte) 0xd9, (byte) 0x09, + (byte) 0x71, (byte) 0xbc, (byte) 0x54, (byte) 0x25, (byte) 0xca, (byte) 0x2e, + (byte) 0xdb, (byte) 0x36, (byte) 0x39, (byte) 0xcc, (byte) 0x3a, (byte) 0x81, + (byte) 0x95, (byte) 0x9e, (byte) 0xf4, (byte) 0x01, (byte) 0xa7, (byte) 0xc0, + (byte) 0x20, (byte) 0xce, (byte) 0x70, (byte) 0x55, (byte) 0x2c, (byte) 0xe0, + (byte) 0x93, (byte) 0x72, (byte) 0xa6, (byte) 0x25, (byte) 0xda, (byte) 0x64, + (byte) 0x19, (byte) 0x18, (byte) 0xd2, (byte) 0x31, (byte) 0xe2, (byte) 0x7c, + (byte) 0xf2, (byte) 0x30, (byte) 0x9e, (byte) 0x8d, (byte) 0xc6, (byte) 0x14, + (byte) 0x8a, (byte) 0x38, (byte) 0xf0, (byte) 0x94, (byte) 0xeb, (byte) 0xf4, + (byte) 0x64, (byte) 0x92, (byte) 0x3d, (byte) 0x67, (byte) 0xa6, (byte) 0x2c, + (byte) 0x52, (byte) 0xfc, (byte) 0x60, (byte) 0xca, (byte) 0x2a, (byte) 0xcf, + (byte) 0x24, (byte) 0xd5, (byte) 0x42, (byte) 0x5f, (byte) 0xc7, (byte) 0x9f, + (byte) 0xf3, (byte) 0xb4, (byte) 0xdf, (byte) 0x76, (byte) 0x6e, (byte) 0x53, + (byte) 0xa1, (byte) 0x7b, (byte) 0xae, (byte) 0xa5, (byte) 0x84, (byte) 0x1f, + (byte) 0xfa, (byte) 0xc0, (byte) 0xb4, (byte) 0x6c, (byte) 0xc9, (byte) 0x02, + (byte) 0x81, (byte) 0xc1, (byte) 0x00, (byte) 0xf3, (byte) 0x17, (byte) 0xd9, + (byte) 0x48, (byte) 0x17, (byte) 0x87, (byte) 0x84, (byte) 0x16, (byte) 0xea, + (byte) 0x2d, (byte) 0x31, (byte) 0x1b, (byte) 0xce, (byte) 0xec, (byte) 0xaf, + (byte) 0xdc, (byte) 0x6b, (byte) 0xaf, (byte) 0xc8, (byte) 0xf1, (byte) 0x40, + (byte) 0xa7, (byte) 0x4f, (byte) 0xef, (byte) 0x48, (byte) 0x08, (byte) 0x5e, + (byte) 0x9a, (byte) 0xd1, (byte) 0xc0, (byte) 0xb1, (byte) 0xfe, (byte) 0xe7, + (byte) 0x03, (byte) 0xd5, (byte) 0x96, (byte) 0x01, (byte) 0xe8, (byte) 0x40, + (byte) 0xca, (byte) 0x78, (byte) 0xcb, (byte) 0xb3, (byte) 0x28, (byte) 0x1a, + (byte) 0xf0, (byte) 0xe5, (byte) 0xf6, (byte) 0x46, (byte) 0xef, (byte) 0xcd, + (byte) 0x1a, (byte) 0x0f, (byte) 0x13, (byte) 0x2d, (byte) 0x38, (byte) 0xf8, + (byte) 0xf7, (byte) 0x88, (byte) 0x21, (byte) 0x15, (byte) 0xce, (byte) 0x48, + (byte) 0xf4, (byte) 0x92, (byte) 0x7e, (byte) 0x9b, (byte) 0x2e, (byte) 0x2f, + (byte) 0x22, (byte) 0x3e, (byte) 0x5c, (byte) 0x67, (byte) 0xd7, (byte) 0x58, + (byte) 0xf6, (byte) 0xef, (byte) 0x1f, (byte) 0xb4, (byte) 0x04, (byte) 0xc7, + (byte) 0xfd, (byte) 0x8c, (byte) 0x4e, (byte) 0x27, (byte) 0x9e, (byte) 0xb9, + (byte) 0xef, (byte) 0x0f, (byte) 0xf7, (byte) 0x4a, (byte) 0xc2, (byte) 0xf4, + (byte) 0x64, (byte) 0x6b, (byte) 0xe0, (byte) 0xfb, (byte) 0xe3, (byte) 0x45, + (byte) 0xd5, (byte) 0x37, (byte) 0xa0, (byte) 0x2a, (byte) 0xc6, (byte) 0xf3, + (byte) 0xf6, (byte) 0xcc, (byte) 0xb5, (byte) 0x94, (byte) 0xbf, (byte) 0x56, + (byte) 0xa0, (byte) 0x61, (byte) 0x36, (byte) 0x88, (byte) 0x35, (byte) 0xd5, + (byte) 0xa5, (byte) 0xad, (byte) 0x20, (byte) 0x48, (byte) 0xda, (byte) 0x70, + (byte) 0x35, (byte) 0xd9, (byte) 0x75, (byte) 0x66, (byte) 0xa5, (byte) 0xac, + (byte) 0x86, (byte) 0x7a, (byte) 0x75, (byte) 0x49, (byte) 0x88, (byte) 0x40, + (byte) 0xce, (byte) 0xb0, (byte) 0x6f, (byte) 0x57, (byte) 0x15, (byte) 0x54, + (byte) 0xd3, (byte) 0x2f, (byte) 0x11, (byte) 0x9b, (byte) 0xe3, (byte) 0x87, + (byte) 0xc8, (byte) 0x8d, (byte) 0x98, (byte) 0xc6, (byte) 0xe0, (byte) 0xbc, + (byte) 0x85, (byte) 0xb9, (byte) 0x04, (byte) 0x43, (byte) 0xa9, (byte) 0x41, + (byte) 0xce, (byte) 0x42, (byte) 0x1a, (byte) 0x57, (byte) 0x10, (byte) 0xd8, + (byte) 0xe4, (byte) 0x6a, (byte) 0x51, (byte) 0x10, (byte) 0x0a, (byte) 0xec, + (byte) 0xe4, (byte) 0x57, (byte) 0xc7, (byte) 0xee, (byte) 0xe9, (byte) 0xd6, + (byte) 0xcb, (byte) 0x3e, (byte) 0xba, (byte) 0xfa, (byte) 0xe9, (byte) 0x0e, + (byte) 0xed, (byte) 0x87, (byte) 0x04, (byte) 0x9a, (byte) 0x48, (byte) 0xba, + (byte) 0xaf, (byte) 0x08, (byte) 0xf5, (byte) 0x02, (byte) 0x81, (byte) 0xc1, + (byte) 0x00, (byte) 0xcb, (byte) 0x63, (byte) 0xd6, (byte) 0x54, (byte) 0xb6, + (byte) 0xf3, (byte) 0xf3, (byte) 0x8c, (byte) 0xf8, (byte) 0xd0, (byte) 0xd2, + (byte) 0x84, (byte) 0xc1, (byte) 0xf5, (byte) 0x12, (byte) 0xe0, (byte) 0x02, + (byte) 0x80, (byte) 0x42, (byte) 0x92, (byte) 0x4e, (byte) 0xa4, (byte) 0x5c, + (byte) 0xa5, (byte) 0x64, (byte) 0xec, (byte) 0xb7, (byte) 0xdc, (byte) 0xe0, + (byte) 0x2d, (byte) 0x5d, (byte) 0xac, (byte) 0x0e, (byte) 0x24, (byte) 0x48, + (byte) 0x13, (byte) 0x05, (byte) 0xe8, (byte) 0xff, (byte) 0x96, (byte) 0x93, + (byte) 0xba, (byte) 0x3c, (byte) 0x88, (byte) 0xcc, (byte) 0x80, (byte) 0xf9, + (byte) 0xdb, (byte) 0xa8, (byte) 0x4d, (byte) 0x86, (byte) 0x47, (byte) 0xc8, + (byte) 0xbf, (byte) 0x34, (byte) 0x2d, (byte) 0xda, (byte) 0xb6, (byte) 0x28, + (byte) 0xf0, (byte) 0x1e, (byte) 0xd2, (byte) 0x46, (byte) 0x0d, (byte) 0x6f, + (byte) 0x36, (byte) 0x8e, (byte) 0x84, (byte) 0xd8, (byte) 0xaf, (byte) 0xf7, + (byte) 0x69, (byte) 0x23, (byte) 0x77, (byte) 0xfb, (byte) 0xc5, (byte) 0x04, + (byte) 0x08, (byte) 0x18, (byte) 0xac, (byte) 0x85, (byte) 0x80, (byte) 0x87, + (byte) 0x1c, (byte) 0xfe, (byte) 0x8e, (byte) 0x5d, (byte) 0x00, (byte) 0x7f, + (byte) 0x5b, (byte) 0x33, (byte) 0xf5, (byte) 0xdf, (byte) 0x70, (byte) 0x81, + (byte) 0xad, (byte) 0x81, (byte) 0xf4, (byte) 0x5a, (byte) 0x37, (byte) 0x8a, + (byte) 0x79, (byte) 0x09, (byte) 0xc5, (byte) 0x55, (byte) 0xab, (byte) 0x58, + (byte) 0x7c, (byte) 0x47, (byte) 0xca, (byte) 0xa5, (byte) 0x80, (byte) 0x49, + (byte) 0x5f, (byte) 0x71, (byte) 0x83, (byte) 0xfb, (byte) 0x3b, (byte) 0x06, + (byte) 0xec, (byte) 0x75, (byte) 0x23, (byte) 0xc4, (byte) 0x32, (byte) 0xc7, + (byte) 0x18, (byte) 0xf6, (byte) 0x82, (byte) 0x95, (byte) 0x98, (byte) 0x39, + (byte) 0xf7, (byte) 0x92, (byte) 0x31, (byte) 0xc0, (byte) 0x89, (byte) 0xba, + (byte) 0xd4, (byte) 0xd4, (byte) 0x58, (byte) 0x4e, (byte) 0x38, (byte) 0x35, + (byte) 0x10, (byte) 0xb9, (byte) 0xf1, (byte) 0x27, (byte) 0xdc, (byte) 0xff, + (byte) 0xc7, (byte) 0xb2, (byte) 0xba, (byte) 0x1f, (byte) 0x27, (byte) 0xaf, + (byte) 0x99, (byte) 0xd5, (byte) 0xb0, (byte) 0x39, (byte) 0xe7, (byte) 0x43, + (byte) 0x88, (byte) 0xd3, (byte) 0xce, (byte) 0x38, (byte) 0xc2, (byte) 0x99, + (byte) 0x43, (byte) 0xfc, (byte) 0x8a, (byte) 0xe3, (byte) 0x60, (byte) 0x0d, + (byte) 0x0a, (byte) 0xb8, (byte) 0xc4, (byte) 0x29, (byte) 0xca, (byte) 0x0d, + (byte) 0x30, (byte) 0xaf, (byte) 0xca, (byte) 0xd0, (byte) 0xaa, (byte) 0x67, + (byte) 0xb1, (byte) 0xdd, (byte) 0xdb, (byte) 0x7a, (byte) 0x11, (byte) 0xad, + (byte) 0xeb, (byte) 0x02, (byte) 0x81, (byte) 0xc0, (byte) 0x71, (byte) 0xb8, + (byte) 0xcf, (byte) 0x72, (byte) 0x35, (byte) 0x67, (byte) 0xb5, (byte) 0x38, + (byte) 0x8f, (byte) 0x16, (byte) 0xd3, (byte) 0x29, (byte) 0x82, (byte) 0x35, + (byte) 0x21, (byte) 0xd4, (byte) 0x49, (byte) 0x20, (byte) 0x74, (byte) 0x2d, + (byte) 0xc0, (byte) 0xa4, (byte) 0x44, (byte) 0xf5, (byte) 0xd8, (byte) 0xc9, + (byte) 0xe9, (byte) 0x90, (byte) 0x1d, (byte) 0xde, (byte) 0x3a, (byte) 0xa6, + (byte) 0xd7, (byte) 0xe5, (byte) 0xe8, (byte) 0x4e, (byte) 0x83, (byte) 0xd7, + (byte) 0xe6, (byte) 0x2f, (byte) 0x92, (byte) 0x31, (byte) 0x21, (byte) 0x3f, + (byte) 0xfa, (byte) 0xd2, (byte) 0x85, (byte) 0x92, (byte) 0x1f, (byte) 0xff, + (byte) 0x61, (byte) 0x00, (byte) 0xf6, (byte) 0xda, (byte) 0x6e, (byte) 0xc6, + (byte) 0x7f, (byte) 0x5a, (byte) 0x35, (byte) 0x79, (byte) 0xdc, (byte) 0xdc, + (byte) 0xa3, (byte) 0x2e, (byte) 0x9f, (byte) 0x35, (byte) 0xd1, (byte) 0x5c, + (byte) 0xda, (byte) 0xb9, (byte) 0xf7, (byte) 0x58, (byte) 0x7d, (byte) 0x4f, + (byte) 0xb6, (byte) 0x13, (byte) 0xd7, (byte) 0x2c, (byte) 0x0a, (byte) 0xa8, + (byte) 0x4d, (byte) 0xf2, (byte) 0xe4, (byte) 0x67, (byte) 0x4f, (byte) 0x8b, + (byte) 0xa6, (byte) 0xca, (byte) 0x1a, (byte) 0xbb, (byte) 0x02, (byte) 0x63, + (byte) 0x8f, (byte) 0xb7, (byte) 0x46, (byte) 0xec, (byte) 0x7a, (byte) 0x8a, + (byte) 0x09, (byte) 0x0a, (byte) 0x45, (byte) 0x3a, (byte) 0x8d, (byte) 0xa8, + (byte) 0x83, (byte) 0x4b, (byte) 0x0a, (byte) 0xdb, (byte) 0x4b, (byte) 0x99, + (byte) 0xf3, (byte) 0x69, (byte) 0x95, (byte) 0xf0, (byte) 0xcf, (byte) 0xe9, + (byte) 0xf7, (byte) 0x67, (byte) 0xc9, (byte) 0x45, (byte) 0x18, (byte) 0x2f, + (byte) 0xf0, (byte) 0x5c, (byte) 0x90, (byte) 0xbd, (byte) 0xa6, (byte) 0x66, + (byte) 0x8c, (byte) 0xfe, (byte) 0x60, (byte) 0x5d, (byte) 0x6c, (byte) 0x27, + (byte) 0xec, (byte) 0xc1, (byte) 0x84, (byte) 0xb2, (byte) 0xa1, (byte) 0x97, + (byte) 0x9e, (byte) 0x16, (byte) 0x29, (byte) 0xa7, (byte) 0xe0, (byte) 0x38, + (byte) 0xa2, (byte) 0x36, (byte) 0x05, (byte) 0x5f, (byte) 0xda, (byte) 0x72, + (byte) 0x1a, (byte) 0x5f, (byte) 0xa8, (byte) 0x7d, (byte) 0x41, (byte) 0x35, + (byte) 0xf6, (byte) 0x4e, (byte) 0x0a, (byte) 0x88, (byte) 0x8e, (byte) 0x00, + (byte) 0x98, (byte) 0xa6, (byte) 0xca, (byte) 0xc1, (byte) 0xdf, (byte) 0x72, + (byte) 0x6c, (byte) 0xfe, (byte) 0x29, (byte) 0xbe, (byte) 0xa3, (byte) 0x9b, + (byte) 0x0b, (byte) 0x5c, (byte) 0x0b, (byte) 0x9d, (byte) 0xa7, (byte) 0x71, + (byte) 0xce, (byte) 0x04, (byte) 0xfa, (byte) 0xac, (byte) 0x01, (byte) 0x8d, + (byte) 0x52, (byte) 0xa0, (byte) 0x3d, (byte) 0xdd, (byte) 0x02, (byte) 0x81, + (byte) 0xc1, (byte) 0x00, (byte) 0xc1, (byte) 0xc0, (byte) 0x2e, (byte) 0xa9, + (byte) 0xee, (byte) 0xca, (byte) 0xff, (byte) 0xe4, (byte) 0xf8, (byte) 0x15, + (byte) 0xfd, (byte) 0xa5, (byte) 0x68, (byte) 0x1b, (byte) 0x2d, (byte) 0x4a, + (byte) 0xe6, (byte) 0x37, (byte) 0x06, (byte) 0xb3, (byte) 0xd7, (byte) 0x64, + (byte) 0xad, (byte) 0xb9, (byte) 0x05, (byte) 0x26, (byte) 0x97, (byte) 0x94, + (byte) 0x3a, (byte) 0x9e, (byte) 0x1c, (byte) 0xd0, (byte) 0xcd, (byte) 0x7b, + (byte) 0xf4, (byte) 0x88, (byte) 0xe2, (byte) 0xa5, (byte) 0x6d, (byte) 0xed, + (byte) 0x24, (byte) 0x77, (byte) 0x52, (byte) 0x39, (byte) 0x43, (byte) 0x0f, + (byte) 0x4e, (byte) 0x75, (byte) 0xd8, (byte) 0xa3, (byte) 0x59, (byte) 0x5a, + (byte) 0xc2, (byte) 0xba, (byte) 0x9a, (byte) 0x5b, (byte) 0x60, (byte) 0x31, + (byte) 0x0d, (byte) 0x58, (byte) 0x89, (byte) 0x13, (byte) 0xe8, (byte) 0x95, + (byte) 0xdd, (byte) 0xae, (byte) 0xcc, (byte) 0x1f, (byte) 0x73, (byte) 0x48, + (byte) 0x55, (byte) 0xd8, (byte) 0xfb, (byte) 0x67, (byte) 0xce, (byte) 0x18, + (byte) 0x85, (byte) 0x59, (byte) 0xad, (byte) 0x1f, (byte) 0x93, (byte) 0xe1, + (byte) 0xb7, (byte) 0x54, (byte) 0x80, (byte) 0x8e, (byte) 0x5f, (byte) 0xbc, + (byte) 0x1c, (byte) 0x96, (byte) 0x66, (byte) 0x2e, (byte) 0x40, (byte) 0x17, + (byte) 0x2e, (byte) 0x01, (byte) 0x7a, (byte) 0x7d, (byte) 0xaa, (byte) 0xff, + (byte) 0xa3, (byte) 0xd2, (byte) 0xdf, (byte) 0xe2, (byte) 0xf3, (byte) 0x54, + (byte) 0x51, (byte) 0xeb, (byte) 0xba, (byte) 0x7c, (byte) 0x2a, (byte) 0x22, + (byte) 0xc6, (byte) 0x42, (byte) 0xbc, (byte) 0xa1, (byte) 0x6c, (byte) 0xcf, + (byte) 0x73, (byte) 0x2e, (byte) 0x07, (byte) 0xfc, (byte) 0xf5, (byte) 0x67, + (byte) 0x25, (byte) 0xd0, (byte) 0xfa, (byte) 0xeb, (byte) 0xb4, (byte) 0xd4, + (byte) 0x19, (byte) 0xcc, (byte) 0x64, (byte) 0xa1, (byte) 0x2e, (byte) 0x78, + (byte) 0x45, (byte) 0xd9, (byte) 0x7f, (byte) 0x1b, (byte) 0x4c, (byte) 0x10, + (byte) 0x31, (byte) 0x44, (byte) 0xe8, (byte) 0xcc, (byte) 0xf9, (byte) 0x1b, + (byte) 0x87, (byte) 0x31, (byte) 0xd6, (byte) 0x69, (byte) 0x85, (byte) 0x4a, + (byte) 0x49, (byte) 0xf6, (byte) 0xb2, (byte) 0xe0, (byte) 0xb8, (byte) 0x98, + (byte) 0x3c, (byte) 0xf6, (byte) 0x78, (byte) 0x46, (byte) 0xc8, (byte) 0x3d, + (byte) 0x60, (byte) 0xc1, (byte) 0xaa, (byte) 0x2f, (byte) 0x28, (byte) 0xa1, + (byte) 0x14, (byte) 0x6b, (byte) 0x75, (byte) 0x4d, (byte) 0xb1, (byte) 0x3d, + (byte) 0x80, (byte) 0x49, (byte) 0x33, (byte) 0xfd, (byte) 0x71, (byte) 0xc0, + (byte) 0x13, (byte) 0x1e, (byte) 0x16, (byte) 0x69, (byte) 0x80, (byte) 0xa4, + (byte) 0x9c, (byte) 0xd7, (byte) 0x02, (byte) 0x81, (byte) 0xc1, (byte) 0x00, + (byte) 0x8c, (byte) 0x33, (byte) 0x2d, (byte) 0xd9, (byte) 0xf3, (byte) 0x42, + (byte) 0x4d, (byte) 0xca, (byte) 0x5e, (byte) 0x60, (byte) 0x14, (byte) 0x10, + (byte) 0xf6, (byte) 0xf3, (byte) 0x71, (byte) 0x15, (byte) 0x88, (byte) 0x54, + (byte) 0x84, (byte) 0x21, (byte) 0x04, (byte) 0xb1, (byte) 0xaf, (byte) 0x02, + (byte) 0x11, (byte) 0x7f, (byte) 0x42, (byte) 0x3e, (byte) 0x86, (byte) 0xcb, + (byte) 0x6c, (byte) 0xf5, (byte) 0x57, (byte) 0x78, (byte) 0x4a, (byte) 0x03, + (byte) 0x9b, (byte) 0x80, (byte) 0xc2, (byte) 0x04, (byte) 0x3a, (byte) 0x6b, + (byte) 0xb3, (byte) 0x30, (byte) 0x31, (byte) 0x7e, (byte) 0xc3, (byte) 0x89, + (byte) 0x09, (byte) 0x4e, (byte) 0x86, (byte) 0x59, (byte) 0x41, (byte) 0xb5, + (byte) 0xae, (byte) 0xd5, (byte) 0xc6, (byte) 0x38, (byte) 0xbc, (byte) 0xd7, + (byte) 0xd7, (byte) 0x8e, (byte) 0xa3, (byte) 0x1a, (byte) 0xde, (byte) 0x32, + (byte) 0xad, (byte) 0x8d, (byte) 0x15, (byte) 0x81, (byte) 0xfe, (byte) 0xac, + (byte) 0xbd, (byte) 0xd0, (byte) 0xca, (byte) 0xbc, (byte) 0xd8, (byte) 0x6a, + (byte) 0xe1, (byte) 0xfe, (byte) 0xda, (byte) 0xc4, (byte) 0xd8, (byte) 0x62, + (byte) 0x71, (byte) 0x20, (byte) 0xa3, (byte) 0xd3, (byte) 0x06, (byte) 0x11, + (byte) 0xa9, (byte) 0x53, (byte) 0x7a, (byte) 0x44, (byte) 0x89, (byte) 0x3d, + (byte) 0x28, (byte) 0x5e, (byte) 0x7d, (byte) 0xf0, (byte) 0x60, (byte) 0xeb, + (byte) 0xb5, (byte) 0xdf, (byte) 0xed, (byte) 0x4f, (byte) 0x6d, (byte) 0x05, + (byte) 0x59, (byte) 0x06, (byte) 0xb0, (byte) 0x62, (byte) 0x50, (byte) 0x1c, + (byte) 0xb7, (byte) 0x2c, (byte) 0x44, (byte) 0xa4, (byte) 0x49, (byte) 0xf8, + (byte) 0x4f, (byte) 0x4b, (byte) 0xab, (byte) 0x71, (byte) 0x5b, (byte) 0xcb, + (byte) 0x31, (byte) 0x10, (byte) 0x41, (byte) 0xe0, (byte) 0x1a, (byte) 0x15, + (byte) 0xdc, (byte) 0x4c, (byte) 0x5d, (byte) 0x4f, (byte) 0x62, (byte) 0x83, + (byte) 0xa4, (byte) 0x80, (byte) 0x06, (byte) 0x36, (byte) 0xba, (byte) 0xc9, + (byte) 0xe2, (byte) 0xa4, (byte) 0x11, (byte) 0x98, (byte) 0x6b, (byte) 0x4c, + (byte) 0xe9, (byte) 0x90, (byte) 0x55, (byte) 0x18, (byte) 0xde, (byte) 0xe1, + (byte) 0x42, (byte) 0x38, (byte) 0x28, (byte) 0xa3, (byte) 0x54, (byte) 0x56, + (byte) 0x31, (byte) 0xaf, (byte) 0x5a, (byte) 0xd6, (byte) 0xf0, (byte) 0x26, + (byte) 0xe0, (byte) 0x7a, (byte) 0xd9, (byte) 0x6c, (byte) 0x64, (byte) 0xca, + (byte) 0x5d, (byte) 0x6d, (byte) 0x3d, (byte) 0x9a, (byte) 0xfe, (byte) 0x36, + (byte) 0x93, (byte) 0x9e, (byte) 0x62, (byte) 0x94, (byte) 0xc6, (byte) 0x07, + (byte) 0x83, (byte) 0x96, (byte) 0xd6, (byte) 0x27, (byte) 0xa6, (byte) 0xd8 + }; + public static final PrivateKey CLIENT_SUITE_B_RSA3072_KEY = + loadPrivateKey("RSA", CLIENT_SUITE_B_RSA3072_KEY_DATA); + + private static final String CLIENT_SUITE_B_ECDSA_CERT_STRING = + "-----BEGIN CERTIFICATE-----\n" + + "MIIB9zCCAX4CFDpfSZh3AH07BEfGWuMDa7Ynz6y+MAoGCCqGSM49BAMDMF4xCzAJ\n" + + "BgNVBAYTAlVTMQswCQYDVQQIDAJDQTEMMAoGA1UEBwwDTVRWMRAwDgYDVQQKDAdB\n" + + "bmRyb2lkMQ4wDAYDVQQLDAVXaS1GaTESMBAGA1UEAwwJdW5pdGVzdENBMB4XDTIw\n" + + "MDcyMTAyMjk1MFoXDTMwMDUzMDAyMjk1MFowYjELMAkGA1UEBhMCVVMxCzAJBgNV\n" + + "BAgMAkNBMQwwCgYDVQQHDANNVFYxEDAOBgNVBAoMB0FuZHJvaWQxDjAMBgNVBAsM\n" + + "BVdpLUZpMRYwFAYDVQQDDA11bml0ZXN0Q2xpZW50MHYwEAYHKoZIzj0CAQYFK4EE\n" + + "ACIDYgAEhxhVJ7dcSqrto0X+dgRxtd8BWG8cWmPjBji3MIxDLfpcMDoIB84ae1Ew\n" + + "gJn4YUYHrWsUDiVNihv8j7a/Ol1qcIY2ybH7tbezefLmagqA4vXEUXZXoUyL4ZNC\n" + + "DWcdw6LrMAoGCCqGSM49BAMDA2cAMGQCMH4aP73HrriRUJRguiuRic+X4Cqj/7YQ\n" + + "ueJmP87KF92/thhoQ9OrRo8uJITPmNDswwIwP2Q1AZCSL4BI9dYrqu07Ar+pSkXE\n" + + "R7oOqGdZR+d/MvXcFSrbIaLKEoHXmQamIHLe\n" + + "-----END CERTIFICATE-----\n"; + public static final X509Certificate CLIENT_SUITE_B_ECDSA_CERT = + loadCertificate(CLIENT_SUITE_B_ECDSA_CERT_STRING); + + private static final byte[] CLIENT_SUITE_B_ECC_KEY_DATA = new byte[]{ + (byte) 0x30, (byte) 0x81, (byte) 0xb6, (byte) 0x02, (byte) 0x01, (byte) 0x00, + (byte) 0x30, (byte) 0x10, (byte) 0x06, (byte) 0x07, (byte) 0x2a, (byte) 0x86, + (byte) 0x48, (byte) 0xce, (byte) 0x3d, (byte) 0x02, (byte) 0x01, (byte) 0x06, + (byte) 0x05, (byte) 0x2b, (byte) 0x81, (byte) 0x04, (byte) 0x00, (byte) 0x22, + (byte) 0x04, (byte) 0x81, (byte) 0x9e, (byte) 0x30, (byte) 0x81, (byte) 0x9b, + (byte) 0x02, (byte) 0x01, (byte) 0x01, (byte) 0x04, (byte) 0x30, (byte) 0xea, + (byte) 0x6c, (byte) 0x4b, (byte) 0x6d, (byte) 0x43, (byte) 0xf9, (byte) 0x6c, + (byte) 0x91, (byte) 0xdc, (byte) 0x2d, (byte) 0x6e, (byte) 0x87, (byte) 0x4f, + (byte) 0x0a, (byte) 0x0b, (byte) 0x97, (byte) 0x25, (byte) 0x1c, (byte) 0x79, + (byte) 0xa2, (byte) 0x07, (byte) 0xdc, (byte) 0x94, (byte) 0xc2, (byte) 0xee, + (byte) 0x64, (byte) 0x51, (byte) 0x6d, (byte) 0x4e, (byte) 0x35, (byte) 0x1c, + (byte) 0x22, (byte) 0x2f, (byte) 0xc0, (byte) 0xea, (byte) 0x09, (byte) 0x47, + (byte) 0x3e, (byte) 0xb9, (byte) 0xb6, (byte) 0xb8, (byte) 0x83, (byte) 0x9e, + (byte) 0xed, (byte) 0x59, (byte) 0xe5, (byte) 0xe7, (byte) 0x0f, (byte) 0xa1, + (byte) 0x64, (byte) 0x03, (byte) 0x62, (byte) 0x00, (byte) 0x04, (byte) 0x87, + (byte) 0x18, (byte) 0x55, (byte) 0x27, (byte) 0xb7, (byte) 0x5c, (byte) 0x4a, + (byte) 0xaa, (byte) 0xed, (byte) 0xa3, (byte) 0x45, (byte) 0xfe, (byte) 0x76, + (byte) 0x04, (byte) 0x71, (byte) 0xb5, (byte) 0xdf, (byte) 0x01, (byte) 0x58, + (byte) 0x6f, (byte) 0x1c, (byte) 0x5a, (byte) 0x63, (byte) 0xe3, (byte) 0x06, + (byte) 0x38, (byte) 0xb7, (byte) 0x30, (byte) 0x8c, (byte) 0x43, (byte) 0x2d, + (byte) 0xfa, (byte) 0x5c, (byte) 0x30, (byte) 0x3a, (byte) 0x08, (byte) 0x07, + (byte) 0xce, (byte) 0x1a, (byte) 0x7b, (byte) 0x51, (byte) 0x30, (byte) 0x80, + (byte) 0x99, (byte) 0xf8, (byte) 0x61, (byte) 0x46, (byte) 0x07, (byte) 0xad, + (byte) 0x6b, (byte) 0x14, (byte) 0x0e, (byte) 0x25, (byte) 0x4d, (byte) 0x8a, + (byte) 0x1b, (byte) 0xfc, (byte) 0x8f, (byte) 0xb6, (byte) 0xbf, (byte) 0x3a, + (byte) 0x5d, (byte) 0x6a, (byte) 0x70, (byte) 0x86, (byte) 0x36, (byte) 0xc9, + (byte) 0xb1, (byte) 0xfb, (byte) 0xb5, (byte) 0xb7, (byte) 0xb3, (byte) 0x79, + (byte) 0xf2, (byte) 0xe6, (byte) 0x6a, (byte) 0x0a, (byte) 0x80, (byte) 0xe2, + (byte) 0xf5, (byte) 0xc4, (byte) 0x51, (byte) 0x76, (byte) 0x57, (byte) 0xa1, + (byte) 0x4c, (byte) 0x8b, (byte) 0xe1, (byte) 0x93, (byte) 0x42, (byte) 0x0d, + (byte) 0x67, (byte) 0x1d, (byte) 0xc3, (byte) 0xa2, (byte) 0xeb + }; + public static final PrivateKey CLIENT_SUITE_B_ECC_KEY = + loadPrivateKey("EC", CLIENT_SUITE_B_ECC_KEY_DATA); + private static X509Certificate loadCertificate(String blob) { try { final CertificateFactory certFactory = CertificateFactory.getInstance("X.509"); @@ -255,9 +662,9 @@ public class FakeKeys { } } - private static PrivateKey loadPrivateRSAKey(byte[] fakeKey) { + private static PrivateKey loadPrivateKey(String algorithm, byte[] fakeKey) { try { - KeyFactory kf = KeyFactory.getInstance("RSA"); + KeyFactory kf = KeyFactory.getInstance(algorithm); return kf.generatePrivate(new PKCS8EncodedKeySpec(fakeKey)); } catch (InvalidKeySpecException | NoSuchAlgorithmException e) { return null; diff --git a/wifi/tests/src/android/net/wifi/WifiConfigurationTest.java b/wifi/tests/src/android/net/wifi/WifiConfigurationTest.java index a7b6765e886a..62220a6237b1 100644 --- a/wifi/tests/src/android/net/wifi/WifiConfigurationTest.java +++ b/wifi/tests/src/android/net/wifi/WifiConfigurationTest.java @@ -22,6 +22,7 @@ import static android.net.wifi.WifiConfiguration.SECURITY_TYPE_OPEN; import static android.net.wifi.WifiConfiguration.SECURITY_TYPE_OWE; import static android.net.wifi.WifiConfiguration.SECURITY_TYPE_PSK; import static android.net.wifi.WifiConfiguration.SECURITY_TYPE_SAE; +import static android.net.wifi.WifiConfiguration.SECURITY_TYPE_WAPI_CERT; import static android.net.wifi.WifiConfiguration.SECURITY_TYPE_WAPI_PSK; import static org.junit.Assert.assertArrayEquals; @@ -537,4 +538,52 @@ public class WifiConfigurationTest { configuration.setSecurityParams(SECURITY_TYPE_EAP_SUITE_B); assertFalse(configuration.needsPreSharedKey()); } + + @Test + public void testGetAuthType() throws Exception { + WifiConfiguration configuration = new WifiConfiguration(); + + configuration.setSecurityParams(SECURITY_TYPE_PSK); + assertEquals(KeyMgmt.WPA_PSK, configuration.getAuthType()); + + configuration.setSecurityParams(SECURITY_TYPE_SAE); + assertEquals(KeyMgmt.SAE, configuration.getAuthType()); + + configuration.setSecurityParams(SECURITY_TYPE_WAPI_PSK); + assertEquals(KeyMgmt.WAPI_PSK, configuration.getAuthType()); + + configuration.setSecurityParams(SECURITY_TYPE_OPEN); + assertEquals(KeyMgmt.NONE, configuration.getAuthType()); + + configuration.setSecurityParams(SECURITY_TYPE_OWE); + assertEquals(KeyMgmt.OWE, configuration.getAuthType()); + + configuration.setSecurityParams(SECURITY_TYPE_EAP); + assertEquals(KeyMgmt.WPA_EAP, configuration.getAuthType()); + + configuration.setSecurityParams(SECURITY_TYPE_EAP_SUITE_B); + assertEquals(KeyMgmt.SUITE_B_192, configuration.getAuthType()); + + configuration.setSecurityParams(SECURITY_TYPE_WAPI_CERT); + assertEquals(KeyMgmt.WAPI_CERT, configuration.getAuthType()); + } + + @Test (expected = IllegalStateException.class) + public void testGetAuthTypeFailure1() throws Exception { + WifiConfiguration configuration = new WifiConfiguration(); + + configuration.setSecurityParams(SECURITY_TYPE_PSK); + configuration.allowedKeyManagement.set(KeyMgmt.IEEE8021X); + configuration.getAuthType(); + } + + @Test (expected = IllegalStateException.class) + public void testGetAuthTypeFailure2() throws Exception { + WifiConfiguration configuration = new WifiConfiguration(); + + configuration.allowedKeyManagement.set(KeyMgmt.IEEE8021X); + configuration.allowedKeyManagement.set(KeyMgmt.WPA_EAP); + configuration.allowedKeyManagement.set(KeyMgmt.SAE); + configuration.getAuthType(); + } } diff --git a/wifi/tests/src/android/net/wifi/WifiNetworkSpecifierTest.java b/wifi/tests/src/android/net/wifi/WifiNetworkSpecifierTest.java index fc0ef469ad80..6f47f3da710f 100644 --- a/wifi/tests/src/android/net/wifi/WifiNetworkSpecifierTest.java +++ b/wifi/tests/src/android/net/wifi/WifiNetworkSpecifierTest.java @@ -22,6 +22,8 @@ import static android.os.PatternMatcher.PATTERN_SIMPLE_GLOB; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; import android.net.MacAddress; @@ -35,6 +37,8 @@ import androidx.test.filters.SmallTest; import org.junit.Test; +import java.security.cert.X509Certificate; + /** * Unit tests for {@link android.net.wifi.WifiNetworkSpecifier}. */ @@ -45,6 +49,7 @@ public class WifiNetworkSpecifierTest { private static final String TEST_BSSID_OUI_MASK = "ff:ff:ff:00:00:00"; private static final String TEST_BSSID = "12:12:12:12:12:12"; private static final String TEST_PRESHARED_KEY = "\"Test123\""; + private static final String TEST_DOMAIN_SUFFIX_MATCH = "domainSuffixMatch"; /** * Validate correctness of WifiNetworkSpecifier object created by @@ -135,6 +140,106 @@ public class WifiNetworkSpecifierTest { wifiNetworkSpecifier.wifiConfiguration.enterpriseConfig.getPhase2Method()); } + /** + * Validate correctness of WifiNetworkSuggestion object created by + * {@link WifiNetworkSuggestion.Builder#build()} for WPA3-Enterprise network. + */ + @Test + public void testWifiNetworkSuggestionBuilderForWpa3EapNetwork() { + WifiEnterpriseConfig enterpriseConfig = new WifiEnterpriseConfig(); + enterpriseConfig.setEapMethod(WifiEnterpriseConfig.Eap.TLS); + enterpriseConfig.setCaCertificate(FakeKeys.CA_CERT0); + enterpriseConfig.setDomainSuffixMatch(TEST_DOMAIN_SUFFIX_MATCH); + + NetworkSpecifier specifier = new WifiNetworkSpecifier.Builder() + .setSsid(TEST_SSID) + .setWpa3EnterpriseConfig(enterpriseConfig) + .build(); + + assertTrue(specifier instanceof WifiNetworkSpecifier); + WifiNetworkSpecifier wifiNetworkSpecifier = (WifiNetworkSpecifier) specifier; + + assertEquals("\"" + TEST_SSID + "\"", wifiNetworkSpecifier.wifiConfiguration.SSID); + assertTrue(wifiNetworkSpecifier.wifiConfiguration.allowedKeyManagement + .get(WifiConfiguration.KeyMgmt.IEEE8021X)); + assertTrue(wifiNetworkSpecifier.wifiConfiguration.allowedKeyManagement + .get(WifiConfiguration.KeyMgmt.WPA_EAP)); + assertFalse(wifiNetworkSpecifier.wifiConfiguration.allowedKeyManagement + .get(WifiConfiguration.KeyMgmt.SUITE_B_192)); + assertTrue(wifiNetworkSpecifier.wifiConfiguration.allowedGroupCiphers + .get(WifiConfiguration.GroupCipher.CCMP)); + assertTrue(wifiNetworkSpecifier.wifiConfiguration.requirePmf); + assertNull(wifiNetworkSpecifier.wifiConfiguration.preSharedKey); + assertNotNull(wifiNetworkSpecifier.wifiConfiguration.enterpriseConfig); + } + + /** + * Validate correctness of WifiNetworkSuggestion object created by + * {@link WifiNetworkSuggestion.Builder#build()} for WPA3-Enterprise 192-bit RSA SuiteB network. + */ + @Test + public void testWifiNetworkSuggestionBuilderForWpa3SuiteBRsaEapNetwork() { + WifiEnterpriseConfig enterpriseConfig = new WifiEnterpriseConfig(); + enterpriseConfig.setEapMethod(WifiEnterpriseConfig.Eap.TLS); + enterpriseConfig.setCaCertificate(FakeKeys.CA_SUITE_B_RSA3072_CERT); + enterpriseConfig.setClientKeyEntryWithCertificateChain(FakeKeys.CLIENT_SUITE_B_RSA3072_KEY, + new X509Certificate[] {FakeKeys.CLIENT_SUITE_B_RSA3072_CERT}); + + enterpriseConfig.setDomainSuffixMatch(TEST_DOMAIN_SUFFIX_MATCH); + + NetworkSpecifier specifier = new WifiNetworkSpecifier.Builder() + .setSsid(TEST_SSID) + .setWpa3EnterpriseConfig(enterpriseConfig) + .build(); + + assertTrue(specifier instanceof WifiNetworkSpecifier); + WifiNetworkSpecifier wifiNetworkSpecifier = (WifiNetworkSpecifier) specifier; + + assertEquals("\"" + TEST_SSID + "\"", wifiNetworkSpecifier.wifiConfiguration.SSID); + assertTrue(wifiNetworkSpecifier.wifiConfiguration.allowedKeyManagement + .get(WifiConfiguration.KeyMgmt.SUITE_B_192)); + assertTrue(wifiNetworkSpecifier.wifiConfiguration.allowedGroupCiphers + .get(WifiConfiguration.GroupCipher.GCMP_256)); + assertTrue(wifiNetworkSpecifier.wifiConfiguration.allowedGroupManagementCiphers + .get(WifiConfiguration.GroupMgmtCipher.BIP_GMAC_256)); + assertTrue(wifiNetworkSpecifier.wifiConfiguration.requirePmf); + assertNull(wifiNetworkSpecifier.wifiConfiguration.preSharedKey); + assertNotNull(wifiNetworkSpecifier.wifiConfiguration.enterpriseConfig); + } + + /** + * Validate correctness of WifiNetworkSuggestion object created by + * {@link WifiNetworkSuggestion.Builder#build()} for WPA3-Enterprise 192-bit ECC SuiteB network. + */ + @Test + public void testWifiNetworkSuggestionBuilderForWpa3SuiteBEccEapNetwork() { + WifiEnterpriseConfig enterpriseConfig = new WifiEnterpriseConfig(); + enterpriseConfig.setEapMethod(WifiEnterpriseConfig.Eap.TLS); + enterpriseConfig.setCaCertificate(FakeKeys.CA_SUITE_B_ECDSA_CERT); + enterpriseConfig.setClientKeyEntryWithCertificateChain(FakeKeys.CLIENT_SUITE_B_ECC_KEY, + new X509Certificate[] {FakeKeys.CLIENT_SUITE_B_ECDSA_CERT}); + + enterpriseConfig.setDomainSuffixMatch(TEST_DOMAIN_SUFFIX_MATCH); + + NetworkSpecifier specifier = new WifiNetworkSpecifier.Builder() + .setSsid(TEST_SSID) + .setWpa3EnterpriseConfig(enterpriseConfig) + .build(); + + assertTrue(specifier instanceof WifiNetworkSpecifier); + WifiNetworkSpecifier wifiNetworkSpecifier = (WifiNetworkSpecifier) specifier; + + assertEquals("\"" + TEST_SSID + "\"", wifiNetworkSpecifier.wifiConfiguration.SSID); + assertTrue(wifiNetworkSpecifier.wifiConfiguration.allowedKeyManagement + .get(WifiConfiguration.KeyMgmt.SUITE_B_192)); + assertTrue(wifiNetworkSpecifier.wifiConfiguration.allowedGroupCiphers + .get(WifiConfiguration.GroupCipher.GCMP_256)); + assertTrue(wifiNetworkSpecifier.wifiConfiguration.allowedGroupManagementCiphers + .get(WifiConfiguration.GroupMgmtCipher.BIP_GMAC_256)); + assertTrue(wifiNetworkSpecifier.wifiConfiguration.requirePmf); + assertNull(wifiNetworkSpecifier.wifiConfiguration.preSharedKey); + assertNotNull(wifiNetworkSpecifier.wifiConfiguration.enterpriseConfig); + } /** * Ensure {@link WifiNetworkSpecifier.Builder#setSsid(String)} throws an exception diff --git a/wifi/tests/src/android/net/wifi/WifiNetworkSuggestionTest.java b/wifi/tests/src/android/net/wifi/WifiNetworkSuggestionTest.java index 7d5a45216fc4..abb9ce676262 100644 --- a/wifi/tests/src/android/net/wifi/WifiNetworkSuggestionTest.java +++ b/wifi/tests/src/android/net/wifi/WifiNetworkSuggestionTest.java @@ -32,6 +32,8 @@ import androidx.test.filters.SmallTest; import org.junit.Test; +import java.security.cert.X509Certificate; + /** * Unit tests for {@link android.net.wifi.WifiNetworkSuggestion}. */ @@ -212,16 +214,14 @@ public class WifiNetworkSuggestionTest { assertNull(suggestion.getEnterpriseConfig()); } - /** * Validate correctness of WifiNetworkSuggestion object created by - * {@link WifiNetworkSuggestion.Builder#build()} for SuiteB network. + * {@link WifiNetworkSuggestion.Builder#build()} for WPA3-Enterprise network. */ @Test public void testWifiNetworkSuggestionBuilderForWpa3EapNetwork() { WifiEnterpriseConfig enterpriseConfig = new WifiEnterpriseConfig(); enterpriseConfig.setEapMethod(WifiEnterpriseConfig.Eap.TLS); - enterpriseConfig.setPhase2Method(WifiEnterpriseConfig.Phase2.GTC); enterpriseConfig.setCaCertificate(FakeKeys.CA_CERT0); enterpriseConfig.setDomainSuffixMatch(TEST_DOMAIN_SUFFIX_MATCH); @@ -232,6 +232,78 @@ public class WifiNetworkSuggestionTest { assertEquals("\"" + TEST_SSID + "\"", suggestion.wifiConfiguration.SSID); assertTrue(suggestion.wifiConfiguration.allowedKeyManagement + .get(WifiConfiguration.KeyMgmt.IEEE8021X)); + assertTrue(suggestion.wifiConfiguration.allowedKeyManagement + .get(WifiConfiguration.KeyMgmt.WPA_EAP)); + assertFalse(suggestion.wifiConfiguration.allowedKeyManagement + .get(WifiConfiguration.KeyMgmt.SUITE_B_192)); + assertTrue(suggestion.wifiConfiguration.allowedGroupCiphers + .get(WifiConfiguration.GroupCipher.CCMP)); + assertTrue(suggestion.wifiConfiguration.requirePmf); + assertNull(suggestion.wifiConfiguration.preSharedKey); + // allowedSuiteBCiphers are set according to the loaded certificate and cannot be tested + // here. + assertTrue(suggestion.isUserAllowedToManuallyConnect); + assertTrue(suggestion.isInitialAutoJoinEnabled); + assertNotNull(suggestion.getEnterpriseConfig()); + } + + /** + * Validate correctness of WifiNetworkSuggestion object created by + * {@link WifiNetworkSuggestion.Builder#build()} for WPA3-Enterprise 192-bit RSA SuiteB network. + */ + @Test + public void testWifiNetworkSuggestionBuilderForWpa3SuiteBRsaEapNetwork() { + WifiEnterpriseConfig enterpriseConfig = new WifiEnterpriseConfig(); + enterpriseConfig.setEapMethod(WifiEnterpriseConfig.Eap.TLS); + enterpriseConfig.setCaCertificate(FakeKeys.CA_SUITE_B_RSA3072_CERT); + enterpriseConfig.setClientKeyEntryWithCertificateChain(FakeKeys.CLIENT_SUITE_B_RSA3072_KEY, + new X509Certificate[] {FakeKeys.CLIENT_SUITE_B_RSA3072_CERT}); + + enterpriseConfig.setDomainSuffixMatch(TEST_DOMAIN_SUFFIX_MATCH); + + WifiNetworkSuggestion suggestion = new WifiNetworkSuggestion.Builder() + .setSsid(TEST_SSID) + .setWpa3EnterpriseConfig(enterpriseConfig) + .build(); + + assertEquals("\"" + TEST_SSID + "\"", suggestion.wifiConfiguration.SSID); + assertTrue(suggestion.wifiConfiguration.allowedKeyManagement + .get(WifiConfiguration.KeyMgmt.SUITE_B_192)); + assertTrue(suggestion.wifiConfiguration.allowedGroupCiphers + .get(WifiConfiguration.GroupCipher.GCMP_256)); + assertTrue(suggestion.wifiConfiguration.allowedGroupManagementCiphers + .get(WifiConfiguration.GroupMgmtCipher.BIP_GMAC_256)); + assertTrue(suggestion.wifiConfiguration.requirePmf); + assertNull(suggestion.wifiConfiguration.preSharedKey); + // allowedSuiteBCiphers are set according to the loaded certificate and cannot be tested + // here. + assertTrue(suggestion.isUserAllowedToManuallyConnect); + assertTrue(suggestion.isInitialAutoJoinEnabled); + assertNotNull(suggestion.getEnterpriseConfig()); + } + + /** + * Validate correctness of WifiNetworkSuggestion object created by + * {@link WifiNetworkSuggestion.Builder#build()} for WPA3-Enterprise 192-bit ECC SuiteB network. + */ + @Test + public void testWifiNetworkSuggestionBuilderForWpa3SuiteBEccEapNetwork() { + WifiEnterpriseConfig enterpriseConfig = new WifiEnterpriseConfig(); + enterpriseConfig.setEapMethod(WifiEnterpriseConfig.Eap.TLS); + enterpriseConfig.setCaCertificate(FakeKeys.CA_SUITE_B_ECDSA_CERT); + enterpriseConfig.setClientKeyEntryWithCertificateChain(FakeKeys.CLIENT_SUITE_B_ECC_KEY, + new X509Certificate[] {FakeKeys.CLIENT_SUITE_B_ECDSA_CERT}); + + enterpriseConfig.setDomainSuffixMatch(TEST_DOMAIN_SUFFIX_MATCH); + + WifiNetworkSuggestion suggestion = new WifiNetworkSuggestion.Builder() + .setSsid(TEST_SSID) + .setWpa3EnterpriseConfig(enterpriseConfig) + .build(); + + assertEquals("\"" + TEST_SSID + "\"", suggestion.wifiConfiguration.SSID); + assertTrue(suggestion.wifiConfiguration.allowedKeyManagement .get(WifiConfiguration.KeyMgmt.SUITE_B_192)); assertTrue(suggestion.wifiConfiguration.allowedGroupCiphers .get(WifiConfiguration.GroupCipher.GCMP_256)); diff --git a/wifi/tests/src/android/net/wifi/aware/WifiAwareManagerTest.java b/wifi/tests/src/android/net/wifi/aware/WifiAwareManagerTest.java index 43d728bf593e..3e5ee14be898 100644 --- a/wifi/tests/src/android/net/wifi/aware/WifiAwareManagerTest.java +++ b/wifi/tests/src/android/net/wifi/aware/WifiAwareManagerTest.java @@ -360,12 +360,18 @@ public class WifiAwareManagerTest { eq(publishConfig)); inOrder.verify(mockSessionCallback).onSessionConfigFailed(); - // (5) terminate + // (5) discovery session is no longer visible + sessionProxyCallback.getValue().onMatchExpired(peerHandle.peerId); + mMockLooper.dispatchAll(); + inOrder.verify(mockSessionCallback).onServiceLost(peerIdCaptor.capture()); + assertEquals(peerHandle.peerId, peerIdCaptor.getValue().peerId); + + // (6) terminate publishSession.getValue().close(); mMockLooper.dispatchAll(); inOrder.verify(mockAwareService).terminateSession(clientId, sessionId); - // (6) try an update (nothing) + // (7) try an update (nothing) publishSession.getValue().updatePublish(publishConfig); mMockLooper.dispatchAll(); @@ -502,12 +508,18 @@ public class WifiAwareManagerTest { eq(subscribeConfig)); inOrder.verify(mockSessionCallback).onSessionConfigFailed(); - // (5) terminate + // (5) discovery session is no longer visible + sessionProxyCallback.getValue().onMatchExpired(peerHandle.peerId); + mMockLooper.dispatchAll(); + inOrder.verify(mockSessionCallback).onServiceLost(peerIdCaptor.capture()); + assertEquals(peerHandle.peerId, peerIdCaptor.getValue().peerId); + + // (6) terminate subscribeSession.getValue().close(); mMockLooper.dispatchAll(); inOrder.verify(mockAwareService).terminateSession(clientId, sessionId); - // (6) try an update (nothing) + // (7) try an update (nothing) subscribeSession.getValue().updateSubscribe(subscribeConfig); mMockLooper.dispatchAll(); |