Merge "Check the count of the families in a default collection."
diff --git a/api/current.txt b/api/current.txt
index d11dd84..aad28af 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -584,6 +584,7 @@
field public static final int flipInterval = 16843129; // 0x1010179
field public static final int focusable = 16842970; // 0x10100da
field public static final int focusableInTouchMode = 16842971; // 0x10100db
+ field public static final int focusedByDefault = 16844101; // 0x1010545
field public static final deprecated int focusedMonthDateColor = 16843587; // 0x1010343
field public static final int font = 16844082; // 0x1010532
field public static final int fontFamily = 16843692; // 0x10103ac
@@ -2783,6 +2784,7 @@
field public static final int FEEDBACK_HAPTIC = 2; // 0x2
field public static final int FEEDBACK_SPOKEN = 1; // 0x1
field public static final int FEEDBACK_VISUAL = 8; // 0x8
+ field public static final int FLAG_ENABLE_ACCESSIBILITY_VOLUME = 128; // 0x80
field public static final int FLAG_INCLUDE_NOT_IMPORTANT_VIEWS = 2; // 0x2
field public static final int FLAG_REPORT_VIEW_IDS = 16; // 0x10
field public static final int FLAG_REQUEST_ENHANCED_WEB_ACCESSIBILITY = 8; // 0x8
@@ -8456,6 +8458,7 @@
field public static final java.lang.String USER_SERVICE = "user";
field public static final java.lang.String VIBRATOR_SERVICE = "vibrator";
field public static final java.lang.String WALLPAPER_SERVICE = "wallpaper";
+ field public static final java.lang.String WIFI_AWARE_SERVICE = "wifiaware";
field public static final java.lang.String WIFI_P2P_SERVICE = "wifip2p";
field public static final java.lang.String WIFI_SERVICE = "wifi";
field public static final java.lang.String WINDOW_SERVICE = "window";
@@ -9754,6 +9757,7 @@
public class LauncherApps {
method public java.util.List<android.content.pm.LauncherActivityInfo> getActivityList(java.lang.String, android.os.UserHandle);
+ method public android.content.pm.ApplicationInfo getApplicationInfo(java.lang.String, int, android.os.UserHandle);
method public android.content.pm.LauncherApps.PinItemRequest getPinItemRequest(android.content.Intent);
method public android.graphics.drawable.Drawable getShortcutBadgedIconDrawable(android.content.pm.ShortcutInfo, int);
method public android.graphics.drawable.Drawable getShortcutIconDrawable(android.content.pm.ShortcutInfo, int);
@@ -9800,9 +9804,6 @@
field public static final int REQUEST_TYPE_SHORTCUT = 1; // 0x1
}
- public static abstract class LauncherApps.PinItemRequest.RequestType implements java.lang.annotation.Annotation {
- }
-
public static class LauncherApps.ShortcutQuery {
ctor public LauncherApps.ShortcutQuery();
method public android.content.pm.LauncherApps.ShortcutQuery setActivity(android.content.ComponentName);
@@ -10138,6 +10139,7 @@
field public static final java.lang.String FEATURE_WATCH = "android.hardware.type.watch";
field public static final java.lang.String FEATURE_WEBVIEW = "android.software.webview";
field public static final java.lang.String FEATURE_WIFI = "android.hardware.wifi";
+ field public static final java.lang.String FEATURE_WIFI_AWARE = "android.hardware.wifi.aware";
field public static final java.lang.String FEATURE_WIFI_DIRECT = "android.hardware.wifi.direct";
field public static final int GET_ACTIVITIES = 1; // 0x1
field public static final int GET_CONFIGURATIONS = 16384; // 0x4000
@@ -24217,6 +24219,7 @@
field public static final int TRANSPORT_ETHERNET = 3; // 0x3
field public static final int TRANSPORT_VPN = 4; // 0x4
field public static final int TRANSPORT_WIFI = 1; // 0x1
+ field public static final int TRANSPORT_WIFI_AWARE = 5; // 0x5
}
public class NetworkInfo implements android.os.Parcelable {
@@ -25210,6 +25213,122 @@
}
+package android.net.wifi.aware {
+
+ public class AttachCallback {
+ ctor public AttachCallback();
+ method public void onAttachFailed();
+ method public void onAttached(android.net.wifi.aware.WifiAwareSession);
+ }
+
+ public final class Characteristics implements android.os.Parcelable {
+ method public int describeContents();
+ method public int getMaxMatchFilterLength();
+ method public int getMaxServiceNameLength();
+ method public int getMaxServiceSpecificInfoLength();
+ method public void writeToParcel(android.os.Parcel, int);
+ field public static final android.os.Parcelable.Creator<android.net.wifi.aware.Characteristics> CREATOR;
+ }
+
+ public class DiscoverySession {
+ method public java.lang.String createNetworkSpecifier(android.net.wifi.aware.PeerHandle, byte[]);
+ method public void destroy();
+ method public static int getMaxSendRetryCount();
+ method public void sendMessage(android.net.wifi.aware.PeerHandle, int, byte[], int);
+ method public void sendMessage(android.net.wifi.aware.PeerHandle, int, byte[]);
+ }
+
+ public class DiscoverySessionCallback {
+ ctor public DiscoverySessionCallback();
+ method public void onMessageReceived(android.net.wifi.aware.PeerHandle, byte[]);
+ method public void onMessageSendFailed(int);
+ method public void onMessageSendSucceeded(int);
+ method public void onPublishStarted(android.net.wifi.aware.PublishDiscoverySession);
+ method public void onServiceDiscovered(android.net.wifi.aware.PeerHandle, byte[], java.util.List<byte[]>);
+ method public void onSessionConfigFailed();
+ method public void onSessionConfigUpdated();
+ method public void onSessionTerminated();
+ method public void onSubscribeStarted(android.net.wifi.aware.SubscribeDiscoverySession);
+ }
+
+ public class IdentityChangedListener {
+ ctor public IdentityChangedListener();
+ method public void onIdentityChanged(byte[]);
+ }
+
+ public class PeerHandle {
+ }
+
+ public final class PublishConfig implements android.os.Parcelable {
+ method public int describeContents();
+ method public void writeToParcel(android.os.Parcel, int);
+ field public static final android.os.Parcelable.Creator<android.net.wifi.aware.PublishConfig> CREATOR;
+ field public static final int PUBLISH_TYPE_SOLICITED = 1; // 0x1
+ field public static final int PUBLISH_TYPE_UNSOLICITED = 0; // 0x0
+ }
+
+ public static final class PublishConfig.Builder {
+ ctor public PublishConfig.Builder();
+ method public android.net.wifi.aware.PublishConfig build();
+ method public android.net.wifi.aware.PublishConfig.Builder setMatchFilter(java.util.List<byte[]>);
+ method public android.net.wifi.aware.PublishConfig.Builder setPublishCount(int);
+ method public android.net.wifi.aware.PublishConfig.Builder setPublishType(int);
+ method public android.net.wifi.aware.PublishConfig.Builder setServiceName(java.lang.String);
+ method public android.net.wifi.aware.PublishConfig.Builder setServiceSpecificInfo(byte[]);
+ method public android.net.wifi.aware.PublishConfig.Builder setTerminateNotificationEnabled(boolean);
+ method public android.net.wifi.aware.PublishConfig.Builder setTtlSec(int);
+ }
+
+ public class PublishDiscoverySession extends android.net.wifi.aware.DiscoverySession {
+ method public void updatePublish(android.net.wifi.aware.PublishConfig);
+ }
+
+ public final class SubscribeConfig implements android.os.Parcelable {
+ method public int describeContents();
+ method public void writeToParcel(android.os.Parcel, int);
+ field public static final android.os.Parcelable.Creator<android.net.wifi.aware.SubscribeConfig> CREATOR;
+ field public static final int MATCH_STYLE_ALL = 1; // 0x1
+ field public static final int MATCH_STYLE_FIRST_ONLY = 0; // 0x0
+ field public static final int SUBSCRIBE_TYPE_ACTIVE = 1; // 0x1
+ field public static final int SUBSCRIBE_TYPE_PASSIVE = 0; // 0x0
+ }
+
+ public static final class SubscribeConfig.Builder {
+ ctor public SubscribeConfig.Builder();
+ method public android.net.wifi.aware.SubscribeConfig build();
+ method public android.net.wifi.aware.SubscribeConfig.Builder setMatchFilter(java.util.List<byte[]>);
+ method public android.net.wifi.aware.SubscribeConfig.Builder setMatchStyle(int);
+ method public android.net.wifi.aware.SubscribeConfig.Builder setServiceName(java.lang.String);
+ method public android.net.wifi.aware.SubscribeConfig.Builder setServiceSpecificInfo(byte[]);
+ method public android.net.wifi.aware.SubscribeConfig.Builder setSubscribeCount(int);
+ method public android.net.wifi.aware.SubscribeConfig.Builder setSubscribeType(int);
+ method public android.net.wifi.aware.SubscribeConfig.Builder setTerminateNotificationEnabled(boolean);
+ method public android.net.wifi.aware.SubscribeConfig.Builder setTtlSec(int);
+ }
+
+ public class SubscribeDiscoverySession extends android.net.wifi.aware.DiscoverySession {
+ method public void updateSubscribe(android.net.wifi.aware.SubscribeConfig);
+ }
+
+ public class WifiAwareManager {
+ method public void attach(android.net.wifi.aware.AttachCallback, android.os.Handler);
+ method public void attach(android.net.wifi.aware.AttachCallback, android.net.wifi.aware.IdentityChangedListener, android.os.Handler);
+ method public android.net.wifi.aware.Characteristics getCharacteristics();
+ method public boolean isAvailable();
+ field public static final java.lang.String ACTION_WIFI_AWARE_STATE_CHANGED = "android.net.wifi.aware.action.WIFI_AWARE_STATE_CHANGED";
+ field public static final int WIFI_AWARE_DATA_PATH_ROLE_INITIATOR = 0; // 0x0
+ field public static final int WIFI_AWARE_DATA_PATH_ROLE_RESPONDER = 1; // 0x1
+ }
+
+ public class WifiAwareSession {
+ method public java.lang.String createNetworkSpecifier(int, byte[], byte[]);
+ method public void destroy();
+ method public void publish(android.net.wifi.aware.PublishConfig, android.net.wifi.aware.DiscoverySessionCallback, android.os.Handler);
+ method public void subscribe(android.net.wifi.aware.SubscribeConfig, android.net.wifi.aware.DiscoverySessionCallback, android.os.Handler);
+ }
+
+}
+
package android.net.wifi.p2p {
public class WifiP2pConfig implements android.os.Parcelable {
@@ -39452,6 +39571,7 @@
method public android.text.StaticLayout.Builder setHyphenationFrequency(int);
method public android.text.StaticLayout.Builder setIncludePad(boolean);
method public android.text.StaticLayout.Builder setIndents(int[], int[]);
+ method public android.text.StaticLayout.Builder setJustify(boolean);
method public android.text.StaticLayout.Builder setLineSpacing(float, float);
method public android.text.StaticLayout.Builder setMaxLines(int);
method public android.text.StaticLayout.Builder setText(java.lang.CharSequence);
@@ -43393,6 +43513,7 @@
method public final boolean isFocusable();
method public final boolean isFocusableInTouchMode();
method public boolean isFocused();
+ method public final boolean isFocusedByDefault();
method public boolean isHapticFeedbackEnabled();
method public boolean isHardwareAccelerated();
method public boolean isHorizontalFadingEdgeEnabled();
@@ -43523,8 +43644,8 @@
method public final void requestUnbufferedDispatch(android.view.MotionEvent);
method public static int resolveSize(int, int);
method public static int resolveSizeAndState(int, int, int);
+ method public boolean restoreDefaultFocus(int);
method public void restoreHierarchyState(android.util.SparseArray<android.os.Parcelable>);
- method public boolean restoreLastFocus();
method public void saveHierarchyState(android.util.SparseArray<android.os.Parcelable>);
method public void scheduleDrawable(android.graphics.drawable.Drawable, java.lang.Runnable, long);
method public void scrollBy(int, int);
@@ -43562,6 +43683,7 @@
method public void setFitsSystemWindows(boolean);
method public void setFocusable(boolean);
method public void setFocusableInTouchMode(boolean);
+ method public void setFocusedByDefault(boolean);
method public void setForeground(android.graphics.drawable.Drawable);
method public void setForegroundGravity(int);
method public void setForegroundTintList(android.content.res.ColorStateList);
@@ -44887,6 +45009,7 @@
}
public final class AccessibilityManager {
+ method public boolean addAccessibilityServicesStateChangeListener(android.view.accessibility.AccessibilityManager.AccessibilityServicesStateChangeListener);
method public boolean addAccessibilityStateChangeListener(android.view.accessibility.AccessibilityManager.AccessibilityStateChangeListener);
method public boolean addTouchExplorationStateChangeListener(android.view.accessibility.AccessibilityManager.TouchExplorationStateChangeListener);
method public deprecated java.util.List<android.content.pm.ServiceInfo> getAccessibilityServiceList();
@@ -44895,11 +45018,16 @@
method public void interrupt();
method public boolean isEnabled();
method public boolean isTouchExplorationEnabled();
+ method public boolean removeAccessibilityServicesStateChangeListener(android.view.accessibility.AccessibilityManager.AccessibilityServicesStateChangeListener);
method public boolean removeAccessibilityStateChangeListener(android.view.accessibility.AccessibilityManager.AccessibilityStateChangeListener);
method public boolean removeTouchExplorationStateChangeListener(android.view.accessibility.AccessibilityManager.TouchExplorationStateChangeListener);
method public void sendAccessibilityEvent(android.view.accessibility.AccessibilityEvent);
}
+ public static abstract interface AccessibilityManager.AccessibilityServicesStateChangeListener {
+ method public abstract void onAccessibilityServicesStateChanged();
+ }
+
public static abstract interface AccessibilityManager.AccessibilityStateChangeListener {
method public abstract void onAccessibilityStateChanged(boolean);
}
@@ -49061,6 +49189,7 @@
method public boolean getIncludeFontPadding();
method public android.os.Bundle getInputExtras(boolean);
method public int getInputType();
+ method public boolean getJustify();
method public final android.text.method.KeyListener getKeyListener();
method public final android.text.Layout getLayout();
method public float getLetterSpacing();
@@ -49169,6 +49298,7 @@
method public void setIncludeFontPadding(boolean);
method public void setInputExtras(int) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException;
method public void setInputType(int);
+ method public void setJustify(boolean);
method public void setKeyListener(android.text.method.KeyListener);
method public void setLetterSpacing(float);
method public void setLineSpacing(float, float);
diff --git a/api/system-current.txt b/api/system-current.txt
index 3d7c60a..7bd7012 100644
--- a/api/system-current.txt
+++ b/api/system-current.txt
@@ -693,6 +693,7 @@
field public static final int flipInterval = 16843129; // 0x1010179
field public static final int focusable = 16842970; // 0x10100da
field public static final int focusableInTouchMode = 16842971; // 0x10100db
+ field public static final int focusedByDefault = 16844101; // 0x1010545
field public static final deprecated int focusedMonthDateColor = 16843587; // 0x1010343
field public static final int font = 16844082; // 0x1010532
field public static final int fontFamily = 16843692; // 0x10103ac
@@ -2899,6 +2900,7 @@
field public static final int FEEDBACK_HAPTIC = 2; // 0x2
field public static final int FEEDBACK_SPOKEN = 1; // 0x1
field public static final int FEEDBACK_VISUAL = 8; // 0x8
+ field public static final int FLAG_ENABLE_ACCESSIBILITY_VOLUME = 128; // 0x80
field public static final int FLAG_INCLUDE_NOT_IMPORTANT_VIEWS = 2; // 0x2
field public static final int FLAG_REPORT_VIEW_IDS = 16; // 0x10
field public static final int FLAG_REQUEST_ENHANCED_WEB_ACCESSIBILITY = 8; // 0x8
@@ -3859,6 +3861,7 @@
method public boolean clearApplicationUserData();
method public void clearWatchHeapLimit();
method public void dumpPackageState(java.io.FileDescriptor, java.lang.String);
+ method public void forceStopPackage(java.lang.String);
method public android.util.Size getAppTaskThumbnailSize();
method public java.util.List<android.app.ActivityManager.AppTask> getAppTasks();
method public static int getCurrentUser();
@@ -6258,6 +6261,7 @@
method public deprecated java.lang.String getDeviceInitializerApp();
method public deprecated android.content.ComponentName getDeviceInitializerComponent();
method public java.lang.String getDeviceOwner();
+ method public android.content.ComponentName getDeviceOwnerComponentOnAnyUser();
method public java.lang.CharSequence getDeviceOwnerLockScreenInfo();
method public java.lang.String getDeviceOwnerNameOnAnyUser();
method public java.lang.CharSequence getDeviceOwnerOrganizationName();
@@ -6423,6 +6427,8 @@
field public static final java.lang.String EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_CHECKSUM = "android.app.extra.PROVISIONING_DEVICE_ADMIN_PACKAGE_CHECKSUM";
field public static final java.lang.String EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_DOWNLOAD_COOKIE_HEADER = "android.app.extra.PROVISIONING_DEVICE_ADMIN_PACKAGE_DOWNLOAD_COOKIE_HEADER";
field public static final java.lang.String EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_DOWNLOAD_LOCATION = "android.app.extra.PROVISIONING_DEVICE_ADMIN_PACKAGE_DOWNLOAD_LOCATION";
+ field public static final java.lang.String EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_ICON_URI = "android.app.extra.PROVISIONING_DEVICE_ADMIN_PACKAGE_ICON_URI";
+ field public static final java.lang.String EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_LABEL = "android.app.extra.PROVISIONING_DEVICE_ADMIN_PACKAGE_LABEL";
field public static final deprecated java.lang.String EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_NAME = "android.app.extra.PROVISIONING_DEVICE_ADMIN_PACKAGE_NAME";
field public static final java.lang.String EXTRA_PROVISIONING_DEVICE_ADMIN_SIGNATURE_CHECKSUM = "android.app.extra.PROVISIONING_DEVICE_ADMIN_SIGNATURE_CHECKSUM";
field public static final java.lang.String EXTRA_PROVISIONING_DISCLAIMERS = "android.app.extra.PROVISIONING_DISCLAIMERS";
@@ -6435,8 +6441,10 @@
field public static final java.lang.String EXTRA_PROVISIONING_LOCAL_TIME = "android.app.extra.PROVISIONING_LOCAL_TIME";
field public static final java.lang.String EXTRA_PROVISIONING_LOGO_URI = "android.app.extra.PROVISIONING_LOGO_URI";
field public static final java.lang.String EXTRA_PROVISIONING_MAIN_COLOR = "android.app.extra.PROVISIONING_MAIN_COLOR";
+ field public static final java.lang.String EXTRA_PROVISIONING_ORGANIZATION_NAME = "android.app.extra.PROVISIONING_ORGANIZATION_NAME";
field public static final java.lang.String EXTRA_PROVISIONING_SKIP_ENCRYPTION = "android.app.extra.PROVISIONING_SKIP_ENCRYPTION";
field public static final java.lang.String EXTRA_PROVISIONING_SKIP_USER_CONSENT = "android.app.extra.PROVISIONING_SKIP_USER_CONSENT";
+ field public static final java.lang.String EXTRA_PROVISIONING_SUPPORT_URL = "android.app.extra.PROVISIONING_SUPPORT_URL";
field public static final java.lang.String EXTRA_PROVISIONING_TIME_ZONE = "android.app.extra.PROVISIONING_TIME_ZONE";
field public static final java.lang.String EXTRA_PROVISIONING_WIFI_HIDDEN = "android.app.extra.PROVISIONING_WIFI_HIDDEN";
field public static final java.lang.String EXTRA_PROVISIONING_WIFI_PAC_URL = "android.app.extra.PROVISIONING_WIFI_PAC_URL";
@@ -8811,6 +8819,7 @@
field public static final java.lang.String USER_SERVICE = "user";
field public static final java.lang.String VIBRATOR_SERVICE = "vibrator";
field public static final java.lang.String WALLPAPER_SERVICE = "wallpaper";
+ field public static final java.lang.String WIFI_AWARE_SERVICE = "wifiaware";
field public static final java.lang.String WIFI_P2P_SERVICE = "wifip2p";
field public static final java.lang.String WIFI_RTT_SERVICE = "rttmanager";
field public static final java.lang.String WIFI_SCANNING_SERVICE = "wifiscanner";
@@ -10165,6 +10174,7 @@
public class LauncherApps {
method public java.util.List<android.content.pm.LauncherActivityInfo> getActivityList(java.lang.String, android.os.UserHandle);
+ method public android.content.pm.ApplicationInfo getApplicationInfo(java.lang.String, int, android.os.UserHandle);
method public android.content.pm.LauncherApps.PinItemRequest getPinItemRequest(android.content.Intent);
method public android.graphics.drawable.Drawable getShortcutBadgedIconDrawable(android.content.pm.ShortcutInfo, int);
method public android.graphics.drawable.Drawable getShortcutIconDrawable(android.content.pm.ShortcutInfo, int);
@@ -10211,9 +10221,6 @@
field public static final int REQUEST_TYPE_SHORTCUT = 1; // 0x1
}
- public static abstract class LauncherApps.PinItemRequest.RequestType implements java.lang.annotation.Annotation {
- }
-
public static class LauncherApps.ShortcutQuery {
ctor public LauncherApps.ShortcutQuery();
method public android.content.pm.LauncherApps.ShortcutQuery setActivity(android.content.ComponentName);
@@ -10566,6 +10573,7 @@
field public static final java.lang.String FEATURE_WATCH = "android.hardware.type.watch";
field public static final java.lang.String FEATURE_WEBVIEW = "android.software.webview";
field public static final java.lang.String FEATURE_WIFI = "android.hardware.wifi";
+ field public static final java.lang.String FEATURE_WIFI_AWARE = "android.hardware.wifi.aware";
field public static final java.lang.String FEATURE_WIFI_DIRECT = "android.hardware.wifi.direct";
field public static final int FLAG_PERMISSION_GRANTED_BY_DEFAULT = 32; // 0x20
field public static final int FLAG_PERMISSION_POLICY_FIXED = 4; // 0x4
@@ -26059,6 +26067,7 @@
field public static final int TRANSPORT_ETHERNET = 3; // 0x3
field public static final int TRANSPORT_VPN = 4; // 0x4
field public static final int TRANSPORT_WIFI = 1; // 0x1
+ field public static final int TRANSPORT_WIFI_AWARE = 5; // 0x5
}
public class NetworkInfo implements android.os.Parcelable {
@@ -27761,6 +27770,122 @@
}
+package android.net.wifi.aware {
+
+ public class AttachCallback {
+ ctor public AttachCallback();
+ method public void onAttachFailed();
+ method public void onAttached(android.net.wifi.aware.WifiAwareSession);
+ }
+
+ public final class Characteristics implements android.os.Parcelable {
+ method public int describeContents();
+ method public int getMaxMatchFilterLength();
+ method public int getMaxServiceNameLength();
+ method public int getMaxServiceSpecificInfoLength();
+ method public void writeToParcel(android.os.Parcel, int);
+ field public static final android.os.Parcelable.Creator<android.net.wifi.aware.Characteristics> CREATOR;
+ }
+
+ public class DiscoverySession {
+ method public java.lang.String createNetworkSpecifier(android.net.wifi.aware.PeerHandle, byte[]);
+ method public void destroy();
+ method public static int getMaxSendRetryCount();
+ method public void sendMessage(android.net.wifi.aware.PeerHandle, int, byte[], int);
+ method public void sendMessage(android.net.wifi.aware.PeerHandle, int, byte[]);
+ }
+
+ public class DiscoverySessionCallback {
+ ctor public DiscoverySessionCallback();
+ method public void onMessageReceived(android.net.wifi.aware.PeerHandle, byte[]);
+ method public void onMessageSendFailed(int);
+ method public void onMessageSendSucceeded(int);
+ method public void onPublishStarted(android.net.wifi.aware.PublishDiscoverySession);
+ method public void onServiceDiscovered(android.net.wifi.aware.PeerHandle, byte[], java.util.List<byte[]>);
+ method public void onSessionConfigFailed();
+ method public void onSessionConfigUpdated();
+ method public void onSessionTerminated();
+ method public void onSubscribeStarted(android.net.wifi.aware.SubscribeDiscoverySession);
+ }
+
+ public class IdentityChangedListener {
+ ctor public IdentityChangedListener();
+ method public void onIdentityChanged(byte[]);
+ }
+
+ public class PeerHandle {
+ }
+
+ public final class PublishConfig implements android.os.Parcelable {
+ method public int describeContents();
+ method public void writeToParcel(android.os.Parcel, int);
+ field public static final android.os.Parcelable.Creator<android.net.wifi.aware.PublishConfig> CREATOR;
+ field public static final int PUBLISH_TYPE_SOLICITED = 1; // 0x1
+ field public static final int PUBLISH_TYPE_UNSOLICITED = 0; // 0x0
+ }
+
+ public static final class PublishConfig.Builder {
+ ctor public PublishConfig.Builder();
+ method public android.net.wifi.aware.PublishConfig build();
+ method public android.net.wifi.aware.PublishConfig.Builder setMatchFilter(java.util.List<byte[]>);
+ method public android.net.wifi.aware.PublishConfig.Builder setPublishCount(int);
+ method public android.net.wifi.aware.PublishConfig.Builder setPublishType(int);
+ method public android.net.wifi.aware.PublishConfig.Builder setServiceName(java.lang.String);
+ method public android.net.wifi.aware.PublishConfig.Builder setServiceSpecificInfo(byte[]);
+ method public android.net.wifi.aware.PublishConfig.Builder setTerminateNotificationEnabled(boolean);
+ method public android.net.wifi.aware.PublishConfig.Builder setTtlSec(int);
+ }
+
+ public class PublishDiscoverySession extends android.net.wifi.aware.DiscoverySession {
+ method public void updatePublish(android.net.wifi.aware.PublishConfig);
+ }
+
+ public final class SubscribeConfig implements android.os.Parcelable {
+ method public int describeContents();
+ method public void writeToParcel(android.os.Parcel, int);
+ field public static final android.os.Parcelable.Creator<android.net.wifi.aware.SubscribeConfig> CREATOR;
+ field public static final int MATCH_STYLE_ALL = 1; // 0x1
+ field public static final int MATCH_STYLE_FIRST_ONLY = 0; // 0x0
+ field public static final int SUBSCRIBE_TYPE_ACTIVE = 1; // 0x1
+ field public static final int SUBSCRIBE_TYPE_PASSIVE = 0; // 0x0
+ }
+
+ public static final class SubscribeConfig.Builder {
+ ctor public SubscribeConfig.Builder();
+ method public android.net.wifi.aware.SubscribeConfig build();
+ method public android.net.wifi.aware.SubscribeConfig.Builder setMatchFilter(java.util.List<byte[]>);
+ method public android.net.wifi.aware.SubscribeConfig.Builder setMatchStyle(int);
+ method public android.net.wifi.aware.SubscribeConfig.Builder setServiceName(java.lang.String);
+ method public android.net.wifi.aware.SubscribeConfig.Builder setServiceSpecificInfo(byte[]);
+ method public android.net.wifi.aware.SubscribeConfig.Builder setSubscribeCount(int);
+ method public android.net.wifi.aware.SubscribeConfig.Builder setSubscribeType(int);
+ method public android.net.wifi.aware.SubscribeConfig.Builder setTerminateNotificationEnabled(boolean);
+ method public android.net.wifi.aware.SubscribeConfig.Builder setTtlSec(int);
+ }
+
+ public class SubscribeDiscoverySession extends android.net.wifi.aware.DiscoverySession {
+ method public void updateSubscribe(android.net.wifi.aware.SubscribeConfig);
+ }
+
+ public class WifiAwareManager {
+ method public void attach(android.net.wifi.aware.AttachCallback, android.os.Handler);
+ method public void attach(android.net.wifi.aware.AttachCallback, android.net.wifi.aware.IdentityChangedListener, android.os.Handler);
+ method public android.net.wifi.aware.Characteristics getCharacteristics();
+ method public boolean isAvailable();
+ field public static final java.lang.String ACTION_WIFI_AWARE_STATE_CHANGED = "android.net.wifi.aware.action.WIFI_AWARE_STATE_CHANGED";
+ field public static final int WIFI_AWARE_DATA_PATH_ROLE_INITIATOR = 0; // 0x0
+ field public static final int WIFI_AWARE_DATA_PATH_ROLE_RESPONDER = 1; // 0x1
+ }
+
+ public class WifiAwareSession {
+ method public java.lang.String createNetworkSpecifier(int, byte[], byte[]);
+ method public void destroy();
+ method public void publish(android.net.wifi.aware.PublishConfig, android.net.wifi.aware.DiscoverySessionCallback, android.os.Handler);
+ method public void subscribe(android.net.wifi.aware.SubscribeConfig, android.net.wifi.aware.DiscoverySessionCallback, android.os.Handler);
+ }
+
+}
+
package android.net.wifi.p2p {
public class WifiP2pConfig implements android.os.Parcelable {
@@ -42670,6 +42795,7 @@
method public android.text.StaticLayout.Builder setHyphenationFrequency(int);
method public android.text.StaticLayout.Builder setIncludePad(boolean);
method public android.text.StaticLayout.Builder setIndents(int[], int[]);
+ method public android.text.StaticLayout.Builder setJustify(boolean);
method public android.text.StaticLayout.Builder setLineSpacing(float, float);
method public android.text.StaticLayout.Builder setMaxLines(int);
method public android.text.StaticLayout.Builder setText(java.lang.CharSequence);
@@ -46611,6 +46737,7 @@
method public final boolean isFocusable();
method public final boolean isFocusableInTouchMode();
method public boolean isFocused();
+ method public final boolean isFocusedByDefault();
method public boolean isHapticFeedbackEnabled();
method public boolean isHardwareAccelerated();
method public boolean isHorizontalFadingEdgeEnabled();
@@ -46741,8 +46868,8 @@
method public final void requestUnbufferedDispatch(android.view.MotionEvent);
method public static int resolveSize(int, int);
method public static int resolveSizeAndState(int, int, int);
+ method public boolean restoreDefaultFocus(int);
method public void restoreHierarchyState(android.util.SparseArray<android.os.Parcelable>);
- method public boolean restoreLastFocus();
method public void saveHierarchyState(android.util.SparseArray<android.os.Parcelable>);
method public void scheduleDrawable(android.graphics.drawable.Drawable, java.lang.Runnable, long);
method public void scrollBy(int, int);
@@ -46780,6 +46907,7 @@
method public void setFitsSystemWindows(boolean);
method public void setFocusable(boolean);
method public void setFocusableInTouchMode(boolean);
+ method public void setFocusedByDefault(boolean);
method public void setForeground(android.graphics.drawable.Drawable);
method public void setForegroundGravity(int);
method public void setForegroundTintList(android.content.res.ColorStateList);
@@ -48108,6 +48236,7 @@
}
public final class AccessibilityManager {
+ method public boolean addAccessibilityServicesStateChangeListener(android.view.accessibility.AccessibilityManager.AccessibilityServicesStateChangeListener);
method public boolean addAccessibilityStateChangeListener(android.view.accessibility.AccessibilityManager.AccessibilityStateChangeListener);
method public boolean addTouchExplorationStateChangeListener(android.view.accessibility.AccessibilityManager.TouchExplorationStateChangeListener);
method public deprecated java.util.List<android.content.pm.ServiceInfo> getAccessibilityServiceList();
@@ -48116,11 +48245,16 @@
method public void interrupt();
method public boolean isEnabled();
method public boolean isTouchExplorationEnabled();
+ method public boolean removeAccessibilityServicesStateChangeListener(android.view.accessibility.AccessibilityManager.AccessibilityServicesStateChangeListener);
method public boolean removeAccessibilityStateChangeListener(android.view.accessibility.AccessibilityManager.AccessibilityStateChangeListener);
method public boolean removeTouchExplorationStateChangeListener(android.view.accessibility.AccessibilityManager.TouchExplorationStateChangeListener);
method public void sendAccessibilityEvent(android.view.accessibility.AccessibilityEvent);
}
+ public static abstract interface AccessibilityManager.AccessibilityServicesStateChangeListener {
+ method public abstract void onAccessibilityServicesStateChanged();
+ }
+
public static abstract interface AccessibilityManager.AccessibilityStateChangeListener {
method public abstract void onAccessibilityStateChanged(boolean);
}
@@ -52639,6 +52773,7 @@
method public boolean getIncludeFontPadding();
method public android.os.Bundle getInputExtras(boolean);
method public int getInputType();
+ method public boolean getJustify();
method public final android.text.method.KeyListener getKeyListener();
method public final android.text.Layout getLayout();
method public float getLetterSpacing();
@@ -52747,6 +52882,7 @@
method public void setIncludeFontPadding(boolean);
method public void setInputExtras(int) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException;
method public void setInputType(int);
+ method public void setJustify(boolean);
method public void setKeyListener(android.text.method.KeyListener);
method public void setLetterSpacing(float);
method public void setLineSpacing(float, float);
diff --git a/api/test-current.txt b/api/test-current.txt
index d2c1749..e52f69c 100644
--- a/api/test-current.txt
+++ b/api/test-current.txt
@@ -584,6 +584,7 @@
field public static final int flipInterval = 16843129; // 0x1010179
field public static final int focusable = 16842970; // 0x10100da
field public static final int focusableInTouchMode = 16842971; // 0x10100db
+ field public static final int focusedByDefault = 16844101; // 0x1010545
field public static final deprecated int focusedMonthDateColor = 16843587; // 0x1010343
field public static final int font = 16844082; // 0x1010532
field public static final int fontFamily = 16843692; // 0x10103ac
@@ -2783,6 +2784,7 @@
field public static final int FEEDBACK_HAPTIC = 2; // 0x2
field public static final int FEEDBACK_SPOKEN = 1; // 0x1
field public static final int FEEDBACK_VISUAL = 8; // 0x8
+ field public static final int FLAG_ENABLE_ACCESSIBILITY_VOLUME = 128; // 0x80
field public static final int FLAG_INCLUDE_NOT_IMPORTANT_VIEWS = 2; // 0x2
field public static final int FLAG_REPORT_VIEW_IDS = 16; // 0x10
field public static final int FLAG_REQUEST_ENHANCED_WEB_ACCESSIBILITY = 8; // 0x8
@@ -8480,6 +8482,7 @@
field public static final java.lang.String USER_SERVICE = "user";
field public static final java.lang.String VIBRATOR_SERVICE = "vibrator";
field public static final java.lang.String WALLPAPER_SERVICE = "wallpaper";
+ field public static final java.lang.String WIFI_AWARE_SERVICE = "wifiaware";
field public static final java.lang.String WIFI_P2P_SERVICE = "wifip2p";
field public static final java.lang.String WIFI_SERVICE = "wifi";
field public static final java.lang.String WINDOW_SERVICE = "window";
@@ -9782,6 +9785,7 @@
public class LauncherApps {
ctor public LauncherApps(android.content.Context);
method public java.util.List<android.content.pm.LauncherActivityInfo> getActivityList(java.lang.String, android.os.UserHandle);
+ method public android.content.pm.ApplicationInfo getApplicationInfo(java.lang.String, int, android.os.UserHandle);
method public android.content.pm.LauncherApps.PinItemRequest getPinItemRequest(android.content.Intent);
method public android.graphics.drawable.Drawable getShortcutBadgedIconDrawable(android.content.pm.ShortcutInfo, int);
method public android.graphics.drawable.Drawable getShortcutIconDrawable(android.content.pm.ShortcutInfo, int);
@@ -9828,9 +9832,6 @@
field public static final int REQUEST_TYPE_SHORTCUT = 1; // 0x1
}
- public static abstract class LauncherApps.PinItemRequest.RequestType implements java.lang.annotation.Annotation {
- }
-
public static class LauncherApps.ShortcutQuery {
ctor public LauncherApps.ShortcutQuery();
method public android.content.pm.LauncherApps.ShortcutQuery setActivity(android.content.ComponentName);
@@ -10167,6 +10168,7 @@
field public static final java.lang.String FEATURE_WATCH = "android.hardware.type.watch";
field public static final java.lang.String FEATURE_WEBVIEW = "android.software.webview";
field public static final java.lang.String FEATURE_WIFI = "android.hardware.wifi";
+ field public static final java.lang.String FEATURE_WIFI_AWARE = "android.hardware.wifi.aware";
field public static final java.lang.String FEATURE_WIFI_DIRECT = "android.hardware.wifi.direct";
field public static final int GET_ACTIVITIES = 1; // 0x1
field public static final int GET_CONFIGURATIONS = 16384; // 0x4000
@@ -24304,6 +24306,7 @@
field public static final int TRANSPORT_ETHERNET = 3; // 0x3
field public static final int TRANSPORT_VPN = 4; // 0x4
field public static final int TRANSPORT_WIFI = 1; // 0x1
+ field public static final int TRANSPORT_WIFI_AWARE = 5; // 0x5
}
public class NetworkInfo implements android.os.Parcelable {
@@ -25297,6 +25300,122 @@
}
+package android.net.wifi.aware {
+
+ public class AttachCallback {
+ ctor public AttachCallback();
+ method public void onAttachFailed();
+ method public void onAttached(android.net.wifi.aware.WifiAwareSession);
+ }
+
+ public final class Characteristics implements android.os.Parcelable {
+ method public int describeContents();
+ method public int getMaxMatchFilterLength();
+ method public int getMaxServiceNameLength();
+ method public int getMaxServiceSpecificInfoLength();
+ method public void writeToParcel(android.os.Parcel, int);
+ field public static final android.os.Parcelable.Creator<android.net.wifi.aware.Characteristics> CREATOR;
+ }
+
+ public class DiscoverySession {
+ method public java.lang.String createNetworkSpecifier(android.net.wifi.aware.PeerHandle, byte[]);
+ method public void destroy();
+ method public static int getMaxSendRetryCount();
+ method public void sendMessage(android.net.wifi.aware.PeerHandle, int, byte[], int);
+ method public void sendMessage(android.net.wifi.aware.PeerHandle, int, byte[]);
+ }
+
+ public class DiscoverySessionCallback {
+ ctor public DiscoverySessionCallback();
+ method public void onMessageReceived(android.net.wifi.aware.PeerHandle, byte[]);
+ method public void onMessageSendFailed(int);
+ method public void onMessageSendSucceeded(int);
+ method public void onPublishStarted(android.net.wifi.aware.PublishDiscoverySession);
+ method public void onServiceDiscovered(android.net.wifi.aware.PeerHandle, byte[], java.util.List<byte[]>);
+ method public void onSessionConfigFailed();
+ method public void onSessionConfigUpdated();
+ method public void onSessionTerminated();
+ method public void onSubscribeStarted(android.net.wifi.aware.SubscribeDiscoverySession);
+ }
+
+ public class IdentityChangedListener {
+ ctor public IdentityChangedListener();
+ method public void onIdentityChanged(byte[]);
+ }
+
+ public class PeerHandle {
+ }
+
+ public final class PublishConfig implements android.os.Parcelable {
+ method public int describeContents();
+ method public void writeToParcel(android.os.Parcel, int);
+ field public static final android.os.Parcelable.Creator<android.net.wifi.aware.PublishConfig> CREATOR;
+ field public static final int PUBLISH_TYPE_SOLICITED = 1; // 0x1
+ field public static final int PUBLISH_TYPE_UNSOLICITED = 0; // 0x0
+ }
+
+ public static final class PublishConfig.Builder {
+ ctor public PublishConfig.Builder();
+ method public android.net.wifi.aware.PublishConfig build();
+ method public android.net.wifi.aware.PublishConfig.Builder setMatchFilter(java.util.List<byte[]>);
+ method public android.net.wifi.aware.PublishConfig.Builder setPublishCount(int);
+ method public android.net.wifi.aware.PublishConfig.Builder setPublishType(int);
+ method public android.net.wifi.aware.PublishConfig.Builder setServiceName(java.lang.String);
+ method public android.net.wifi.aware.PublishConfig.Builder setServiceSpecificInfo(byte[]);
+ method public android.net.wifi.aware.PublishConfig.Builder setTerminateNotificationEnabled(boolean);
+ method public android.net.wifi.aware.PublishConfig.Builder setTtlSec(int);
+ }
+
+ public class PublishDiscoverySession extends android.net.wifi.aware.DiscoverySession {
+ method public void updatePublish(android.net.wifi.aware.PublishConfig);
+ }
+
+ public final class SubscribeConfig implements android.os.Parcelable {
+ method public int describeContents();
+ method public void writeToParcel(android.os.Parcel, int);
+ field public static final android.os.Parcelable.Creator<android.net.wifi.aware.SubscribeConfig> CREATOR;
+ field public static final int MATCH_STYLE_ALL = 1; // 0x1
+ field public static final int MATCH_STYLE_FIRST_ONLY = 0; // 0x0
+ field public static final int SUBSCRIBE_TYPE_ACTIVE = 1; // 0x1
+ field public static final int SUBSCRIBE_TYPE_PASSIVE = 0; // 0x0
+ }
+
+ public static final class SubscribeConfig.Builder {
+ ctor public SubscribeConfig.Builder();
+ method public android.net.wifi.aware.SubscribeConfig build();
+ method public android.net.wifi.aware.SubscribeConfig.Builder setMatchFilter(java.util.List<byte[]>);
+ method public android.net.wifi.aware.SubscribeConfig.Builder setMatchStyle(int);
+ method public android.net.wifi.aware.SubscribeConfig.Builder setServiceName(java.lang.String);
+ method public android.net.wifi.aware.SubscribeConfig.Builder setServiceSpecificInfo(byte[]);
+ method public android.net.wifi.aware.SubscribeConfig.Builder setSubscribeCount(int);
+ method public android.net.wifi.aware.SubscribeConfig.Builder setSubscribeType(int);
+ method public android.net.wifi.aware.SubscribeConfig.Builder setTerminateNotificationEnabled(boolean);
+ method public android.net.wifi.aware.SubscribeConfig.Builder setTtlSec(int);
+ }
+
+ public class SubscribeDiscoverySession extends android.net.wifi.aware.DiscoverySession {
+ method public void updateSubscribe(android.net.wifi.aware.SubscribeConfig);
+ }
+
+ public class WifiAwareManager {
+ method public void attach(android.net.wifi.aware.AttachCallback, android.os.Handler);
+ method public void attach(android.net.wifi.aware.AttachCallback, android.net.wifi.aware.IdentityChangedListener, android.os.Handler);
+ method public android.net.wifi.aware.Characteristics getCharacteristics();
+ method public boolean isAvailable();
+ field public static final java.lang.String ACTION_WIFI_AWARE_STATE_CHANGED = "android.net.wifi.aware.action.WIFI_AWARE_STATE_CHANGED";
+ field public static final int WIFI_AWARE_DATA_PATH_ROLE_INITIATOR = 0; // 0x0
+ field public static final int WIFI_AWARE_DATA_PATH_ROLE_RESPONDER = 1; // 0x1
+ }
+
+ public class WifiAwareSession {
+ method public java.lang.String createNetworkSpecifier(int, byte[], byte[]);
+ method public void destroy();
+ method public void publish(android.net.wifi.aware.PublishConfig, android.net.wifi.aware.DiscoverySessionCallback, android.os.Handler);
+ method public void subscribe(android.net.wifi.aware.SubscribeConfig, android.net.wifi.aware.DiscoverySessionCallback, android.os.Handler);
+ }
+
+}
+
package android.net.wifi.p2p {
public class WifiP2pConfig implements android.os.Parcelable {
@@ -39572,6 +39691,7 @@
method public android.text.StaticLayout.Builder setHyphenationFrequency(int);
method public android.text.StaticLayout.Builder setIncludePad(boolean);
method public android.text.StaticLayout.Builder setIndents(int[], int[]);
+ method public android.text.StaticLayout.Builder setJustify(boolean);
method public android.text.StaticLayout.Builder setLineSpacing(float, float);
method public android.text.StaticLayout.Builder setMaxLines(int);
method public android.text.StaticLayout.Builder setText(java.lang.CharSequence);
@@ -43683,6 +43803,7 @@
method public final boolean isFocusable();
method public final boolean isFocusableInTouchMode();
method public boolean isFocused();
+ method public final boolean isFocusedByDefault();
method public boolean isHapticFeedbackEnabled();
method public boolean isHardwareAccelerated();
method public boolean isHorizontalFadingEdgeEnabled();
@@ -43813,8 +43934,8 @@
method public final void requestUnbufferedDispatch(android.view.MotionEvent);
method public static int resolveSize(int, int);
method public static int resolveSizeAndState(int, int, int);
+ method public boolean restoreDefaultFocus(int);
method public void restoreHierarchyState(android.util.SparseArray<android.os.Parcelable>);
- method public boolean restoreLastFocus();
method public void saveHierarchyState(android.util.SparseArray<android.os.Parcelable>);
method public void scheduleDrawable(android.graphics.drawable.Drawable, java.lang.Runnable, long);
method public void scrollBy(int, int);
@@ -43852,6 +43973,7 @@
method public void setFitsSystemWindows(boolean);
method public void setFocusable(boolean);
method public void setFocusableInTouchMode(boolean);
+ method public void setFocusedByDefault(boolean);
method public void setForeground(android.graphics.drawable.Drawable);
method public void setForegroundGravity(int);
method public void setForegroundTintList(android.content.res.ColorStateList);
@@ -45181,6 +45303,7 @@
}
public final class AccessibilityManager {
+ method public boolean addAccessibilityServicesStateChangeListener(android.view.accessibility.AccessibilityManager.AccessibilityServicesStateChangeListener);
method public boolean addAccessibilityStateChangeListener(android.view.accessibility.AccessibilityManager.AccessibilityStateChangeListener);
method public boolean addTouchExplorationStateChangeListener(android.view.accessibility.AccessibilityManager.TouchExplorationStateChangeListener);
method public deprecated java.util.List<android.content.pm.ServiceInfo> getAccessibilityServiceList();
@@ -45189,11 +45312,16 @@
method public void interrupt();
method public boolean isEnabled();
method public boolean isTouchExplorationEnabled();
+ method public boolean removeAccessibilityServicesStateChangeListener(android.view.accessibility.AccessibilityManager.AccessibilityServicesStateChangeListener);
method public boolean removeAccessibilityStateChangeListener(android.view.accessibility.AccessibilityManager.AccessibilityStateChangeListener);
method public boolean removeTouchExplorationStateChangeListener(android.view.accessibility.AccessibilityManager.TouchExplorationStateChangeListener);
method public void sendAccessibilityEvent(android.view.accessibility.AccessibilityEvent);
}
+ public static abstract interface AccessibilityManager.AccessibilityServicesStateChangeListener {
+ method public abstract void onAccessibilityServicesStateChanged();
+ }
+
public static abstract interface AccessibilityManager.AccessibilityStateChangeListener {
method public abstract void onAccessibilityStateChanged(boolean);
}
@@ -49363,6 +49491,7 @@
method public boolean getIncludeFontPadding();
method public android.os.Bundle getInputExtras(boolean);
method public int getInputType();
+ method public boolean getJustify();
method public final android.text.method.KeyListener getKeyListener();
method public final android.text.Layout getLayout();
method public float getLetterSpacing();
@@ -49471,6 +49600,7 @@
method public void setIncludeFontPadding(boolean);
method public void setInputExtras(int) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException;
method public void setInputType(int);
+ method public void setJustify(boolean);
method public void setKeyListener(android.text.method.KeyListener);
method public void setLetterSpacing(float);
method public void setLineSpacing(float, float);
diff --git a/core/java/android/accessibilityservice/AccessibilityServiceInfo.java b/core/java/android/accessibilityservice/AccessibilityServiceInfo.java
index ee03280..07a8253 100644
--- a/core/java/android/accessibilityservice/AccessibilityServiceInfo.java
+++ b/core/java/android/accessibilityservice/AccessibilityServiceInfo.java
@@ -319,6 +319,13 @@
*/
public static final int FLAG_RETRIEVE_INTERACTIVE_WINDOWS = 0x00000040;
+ /**
+ * This flag requests that all audio tracks system-wide with
+ * {@link android.media.AudioAttributes#USAGE_ASSISTANCE_ACCESSIBILITY} be controlled by the
+ * {@link android.media.AudioManager#STREAM_ACCESSIBILITY} volume.
+ */
+ public static final int FLAG_ENABLE_ACCESSIBILITY_VOLUME = 0x00000080;
+
/** {@hide} */
public static final int FLAG_FORCE_DIRECT_BOOT_AWARE = 0x00010000;
@@ -930,6 +937,8 @@
return "FLAG_REQUEST_FILTER_KEY_EVENTS";
case FLAG_RETRIEVE_INTERACTIVE_WINDOWS:
return "FLAG_RETRIEVE_INTERACTIVE_WINDOWS";
+ case FLAG_ENABLE_ACCESSIBILITY_VOLUME:
+ return "FLAG_ENABLE_ACCESSIBILITY_VOLUME";
default:
return null;
}
diff --git a/core/java/android/app/ActionBar.java b/core/java/android/app/ActionBar.java
index 58f5a78..1294325 100644
--- a/core/java/android/app/ActionBar.java
+++ b/core/java/android/app/ActionBar.java
@@ -31,13 +31,12 @@
import android.view.Gravity;
import android.view.KeyEvent;
import android.view.View;
-import android.view.View.OnFocusChangeListener;
import android.view.ViewDebug;
import android.view.ViewGroup;
import android.view.ViewHierarchyEncoder;
-import android.view.ViewParent;
import android.view.Window;
import android.widget.SpinnerAdapter;
+
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@@ -1093,67 +1092,11 @@
public void setWindowTitle(CharSequence title) {
}
- /**
- * Attempts to move focus to the ActionBar if it does not already contain the focus.
- *
- * @return {@code true} if focus changes or {@code false} if focus doesn't change.
- * @hide
- */
- public boolean requestFocus() {
- return false;
- }
-
/** @hide */
public void onDestroy() {
}
/**
- * Common implementation for requestFocus that takes in the Toolbar and moves focus
- * to the contents. This makes the ViewGroups containing the toolbar allow focus while it stays
- * in the ActionBar and then prevents it again once it leaves.
- *
- * @param viewGroup The toolbar ViewGroup
- * @return {@code true} if focus changes or {@code false} if focus doesn't change.
- * @hide
- */
- protected boolean requestFocus(ViewGroup viewGroup) {
- if (viewGroup != null && !viewGroup.hasFocus()) {
- final ViewGroup toolbar = viewGroup.getTouchscreenBlocksFocus() ? viewGroup : null;
- ViewParent parent = viewGroup.getParent();
- ViewGroup container = null;
- while (parent != null && parent instanceof ViewGroup) {
- final ViewGroup vgParent = (ViewGroup) parent;
- if (vgParent.getTouchscreenBlocksFocus()) {
- container = vgParent;
- break;
- }
- parent = vgParent.getParent();
- }
- if (container != null) {
- container.setTouchscreenBlocksFocus(false);
- }
- if (toolbar != null) {
- toolbar.setTouchscreenBlocksFocus(false);
- }
- viewGroup.requestFocus();
- final View focused = viewGroup.findFocus();
- if (focused != null) {
- focused.setOnFocusChangeListener(new FollowOutOfActionBar(viewGroup,
- container, toolbar));
- } else {
- if (container != null) {
- container.setTouchscreenBlocksFocus(true);
- }
- if (toolbar != null) {
- toolbar.setTouchscreenBlocksFocus(true);
- }
- }
- return true;
- }
- return false;
- }
-
- /**
* Listener interface for ActionBar navigation events.
*
* @deprecated Action bar navigation modes are deprecated and not supported by inline
@@ -1474,43 +1417,4 @@
encoder.addProperty("gravity", gravity);
}
}
-
- /**
- * Tracks the focused View until it leaves the ActionBar, then it resets the
- * touchscreenBlocksFocus value.
- */
- private static class FollowOutOfActionBar implements OnFocusChangeListener, Runnable {
- private final ViewGroup mFocusRoot;
- private final ViewGroup mContainer;
- private final ViewGroup mToolbar;
-
- public FollowOutOfActionBar(ViewGroup focusRoot, ViewGroup container, ViewGroup toolbar) {
- mContainer = container;
- mToolbar = toolbar;
- mFocusRoot = focusRoot;
- }
-
- @Override
- public void onFocusChange(View v, boolean hasFocus) {
- if (!hasFocus) {
- v.setOnFocusChangeListener(null);
- mFocusRoot.post(this);
- }
- }
-
- @Override
- public void run() {
- final View focused = mFocusRoot.findFocus();
- if (focused != null) {
- focused.setOnFocusChangeListener(this);
- } else {
- if (mContainer != null) {
- mContainer.setTouchscreenBlocksFocus(true);
- }
- if (mToolbar != null) {
- mToolbar.setTouchscreenBlocksFocus(true);
- }
- }
- }
- }
}
diff --git a/core/java/android/app/Activity.java b/core/java/android/app/Activity.java
index 87e5416..f6771857 100644
--- a/core/java/android/app/Activity.java
+++ b/core/java/android/app/Activity.java
@@ -16,7 +16,11 @@
package android.app;
-import static java.lang.Character.MIN_VALUE;
+import com.android.internal.annotations.GuardedBy;
+import com.android.internal.app.IVoiceInteractor;
+import com.android.internal.app.ToolbarActionBar;
+import com.android.internal.app.WindowDecorActionBar;
+import com.android.internal.policy.PhoneWindow;
import android.annotation.CallSuper;
import android.annotation.DrawableRes;
@@ -114,22 +118,14 @@
import android.view.WindowManager;
import android.view.WindowManagerGlobal;
import android.view.accessibility.AccessibilityEvent;
-import android.view.autofill.VirtualViewDelegate;
+import android.view.autofill.AutoFillId;
import android.view.autofill.Dataset;
import android.view.autofill.DatasetField;
-import android.view.autofill.AutoFillId;
-import android.view.autofill.FillResponse;
+import android.view.autofill.VirtualViewDelegate;
import android.widget.AdapterView;
-import android.widget.EditText;
import android.widget.Toast;
import android.widget.Toolbar;
-import com.android.internal.annotations.GuardedBy;
-import com.android.internal.app.IVoiceInteractor;
-import com.android.internal.app.ToolbarActionBar;
-import com.android.internal.app.WindowDecorActionBar;
-import com.android.internal.policy.PhoneWindow;
-
import java.io.FileDescriptor;
import java.io.PrintWriter;
import java.lang.annotation.Retention;
@@ -139,6 +135,8 @@
import java.util.HashMap;
import java.util.List;
+import static java.lang.Character.MIN_VALUE;
+
/**
* An activity is a single, focused thing that the user can do. Almost all
* activities interact with the user, so the Activity class takes care of
@@ -852,7 +850,6 @@
SharedElementCallback mExitTransitionListener = SharedElementCallback.NULL_CALLBACK;
private boolean mHasCurrentPermissionsRequest;
- private boolean mEatKeyUpEvent;
@GuardedBy("this")
private WeakReference<IAutoFillAppCallback> mAutoFillCallback;
@@ -3181,20 +3178,6 @@
if (keyCode == KeyEvent.KEYCODE_MENU &&
mActionBar != null && mActionBar.onMenuKeyEvent(event)) {
return true;
- } else if (event.isCtrlPressed() &&
- event.getUnicodeChar(event.getMetaState() & ~KeyEvent.META_CTRL_MASK) == '<') {
- // Capture the Control-< and send focus to the ActionBar
- final int action = event.getAction();
- if (action == KeyEvent.ACTION_DOWN) {
- final ActionBar actionBar = getActionBar();
- if (actionBar != null && actionBar.isShowing() && actionBar.requestFocus()) {
- mEatKeyUpEvent = true;
- return true;
- }
- } else if (action == KeyEvent.ACTION_UP && mEatKeyUpEvent) {
- mEatKeyUpEvent = false;
- return true;
- }
}
Window win = getWindow();
diff --git a/core/java/android/app/ActivityManager.java b/core/java/android/app/ActivityManager.java
index d362b01..9037304 100644
--- a/core/java/android/app/ActivityManager.java
+++ b/core/java/android/app/ActivityManager.java
@@ -162,7 +162,8 @@
BUGREPORT_OPTION_FULL,
BUGREPORT_OPTION_INTERACTIVE,
BUGREPORT_OPTION_REMOTE,
- BUGREPORT_OPTION_WEAR
+ BUGREPORT_OPTION_WEAR,
+ BUGREPORT_OPTION_TELEPHONY
})
public @interface BugreportMode {}
/**
@@ -190,6 +191,13 @@
public static final int BUGREPORT_OPTION_WEAR = 3;
/**
+ * Takes a lightweight version of bugreport that only includes a few, urgent sections
+ * used to report telephony bugs.
+ * @hide
+ */
+ public static final int BUGREPORT_OPTION_TELEPHONY = 4;
+
+ /**
* <a href="{@docRoot}guide/topics/manifest/meta-data-element.html">{@code
* <meta-data>}</a> name for a 'home' Activity that declares a package that is to be
* uninstalled in lieu of the declaring one. The package named here must be
@@ -3374,6 +3382,8 @@
* @see #forceStopPackageAsUser(String, int)
* @hide
*/
+ @SystemApi
+ @RequiresPermission(Manifest.permission.FORCE_STOP_PACKAGES)
public void forceStopPackage(String packageName) {
forceStopPackageAsUser(packageName, UserHandle.myUserId());
}
diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java
index e3bbc92..45d325a 100644
--- a/core/java/android/app/ActivityThread.java
+++ b/core/java/android/app/ActivityThread.java
@@ -1758,6 +1758,7 @@
case LOCAL_VOICE_INTERACTION_STARTED:
handleLocalVoiceInteractionStarted((IBinder) ((SomeArgs) msg.obj).arg1,
(IVoiceInteractor) ((SomeArgs) msg.obj).arg2);
+ break;
case ATTACH_AGENT:
handleAttachAgent((String) msg.obj);
break;
diff --git a/core/java/android/app/IActivityManager.aidl b/core/java/android/app/IActivityManager.aidl
index a2d9c45..2ed9eab 100644
--- a/core/java/android/app/IActivityManager.aidl
+++ b/core/java/android/app/IActivityManager.aidl
@@ -590,6 +590,12 @@
void dismissKeyguard(in IBinder token, in IKeyguardDismissCallback callback);
int restartUserInBackground(int userId);
+ /** Cancels the window transitions for the given task. */
+ void cancelTaskWindowTransition(int taskId);
+
+ /** Cancels the thumbnail transitions for the given task. */
+ void cancelTaskThumbnailTransition(int taskId);
+
// WARNING: when these transactions are updated, check if they are any callers on the native
// side. If so, make sure they are using the correct transaction ids and arguments.
// If a transaction which will also be used on the native side is being inserted, add it
diff --git a/core/java/android/app/ITaskStackListener.aidl b/core/java/android/app/ITaskStackListener.aidl
index e454ae1..ef997c9 100644
--- a/core/java/android/app/ITaskStackListener.aidl
+++ b/core/java/android/app/ITaskStackListener.aidl
@@ -95,4 +95,11 @@
* perform relevant animations before the window disappears.
*/
void onTaskRemovalStarted(int taskId);
+
+ /**
+ * Called when the task has been put in a locked state because one or more of the
+ * activities inside it belong to a managed profile user, and that user has just
+ * been locked.
+ */
+ void onTaskProfileLocked(int taskId, int userId);
}
diff --git a/core/java/android/app/TaskStackListener.java b/core/java/android/app/TaskStackListener.java
index 0639552..ad5e69b 100644
--- a/core/java/android/app/TaskStackListener.java
+++ b/core/java/android/app/TaskStackListener.java
@@ -74,4 +74,8 @@
public void onActivityRequestedOrientationChanged(int taskId, int requestedOrientation)
throws RemoteException {
}
+
+ @Override
+ public void onTaskProfileLocked(int taskId, int userId) {
+ }
}
diff --git a/core/java/android/app/admin/DevicePolicyManager.java b/core/java/android/app/admin/DevicePolicyManager.java
index a56ff5e..074326f 100644
--- a/core/java/android/app/admin/DevicePolicyManager.java
+++ b/core/java/android/app/admin/DevicePolicyManager.java
@@ -279,6 +279,8 @@
* <li>{@link #EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_DOWNLOAD_LOCATION}, optional</li>
* <li>{@link #EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_DOWNLOAD_COOKIE_HEADER}, optional</li>
* <li>{@link #EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_CHECKSUM}, optional</li>
+ * <li>{@link #EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_LABEL}, optional</li>
+ * <li>{@link #EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_ICON_URI}, optional</li>
* <li>{@link #EXTRA_PROVISIONING_LOCAL_TIME} (convert to String), optional</li>
* <li>{@link #EXTRA_PROVISIONING_TIME_ZONE}, optional</li>
* <li>{@link #EXTRA_PROVISIONING_LOCALE}, optional</li>
@@ -290,6 +292,8 @@
* <li>{@link #EXTRA_PROVISIONING_WIFI_PROXY_PORT} (convert to String), optional</li>
* <li>{@link #EXTRA_PROVISIONING_WIFI_PROXY_BYPASS}, optional</li>
* <li>{@link #EXTRA_PROVISIONING_WIFI_PAC_URL}, optional</li>
+ * <li>{@link #EXTRA_PROVISIONING_SUPPORT_URL}, optional</li>
+ * <li>{@link #EXTRA_PROVISIONING_ORGANIZATION_NAME}, optional</li>
* <li>{@link #EXTRA_PROVISIONING_ADMIN_EXTRAS_BUNDLE}, optional</li></ul>
*
* @hide
@@ -688,6 +692,67 @@
= "android.app.extra.PROVISIONING_DEVICE_ADMIN_PACKAGE_DOWNLOAD_LOCATION";
/**
+ * A String extra holding the localized name of the organization under management.
+ *
+ * The name is displayed only during provisioning.
+ *
+ * <p>Use in an intent with action {@link #ACTION_PROVISION_MANAGED_DEVICE_FROM_TRUSTED_SOURCE}
+ *
+ * @hide
+ */
+ @SystemApi
+ public static final String EXTRA_PROVISIONING_ORGANIZATION_NAME =
+ "android.app.extra.PROVISIONING_ORGANIZATION_NAME";
+
+ /**
+ * A String extra holding a url to the website of the device's provider. The website can be
+ * opened in a browser during provisioning.
+ *
+ * <p>Use in an intent with action {@link #ACTION_PROVISION_MANAGED_DEVICE_FROM_TRUSTED_SOURCE}
+ *
+ * @hide
+ */
+ @SystemApi
+ public static final String EXTRA_PROVISIONING_SUPPORT_URL =
+ "android.app.extra.PROVISIONING_SUPPORT_URL";
+
+ /**
+ * A String extra holding the localized name of the device admin package. It should be the same
+ * as the app label of the package.
+ *
+ * <p>Use in an intent with action {@link #ACTION_PROVISION_MANAGED_DEVICE_FROM_TRUSTED_SOURCE}
+ *
+ * @hide
+ */
+ @SystemApi
+ public static final String EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_LABEL =
+ "android.app.extra.PROVISIONING_DEVICE_ADMIN_PACKAGE_LABEL";
+
+ /**
+ * A {@link Uri} extra pointing to the app icon of device admin package. This image will be
+ * shown during the provisioning.
+ * <h5>The following URI schemes are accepted:</h5>
+ * <ul>
+ * <li>content ({@link android.content.ContentResolver#SCHEME_CONTENT})</li>
+ * <li>android.resource ({@link android.content.ContentResolver#SCHEME_ANDROID_RESOURCE})</li>
+ * </ul>
+ *
+ * <p> It is the responsibility of the caller to provide an image with a reasonable
+ * pixel density for the device.
+ *
+ * <p> If a content: URI is passed, the intent should have the flag
+ * {@link Intent#FLAG_GRANT_READ_URI_PERMISSION} and the uri should be added to the
+ * {@link android.content.ClipData} of the intent too.
+ *
+ * <p>Use in an intent with action {@link #ACTION_PROVISION_MANAGED_DEVICE_FROM_TRUSTED_SOURCE}
+ *
+ * @hide
+ */
+ @SystemApi
+ public static final String EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_ICON_URI =
+ "android.app.extra.PROVISIONING_DEVICE_ADMIN_PACKAGE_ICON_URI";
+
+ /**
* An int extra holding a minimum required version code for the device admin package. If the
* device admin is already installed on the device, it will only be re-downloaded from
* {@link #EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_DOWNLOAD_LOCATION} if the version of the
@@ -808,7 +873,7 @@
* </ul>
*
* <p> It is the responsibility of the caller to provide an image with a reasonable
- * pixed density for the device.
+ * pixel density for the device.
*
* <p> If a content: URI is passed, the intent should have the flag
* {@link Intent#FLAG_GRANT_READ_URI_PERMISSION} and the uri should be added to the
@@ -4082,6 +4147,7 @@
*
* @hide
*/
+ @SystemApi
public ComponentName getDeviceOwnerComponentOnAnyUser() {
return getDeviceOwnerComponentInner(/* callingUserOnly =*/ false);
}
diff --git a/core/java/android/appwidget/AppWidgetManager.java b/core/java/android/appwidget/AppWidgetManager.java
index 3189681..31e779f 100644
--- a/core/java/android/appwidget/AppWidgetManager.java
+++ b/core/java/android/appwidget/AppWidgetManager.java
@@ -1094,8 +1094,9 @@
* <p>Only apps with a foreground activity or a foreground service can call it. Otherwise
* it'll throw {@link IllegalStateException}.
*
- * <p>When an app calls this API when a previous request is still waiting for a response,
- * the previous request will be canceled.
+ * <p>It's up to the launcher how to handle previous pending requests when the same package
+ * calls this API multiple times in a row. It may ignore the previous requests,
+ * for example.
*
* @param provider The {@link ComponentName} for the {@link
* android.content.BroadcastReceiver BroadcastReceiver} provider for your AppWidget.
diff --git a/core/java/android/bluetooth/BluetoothSocket.java b/core/java/android/bluetooth/BluetoothSocket.java
index b686938..98a5341 100644
--- a/core/java/android/bluetooth/BluetoothSocket.java
+++ b/core/java/android/bluetooth/BluetoothSocket.java
@@ -243,7 +243,7 @@
}
as.mPfd = new ParcelFileDescriptor(fds[0]);
- as.mSocket = new LocalSocket(fds[0]);
+ as.mSocket = LocalSocket.createConnectedLocalSocket(fds[0]);
as.mSocketIS = as.mSocket.getInputStream();
as.mSocketOS = as.mSocket.getOutputStream();
as.mAddress = RemoteAddr;
@@ -367,7 +367,7 @@
if (mSocketState == SocketState.CLOSED) throw new IOException("socket closed");
if (mPfd == null) throw new IOException("bt socket connect failed");
FileDescriptor fd = mPfd.getFileDescriptor();
- mSocket = new LocalSocket(fd);
+ mSocket = LocalSocket.createConnectedLocalSocket(fd);
mSocketIS = mSocket.getInputStream();
mSocketOS = mSocket.getOutputStream();
}
@@ -416,9 +416,9 @@
if(mSocketState != SocketState.INIT) return EBADFD;
if(mPfd == null) return -1;
FileDescriptor fd = mPfd.getFileDescriptor();
- if (DBG) Log.d(TAG, "bindListen(), new LocalSocket ");
- mSocket = new LocalSocket(fd);
- if (DBG) Log.d(TAG, "bindListen(), new LocalSocket.getInputStream() ");
+ if (DBG) Log.d(TAG, "bindListen(), Create LocalSocket");
+ mSocket = LocalSocket.createConnectedLocalSocket(fd);
+ if (DBG) Log.d(TAG, "bindListen(), new LocalSocket.getInputStream()");
mSocketIS = mSocket.getInputStream();
mSocketOS = mSocket.getOutputStream();
}
diff --git a/core/java/android/content/Context.java b/core/java/android/content/Context.java
index ffe1248..af5e643 100644
--- a/core/java/android/content/Context.java
+++ b/core/java/android/content/Context.java
@@ -2793,6 +2793,9 @@
* connectivity. On releases before NYC, it should only be obtained from an application
* context, and not from any other derived context to avoid memory leaks within the calling
* process.
+ * <dt> {@link #WIFI_AWARE_SERVICE} ("wifiaware")
+ * <dd> A {@link android.net.wifi.aware.WifiAwareManager WifiAwareManager} for management of
+ * Wi-Fi Aware discovery and connectivity.
* <dt> {@link #WIFI_P2P_SERVICE} ("wifip2p")
* <dd> A {@link android.net.wifi.p2p.WifiP2pManager WifiP2pManager} for management of
* Wi-Fi Direct connectivity.
@@ -3179,7 +3182,6 @@
*
* @see #getSystemService
* @see android.net.wifi.aware.WifiAwareManager
- * @hide PROPOSED_AWARE_API
*/
public static final String WIFI_AWARE_SERVICE = "wifiaware";
diff --git a/core/java/android/content/pm/LauncherApps.java b/core/java/android/content/pm/LauncherApps.java
index 4b5b995..4cdd653 100644
--- a/core/java/android/content/pm/LauncherApps.java
+++ b/core/java/android/content/pm/LauncherApps.java
@@ -481,15 +481,15 @@
}
/**
- * Retrieve all of the information we know about a particular package / application.
+ * Get {@link ApplicationInfo} for a profile
*
* @param packageName The package name of the application
* @param flags Additional option flags {@link PackageManager#getApplicationInfo}
* @param user The UserHandle of the profile.
*
* @return An {@link ApplicationInfo} containing information about the package or
- * null if the package isn't installed for the given user.
- * @hide
+ * null if the package isn't installed for the given user, or the target user
+ * is not enabled.
*/
public ApplicationInfo getApplicationInfo(String packageName, @ApplicationInfoFlags int flags,
UserHandle user) {
@@ -1142,6 +1142,7 @@
/** This is a request to pin app widget. */
public static final int REQUEST_TYPE_APPWIDGET = 2;
+ /** @hide */
@IntDef(value = {REQUEST_TYPE_SHORTCUT})
@Retention(RetentionPolicy.SOURCE)
public @interface RequestType {}
@@ -1200,7 +1201,7 @@
/**
* Return {@code TRUE} if a request is valid -- i.e. {@link #accept(Bundle)} has not been
- * called, and it has not been canceled.
+ * called yet.
*/
public boolean isValid() {
try {
diff --git a/core/java/android/content/pm/PackageManager.java b/core/java/android/content/pm/PackageManager.java
index 2fbb5b1..6a2325b 100644
--- a/core/java/android/content/pm/PackageManager.java
+++ b/core/java/android/content/pm/PackageManager.java
@@ -2070,8 +2070,6 @@
/**
* Feature for {@link #getSystemAvailableFeatures} and
* {@link #hasSystemFeature}: The device supports Wi-Fi Aware.
- *
- * @hide PROPOSED_AWARE_API
*/
@SdkConstant(SdkConstantType.FEATURE)
public static final String FEATURE_WIFI_AWARE = "android.hardware.wifi.aware";
diff --git a/core/java/android/content/pm/ShortcutManager.java b/core/java/android/content/pm/ShortcutManager.java
index c8fb3d1..3853400 100644
--- a/core/java/android/content/pm/ShortcutManager.java
+++ b/core/java/android/content/pm/ShortcutManager.java
@@ -846,8 +846,9 @@
* <p>Only apps with a foreground activity or a foreground service can call it. Otherwise
* it'll throw {@link IllegalStateException}.
*
- * <p>When an app calls this API when a previous request is still waiting for a response,
- * the previous request will be canceled.
+ * <p>It's up to the launcher how to handle previous pending requests when the same package
+ * calls this API multiple times in a row. It may ignore the previous requests,
+ * for example.
*
* @param shortcut New shortcut to pin. If an app wants to pin an existing (either dynamic
* or manifest) shortcut, then it only needs to have an ID, and other fields don't have to
diff --git a/core/java/android/net/LocalServerSocket.java b/core/java/android/net/LocalServerSocket.java
index e1eaf00..3fcde330 100644
--- a/core/java/android/net/LocalServerSocket.java
+++ b/core/java/android/net/LocalServerSocket.java
@@ -89,7 +89,7 @@
impl.accept(acceptedImpl);
- return LocalSocket.createLocalSocketForAccept(acceptedImpl, LocalSocket.SOCKET_UNKNOWN);
+ return LocalSocket.createLocalSocketForAccept(acceptedImpl);
}
/**
diff --git a/core/java/android/net/LocalSocket.java b/core/java/android/net/LocalSocket.java
index d9ad74b..8afa1ed 100644
--- a/core/java/android/net/LocalSocket.java
+++ b/core/java/android/net/LocalSocket.java
@@ -31,6 +31,7 @@
public class LocalSocket implements Closeable {
private final LocalSocketImpl impl;
+ /** false if impl.create() needs to be called */
private volatile boolean implCreated;
private LocalSocketAddress localAddress;
private boolean isBound;
@@ -61,19 +62,6 @@
*/
public LocalSocket(int sockType) {
this(new LocalSocketImpl(), sockType);
- isBound = false;
- isConnected = false;
- }
-
- /**
- * Creates a AF_LOCAL/UNIX domain stream socket with FileDescriptor.
- * @hide
- */
- public LocalSocket(FileDescriptor fd) throws IOException {
- this(new LocalSocketImpl(fd), SOCKET_UNKNOWN);
- isBound = true;
- isConnected = true;
- implCreated = true;
}
private LocalSocket(LocalSocketImpl impl, int sockType) {
@@ -84,9 +72,27 @@
}
/**
+ * Creates a LocalSocket instances using the FileDescriptor for an already-connected
+ * AF_LOCAL/UNIX domain stream socket. Note: the FileDescriptor must be closed by the caller:
+ * closing the LocalSocket will not close it.
+ *
+ * @hide - used by BluetoothSocket.
+ */
+ public static LocalSocket createConnectedLocalSocket(FileDescriptor fd) {
+ return createConnectedLocalSocket(new LocalSocketImpl(fd), SOCKET_UNKNOWN);
+ }
+
+ /**
* for use with LocalServerSocket.accept()
*/
- static LocalSocket createLocalSocketForAccept(LocalSocketImpl impl, int sockType) {
+ static LocalSocket createLocalSocketForAccept(LocalSocketImpl impl) {
+ return createConnectedLocalSocket(impl, SOCKET_UNKNOWN);
+ }
+
+ /**
+ * Creates a LocalSocket from an existing LocalSocketImpl that is already connected.
+ */
+ private static LocalSocket createConnectedLocalSocket(LocalSocketImpl impl, int sockType) {
LocalSocket socket = new LocalSocket(impl, sockType);
socket.isConnected = true;
socket.isBound = true;
diff --git a/core/java/android/net/LocalSocketImpl.java b/core/java/android/net/LocalSocketImpl.java
index d8f7821..05c8afb 100644
--- a/core/java/android/net/LocalSocketImpl.java
+++ b/core/java/android/net/LocalSocketImpl.java
@@ -218,7 +218,7 @@
*
* @param fd non-null; bound file descriptor
*/
- /*package*/ LocalSocketImpl(FileDescriptor fd) throws IOException
+ /*package*/ LocalSocketImpl(FileDescriptor fd)
{
this.fd = fd;
}
diff --git a/core/java/android/net/NetworkCapabilities.java b/core/java/android/net/NetworkCapabilities.java
index dacea55..4dd8ce9 100644
--- a/core/java/android/net/NetworkCapabilities.java
+++ b/core/java/android/net/NetworkCapabilities.java
@@ -420,8 +420,6 @@
/**
* Indicates this network uses a Wi-Fi Aware transport.
- *
- * @hide PROPOSED_AWARE_API
*/
public static final int TRANSPORT_WIFI_AWARE = 5;
diff --git a/core/java/android/text/DynamicLayout.java b/core/java/android/text/DynamicLayout.java
index 9ac8996..1e9deeb 100644
--- a/core/java/android/text/DynamicLayout.java
+++ b/core/java/android/text/DynamicLayout.java
@@ -85,7 +85,7 @@
this(base, display, paint, width, align, TextDirectionHeuristics.FIRSTSTRONG_LTR,
spacingmult, spacingadd, includepad,
StaticLayout.BREAK_STRATEGY_SIMPLE, StaticLayout.HYPHENATION_FREQUENCY_NONE,
- ellipsize, ellipsizedWidth);
+ false /* justify */, ellipsize, ellipsizedWidth);
}
/**
@@ -102,7 +102,8 @@
int width, Alignment align, TextDirectionHeuristic textDir,
float spacingmult, float spacingadd,
boolean includepad, int breakStrategy, int hyphenationFrequency,
- TextUtils.TruncateAt ellipsize, int ellipsizedWidth) {
+ boolean justify, TextUtils.TruncateAt ellipsize,
+ int ellipsizedWidth) {
super((ellipsize == null)
? display
: (display instanceof Spanned)
@@ -127,6 +128,7 @@
mIncludePad = includepad;
mBreakStrategy = breakStrategy;
+ mJustify = justify;
mHyphenationFrequency = hyphenationFrequency;
/*
@@ -300,7 +302,8 @@
.setEllipsizedWidth(mEllipsizedWidth)
.setEllipsize(mEllipsizeAt)
.setBreakStrategy(mBreakStrategy)
- .setHyphenationFrequency(mHyphenationFrequency);
+ .setHyphenationFrequency(mHyphenationFrequency)
+ .setJustify(mJustify);
reflowed.generate(b, false, true);
int n = reflowed.getLineCount();
// If the new layout has a blank line at the end, but it is not
@@ -808,6 +811,7 @@
private TextUtils.TruncateAt mEllipsizeAt;
private int mBreakStrategy;
private int mHyphenationFrequency;
+ private boolean mJustify;
private PackedIntVector mInts;
private PackedObjectVector<Directions> mObjects;
diff --git a/core/java/android/text/Layout.java b/core/java/android/text/Layout.java
index 3cb81b0..2fc12d3 100644
--- a/core/java/android/text/Layout.java
+++ b/core/java/android/text/Layout.java
@@ -218,6 +218,11 @@
mTextDir = textDir;
}
+ /** @hide */
+ protected void setJustify(boolean justify) {
+ mJustify = justify;
+ }
+
/**
* Replace constructor properties of this Layout with new ones. Be careful.
*/
@@ -266,6 +271,99 @@
drawText(canvas, firstLine, lastLine);
}
+ private boolean isJustificationRequired(int lineNum) {
+ if (!mJustify) return false;
+ final int lineEnd = getLineEnd(lineNum);
+ return lineEnd < mText.length() && mText.charAt(lineEnd - 1) != '\n';
+ }
+
+ private float getJustifyWidth(int lineNum) {
+ Alignment paraAlign = mAlignment;
+ TabStops tabStops = null;
+ boolean tabStopsIsInitialized = false;
+
+ int left = 0;
+ int right = mWidth;
+
+ final int dir = getParagraphDirection(lineNum);
+
+ ParagraphStyle[] spans = NO_PARA_SPANS;
+ if (mSpannedText) {
+ Spanned sp = (Spanned) mText;
+ final int start = getLineStart(lineNum);
+
+ final boolean isFirstParaLine = (start == 0 || mText.charAt(start - 1) == '\n');
+
+ if (isFirstParaLine) {
+ final int spanEnd = sp.nextSpanTransition(start, mText.length(),
+ ParagraphStyle.class);
+ spans = getParagraphSpans(sp, start, spanEnd, ParagraphStyle.class);
+
+ for (int n = spans.length - 1; n >= 0; n--) {
+ if (spans[n] instanceof AlignmentSpan) {
+ paraAlign = ((AlignmentSpan) spans[n]).getAlignment();
+ break;
+ }
+ }
+ }
+
+ final int length = spans.length;
+ boolean useFirstLineMargin = isFirstParaLine;
+ for (int n = 0; n < length; n++) {
+ if (spans[n] instanceof LeadingMarginSpan2) {
+ int count = ((LeadingMarginSpan2) spans[n]).getLeadingMarginLineCount();
+ int startLine = getLineForOffset(sp.getSpanStart(spans[n]));
+ if (lineNum < startLine + count) {
+ useFirstLineMargin = true;
+ break;
+ }
+ }
+ }
+ for (int n = 0; n < length; n++) {
+ if (spans[n] instanceof LeadingMarginSpan) {
+ LeadingMarginSpan margin = (LeadingMarginSpan) spans[n];
+ if (dir == DIR_RIGHT_TO_LEFT) {
+ right -= margin.getLeadingMargin(useFirstLineMargin);
+ } else {
+ left += margin.getLeadingMargin(useFirstLineMargin);
+ }
+ }
+ }
+ }
+
+ if (getLineContainsTab(lineNum)) {
+ tabStops = new TabStops(TAB_INCREMENT, spans);
+ }
+
+ final Alignment align;
+ if (paraAlign == Alignment.ALIGN_LEFT) {
+ align = (dir == DIR_LEFT_TO_RIGHT) ? Alignment.ALIGN_NORMAL : Alignment.ALIGN_OPPOSITE;
+ } else if (paraAlign == Alignment.ALIGN_RIGHT) {
+ align = (dir == DIR_LEFT_TO_RIGHT) ? Alignment.ALIGN_OPPOSITE : Alignment.ALIGN_NORMAL;
+ } else {
+ align = paraAlign;
+ }
+
+ final int indentWidth;
+ if (align == Alignment.ALIGN_NORMAL) {
+ if (dir == DIR_LEFT_TO_RIGHT) {
+ indentWidth = getIndentAdjust(lineNum, Alignment.ALIGN_LEFT);
+ } else {
+ indentWidth = -getIndentAdjust(lineNum, Alignment.ALIGN_RIGHT);
+ }
+ } else if (align == Alignment.ALIGN_OPPOSITE) {
+ if (dir == DIR_LEFT_TO_RIGHT) {
+ indentWidth = -getIndentAdjust(lineNum, Alignment.ALIGN_RIGHT);
+ } else {
+ indentWidth = getIndentAdjust(lineNum, Alignment.ALIGN_LEFT);
+ }
+ } else { // Alignment.ALIGN_CENTER
+ indentWidth = getIndentAdjust(lineNum, Alignment.ALIGN_CENTER);
+ }
+
+ return right - left - indentWidth;
+ }
+
/**
* @hide
*/
@@ -274,7 +372,7 @@
int previousLineEnd = getLineStart(firstLine);
ParagraphStyle[] spans = NO_PARA_SPANS;
int spanEnd = 0;
- TextPaint paint = mPaint;
+ final TextPaint paint = mPaint;
CharSequence buf = mText;
Alignment paraAlign = mAlignment;
@@ -288,6 +386,7 @@
for (int lineNum = firstLine; lineNum <= lastLine; lineNum++) {
int start = previousLineEnd;
previousLineEnd = getLineStart(lineNum + 1);
+ final boolean justify = isJustificationRequired(lineNum);
int end = getLineVisibleEnd(lineNum, start, previousLineEnd);
int ltop = previousLineBottom;
@@ -386,34 +485,42 @@
}
int x;
+ final int indentWidth;
if (align == Alignment.ALIGN_NORMAL) {
if (dir == DIR_LEFT_TO_RIGHT) {
- x = left + getIndentAdjust(lineNum, Alignment.ALIGN_LEFT);
+ indentWidth = getIndentAdjust(lineNum, Alignment.ALIGN_LEFT);
+ x = left + indentWidth;
} else {
- x = right + getIndentAdjust(lineNum, Alignment.ALIGN_RIGHT);
+ indentWidth = -getIndentAdjust(lineNum, Alignment.ALIGN_RIGHT);
+ x = right - indentWidth;
}
} else {
int max = (int)getLineExtent(lineNum, tabStops, false);
if (align == Alignment.ALIGN_OPPOSITE) {
if (dir == DIR_LEFT_TO_RIGHT) {
- x = right - max + getIndentAdjust(lineNum, Alignment.ALIGN_RIGHT);
+ indentWidth = -getIndentAdjust(lineNum, Alignment.ALIGN_RIGHT);
+ x = right - max - indentWidth;
} else {
- x = left - max + getIndentAdjust(lineNum, Alignment.ALIGN_LEFT);
+ indentWidth = getIndentAdjust(lineNum, Alignment.ALIGN_LEFT);
+ x = left - max + indentWidth;
}
} else { // Alignment.ALIGN_CENTER
+ indentWidth = getIndentAdjust(lineNum, Alignment.ALIGN_CENTER);
max = max & ~1;
- x = ((right + left - max) >> 1) +
- getIndentAdjust(lineNum, Alignment.ALIGN_CENTER);
+ x = ((right + left - max) >> 1) + indentWidth;
}
}
paint.setHyphenEdit(getHyphen(lineNum));
Directions directions = getLineDirections(lineNum);
- if (directions == DIRS_ALL_LEFT_TO_RIGHT && !mSpannedText && !hasTab) {
+ if (directions == DIRS_ALL_LEFT_TO_RIGHT && !mSpannedText && !hasTab && !justify) {
// XXX: assumes there's nothing additional to be done
canvas.drawText(buf, start, end, x, lbaseline, paint);
} else {
tl.set(paint, buf, start, end, dir, directions, hasTab, tabStops);
+ if (justify) {
+ tl.justify(right - left - indentWidth);
+ }
tl.draw(canvas, x, ltop, lbaseline, lbottom);
}
paint.setHyphenEdit(0);
@@ -1094,6 +1201,9 @@
TextLine tl = TextLine.obtain();
mPaint.setHyphenEdit(getHyphen(line));
tl.set(mPaint, mText, start, end, dir, directions, hasTabs, tabStops);
+ if (isJustificationRequired(line)) {
+ tl.justify(getJustifyWidth(line));
+ }
float width = tl.metrics(null);
mPaint.setHyphenEdit(0);
TextLine.recycle(tl);
@@ -1118,6 +1228,9 @@
TextLine tl = TextLine.obtain();
mPaint.setHyphenEdit(getHyphen(line));
tl.set(mPaint, mText, start, end, dir, directions, hasTabs, tabStops);
+ if (isJustificationRequired(line)) {
+ tl.justify(getJustifyWidth(line));
+ }
float width = tl.metrics(null);
mPaint.setHyphenEdit(0);
TextLine.recycle(tl);
@@ -1303,10 +1416,7 @@
return end - 1;
}
- // Note: keep this in sync with Minikin LineBreaker::isLineEndSpace()
- if (!(ch == ' ' || ch == '\t' || ch == 0x1680 ||
- (0x2000 <= ch && ch <= 0x200A && ch != 0x2007) ||
- ch == 0x205F || ch == 0x3000)) {
+ if (!TextLine.isLineEndSpace(ch)) {
break;
}
@@ -2086,6 +2196,7 @@
private boolean mSpannedText;
private TextDirectionHeuristic mTextDir;
private SpanSet<LineBackgroundSpan> mLineBackgroundSpans;
+ private boolean mJustify;
public static final int DIR_LEFT_TO_RIGHT = 1;
public static final int DIR_RIGHT_TO_LEFT = -1;
diff --git a/core/java/android/text/StaticLayout.java b/core/java/android/text/StaticLayout.java
index 081be3a..cb5b073 100644
--- a/core/java/android/text/StaticLayout.java
+++ b/core/java/android/text/StaticLayout.java
@@ -94,6 +94,7 @@
b.mMaxLines = Integer.MAX_VALUE;
b.mBreakStrategy = Layout.BREAK_STRATEGY_SIMPLE;
b.mHyphenationFrequency = Layout.HYPHENATION_FREQUENCY_NONE;
+ b.mJustify = false;
b.mMeasuredText = MeasuredText.obtain();
return b;
@@ -320,6 +321,17 @@
}
/**
+ * Enables or disables paragraph justification. The default value is disabled (false).
+ *
+ * @param justify true for enabling and false for disabling paragraph justification.
+ * @return this builder, useful for chaining.
+ */
+ public Builder setJustify(boolean justify) {
+ mJustify = justify;
+ return this;
+ }
+
+ /**
* Measurement and break iteration is done in native code. The protocol for using
* the native code is as follows.
*
@@ -404,6 +416,7 @@
int mHyphenationFrequency;
int[] mLeftIndents;
int[] mRightIndents;
+ boolean mJustify;
Paint.FontMetricsInt mFontMetricsInt = new Paint.FontMetricsInt();
@@ -557,6 +570,7 @@
mLeftIndents = b.mLeftIndents;
mRightIndents = b.mRightIndents;
+ setJustify(b.mJustify);
generate(b, b.mIncludePad, b.mIncludePad);
}
@@ -676,7 +690,8 @@
nSetupParagraph(b.mNativePtr, chs, paraEnd - paraStart,
firstWidth, firstWidthLineCount, restWidth,
- variableTabStops, TAB_INCREMENT, b.mBreakStrategy, b.mHyphenationFrequency);
+ variableTabStops, TAB_INCREMENT, b.mBreakStrategy, b.mHyphenationFrequency,
+ b.mJustify);
if (mLeftIndents != null || mRightIndents != null) {
// TODO(raph) performance: it would be better to do this once per layout rather
// than once per paragraph, but that would require a change to the native
@@ -1284,7 +1299,8 @@
// Set up paragraph text and settings; done as one big method to minimize jni crossings
private static native void nSetupParagraph(long nativePtr, char[] text, int length,
float firstWidth, int firstWidthLineCount, float restWidth,
- int[] variableTabStops, int defaultTabStop, int breakStrategy, int hyphenationFrequency);
+ int[] variableTabStops, int defaultTabStop, int breakStrategy, int hyphenationFrequency,
+ boolean isJustified);
private static native float nAddStyleRun(long nativePtr, long nativePaint,
long nativeTypeface, int start, int end, boolean isRtl);
diff --git a/core/java/android/text/TextLine.java b/core/java/android/text/TextLine.java
index c411860..fcff9a2 100644
--- a/core/java/android/text/TextLine.java
+++ b/core/java/android/text/TextLine.java
@@ -54,6 +54,10 @@
private char[] mChars;
private boolean mCharsValid;
private Spanned mSpanned;
+
+ // Additional width of whitespace for justification. This value is per whitespace, thus
+ // the line width will increase by mAddedWidth x (number of stretchable whitespaces).
+ private float mAddedWidth;
private final TextPaint mWorkPaint = new TextPaint();
private final SpanSet<MetricAffectingSpan> mMetricAffectingSpanSpanSet =
new SpanSet<MetricAffectingSpan>(MetricAffectingSpan.class);
@@ -177,6 +181,25 @@
}
}
mTabs = tabStops;
+ mAddedWidth = 0;
+ }
+
+ /**
+ * Justify the line to the given width.
+ */
+ void justify(float justifyWidth) {
+ int end = mLen;
+ while (end > 0 && isLineEndSpace(mText.charAt(mStart + end - 1))) {
+ end--;
+ }
+ final int spaces = countStretchableSpaces(0, end);
+ if (spaces == 0) {
+ // There are no stretchable spaces, so we can't help the justification by adding any
+ // width.
+ return;
+ }
+ final float width = Math.abs(measure(end, false, null));
+ mAddedWidth = (justifyWidth - width) / spaces;
}
/**
@@ -595,6 +618,7 @@
TextPaint wp = mWorkPaint;
wp.set(mPaint);
+ wp.setWordSpacing(mAddedWidth);
int spanStart = runStart;
int spanLimit;
@@ -695,6 +719,7 @@
Canvas c, float x, int top, int y, int bottom,
FontMetricsInt fmi, boolean needWidth, int offset) {
+ wp.setWordSpacing(mAddedWidth);
// Get metrics first (even for empty strings or "0" width runs)
if (fmi != null) {
expandMetricsFromPaint(fmi, wp);
@@ -981,5 +1006,34 @@
return TabStops.nextDefaultStop(h, TAB_INCREMENT);
}
+ private boolean isStretchableWhitespace(int ch) {
+ // TODO: Support other stretchable whitespace. (Bug: 34013491)
+ return ch == 0x0020 || ch == 0x00A0;
+ }
+
+ private int nextStretchableSpace(int start, int end) {
+ for (int i = start; i < end; i++) {
+ final char c = mCharsValid ? mChars[i] : mText.charAt(i + mStart);
+ if (isStretchableWhitespace(c)) return i;
+ }
+ return end;
+ }
+
+ /* Return the number of spaces in the text line, for the purpose of justification */
+ private int countStretchableSpaces(int start, int end) {
+ int count = 0;
+ for (int i = start; i < end; i = nextStretchableSpace(i + 1, end)) {
+ count++;
+ }
+ return count;
+ }
+
+ // Note: keep this in sync with Minikin LineBreaker::isLineEndSpace()
+ public static boolean isLineEndSpace(char ch) {
+ return ch == ' ' || ch == '\t' || ch == 0x1680
+ || (0x2000 <= ch && ch <= 0x200A && ch != 0x2007)
+ || ch == 0x205F || ch == 0x3000;
+ }
+
private static final int TAB_INCREMENT = 20;
}
diff --git a/core/java/android/text/TextUtils.java b/core/java/android/text/TextUtils.java
index 58bc9a7..bb952ab 100644
--- a/core/java/android/text/TextUtils.java
+++ b/core/java/android/text/TextUtils.java
@@ -29,6 +29,8 @@
import android.os.SystemProperties;
import android.provider.Settings;
import android.text.style.AbsoluteSizeSpan;
+import android.text.style.AccessibilityClickableSpan;
+import android.text.style.AccessibilityURLSpan;
import android.text.style.AlignmentSpan;
import android.text.style.BackgroundColorSpan;
import android.text.style.BulletSpan;
@@ -621,7 +623,11 @@
/** @hide */
public static final int TTS_SPAN = 24;
/** @hide */
- public static final int LAST_SPAN = TTS_SPAN;
+ public static final int ACCESSIBILITY_CLICKABLE_SPAN = 25;
+ /** @hide */
+ public static final int ACCESSIBILITY_URL_SPAN = 26;
+ /** @hide */
+ public static final int LAST_SPAN = ACCESSIBILITY_URL_SPAN;
/**
* Flatten a CharSequence and whatever styles can be copied across processes
@@ -803,6 +809,14 @@
readSpan(p, sp, new TtsSpan(p));
break;
+ case ACCESSIBILITY_CLICKABLE_SPAN:
+ readSpan(p, sp, new AccessibilityClickableSpan(p));
+ break;
+
+ case ACCESSIBILITY_URL_SPAN:
+ readSpan(p, sp, new AccessibilityURLSpan(p));
+ break;
+
default:
throw new RuntimeException("bogus span encoding " + kind);
}
diff --git a/core/java/android/text/style/AccessibilityClickableSpan.java b/core/java/android/text/style/AccessibilityClickableSpan.java
new file mode 100644
index 0000000..9c305ff
--- /dev/null
+++ b/core/java/android/text/style/AccessibilityClickableSpan.java
@@ -0,0 +1,156 @@
+/*
+ * Copyright (C) 2016 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.text.style;
+
+import static android.view.accessibility.AccessibilityNodeInfo.ACTION_ARGUMENT_ACCESSIBLE_CLICKABLE_SPAN;
+
+import android.os.Bundle;
+import android.os.Parcel;
+import android.os.Parcelable;
+import android.text.ParcelableSpan;
+import android.text.Spanned;
+import android.text.TextUtils;
+import android.view.View;
+import android.view.accessibility.AccessibilityNodeInfo;
+
+import com.android.internal.R;
+
+import java.lang.ref.WeakReference;
+
+
+/**
+ * {@link ClickableSpan} cannot be parceled, but accessibility services need to be able to cause
+ * their callback handlers to be called. This class serves as a parcelable placeholder for the
+ * real spans.
+ *
+ * This span is also passed back to an app's process when an accessibility service tries to click
+ * it. It contains enough information to track down the original clickable span so it can be
+ * called.
+ *
+ * @hide
+ */
+public class AccessibilityClickableSpan extends ClickableSpan
+ implements ParcelableSpan {
+ // The id of the span this one replaces
+ private final int mOriginalClickableSpanId;
+
+ // Only retain a weak reference to the node to avoid referencing cycles that could create memory
+ // leaks.
+ private WeakReference<AccessibilityNodeInfo> mAccessibilityNodeInfoRef;
+
+
+ /**
+ * @param originalClickableSpanId The id of the span this one replaces
+ */
+ public AccessibilityClickableSpan(int originalClickableSpanId) {
+ mOriginalClickableSpanId = originalClickableSpanId;
+ }
+
+ public AccessibilityClickableSpan(Parcel p) {
+ mOriginalClickableSpanId = p.readInt();
+ }
+
+ @Override
+ public int getSpanTypeId() {
+ return getSpanTypeIdInternal();
+ }
+
+ @Override
+ public int getSpanTypeIdInternal() {
+ return TextUtils.ACCESSIBILITY_CLICKABLE_SPAN;
+ }
+
+ @Override
+ public int describeContents() {
+ return 0;
+ }
+
+ @Override
+ public void writeToParcel(Parcel dest, int flags) {
+ writeToParcelInternal(dest, flags);
+ }
+
+ @Override
+ public void writeToParcelInternal(Parcel dest, int flags) {
+ dest.writeInt(mOriginalClickableSpanId);
+ }
+
+ /**
+ * Find the ClickableSpan that matches the one used to create this object.
+ *
+ * @param text The text that contains the original ClickableSpan.
+ * @return The ClickableSpan that matches this object, or {@code null} if no such object
+ * can be found.
+ */
+ public ClickableSpan findClickableSpan(CharSequence text) {
+ if (!(text instanceof Spanned)) {
+ return null;
+ }
+ Spanned sp = (Spanned) text;
+ ClickableSpan[] os = sp.getSpans(0, text.length(), ClickableSpan.class);
+ for (int i = 0; i < os.length; i++) {
+ if (os[i].getId() == mOriginalClickableSpanId) {
+ return os[i];
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Set the accessibilityNodeInfo that this placeholder belongs to. This node is not
+ * included in the parceling logic, and must be set to allow the onClick handler to function.
+ *
+ * @param accessibilityNodeInfo The info this span is part of
+ */
+ public void setAccessibilityNodeInfo(AccessibilityNodeInfo accessibilityNodeInfo) {
+ mAccessibilityNodeInfoRef = new WeakReference<>(accessibilityNodeInfo);
+ }
+
+ /**
+ * Perform the click from an accessibility service. Will not work unless
+ * setAccessibilityNodeInfo is called with a properly initialized node.
+ *
+ * @param unused This argument is required by the superclass but is unused. The real view will
+ * be determined by the AccessibilityNodeInfo.
+ */
+ @Override
+ public void onClick(View unused) {
+ if (mAccessibilityNodeInfoRef == null) {
+ return;
+ }
+ AccessibilityNodeInfo info = mAccessibilityNodeInfoRef.get();
+ if (info == null) {
+ return;
+ }
+ Bundle arguments = new Bundle();
+ arguments.putParcelable(ACTION_ARGUMENT_ACCESSIBLE_CLICKABLE_SPAN, this);
+
+ info.performAction(R.id.accessibilityActionClickOnClickableSpan, arguments);
+ }
+
+ public static final Parcelable.Creator<AccessibilityClickableSpan> CREATOR =
+ new Parcelable.Creator<AccessibilityClickableSpan>() {
+ @Override
+ public AccessibilityClickableSpan createFromParcel(Parcel parcel) {
+ return new AccessibilityClickableSpan(parcel);
+ }
+
+ @Override
+ public AccessibilityClickableSpan[] newArray(int size) {
+ return new AccessibilityClickableSpan[size];
+ }
+ };
+}
diff --git a/core/java/android/text/style/AccessibilityURLSpan.java b/core/java/android/text/style/AccessibilityURLSpan.java
new file mode 100644
index 0000000..0147009
--- /dev/null
+++ b/core/java/android/text/style/AccessibilityURLSpan.java
@@ -0,0 +1,79 @@
+/*
+ * Copyright (C) 2016 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.text.style;
+
+import android.os.Parcel;
+import android.os.Parcelable;
+import android.text.TextUtils;
+import android.view.View;
+import android.view.accessibility.AccessibilityNodeInfo;
+
+/**
+ * URLSpan's onClick method does not work from an accessibility service. This version of it does.
+ * It is used to replace URLSpans in {@link AccessibilityNodeInfo#setText(CharSequence)}
+ * @hide
+ */
+public class AccessibilityURLSpan extends URLSpan implements Parcelable {
+ final AccessibilityClickableSpan mAccessibilityClickableSpan;
+
+ /**
+ * @param spanToReplace The original span
+ */
+ public AccessibilityURLSpan(URLSpan spanToReplace) {
+ super(spanToReplace.getURL());
+ mAccessibilityClickableSpan =
+ new AccessibilityClickableSpan(spanToReplace.getId());
+ }
+
+ public AccessibilityURLSpan(Parcel p) {
+ super(p);
+ mAccessibilityClickableSpan = new AccessibilityClickableSpan(p);
+ }
+
+ @Override
+ public int getSpanTypeId() {
+ return getSpanTypeIdInternal();
+ }
+
+ @Override
+ public int getSpanTypeIdInternal() {
+ return TextUtils.ACCESSIBILITY_URL_SPAN;
+ }
+
+ @Override
+ public void writeToParcel(Parcel dest, int flags) {
+ writeToParcelInternal(dest, flags);
+ }
+
+ @Override
+ public void writeToParcelInternal(Parcel dest, int flags) {
+ super.writeToParcelInternal(dest, flags);
+ mAccessibilityClickableSpan.writeToParcel(dest, flags);
+ }
+
+ @Override
+ public void onClick(View unused) {
+ mAccessibilityClickableSpan.onClick(unused);
+ }
+
+ /**
+ * Delegated to AccessibilityClickableSpan
+ * @param accessibilityNodeInfo
+ */
+ public void setAccessibilityNodeInfo(AccessibilityNodeInfo accessibilityNodeInfo) {
+ mAccessibilityClickableSpan.setAccessibilityNodeInfo(accessibilityNodeInfo);
+ }
+}
diff --git a/core/java/android/text/style/ClickableSpan.java b/core/java/android/text/style/ClickableSpan.java
index 989ef54..a183427 100644
--- a/core/java/android/text/style/ClickableSpan.java
+++ b/core/java/android/text/style/ClickableSpan.java
@@ -26,12 +26,15 @@
* be called.
*/
public abstract class ClickableSpan extends CharacterStyle implements UpdateAppearance {
+ private static int sIdCounter = 0;
+
+ private int mId = sIdCounter++;
/**
* Performs the click action associated with this span.
*/
public abstract void onClick(View widget);
-
+
/**
* Makes the text underlined and in the link color.
*/
@@ -40,4 +43,14 @@
ds.setColor(ds.linkColor);
ds.setUnderlineText(true);
}
+
+ /**
+ * Get the unique ID for this span.
+ *
+ * @return The unique ID.
+ * @hide
+ */
+ public int getId() {
+ return mId;
+ }
}
diff --git a/core/java/android/util/EventLog.java b/core/java/android/util/EventLog.java
index 99f6c2a9..79d16fb 100644
--- a/core/java/android/util/EventLog.java
+++ b/core/java/android/util/EventLog.java
@@ -59,7 +59,7 @@
private Exception mLastWtf;
// Layout of event log entry received from Android logger.
- // see system/core/include/log/logger.h
+ // see system/core/include/log/log.h
private static final int LENGTH_OFFSET = 0;
private static final int HEADER_SIZE_OFFSET = 2;
private static final int PROCESS_OFFSET = 4;
diff --git a/core/java/android/view/AccessibilityInteractionController.java b/core/java/android/view/AccessibilityInteractionController.java
index c7b1d03..13ee48e 100644
--- a/core/java/android/view/AccessibilityInteractionController.java
+++ b/core/java/android/view/AccessibilityInteractionController.java
@@ -16,6 +16,8 @@
package android.view;
+import static android.view.accessibility.AccessibilityNodeInfo.ACTION_ARGUMENT_ACCESSIBLE_CLICKABLE_SPAN;
+
import android.graphics.Point;
import android.graphics.Rect;
import android.graphics.Region;
@@ -24,8 +26,12 @@
import android.os.Handler;
import android.os.Looper;
import android.os.Message;
+import android.os.Parcelable;
import android.os.Process;
import android.os.RemoteException;
+import android.text.TextUtils;
+import android.text.style.AccessibilityClickableSpan;
+import android.text.style.ClickableSpan;
import android.util.LongSparseArray;
import android.view.View.AttachInfo;
import android.view.accessibility.AccessibilityInteractionClient;
@@ -33,6 +39,7 @@
import android.view.accessibility.AccessibilityNodeProvider;
import android.view.accessibility.IAccessibilityInteractionConnectionCallback;
+import com.android.internal.R;
import com.android.internal.os.SomeArgs;
import com.android.internal.util.Predicate;
@@ -655,17 +662,23 @@
target = mViewRootImpl.mView;
}
if (target != null && isShown(target)) {
- AccessibilityNodeProvider provider = target.getAccessibilityNodeProvider();
- if (provider != null) {
- if (virtualDescendantId != AccessibilityNodeInfo.UNDEFINED_ITEM_ID) {
- succeeded = provider.performAction(virtualDescendantId, action,
- arguments);
- } else {
- succeeded = provider.performAction(AccessibilityNodeProvider.HOST_VIEW_ID,
- action, arguments);
+ if (action == R.id.accessibilityActionClickOnClickableSpan) {
+ // Handle this hidden action separately
+ succeeded = handleClickableSpanActionUiThread(
+ target, virtualDescendantId, arguments);
+ } else {
+ AccessibilityNodeProvider provider = target.getAccessibilityNodeProvider();
+ if (provider != null) {
+ if (virtualDescendantId != AccessibilityNodeInfo.UNDEFINED_ITEM_ID) {
+ succeeded = provider.performAction(virtualDescendantId, action,
+ arguments);
+ } else {
+ succeeded = provider.performAction(
+ AccessibilityNodeProvider.HOST_VIEW_ID, action, arguments);
+ }
+ } else if (virtualDescendantId == AccessibilityNodeInfo.UNDEFINED_ITEM_ID) {
+ succeeded = target.performAccessibilityAction(action, arguments);
}
- } else if (virtualDescendantId == AccessibilityNodeInfo.UNDEFINED_ITEM_ID) {
- succeeded = target.performAccessibilityAction(action, arguments);
}
}
} finally {
@@ -816,6 +829,37 @@
return (appScale != 1.0f || (spec != null && !spec.isNop()));
}
+ private boolean handleClickableSpanActionUiThread(
+ View view, int virtualDescendantId, Bundle arguments) {
+ Parcelable span = arguments.getParcelable(ACTION_ARGUMENT_ACCESSIBLE_CLICKABLE_SPAN);
+ if (!(span instanceof AccessibilityClickableSpan)) {
+ return false;
+ }
+
+ // Find the original ClickableSpan if it's still on the screen
+ AccessibilityNodeInfo infoWithSpan = null;
+ AccessibilityNodeProvider provider = view.getAccessibilityNodeProvider();
+ if (provider != null) {
+ int idForNode = (virtualDescendantId == AccessibilityNodeInfo.UNDEFINED_ITEM_ID)
+ ? AccessibilityNodeProvider.HOST_VIEW_ID : virtualDescendantId;
+ infoWithSpan = provider.createAccessibilityNodeInfo(idForNode);
+ } else if (virtualDescendantId == AccessibilityNodeInfo.UNDEFINED_ITEM_ID) {
+ infoWithSpan = view.createAccessibilityNodeInfo();
+ }
+ if (infoWithSpan == null) {
+ return false;
+ }
+
+ // Click on the corresponding span
+ ClickableSpan clickableSpan = ((AccessibilityClickableSpan) span).findClickableSpan(
+ infoWithSpan.getOriginalText());
+ if (clickableSpan != null) {
+ clickableSpan.onClick(view);
+ return true;
+ }
+ return false;
+ }
+
/**
* This class encapsulates a prefetching strategy for the accessibility APIs for
* querying window content. It is responsible to prefetch a batch of
diff --git a/core/java/android/view/IWindowManager.aidl b/core/java/android/view/IWindowManager.aidl
index 8611d69..c0ebd2c 100644
--- a/core/java/android/view/IWindowManager.aidl
+++ b/core/java/android/view/IWindowManager.aidl
@@ -190,16 +190,6 @@
void enableSurfaceTrace(in ParcelFileDescriptor fd);
void disableSurfaceTrace();
- /**
- * Cancels the window transitions for the given task.
- */
- void cancelTaskWindowTransition(int taskId);
-
- /**
- * Cancels the thumbnail transitions for the given task.
- */
- void cancelTaskThumbnailTransition(int taskId);
-
// These can only be called with the SET_ORIENTATION permission.
/**
* Update the current screen rotation based on the current state of
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index aedd0df..9d1af50 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -2502,7 +2502,8 @@
* 1 PFLAG3_CLUSTER
* 1 PFLAG3_SECTION
* 1 PFLAG3_FINGER_DOWN
- * xxxxx * NO LONGER NEEDED, SHOULD BE REUSED *
+ * 1 PFLAG3_FOCUSED_BY_DEFAULT
+ * xxxx * NO LONGER NEEDED, SHOULD BE REUSED *
* 1 PFLAG3_OVERLAPPING_RENDERING_FORCED_VALUE
* 1 PFLAG3_HAS_OVERLAPPING_RENDERING_FORCED
* 1 PFLAG3_TEMPORARY_DETACH
@@ -2723,6 +2724,14 @@
private static final int PFLAG3_FINGER_DOWN = 0x20000;
/**
+ * Flag indicating that this view is the default-focus view.
+ *
+ * @see #isFocusedByDefault()
+ * @see #setFocusedByDefault(boolean)
+ */
+ private static final int PFLAG3_FOCUSED_BY_DEFAULT = 0x40000;
+
+ /**
* Whether this view has rendered elements that overlap (see {@link
* #hasOverlappingRendering()}, {@link #forceHasOverlappingRendering(boolean)}, and
* {@link #getHasOverlappingRendering()} ). The value in this bit is only valid when
@@ -4765,6 +4774,11 @@
setKeyboardNavigationSection(a.getBoolean(attr, true));
}
break;
+ case R.styleable.View_focusedByDefault:
+ if (a.peekValue(attr) != null) {
+ setFocusedByDefault(a.getBoolean(attr, true));
+ }
+ break;
}
}
@@ -6156,8 +6170,8 @@
if (mParent != null) {
mParent.requestChildFocus(this, this);
- if (!isKeyboardNavigationCluster() && mParent instanceof ViewGroup) {
- ((ViewGroup) mParent).saveFocus();
+ if (mParent instanceof ViewGroup) {
+ ((ViewGroup) mParent).setDefaultFocus(this);
}
}
@@ -9211,6 +9225,66 @@
}
/**
+ * Returns whether this View should receive focus when the focus is restored for the view
+ * hierarchy containing this view.
+ * <p>
+ * Focus gets restored for a view hierarchy when the root of the hierarchy gets added to a
+ * window or serves as a target of cluster or section navigation.
+ *
+ * @see #restoreDefaultFocus(int)
+ *
+ * @return {@code true} if this view is the default-focus view, {@code false} otherwise
+ * @attr ref android.R.styleable#View_focusedByDefault
+ */
+ @ViewDebug.ExportedProperty(category = "focusedByDefault")
+ public final boolean isFocusedByDefault() {
+ return (mPrivateFlags3 & PFLAG3_FOCUSED_BY_DEFAULT) != 0;
+ }
+
+ /**
+ * Sets whether this View should receive focus when the focus is restored for the view
+ * hierarchy containing this view.
+ * <p>
+ * Focus gets restored for a view hierarchy when the root of the hierarchy gets added to a
+ * window or serves as a target of cluster or section navigation.
+ *
+ * @param isFocusedByDefault {@code true} to set this view as the default-focus view,
+ * {@code false} otherwise.
+ *
+ * @see #restoreDefaultFocus(int)
+ *
+ * @attr ref android.R.styleable#View_focusedByDefault
+ */
+ public void setFocusedByDefault(boolean isFocusedByDefault) {
+ if (isFocusedByDefault == ((mPrivateFlags3 & PFLAG3_FOCUSED_BY_DEFAULT) != 0)) {
+ return;
+ }
+
+ if (isFocusedByDefault) {
+ mPrivateFlags3 |= PFLAG3_FOCUSED_BY_DEFAULT;
+ } else {
+ mPrivateFlags3 &= ~PFLAG3_FOCUSED_BY_DEFAULT;
+ }
+
+ if (mParent instanceof ViewGroup) {
+ if (isFocusedByDefault) {
+ ((ViewGroup) mParent).setDefaultFocus(this);
+ } else {
+ ((ViewGroup) mParent).cleanDefaultFocus(this);
+ }
+ }
+ }
+
+ /**
+ * Returns whether the view hierarchy with this view as a root contain a default-focus view.
+ *
+ * @return {@code true} if this view has default focus, {@code false} otherwise
+ */
+ boolean hasDefaultFocus() {
+ return isFocusedByDefault();
+ }
+
+ /**
* Find the nearest keyboard navigation group in the specified direction. The group type can be
* either a cluster or a section.
* This does not actually give focus to that group.
@@ -9586,15 +9660,15 @@
}
/**
- * Gives focus to the last focused view in the view hierarchy that has this view as a root.
- * If the last focused view cannot be found, fall back to calling {@link #requestFocus()}.
- * Nested keyboard navigation clusters are excluded from the hierarchy considered for saving the
- * last focus.
+ * Gives focus to the default-focus view in the view hierarchy that has this view as a root.
+ * If the default-focus view cannot be found, falls back to calling {@link #requestFocus(int)}.
+ * Nested keyboard navigation clusters are excluded from the hierarchy.
*
- * @return Whether this view or one of its descendants actually took focus.
+ * @param direction The direction of the focus
+ * @return Whether this view or one of its descendants actually took focus
*/
- public boolean restoreLastFocus() {
- return requestFocus();
+ public boolean restoreDefaultFocus(@FocusDirection int direction) {
+ return requestFocus(direction);
}
/**
diff --git a/core/java/android/view/ViewGroup.java b/core/java/android/view/ViewGroup.java
index 1f1af4b..1b42a90 100644
--- a/core/java/android/view/ViewGroup.java
+++ b/core/java/android/view/ViewGroup.java
@@ -136,9 +136,9 @@
// The view contained within this ViewGroup that has or contains focus.
private View mFocused;
- // The last view contained within this ViewGroup (excluding nested keyboard navigation clusters)
- // that had or contained focus.
- private View mLastFocused;
+ // The view contained within this ViewGroup (excluding nested keyboard navigation clusters)
+ // that is or contains a default-focus view.
+ private View mDefaultFocus;
/**
* A Transformation used when drawing children, to
@@ -722,7 +722,7 @@
if (mFocused != null) {
mFocused.unFocus(this);
mFocused = null;
- mLastFocused = null;
+ mDefaultFocus = null;
}
super.handleFocusGainInternal(direction, previouslyFocusedRect);
}
@@ -753,17 +753,45 @@
}
/**
- * Saves the current focus as the last focus for this view and all its ancestors.
+ * Sets the specified child view as the default focus for this view and all its ancestors.
* If the view is inside a keyboard navigation cluster, stops at the root of the cluster since
- * the cluster forms a separate keyboard navigation hierarchy from the focus saving point of
+ * the cluster forms a separate keyboard navigation hierarchy from the default focus point of
* view.
*/
- void saveFocus() {
- mLastFocused = mFocused;
-
- if (!isKeyboardNavigationCluster() && mParent instanceof ViewGroup) {
- ((ViewGroup) mParent).saveFocus();
+ void setDefaultFocus(View child) {
+ if (child.isKeyboardNavigationCluster()) {
+ return;
}
+
+ mDefaultFocus = child;
+
+ if (mParent instanceof ViewGroup) {
+ ((ViewGroup) mParent).setDefaultFocus(this);
+ }
+ }
+
+ /**
+ * Destroys the default focus chain.
+ */
+ void cleanDefaultFocus(View child) {
+ if (mDefaultFocus != child) {
+ return;
+ }
+
+ if (child.isKeyboardNavigationCluster()) {
+ return;
+ }
+
+ mDefaultFocus = null;
+
+ if (mParent instanceof ViewGroup) {
+ ((ViewGroup) mParent).cleanDefaultFocus(this);
+ }
+ }
+
+ @Override
+ boolean hasDefaultFocus() {
+ return mDefaultFocus != null || super.hasDefaultFocus();
}
@Override
@@ -3054,14 +3082,14 @@
}
@Override
- public boolean restoreLastFocus() {
- if (mLastFocused != null && !mLastFocused.isKeyboardNavigationCluster()
+ public boolean restoreDefaultFocus(@FocusDirection int direction) {
+ if (mDefaultFocus != null && !mDefaultFocus.isKeyboardNavigationCluster()
&& getDescendantFocusability() != FOCUS_BLOCK_DESCENDANTS
- && (mLastFocused.mViewFlags & VISIBILITY_MASK) == VISIBLE
- && mLastFocused.restoreLastFocus()) {
+ && (mDefaultFocus.mViewFlags & VISIBILITY_MASK) == VISIBLE
+ && mDefaultFocus.restoreDefaultFocus(direction)) {
return true;
}
- return super.restoreLastFocus();
+ return super.restoreDefaultFocus(direction);
}
/**
@@ -4720,6 +4748,12 @@
if (mCurrentDragStartEvent != null && child.getVisibility() == VISIBLE) {
notifyChildOfDragStart(child);
}
+
+ if (child.hasDefaultFocus()) {
+ // When adding a child that contains default focus, either during inflation or while
+ // manually assembling the hierarchy, update the ancestor default-focus chain.
+ setDefaultFocus(child);
+ }
}
private void addInArray(View child, int index) {
@@ -4931,8 +4965,8 @@
view.unFocus(null);
clearChildFocus = true;
}
- if (view == mLastFocused) {
- mLastFocused = null;
+ if (view == mDefaultFocus) {
+ mDefaultFocus = null;
}
view.clearAccessibilityFocus();
@@ -5044,8 +5078,8 @@
view.unFocus(null);
clearChildFocus = true;
}
- if (view == mLastFocused) {
- mLastFocused = null;
+ if (view == mDefaultFocus) {
+ mDefaultFocus = null;
}
view.clearAccessibilityFocus();
@@ -5120,7 +5154,7 @@
boolean clearChildFocus = false;
needGlobalAttributesUpdate(false);
- mLastFocused = null;
+ mDefaultFocus = null;
for (int i = count - 1; i >= 0; i--) {
final View view = children[i];
@@ -5192,8 +5226,8 @@
if (child == mFocused) {
child.clearFocus();
}
- if (child == mLastFocused) {
- mLastFocused = null;
+ if (child == mDefaultFocus) {
+ mDefaultFocus = null;
}
child.clearAccessibilityFocus();
@@ -6276,11 +6310,11 @@
Log.d(VIEW_LOG_TAG, output);
mFocused.debug(depth + 1);
}
- if (mLastFocused != null) {
+ if (mDefaultFocus != null) {
output = debugIndent(depth);
- output += "mLastFocused";
+ output += "mDefaultFocus";
Log.d(VIEW_LOG_TAG, output);
- mLastFocused.debug(depth + 1);
+ mDefaultFocus.debug(depth + 1);
}
if (mChildrenCount != 0) {
output = debugIndent(depth);
diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java
index b42f769..9ddbbf2 100644
--- a/core/java/android/view/ViewRootImpl.java
+++ b/core/java/android/view/ViewRootImpl.java
@@ -2155,7 +2155,7 @@
+ mView.hasFocus());
if (mView != null) {
if (!mView.hasFocus()) {
- mView.requestFocus(View.FOCUS_FORWARD);
+ mView.restoreDefaultFocus(View.FOCUS_FORWARD);
if (DEBUG_INPUT_RESIZE) Log.v(mTag, "First: requested focused view="
+ mView.findFocus());
} else {
@@ -4403,7 +4403,7 @@
? focused.keyboardNavigationGroupSearch(groupType, null, direction)
: keyboardNavigationGroupSearch(groupType, null, direction);
- if (group != null && group.restoreLastFocus()) {
+ if (group != null && group.restoreDefaultFocus(View.FOCUS_DOWN)) {
return true;
}
diff --git a/core/java/android/view/WindowManagerPolicy.java b/core/java/android/view/WindowManagerPolicy.java
index caa09cc..dd85256 100644
--- a/core/java/android/view/WindowManagerPolicy.java
+++ b/core/java/android/view/WindowManagerPolicy.java
@@ -437,6 +437,15 @@
}
/**
+ * Holds the contents of a starting window. {@link #addSplashScreen} needs to wrap the
+ * contents of the starting window into an class implementing this interface, which then will be
+ * held by WM and passed into {@link #removeSplashScreen} when the starting window is no
+ * longer needed.
+ */
+ interface StartingSurface {
+ }
+
+ /**
* Interface for calling back in to the window manager that is private
* between it and the policy.
*/
@@ -738,17 +747,17 @@
* context to for resources.
*
* @return Optionally you can return the View that was used to create the
- * window, for easy removal in removeStartingWindow.
+ * window, for easy removal in removeSplashScreen.
*
- * @see #removeStartingWindow
+ * @see #removeSplashScreen
*/
- public View addStartingWindow(IBinder appToken, String packageName,
- int theme, CompatibilityInfo compatInfo, CharSequence nonLocalizedLabel,
- int labelRes, int icon, int logo, int windowFlags, Configuration overrideConfig);
+ public StartingSurface addSplashScreen(IBinder appToken, String packageName, int theme,
+ CompatibilityInfo compatInfo, CharSequence nonLocalizedLabel, int labelRes, int icon,
+ int logo, int windowFlags, Configuration overrideConfig);
/**
* Called when the first window of an application has been displayed, while
- * {@link #addStartingWindow} has created a temporary initial window for
+ * {@link #addSplashScreen} has created a temporary initial window for
* that application. You should at this point remove the window from the
* window manager. This is called without the window manager locked so
* that you can call back into it.
@@ -759,11 +768,11 @@
* even if you previously returned one.
*
* @param appToken Token of the application that has started.
- * @param window Window View that was returned by createStartingWindow.
+ * @param surface Surface that was returned by {@link #addSplashScreen}.
*
- * @see #addStartingWindow
+ * @see #addSplashScreen
*/
- public void removeStartingWindow(IBinder appToken, View window);
+ public void removeSplashScreen(IBinder appToken, StartingSurface surface);
/**
* Prepare for a window being added to the window manager. You can throw an
diff --git a/core/java/android/view/accessibility/AccessibilityManager.java b/core/java/android/view/accessibility/AccessibilityManager.java
index 13d5b85..7f940f1 100644
--- a/core/java/android/view/accessibility/AccessibilityManager.java
+++ b/core/java/android/view/accessibility/AccessibilityManager.java
@@ -16,6 +16,8 @@
package android.view.accessibility;
+import static android.accessibilityservice.AccessibilityServiceInfo.FLAG_ENABLE_ACCESSIBILITY_VOLUME;
+
import android.Manifest;
import android.accessibilityservice.AccessibilityServiceInfo;
import android.annotation.NonNull;
@@ -118,6 +120,8 @@
private final CopyOnWriteArrayList<HighTextContrastChangeListener>
mHighTextContrastStateChangeListeners = new CopyOnWriteArrayList<>();
+ private final CopyOnWriteArrayList<AccessibilityServicesStateChangeListener>
+ mServicesStateChangeListeners = new CopyOnWriteArrayList<>();
/**
* Listener for the system accessibility state. To listen for changes to the
* accessibility state on the device, implement this interface and register
@@ -130,7 +134,7 @@
*
* @param enabled Whether accessibility is enabled.
*/
- public void onAccessibilityStateChanged(boolean enabled);
+ void onAccessibilityStateChanged(boolean enabled);
}
/**
@@ -146,7 +150,20 @@
*
* @param enabled Whether touch exploration is enabled.
*/
- public void onTouchExplorationStateChanged(boolean enabled);
+ void onTouchExplorationStateChanged(boolean enabled);
+ }
+
+ /**
+ * Listener for changes to the state of accessibility services. Changes include services being
+ * enabled or disabled, or changes to the {@link AccessibilityServiceInfo} of a running service.
+ * {@see #addAccessibilityServicesStateChangeListener}.
+ */
+ public interface AccessibilityServicesStateChangeListener {
+
+ /**
+ * Called when the state of accessibility services changes.
+ */
+ void onAccessibilityServicesStateChanged();
}
/**
@@ -164,11 +181,12 @@
*
* @param enabled Whether high text contrast is enabled.
*/
- public void onHighTextContrastStateChanged(boolean enabled);
+ void onHighTextContrastStateChanged(boolean enabled);
}
private final IAccessibilityManagerClient.Stub mClient =
new IAccessibilityManagerClient.Stub() {
+ @Override
public void setState(int state) {
// We do not want to change this immediately as the application may
// have already checked that accessibility is on and fired an event,
@@ -178,6 +196,11 @@
// events when accessibility is off.
mHandler.obtainMessage(MyHandler.MSG_SET_STATE, state, 0).sendToTarget();
}
+
+ @Override
+ public void notifyServicesStateChanged() {
+ mHandler.obtainMessage(MyHandler.MSG_NOTIFY_SERVICES_STATE_CHANGED).sendToTarget();
+ }
};
/**
@@ -519,6 +542,30 @@
}
/**
+ * Registers a {@link AccessibilityServicesStateChangeListener}.
+ *
+ * @param listener The listener.
+ * @return True if successfully registered.
+ */
+ public boolean addAccessibilityServicesStateChangeListener(
+ @NonNull AccessibilityServicesStateChangeListener listener) {
+ // Final CopyOnWriteArrayList - no lock needed.
+ return mServicesStateChangeListeners.add(listener);
+ }
+
+ /**
+ * Unregisters a {@link AccessibilityServicesStateChangeListener}.
+ *
+ * @param listener The listener.
+ * @return True if successfully unregistered.
+ */
+ public boolean removeAccessibilityServicesStateChangeListener(
+ @NonNull AccessibilityServicesStateChangeListener listener) {
+ // Final CopyOnWriteArrayList - no lock needed.
+ return mServicesStateChangeListeners.remove(listener);
+ }
+
+ /**
* Registers a {@link HighTextContrastChangeListener} for changes in
* the global high text contrast state of the system.
*
@@ -548,6 +595,24 @@
}
/**
+ * Check if the accessibility volume stream is active.
+ *
+ * @return True if accessibility volume is active (i.e. some service has requested it). False
+ * otherwise.
+ * @hide
+ */
+ public boolean isAccessibilityVolumeStreamActive() {
+ List<AccessibilityServiceInfo> serviceInfos =
+ getEnabledAccessibilityServiceList(AccessibilityServiceInfo.FEEDBACK_ALL_MASK);
+ for (int i = 0; i < serviceInfos.size(); i++) {
+ if ((serviceInfos.get(i).flags & FLAG_ENABLE_ACCESSIBILITY_VOLUME) != 0) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
* Sets the current state and notifies listeners, if necessary.
*
* @param stateFlags The state flags.
@@ -662,7 +727,7 @@
isEnabled = mIsEnabled;
}
// Listeners are a final CopyOnWriteArrayList, hence no lock needed.
- for (AccessibilityStateChangeListener listener :mAccessibilityStateChangeListeners) {
+ for (AccessibilityStateChangeListener listener : mAccessibilityStateChangeListeners) {
listener.onAccessibilityStateChanged(isEnabled);
}
}
@@ -695,11 +760,22 @@
}
}
+ /**
+ * Notifies the registered {@link AccessibilityServicesStateChangeListener}s.
+ */
+ private void handleNotifyServicesStateChanged() {
+ // Listeners are a final CopyOnWriteArrayList, hence no lock needed.
+ for (AccessibilityServicesStateChangeListener listener : mServicesStateChangeListeners) {
+ listener.onAccessibilityServicesStateChanged();
+ }
+ }
+
private final class MyHandler extends Handler {
public static final int MSG_NOTIFY_ACCESSIBILITY_STATE_CHANGED = 1;
public static final int MSG_NOTIFY_EXPLORATION_STATE_CHANGED = 2;
public static final int MSG_NOTIFY_HIGH_TEXT_CONTRAST_STATE_CHANGED = 3;
public static final int MSG_SET_STATE = 4;
+ public static final int MSG_NOTIFY_SERVICES_STATE_CHANGED = 5;
public MyHandler(Looper looper) {
super(looper, null, false);
@@ -720,6 +796,10 @@
handleNotifyHighTextContrastStateChanged();
} break;
+ case MSG_NOTIFY_SERVICES_STATE_CHANGED: {
+ handleNotifyServicesStateChanged();
+ } break;
+
case MSG_SET_STATE: {
// See comment at mClient
final int state = message.arg1;
diff --git a/core/java/android/view/accessibility/AccessibilityNodeInfo.java b/core/java/android/view/accessibility/AccessibilityNodeInfo.java
index 9127861..91468da 100644
--- a/core/java/android/view/accessibility/AccessibilityNodeInfo.java
+++ b/core/java/android/view/accessibility/AccessibilityNodeInfo.java
@@ -25,7 +25,13 @@
import android.os.Parcel;
import android.os.Parcelable;
import android.text.InputType;
+import android.text.Spannable;
+import android.text.Spanned;
import android.text.TextUtils;
+import android.text.style.AccessibilityClickableSpan;
+import android.text.style.AccessibilityURLSpan;
+import android.text.style.ClickableSpan;
+import android.text.style.URLSpan;
import android.util.ArraySet;
import android.util.LongArray;
import android.util.Pools.SynchronizedPool;
@@ -464,6 +470,14 @@
public static final String ACTION_ARGUMENT_PROGRESS_VALUE =
"android.view.accessibility.action.ARGUMENT_PROGRESS_VALUE";
+ /**
+ * Argument to pass the {@link AccessibilityClickableSpan}.
+ * For use with R.id.accessibilityActionClickOnClickableSpan
+ * @hide
+ */
+ public static final String ACTION_ARGUMENT_ACCESSIBLE_CLICKABLE_SPAN =
+ "android.view.accessibility.action.ACTION_ARGUMENT_ACCESSIBLE_CLICKABLE_SPAN";
+
// Focus types
/**
@@ -628,6 +642,8 @@
private CharSequence mPackageName;
private CharSequence mClassName;
+ // Hidden, unparceled value used to hold the original value passed to setText
+ private CharSequence mOriginalText;
private CharSequence mText;
private CharSequence mError;
private CharSequence mContentDescription;
@@ -2213,14 +2229,49 @@
/**
* Gets the text of this node.
+ * <p>
+ * <strong>Note:</strong> If the text contains {@link ClickableSpan}s or {@link URLSpan}s,
+ * these spans will have been replaced with ones whose {@link ClickableSpan#onClick(View)}
+ * can be called from an {@link AccessibilityService}. When called from a service, the
+ * {@link View} argument is ignored and the corresponding span will be found on the view that
+ * this {@code AccessibilityNodeInfo} represents and called with that view as its argument.
+ * <p>
+ * This treatment of {@link ClickableSpan}s means that the text returned from this method may
+ * different slightly one passed to {@link #setText(CharSequence)}, although they will be
+ * equivalent according to {@link TextUtils#equals(CharSequence, CharSequence)}. The
+ * {@link ClickableSpan#onClick(View)} of any spans, however, will generally not work outside
+ * of an accessibility service.
+ * </p>
*
* @return The text.
*/
public CharSequence getText() {
+ // Attach this node to any spans that need it
+ if (mText instanceof Spanned) {
+ Spanned spanned = (Spanned) mText;
+ AccessibilityClickableSpan[] clickableSpans =
+ spanned.getSpans(0, mText.length(), AccessibilityClickableSpan.class);
+ for (int i = 0; i < clickableSpans.length; i++) {
+ clickableSpans[i].setAccessibilityNodeInfo(this);
+ }
+ AccessibilityURLSpan[] urlSpans =
+ spanned.getSpans(0, mText.length(), AccessibilityURLSpan.class);
+ for (int i = 0; i < urlSpans.length; i++) {
+ urlSpans[i].setAccessibilityNodeInfo(this);
+ }
+ }
return mText;
}
/**
+ * Get the text passed to setText before any changes to the spans.
+ * @hide
+ */
+ public CharSequence getOriginalText() {
+ return mOriginalText;
+ }
+
+ /**
* Sets the text of this node.
* <p>
* <strong>Note:</strong> Cannot be called from an
@@ -2234,6 +2285,34 @@
*/
public void setText(CharSequence text) {
enforceNotSealed();
+ mOriginalText = text;
+ // Replace any ClickableSpans in mText with placeholders
+ if (text instanceof Spanned) {
+ ClickableSpan[] spans =
+ ((Spanned) text).getSpans(0, text.length(), ClickableSpan.class);
+ if (spans.length > 0) {
+ Spannable spannable = Spannable.Factory.getInstance().newSpannable(text);
+ for (int i = 0; i < spans.length; i++) {
+ ClickableSpan span = spans[i];
+ if ((span instanceof AccessibilityClickableSpan)
+ || (span instanceof AccessibilityURLSpan)) {
+ // We've already done enough
+ break;
+ }
+ int spanToReplaceStart = spannable.getSpanStart(span);
+ int spanToReplaceEnd = spannable.getSpanEnd(span);
+ int spanToReplaceFlags = spannable.getSpanFlags(span);
+ spannable.removeSpan(span);
+ ClickableSpan replacementSpan = (span instanceof URLSpan)
+ ? new AccessibilityURLSpan((URLSpan) span)
+ : new AccessibilityClickableSpan(span.getId());
+ spannable.setSpan(replacementSpan, spanToReplaceStart, spanToReplaceEnd,
+ spanToReplaceFlags);
+ }
+ mText = spannable;
+ return;
+ }
+ }
mText = (text == null) ? null : text.subSequence(0, text.length());
}
diff --git a/core/java/android/view/accessibility/IAccessibilityManagerClient.aidl b/core/java/android/view/accessibility/IAccessibilityManagerClient.aidl
index 5e7e813..045ac91 100644
--- a/core/java/android/view/accessibility/IAccessibilityManagerClient.aidl
+++ b/core/java/android/view/accessibility/IAccessibilityManagerClient.aidl
@@ -25,4 +25,5 @@
oneway interface IAccessibilityManagerClient {
void setState(int stateFlags);
+ void notifyServicesStateChanged();
}
diff --git a/core/java/android/webkit/WebViewFactory.java b/core/java/android/webkit/WebViewFactory.java
index eb0c44c..d7a49e4 100644
--- a/core/java/android/webkit/WebViewFactory.java
+++ b/core/java/android/webkit/WebViewFactory.java
@@ -59,8 +59,8 @@
// visible for WebViewZygoteInit to look up the class by reflection and call preloadInZygote.
/** @hide */
- public static final String CHROMIUM_WEBVIEW_FACTORY =
- "com.android.webview.chromium.WebViewChromiumFactoryProvider";
+ private static final String CHROMIUM_WEBVIEW_FACTORY =
+ "com.android.webview.chromium.WebViewChromiumFactoryProviderForO";
private static final String CHROMIUM_WEBVIEW_FACTORY_METHOD = "create";
@@ -143,6 +143,23 @@
}
/**
+ * @hide
+ */
+ public static Class<WebViewFactoryProvider> getWebViewProviderClass( ClassLoader clazzLoader)
+ throws ClassNotFoundException{
+ try {
+ return (Class<WebViewFactoryProvider>) Class.forName(CHROMIUM_WEBVIEW_FACTORY,
+ true, clazzLoader);
+ } catch (ClassNotFoundException e) {
+ // TODO: This loads the provider which is not built for O, should be removed
+ // before the release.
+ return (Class<WebViewFactoryProvider>) Class.forName(
+ "com.android.webview.chromium.WebViewChromiumFactoryProvider",
+ true, clazzLoader);
+ }
+ }
+
+ /**
* Load the native library for the given package name iff that package
* name is the same as the one providing the webview.
*/
@@ -366,9 +383,9 @@
Trace.traceBegin(Trace.TRACE_TAG_WEBVIEW, "Class.forName()");
try {
- return (Class<WebViewFactoryProvider>) Class.forName(CHROMIUM_WEBVIEW_FACTORY,
- true, clazzLoader);
- } finally {
+ return getWebViewProviderClass(clazzLoader);
+ }
+ finally {
Trace.traceEnd(Trace.TRACE_TAG_WEBVIEW);
}
} catch (ClassNotFoundException e) {
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java
index 9335811..1ddf53d 100644
--- a/core/java/android/widget/TextView.java
+++ b/core/java/android/widget/TextView.java
@@ -596,6 +596,7 @@
private int mBreakStrategy;
private int mHyphenationFrequency;
+ private boolean mJustify;
private int mMaximum = Integer.MAX_VALUE;
private int mMaxMode = LINES;
@@ -769,6 +770,7 @@
String fontFeatureSettings = null;
mBreakStrategy = Layout.BREAK_STRATEGY_SIMPLE;
mHyphenationFrequency = Layout.HYPHENATION_FREQUENCY_NONE;
+ mJustify = false;
final Resources.Theme theme = context.getTheme();
@@ -3298,6 +3300,29 @@
}
/**
+ * Enables or disables full justification. The default value is false.
+ *
+ * @see #getJustify()
+ */
+ public void setJustify(boolean justify) {
+ mJustify = justify;
+ if (mLayout != null) {
+ nullLayouts();
+ requestLayout();
+ invalidate();
+ }
+ }
+
+ /**
+ * @return true if currently paragraph justification is enabled.
+ *
+ * @see #setJustify(boolean)
+ */
+ public boolean getJustify() {
+ return mJustify;
+ }
+
+ /**
* Sets font feature settings. The format is the same as the CSS
* font-feature-settings attribute:
* <a href="https://www.w3.org/TR/css-fonts-3/#font-feature-settings-prop">
@@ -7170,6 +7195,7 @@
.setIncludePad(mIncludePad)
.setBreakStrategy(mBreakStrategy)
.setHyphenationFrequency(mHyphenationFrequency)
+ .setJustify(mJustify)
.setMaxLines(mMaxMode == LINES ? mMaximum : Integer.MAX_VALUE);
if (shouldEllipsize) {
builder.setEllipsize(mEllipsize)
@@ -7211,7 +7237,7 @@
if (mText instanceof Spannable) {
result = new DynamicLayout(mText, mTransformed, mTextPaint, wantWidth,
alignment, mTextDir, mSpacingMult, mSpacingAdd, mIncludePad,
- mBreakStrategy, mHyphenationFrequency,
+ mBreakStrategy, mHyphenationFrequency, mJustify,
getKeyListener() == null ? effectiveEllipsize : null, ellipsisWidth);
} else {
if (boring == UNKNOWN_BORING) {
@@ -7261,6 +7287,7 @@
.setIncludePad(mIncludePad)
.setBreakStrategy(mBreakStrategy)
.setHyphenationFrequency(mHyphenationFrequency)
+ .setJustify(mJustify)
.setMaxLines(mMaxMode == LINES ? mMaximum : Integer.MAX_VALUE);
if (shouldEllipsize) {
builder.setEllipsize(effectiveEllipsize)
diff --git a/core/java/android/widget/Toolbar.java b/core/java/android/widget/Toolbar.java
index 44b2b59..2eb50e0 100644
--- a/core/java/android/widget/Toolbar.java
+++ b/core/java/android/widget/Toolbar.java
@@ -42,6 +42,7 @@
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
+import android.view.ViewParent;
import com.android.internal.R;
import com.android.internal.view.menu.MenuBuilder;
@@ -331,6 +332,23 @@
a.recycle();
}
+ @Override
+ protected void onAttachedToWindow() {
+ super.onAttachedToWindow();
+
+ // If the container is a cluster, unmark itself as a cluster to avoid having nested
+ // clusters.
+ ViewParent parent = getParent();
+ while (parent != null && parent instanceof ViewGroup) {
+ final ViewGroup vgParent = (ViewGroup) parent;
+ if (vgParent.isKeyboardNavigationCluster()) {
+ setKeyboardNavigationCluster(false);
+ break;
+ }
+ parent = vgParent.getParent();
+ }
+ }
+
/**
* Specifies the theme to use when inflating popup menus. By default, uses
* the same theme as the toolbar itself.
diff --git a/core/java/com/android/internal/app/ResolverActivity.java b/core/java/com/android/internal/app/ResolverActivity.java
index 23c1969..282d3e9 100644
--- a/core/java/com/android/internal/app/ResolverActivity.java
+++ b/core/java/com/android/internal/app/ResolverActivity.java
@@ -106,6 +106,8 @@
private final ArrayList<Intent> mIntents = new ArrayList<>();
private PickTargetOptionRequest mPickOptionRequest;
private String mReferrerPackage;
+ private CharSequence mTitle;
+ private int mDefaultTitleResId;
protected ResolverDrawerLayout mResolverDrawerLayout;
protected String mContentType;
@@ -261,14 +263,17 @@
mPackageMonitor.register(this, getMainLooper(), false);
mRegistered = true;
mReferrerPackage = getReferrerPackageName();
+ mAlwaysUseOption = alwaysUseOption;
final ActivityManager am = (ActivityManager) getSystemService(ACTIVITY_SERVICE);
mIconDpi = am.getLauncherLargeIconDensity();
// Add our initial intent as the first item, regardless of what else has already been added.
mIntents.add(0, new Intent(intent));
+ mTitle = title;
+ mDefaultTitleResId = defaultTitleRes;
- if (configureContentView(mIntents, initialIntents, rList, alwaysUseOption)) {
+ if (configureContentView(mIntents, initialIntents, rList)) {
return;
}
@@ -286,56 +291,6 @@
mResolverDrawerLayout = rdl;
}
- if (title == null) {
- title = getTitleForAction(intent.getAction(), defaultTitleRes);
- }
- if (!TextUtils.isEmpty(title)) {
- final TextView titleView = (TextView) findViewById(R.id.title);
- if (titleView != null) {
- titleView.setText(title);
- }
- setTitle(title);
-
- // Try to initialize the title icon if we have a view for it and a title to match
- final ImageView titleIcon = (ImageView) findViewById(R.id.title_icon);
- if (titleIcon != null) {
- ApplicationInfo ai = null;
- try {
- if (!TextUtils.isEmpty(mReferrerPackage)) {
- ai = mPm.getApplicationInfo(mReferrerPackage, 0);
- }
- } catch (NameNotFoundException e) {
- Log.e(TAG, "Could not find referrer package " + mReferrerPackage);
- }
-
- if (ai != null) {
- titleIcon.setImageDrawable(ai.loadIcon(mPm));
- }
- }
- }
-
- final ImageView iconView = (ImageView) findViewById(R.id.icon);
- final DisplayResolveInfo iconInfo = mAdapter.getFilteredItem();
- if (iconView != null && iconInfo != null) {
- new LoadIconIntoViewTask(iconInfo, iconView).execute();
- }
-
- if (alwaysUseOption || mAdapter.hasFilteredItem()) {
- final ViewGroup buttonLayout = (ViewGroup) findViewById(R.id.button_bar);
- if (buttonLayout != null) {
- buttonLayout.setVisibility(View.VISIBLE);
- mAlwaysButton = (Button) buttonLayout.findViewById(R.id.button_always);
- mOnceButton = (Button) buttonLayout.findViewById(R.id.button_once);
- } else {
- mAlwaysUseOption = false;
- }
- }
-
- if (mAdapter.hasFilteredItem()) {
- setAlwaysButtonEnabled(true, mAdapter.getFilteredPosition(), false);
- mOnceButton.setEnabled(true);
- }
-
mProfileView = findViewById(R.id.profile_button);
if (mProfileView != null) {
mProfileView.setOnClickListener(new View.OnClickListener() {
@@ -893,23 +848,22 @@
* Returns true if the activity is finishing and creation should halt
*/
public boolean configureContentView(List<Intent> payloadIntents, Intent[] initialIntents,
- List<ResolveInfo> rList, boolean alwaysUseOption) {
+ List<ResolveInfo> rList) {
// The last argument of createAdapter is whether to do special handling
// of the last used choice to highlight it in the list. We need to always
// turn this off when running under voice interaction, since it results in
// a more complicated UI that the current voice interaction flow is not able
// to handle.
mAdapter = createAdapter(this, payloadIntents, initialIntents, rList,
- mLaunchedFromUid, alwaysUseOption && !isVoiceInteraction());
+ mLaunchedFromUid, mAlwaysUseOption && !isVoiceInteraction());
boolean rebuildCompleted = mAdapter.rebuildList();
if (mAdapter.hasFilteredItem()) {
mLayoutId = R.layout.resolver_list_with_default;
- alwaysUseOption = false;
+ mAlwaysUseOption = false;
} else {
mLayoutId = getLayoutResource();
}
- mAlwaysUseOption = alwaysUseOption;
int count = mAdapter.getUnfilteredCount();
@@ -929,13 +883,11 @@
}
}
+ setContentView(mLayoutId);
if (count > 0 || !rebuildCompleted) {
- setContentView(mLayoutId);
mAdapterView = (AbsListView) findViewById(R.id.resolver_list);
onPrepareAdapterView(mAdapterView, mAdapter, mAlwaysUseOption);
} else {
- setContentView(R.layout.resolver_list);
-
final TextView empty = (TextView) findViewById(R.id.empty);
empty.setVisibility(View.VISIBLE);
@@ -960,12 +912,67 @@
listView.setChoiceMode(AbsListView.CHOICE_MODE_SINGLE);
}
- if (useHeader && listView != null) {
+ // In case this method is called again (due to activity recreation), avoid adding a new
+ // header if one is already present.
+ if (useHeader && listView != null && listView.getHeaderViewsCount() == 0) {
listView.addHeaderView(LayoutInflater.from(this).inflate(
R.layout.resolver_different_item_header, listView, false));
}
}
+ public void setTitleAndIcon() {
+ if (mTitle == null) {
+ mTitle = getTitleForAction(getTargetIntent().getAction(), mDefaultTitleResId);
+ }
+
+ if (!TextUtils.isEmpty(mTitle)) {
+ final TextView titleView = (TextView) findViewById(R.id.title);
+ if (titleView != null) {
+ titleView.setText(mTitle);
+ }
+ setTitle(mTitle);
+
+ // Try to initialize the title icon if we have a view for it and a title to match
+ final ImageView titleIcon = (ImageView) findViewById(R.id.title_icon);
+ if (titleIcon != null) {
+ ApplicationInfo ai = null;
+ try {
+ if (!TextUtils.isEmpty(mReferrerPackage)) {
+ ai = mPm.getApplicationInfo(mReferrerPackage, 0);
+ }
+ } catch (NameNotFoundException e) {
+ Log.e(TAG, "Could not find referrer package " + mReferrerPackage);
+ }
+
+ if (ai != null) {
+ titleIcon.setImageDrawable(ai.loadIcon(mPm));
+ }
+ }
+ }
+
+ final ImageView iconView = (ImageView) findViewById(R.id.icon);
+ final DisplayResolveInfo iconInfo = mAdapter.getFilteredItem();
+ if (iconView != null && iconInfo != null) {
+ new LoadIconIntoViewTask(iconInfo, iconView).execute();
+ }
+ }
+
+ public void resetAlwaysOrOnceButtonBar() {
+ if (mAlwaysUseOption || mAdapter.mLastChosen != null) {
+ final ViewGroup buttonLayout = (ViewGroup) findViewById(R.id.button_bar);
+ if (buttonLayout != null) {
+ buttonLayout.setVisibility(View.VISIBLE);
+ mAlwaysButton = (Button) buttonLayout.findViewById(R.id.button_always);
+ mOnceButton = (Button) buttonLayout.findViewById(R.id.button_once);
+ }
+ }
+
+ if (mAdapter.hasFilteredItem()) {
+ setAlwaysButtonEnabled(true, mAdapter.getFilteredPosition(), false);
+ mOnceButton.setEnabled(true);
+ }
+ }
+
/**
* Check a simple match for the component of two ResolveInfos.
*/
@@ -1227,7 +1234,7 @@
private final List<Intent> mIntents;
private final Intent[] mInitialIntents;
private final List<ResolveInfo> mBaseResolveList;
- private ResolveInfo mLastChosen;
+ protected ResolveInfo mLastChosen;
private DisplayResolveInfo mOtherProfile;
private boolean mHasExtendedInfo;
private ResolverListController mResolverListController;
@@ -1282,7 +1289,7 @@
}
public boolean hasFilteredItem() {
- return mFilterLastUsed && mLastChosenPosition >= 0;
+ return mFilterLastUsed && mLastChosen != null;
}
public float getScore(DisplayResolveInfo target) {
@@ -1307,7 +1314,7 @@
primaryIntent, primaryIntent.resolveTypeIfNeeded(getContentResolver()),
PackageManager.MATCH_DEFAULT_ONLY);
} catch (RemoteException re) {
- Log.d(TAG, "Error calling setLastChosenActivity\n" + re);
+ Log.d(TAG, "Error calling getLastChosenActivity\n" + re);
}
// Clear the value of mOtherProfile from previous call.
@@ -1319,7 +1326,7 @@
getTargetIntent(),
mBaseResolveList);
} else {
- currentResolveList =
+ currentResolveList = mUnfilteredResolveList =
mResolverListController.getResolversForIntent(shouldGetResolvedFilter(),
shouldGetActivityMetadata(),
mIntents);
@@ -1456,6 +1463,9 @@
// Process last group
processGroup(sortedComponents, start, (N - 1), rci0, r0Label);
}
+
+ setTitleAndIcon();
+ resetAlwaysOrOnceButtonBar();
disableLastChosenIfNeeded();
onListRebuilt();
}
diff --git a/core/java/com/android/internal/app/ToolbarActionBar.java b/core/java/com/android/internal/app/ToolbarActionBar.java
index 575ef02..74424f6 100644
--- a/core/java/com/android/internal/app/ToolbarActionBar.java
+++ b/core/java/com/android/internal/app/ToolbarActionBar.java
@@ -17,6 +17,11 @@
package com.android.internal.app;
+import com.android.internal.view.menu.MenuBuilder;
+import com.android.internal.view.menu.MenuPresenter;
+import com.android.internal.widget.DecorToolbar;
+import com.android.internal.widget.ToolbarWidgetWrapper;
+
import android.annotation.Nullable;
import android.app.ActionBar;
import android.content.Context;
@@ -29,19 +34,11 @@
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
-import android.view.View.OnFocusChangeListener;
-import android.view.ViewGroup;
-import android.view.ViewParent;
import android.view.Window;
import android.view.WindowCallbackWrapper;
import android.widget.SpinnerAdapter;
import android.widget.Toolbar;
-import com.android.internal.view.menu.MenuBuilder;
-import com.android.internal.view.menu.MenuPresenter;
-import com.android.internal.widget.DecorToolbar;
-import com.android.internal.widget.ToolbarWidgetWrapper;
-
import java.util.ArrayList;
public class ToolbarActionBar extends ActionBar {
@@ -509,12 +506,6 @@
}
}
- /** @hide */
- @Override
- public boolean requestFocus() {
- return requestFocus(mDecorToolbar.getViewGroup());
- }
-
private class ToolbarCallbackWrapper extends WindowCallbackWrapper {
public ToolbarCallbackWrapper(Window.Callback wrapped) {
super(wrapped);
diff --git a/core/java/com/android/internal/app/WindowDecorActionBar.java b/core/java/com/android/internal/app/WindowDecorActionBar.java
index 1376d0a..1b3faf5 100644
--- a/core/java/com/android/internal/app/WindowDecorActionBar.java
+++ b/core/java/com/android/internal/app/WindowDecorActionBar.java
@@ -16,13 +16,6 @@
package com.android.internal.app;
-import android.animation.ValueAnimator;
-import android.content.res.TypedArray;
-import android.view.View.OnFocusChangeListener;
-import android.view.ViewGroup;
-import android.view.ViewParent;
-import android.widget.Toolbar;
-
import com.android.internal.R;
import com.android.internal.view.ActionBarPolicy;
import com.android.internal.view.menu.MenuBuilder;
@@ -39,6 +32,7 @@
import android.animation.AnimatorListenerAdapter;
import android.animation.AnimatorSet;
import android.animation.ObjectAnimator;
+import android.animation.ValueAnimator;
import android.app.ActionBar;
import android.app.Activity;
import android.app.Dialog;
@@ -46,6 +40,7 @@
import android.content.Context;
import android.content.res.Configuration;
import android.content.res.Resources;
+import android.content.res.TypedArray;
import android.graphics.drawable.Drawable;
import android.util.TypedValue;
import android.view.ActionMode;
@@ -55,10 +50,12 @@
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
+import android.view.ViewParent;
import android.view.Window;
import android.view.accessibility.AccessibilityEvent;
import android.view.animation.AnimationUtils;
import android.widget.SpinnerAdapter;
+import android.widget.Toolbar;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
@@ -970,12 +967,6 @@
return false;
}
- /** @hide */
- @Override
- public boolean requestFocus() {
- return requestFocus(mDecorToolbar.getViewGroup());
- }
-
/**
* @hide
*/
diff --git a/core/java/com/android/internal/logging/LogBuilder.java b/core/java/com/android/internal/logging/LogBuilder.java
index 634d061..8e2e114 100644
--- a/core/java/com/android/internal/logging/LogBuilder.java
+++ b/core/java/com/android/internal/logging/LogBuilder.java
@@ -17,8 +17,9 @@
private SparseArray<Object> entries = new SparseArray();
- public LogBuilder() {}
-
+ public LogBuilder(int mainCategory) {
+ setCategory(mainCategory);
+ }
public LogBuilder setView(View view) {
entries.put(MetricsEvent.RESERVED_FOR_LOGBUILDER_VIEW, view.getId());
diff --git a/core/java/com/android/internal/os/WebViewZygoteInit.java b/core/java/com/android/internal/os/WebViewZygoteInit.java
index 12d699d..d82a211 100644
--- a/core/java/com/android/internal/os/WebViewZygoteInit.java
+++ b/core/java/com/android/internal/os/WebViewZygoteInit.java
@@ -24,6 +24,7 @@
import android.text.TextUtils;
import android.util.Log;
import android.webkit.WebViewFactory;
+import android.webkit.WebViewFactoryProvider;
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
@@ -74,8 +75,8 @@
// call preloadInZygote() on it to give it the opportunity to preload the native library
// and perform any other initialisation work that should be shared among the children.
try {
- Class providerClass = Class.forName(WebViewFactory.CHROMIUM_WEBVIEW_FACTORY, true,
- loader);
+ Class<WebViewFactoryProvider> providerClass =
+ WebViewFactory.getWebViewProviderClass(loader);
Object result = providerClass.getMethod("preloadInZygote").invoke(null);
if (!((Boolean)result).booleanValue()) {
Log.e(TAG, "preloadInZygote returned false");
diff --git a/core/java/com/android/internal/widget/Smileys.java b/core/java/com/android/internal/widget/Smileys.java
deleted file mode 100644
index d5e8d03..0000000
--- a/core/java/com/android/internal/widget/Smileys.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (C) 2009 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.internal.widget;
-
-import com.android.internal.R;
-
-/**
- * Temp stupidity until we have a real emoticon API.
- */
-public class Smileys {
- private static final int[] sIconIds = {
- R.drawable.emo_im_happy,
- R.drawable.emo_im_sad,
- R.drawable.emo_im_winking,
- R.drawable.emo_im_tongue_sticking_out,
- R.drawable.emo_im_surprised,
- R.drawable.emo_im_kissing,
- R.drawable.emo_im_yelling,
- R.drawable.emo_im_cool,
- R.drawable.emo_im_money_mouth,
- R.drawable.emo_im_foot_in_mouth,
- R.drawable.emo_im_embarrassed,
- R.drawable.emo_im_angel,
- R.drawable.emo_im_undecided,
- R.drawable.emo_im_crying,
- R.drawable.emo_im_lips_are_sealed,
- R.drawable.emo_im_laughing,
- R.drawable.emo_im_wtf
- };
-
- public static int HAPPY = 0;
- public static int SAD = 1;
- public static int WINKING = 2;
- public static int TONGUE_STICKING_OUT = 3;
- public static int SURPRISED = 4;
- public static int KISSING = 5;
- public static int YELLING = 6;
- public static int COOL = 7;
- public static int MONEY_MOUTH = 8;
- public static int FOOT_IN_MOUTH = 9;
- public static int EMBARRASSED = 10;
- public static int ANGEL = 11;
- public static int UNDECIDED = 12;
- public static int CRYING = 13;
- public static int LIPS_ARE_SEALED = 14;
- public static int LAUGHING = 15;
- public static int WTF = 16;
-
- public static int getSmileyResource(int which) {
- return sIconIds[which];
- }
-}
diff --git a/core/jni/android/graphics/HarfBuzzNGFaceSkia.cpp b/core/jni/android/graphics/HarfBuzzNGFaceSkia.cpp
index aa6348e..dcb7874 100644
--- a/core/jni/android/graphics/HarfBuzzNGFaceSkia.cpp
+++ b/core/jni/android/graphics/HarfBuzzNGFaceSkia.cpp
@@ -33,7 +33,9 @@
#include "HarfBuzzNGFaceSkia.h"
#include <stdlib.h>
-#include <cutils/log.h>
+
+#include <log/log.h>
+
#include <SkPaint.h>
#include <SkPath.h>
#include <SkPoint.h>
diff --git a/core/jni/android_os_Debug.cpp b/core/jni/android_os_Debug.cpp
index aa4570f..14d7e81 100644
--- a/core/jni/android_os_Debug.cpp
+++ b/core/jni/android_os_Debug.cpp
@@ -16,32 +16,32 @@
#define LOG_TAG "android.os.Debug"
+#include <assert.h>
+#include <ctype.h>
+#include <errno.h>
#include <fcntl.h>
#include <inttypes.h>
+#include <malloc.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <unistd.h>
-#include <time.h>
#include <sys/time.h>
-#include <errno.h>
-#include <assert.h>
-#include <ctype.h>
-#include <malloc.h>
+#include <time.h>
+#include <unistd.h>
#include <iomanip>
#include <string>
-#include "jni.h"
+#include <android-base/stringprintf.h>
+#include <cutils/debugger.h>
+#include <log/log.h>
+#include <utils/misc.h>
+#include <utils/String8.h>
-#include "android-base/stringprintf.h"
-#include "cutils/debugger.h"
-#include "cutils/log.h"
#include "JNIHelp.h"
-#include "memtrack/memtrack.h"
-#include "memunreachable/memunreachable.h"
-#include "utils/misc.h"
-#include "utils/String8.h"
+#include "jni.h"
+#include <memtrack/memtrack.h>
+#include <memunreachable/memunreachable.h>
namespace android
{
diff --git a/core/jni/android_os_HwBinder.cpp b/core/jni/android_os_HwBinder.cpp
index 20bb885..e653900 100644
--- a/core/jni/android_os_HwBinder.cpp
+++ b/core/jni/android_os_HwBinder.cpp
@@ -26,7 +26,7 @@
#include <JNIHelp.h>
#include <android/hidl/manager/1.0/IServiceManager.h>
#include <android/hidl/base/1.0/IBase.h>
-#include <android/hidl/base/1.0/BpBase.h>
+#include <android/hidl/base/1.0/BpHwBase.h>
#include <android_runtime/AndroidRuntime.h>
#include <hidl/ServiceManagement.h>
#include <hidl/Status.h>
@@ -262,7 +262,7 @@
sp<hardware::IBinder> binder = JHwBinder::GetNativeContext(env, thiz);
/* TODO(b/33440494) this is not right */
- sp<hidl::base::V1_0::IBase> base = new hidl::base::V1_0::BpBase(binder);
+ sp<hidl::base::V1_0::IBase> base = new hidl::base::V1_0::BpHwBase(binder);
auto manager = hardware::defaultServiceManager();
@@ -331,7 +331,7 @@
}
sp<hardware::IBinder> service = hardware::toBinder<
- hidl::base::V1_0::IBase, hidl::base::V1_0::BpBase>(ret);
+ hidl::base::V1_0::IBase, hidl::base::V1_0::BpHwBase>(ret);
env->ReleaseStringUTFChars(ifaceNameObj, ifaceName);
ifaceName = NULL;
diff --git a/core/jni/android_os_Trace.cpp b/core/jni/android_os_Trace.cpp
index ea893f0..de91f70 100644
--- a/core/jni/android_os_Trace.cpp
+++ b/core/jni/android_os_Trace.cpp
@@ -19,15 +19,14 @@
#include <inttypes.h>
+#include <cutils/trace.h>
+#include <utils/String8.h>
+#include <log/log.h>
+
#include <JNIHelp.h>
#include <ScopedUtfChars.h>
#include <ScopedStringChars.h>
-#include <utils/String8.h>
-
-#include <cutils/trace.h>
-#include <cutils/log.h>
-
namespace android {
static void sanitizeString(String8& utf8Chars) {
diff --git a/core/jni/android_text_StaticLayout.cpp b/core/jni/android_text_StaticLayout.cpp
index 02fa872..c05ef26 100644
--- a/core/jni/android_text_StaticLayout.cpp
+++ b/core/jni/android_text_StaticLayout.cpp
@@ -54,7 +54,8 @@
// hyphenFrequency)
static void nSetupParagraph(JNIEnv* env, jclass, jlong nativePtr, jcharArray text, jint length,
jfloat firstWidth, jint firstWidthLineLimit, jfloat restWidth,
- jintArray variableTabStops, jint defaultTabStop, jint strategy, jint hyphenFrequency) {
+ jintArray variableTabStops, jint defaultTabStop, jint strategy, jint hyphenFrequency,
+ jboolean isJustified) {
minikin::LineBreaker* b = reinterpret_cast<minikin::LineBreaker*>(nativePtr);
b->resize(length);
env->GetCharArrayRegion(text, 0, length, b->buffer());
@@ -68,6 +69,7 @@
}
b->setStrategy(static_cast<minikin::BreakStrategy>(strategy));
b->setHyphenationFrequency(static_cast<minikin::HyphenationFrequency>(hyphenFrequency));
+ b->setJustified(isJustified);
}
static void recycleCopy(JNIEnv* env, jobject recycle, jintArray recycleBreaks,
@@ -190,7 +192,7 @@
{"nFinishBuilder", "(J)V", (void*) nFinishBuilder},
{"nLoadHyphenator", "(Ljava/nio/ByteBuffer;I)J", (void*) nLoadHyphenator},
{"nSetLocale", "(JLjava/lang/String;J)V", (void*) nSetLocale},
- {"nSetupParagraph", "(J[CIFIF[IIII)V", (void*) nSetupParagraph},
+ {"nSetupParagraph", "(J[CIFIF[IIIIZ)V", (void*) nSetupParagraph},
{"nSetIndents", "(J[I)V", (void*) nSetIndents},
{"nAddStyleRun", "(JJJIIZ)F", (void*) nAddStyleRun},
{"nAddMeasuredRun", "(JII[F)V", (void*) nAddMeasuredRun},
diff --git a/core/jni/android_util_Binder.cpp b/core/jni/android_util_Binder.cpp
index 5559d48..abcd1e7 100644
--- a/core/jni/android_util_Binder.cpp
+++ b/core/jni/android_util_Binder.cpp
@@ -29,19 +29,19 @@
#include <sys/types.h>
#include <unistd.h>
-#include <utils/Atomic.h>
#include <binder/IInterface.h>
+#include <binder/IServiceManager.h>
#include <binder/IPCThreadState.h>
-#include <utils/Log.h>
-#include <utils/SystemClock.h>
-#include <utils/List.h>
-#include <utils/KeyedVector.h>
-#include <log/logger.h>
#include <binder/Parcel.h>
#include <binder/ProcessState.h>
-#include <binder/IServiceManager.h>
-#include <utils/threads.h>
+#include <log/log.h>
+#include <utils/Atomic.h>
+#include <utils/KeyedVector.h>
+#include <utils/List.h>
+#include <utils/Log.h>
#include <utils/String8.h>
+#include <utils/SystemClock.h>
+#include <utils/threads.h>
#include <ScopedUtfChars.h>
#include <ScopedLocalRef.h>
diff --git a/core/jni/android_util_Log.cpp b/core/jni/android_util_Log.cpp
index 7719e31..20dfe78 100644
--- a/core/jni/android_util_Log.cpp
+++ b/core/jni/android_util_Log.cpp
@@ -21,7 +21,7 @@
#include <android-base/macros.h>
#include <assert.h>
#include <cutils/properties.h>
-#include <log/logger.h> // For LOGGER_ENTRY_MAX_PAYLOAD.
+#include <log/log.h> // For LOGGER_ENTRY_MAX_PAYLOAD.
#include <utils/Log.h>
#include <utils/String8.h>
diff --git a/core/jni/android_util_jar_StrictJarFile.cpp b/core/jni/android_util_jar_StrictJarFile.cpp
index 2e31c8b..4f1f926 100644
--- a/core/jni/android_util_jar_StrictJarFile.cpp
+++ b/core/jni/android_util_jar_StrictJarFile.cpp
@@ -20,13 +20,14 @@
#include <memory>
#include <string>
+#include <log/log.h>
+
#include "JNIHelp.h"
#include "JniConstants.h"
#include "ScopedLocalRef.h"
#include "ScopedUtfChars.h"
#include "jni.h"
#include "ziparchive/zip_archive.h"
-#include "cutils/log.h"
namespace android {
diff --git a/core/res/res/layout/screen_action_bar.xml b/core/res/res/layout/screen_action_bar.xml
index b3a3478..edcbb2b 100644
--- a/core/res/res/layout/screen_action_bar.xml
+++ b/core/res/res/layout/screen_action_bar.xml
@@ -35,7 +35,7 @@
android:layout_alignParentTop="true"
style="?attr/actionBarStyle"
android:transitionName="android:action_bar"
- android:touchscreenBlocksFocus="true"
+ android:keyboardNavigationCluster="true"
android:gravity="top">
<com.android.internal.widget.ActionBarView
android:id="@+id/action_bar"
@@ -54,6 +54,6 @@
android:layout_height="wrap_content"
style="?attr/actionBarSplitStyle"
android:visibility="gone"
- android:touchscreenBlocksFocus="true"
+ android:keyboardNavigationCluster="true"
android:gravity="center"/>
</com.android.internal.widget.ActionBarOverlayLayout>
diff --git a/core/res/res/layout/screen_toolbar.xml b/core/res/res/layout/screen_toolbar.xml
index 88c9cf6..0bec8c4 100644
--- a/core/res/res/layout/screen_toolbar.xml
+++ b/core/res/res/layout/screen_toolbar.xml
@@ -35,7 +35,7 @@
android:layout_alignParentTop="true"
style="?attr/actionBarStyle"
android:transitionName="android:action_bar"
- android:touchscreenBlocksFocus="true"
+ android:keyboardNavigationCluster="true"
android:gravity="top">
<Toolbar
android:id="@+id/action_bar"
diff --git a/core/res/res/values-az-rAZ-watch/strings.xml b/core/res/res/values-az-watch/strings.xml
similarity index 100%
rename from core/res/res/values-az-rAZ-watch/strings.xml
rename to core/res/res/values-az-watch/strings.xml
diff --git a/core/res/res/values-az-rAZ-watch/styles_material.xml b/core/res/res/values-az-watch/styles_material.xml
similarity index 100%
rename from core/res/res/values-az-rAZ-watch/styles_material.xml
rename to core/res/res/values-az-watch/styles_material.xml
diff --git a/core/res/res/values-az-rAZ/strings.xml b/core/res/res/values-az/strings.xml
similarity index 100%
rename from core/res/res/values-az-rAZ/strings.xml
rename to core/res/res/values-az/strings.xml
diff --git a/core/res/res/values-be-rBY-watch/strings.xml b/core/res/res/values-be-watch/strings.xml
similarity index 100%
rename from core/res/res/values-be-rBY-watch/strings.xml
rename to core/res/res/values-be-watch/strings.xml
diff --git a/core/res/res/values-be-rBY-watch/styles_material.xml b/core/res/res/values-be-watch/styles_material.xml
similarity index 100%
rename from core/res/res/values-be-rBY-watch/styles_material.xml
rename to core/res/res/values-be-watch/styles_material.xml
diff --git a/core/res/res/values-be-rBY/strings.xml b/core/res/res/values-be/strings.xml
similarity index 100%
rename from core/res/res/values-be-rBY/strings.xml
rename to core/res/res/values-be/strings.xml
diff --git a/core/res/res/values-bn-rBD-watch/strings.xml b/core/res/res/values-bn-watch/strings.xml
similarity index 100%
rename from core/res/res/values-bn-rBD-watch/strings.xml
rename to core/res/res/values-bn-watch/strings.xml
diff --git a/core/res/res/values-bn-rBD-watch/styles_material.xml b/core/res/res/values-bn-watch/styles_material.xml
similarity index 100%
rename from core/res/res/values-bn-rBD-watch/styles_material.xml
rename to core/res/res/values-bn-watch/styles_material.xml
diff --git a/core/res/res/values-bn-rBD/strings.xml b/core/res/res/values-bn/strings.xml
similarity index 100%
rename from core/res/res/values-bn-rBD/strings.xml
rename to core/res/res/values-bn/strings.xml
diff --git a/core/res/res/values-bs-rBA-watch/strings.xml b/core/res/res/values-bs-watch/strings.xml
similarity index 100%
rename from core/res/res/values-bs-rBA-watch/strings.xml
rename to core/res/res/values-bs-watch/strings.xml
diff --git a/core/res/res/values-bs-rBA-watch/styles_material.xml b/core/res/res/values-bs-watch/styles_material.xml
similarity index 100%
rename from core/res/res/values-bs-rBA-watch/styles_material.xml
rename to core/res/res/values-bs-watch/styles_material.xml
diff --git a/core/res/res/values-bs-rBA/strings.xml b/core/res/res/values-bs/strings.xml
similarity index 100%
rename from core/res/res/values-bs-rBA/strings.xml
rename to core/res/res/values-bs/strings.xml
diff --git a/core/res/res/values-et-rEE-watch/strings.xml b/core/res/res/values-et-watch/strings.xml
similarity index 100%
rename from core/res/res/values-et-rEE-watch/strings.xml
rename to core/res/res/values-et-watch/strings.xml
diff --git a/core/res/res/values-et-rEE-watch/styles_material.xml b/core/res/res/values-et-watch/styles_material.xml
similarity index 100%
rename from core/res/res/values-et-rEE-watch/styles_material.xml
rename to core/res/res/values-et-watch/styles_material.xml
diff --git a/core/res/res/values-et-rEE/strings.xml b/core/res/res/values-et/strings.xml
similarity index 100%
rename from core/res/res/values-et-rEE/strings.xml
rename to core/res/res/values-et/strings.xml
diff --git a/core/res/res/values-eu-rES-watch/strings.xml b/core/res/res/values-eu-watch/strings.xml
similarity index 100%
rename from core/res/res/values-eu-rES-watch/strings.xml
rename to core/res/res/values-eu-watch/strings.xml
diff --git a/core/res/res/values-eu-rES-watch/styles_material.xml b/core/res/res/values-eu-watch/styles_material.xml
similarity index 100%
rename from core/res/res/values-eu-rES-watch/styles_material.xml
rename to core/res/res/values-eu-watch/styles_material.xml
diff --git a/core/res/res/values-eu-rES/strings.xml b/core/res/res/values-eu/strings.xml
similarity index 100%
rename from core/res/res/values-eu-rES/strings.xml
rename to core/res/res/values-eu/strings.xml
diff --git a/core/res/res/values-gl-rES-watch/strings.xml b/core/res/res/values-gl-watch/strings.xml
similarity index 100%
rename from core/res/res/values-gl-rES-watch/strings.xml
rename to core/res/res/values-gl-watch/strings.xml
diff --git a/core/res/res/values-gl-rES-watch/styles_material.xml b/core/res/res/values-gl-watch/styles_material.xml
similarity index 100%
rename from core/res/res/values-gl-rES-watch/styles_material.xml
rename to core/res/res/values-gl-watch/styles_material.xml
diff --git a/core/res/res/values-gl-rES/strings.xml b/core/res/res/values-gl/strings.xml
similarity index 100%
rename from core/res/res/values-gl-rES/strings.xml
rename to core/res/res/values-gl/strings.xml
diff --git a/core/res/res/values-gu-rIN-watch/strings.xml b/core/res/res/values-gu-watch/strings.xml
similarity index 100%
rename from core/res/res/values-gu-rIN-watch/strings.xml
rename to core/res/res/values-gu-watch/strings.xml
diff --git a/core/res/res/values-gu-rIN-watch/styles_material.xml b/core/res/res/values-gu-watch/styles_material.xml
similarity index 100%
rename from core/res/res/values-gu-rIN-watch/styles_material.xml
rename to core/res/res/values-gu-watch/styles_material.xml
diff --git a/core/res/res/values-gu-rIN/strings.xml b/core/res/res/values-gu/strings.xml
similarity index 100%
rename from core/res/res/values-gu-rIN/strings.xml
rename to core/res/res/values-gu/strings.xml
diff --git a/core/res/res/values-hy-rAM-watch/strings.xml b/core/res/res/values-hy-watch/strings.xml
similarity index 100%
rename from core/res/res/values-hy-rAM-watch/strings.xml
rename to core/res/res/values-hy-watch/strings.xml
diff --git a/core/res/res/values-hy-rAM-watch/styles_material.xml b/core/res/res/values-hy-watch/styles_material.xml
similarity index 100%
rename from core/res/res/values-hy-rAM-watch/styles_material.xml
rename to core/res/res/values-hy-watch/styles_material.xml
diff --git a/core/res/res/values-hy-rAM/strings.xml b/core/res/res/values-hy/strings.xml
similarity index 100%
rename from core/res/res/values-hy-rAM/strings.xml
rename to core/res/res/values-hy/strings.xml
diff --git a/core/res/res/values-is-rIS-watch/strings.xml b/core/res/res/values-is-watch/strings.xml
similarity index 100%
rename from core/res/res/values-is-rIS-watch/strings.xml
rename to core/res/res/values-is-watch/strings.xml
diff --git a/core/res/res/values-is-rIS-watch/styles_material.xml b/core/res/res/values-is-watch/styles_material.xml
similarity index 100%
rename from core/res/res/values-is-rIS-watch/styles_material.xml
rename to core/res/res/values-is-watch/styles_material.xml
diff --git a/core/res/res/values-is-rIS/strings.xml b/core/res/res/values-is/strings.xml
similarity index 100%
rename from core/res/res/values-is-rIS/strings.xml
rename to core/res/res/values-is/strings.xml
diff --git a/core/res/res/values-ka-rGE-watch/strings.xml b/core/res/res/values-ka-watch/strings.xml
similarity index 100%
rename from core/res/res/values-ka-rGE-watch/strings.xml
rename to core/res/res/values-ka-watch/strings.xml
diff --git a/core/res/res/values-ka-rGE-watch/styles_material.xml b/core/res/res/values-ka-watch/styles_material.xml
similarity index 100%
rename from core/res/res/values-ka-rGE-watch/styles_material.xml
rename to core/res/res/values-ka-watch/styles_material.xml
diff --git a/core/res/res/values-ka-rGE/strings.xml b/core/res/res/values-ka/strings.xml
similarity index 100%
rename from core/res/res/values-ka-rGE/strings.xml
rename to core/res/res/values-ka/strings.xml
diff --git a/core/res/res/values-kk-rKZ-watch/strings.xml b/core/res/res/values-kk-watch/strings.xml
similarity index 100%
rename from core/res/res/values-kk-rKZ-watch/strings.xml
rename to core/res/res/values-kk-watch/strings.xml
diff --git a/core/res/res/values-kk-rKZ-watch/styles_material.xml b/core/res/res/values-kk-watch/styles_material.xml
similarity index 100%
rename from core/res/res/values-kk-rKZ-watch/styles_material.xml
rename to core/res/res/values-kk-watch/styles_material.xml
diff --git a/core/res/res/values-kk-rKZ/strings.xml b/core/res/res/values-kk/strings.xml
similarity index 100%
rename from core/res/res/values-kk-rKZ/strings.xml
rename to core/res/res/values-kk/strings.xml
diff --git a/core/res/res/values-km-rKH-watch/strings.xml b/core/res/res/values-km-watch/strings.xml
similarity index 100%
rename from core/res/res/values-km-rKH-watch/strings.xml
rename to core/res/res/values-km-watch/strings.xml
diff --git a/core/res/res/values-km-rKH-watch/styles_material.xml b/core/res/res/values-km-watch/styles_material.xml
similarity index 100%
rename from core/res/res/values-km-rKH-watch/styles_material.xml
rename to core/res/res/values-km-watch/styles_material.xml
diff --git a/core/res/res/values-km-rKH/strings.xml b/core/res/res/values-km/strings.xml
similarity index 100%
rename from core/res/res/values-km-rKH/strings.xml
rename to core/res/res/values-km/strings.xml
diff --git a/core/res/res/values-kn-rIN-watch/strings.xml b/core/res/res/values-kn-watch/strings.xml
similarity index 100%
rename from core/res/res/values-kn-rIN-watch/strings.xml
rename to core/res/res/values-kn-watch/strings.xml
diff --git a/core/res/res/values-kn-rIN-watch/styles_material.xml b/core/res/res/values-kn-watch/styles_material.xml
similarity index 100%
rename from core/res/res/values-kn-rIN-watch/styles_material.xml
rename to core/res/res/values-kn-watch/styles_material.xml
diff --git a/core/res/res/values-kn-rIN/strings.xml b/core/res/res/values-kn/strings.xml
similarity index 100%
rename from core/res/res/values-kn-rIN/strings.xml
rename to core/res/res/values-kn/strings.xml
diff --git a/core/res/res/values-ky-rKG-watch/strings.xml b/core/res/res/values-ky-watch/strings.xml
similarity index 100%
rename from core/res/res/values-ky-rKG-watch/strings.xml
rename to core/res/res/values-ky-watch/strings.xml
diff --git a/core/res/res/values-ky-rKG-watch/styles_material.xml b/core/res/res/values-ky-watch/styles_material.xml
similarity index 100%
rename from core/res/res/values-ky-rKG-watch/styles_material.xml
rename to core/res/res/values-ky-watch/styles_material.xml
diff --git a/core/res/res/values-ky-rKG/strings.xml b/core/res/res/values-ky/strings.xml
similarity index 100%
rename from core/res/res/values-ky-rKG/strings.xml
rename to core/res/res/values-ky/strings.xml
diff --git a/core/res/res/values-lo-rLA-watch/strings.xml b/core/res/res/values-lo-watch/strings.xml
similarity index 100%
rename from core/res/res/values-lo-rLA-watch/strings.xml
rename to core/res/res/values-lo-watch/strings.xml
diff --git a/core/res/res/values-lo-rLA-watch/styles_material.xml b/core/res/res/values-lo-watch/styles_material.xml
similarity index 100%
rename from core/res/res/values-lo-rLA-watch/styles_material.xml
rename to core/res/res/values-lo-watch/styles_material.xml
diff --git a/core/res/res/values-lo-rLA/strings.xml b/core/res/res/values-lo/strings.xml
similarity index 100%
rename from core/res/res/values-lo-rLA/strings.xml
rename to core/res/res/values-lo/strings.xml
diff --git a/core/res/res/values-mcc310-mnc160-az-rAZ/strings.xml b/core/res/res/values-mcc310-mnc160-az/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc160-az-rAZ/strings.xml
rename to core/res/res/values-mcc310-mnc160-az/strings.xml
diff --git a/core/res/res/values-mcc310-mnc160-be-rBY/strings.xml b/core/res/res/values-mcc310-mnc160-be/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc160-be-rBY/strings.xml
rename to core/res/res/values-mcc310-mnc160-be/strings.xml
diff --git a/core/res/res/values-mcc310-mnc160-bn-rBD/strings.xml b/core/res/res/values-mcc310-mnc160-bn/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc160-bn-rBD/strings.xml
rename to core/res/res/values-mcc310-mnc160-bn/strings.xml
diff --git a/core/res/res/values-mcc310-mnc160-bs-rBA/strings.xml b/core/res/res/values-mcc310-mnc160-bs/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc160-bs-rBA/strings.xml
rename to core/res/res/values-mcc310-mnc160-bs/strings.xml
diff --git a/core/res/res/values-mcc310-mnc160-et-rEE/strings.xml b/core/res/res/values-mcc310-mnc160-et/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc160-et-rEE/strings.xml
rename to core/res/res/values-mcc310-mnc160-et/strings.xml
diff --git a/core/res/res/values-mcc310-mnc160-eu-rES/strings.xml b/core/res/res/values-mcc310-mnc160-eu/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc160-eu-rES/strings.xml
rename to core/res/res/values-mcc310-mnc160-eu/strings.xml
diff --git a/core/res/res/values-mcc310-mnc160-gl-rES/strings.xml b/core/res/res/values-mcc310-mnc160-gl/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc160-gl-rES/strings.xml
rename to core/res/res/values-mcc310-mnc160-gl/strings.xml
diff --git a/core/res/res/values-mcc310-mnc160-gu-rIN/strings.xml b/core/res/res/values-mcc310-mnc160-gu/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc160-gu-rIN/strings.xml
rename to core/res/res/values-mcc310-mnc160-gu/strings.xml
diff --git a/core/res/res/values-mcc310-mnc160-hy-rAM/strings.xml b/core/res/res/values-mcc310-mnc160-hy/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc160-hy-rAM/strings.xml
rename to core/res/res/values-mcc310-mnc160-hy/strings.xml
diff --git a/core/res/res/values-mcc310-mnc160-is-rIS/strings.xml b/core/res/res/values-mcc310-mnc160-is/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc160-is-rIS/strings.xml
rename to core/res/res/values-mcc310-mnc160-is/strings.xml
diff --git a/core/res/res/values-mcc310-mnc160-ka-rGE/strings.xml b/core/res/res/values-mcc310-mnc160-ka/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc160-ka-rGE/strings.xml
rename to core/res/res/values-mcc310-mnc160-ka/strings.xml
diff --git a/core/res/res/values-mcc310-mnc160-kk-rKZ/strings.xml b/core/res/res/values-mcc310-mnc160-kk/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc160-kk-rKZ/strings.xml
rename to core/res/res/values-mcc310-mnc160-kk/strings.xml
diff --git a/core/res/res/values-mcc310-mnc160-km-rKH/strings.xml b/core/res/res/values-mcc310-mnc160-km/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc160-km-rKH/strings.xml
rename to core/res/res/values-mcc310-mnc160-km/strings.xml
diff --git a/core/res/res/values-mcc310-mnc160-kn-rIN/strings.xml b/core/res/res/values-mcc310-mnc160-kn/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc160-kn-rIN/strings.xml
rename to core/res/res/values-mcc310-mnc160-kn/strings.xml
diff --git a/core/res/res/values-mcc310-mnc160-ky-rKG/strings.xml b/core/res/res/values-mcc310-mnc160-ky/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc160-ky-rKG/strings.xml
rename to core/res/res/values-mcc310-mnc160-ky/strings.xml
diff --git a/core/res/res/values-mcc310-mnc160-lo-rLA/strings.xml b/core/res/res/values-mcc310-mnc160-lo/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc160-lo-rLA/strings.xml
rename to core/res/res/values-mcc310-mnc160-lo/strings.xml
diff --git a/core/res/res/values-mcc310-mnc160-mk-rMK/strings.xml b/core/res/res/values-mcc310-mnc160-mk/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc160-mk-rMK/strings.xml
rename to core/res/res/values-mcc310-mnc160-mk/strings.xml
diff --git a/core/res/res/values-mcc310-mnc160-ml-rIN/strings.xml b/core/res/res/values-mcc310-mnc160-ml/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc160-ml-rIN/strings.xml
rename to core/res/res/values-mcc310-mnc160-ml/strings.xml
diff --git a/core/res/res/values-mcc310-mnc160-mn-rMN/strings.xml b/core/res/res/values-mcc310-mnc160-mn/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc160-mn-rMN/strings.xml
rename to core/res/res/values-mcc310-mnc160-mn/strings.xml
diff --git a/core/res/res/values-mcc310-mnc160-mr-rIN/strings.xml b/core/res/res/values-mcc310-mnc160-mr/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc160-mr-rIN/strings.xml
rename to core/res/res/values-mcc310-mnc160-mr/strings.xml
diff --git a/core/res/res/values-mcc310-mnc160-ms-rMY/strings.xml b/core/res/res/values-mcc310-mnc160-ms/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc160-ms-rMY/strings.xml
rename to core/res/res/values-mcc310-mnc160-ms/strings.xml
diff --git a/core/res/res/values-mcc310-mnc160-my-rMM/strings.xml b/core/res/res/values-mcc310-mnc160-my/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc160-my-rMM/strings.xml
rename to core/res/res/values-mcc310-mnc160-my/strings.xml
diff --git a/core/res/res/values-mcc310-mnc160-ne-rNP/strings.xml b/core/res/res/values-mcc310-mnc160-ne/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc160-ne-rNP/strings.xml
rename to core/res/res/values-mcc310-mnc160-ne/strings.xml
diff --git a/core/res/res/values-mcc310-mnc160-pa-rIN/strings.xml b/core/res/res/values-mcc310-mnc160-pa/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc160-pa-rIN/strings.xml
rename to core/res/res/values-mcc310-mnc160-pa/strings.xml
diff --git a/core/res/res/values-mcc310-mnc160-si-rLK/strings.xml b/core/res/res/values-mcc310-mnc160-si/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc160-si-rLK/strings.xml
rename to core/res/res/values-mcc310-mnc160-si/strings.xml
diff --git a/core/res/res/values-mcc310-mnc160-sq-rAL/strings.xml b/core/res/res/values-mcc310-mnc160-sq/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc160-sq-rAL/strings.xml
rename to core/res/res/values-mcc310-mnc160-sq/strings.xml
diff --git a/core/res/res/values-mcc310-mnc160-ta-rIN/strings.xml b/core/res/res/values-mcc310-mnc160-ta/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc160-ta-rIN/strings.xml
rename to core/res/res/values-mcc310-mnc160-ta/strings.xml
diff --git a/core/res/res/values-mcc310-mnc160-te-rIN/strings.xml b/core/res/res/values-mcc310-mnc160-te/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc160-te-rIN/strings.xml
rename to core/res/res/values-mcc310-mnc160-te/strings.xml
diff --git a/core/res/res/values-mcc310-mnc160-ur-rPK/strings.xml b/core/res/res/values-mcc310-mnc160-ur/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc160-ur-rPK/strings.xml
rename to core/res/res/values-mcc310-mnc160-ur/strings.xml
diff --git a/core/res/res/values-mcc310-mnc160-uz-rUZ/strings.xml b/core/res/res/values-mcc310-mnc160-uz/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc160-uz-rUZ/strings.xml
rename to core/res/res/values-mcc310-mnc160-uz/strings.xml
diff --git a/core/res/res/values-mcc310-mnc200-az-rAZ/strings.xml b/core/res/res/values-mcc310-mnc200-az/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc200-az-rAZ/strings.xml
rename to core/res/res/values-mcc310-mnc200-az/strings.xml
diff --git a/core/res/res/values-mcc310-mnc200-be-rBY/strings.xml b/core/res/res/values-mcc310-mnc200-be/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc200-be-rBY/strings.xml
rename to core/res/res/values-mcc310-mnc200-be/strings.xml
diff --git a/core/res/res/values-mcc310-mnc200-bn-rBD/strings.xml b/core/res/res/values-mcc310-mnc200-bn/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc200-bn-rBD/strings.xml
rename to core/res/res/values-mcc310-mnc200-bn/strings.xml
diff --git a/core/res/res/values-mcc310-mnc200-bs-rBA/strings.xml b/core/res/res/values-mcc310-mnc200-bs/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc200-bs-rBA/strings.xml
rename to core/res/res/values-mcc310-mnc200-bs/strings.xml
diff --git a/core/res/res/values-mcc310-mnc200-et-rEE/strings.xml b/core/res/res/values-mcc310-mnc200-et/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc200-et-rEE/strings.xml
rename to core/res/res/values-mcc310-mnc200-et/strings.xml
diff --git a/core/res/res/values-mcc310-mnc200-eu-rES/strings.xml b/core/res/res/values-mcc310-mnc200-eu/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc200-eu-rES/strings.xml
rename to core/res/res/values-mcc310-mnc200-eu/strings.xml
diff --git a/core/res/res/values-mcc310-mnc200-gl-rES/strings.xml b/core/res/res/values-mcc310-mnc200-gl/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc200-gl-rES/strings.xml
rename to core/res/res/values-mcc310-mnc200-gl/strings.xml
diff --git a/core/res/res/values-mcc310-mnc200-gu-rIN/strings.xml b/core/res/res/values-mcc310-mnc200-gu/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc200-gu-rIN/strings.xml
rename to core/res/res/values-mcc310-mnc200-gu/strings.xml
diff --git a/core/res/res/values-mcc310-mnc200-hy-rAM/strings.xml b/core/res/res/values-mcc310-mnc200-hy/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc200-hy-rAM/strings.xml
rename to core/res/res/values-mcc310-mnc200-hy/strings.xml
diff --git a/core/res/res/values-mcc310-mnc200-is-rIS/strings.xml b/core/res/res/values-mcc310-mnc200-is/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc200-is-rIS/strings.xml
rename to core/res/res/values-mcc310-mnc200-is/strings.xml
diff --git a/core/res/res/values-mcc310-mnc200-ka-rGE/strings.xml b/core/res/res/values-mcc310-mnc200-ka/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc200-ka-rGE/strings.xml
rename to core/res/res/values-mcc310-mnc200-ka/strings.xml
diff --git a/core/res/res/values-mcc310-mnc200-kk-rKZ/strings.xml b/core/res/res/values-mcc310-mnc200-kk/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc200-kk-rKZ/strings.xml
rename to core/res/res/values-mcc310-mnc200-kk/strings.xml
diff --git a/core/res/res/values-mcc310-mnc200-km-rKH/strings.xml b/core/res/res/values-mcc310-mnc200-km/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc200-km-rKH/strings.xml
rename to core/res/res/values-mcc310-mnc200-km/strings.xml
diff --git a/core/res/res/values-mcc310-mnc200-kn-rIN/strings.xml b/core/res/res/values-mcc310-mnc200-kn/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc200-kn-rIN/strings.xml
rename to core/res/res/values-mcc310-mnc200-kn/strings.xml
diff --git a/core/res/res/values-mcc310-mnc200-ky-rKG/strings.xml b/core/res/res/values-mcc310-mnc200-ky/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc200-ky-rKG/strings.xml
rename to core/res/res/values-mcc310-mnc200-ky/strings.xml
diff --git a/core/res/res/values-mcc310-mnc200-lo-rLA/strings.xml b/core/res/res/values-mcc310-mnc200-lo/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc200-lo-rLA/strings.xml
rename to core/res/res/values-mcc310-mnc200-lo/strings.xml
diff --git a/core/res/res/values-mcc310-mnc200-mk-rMK/strings.xml b/core/res/res/values-mcc310-mnc200-mk/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc200-mk-rMK/strings.xml
rename to core/res/res/values-mcc310-mnc200-mk/strings.xml
diff --git a/core/res/res/values-mcc310-mnc200-ml-rIN/strings.xml b/core/res/res/values-mcc310-mnc200-ml/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc200-ml-rIN/strings.xml
rename to core/res/res/values-mcc310-mnc200-ml/strings.xml
diff --git a/core/res/res/values-mcc310-mnc200-mn-rMN/strings.xml b/core/res/res/values-mcc310-mnc200-mn/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc200-mn-rMN/strings.xml
rename to core/res/res/values-mcc310-mnc200-mn/strings.xml
diff --git a/core/res/res/values-mcc310-mnc200-mr-rIN/strings.xml b/core/res/res/values-mcc310-mnc200-mr/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc200-mr-rIN/strings.xml
rename to core/res/res/values-mcc310-mnc200-mr/strings.xml
diff --git a/core/res/res/values-mcc310-mnc200-ms-rMY/strings.xml b/core/res/res/values-mcc310-mnc200-ms/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc200-ms-rMY/strings.xml
rename to core/res/res/values-mcc310-mnc200-ms/strings.xml
diff --git a/core/res/res/values-mcc310-mnc200-my-rMM/strings.xml b/core/res/res/values-mcc310-mnc200-my/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc200-my-rMM/strings.xml
rename to core/res/res/values-mcc310-mnc200-my/strings.xml
diff --git a/core/res/res/values-mcc310-mnc200-ne-rNP/strings.xml b/core/res/res/values-mcc310-mnc200-ne/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc200-ne-rNP/strings.xml
rename to core/res/res/values-mcc310-mnc200-ne/strings.xml
diff --git a/core/res/res/values-mcc310-mnc200-pa-rIN/strings.xml b/core/res/res/values-mcc310-mnc200-pa/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc200-pa-rIN/strings.xml
rename to core/res/res/values-mcc310-mnc200-pa/strings.xml
diff --git a/core/res/res/values-mcc310-mnc200-si-rLK/strings.xml b/core/res/res/values-mcc310-mnc200-si/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc200-si-rLK/strings.xml
rename to core/res/res/values-mcc310-mnc200-si/strings.xml
diff --git a/core/res/res/values-mcc310-mnc200-sq-rAL/strings.xml b/core/res/res/values-mcc310-mnc200-sq/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc200-sq-rAL/strings.xml
rename to core/res/res/values-mcc310-mnc200-sq/strings.xml
diff --git a/core/res/res/values-mcc310-mnc200-ta-rIN/strings.xml b/core/res/res/values-mcc310-mnc200-ta/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc200-ta-rIN/strings.xml
rename to core/res/res/values-mcc310-mnc200-ta/strings.xml
diff --git a/core/res/res/values-mcc310-mnc200-te-rIN/strings.xml b/core/res/res/values-mcc310-mnc200-te/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc200-te-rIN/strings.xml
rename to core/res/res/values-mcc310-mnc200-te/strings.xml
diff --git a/core/res/res/values-mcc310-mnc200-ur-rPK/strings.xml b/core/res/res/values-mcc310-mnc200-ur/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc200-ur-rPK/strings.xml
rename to core/res/res/values-mcc310-mnc200-ur/strings.xml
diff --git a/core/res/res/values-mcc310-mnc200-uz-rUZ/strings.xml b/core/res/res/values-mcc310-mnc200-uz/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc200-uz-rUZ/strings.xml
rename to core/res/res/values-mcc310-mnc200-uz/strings.xml
diff --git a/core/res/res/values-mcc310-mnc210-az-rAZ/strings.xml b/core/res/res/values-mcc310-mnc210-az/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc210-az-rAZ/strings.xml
rename to core/res/res/values-mcc310-mnc210-az/strings.xml
diff --git a/core/res/res/values-mcc310-mnc210-be-rBY/strings.xml b/core/res/res/values-mcc310-mnc210-be/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc210-be-rBY/strings.xml
rename to core/res/res/values-mcc310-mnc210-be/strings.xml
diff --git a/core/res/res/values-mcc310-mnc210-bn-rBD/strings.xml b/core/res/res/values-mcc310-mnc210-bn/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc210-bn-rBD/strings.xml
rename to core/res/res/values-mcc310-mnc210-bn/strings.xml
diff --git a/core/res/res/values-mcc310-mnc210-bs-rBA/strings.xml b/core/res/res/values-mcc310-mnc210-bs/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc210-bs-rBA/strings.xml
rename to core/res/res/values-mcc310-mnc210-bs/strings.xml
diff --git a/core/res/res/values-mcc310-mnc210-et-rEE/strings.xml b/core/res/res/values-mcc310-mnc210-et/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc210-et-rEE/strings.xml
rename to core/res/res/values-mcc310-mnc210-et/strings.xml
diff --git a/core/res/res/values-mcc310-mnc210-eu-rES/strings.xml b/core/res/res/values-mcc310-mnc210-eu/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc210-eu-rES/strings.xml
rename to core/res/res/values-mcc310-mnc210-eu/strings.xml
diff --git a/core/res/res/values-mcc310-mnc210-gl-rES/strings.xml b/core/res/res/values-mcc310-mnc210-gl/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc210-gl-rES/strings.xml
rename to core/res/res/values-mcc310-mnc210-gl/strings.xml
diff --git a/core/res/res/values-mcc310-mnc210-gu-rIN/strings.xml b/core/res/res/values-mcc310-mnc210-gu/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc210-gu-rIN/strings.xml
rename to core/res/res/values-mcc310-mnc210-gu/strings.xml
diff --git a/core/res/res/values-mcc310-mnc210-hy-rAM/strings.xml b/core/res/res/values-mcc310-mnc210-hy/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc210-hy-rAM/strings.xml
rename to core/res/res/values-mcc310-mnc210-hy/strings.xml
diff --git a/core/res/res/values-mcc310-mnc210-is-rIS/strings.xml b/core/res/res/values-mcc310-mnc210-is/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc210-is-rIS/strings.xml
rename to core/res/res/values-mcc310-mnc210-is/strings.xml
diff --git a/core/res/res/values-mcc310-mnc210-ka-rGE/strings.xml b/core/res/res/values-mcc310-mnc210-ka/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc210-ka-rGE/strings.xml
rename to core/res/res/values-mcc310-mnc210-ka/strings.xml
diff --git a/core/res/res/values-mcc310-mnc210-kk-rKZ/strings.xml b/core/res/res/values-mcc310-mnc210-kk/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc210-kk-rKZ/strings.xml
rename to core/res/res/values-mcc310-mnc210-kk/strings.xml
diff --git a/core/res/res/values-mcc310-mnc210-km-rKH/strings.xml b/core/res/res/values-mcc310-mnc210-km/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc210-km-rKH/strings.xml
rename to core/res/res/values-mcc310-mnc210-km/strings.xml
diff --git a/core/res/res/values-mcc310-mnc210-kn-rIN/strings.xml b/core/res/res/values-mcc310-mnc210-kn/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc210-kn-rIN/strings.xml
rename to core/res/res/values-mcc310-mnc210-kn/strings.xml
diff --git a/core/res/res/values-mcc310-mnc210-ky-rKG/strings.xml b/core/res/res/values-mcc310-mnc210-ky/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc210-ky-rKG/strings.xml
rename to core/res/res/values-mcc310-mnc210-ky/strings.xml
diff --git a/core/res/res/values-mcc310-mnc210-lo-rLA/strings.xml b/core/res/res/values-mcc310-mnc210-lo/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc210-lo-rLA/strings.xml
rename to core/res/res/values-mcc310-mnc210-lo/strings.xml
diff --git a/core/res/res/values-mcc310-mnc210-mk-rMK/strings.xml b/core/res/res/values-mcc310-mnc210-mk/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc210-mk-rMK/strings.xml
rename to core/res/res/values-mcc310-mnc210-mk/strings.xml
diff --git a/core/res/res/values-mcc310-mnc210-ml-rIN/strings.xml b/core/res/res/values-mcc310-mnc210-ml/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc210-ml-rIN/strings.xml
rename to core/res/res/values-mcc310-mnc210-ml/strings.xml
diff --git a/core/res/res/values-mcc310-mnc210-mn-rMN/strings.xml b/core/res/res/values-mcc310-mnc210-mn/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc210-mn-rMN/strings.xml
rename to core/res/res/values-mcc310-mnc210-mn/strings.xml
diff --git a/core/res/res/values-mcc310-mnc210-mr-rIN/strings.xml b/core/res/res/values-mcc310-mnc210-mr/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc210-mr-rIN/strings.xml
rename to core/res/res/values-mcc310-mnc210-mr/strings.xml
diff --git a/core/res/res/values-mcc310-mnc210-ms-rMY/strings.xml b/core/res/res/values-mcc310-mnc210-ms/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc210-ms-rMY/strings.xml
rename to core/res/res/values-mcc310-mnc210-ms/strings.xml
diff --git a/core/res/res/values-mcc310-mnc210-my-rMM/strings.xml b/core/res/res/values-mcc310-mnc210-my/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc210-my-rMM/strings.xml
rename to core/res/res/values-mcc310-mnc210-my/strings.xml
diff --git a/core/res/res/values-mcc310-mnc210-ne-rNP/strings.xml b/core/res/res/values-mcc310-mnc210-ne/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc210-ne-rNP/strings.xml
rename to core/res/res/values-mcc310-mnc210-ne/strings.xml
diff --git a/core/res/res/values-mcc310-mnc210-pa-rIN/strings.xml b/core/res/res/values-mcc310-mnc210-pa/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc210-pa-rIN/strings.xml
rename to core/res/res/values-mcc310-mnc210-pa/strings.xml
diff --git a/core/res/res/values-mcc310-mnc210-si-rLK/strings.xml b/core/res/res/values-mcc310-mnc210-si/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc210-si-rLK/strings.xml
rename to core/res/res/values-mcc310-mnc210-si/strings.xml
diff --git a/core/res/res/values-mcc310-mnc210-sq-rAL/strings.xml b/core/res/res/values-mcc310-mnc210-sq/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc210-sq-rAL/strings.xml
rename to core/res/res/values-mcc310-mnc210-sq/strings.xml
diff --git a/core/res/res/values-mcc310-mnc210-ta-rIN/strings.xml b/core/res/res/values-mcc310-mnc210-ta/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc210-ta-rIN/strings.xml
rename to core/res/res/values-mcc310-mnc210-ta/strings.xml
diff --git a/core/res/res/values-mcc310-mnc210-te-rIN/strings.xml b/core/res/res/values-mcc310-mnc210-te/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc210-te-rIN/strings.xml
rename to core/res/res/values-mcc310-mnc210-te/strings.xml
diff --git a/core/res/res/values-mcc310-mnc210-ur-rPK/strings.xml b/core/res/res/values-mcc310-mnc210-ur/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc210-ur-rPK/strings.xml
rename to core/res/res/values-mcc310-mnc210-ur/strings.xml
diff --git a/core/res/res/values-mcc310-mnc210-uz-rUZ/strings.xml b/core/res/res/values-mcc310-mnc210-uz/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc210-uz-rUZ/strings.xml
rename to core/res/res/values-mcc310-mnc210-uz/strings.xml
diff --git a/core/res/res/values-mcc310-mnc220-az-rAZ/strings.xml b/core/res/res/values-mcc310-mnc220-az/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc220-az-rAZ/strings.xml
rename to core/res/res/values-mcc310-mnc220-az/strings.xml
diff --git a/core/res/res/values-mcc310-mnc220-be-rBY/strings.xml b/core/res/res/values-mcc310-mnc220-be/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc220-be-rBY/strings.xml
rename to core/res/res/values-mcc310-mnc220-be/strings.xml
diff --git a/core/res/res/values-mcc310-mnc220-bn-rBD/strings.xml b/core/res/res/values-mcc310-mnc220-bn/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc220-bn-rBD/strings.xml
rename to core/res/res/values-mcc310-mnc220-bn/strings.xml
diff --git a/core/res/res/values-mcc310-mnc220-bs-rBA/strings.xml b/core/res/res/values-mcc310-mnc220-bs/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc220-bs-rBA/strings.xml
rename to core/res/res/values-mcc310-mnc220-bs/strings.xml
diff --git a/core/res/res/values-mcc310-mnc220-et-rEE/strings.xml b/core/res/res/values-mcc310-mnc220-et/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc220-et-rEE/strings.xml
rename to core/res/res/values-mcc310-mnc220-et/strings.xml
diff --git a/core/res/res/values-mcc310-mnc220-eu-rES/strings.xml b/core/res/res/values-mcc310-mnc220-eu/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc220-eu-rES/strings.xml
rename to core/res/res/values-mcc310-mnc220-eu/strings.xml
diff --git a/core/res/res/values-mcc310-mnc220-gl-rES/strings.xml b/core/res/res/values-mcc310-mnc220-gl/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc220-gl-rES/strings.xml
rename to core/res/res/values-mcc310-mnc220-gl/strings.xml
diff --git a/core/res/res/values-mcc310-mnc220-gu-rIN/strings.xml b/core/res/res/values-mcc310-mnc220-gu/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc220-gu-rIN/strings.xml
rename to core/res/res/values-mcc310-mnc220-gu/strings.xml
diff --git a/core/res/res/values-mcc310-mnc220-hy-rAM/strings.xml b/core/res/res/values-mcc310-mnc220-hy/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc220-hy-rAM/strings.xml
rename to core/res/res/values-mcc310-mnc220-hy/strings.xml
diff --git a/core/res/res/values-mcc310-mnc220-is-rIS/strings.xml b/core/res/res/values-mcc310-mnc220-is/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc220-is-rIS/strings.xml
rename to core/res/res/values-mcc310-mnc220-is/strings.xml
diff --git a/core/res/res/values-mcc310-mnc220-ka-rGE/strings.xml b/core/res/res/values-mcc310-mnc220-ka/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc220-ka-rGE/strings.xml
rename to core/res/res/values-mcc310-mnc220-ka/strings.xml
diff --git a/core/res/res/values-mcc310-mnc220-kk-rKZ/strings.xml b/core/res/res/values-mcc310-mnc220-kk/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc220-kk-rKZ/strings.xml
rename to core/res/res/values-mcc310-mnc220-kk/strings.xml
diff --git a/core/res/res/values-mcc310-mnc220-km-rKH/strings.xml b/core/res/res/values-mcc310-mnc220-km/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc220-km-rKH/strings.xml
rename to core/res/res/values-mcc310-mnc220-km/strings.xml
diff --git a/core/res/res/values-mcc310-mnc220-kn-rIN/strings.xml b/core/res/res/values-mcc310-mnc220-kn/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc220-kn-rIN/strings.xml
rename to core/res/res/values-mcc310-mnc220-kn/strings.xml
diff --git a/core/res/res/values-mcc310-mnc220-ky-rKG/strings.xml b/core/res/res/values-mcc310-mnc220-ky/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc220-ky-rKG/strings.xml
rename to core/res/res/values-mcc310-mnc220-ky/strings.xml
diff --git a/core/res/res/values-mcc310-mnc220-lo-rLA/strings.xml b/core/res/res/values-mcc310-mnc220-lo/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc220-lo-rLA/strings.xml
rename to core/res/res/values-mcc310-mnc220-lo/strings.xml
diff --git a/core/res/res/values-mcc310-mnc220-mk-rMK/strings.xml b/core/res/res/values-mcc310-mnc220-mk/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc220-mk-rMK/strings.xml
rename to core/res/res/values-mcc310-mnc220-mk/strings.xml
diff --git a/core/res/res/values-mcc310-mnc220-ml-rIN/strings.xml b/core/res/res/values-mcc310-mnc220-ml/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc220-ml-rIN/strings.xml
rename to core/res/res/values-mcc310-mnc220-ml/strings.xml
diff --git a/core/res/res/values-mcc310-mnc220-mn-rMN/strings.xml b/core/res/res/values-mcc310-mnc220-mn/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc220-mn-rMN/strings.xml
rename to core/res/res/values-mcc310-mnc220-mn/strings.xml
diff --git a/core/res/res/values-mcc310-mnc220-mr-rIN/strings.xml b/core/res/res/values-mcc310-mnc220-mr/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc220-mr-rIN/strings.xml
rename to core/res/res/values-mcc310-mnc220-mr/strings.xml
diff --git a/core/res/res/values-mcc310-mnc220-ms-rMY/strings.xml b/core/res/res/values-mcc310-mnc220-ms/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc220-ms-rMY/strings.xml
rename to core/res/res/values-mcc310-mnc220-ms/strings.xml
diff --git a/core/res/res/values-mcc310-mnc220-my-rMM/strings.xml b/core/res/res/values-mcc310-mnc220-my/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc220-my-rMM/strings.xml
rename to core/res/res/values-mcc310-mnc220-my/strings.xml
diff --git a/core/res/res/values-mcc310-mnc220-ne-rNP/strings.xml b/core/res/res/values-mcc310-mnc220-ne/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc220-ne-rNP/strings.xml
rename to core/res/res/values-mcc310-mnc220-ne/strings.xml
diff --git a/core/res/res/values-mcc310-mnc220-pa-rIN/strings.xml b/core/res/res/values-mcc310-mnc220-pa/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc220-pa-rIN/strings.xml
rename to core/res/res/values-mcc310-mnc220-pa/strings.xml
diff --git a/core/res/res/values-mcc310-mnc220-si-rLK/strings.xml b/core/res/res/values-mcc310-mnc220-si/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc220-si-rLK/strings.xml
rename to core/res/res/values-mcc310-mnc220-si/strings.xml
diff --git a/core/res/res/values-mcc310-mnc220-sq-rAL/strings.xml b/core/res/res/values-mcc310-mnc220-sq/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc220-sq-rAL/strings.xml
rename to core/res/res/values-mcc310-mnc220-sq/strings.xml
diff --git a/core/res/res/values-mcc310-mnc220-ta-rIN/strings.xml b/core/res/res/values-mcc310-mnc220-ta/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc220-ta-rIN/strings.xml
rename to core/res/res/values-mcc310-mnc220-ta/strings.xml
diff --git a/core/res/res/values-mcc310-mnc220-te-rIN/strings.xml b/core/res/res/values-mcc310-mnc220-te/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc220-te-rIN/strings.xml
rename to core/res/res/values-mcc310-mnc220-te/strings.xml
diff --git a/core/res/res/values-mcc310-mnc220-ur-rPK/strings.xml b/core/res/res/values-mcc310-mnc220-ur/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc220-ur-rPK/strings.xml
rename to core/res/res/values-mcc310-mnc220-ur/strings.xml
diff --git a/core/res/res/values-mcc310-mnc220-uz-rUZ/strings.xml b/core/res/res/values-mcc310-mnc220-uz/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc220-uz-rUZ/strings.xml
rename to core/res/res/values-mcc310-mnc220-uz/strings.xml
diff --git a/core/res/res/values-mcc310-mnc230-az-rAZ/strings.xml b/core/res/res/values-mcc310-mnc230-az/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc230-az-rAZ/strings.xml
rename to core/res/res/values-mcc310-mnc230-az/strings.xml
diff --git a/core/res/res/values-mcc310-mnc230-be-rBY/strings.xml b/core/res/res/values-mcc310-mnc230-be/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc230-be-rBY/strings.xml
rename to core/res/res/values-mcc310-mnc230-be/strings.xml
diff --git a/core/res/res/values-mcc310-mnc230-bn-rBD/strings.xml b/core/res/res/values-mcc310-mnc230-bn/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc230-bn-rBD/strings.xml
rename to core/res/res/values-mcc310-mnc230-bn/strings.xml
diff --git a/core/res/res/values-mcc310-mnc230-bs-rBA/strings.xml b/core/res/res/values-mcc310-mnc230-bs/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc230-bs-rBA/strings.xml
rename to core/res/res/values-mcc310-mnc230-bs/strings.xml
diff --git a/core/res/res/values-mcc310-mnc230-et-rEE/strings.xml b/core/res/res/values-mcc310-mnc230-et/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc230-et-rEE/strings.xml
rename to core/res/res/values-mcc310-mnc230-et/strings.xml
diff --git a/core/res/res/values-mcc310-mnc230-eu-rES/strings.xml b/core/res/res/values-mcc310-mnc230-eu/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc230-eu-rES/strings.xml
rename to core/res/res/values-mcc310-mnc230-eu/strings.xml
diff --git a/core/res/res/values-mcc310-mnc230-gl-rES/strings.xml b/core/res/res/values-mcc310-mnc230-gl/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc230-gl-rES/strings.xml
rename to core/res/res/values-mcc310-mnc230-gl/strings.xml
diff --git a/core/res/res/values-mcc310-mnc230-gu-rIN/strings.xml b/core/res/res/values-mcc310-mnc230-gu/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc230-gu-rIN/strings.xml
rename to core/res/res/values-mcc310-mnc230-gu/strings.xml
diff --git a/core/res/res/values-mcc310-mnc230-hy-rAM/strings.xml b/core/res/res/values-mcc310-mnc230-hy/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc230-hy-rAM/strings.xml
rename to core/res/res/values-mcc310-mnc230-hy/strings.xml
diff --git a/core/res/res/values-mcc310-mnc230-is-rIS/strings.xml b/core/res/res/values-mcc310-mnc230-is/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc230-is-rIS/strings.xml
rename to core/res/res/values-mcc310-mnc230-is/strings.xml
diff --git a/core/res/res/values-mcc310-mnc230-ka-rGE/strings.xml b/core/res/res/values-mcc310-mnc230-ka/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc230-ka-rGE/strings.xml
rename to core/res/res/values-mcc310-mnc230-ka/strings.xml
diff --git a/core/res/res/values-mcc310-mnc230-kk-rKZ/strings.xml b/core/res/res/values-mcc310-mnc230-kk/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc230-kk-rKZ/strings.xml
rename to core/res/res/values-mcc310-mnc230-kk/strings.xml
diff --git a/core/res/res/values-mcc310-mnc230-km-rKH/strings.xml b/core/res/res/values-mcc310-mnc230-km/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc230-km-rKH/strings.xml
rename to core/res/res/values-mcc310-mnc230-km/strings.xml
diff --git a/core/res/res/values-mcc310-mnc230-kn-rIN/strings.xml b/core/res/res/values-mcc310-mnc230-kn/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc230-kn-rIN/strings.xml
rename to core/res/res/values-mcc310-mnc230-kn/strings.xml
diff --git a/core/res/res/values-mcc310-mnc230-ky-rKG/strings.xml b/core/res/res/values-mcc310-mnc230-ky/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc230-ky-rKG/strings.xml
rename to core/res/res/values-mcc310-mnc230-ky/strings.xml
diff --git a/core/res/res/values-mcc310-mnc230-lo-rLA/strings.xml b/core/res/res/values-mcc310-mnc230-lo/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc230-lo-rLA/strings.xml
rename to core/res/res/values-mcc310-mnc230-lo/strings.xml
diff --git a/core/res/res/values-mcc310-mnc230-mk-rMK/strings.xml b/core/res/res/values-mcc310-mnc230-mk/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc230-mk-rMK/strings.xml
rename to core/res/res/values-mcc310-mnc230-mk/strings.xml
diff --git a/core/res/res/values-mcc310-mnc230-ml-rIN/strings.xml b/core/res/res/values-mcc310-mnc230-ml/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc230-ml-rIN/strings.xml
rename to core/res/res/values-mcc310-mnc230-ml/strings.xml
diff --git a/core/res/res/values-mcc310-mnc230-mn-rMN/strings.xml b/core/res/res/values-mcc310-mnc230-mn/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc230-mn-rMN/strings.xml
rename to core/res/res/values-mcc310-mnc230-mn/strings.xml
diff --git a/core/res/res/values-mcc310-mnc230-mr-rIN/strings.xml b/core/res/res/values-mcc310-mnc230-mr/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc230-mr-rIN/strings.xml
rename to core/res/res/values-mcc310-mnc230-mr/strings.xml
diff --git a/core/res/res/values-mcc310-mnc230-ms-rMY/strings.xml b/core/res/res/values-mcc310-mnc230-ms/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc230-ms-rMY/strings.xml
rename to core/res/res/values-mcc310-mnc230-ms/strings.xml
diff --git a/core/res/res/values-mcc310-mnc230-my-rMM/strings.xml b/core/res/res/values-mcc310-mnc230-my/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc230-my-rMM/strings.xml
rename to core/res/res/values-mcc310-mnc230-my/strings.xml
diff --git a/core/res/res/values-mcc310-mnc230-ne-rNP/strings.xml b/core/res/res/values-mcc310-mnc230-ne/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc230-ne-rNP/strings.xml
rename to core/res/res/values-mcc310-mnc230-ne/strings.xml
diff --git a/core/res/res/values-mcc310-mnc230-pa-rIN/strings.xml b/core/res/res/values-mcc310-mnc230-pa/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc230-pa-rIN/strings.xml
rename to core/res/res/values-mcc310-mnc230-pa/strings.xml
diff --git a/core/res/res/values-mcc310-mnc230-si-rLK/strings.xml b/core/res/res/values-mcc310-mnc230-si/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc230-si-rLK/strings.xml
rename to core/res/res/values-mcc310-mnc230-si/strings.xml
diff --git a/core/res/res/values-mcc310-mnc230-sq-rAL/strings.xml b/core/res/res/values-mcc310-mnc230-sq/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc230-sq-rAL/strings.xml
rename to core/res/res/values-mcc310-mnc230-sq/strings.xml
diff --git a/core/res/res/values-mcc310-mnc230-ta-rIN/strings.xml b/core/res/res/values-mcc310-mnc230-ta/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc230-ta-rIN/strings.xml
rename to core/res/res/values-mcc310-mnc230-ta/strings.xml
diff --git a/core/res/res/values-mcc310-mnc230-te-rIN/strings.xml b/core/res/res/values-mcc310-mnc230-te/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc230-te-rIN/strings.xml
rename to core/res/res/values-mcc310-mnc230-te/strings.xml
diff --git a/core/res/res/values-mcc310-mnc230-ur-rPK/strings.xml b/core/res/res/values-mcc310-mnc230-ur/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc230-ur-rPK/strings.xml
rename to core/res/res/values-mcc310-mnc230-ur/strings.xml
diff --git a/core/res/res/values-mcc310-mnc230-uz-rUZ/strings.xml b/core/res/res/values-mcc310-mnc230-uz/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc230-uz-rUZ/strings.xml
rename to core/res/res/values-mcc310-mnc230-uz/strings.xml
diff --git a/core/res/res/values-mcc310-mnc240-az-rAZ/strings.xml b/core/res/res/values-mcc310-mnc240-az/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc240-az-rAZ/strings.xml
rename to core/res/res/values-mcc310-mnc240-az/strings.xml
diff --git a/core/res/res/values-mcc310-mnc240-be-rBY/strings.xml b/core/res/res/values-mcc310-mnc240-be/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc240-be-rBY/strings.xml
rename to core/res/res/values-mcc310-mnc240-be/strings.xml
diff --git a/core/res/res/values-mcc310-mnc240-bn-rBD/strings.xml b/core/res/res/values-mcc310-mnc240-bn/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc240-bn-rBD/strings.xml
rename to core/res/res/values-mcc310-mnc240-bn/strings.xml
diff --git a/core/res/res/values-mcc310-mnc240-bs-rBA/strings.xml b/core/res/res/values-mcc310-mnc240-bs/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc240-bs-rBA/strings.xml
rename to core/res/res/values-mcc310-mnc240-bs/strings.xml
diff --git a/core/res/res/values-mcc310-mnc240-et-rEE/strings.xml b/core/res/res/values-mcc310-mnc240-et/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc240-et-rEE/strings.xml
rename to core/res/res/values-mcc310-mnc240-et/strings.xml
diff --git a/core/res/res/values-mcc310-mnc240-eu-rES/strings.xml b/core/res/res/values-mcc310-mnc240-eu/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc240-eu-rES/strings.xml
rename to core/res/res/values-mcc310-mnc240-eu/strings.xml
diff --git a/core/res/res/values-mcc310-mnc240-gl-rES/strings.xml b/core/res/res/values-mcc310-mnc240-gl/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc240-gl-rES/strings.xml
rename to core/res/res/values-mcc310-mnc240-gl/strings.xml
diff --git a/core/res/res/values-mcc310-mnc240-gu-rIN/strings.xml b/core/res/res/values-mcc310-mnc240-gu/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc240-gu-rIN/strings.xml
rename to core/res/res/values-mcc310-mnc240-gu/strings.xml
diff --git a/core/res/res/values-mcc310-mnc240-hy-rAM/strings.xml b/core/res/res/values-mcc310-mnc240-hy/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc240-hy-rAM/strings.xml
rename to core/res/res/values-mcc310-mnc240-hy/strings.xml
diff --git a/core/res/res/values-mcc310-mnc240-is-rIS/strings.xml b/core/res/res/values-mcc310-mnc240-is/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc240-is-rIS/strings.xml
rename to core/res/res/values-mcc310-mnc240-is/strings.xml
diff --git a/core/res/res/values-mcc310-mnc240-ka-rGE/strings.xml b/core/res/res/values-mcc310-mnc240-ka/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc240-ka-rGE/strings.xml
rename to core/res/res/values-mcc310-mnc240-ka/strings.xml
diff --git a/core/res/res/values-mcc310-mnc240-kk-rKZ/strings.xml b/core/res/res/values-mcc310-mnc240-kk/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc240-kk-rKZ/strings.xml
rename to core/res/res/values-mcc310-mnc240-kk/strings.xml
diff --git a/core/res/res/values-mcc310-mnc240-km-rKH/strings.xml b/core/res/res/values-mcc310-mnc240-km/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc240-km-rKH/strings.xml
rename to core/res/res/values-mcc310-mnc240-km/strings.xml
diff --git a/core/res/res/values-mcc310-mnc240-kn-rIN/strings.xml b/core/res/res/values-mcc310-mnc240-kn/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc240-kn-rIN/strings.xml
rename to core/res/res/values-mcc310-mnc240-kn/strings.xml
diff --git a/core/res/res/values-mcc310-mnc240-ky-rKG/strings.xml b/core/res/res/values-mcc310-mnc240-ky/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc240-ky-rKG/strings.xml
rename to core/res/res/values-mcc310-mnc240-ky/strings.xml
diff --git a/core/res/res/values-mcc310-mnc240-lo-rLA/strings.xml b/core/res/res/values-mcc310-mnc240-lo/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc240-lo-rLA/strings.xml
rename to core/res/res/values-mcc310-mnc240-lo/strings.xml
diff --git a/core/res/res/values-mcc310-mnc240-mk-rMK/strings.xml b/core/res/res/values-mcc310-mnc240-mk/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc240-mk-rMK/strings.xml
rename to core/res/res/values-mcc310-mnc240-mk/strings.xml
diff --git a/core/res/res/values-mcc310-mnc240-ml-rIN/strings.xml b/core/res/res/values-mcc310-mnc240-ml/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc240-ml-rIN/strings.xml
rename to core/res/res/values-mcc310-mnc240-ml/strings.xml
diff --git a/core/res/res/values-mcc310-mnc240-mn-rMN/strings.xml b/core/res/res/values-mcc310-mnc240-mn/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc240-mn-rMN/strings.xml
rename to core/res/res/values-mcc310-mnc240-mn/strings.xml
diff --git a/core/res/res/values-mcc310-mnc240-mr-rIN/strings.xml b/core/res/res/values-mcc310-mnc240-mr/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc240-mr-rIN/strings.xml
rename to core/res/res/values-mcc310-mnc240-mr/strings.xml
diff --git a/core/res/res/values-mcc310-mnc240-ms-rMY/strings.xml b/core/res/res/values-mcc310-mnc240-ms/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc240-ms-rMY/strings.xml
rename to core/res/res/values-mcc310-mnc240-ms/strings.xml
diff --git a/core/res/res/values-mcc310-mnc240-my-rMM/strings.xml b/core/res/res/values-mcc310-mnc240-my/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc240-my-rMM/strings.xml
rename to core/res/res/values-mcc310-mnc240-my/strings.xml
diff --git a/core/res/res/values-mcc310-mnc240-ne-rNP/strings.xml b/core/res/res/values-mcc310-mnc240-ne/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc240-ne-rNP/strings.xml
rename to core/res/res/values-mcc310-mnc240-ne/strings.xml
diff --git a/core/res/res/values-mcc310-mnc240-pa-rIN/strings.xml b/core/res/res/values-mcc310-mnc240-pa/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc240-pa-rIN/strings.xml
rename to core/res/res/values-mcc310-mnc240-pa/strings.xml
diff --git a/core/res/res/values-mcc310-mnc240-si-rLK/strings.xml b/core/res/res/values-mcc310-mnc240-si/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc240-si-rLK/strings.xml
rename to core/res/res/values-mcc310-mnc240-si/strings.xml
diff --git a/core/res/res/values-mcc310-mnc240-sq-rAL/strings.xml b/core/res/res/values-mcc310-mnc240-sq/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc240-sq-rAL/strings.xml
rename to core/res/res/values-mcc310-mnc240-sq/strings.xml
diff --git a/core/res/res/values-mcc310-mnc240-ta-rIN/strings.xml b/core/res/res/values-mcc310-mnc240-ta/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc240-ta-rIN/strings.xml
rename to core/res/res/values-mcc310-mnc240-ta/strings.xml
diff --git a/core/res/res/values-mcc310-mnc240-te-rIN/strings.xml b/core/res/res/values-mcc310-mnc240-te/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc240-te-rIN/strings.xml
rename to core/res/res/values-mcc310-mnc240-te/strings.xml
diff --git a/core/res/res/values-mcc310-mnc240-ur-rPK/strings.xml b/core/res/res/values-mcc310-mnc240-ur/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc240-ur-rPK/strings.xml
rename to core/res/res/values-mcc310-mnc240-ur/strings.xml
diff --git a/core/res/res/values-mcc310-mnc240-uz-rUZ/strings.xml b/core/res/res/values-mcc310-mnc240-uz/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc240-uz-rUZ/strings.xml
rename to core/res/res/values-mcc310-mnc240-uz/strings.xml
diff --git a/core/res/res/values-mcc310-mnc250-az-rAZ/strings.xml b/core/res/res/values-mcc310-mnc250-az/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc250-az-rAZ/strings.xml
rename to core/res/res/values-mcc310-mnc250-az/strings.xml
diff --git a/core/res/res/values-mcc310-mnc250-be-rBY/strings.xml b/core/res/res/values-mcc310-mnc250-be/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc250-be-rBY/strings.xml
rename to core/res/res/values-mcc310-mnc250-be/strings.xml
diff --git a/core/res/res/values-mcc310-mnc250-bn-rBD/strings.xml b/core/res/res/values-mcc310-mnc250-bn/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc250-bn-rBD/strings.xml
rename to core/res/res/values-mcc310-mnc250-bn/strings.xml
diff --git a/core/res/res/values-mcc310-mnc250-bs-rBA/strings.xml b/core/res/res/values-mcc310-mnc250-bs/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc250-bs-rBA/strings.xml
rename to core/res/res/values-mcc310-mnc250-bs/strings.xml
diff --git a/core/res/res/values-mcc310-mnc250-et-rEE/strings.xml b/core/res/res/values-mcc310-mnc250-et/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc250-et-rEE/strings.xml
rename to core/res/res/values-mcc310-mnc250-et/strings.xml
diff --git a/core/res/res/values-mcc310-mnc250-eu-rES/strings.xml b/core/res/res/values-mcc310-mnc250-eu/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc250-eu-rES/strings.xml
rename to core/res/res/values-mcc310-mnc250-eu/strings.xml
diff --git a/core/res/res/values-mcc310-mnc250-gl-rES/strings.xml b/core/res/res/values-mcc310-mnc250-gl/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc250-gl-rES/strings.xml
rename to core/res/res/values-mcc310-mnc250-gl/strings.xml
diff --git a/core/res/res/values-mcc310-mnc250-gu-rIN/strings.xml b/core/res/res/values-mcc310-mnc250-gu/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc250-gu-rIN/strings.xml
rename to core/res/res/values-mcc310-mnc250-gu/strings.xml
diff --git a/core/res/res/values-mcc310-mnc250-hy-rAM/strings.xml b/core/res/res/values-mcc310-mnc250-hy/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc250-hy-rAM/strings.xml
rename to core/res/res/values-mcc310-mnc250-hy/strings.xml
diff --git a/core/res/res/values-mcc310-mnc250-is-rIS/strings.xml b/core/res/res/values-mcc310-mnc250-is/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc250-is-rIS/strings.xml
rename to core/res/res/values-mcc310-mnc250-is/strings.xml
diff --git a/core/res/res/values-mcc310-mnc250-ka-rGE/strings.xml b/core/res/res/values-mcc310-mnc250-ka/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc250-ka-rGE/strings.xml
rename to core/res/res/values-mcc310-mnc250-ka/strings.xml
diff --git a/core/res/res/values-mcc310-mnc250-kk-rKZ/strings.xml b/core/res/res/values-mcc310-mnc250-kk/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc250-kk-rKZ/strings.xml
rename to core/res/res/values-mcc310-mnc250-kk/strings.xml
diff --git a/core/res/res/values-mcc310-mnc250-km-rKH/strings.xml b/core/res/res/values-mcc310-mnc250-km/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc250-km-rKH/strings.xml
rename to core/res/res/values-mcc310-mnc250-km/strings.xml
diff --git a/core/res/res/values-mcc310-mnc250-kn-rIN/strings.xml b/core/res/res/values-mcc310-mnc250-kn/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc250-kn-rIN/strings.xml
rename to core/res/res/values-mcc310-mnc250-kn/strings.xml
diff --git a/core/res/res/values-mcc310-mnc250-ky-rKG/strings.xml b/core/res/res/values-mcc310-mnc250-ky/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc250-ky-rKG/strings.xml
rename to core/res/res/values-mcc310-mnc250-ky/strings.xml
diff --git a/core/res/res/values-mcc310-mnc250-lo-rLA/strings.xml b/core/res/res/values-mcc310-mnc250-lo/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc250-lo-rLA/strings.xml
rename to core/res/res/values-mcc310-mnc250-lo/strings.xml
diff --git a/core/res/res/values-mcc310-mnc250-mk-rMK/strings.xml b/core/res/res/values-mcc310-mnc250-mk/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc250-mk-rMK/strings.xml
rename to core/res/res/values-mcc310-mnc250-mk/strings.xml
diff --git a/core/res/res/values-mcc310-mnc250-ml-rIN/strings.xml b/core/res/res/values-mcc310-mnc250-ml/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc250-ml-rIN/strings.xml
rename to core/res/res/values-mcc310-mnc250-ml/strings.xml
diff --git a/core/res/res/values-mcc310-mnc250-mn-rMN/strings.xml b/core/res/res/values-mcc310-mnc250-mn/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc250-mn-rMN/strings.xml
rename to core/res/res/values-mcc310-mnc250-mn/strings.xml
diff --git a/core/res/res/values-mcc310-mnc250-mr-rIN/strings.xml b/core/res/res/values-mcc310-mnc250-mr/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc250-mr-rIN/strings.xml
rename to core/res/res/values-mcc310-mnc250-mr/strings.xml
diff --git a/core/res/res/values-mcc310-mnc250-ms-rMY/strings.xml b/core/res/res/values-mcc310-mnc250-ms/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc250-ms-rMY/strings.xml
rename to core/res/res/values-mcc310-mnc250-ms/strings.xml
diff --git a/core/res/res/values-mcc310-mnc250-my-rMM/strings.xml b/core/res/res/values-mcc310-mnc250-my/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc250-my-rMM/strings.xml
rename to core/res/res/values-mcc310-mnc250-my/strings.xml
diff --git a/core/res/res/values-mcc310-mnc250-ne-rNP/strings.xml b/core/res/res/values-mcc310-mnc250-ne/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc250-ne-rNP/strings.xml
rename to core/res/res/values-mcc310-mnc250-ne/strings.xml
diff --git a/core/res/res/values-mcc310-mnc250-pa-rIN/strings.xml b/core/res/res/values-mcc310-mnc250-pa/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc250-pa-rIN/strings.xml
rename to core/res/res/values-mcc310-mnc250-pa/strings.xml
diff --git a/core/res/res/values-mcc310-mnc250-si-rLK/strings.xml b/core/res/res/values-mcc310-mnc250-si/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc250-si-rLK/strings.xml
rename to core/res/res/values-mcc310-mnc250-si/strings.xml
diff --git a/core/res/res/values-mcc310-mnc250-sq-rAL/strings.xml b/core/res/res/values-mcc310-mnc250-sq/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc250-sq-rAL/strings.xml
rename to core/res/res/values-mcc310-mnc250-sq/strings.xml
diff --git a/core/res/res/values-mcc310-mnc250-ta-rIN/strings.xml b/core/res/res/values-mcc310-mnc250-ta/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc250-ta-rIN/strings.xml
rename to core/res/res/values-mcc310-mnc250-ta/strings.xml
diff --git a/core/res/res/values-mcc310-mnc250-te-rIN/strings.xml b/core/res/res/values-mcc310-mnc250-te/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc250-te-rIN/strings.xml
rename to core/res/res/values-mcc310-mnc250-te/strings.xml
diff --git a/core/res/res/values-mcc310-mnc250-ur-rPK/strings.xml b/core/res/res/values-mcc310-mnc250-ur/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc250-ur-rPK/strings.xml
rename to core/res/res/values-mcc310-mnc250-ur/strings.xml
diff --git a/core/res/res/values-mcc310-mnc250-uz-rUZ/strings.xml b/core/res/res/values-mcc310-mnc250-uz/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc250-uz-rUZ/strings.xml
rename to core/res/res/values-mcc310-mnc250-uz/strings.xml
diff --git a/core/res/res/values-mcc310-mnc260-az-rAZ/strings.xml b/core/res/res/values-mcc310-mnc260-az/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc260-az-rAZ/strings.xml
rename to core/res/res/values-mcc310-mnc260-az/strings.xml
diff --git a/core/res/res/values-mcc310-mnc260-be-rBY/strings.xml b/core/res/res/values-mcc310-mnc260-be/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc260-be-rBY/strings.xml
rename to core/res/res/values-mcc310-mnc260-be/strings.xml
diff --git a/core/res/res/values-mcc310-mnc260-bn-rBD/strings.xml b/core/res/res/values-mcc310-mnc260-bn/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc260-bn-rBD/strings.xml
rename to core/res/res/values-mcc310-mnc260-bn/strings.xml
diff --git a/core/res/res/values-mcc310-mnc260-bs-rBA/strings.xml b/core/res/res/values-mcc310-mnc260-bs/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc260-bs-rBA/strings.xml
rename to core/res/res/values-mcc310-mnc260-bs/strings.xml
diff --git a/core/res/res/values-mcc310-mnc260-et-rEE/strings.xml b/core/res/res/values-mcc310-mnc260-et/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc260-et-rEE/strings.xml
rename to core/res/res/values-mcc310-mnc260-et/strings.xml
diff --git a/core/res/res/values-mcc310-mnc260-eu-rES/strings.xml b/core/res/res/values-mcc310-mnc260-eu/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc260-eu-rES/strings.xml
rename to core/res/res/values-mcc310-mnc260-eu/strings.xml
diff --git a/core/res/res/values-mcc310-mnc260-gl-rES/strings.xml b/core/res/res/values-mcc310-mnc260-gl/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc260-gl-rES/strings.xml
rename to core/res/res/values-mcc310-mnc260-gl/strings.xml
diff --git a/core/res/res/values-mcc310-mnc260-gu-rIN/strings.xml b/core/res/res/values-mcc310-mnc260-gu/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc260-gu-rIN/strings.xml
rename to core/res/res/values-mcc310-mnc260-gu/strings.xml
diff --git a/core/res/res/values-mcc310-mnc260-hy-rAM/strings.xml b/core/res/res/values-mcc310-mnc260-hy/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc260-hy-rAM/strings.xml
rename to core/res/res/values-mcc310-mnc260-hy/strings.xml
diff --git a/core/res/res/values-mcc310-mnc260-is-rIS/strings.xml b/core/res/res/values-mcc310-mnc260-is/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc260-is-rIS/strings.xml
rename to core/res/res/values-mcc310-mnc260-is/strings.xml
diff --git a/core/res/res/values-mcc310-mnc260-ka-rGE/strings.xml b/core/res/res/values-mcc310-mnc260-ka/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc260-ka-rGE/strings.xml
rename to core/res/res/values-mcc310-mnc260-ka/strings.xml
diff --git a/core/res/res/values-mcc310-mnc260-kk-rKZ/strings.xml b/core/res/res/values-mcc310-mnc260-kk/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc260-kk-rKZ/strings.xml
rename to core/res/res/values-mcc310-mnc260-kk/strings.xml
diff --git a/core/res/res/values-mcc310-mnc260-km-rKH/strings.xml b/core/res/res/values-mcc310-mnc260-km/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc260-km-rKH/strings.xml
rename to core/res/res/values-mcc310-mnc260-km/strings.xml
diff --git a/core/res/res/values-mcc310-mnc260-kn-rIN/strings.xml b/core/res/res/values-mcc310-mnc260-kn/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc260-kn-rIN/strings.xml
rename to core/res/res/values-mcc310-mnc260-kn/strings.xml
diff --git a/core/res/res/values-mcc310-mnc260-ky-rKG/strings.xml b/core/res/res/values-mcc310-mnc260-ky/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc260-ky-rKG/strings.xml
rename to core/res/res/values-mcc310-mnc260-ky/strings.xml
diff --git a/core/res/res/values-mcc310-mnc260-lo-rLA/strings.xml b/core/res/res/values-mcc310-mnc260-lo/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc260-lo-rLA/strings.xml
rename to core/res/res/values-mcc310-mnc260-lo/strings.xml
diff --git a/core/res/res/values-mcc310-mnc260-mk-rMK/strings.xml b/core/res/res/values-mcc310-mnc260-mk/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc260-mk-rMK/strings.xml
rename to core/res/res/values-mcc310-mnc260-mk/strings.xml
diff --git a/core/res/res/values-mcc310-mnc260-ml-rIN/strings.xml b/core/res/res/values-mcc310-mnc260-ml/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc260-ml-rIN/strings.xml
rename to core/res/res/values-mcc310-mnc260-ml/strings.xml
diff --git a/core/res/res/values-mcc310-mnc260-mn-rMN/strings.xml b/core/res/res/values-mcc310-mnc260-mn/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc260-mn-rMN/strings.xml
rename to core/res/res/values-mcc310-mnc260-mn/strings.xml
diff --git a/core/res/res/values-mcc310-mnc260-mr-rIN/strings.xml b/core/res/res/values-mcc310-mnc260-mr/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc260-mr-rIN/strings.xml
rename to core/res/res/values-mcc310-mnc260-mr/strings.xml
diff --git a/core/res/res/values-mcc310-mnc260-ms-rMY/strings.xml b/core/res/res/values-mcc310-mnc260-ms/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc260-ms-rMY/strings.xml
rename to core/res/res/values-mcc310-mnc260-ms/strings.xml
diff --git a/core/res/res/values-mcc310-mnc260-my-rMM/strings.xml b/core/res/res/values-mcc310-mnc260-my/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc260-my-rMM/strings.xml
rename to core/res/res/values-mcc310-mnc260-my/strings.xml
diff --git a/core/res/res/values-mcc310-mnc260-ne-rNP/strings.xml b/core/res/res/values-mcc310-mnc260-ne/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc260-ne-rNP/strings.xml
rename to core/res/res/values-mcc310-mnc260-ne/strings.xml
diff --git a/core/res/res/values-mcc310-mnc260-pa-rIN/strings.xml b/core/res/res/values-mcc310-mnc260-pa/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc260-pa-rIN/strings.xml
rename to core/res/res/values-mcc310-mnc260-pa/strings.xml
diff --git a/core/res/res/values-mcc310-mnc260-si-rLK/strings.xml b/core/res/res/values-mcc310-mnc260-si/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc260-si-rLK/strings.xml
rename to core/res/res/values-mcc310-mnc260-si/strings.xml
diff --git a/core/res/res/values-mcc310-mnc260-sq-rAL/strings.xml b/core/res/res/values-mcc310-mnc260-sq/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc260-sq-rAL/strings.xml
rename to core/res/res/values-mcc310-mnc260-sq/strings.xml
diff --git a/core/res/res/values-mcc310-mnc260-ta-rIN/strings.xml b/core/res/res/values-mcc310-mnc260-ta/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc260-ta-rIN/strings.xml
rename to core/res/res/values-mcc310-mnc260-ta/strings.xml
diff --git a/core/res/res/values-mcc310-mnc260-te-rIN/strings.xml b/core/res/res/values-mcc310-mnc260-te/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc260-te-rIN/strings.xml
rename to core/res/res/values-mcc310-mnc260-te/strings.xml
diff --git a/core/res/res/values-mcc310-mnc260-ur-rPK/strings.xml b/core/res/res/values-mcc310-mnc260-ur/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc260-ur-rPK/strings.xml
rename to core/res/res/values-mcc310-mnc260-ur/strings.xml
diff --git a/core/res/res/values-mcc310-mnc260-uz-rUZ/strings.xml b/core/res/res/values-mcc310-mnc260-uz/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc260-uz-rUZ/strings.xml
rename to core/res/res/values-mcc310-mnc260-uz/strings.xml
diff --git a/core/res/res/values-mcc310-mnc270-az-rAZ/strings.xml b/core/res/res/values-mcc310-mnc270-az/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc270-az-rAZ/strings.xml
rename to core/res/res/values-mcc310-mnc270-az/strings.xml
diff --git a/core/res/res/values-mcc310-mnc270-be-rBY/strings.xml b/core/res/res/values-mcc310-mnc270-be/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc270-be-rBY/strings.xml
rename to core/res/res/values-mcc310-mnc270-be/strings.xml
diff --git a/core/res/res/values-mcc310-mnc270-bn-rBD/strings.xml b/core/res/res/values-mcc310-mnc270-bn/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc270-bn-rBD/strings.xml
rename to core/res/res/values-mcc310-mnc270-bn/strings.xml
diff --git a/core/res/res/values-mcc310-mnc270-bs-rBA/strings.xml b/core/res/res/values-mcc310-mnc270-bs/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc270-bs-rBA/strings.xml
rename to core/res/res/values-mcc310-mnc270-bs/strings.xml
diff --git a/core/res/res/values-mcc310-mnc270-et-rEE/strings.xml b/core/res/res/values-mcc310-mnc270-et/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc270-et-rEE/strings.xml
rename to core/res/res/values-mcc310-mnc270-et/strings.xml
diff --git a/core/res/res/values-mcc310-mnc270-eu-rES/strings.xml b/core/res/res/values-mcc310-mnc270-eu/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc270-eu-rES/strings.xml
rename to core/res/res/values-mcc310-mnc270-eu/strings.xml
diff --git a/core/res/res/values-mcc310-mnc270-gl-rES/strings.xml b/core/res/res/values-mcc310-mnc270-gl/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc270-gl-rES/strings.xml
rename to core/res/res/values-mcc310-mnc270-gl/strings.xml
diff --git a/core/res/res/values-mcc310-mnc270-gu-rIN/strings.xml b/core/res/res/values-mcc310-mnc270-gu/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc270-gu-rIN/strings.xml
rename to core/res/res/values-mcc310-mnc270-gu/strings.xml
diff --git a/core/res/res/values-mcc310-mnc270-hy-rAM/strings.xml b/core/res/res/values-mcc310-mnc270-hy/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc270-hy-rAM/strings.xml
rename to core/res/res/values-mcc310-mnc270-hy/strings.xml
diff --git a/core/res/res/values-mcc310-mnc270-is-rIS/strings.xml b/core/res/res/values-mcc310-mnc270-is/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc270-is-rIS/strings.xml
rename to core/res/res/values-mcc310-mnc270-is/strings.xml
diff --git a/core/res/res/values-mcc310-mnc270-ka-rGE/strings.xml b/core/res/res/values-mcc310-mnc270-ka/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc270-ka-rGE/strings.xml
rename to core/res/res/values-mcc310-mnc270-ka/strings.xml
diff --git a/core/res/res/values-mcc310-mnc270-kk-rKZ/strings.xml b/core/res/res/values-mcc310-mnc270-kk/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc270-kk-rKZ/strings.xml
rename to core/res/res/values-mcc310-mnc270-kk/strings.xml
diff --git a/core/res/res/values-mcc310-mnc270-km-rKH/strings.xml b/core/res/res/values-mcc310-mnc270-km/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc270-km-rKH/strings.xml
rename to core/res/res/values-mcc310-mnc270-km/strings.xml
diff --git a/core/res/res/values-mcc310-mnc270-kn-rIN/strings.xml b/core/res/res/values-mcc310-mnc270-kn/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc270-kn-rIN/strings.xml
rename to core/res/res/values-mcc310-mnc270-kn/strings.xml
diff --git a/core/res/res/values-mcc310-mnc270-ky-rKG/strings.xml b/core/res/res/values-mcc310-mnc270-ky/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc270-ky-rKG/strings.xml
rename to core/res/res/values-mcc310-mnc270-ky/strings.xml
diff --git a/core/res/res/values-mcc310-mnc270-lo-rLA/strings.xml b/core/res/res/values-mcc310-mnc270-lo/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc270-lo-rLA/strings.xml
rename to core/res/res/values-mcc310-mnc270-lo/strings.xml
diff --git a/core/res/res/values-mcc310-mnc270-mk-rMK/strings.xml b/core/res/res/values-mcc310-mnc270-mk/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc270-mk-rMK/strings.xml
rename to core/res/res/values-mcc310-mnc270-mk/strings.xml
diff --git a/core/res/res/values-mcc310-mnc270-ml-rIN/strings.xml b/core/res/res/values-mcc310-mnc270-ml/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc270-ml-rIN/strings.xml
rename to core/res/res/values-mcc310-mnc270-ml/strings.xml
diff --git a/core/res/res/values-mcc310-mnc270-mn-rMN/strings.xml b/core/res/res/values-mcc310-mnc270-mn/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc270-mn-rMN/strings.xml
rename to core/res/res/values-mcc310-mnc270-mn/strings.xml
diff --git a/core/res/res/values-mcc310-mnc270-mr-rIN/strings.xml b/core/res/res/values-mcc310-mnc270-mr/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc270-mr-rIN/strings.xml
rename to core/res/res/values-mcc310-mnc270-mr/strings.xml
diff --git a/core/res/res/values-mcc310-mnc270-ms-rMY/strings.xml b/core/res/res/values-mcc310-mnc270-ms/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc270-ms-rMY/strings.xml
rename to core/res/res/values-mcc310-mnc270-ms/strings.xml
diff --git a/core/res/res/values-mcc310-mnc270-my-rMM/strings.xml b/core/res/res/values-mcc310-mnc270-my/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc270-my-rMM/strings.xml
rename to core/res/res/values-mcc310-mnc270-my/strings.xml
diff --git a/core/res/res/values-mcc310-mnc270-ne-rNP/strings.xml b/core/res/res/values-mcc310-mnc270-ne/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc270-ne-rNP/strings.xml
rename to core/res/res/values-mcc310-mnc270-ne/strings.xml
diff --git a/core/res/res/values-mcc310-mnc270-pa-rIN/strings.xml b/core/res/res/values-mcc310-mnc270-pa/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc270-pa-rIN/strings.xml
rename to core/res/res/values-mcc310-mnc270-pa/strings.xml
diff --git a/core/res/res/values-mcc310-mnc270-si-rLK/strings.xml b/core/res/res/values-mcc310-mnc270-si/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc270-si-rLK/strings.xml
rename to core/res/res/values-mcc310-mnc270-si/strings.xml
diff --git a/core/res/res/values-mcc310-mnc270-sq-rAL/strings.xml b/core/res/res/values-mcc310-mnc270-sq/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc270-sq-rAL/strings.xml
rename to core/res/res/values-mcc310-mnc270-sq/strings.xml
diff --git a/core/res/res/values-mcc310-mnc270-ta-rIN/strings.xml b/core/res/res/values-mcc310-mnc270-ta/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc270-ta-rIN/strings.xml
rename to core/res/res/values-mcc310-mnc270-ta/strings.xml
diff --git a/core/res/res/values-mcc310-mnc270-te-rIN/strings.xml b/core/res/res/values-mcc310-mnc270-te/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc270-te-rIN/strings.xml
rename to core/res/res/values-mcc310-mnc270-te/strings.xml
diff --git a/core/res/res/values-mcc310-mnc270-ur-rPK/strings.xml b/core/res/res/values-mcc310-mnc270-ur/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc270-ur-rPK/strings.xml
rename to core/res/res/values-mcc310-mnc270-ur/strings.xml
diff --git a/core/res/res/values-mcc310-mnc270-uz-rUZ/strings.xml b/core/res/res/values-mcc310-mnc270-uz/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc270-uz-rUZ/strings.xml
rename to core/res/res/values-mcc310-mnc270-uz/strings.xml
diff --git a/core/res/res/values-mcc310-mnc310-az-rAZ/strings.xml b/core/res/res/values-mcc310-mnc310-az/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc310-az-rAZ/strings.xml
rename to core/res/res/values-mcc310-mnc310-az/strings.xml
diff --git a/core/res/res/values-mcc310-mnc310-be-rBY/strings.xml b/core/res/res/values-mcc310-mnc310-be/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc310-be-rBY/strings.xml
rename to core/res/res/values-mcc310-mnc310-be/strings.xml
diff --git a/core/res/res/values-mcc310-mnc310-bn-rBD/strings.xml b/core/res/res/values-mcc310-mnc310-bn/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc310-bn-rBD/strings.xml
rename to core/res/res/values-mcc310-mnc310-bn/strings.xml
diff --git a/core/res/res/values-mcc310-mnc310-bs-rBA/strings.xml b/core/res/res/values-mcc310-mnc310-bs/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc310-bs-rBA/strings.xml
rename to core/res/res/values-mcc310-mnc310-bs/strings.xml
diff --git a/core/res/res/values-mcc310-mnc310-et-rEE/strings.xml b/core/res/res/values-mcc310-mnc310-et/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc310-et-rEE/strings.xml
rename to core/res/res/values-mcc310-mnc310-et/strings.xml
diff --git a/core/res/res/values-mcc310-mnc310-eu-rES/strings.xml b/core/res/res/values-mcc310-mnc310-eu/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc310-eu-rES/strings.xml
rename to core/res/res/values-mcc310-mnc310-eu/strings.xml
diff --git a/core/res/res/values-mcc310-mnc310-gl-rES/strings.xml b/core/res/res/values-mcc310-mnc310-gl/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc310-gl-rES/strings.xml
rename to core/res/res/values-mcc310-mnc310-gl/strings.xml
diff --git a/core/res/res/values-mcc310-mnc310-gu-rIN/strings.xml b/core/res/res/values-mcc310-mnc310-gu/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc310-gu-rIN/strings.xml
rename to core/res/res/values-mcc310-mnc310-gu/strings.xml
diff --git a/core/res/res/values-mcc310-mnc310-hy-rAM/strings.xml b/core/res/res/values-mcc310-mnc310-hy/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc310-hy-rAM/strings.xml
rename to core/res/res/values-mcc310-mnc310-hy/strings.xml
diff --git a/core/res/res/values-mcc310-mnc310-is-rIS/strings.xml b/core/res/res/values-mcc310-mnc310-is/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc310-is-rIS/strings.xml
rename to core/res/res/values-mcc310-mnc310-is/strings.xml
diff --git a/core/res/res/values-mcc310-mnc310-ka-rGE/strings.xml b/core/res/res/values-mcc310-mnc310-ka/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc310-ka-rGE/strings.xml
rename to core/res/res/values-mcc310-mnc310-ka/strings.xml
diff --git a/core/res/res/values-mcc310-mnc310-kk-rKZ/strings.xml b/core/res/res/values-mcc310-mnc310-kk/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc310-kk-rKZ/strings.xml
rename to core/res/res/values-mcc310-mnc310-kk/strings.xml
diff --git a/core/res/res/values-mcc310-mnc310-km-rKH/strings.xml b/core/res/res/values-mcc310-mnc310-km/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc310-km-rKH/strings.xml
rename to core/res/res/values-mcc310-mnc310-km/strings.xml
diff --git a/core/res/res/values-mcc310-mnc310-kn-rIN/strings.xml b/core/res/res/values-mcc310-mnc310-kn/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc310-kn-rIN/strings.xml
rename to core/res/res/values-mcc310-mnc310-kn/strings.xml
diff --git a/core/res/res/values-mcc310-mnc310-ky-rKG/strings.xml b/core/res/res/values-mcc310-mnc310-ky/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc310-ky-rKG/strings.xml
rename to core/res/res/values-mcc310-mnc310-ky/strings.xml
diff --git a/core/res/res/values-mcc310-mnc310-lo-rLA/strings.xml b/core/res/res/values-mcc310-mnc310-lo/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc310-lo-rLA/strings.xml
rename to core/res/res/values-mcc310-mnc310-lo/strings.xml
diff --git a/core/res/res/values-mcc310-mnc310-mk-rMK/strings.xml b/core/res/res/values-mcc310-mnc310-mk/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc310-mk-rMK/strings.xml
rename to core/res/res/values-mcc310-mnc310-mk/strings.xml
diff --git a/core/res/res/values-mcc310-mnc310-ml-rIN/strings.xml b/core/res/res/values-mcc310-mnc310-ml/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc310-ml-rIN/strings.xml
rename to core/res/res/values-mcc310-mnc310-ml/strings.xml
diff --git a/core/res/res/values-mcc310-mnc310-mn-rMN/strings.xml b/core/res/res/values-mcc310-mnc310-mn/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc310-mn-rMN/strings.xml
rename to core/res/res/values-mcc310-mnc310-mn/strings.xml
diff --git a/core/res/res/values-mcc310-mnc310-mr-rIN/strings.xml b/core/res/res/values-mcc310-mnc310-mr/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc310-mr-rIN/strings.xml
rename to core/res/res/values-mcc310-mnc310-mr/strings.xml
diff --git a/core/res/res/values-mcc310-mnc310-ms-rMY/strings.xml b/core/res/res/values-mcc310-mnc310-ms/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc310-ms-rMY/strings.xml
rename to core/res/res/values-mcc310-mnc310-ms/strings.xml
diff --git a/core/res/res/values-mcc310-mnc310-my-rMM/strings.xml b/core/res/res/values-mcc310-mnc310-my/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc310-my-rMM/strings.xml
rename to core/res/res/values-mcc310-mnc310-my/strings.xml
diff --git a/core/res/res/values-mcc310-mnc310-ne-rNP/strings.xml b/core/res/res/values-mcc310-mnc310-ne/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc310-ne-rNP/strings.xml
rename to core/res/res/values-mcc310-mnc310-ne/strings.xml
diff --git a/core/res/res/values-mcc310-mnc310-pa-rIN/strings.xml b/core/res/res/values-mcc310-mnc310-pa/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc310-pa-rIN/strings.xml
rename to core/res/res/values-mcc310-mnc310-pa/strings.xml
diff --git a/core/res/res/values-mcc310-mnc310-si-rLK/strings.xml b/core/res/res/values-mcc310-mnc310-si/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc310-si-rLK/strings.xml
rename to core/res/res/values-mcc310-mnc310-si/strings.xml
diff --git a/core/res/res/values-mcc310-mnc310-sq-rAL/strings.xml b/core/res/res/values-mcc310-mnc310-sq/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc310-sq-rAL/strings.xml
rename to core/res/res/values-mcc310-mnc310-sq/strings.xml
diff --git a/core/res/res/values-mcc310-mnc310-ta-rIN/strings.xml b/core/res/res/values-mcc310-mnc310-ta/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc310-ta-rIN/strings.xml
rename to core/res/res/values-mcc310-mnc310-ta/strings.xml
diff --git a/core/res/res/values-mcc310-mnc310-te-rIN/strings.xml b/core/res/res/values-mcc310-mnc310-te/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc310-te-rIN/strings.xml
rename to core/res/res/values-mcc310-mnc310-te/strings.xml
diff --git a/core/res/res/values-mcc310-mnc310-ur-rPK/strings.xml b/core/res/res/values-mcc310-mnc310-ur/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc310-ur-rPK/strings.xml
rename to core/res/res/values-mcc310-mnc310-ur/strings.xml
diff --git a/core/res/res/values-mcc310-mnc310-uz-rUZ/strings.xml b/core/res/res/values-mcc310-mnc310-uz/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc310-uz-rUZ/strings.xml
rename to core/res/res/values-mcc310-mnc310-uz/strings.xml
diff --git a/core/res/res/values-mcc310-mnc490-az-rAZ/strings.xml b/core/res/res/values-mcc310-mnc490-az/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc490-az-rAZ/strings.xml
rename to core/res/res/values-mcc310-mnc490-az/strings.xml
diff --git a/core/res/res/values-mcc310-mnc490-be-rBY/strings.xml b/core/res/res/values-mcc310-mnc490-be/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc490-be-rBY/strings.xml
rename to core/res/res/values-mcc310-mnc490-be/strings.xml
diff --git a/core/res/res/values-mcc310-mnc490-bn-rBD/strings.xml b/core/res/res/values-mcc310-mnc490-bn/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc490-bn-rBD/strings.xml
rename to core/res/res/values-mcc310-mnc490-bn/strings.xml
diff --git a/core/res/res/values-mcc310-mnc490-bs-rBA/strings.xml b/core/res/res/values-mcc310-mnc490-bs/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc490-bs-rBA/strings.xml
rename to core/res/res/values-mcc310-mnc490-bs/strings.xml
diff --git a/core/res/res/values-mcc310-mnc490-et-rEE/strings.xml b/core/res/res/values-mcc310-mnc490-et/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc490-et-rEE/strings.xml
rename to core/res/res/values-mcc310-mnc490-et/strings.xml
diff --git a/core/res/res/values-mcc310-mnc490-eu-rES/strings.xml b/core/res/res/values-mcc310-mnc490-eu/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc490-eu-rES/strings.xml
rename to core/res/res/values-mcc310-mnc490-eu/strings.xml
diff --git a/core/res/res/values-mcc310-mnc490-gl-rES/strings.xml b/core/res/res/values-mcc310-mnc490-gl/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc490-gl-rES/strings.xml
rename to core/res/res/values-mcc310-mnc490-gl/strings.xml
diff --git a/core/res/res/values-mcc310-mnc490-gu-rIN/strings.xml b/core/res/res/values-mcc310-mnc490-gu/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc490-gu-rIN/strings.xml
rename to core/res/res/values-mcc310-mnc490-gu/strings.xml
diff --git a/core/res/res/values-mcc310-mnc490-hy-rAM/strings.xml b/core/res/res/values-mcc310-mnc490-hy/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc490-hy-rAM/strings.xml
rename to core/res/res/values-mcc310-mnc490-hy/strings.xml
diff --git a/core/res/res/values-mcc310-mnc490-is-rIS/strings.xml b/core/res/res/values-mcc310-mnc490-is/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc490-is-rIS/strings.xml
rename to core/res/res/values-mcc310-mnc490-is/strings.xml
diff --git a/core/res/res/values-mcc310-mnc490-ka-rGE/strings.xml b/core/res/res/values-mcc310-mnc490-ka/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc490-ka-rGE/strings.xml
rename to core/res/res/values-mcc310-mnc490-ka/strings.xml
diff --git a/core/res/res/values-mcc310-mnc490-kk-rKZ/strings.xml b/core/res/res/values-mcc310-mnc490-kk/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc490-kk-rKZ/strings.xml
rename to core/res/res/values-mcc310-mnc490-kk/strings.xml
diff --git a/core/res/res/values-mcc310-mnc490-km-rKH/strings.xml b/core/res/res/values-mcc310-mnc490-km/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc490-km-rKH/strings.xml
rename to core/res/res/values-mcc310-mnc490-km/strings.xml
diff --git a/core/res/res/values-mcc310-mnc490-kn-rIN/strings.xml b/core/res/res/values-mcc310-mnc490-kn/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc490-kn-rIN/strings.xml
rename to core/res/res/values-mcc310-mnc490-kn/strings.xml
diff --git a/core/res/res/values-mcc310-mnc490-ky-rKG/strings.xml b/core/res/res/values-mcc310-mnc490-ky/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc490-ky-rKG/strings.xml
rename to core/res/res/values-mcc310-mnc490-ky/strings.xml
diff --git a/core/res/res/values-mcc310-mnc490-lo-rLA/strings.xml b/core/res/res/values-mcc310-mnc490-lo/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc490-lo-rLA/strings.xml
rename to core/res/res/values-mcc310-mnc490-lo/strings.xml
diff --git a/core/res/res/values-mcc310-mnc490-mk-rMK/strings.xml b/core/res/res/values-mcc310-mnc490-mk/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc490-mk-rMK/strings.xml
rename to core/res/res/values-mcc310-mnc490-mk/strings.xml
diff --git a/core/res/res/values-mcc310-mnc490-ml-rIN/strings.xml b/core/res/res/values-mcc310-mnc490-ml/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc490-ml-rIN/strings.xml
rename to core/res/res/values-mcc310-mnc490-ml/strings.xml
diff --git a/core/res/res/values-mcc310-mnc490-mn-rMN/strings.xml b/core/res/res/values-mcc310-mnc490-mn/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc490-mn-rMN/strings.xml
rename to core/res/res/values-mcc310-mnc490-mn/strings.xml
diff --git a/core/res/res/values-mcc310-mnc490-mr-rIN/strings.xml b/core/res/res/values-mcc310-mnc490-mr/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc490-mr-rIN/strings.xml
rename to core/res/res/values-mcc310-mnc490-mr/strings.xml
diff --git a/core/res/res/values-mcc310-mnc490-ms-rMY/strings.xml b/core/res/res/values-mcc310-mnc490-ms/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc490-ms-rMY/strings.xml
rename to core/res/res/values-mcc310-mnc490-ms/strings.xml
diff --git a/core/res/res/values-mcc310-mnc490-my-rMM/strings.xml b/core/res/res/values-mcc310-mnc490-my/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc490-my-rMM/strings.xml
rename to core/res/res/values-mcc310-mnc490-my/strings.xml
diff --git a/core/res/res/values-mcc310-mnc490-ne-rNP/strings.xml b/core/res/res/values-mcc310-mnc490-ne/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc490-ne-rNP/strings.xml
rename to core/res/res/values-mcc310-mnc490-ne/strings.xml
diff --git a/core/res/res/values-mcc310-mnc490-pa-rIN/strings.xml b/core/res/res/values-mcc310-mnc490-pa/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc490-pa-rIN/strings.xml
rename to core/res/res/values-mcc310-mnc490-pa/strings.xml
diff --git a/core/res/res/values-mcc310-mnc490-si-rLK/strings.xml b/core/res/res/values-mcc310-mnc490-si/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc490-si-rLK/strings.xml
rename to core/res/res/values-mcc310-mnc490-si/strings.xml
diff --git a/core/res/res/values-mcc310-mnc490-sq-rAL/strings.xml b/core/res/res/values-mcc310-mnc490-sq/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc490-sq-rAL/strings.xml
rename to core/res/res/values-mcc310-mnc490-sq/strings.xml
diff --git a/core/res/res/values-mcc310-mnc490-ta-rIN/strings.xml b/core/res/res/values-mcc310-mnc490-ta/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc490-ta-rIN/strings.xml
rename to core/res/res/values-mcc310-mnc490-ta/strings.xml
diff --git a/core/res/res/values-mcc310-mnc490-te-rIN/strings.xml b/core/res/res/values-mcc310-mnc490-te/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc490-te-rIN/strings.xml
rename to core/res/res/values-mcc310-mnc490-te/strings.xml
diff --git a/core/res/res/values-mcc310-mnc490-ur-rPK/strings.xml b/core/res/res/values-mcc310-mnc490-ur/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc490-ur-rPK/strings.xml
rename to core/res/res/values-mcc310-mnc490-ur/strings.xml
diff --git a/core/res/res/values-mcc310-mnc490-uz-rUZ/strings.xml b/core/res/res/values-mcc310-mnc490-uz/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc490-uz-rUZ/strings.xml
rename to core/res/res/values-mcc310-mnc490-uz/strings.xml
diff --git a/core/res/res/values-mcc310-mnc660-az-rAZ/strings.xml b/core/res/res/values-mcc310-mnc660-az/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc660-az-rAZ/strings.xml
rename to core/res/res/values-mcc310-mnc660-az/strings.xml
diff --git a/core/res/res/values-mcc310-mnc660-be-rBY/strings.xml b/core/res/res/values-mcc310-mnc660-be/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc660-be-rBY/strings.xml
rename to core/res/res/values-mcc310-mnc660-be/strings.xml
diff --git a/core/res/res/values-mcc310-mnc660-bn-rBD/strings.xml b/core/res/res/values-mcc310-mnc660-bn/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc660-bn-rBD/strings.xml
rename to core/res/res/values-mcc310-mnc660-bn/strings.xml
diff --git a/core/res/res/values-mcc310-mnc660-bs-rBA/strings.xml b/core/res/res/values-mcc310-mnc660-bs/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc660-bs-rBA/strings.xml
rename to core/res/res/values-mcc310-mnc660-bs/strings.xml
diff --git a/core/res/res/values-mcc310-mnc660-et-rEE/strings.xml b/core/res/res/values-mcc310-mnc660-et/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc660-et-rEE/strings.xml
rename to core/res/res/values-mcc310-mnc660-et/strings.xml
diff --git a/core/res/res/values-mcc310-mnc660-eu-rES/strings.xml b/core/res/res/values-mcc310-mnc660-eu/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc660-eu-rES/strings.xml
rename to core/res/res/values-mcc310-mnc660-eu/strings.xml
diff --git a/core/res/res/values-mcc310-mnc660-gl-rES/strings.xml b/core/res/res/values-mcc310-mnc660-gl/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc660-gl-rES/strings.xml
rename to core/res/res/values-mcc310-mnc660-gl/strings.xml
diff --git a/core/res/res/values-mcc310-mnc660-gu-rIN/strings.xml b/core/res/res/values-mcc310-mnc660-gu/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc660-gu-rIN/strings.xml
rename to core/res/res/values-mcc310-mnc660-gu/strings.xml
diff --git a/core/res/res/values-mcc310-mnc660-hy-rAM/strings.xml b/core/res/res/values-mcc310-mnc660-hy/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc660-hy-rAM/strings.xml
rename to core/res/res/values-mcc310-mnc660-hy/strings.xml
diff --git a/core/res/res/values-mcc310-mnc660-is-rIS/strings.xml b/core/res/res/values-mcc310-mnc660-is/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc660-is-rIS/strings.xml
rename to core/res/res/values-mcc310-mnc660-is/strings.xml
diff --git a/core/res/res/values-mcc310-mnc660-ka-rGE/strings.xml b/core/res/res/values-mcc310-mnc660-ka/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc660-ka-rGE/strings.xml
rename to core/res/res/values-mcc310-mnc660-ka/strings.xml
diff --git a/core/res/res/values-mcc310-mnc660-kk-rKZ/strings.xml b/core/res/res/values-mcc310-mnc660-kk/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc660-kk-rKZ/strings.xml
rename to core/res/res/values-mcc310-mnc660-kk/strings.xml
diff --git a/core/res/res/values-mcc310-mnc660-km-rKH/strings.xml b/core/res/res/values-mcc310-mnc660-km/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc660-km-rKH/strings.xml
rename to core/res/res/values-mcc310-mnc660-km/strings.xml
diff --git a/core/res/res/values-mcc310-mnc660-kn-rIN/strings.xml b/core/res/res/values-mcc310-mnc660-kn/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc660-kn-rIN/strings.xml
rename to core/res/res/values-mcc310-mnc660-kn/strings.xml
diff --git a/core/res/res/values-mcc310-mnc660-ky-rKG/strings.xml b/core/res/res/values-mcc310-mnc660-ky/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc660-ky-rKG/strings.xml
rename to core/res/res/values-mcc310-mnc660-ky/strings.xml
diff --git a/core/res/res/values-mcc310-mnc660-lo-rLA/strings.xml b/core/res/res/values-mcc310-mnc660-lo/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc660-lo-rLA/strings.xml
rename to core/res/res/values-mcc310-mnc660-lo/strings.xml
diff --git a/core/res/res/values-mcc310-mnc660-mk-rMK/strings.xml b/core/res/res/values-mcc310-mnc660-mk/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc660-mk-rMK/strings.xml
rename to core/res/res/values-mcc310-mnc660-mk/strings.xml
diff --git a/core/res/res/values-mcc310-mnc660-ml-rIN/strings.xml b/core/res/res/values-mcc310-mnc660-ml/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc660-ml-rIN/strings.xml
rename to core/res/res/values-mcc310-mnc660-ml/strings.xml
diff --git a/core/res/res/values-mcc310-mnc660-mn-rMN/strings.xml b/core/res/res/values-mcc310-mnc660-mn/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc660-mn-rMN/strings.xml
rename to core/res/res/values-mcc310-mnc660-mn/strings.xml
diff --git a/core/res/res/values-mcc310-mnc660-mr-rIN/strings.xml b/core/res/res/values-mcc310-mnc660-mr/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc660-mr-rIN/strings.xml
rename to core/res/res/values-mcc310-mnc660-mr/strings.xml
diff --git a/core/res/res/values-mcc310-mnc660-ms-rMY/strings.xml b/core/res/res/values-mcc310-mnc660-ms/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc660-ms-rMY/strings.xml
rename to core/res/res/values-mcc310-mnc660-ms/strings.xml
diff --git a/core/res/res/values-mcc310-mnc660-my-rMM/strings.xml b/core/res/res/values-mcc310-mnc660-my/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc660-my-rMM/strings.xml
rename to core/res/res/values-mcc310-mnc660-my/strings.xml
diff --git a/core/res/res/values-mcc310-mnc660-ne-rNP/strings.xml b/core/res/res/values-mcc310-mnc660-ne/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc660-ne-rNP/strings.xml
rename to core/res/res/values-mcc310-mnc660-ne/strings.xml
diff --git a/core/res/res/values-mcc310-mnc660-pa-rIN/strings.xml b/core/res/res/values-mcc310-mnc660-pa/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc660-pa-rIN/strings.xml
rename to core/res/res/values-mcc310-mnc660-pa/strings.xml
diff --git a/core/res/res/values-mcc310-mnc660-si-rLK/strings.xml b/core/res/res/values-mcc310-mnc660-si/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc660-si-rLK/strings.xml
rename to core/res/res/values-mcc310-mnc660-si/strings.xml
diff --git a/core/res/res/values-mcc310-mnc660-sq-rAL/strings.xml b/core/res/res/values-mcc310-mnc660-sq/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc660-sq-rAL/strings.xml
rename to core/res/res/values-mcc310-mnc660-sq/strings.xml
diff --git a/core/res/res/values-mcc310-mnc660-ta-rIN/strings.xml b/core/res/res/values-mcc310-mnc660-ta/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc660-ta-rIN/strings.xml
rename to core/res/res/values-mcc310-mnc660-ta/strings.xml
diff --git a/core/res/res/values-mcc310-mnc660-te-rIN/strings.xml b/core/res/res/values-mcc310-mnc660-te/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc660-te-rIN/strings.xml
rename to core/res/res/values-mcc310-mnc660-te/strings.xml
diff --git a/core/res/res/values-mcc310-mnc660-ur-rPK/strings.xml b/core/res/res/values-mcc310-mnc660-ur/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc660-ur-rPK/strings.xml
rename to core/res/res/values-mcc310-mnc660-ur/strings.xml
diff --git a/core/res/res/values-mcc310-mnc660-uz-rUZ/strings.xml b/core/res/res/values-mcc310-mnc660-uz/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc660-uz-rUZ/strings.xml
rename to core/res/res/values-mcc310-mnc660-uz/strings.xml
diff --git a/core/res/res/values-mcc310-mnc800-az-rAZ/strings.xml b/core/res/res/values-mcc310-mnc800-az/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc800-az-rAZ/strings.xml
rename to core/res/res/values-mcc310-mnc800-az/strings.xml
diff --git a/core/res/res/values-mcc310-mnc800-be-rBY/strings.xml b/core/res/res/values-mcc310-mnc800-be/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc800-be-rBY/strings.xml
rename to core/res/res/values-mcc310-mnc800-be/strings.xml
diff --git a/core/res/res/values-mcc310-mnc800-bn-rBD/strings.xml b/core/res/res/values-mcc310-mnc800-bn/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc800-bn-rBD/strings.xml
rename to core/res/res/values-mcc310-mnc800-bn/strings.xml
diff --git a/core/res/res/values-mcc310-mnc800-bs-rBA/strings.xml b/core/res/res/values-mcc310-mnc800-bs/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc800-bs-rBA/strings.xml
rename to core/res/res/values-mcc310-mnc800-bs/strings.xml
diff --git a/core/res/res/values-mcc310-mnc800-et-rEE/strings.xml b/core/res/res/values-mcc310-mnc800-et/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc800-et-rEE/strings.xml
rename to core/res/res/values-mcc310-mnc800-et/strings.xml
diff --git a/core/res/res/values-mcc310-mnc800-eu-rES/strings.xml b/core/res/res/values-mcc310-mnc800-eu/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc800-eu-rES/strings.xml
rename to core/res/res/values-mcc310-mnc800-eu/strings.xml
diff --git a/core/res/res/values-mcc310-mnc800-gl-rES/strings.xml b/core/res/res/values-mcc310-mnc800-gl/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc800-gl-rES/strings.xml
rename to core/res/res/values-mcc310-mnc800-gl/strings.xml
diff --git a/core/res/res/values-mcc310-mnc800-gu-rIN/strings.xml b/core/res/res/values-mcc310-mnc800-gu/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc800-gu-rIN/strings.xml
rename to core/res/res/values-mcc310-mnc800-gu/strings.xml
diff --git a/core/res/res/values-mcc310-mnc800-hy-rAM/strings.xml b/core/res/res/values-mcc310-mnc800-hy/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc800-hy-rAM/strings.xml
rename to core/res/res/values-mcc310-mnc800-hy/strings.xml
diff --git a/core/res/res/values-mcc310-mnc800-is-rIS/strings.xml b/core/res/res/values-mcc310-mnc800-is/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc800-is-rIS/strings.xml
rename to core/res/res/values-mcc310-mnc800-is/strings.xml
diff --git a/core/res/res/values-mcc310-mnc800-ka-rGE/strings.xml b/core/res/res/values-mcc310-mnc800-ka/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc800-ka-rGE/strings.xml
rename to core/res/res/values-mcc310-mnc800-ka/strings.xml
diff --git a/core/res/res/values-mcc310-mnc800-kk-rKZ/strings.xml b/core/res/res/values-mcc310-mnc800-kk/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc800-kk-rKZ/strings.xml
rename to core/res/res/values-mcc310-mnc800-kk/strings.xml
diff --git a/core/res/res/values-mcc310-mnc800-km-rKH/strings.xml b/core/res/res/values-mcc310-mnc800-km/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc800-km-rKH/strings.xml
rename to core/res/res/values-mcc310-mnc800-km/strings.xml
diff --git a/core/res/res/values-mcc310-mnc800-kn-rIN/strings.xml b/core/res/res/values-mcc310-mnc800-kn/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc800-kn-rIN/strings.xml
rename to core/res/res/values-mcc310-mnc800-kn/strings.xml
diff --git a/core/res/res/values-mcc310-mnc800-ky-rKG/strings.xml b/core/res/res/values-mcc310-mnc800-ky/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc800-ky-rKG/strings.xml
rename to core/res/res/values-mcc310-mnc800-ky/strings.xml
diff --git a/core/res/res/values-mcc310-mnc800-lo-rLA/strings.xml b/core/res/res/values-mcc310-mnc800-lo/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc800-lo-rLA/strings.xml
rename to core/res/res/values-mcc310-mnc800-lo/strings.xml
diff --git a/core/res/res/values-mcc310-mnc800-mk-rMK/strings.xml b/core/res/res/values-mcc310-mnc800-mk/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc800-mk-rMK/strings.xml
rename to core/res/res/values-mcc310-mnc800-mk/strings.xml
diff --git a/core/res/res/values-mcc310-mnc800-ml-rIN/strings.xml b/core/res/res/values-mcc310-mnc800-ml/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc800-ml-rIN/strings.xml
rename to core/res/res/values-mcc310-mnc800-ml/strings.xml
diff --git a/core/res/res/values-mcc310-mnc800-mn-rMN/strings.xml b/core/res/res/values-mcc310-mnc800-mn/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc800-mn-rMN/strings.xml
rename to core/res/res/values-mcc310-mnc800-mn/strings.xml
diff --git a/core/res/res/values-mcc310-mnc800-mr-rIN/strings.xml b/core/res/res/values-mcc310-mnc800-mr/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc800-mr-rIN/strings.xml
rename to core/res/res/values-mcc310-mnc800-mr/strings.xml
diff --git a/core/res/res/values-mcc310-mnc800-ms-rMY/strings.xml b/core/res/res/values-mcc310-mnc800-ms/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc800-ms-rMY/strings.xml
rename to core/res/res/values-mcc310-mnc800-ms/strings.xml
diff --git a/core/res/res/values-mcc310-mnc800-my-rMM/strings.xml b/core/res/res/values-mcc310-mnc800-my/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc800-my-rMM/strings.xml
rename to core/res/res/values-mcc310-mnc800-my/strings.xml
diff --git a/core/res/res/values-mcc310-mnc800-ne-rNP/strings.xml b/core/res/res/values-mcc310-mnc800-ne/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc800-ne-rNP/strings.xml
rename to core/res/res/values-mcc310-mnc800-ne/strings.xml
diff --git a/core/res/res/values-mcc310-mnc800-pa-rIN/strings.xml b/core/res/res/values-mcc310-mnc800-pa/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc800-pa-rIN/strings.xml
rename to core/res/res/values-mcc310-mnc800-pa/strings.xml
diff --git a/core/res/res/values-mcc310-mnc800-si-rLK/strings.xml b/core/res/res/values-mcc310-mnc800-si/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc800-si-rLK/strings.xml
rename to core/res/res/values-mcc310-mnc800-si/strings.xml
diff --git a/core/res/res/values-mcc310-mnc800-sq-rAL/strings.xml b/core/res/res/values-mcc310-mnc800-sq/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc800-sq-rAL/strings.xml
rename to core/res/res/values-mcc310-mnc800-sq/strings.xml
diff --git a/core/res/res/values-mcc310-mnc800-ta-rIN/strings.xml b/core/res/res/values-mcc310-mnc800-ta/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc800-ta-rIN/strings.xml
rename to core/res/res/values-mcc310-mnc800-ta/strings.xml
diff --git a/core/res/res/values-mcc310-mnc800-te-rIN/strings.xml b/core/res/res/values-mcc310-mnc800-te/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc800-te-rIN/strings.xml
rename to core/res/res/values-mcc310-mnc800-te/strings.xml
diff --git a/core/res/res/values-mcc310-mnc800-ur-rPK/strings.xml b/core/res/res/values-mcc310-mnc800-ur/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc800-ur-rPK/strings.xml
rename to core/res/res/values-mcc310-mnc800-ur/strings.xml
diff --git a/core/res/res/values-mcc310-mnc800-uz-rUZ/strings.xml b/core/res/res/values-mcc310-mnc800-uz/strings.xml
similarity index 100%
rename from core/res/res/values-mcc310-mnc800-uz-rUZ/strings.xml
rename to core/res/res/values-mcc310-mnc800-uz/strings.xml
diff --git a/core/res/res/values-mk-rMK-watch/strings.xml b/core/res/res/values-mk-watch/strings.xml
similarity index 100%
rename from core/res/res/values-mk-rMK-watch/strings.xml
rename to core/res/res/values-mk-watch/strings.xml
diff --git a/core/res/res/values-mk-rMK-watch/styles_material.xml b/core/res/res/values-mk-watch/styles_material.xml
similarity index 100%
rename from core/res/res/values-mk-rMK-watch/styles_material.xml
rename to core/res/res/values-mk-watch/styles_material.xml
diff --git a/core/res/res/values-mk-rMK/strings.xml b/core/res/res/values-mk/strings.xml
similarity index 100%
rename from core/res/res/values-mk-rMK/strings.xml
rename to core/res/res/values-mk/strings.xml
diff --git a/core/res/res/values-ml-rIN-watch/strings.xml b/core/res/res/values-ml-watch/strings.xml
similarity index 100%
rename from core/res/res/values-ml-rIN-watch/strings.xml
rename to core/res/res/values-ml-watch/strings.xml
diff --git a/core/res/res/values-ml-rIN-watch/styles_material.xml b/core/res/res/values-ml-watch/styles_material.xml
similarity index 100%
rename from core/res/res/values-ml-rIN-watch/styles_material.xml
rename to core/res/res/values-ml-watch/styles_material.xml
diff --git a/core/res/res/values-ml-rIN/strings.xml b/core/res/res/values-ml/strings.xml
similarity index 100%
rename from core/res/res/values-ml-rIN/strings.xml
rename to core/res/res/values-ml/strings.xml
diff --git a/core/res/res/values-mn-rMN-watch/strings.xml b/core/res/res/values-mn-watch/strings.xml
similarity index 100%
rename from core/res/res/values-mn-rMN-watch/strings.xml
rename to core/res/res/values-mn-watch/strings.xml
diff --git a/core/res/res/values-mn-rMN-watch/styles_material.xml b/core/res/res/values-mn-watch/styles_material.xml
similarity index 100%
rename from core/res/res/values-mn-rMN-watch/styles_material.xml
rename to core/res/res/values-mn-watch/styles_material.xml
diff --git a/core/res/res/values-mn-rMN/strings.xml b/core/res/res/values-mn/strings.xml
similarity index 100%
rename from core/res/res/values-mn-rMN/strings.xml
rename to core/res/res/values-mn/strings.xml
diff --git a/core/res/res/values-mr-rIN-watch/strings.xml b/core/res/res/values-mr-watch/strings.xml
similarity index 100%
rename from core/res/res/values-mr-rIN-watch/strings.xml
rename to core/res/res/values-mr-watch/strings.xml
diff --git a/core/res/res/values-mr-rIN-watch/styles_material.xml b/core/res/res/values-mr-watch/styles_material.xml
similarity index 100%
rename from core/res/res/values-mr-rIN-watch/styles_material.xml
rename to core/res/res/values-mr-watch/styles_material.xml
diff --git a/core/res/res/values-mr-rIN/strings.xml b/core/res/res/values-mr/strings.xml
similarity index 100%
rename from core/res/res/values-mr-rIN/strings.xml
rename to core/res/res/values-mr/strings.xml
diff --git a/core/res/res/values-ms-rMY-watch/strings.xml b/core/res/res/values-ms-watch/strings.xml
similarity index 100%
rename from core/res/res/values-ms-rMY-watch/strings.xml
rename to core/res/res/values-ms-watch/strings.xml
diff --git a/core/res/res/values-ms-rMY-watch/styles_material.xml b/core/res/res/values-ms-watch/styles_material.xml
similarity index 100%
rename from core/res/res/values-ms-rMY-watch/styles_material.xml
rename to core/res/res/values-ms-watch/styles_material.xml
diff --git a/core/res/res/values-ms-rMY/strings.xml b/core/res/res/values-ms/strings.xml
similarity index 100%
rename from core/res/res/values-ms-rMY/strings.xml
rename to core/res/res/values-ms/strings.xml
diff --git a/core/res/res/values-my-rMM-watch/strings.xml b/core/res/res/values-my-watch/strings.xml
similarity index 100%
rename from core/res/res/values-my-rMM-watch/strings.xml
rename to core/res/res/values-my-watch/strings.xml
diff --git a/core/res/res/values-my-rMM-watch/styles_material.xml b/core/res/res/values-my-watch/styles_material.xml
similarity index 100%
rename from core/res/res/values-my-rMM-watch/styles_material.xml
rename to core/res/res/values-my-watch/styles_material.xml
diff --git a/core/res/res/values-my-rMM/strings.xml b/core/res/res/values-my/strings.xml
similarity index 100%
rename from core/res/res/values-my-rMM/strings.xml
rename to core/res/res/values-my/strings.xml
diff --git a/core/res/res/values-ne-rNP-watch/strings.xml b/core/res/res/values-ne-watch/strings.xml
similarity index 100%
rename from core/res/res/values-ne-rNP-watch/strings.xml
rename to core/res/res/values-ne-watch/strings.xml
diff --git a/core/res/res/values-ne-rNP-watch/styles_material.xml b/core/res/res/values-ne-watch/styles_material.xml
similarity index 100%
rename from core/res/res/values-ne-rNP-watch/styles_material.xml
rename to core/res/res/values-ne-watch/styles_material.xml
diff --git a/core/res/res/values-ne-rNP/strings.xml b/core/res/res/values-ne/strings.xml
similarity index 100%
rename from core/res/res/values-ne-rNP/strings.xml
rename to core/res/res/values-ne/strings.xml
diff --git a/core/res/res/values-pa-rIN-watch/strings.xml b/core/res/res/values-pa-watch/strings.xml
similarity index 100%
rename from core/res/res/values-pa-rIN-watch/strings.xml
rename to core/res/res/values-pa-watch/strings.xml
diff --git a/core/res/res/values-pa-rIN-watch/styles_material.xml b/core/res/res/values-pa-watch/styles_material.xml
similarity index 100%
rename from core/res/res/values-pa-rIN-watch/styles_material.xml
rename to core/res/res/values-pa-watch/styles_material.xml
diff --git a/core/res/res/values-pa-rIN/strings.xml b/core/res/res/values-pa/strings.xml
similarity index 100%
rename from core/res/res/values-pa-rIN/strings.xml
rename to core/res/res/values-pa/strings.xml
diff --git a/core/res/res/values-si-rLK-watch/strings.xml b/core/res/res/values-si-watch/strings.xml
similarity index 100%
rename from core/res/res/values-si-rLK-watch/strings.xml
rename to core/res/res/values-si-watch/strings.xml
diff --git a/core/res/res/values-si-rLK-watch/styles_material.xml b/core/res/res/values-si-watch/styles_material.xml
similarity index 100%
rename from core/res/res/values-si-rLK-watch/styles_material.xml
rename to core/res/res/values-si-watch/styles_material.xml
diff --git a/core/res/res/values-si-rLK/strings.xml b/core/res/res/values-si/strings.xml
similarity index 100%
rename from core/res/res/values-si-rLK/strings.xml
rename to core/res/res/values-si/strings.xml
diff --git a/core/res/res/values-sq-rAL-watch/strings.xml b/core/res/res/values-sq-watch/strings.xml
similarity index 100%
rename from core/res/res/values-sq-rAL-watch/strings.xml
rename to core/res/res/values-sq-watch/strings.xml
diff --git a/core/res/res/values-sq-rAL-watch/styles_material.xml b/core/res/res/values-sq-watch/styles_material.xml
similarity index 100%
rename from core/res/res/values-sq-rAL-watch/styles_material.xml
rename to core/res/res/values-sq-watch/styles_material.xml
diff --git a/core/res/res/values-sq-rAL/strings.xml b/core/res/res/values-sq/strings.xml
similarity index 100%
rename from core/res/res/values-sq-rAL/strings.xml
rename to core/res/res/values-sq/strings.xml
diff --git a/core/res/res/values-ta-rIN-watch/strings.xml b/core/res/res/values-ta-watch/strings.xml
similarity index 100%
rename from core/res/res/values-ta-rIN-watch/strings.xml
rename to core/res/res/values-ta-watch/strings.xml
diff --git a/core/res/res/values-ta-rIN-watch/styles_material.xml b/core/res/res/values-ta-watch/styles_material.xml
similarity index 100%
rename from core/res/res/values-ta-rIN-watch/styles_material.xml
rename to core/res/res/values-ta-watch/styles_material.xml
diff --git a/core/res/res/values-ta-rIN/strings.xml b/core/res/res/values-ta/strings.xml
similarity index 100%
rename from core/res/res/values-ta-rIN/strings.xml
rename to core/res/res/values-ta/strings.xml
diff --git a/core/res/res/values-te-rIN-watch/strings.xml b/core/res/res/values-te-watch/strings.xml
similarity index 100%
rename from core/res/res/values-te-rIN-watch/strings.xml
rename to core/res/res/values-te-watch/strings.xml
diff --git a/core/res/res/values-te-rIN-watch/styles_material.xml b/core/res/res/values-te-watch/styles_material.xml
similarity index 100%
rename from core/res/res/values-te-rIN-watch/styles_material.xml
rename to core/res/res/values-te-watch/styles_material.xml
diff --git a/core/res/res/values-te-rIN/strings.xml b/core/res/res/values-te/strings.xml
similarity index 100%
rename from core/res/res/values-te-rIN/strings.xml
rename to core/res/res/values-te/strings.xml
diff --git a/core/res/res/values-ur-rPK-watch/strings.xml b/core/res/res/values-ur-watch/strings.xml
similarity index 100%
rename from core/res/res/values-ur-rPK-watch/strings.xml
rename to core/res/res/values-ur-watch/strings.xml
diff --git a/core/res/res/values-ur-rPK-watch/styles_material.xml b/core/res/res/values-ur-watch/styles_material.xml
similarity index 100%
rename from core/res/res/values-ur-rPK-watch/styles_material.xml
rename to core/res/res/values-ur-watch/styles_material.xml
diff --git a/core/res/res/values-ur-rPK/strings.xml b/core/res/res/values-ur/strings.xml
similarity index 100%
rename from core/res/res/values-ur-rPK/strings.xml
rename to core/res/res/values-ur/strings.xml
diff --git a/core/res/res/values-uz-rUZ-watch/strings.xml b/core/res/res/values-uz-watch/strings.xml
similarity index 100%
rename from core/res/res/values-uz-rUZ-watch/strings.xml
rename to core/res/res/values-uz-watch/strings.xml
diff --git a/core/res/res/values-uz-rUZ-watch/styles_material.xml b/core/res/res/values-uz-watch/styles_material.xml
similarity index 100%
rename from core/res/res/values-uz-rUZ-watch/styles_material.xml
rename to core/res/res/values-uz-watch/styles_material.xml
diff --git a/core/res/res/values-uz-rUZ/strings.xml b/core/res/res/values-uz/strings.xml
similarity index 100%
rename from core/res/res/values-uz-rUZ/strings.xml
rename to core/res/res/values-uz/strings.xml
diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml
index 37b3ffc..ae727e6 100644
--- a/core/res/res/values/attrs.xml
+++ b/core/res/res/values/attrs.xml
@@ -2912,6 +2912,11 @@
will result when the reference is accessed.-->
<attr name="nextSectionForward" format="reference"/>
+ <!-- Whether this view is a default-focus view.
+ Only one view per keyboard navigation cluster can have this attribute set to true.
+ See {@link android.view.View#setFocusedByDefault(boolean)}. -->
+ <attr name="focusedByDefault" format="boolean" />
+
</declare-styleable>
<!-- Attributes that can be assigned to a tag for a particular View. -->
@@ -3373,6 +3378,8 @@
<flag name="flagRequestFilterKeyEvents" value="0x00000020" />
<!-- Has flag {@link android.accessibilityservice.AccessibilityServiceInfo#FLAG_RETRIEVE_INTERACTIVE_WINDOWS} -->
<flag name="flagRetrieveInteractiveWindows" value="0x00000040" />
+ <!-- Has flag {@link android.accessibilityservice.AccessibilityServiceInfo#FLAG_ENABLE_ACCESSIBILITY_VOLUME} -->
+ <flag name="flagEnableAccessibilityVolume" value="0x00000080" />
</attr>
<!-- Component name of an activity that allows the user to modify
the settings for this service. This setting cannot be changed at runtime. -->
diff --git a/core/res/res/values/ids.xml b/core/res/res/values/ids.xml
index 5c165e6..5547706 100644
--- a/core/res/res/values/ids.xml
+++ b/core/res/res/values/ids.xml
@@ -129,4 +129,6 @@
<item type="id" name="remote_input_tag" />
<item type="id" name="cross_task_transition" />
+
+ <item type="id" name="accessibilityActionClickOnClickableSpan" />
</resources>
diff --git a/core/res/res/values/public.xml b/core/res/res/values/public.xml
index 60e441d..ef61cc6 100644
--- a/core/res/res/values/public.xml
+++ b/core/res/res/values/public.xml
@@ -2781,6 +2781,7 @@
<public name="nextClusterForward" />
<public name="nextSectionForward" />
<public name="textColorError" />
+ <public name="focusedByDefault" />
</public-group>
<public-group type="style" first-id="0x010302e0">
diff --git a/core/res/res/values/styles.xml b/core/res/res/values/styles.xml
index ce7ab16..842b575 100644
--- a/core/res/res/values/styles.xml
+++ b/core/res/res/values/styles.xml
@@ -1249,7 +1249,7 @@
<item name="collapseContentDescription">@string/toolbar_collapse_description</item>
<item name="contentInsetStart">16dp</item>
<item name="contentInsetStartWithNavigation">@dimen/action_bar_content_inset_with_nav</item>
- <item name="touchscreenBlocksFocus">true</item>
+ <item name="keyboardNavigationCluster">true</item>
</style>
<style name="Widget.Toolbar.Button.Navigation" parent="Widget">
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index 8639004..f44b039 100644
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -213,6 +213,7 @@
<java-symbol type="id" name="selection_start_handle" />
<java-symbol type="id" name="selection_end_handle" />
<java-symbol type="id" name="insertion_handle" />
+ <java-symbol type="id" name="accessibilityActionClickOnClickableSpan" />
<java-symbol type="attr" name="actionModeShareDrawable" />
<java-symbol type="attr" name="alertDialogCenterButtons" />
diff --git a/core/tests/coretests/src/com/android/internal/logging/LogBuilderTest.java b/core/tests/coretests/src/com/android/internal/logging/LogBuilderTest.java
index e7d23a8..e3f754c 100644
--- a/core/tests/coretests/src/com/android/internal/logging/LogBuilderTest.java
+++ b/core/tests/coretests/src/com/android/internal/logging/LogBuilderTest.java
@@ -5,7 +5,7 @@
public class LogBuilderTest extends TestCase {
public void testSerialize() {
- LogBuilder builder = new LogBuilder();
+ LogBuilder builder = new LogBuilder(0);
builder.addTaggedData(1, "one");
builder.addTaggedData(2, "two");
Object[] out = builder.serialize();
@@ -16,7 +16,7 @@
}
public void testInvalidInputThrows() {
- LogBuilder builder = new LogBuilder();
+ LogBuilder builder = new LogBuilder(0);
boolean threw = false;
try {
builder.addTaggedData(0, new Object());
@@ -28,7 +28,7 @@
}
public void testValidInputTypes() {
- LogBuilder builder = new LogBuilder();
+ LogBuilder builder = new LogBuilder(0);
builder.addTaggedData(1, "onetwothree");
builder.addTaggedData(2, 123);
builder.addTaggedData(3, 123L);
diff --git a/libs/androidfw/BackupData.cpp b/libs/androidfw/BackupData.cpp
index ba4a4ff..76a430e 100644
--- a/libs/androidfw/BackupData.cpp
+++ b/libs/androidfw/BackupData.cpp
@@ -16,14 +16,13 @@
#define LOG_TAG "backup_data"
-#include <androidfw/BackupHelpers.h>
-#include <utils/ByteOrder.h>
-
#include <stdio.h>
#include <string.h>
#include <unistd.h>
-#include <cutils/log.h>
+#include <androidfw/BackupHelpers.h>
+#include <log/log.h>
+#include <utils/ByteOrder.h>
namespace android {
diff --git a/libs/androidfw/BackupHelpers.cpp b/libs/androidfw/BackupHelpers.cpp
index 78e9d91..8bfe2b6 100644
--- a/libs/androidfw/BackupHelpers.cpp
+++ b/libs/androidfw/BackupHelpers.cpp
@@ -18,23 +18,22 @@
#include <androidfw/BackupHelpers.h>
-#include <utils/KeyedVector.h>
-#include <utils/ByteOrder.h>
-#include <utils/String8.h>
-
#include <errno.h>
-#include <sys/types.h>
-#include <sys/uio.h>
-#include <sys/stat.h>
-#include <sys/time.h> // for utimes
+#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <sys/time.h> // for utimes
+#include <sys/uio.h>
#include <unistd.h>
#include <utime.h>
-#include <fcntl.h>
#include <zlib.h>
-#include <cutils/log.h>
+#include <log/log.h>
+#include <utils/ByteOrder.h>
+#include <utils/KeyedVector.h>
+#include <utils/String8.h>
namespace android {
diff --git a/libs/androidfw/include/androidfw/CursorWindow.h b/libs/androidfw/include/androidfw/CursorWindow.h
index 8a2979a..f543565 100644
--- a/libs/androidfw/include/androidfw/CursorWindow.h
+++ b/libs/androidfw/include/androidfw/CursorWindow.h
@@ -17,11 +17,11 @@
#ifndef _ANDROID__DATABASE_WINDOW_H
#define _ANDROID__DATABASE_WINDOW_H
-#include <cutils/log.h>
#include <stddef.h>
#include <stdint.h>
#include <binder/Parcel.h>
+#include <log/log.h>
#include <utils/String8.h>
#if LOG_NDEBUG
diff --git a/libs/hwui/Android.mk b/libs/hwui/Android.mk
index 18e59e5..8f7787b 100644
--- a/libs/hwui/Android.mk
+++ b/libs/hwui/Android.mk
@@ -75,6 +75,7 @@
FrameInfo.cpp \
FrameInfoVisualizer.cpp \
GammaFontRenderer.cpp \
+ GlLayer.cpp \
GlopBuilder.cpp \
GpuMemoryTracker.cpp \
GradientCache.cpp \
@@ -115,6 +116,7 @@
Texture.cpp \
TextureCache.cpp \
VectorDrawable.cpp \
+ VkLayer.cpp \
protos/hwui.proto
hwui_test_common_src_files := \
diff --git a/libs/hwui/Animator.cpp b/libs/hwui/Animator.cpp
index 74aa303..b6fbf89 100644
--- a/libs/hwui/Animator.cpp
+++ b/libs/hwui/Animator.cpp
@@ -317,7 +317,7 @@
const RenderPropertyAnimator::PropertyAccessors RenderPropertyAnimator::PROPERTY_ACCESSOR_LUT[] = {
{RenderNode::TRANSLATION_X, &RenderProperties::getTranslationX, &RenderProperties::setTranslationX },
{RenderNode::TRANSLATION_Y, &RenderProperties::getTranslationY, &RenderProperties::setTranslationY },
- {RenderNode::TRANSLATION_X, &RenderProperties::getTranslationZ, &RenderProperties::setTranslationZ },
+ {RenderNode::TRANSLATION_Z, &RenderProperties::getTranslationZ, &RenderProperties::setTranslationZ },
{RenderNode::SCALE_X, &RenderProperties::getScaleX, &RenderProperties::setScaleX },
{RenderNode::SCALE_Y, &RenderProperties::getScaleY, &RenderProperties::setScaleY },
{RenderNode::ROTATION, &RenderProperties::getRotation, &RenderProperties::setRotation },
diff --git a/libs/hwui/Caches.cpp b/libs/hwui/Caches.cpp
index b463e45..a0366de 100644
--- a/libs/hwui/Caches.cpp
+++ b/libs/hwui/Caches.cpp
@@ -17,7 +17,7 @@
#include "Caches.h"
#include "GammaFontRenderer.h"
-#include "Layer.h"
+#include "GlLayer.h"
#include "Properties.h"
#include "renderstate/RenderState.h"
#include "ShadowTessellator.h"
@@ -170,9 +170,11 @@
for (std::set<Layer*>::iterator it = mRenderState->mActiveLayers.begin();
it != mRenderState->mActiveLayers.end(); it++) {
const Layer* layer = *it;
- log.appendFormat(" Layer size %dx%d; texid=%u refs=%d\n",
+ LOG_ALWAYS_FATAL_IF(layer->getApi() != Layer::Api::OpenGL);
+ const GlLayer* glLayer = static_cast<const GlLayer*>(layer);
+ log.appendFormat(" GlLayer size %dx%d; texid=%u refs=%d\n",
layer->getWidth(), layer->getHeight(),
- layer->getTextureId(),
+ glLayer->getTextureId(),
layer->getStrongCount());
memused += layer->getWidth() * layer->getHeight() * 4;
}
diff --git a/libs/hwui/DamageAccumulator.cpp b/libs/hwui/DamageAccumulator.cpp
index 6d5833b..2b4fe17 100644
--- a/libs/hwui/DamageAccumulator.cpp
+++ b/libs/hwui/DamageAccumulator.cpp
@@ -16,7 +16,7 @@
#include "DamageAccumulator.h"
-#include <cutils/log.h>
+#include <log/log.h>
#include "RenderNode.h"
#include "utils/MathUtils.h"
diff --git a/libs/hwui/DeferredLayerUpdater.cpp b/libs/hwui/DeferredLayerUpdater.cpp
index a7d5f60..3e8e8a1 100644
--- a/libs/hwui/DeferredLayerUpdater.cpp
+++ b/libs/hwui/DeferredLayerUpdater.cpp
@@ -15,6 +15,8 @@
*/
#include "DeferredLayerUpdater.h"
+#include "GlLayer.h"
+#include "VkLayer.h"
#include "renderthread/EglManager.h"
#include "renderthread/RenderTask.h"
#include "utils/PaintUtils.h"
@@ -55,13 +57,23 @@
mLayer->setAlpha(mAlpha, mMode);
if (mSurfaceTexture.get()) {
- if (mNeedsGLContextAttach) {
- mNeedsGLContextAttach = false;
- mSurfaceTexture->attachToContext(mLayer->getTextureId());
- }
- if (mUpdateTexImage) {
- mUpdateTexImage = false;
- doUpdateTexImage();
+ if (mLayer->getApi() == Layer::Api::Vulkan) {
+ if (mUpdateTexImage) {
+ mUpdateTexImage = false;
+ doUpdateVkTexImage();
+ }
+ } else {
+ LOG_ALWAYS_FATAL_IF(mLayer->getApi() != Layer::Api::OpenGL,
+ "apply surfaceTexture with non GL backend %x, GL %x, VK %x",
+ mLayer->getApi(), Layer::Api::OpenGL, Layer::Api::Vulkan);
+ if (mNeedsGLContextAttach) {
+ mNeedsGLContextAttach = false;
+ mSurfaceTexture->attachToContext(static_cast<GlLayer*>(mLayer)->getTextureId());
+ }
+ if (mUpdateTexImage) {
+ mUpdateTexImage = false;
+ doUpdateTexImage();
+ }
}
if (mTransform) {
mLayer->getTransform().load(*mTransform);
@@ -71,6 +83,9 @@
}
void DeferredLayerUpdater::doUpdateTexImage() {
+ LOG_ALWAYS_FATAL_IF(mLayer->getApi() != Layer::Api::OpenGL,
+ "doUpdateTexImage non GL backend %x, GL %x, VK %x",
+ mLayer->getApi(), Layer::Api::OpenGL, Layer::Api::Vulkan);
if (mSurfaceTexture->updateTexImage() == NO_ERROR) {
float transform[16];
@@ -110,30 +125,53 @@
}
}
+void DeferredLayerUpdater::doUpdateVkTexImage() {
+ LOG_ALWAYS_FATAL_IF(mLayer->getApi() != Layer::Api::Vulkan,
+ "updateLayer non Vulkan backend %x, GL %x, VK %x",
+ mLayer->getApi(), Layer::Api::OpenGL, Layer::Api::Vulkan);
+
+ static const mat4 identityMatrix;
+ updateLayer(false, identityMatrix.data);
+
+ VkLayer* vkLayer = static_cast<VkLayer*>(mLayer);
+ vkLayer->updateTexture();
+}
+
void DeferredLayerUpdater::updateLayer(bool forceFilter, GLenum renderTarget,
const float* textureTransform) {
+ LOG_ALWAYS_FATAL_IF(mLayer->getApi() != Layer::Api::OpenGL,
+ "updateLayer non GL backend %x, GL %x, VK %x",
+ mLayer->getApi(), Layer::Api::OpenGL, Layer::Api::Vulkan);
+
+ updateLayer(forceFilter, textureTransform);
+
+ GlLayer* glLayer = static_cast<GlLayer*>(mLayer);
+ if (renderTarget != glLayer->getRenderTarget()) {
+ glLayer->setRenderTarget(renderTarget);
+ glLayer->bindTexture();
+ glLayer->setFilter(GL_NEAREST, false, true);
+ glLayer->setWrap(GL_CLAMP_TO_EDGE, false, true);
+ }
+}
+
+void DeferredLayerUpdater::updateLayer(bool forceFilter, const float* textureTransform) {
mLayer->setBlend(mBlend);
mLayer->setForceFilter(forceFilter);
mLayer->setSize(mWidth, mHeight);
mLayer->getTexTransform().load(textureTransform);
-
- if (renderTarget != mLayer->getRenderTarget()) {
- mLayer->setRenderTarget(renderTarget);
- mLayer->bindTexture();
- mLayer->setFilter(GL_NEAREST, false, true);
- mLayer->setWrap(GL_CLAMP_TO_EDGE, false, true);
- }
}
void DeferredLayerUpdater::detachSurfaceTexture() {
if (mSurfaceTexture.get()) {
- status_t err = mSurfaceTexture->detachFromContext();
- if (err != 0) {
- // TODO: Elevate to fatal exception
- ALOGE("Failed to detach SurfaceTexture from context %d", err);
+ if (mLayer->getApi() == Layer::Api::OpenGL) {
+ status_t err = mSurfaceTexture->detachFromContext();
+ if (err != 0) {
+ // TODO: Elevate to fatal exception
+ ALOGE("Failed to detach SurfaceTexture from context %d", err);
+ }
+ static_cast<GlLayer*>(mLayer)->clearTexture();
}
mSurfaceTexture = nullptr;
- mLayer->clearTexture();
}
}
diff --git a/libs/hwui/DeferredLayerUpdater.h b/libs/hwui/DeferredLayerUpdater.h
index 7335008..ead8314 100644
--- a/libs/hwui/DeferredLayerUpdater.h
+++ b/libs/hwui/DeferredLayerUpdater.h
@@ -22,6 +22,9 @@
#include <SkMatrix.h>
#include <utils/StrongPointer.h>
+#include <GLES2/gl2.h>
+#include <GLES2/gl2ext.h>
+
#include "Layer.h"
#include "Rect.h"
#include "renderthread/RenderThread.h"
@@ -110,6 +113,8 @@
Layer* mLayer;
void doUpdateTexImage();
+ void doUpdateVkTexImage();
+ void updateLayer(bool forceFilter, const float* textureTransform);
};
} /* namespace uirenderer */
diff --git a/libs/hwui/DeviceInfo.cpp b/libs/hwui/DeviceInfo.cpp
index 700642e..d180ba5 100644
--- a/libs/hwui/DeviceInfo.cpp
+++ b/libs/hwui/DeviceInfo.cpp
@@ -13,16 +13,18 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
#include <DeviceInfo.h>
#include "Extensions.h"
-#include <GLES2/gl2.h>
-#include <log/log.h>
-
#include <thread>
#include <mutex>
+#include <log/log.h>
+
+#include <GLES2/gl2.h>
+
namespace android {
namespace uirenderer {
diff --git a/libs/hwui/GlLayer.cpp b/libs/hwui/GlLayer.cpp
new file mode 100644
index 0000000..c0ab895
--- /dev/null
+++ b/libs/hwui/GlLayer.cpp
@@ -0,0 +1,76 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "GlLayer.h"
+
+#include "Caches.h"
+#include "RenderNode.h"
+#include "renderstate/RenderState.h"
+#include "utils/TraceUtils.h"
+
+#include <utils/Log.h>
+
+#define ATRACE_LAYER_WORK(label) \
+ ATRACE_FORMAT("%s HW Layer DisplayList %s %ux%u", \
+ label, \
+ (renderNode.get() != NULL) ? renderNode->getName() : "", \
+ getWidth(), getHeight())
+
+namespace android {
+namespace uirenderer {
+
+GlLayer::GlLayer(RenderState& renderState, uint32_t layerWidth, uint32_t layerHeight)
+ : Layer(renderState, Api::OpenGL)
+ , caches(Caches::getInstance())
+ , texture(caches) {
+ texture.mWidth = layerWidth;
+ texture.mHeight = layerHeight;
+}
+
+GlLayer::~GlLayer() {
+ if (texture.mId) {
+ texture.deleteTexture();
+ }
+}
+
+void GlLayer::onGlContextLost() {
+ texture.deleteTexture();
+}
+
+void GlLayer::bindTexture() const {
+ if (texture.mId) {
+ caches.textureState().bindTexture(texture.target(), texture.mId);
+ }
+}
+
+void GlLayer::generateTexture() {
+ if (!texture.mId) {
+ glGenTextures(1, &texture.mId);
+ }
+}
+
+void GlLayer::clearTexture() {
+ // There's a rare possibility that Caches could have been destroyed already
+ // since this method is queued up as a task.
+ // Since this is a reset method, treat this as non-fatal.
+ if (caches.isInitialized()) {
+ caches.textureState().unbindTexture(texture.mId);
+ }
+ texture.mId = 0;
+}
+
+}; // namespace uirenderer
+}; // namespace android
diff --git a/libs/hwui/GlLayer.h b/libs/hwui/GlLayer.h
new file mode 100644
index 0000000..54bf5ad
--- /dev/null
+++ b/libs/hwui/GlLayer.h
@@ -0,0 +1,112 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#pragma once
+
+#include "Layer.h"
+
+#include "Texture.h"
+
+namespace android {
+namespace uirenderer {
+
+// Forward declarations
+class Caches;
+
+/**
+ * A layer has dimensions and is backed by an OpenGL texture or FBO.
+ */
+class GlLayer : public Layer {
+public:
+ GlLayer(RenderState& renderState, uint32_t layerWidth, uint32_t layerHeight);
+ virtual ~GlLayer();
+
+ uint32_t getWidth() const override {
+ return texture.mWidth;
+ }
+
+ uint32_t getHeight() const override {
+ return texture.mHeight;
+ }
+
+ void setSize(uint32_t width, uint32_t height) override {
+ texture.updateSize(width, height, texture.internalFormat(), texture.format(),
+ texture.target());
+ }
+
+ void setBlend(bool blend) override {
+ texture.blend = blend;
+ }
+
+ bool isBlend() const override {
+ return texture.blend;
+ }
+
+ inline GLuint getTextureId() const {
+ return texture.id();
+ }
+
+ inline Texture& getTexture() {
+ return texture;
+ }
+
+ inline GLenum getRenderTarget() const {
+ return texture.target();
+ }
+
+ inline void setRenderTarget(GLenum renderTarget) {
+ texture.mTarget = renderTarget;
+ }
+
+ inline bool isRenderable() const {
+ return texture.target() != GL_NONE;
+ }
+
+ void setWrap(GLenum wrap, bool bindTexture = false, bool force = false) {
+ texture.setWrap(wrap, bindTexture, force);
+ }
+
+ void setFilter(GLenum filter, bool bindTexture = false, bool force = false) {
+ texture.setFilter(filter, bindTexture, force);
+ }
+
+ void bindTexture() const;
+ void generateTexture();
+
+ /**
+ * When the caller frees the texture itself, the caller
+ * must call this method to tell this layer that it lost
+ * the texture.
+ */
+ void clearTexture();
+
+ /**
+ * Lost the GL context but the layer is still around, mark it invalid internally
+ * so the dtor knows not to do any GL work
+ */
+ void onGlContextLost();
+
+private:
+ Caches& caches;
+
+ /**
+ * The texture backing this layer.
+ */
+ Texture texture;
+}; // struct GlLayer
+
+}; // namespace uirenderer
+}; // namespace android
diff --git a/libs/hwui/GlopBuilder.cpp b/libs/hwui/GlopBuilder.cpp
index 34e6d39..8a6e038 100644
--- a/libs/hwui/GlopBuilder.cpp
+++ b/libs/hwui/GlopBuilder.cpp
@@ -16,6 +16,7 @@
#include "GlopBuilder.h"
#include "Caches.h"
+#include "GlLayer.h"
#include "Glop.h"
#include "Layer.h"
#include "Matrix.h"
@@ -440,7 +441,7 @@
return *this;
}
-GlopBuilder& GlopBuilder::setFillTextureLayer(Layer& layer, float alpha) {
+GlopBuilder& GlopBuilder::setFillTextureLayer(GlLayer& layer, float alpha) {
TRIGGER_STAGE(kFillStage);
REQUIRE_STAGES(kMeshStage | kRoundRectClipStage);
diff --git a/libs/hwui/GlopBuilder.h b/libs/hwui/GlopBuilder.h
index 8a8b652..87b1568 100644
--- a/libs/hwui/GlopBuilder.h
+++ b/libs/hwui/GlopBuilder.h
@@ -28,6 +28,7 @@
namespace uirenderer {
class Caches;
+class GlLayer;
class Matrix4;
class Patch;
class RenderState;
@@ -71,7 +72,7 @@
GlopBuilder& setFillClear();
GlopBuilder& setFillLayer(Texture& texture, const SkColorFilter* colorFilter,
float alpha, SkBlendMode mode, Blend::ModeOrderSwap modeUsage);
- GlopBuilder& setFillTextureLayer(Layer& layer, float alpha);
+ GlopBuilder& setFillTextureLayer(GlLayer& layer, float alpha);
// TODO: setFillLayer normally forces its own wrap & filter mode,
// which isn't always correct.
GlopBuilder& setFillExternalTexture(Texture& texture, Matrix4& textureTransform);
diff --git a/libs/hwui/GpuMemoryTracker.cpp b/libs/hwui/GpuMemoryTracker.cpp
index 4fb5701..a52ec87 100644
--- a/libs/hwui/GpuMemoryTracker.cpp
+++ b/libs/hwui/GpuMemoryTracker.cpp
@@ -67,13 +67,13 @@
gObjectStats[static_cast<int>(mType)].count--;
}
-void GpuMemoryTracker::onGLContextCreated() {
- LOG_ALWAYS_FATAL_IF(gGpuThread != 0, "We already have a GL thread? "
- "current = %lu, gl thread = %lu", pthread_self(), gGpuThread);
+void GpuMemoryTracker::onGpuContextCreated() {
+ LOG_ALWAYS_FATAL_IF(gGpuThread != 0, "We already have a gpu thread? "
+ "current = %lu, gpu thread = %lu", pthread_self(), gGpuThread);
gGpuThread = pthread_self();
}
-void GpuMemoryTracker::onGLContextDestroyed() {
+void GpuMemoryTracker::onGpuContextDestroyed() {
gGpuThread = 0;
if (CC_UNLIKELY(gObjectSet.size() > 0)) {
std::stringstream os;
diff --git a/libs/hwui/GpuMemoryTracker.h b/libs/hwui/GpuMemoryTracker.h
index bfb1bf1..18e2330 100644
--- a/libs/hwui/GpuMemoryTracker.h
+++ b/libs/hwui/GpuMemoryTracker.h
@@ -15,10 +15,11 @@
*/
#pragma once
-#include <cutils/log.h>
#include <pthread.h>
#include <ostream>
+#include <log/log.h>
+
namespace android {
namespace uirenderer {
@@ -43,8 +44,8 @@
GpuObjectType objectType() { return mType; }
int objectSize() { return mSize; }
- static void onGLContextCreated();
- static void onGLContextDestroyed();
+ static void onGpuContextCreated();
+ static void onGpuContextDestroyed();
static void dump();
static void dump(std::ostream& stream);
static int getInstanceCount(GpuObjectType type);
diff --git a/libs/hwui/Interpolator.cpp b/libs/hwui/Interpolator.cpp
index f94a22d..d740c03 100644
--- a/libs/hwui/Interpolator.cpp
+++ b/libs/hwui/Interpolator.cpp
@@ -16,10 +16,11 @@
#include "Interpolator.h"
-#include "utils/MathUtils.h"
-
#include <algorithm>
-#include <cutils/log.h>
+
+#include <log/log.h>
+
+#include "utils/MathUtils.h"
namespace android {
namespace uirenderer {
diff --git a/libs/hwui/JankTracker.cpp b/libs/hwui/JankTracker.cpp
index ed6b211..0a9bf54 100644
--- a/libs/hwui/JankTracker.cpp
+++ b/libs/hwui/JankTracker.cpp
@@ -15,19 +15,21 @@
*/
#include "JankTracker.h"
-#include "Properties.h"
-#include "utils/TimeUtils.h"
-
-#include <algorithm>
-#include <cutils/ashmem.h>
-#include <cutils/log.h>
-#include <cstdio>
#include <errno.h>
#include <inttypes.h>
-#include <limits>
+
+#include <algorithm>
#include <cmath>
+#include <cstdio>
+#include <limits>
#include <sys/mman.h>
+#include <cutils/ashmem.h>
+#include <log/log.h>
+
+#include "Properties.h"
+#include "utils/TimeUtils.h"
+
namespace android {
namespace uirenderer {
diff --git a/libs/hwui/Layer.cpp b/libs/hwui/Layer.cpp
index 88817ef..331bb81 100644
--- a/libs/hwui/Layer.cpp
+++ b/libs/hwui/Layer.cpp
@@ -16,77 +16,36 @@
#include "Layer.h"
-#include "Caches.h"
-#include "RenderNode.h"
#include "renderstate/RenderState.h"
-#include "utils/TraceUtils.h"
-#include <utils/Log.h>
-
-#define ATRACE_LAYER_WORK(label) \
- ATRACE_FORMAT("%s HW Layer DisplayList %s %ux%u", \
- label, \
- (renderNode.get() != NULL) ? renderNode->getName() : "", \
- getWidth(), getHeight())
+#include <SkColorFilter.h>
namespace android {
namespace uirenderer {
-Layer::Layer(RenderState& renderState, uint32_t layerWidth, uint32_t layerHeight)
+Layer::Layer(RenderState& renderState, Api api)
: GpuMemoryTracker(GpuObjectType::Layer)
- , state(State::Uncached)
- , caches(Caches::getInstance())
- , renderState(renderState)
- , texture(caches) {
+ , mRenderState(renderState)
+ , mApi(api) {
// TODO: This is a violation of Android's typical ref counting, but it
// preserves the old inc/dec ref locations. This should be changed...
incStrong(nullptr);
- texture.mWidth = layerWidth;
- texture.mHeight = layerHeight;
+
renderState.registerLayer(this);
}
Layer::~Layer() {
- renderState.unregisterLayer(this);
SkSafeUnref(colorFilter);
- if (texture.mId) {
- texture.deleteTexture();
- }
-}
-
-void Layer::onGlContextLost() {
- texture.deleteTexture();
+ mRenderState.unregisterLayer(this);
}
void Layer::setColorFilter(SkColorFilter* filter) {
SkRefCnt_SafeAssign(colorFilter, filter);
}
-void Layer::bindTexture() const {
- if (texture.mId) {
- caches.textureState().bindTexture(texture.target(), texture.mId);
- }
-}
-
-void Layer::generateTexture() {
- if (!texture.mId) {
- glGenTextures(1, &texture.mId);
- }
-}
-
-void Layer::clearTexture() {
- // There's a rare possibility that Caches could have been destroyed already
- // since this method is queued up as a task.
- // Since this is a reset method, treat this as non-fatal.
- if (caches.isInitialized()) {
- caches.textureState().unbindTexture(texture.mId);
- }
- texture.mId = 0;
-}
-
void Layer::postDecStrong() {
- renderState.postDecStrong(this);
+ mRenderState.postDecStrong(this);
}
}; // namespace uirenderer
diff --git a/libs/hwui/Layer.h b/libs/hwui/Layer.h
index 8e71cd1..3b639ee 100644
--- a/libs/hwui/Layer.h
+++ b/libs/hwui/Layer.h
@@ -16,25 +16,13 @@
#pragma once
-#include <cutils/compiler.h>
-#include <sys/types.h>
-#include <utils/StrongPointer.h>
#include <utils/RefBase.h>
-#include <memory>
-
-#include <GLES2/gl2.h>
#include <GpuMemoryTracker.h>
-#include <ui/Region.h>
-
#include <SkPaint.h>
#include <SkBlendMode.h>
#include "Matrix.h"
-#include "Rect.h"
-#include "RenderBuffer.h"
-#include "Texture.h"
-#include "Vertex.h"
namespace android {
namespace uirenderer {
@@ -43,49 +31,33 @@
// Layers
///////////////////////////////////////////////////////////////////////////////
-// Forward declarations
-class Caches;
class RenderState;
/**
- * A layer has dimensions and is backed by an OpenGL texture or FBO.
+ * A layer has dimensions and is backed by a backend specific texture or framebuffer.
*/
class Layer : public VirtualLightRefBase, GpuMemoryTracker {
public:
- // layer lifecycle, controlled from outside
- enum class State {
- Uncached = 0,
- InCache = 1,
- FailedToCache = 2,
- RemovedFromCache = 3,
- DeletedFromCache = 4,
- InGarbageList = 5,
+ enum class Api {
+ OpenGL = 0,
+ Vulkan = 1,
};
- State state; // public for logging/debugging purposes
- Layer(RenderState& renderState, uint32_t layerWidth, uint32_t layerHeight);
+ Api getApi() const {
+ return mApi;
+ }
+
~Layer();
- inline uint32_t getWidth() const {
- return texture.mWidth;
- }
+ virtual uint32_t getWidth() const = 0;
- inline uint32_t getHeight() const {
- return texture.mHeight;
- }
+ virtual uint32_t getHeight() const = 0;
- void setSize(uint32_t width, uint32_t height) {
- texture.updateSize(width, height, texture.internalFormat(), texture.format(),
- texture.target());
- }
+ virtual void setSize(uint32_t width, uint32_t height) = 0;
- inline void setBlend(bool blend) {
- texture.blend = blend;
- }
+ virtual void setBlend(bool blend) = 0;
- inline bool isBlend() const {
- return texture.blend;
- }
+ virtual bool isBlend() const = 0;
inline void setForceFilter(bool forceFilter) {
this->forceFilter = forceFilter;
@@ -112,50 +84,12 @@
return mode;
}
- inline GLuint getTextureId() const {
- return texture.id();
- }
-
- inline Texture& getTexture() {
- return texture;
- }
-
- inline GLenum getRenderTarget() const {
- return texture.target();
- }
-
- inline void setRenderTarget(GLenum renderTarget) {
- texture.mTarget = renderTarget;
- }
-
- inline bool isRenderable() const {
- return texture.target() != GL_NONE;
- }
-
- void setWrap(GLenum wrap, bool bindTexture = false, bool force = false) {
- texture.setWrap(wrap, bindTexture, force);
- }
-
- void setFilter(GLenum filter, bool bindTexture = false, bool force = false) {
- texture.setFilter(filter, bindTexture, force);
- }
-
inline SkColorFilter* getColorFilter() const {
return colorFilter;
}
void setColorFilter(SkColorFilter* filter);
- void bindTexture() const;
- void generateTexture();
-
- /**
- * When the caller frees the texture itself, the caller
- * must call this method to tell this layer that it lost
- * the texture.
- */
- void clearTexture();
-
inline mat4& getTexTransform() {
return texTransform;
}
@@ -170,21 +104,13 @@
*/
void postDecStrong();
- /**
- * Lost the GL context but the layer is still around, mark it invalid internally
- * so the dtor knows not to do any GL work
- */
- void onGlContextLost();
+protected:
+ Layer(RenderState& renderState, Api api);
+
+ RenderState& mRenderState;
private:
- Caches& caches;
-
- RenderState& renderState;
-
- /**
- * The texture backing this layer.
- */
- Texture texture;
+ Api mApi;
/**
* Color filter used to draw this layer. Optional.
diff --git a/libs/hwui/OpenGLReadback.cpp b/libs/hwui/OpenGLReadback.cpp
index 938b6ef..c460c0d 100644
--- a/libs/hwui/OpenGLReadback.cpp
+++ b/libs/hwui/OpenGLReadback.cpp
@@ -19,7 +19,7 @@
#include "Caches.h"
#include "Image.h"
#include "GlopBuilder.h"
-#include "Layer.h"
+#include "GlLayer.h"
#include "renderstate/RenderState.h"
#include "renderthread/EglManager.h"
#include "utils/GLUtils.h"
@@ -262,7 +262,7 @@
}
bool OpenGLReadbackImpl::copyLayerInto(renderthread::RenderThread& renderThread,
- Layer& layer, SkBitmap* bitmap) {
+ GlLayer& layer, SkBitmap* bitmap) {
return CopyResult::Success == copyTextureInto(Caches::getInstance(),
renderThread.renderState(), layer.getTexture(), layer.getTexTransform(),
Rect(), bitmap);
diff --git a/libs/hwui/OpenGLReadback.h b/libs/hwui/OpenGLReadback.h
index f4ebabc..c9222cf 100644
--- a/libs/hwui/OpenGLReadback.h
+++ b/libs/hwui/OpenGLReadback.h
@@ -22,7 +22,7 @@
namespace uirenderer {
class Matrix4;
-class Layer;
+class GlLayer;
class OpenGLReadback : public Readback {
public:
@@ -49,7 +49,7 @@
/**
* Copies the layer's contents into the provided bitmap.
*/
- static bool copyLayerInto(renderthread::RenderThread& renderThread, Layer& layer,
+ static bool copyLayerInto(renderthread::RenderThread& renderThread, GlLayer& layer,
SkBitmap* bitmap);
protected:
diff --git a/libs/hwui/PixelBuffer.h b/libs/hwui/PixelBuffer.h
index 9536bc8..77d5e41 100644
--- a/libs/hwui/PixelBuffer.h
+++ b/libs/hwui/PixelBuffer.h
@@ -18,7 +18,8 @@
#define ANDROID_HWUI_PIXEL_BUFFER_H
#include <GLES3/gl3.h>
-#include <cutils/log.h>
+
+#include <log/log.h>
namespace android {
namespace uirenderer {
diff --git a/libs/hwui/Properties.cpp b/libs/hwui/Properties.cpp
index 848161e..a766381 100644
--- a/libs/hwui/Properties.cpp
+++ b/libs/hwui/Properties.cpp
@@ -13,17 +13,17 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
#include "Properties.h"
-
#include "Debug.h"
-#include <cutils/compiler.h>
-#include <cutils/log.h>
-#include <cutils/properties.h>
-
#include <algorithm>
#include <cstdlib>
+#include <log/log.h>
+#include <cutils/compiler.h>
+#include <cutils/properties.h>
+
namespace android {
namespace uirenderer {
diff --git a/libs/hwui/RecordedOp.h b/libs/hwui/RecordedOp.h
index f9a7c36f2..dea2be6 100644
--- a/libs/hwui/RecordedOp.h
+++ b/libs/hwui/RecordedOp.h
@@ -17,6 +17,7 @@
#pragma once
#include "font/FontUtil.h"
+#include "GlLayer.h"
#include "Matrix.h"
#include "Rect.h"
#include "RenderNode.h"
@@ -413,7 +414,7 @@
};
struct TextureLayerOp : RecordedOp {
- TextureLayerOp(BASE_PARAMS_PAINTLESS, Layer* layer)
+ TextureLayerOp(BASE_PARAMS_PAINTLESS, GlLayer* layer)
: SUPER_PAINTLESS(TextureLayerOp)
, layer(layer) {}
@@ -424,7 +425,7 @@
, layer(op.layer) {
}
- Layer* layer;
+ GlLayer* layer;
};
////////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/libs/hwui/RecordingCanvas.cpp b/libs/hwui/RecordingCanvas.cpp
index ee6279d..b5e5d68 100644
--- a/libs/hwui/RecordingCanvas.cpp
+++ b/libs/hwui/RecordingCanvas.cpp
@@ -606,13 +606,14 @@
// We ref the DeferredLayerUpdater due to its thread-safe ref-counting semantics.
mDisplayList->ref(layerHandle);
+ LOG_ALWAYS_FATAL_IF(layerHandle->backingLayer()->getApi() != Layer::Api::OpenGL);
// Note that the backing layer has *not* yet been updated, so don't trust
// its width, height, transform, etc...!
addOp(alloc().create_trivial<TextureLayerOp>(
Rect(layerHandle->getWidth(), layerHandle->getHeight()),
*(mState.currentSnapshot()->transform),
getRecordedClip(),
- layerHandle->backingLayer()));
+ static_cast<GlLayer*>(layerHandle->backingLayer())));
}
void RecordingCanvas::callDrawGLFunction(Functor* functor,
diff --git a/libs/hwui/SkiaCanvasProxy.cpp b/libs/hwui/SkiaCanvasProxy.cpp
index c5156cf..f32612d 100644
--- a/libs/hwui/SkiaCanvasProxy.cpp
+++ b/libs/hwui/SkiaCanvasProxy.cpp
@@ -16,9 +16,11 @@
#include "SkiaCanvasProxy.h"
-#include "hwui/Bitmap.h"
+#include <memory>
-#include <cutils/log.h>
+#include <log/log.h>
+
+#include "hwui/Bitmap.h"
#include <SkLatticeIter.h>
#include <SkPatchUtils.h>
#include <SkPaint.h>
@@ -30,8 +32,6 @@
#include <SkSurface.h>
#include <SkTextBlobRunIterator.h>
-#include <memory>
-
namespace android {
namespace uirenderer {
diff --git a/libs/hwui/SkiaShader.cpp b/libs/hwui/SkiaShader.cpp
index fadb960..9239986 100644
--- a/libs/hwui/SkiaShader.cpp
+++ b/libs/hwui/SkiaShader.cpp
@@ -18,7 +18,6 @@
#include "Caches.h"
#include "Extensions.h"
-#include "Layer.h"
#include "Matrix.h"
#include "Texture.h"
#include "hwui/Bitmap.h"
@@ -317,42 +316,6 @@
return true;
}
-bool tryStoreLayer(Caches& caches, const SkShader& shader, const Matrix4& modelViewMatrix,
- GLuint* textureUnit, ProgramDescription* description,
- SkiaShaderData::LayerShaderData* outData) {
- Layer* layer;
- if (!shader.asACustomShader(reinterpret_cast<void**>(&layer))) {
- return false;
- }
-
- description->hasBitmap = true;
- outData->layer = layer;
- outData->bitmapSampler = (*textureUnit)++;
-
- const float width = layer->getWidth();
- const float height = layer->getHeight();
-
- computeScreenSpaceMatrix(outData->textureTransform, SkMatrix::I(), shader.getLocalMatrix(),
- modelViewMatrix);
-
- outData->textureDimension[0] = 1.0f / width;
- outData->textureDimension[1] = 1.0f / height;
- return true;
-}
-
-void applyLayer(Caches& caches, const SkiaShaderData::LayerShaderData& data) {
- caches.textureState().activateTexture(data.bitmapSampler);
-
- data.layer->bindTexture();
- data.layer->setWrap(GL_CLAMP_TO_EDGE);
- data.layer->setFilter(GL_LINEAR);
-
- glUniform1i(caches.program().getUniform("bitmapSampler"), data.bitmapSampler);
- glUniformMatrix4fv(caches.program().getUniform("textureTransform"), 1,
- GL_FALSE, &data.textureTransform.data[0]);
- glUniform2fv(caches.program().getUniform("textureDimension"), 1, &data.textureDimension[0]);
-}
-
void SkiaShader::store(Caches& caches, const SkShader& shader, const Matrix4& modelViewMatrix,
GLuint* textureUnit, ProgramDescription* description,
SkiaShaderData* outData) {
@@ -374,12 +337,6 @@
return;
}
- if (tryStoreLayer(caches, shader, modelViewMatrix,
- textureUnit, description, &outData->layerData)) {
- outData->skiaShaderType = kLayer_SkiaShaderType;
- return;
- }
-
// Unknown/unsupported type, so explicitly ignore shader
outData->skiaShaderType = kNone_SkiaShaderType;
}
@@ -394,10 +351,6 @@
if (data.skiaShaderType & kBitmap_SkiaShaderType) {
applyBitmap(caches, data.bitmapData);
}
-
- if (data.skiaShaderType == kLayer_SkiaShaderType) {
- applyLayer(caches, data.layerData);
- }
}
}; // namespace uirenderer
diff --git a/libs/hwui/SkiaShader.h b/libs/hwui/SkiaShader.h
index d2f37cd..ab578d5 100644
--- a/libs/hwui/SkiaShader.h
+++ b/libs/hwui/SkiaShader.h
@@ -29,7 +29,6 @@
class Caches;
class Extensions;
-class Layer;
class Texture;
struct ProgramDescription;
@@ -45,7 +44,6 @@
kBitmap_SkiaShaderType = 1,
kGradient_SkiaShaderType = 2,
kCompose_SkiaShaderType = kBitmap_SkiaShaderType | kGradient_SkiaShaderType,
- kLayer_SkiaShaderType = 4,
};
struct SkiaShaderData {
@@ -71,15 +69,6 @@
GLuint gradientSampler;
GLenum wrapST;
} gradientData;
- struct LayerShaderData {
- Layer* layer;
- GLuint bitmapSampler;
- GLenum wrapS;
- GLenum wrapT;
-
- Matrix4 textureTransform;
- float textureDimension[2];
- } layerData;
};
class SkiaShader {
diff --git a/libs/hwui/Texture.h b/libs/hwui/Texture.h
index c75e88f..b8397cc 100644
--- a/libs/hwui/Texture.h
+++ b/libs/hwui/Texture.h
@@ -159,10 +159,10 @@
*/
void* isInUse = nullptr;
private:
- // TODO: Temporarily grant private access to Layer, remove once
- // Layer can be de-tangled from being a dual-purpose render target
+ // TODO: Temporarily grant private access to GlLayer, remove once
+ // GlLayer can be de-tangled from being a dual-purpose render target
// and external texture wrapper
- friend class Layer;
+ friend class GlLayer;
// Returns true if the size changed, false if it was the same
bool updateSize(uint32_t width, uint32_t height, GLint internalFormat,
diff --git a/libs/hwui/VkLayer.cpp b/libs/hwui/VkLayer.cpp
new file mode 100644
index 0000000..537b3ea
--- /dev/null
+++ b/libs/hwui/VkLayer.cpp
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "VkLayer.h"
+
+#include "renderstate/RenderState.h"
+
+#include <SkCanvas.h>
+#include <SkSurface.h>
+
+namespace android {
+namespace uirenderer {
+
+void VkLayer::updateTexture() {
+ sk_sp<SkSurface> surface;
+ SkImageInfo info = SkImageInfo::MakeS32(mWidth, mHeight, kPremul_SkAlphaType);
+ surface = SkSurface::MakeRenderTarget(mRenderState.getGrContext(), SkBudgeted::kNo, info);
+ surface->getCanvas()->clear(SK_ColorBLUE);
+ mImage = surface->makeImageSnapshot(SkBudgeted::kNo);
+}
+
+void VkLayer::onVkContextDestroyed() {
+ mImage = nullptr;
+}
+
+}; // namespace uirenderer
+}; // namespace android
diff --git a/libs/hwui/VkLayer.h b/libs/hwui/VkLayer.h
new file mode 100644
index 0000000..39522b3
--- /dev/null
+++ b/libs/hwui/VkLayer.h
@@ -0,0 +1,76 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#pragma once
+
+#include "Layer.h"
+
+#include <SkImage.h>
+
+namespace android {
+namespace uirenderer {
+/**
+ * A layer has dimensions and is backed by a VkImage.
+ */
+class VkLayer : public Layer {
+public:
+ VkLayer(RenderState& renderState, uint32_t layerWidth, uint32_t layerHeight)
+ : Layer(renderState, Api::Vulkan) {}
+
+ virtual ~VkLayer() {}
+
+ uint32_t getWidth() const override {
+ return mWidth;
+ }
+
+ uint32_t getHeight() const override {
+ return mHeight;
+ }
+
+ void setSize(uint32_t width, uint32_t height) override {
+ mWidth = width;
+ mHeight = height;
+ }
+
+ void setBlend(bool blend) override {
+ mBlend = blend;
+ }
+
+ bool isBlend() const override {
+ return mBlend;
+ }
+
+ sk_sp<SkImage> getImage() {
+ return mImage;
+ }
+
+ void updateTexture();
+
+ // If we've destroyed the vulkan context (VkInstance, VkDevice, etc.), we must make sure to
+ // destroy any VkImages that were made with that context.
+ void onVkContextDestroyed();
+
+private:
+ int mWidth;
+ int mHeight;
+ bool mBlend;
+
+ sk_sp<SkImage> mImage;
+
+}; // struct VkLayer
+
+}; // namespace uirenderer
+}; // namespace android
diff --git a/libs/hwui/hwui/MinikinSkia.cpp b/libs/hwui/hwui/MinikinSkia.cpp
index f172473..956f66e 100644
--- a/libs/hwui/hwui/MinikinSkia.cpp
+++ b/libs/hwui/hwui/MinikinSkia.cpp
@@ -16,9 +16,10 @@
#include "MinikinSkia.h"
+#include <log/log.h>
+
#include <SkPaint.h>
#include <SkTypeface.h>
-#include <cutils/log.h>
namespace android {
diff --git a/libs/hwui/hwui/MinikinUtils.cpp b/libs/hwui/hwui/MinikinUtils.cpp
index 8dd165c..713e509 100644
--- a/libs/hwui/hwui/MinikinUtils.cpp
+++ b/libs/hwui/hwui/MinikinUtils.cpp
@@ -13,15 +13,17 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
#include "MinikinUtils.h"
+#include <string>
+
+#include <log/log.h>
+
#include "Paint.h"
#include "SkPathMeasure.h"
#include "Typeface.h"
-#include <cutils/log.h>
-#include <string>
-
namespace android {
minikin::FontStyle MinikinUtils::prepareMinikinPaint(minikin::MinikinPaint* minikinPaint,
diff --git a/libs/hwui/pipeline/skia/GLFunctorDrawable.cpp b/libs/hwui/pipeline/skia/GLFunctorDrawable.cpp
index fb2134c..419c8a9 100644
--- a/libs/hwui/pipeline/skia/GLFunctorDrawable.cpp
+++ b/libs/hwui/pipeline/skia/GLFunctorDrawable.cpp
@@ -52,6 +52,11 @@
canvas->flush();
+ if (Properties::getRenderPipelineType() == RenderPipelineType::SkiaVulkan) {
+ canvas->clear(SK_ColorRED);
+ return;
+ }
+
SkImageInfo canvasInfo = canvas->imageInfo();
SkMatrix44 mat4(canvas->getTotalMatrix());
diff --git a/libs/hwui/pipeline/skia/LayerDrawable.cpp b/libs/hwui/pipeline/skia/LayerDrawable.cpp
index f2af4a8..2ebfbcc 100644
--- a/libs/hwui/pipeline/skia/LayerDrawable.cpp
+++ b/libs/hwui/pipeline/skia/LayerDrawable.cpp
@@ -14,8 +14,12 @@
* limitations under the License.
*/
+#include "GlLayer.h"
#include "LayerDrawable.h"
+#include "VkLayer.h"
+
#include "SkColorFilter.h"
+#include "SkSurface.h"
#include "gl/GrGLTypes.h"
namespace android {
@@ -35,16 +39,27 @@
layer->getTransform().copyTo(transform);
canvas->concat(transform);
}
- GrGLTextureInfo externalTexture;
- externalTexture.fTarget = layer->getRenderTarget();
- externalTexture.fID = layer->getTextureId();
- GrBackendTextureDesc textureDescription;
- textureDescription.fWidth = layer->getWidth();
- textureDescription.fHeight = layer->getHeight();
- textureDescription.fConfig = kRGBA_8888_GrPixelConfig;
- textureDescription.fOrigin = kTopLeft_GrSurfaceOrigin;
- textureDescription.fTextureHandle = reinterpret_cast<GrBackendObject>(&externalTexture);
- sk_sp<SkImage> layerImage = SkImage::MakeFromTexture(context, textureDescription);
+
+ sk_sp<SkImage> layerImage;
+ if (layer->getApi() == Layer::Api::OpenGL) {
+ GlLayer* glLayer = static_cast<GlLayer*>(layer);
+ GrGLTextureInfo externalTexture;
+ externalTexture.fTarget = glLayer->getRenderTarget();
+ externalTexture.fID = glLayer->getTextureId();
+ GrBackendTextureDesc textureDescription;
+ textureDescription.fWidth = glLayer->getWidth();
+ textureDescription.fHeight = glLayer->getHeight();
+ textureDescription.fConfig = kRGBA_8888_GrPixelConfig;
+ textureDescription.fOrigin = kTopLeft_GrSurfaceOrigin;
+ textureDescription.fTextureHandle = reinterpret_cast<GrBackendObject>(&externalTexture);
+ layerImage = SkImage::MakeFromTexture(context, textureDescription);
+ } else {
+ SkASSERT(layer->getApi() == Layer::Api::Vulkan);
+ VkLayer* vkLayer = static_cast<VkLayer*>(layer);
+ canvas->clear(SK_ColorGREEN);
+ layerImage = vkLayer->getImage();
+ }
+
if (layerImage) {
SkPaint paint;
paint.setAlpha(layer->getAlpha());
diff --git a/libs/hwui/pipeline/skia/SkiaOpenGLPipeline.cpp b/libs/hwui/pipeline/skia/SkiaOpenGLPipeline.cpp
index c8258f7..65a1dc3 100644
--- a/libs/hwui/pipeline/skia/SkiaOpenGLPipeline.cpp
+++ b/libs/hwui/pipeline/skia/SkiaOpenGLPipeline.cpp
@@ -17,6 +17,7 @@
#include "SkiaOpenGLPipeline.h"
#include "DeferredLayerUpdater.h"
+#include "GlLayer.h"
#include "LayerDrawable.h"
#include "renderthread/EglManager.h"
#include "renderthread/Frame.h"
@@ -136,7 +137,7 @@
DeferredLayerUpdater* SkiaOpenGLPipeline::createTextureLayer() {
mEglManager.initialize();
- Layer* layer = new Layer(mRenderThread.renderState(), 0, 0);
+ GlLayer* layer = new GlLayer(mRenderThread.renderState(), 0, 0);
layer->generateTexture();
return new DeferredLayerUpdater(layer);
}
diff --git a/libs/hwui/pipeline/skia/SkiaVulkanPipeline.cpp b/libs/hwui/pipeline/skia/SkiaVulkanPipeline.cpp
index 0d3f4ef..910c339 100644
--- a/libs/hwui/pipeline/skia/SkiaVulkanPipeline.cpp
+++ b/libs/hwui/pipeline/skia/SkiaVulkanPipeline.cpp
@@ -22,6 +22,7 @@
#include "renderstate/RenderState.h"
#include "SkiaPipeline.h"
#include "SkiaProfileRenderer.h"
+#include "VkLayer.h"
#include <SkSurface.h>
#include <SkTypes.h>
@@ -119,7 +120,8 @@
DeferredLayerUpdater* SkiaVulkanPipeline::createTextureLayer() {
mVkManager.initialize();
- Layer* layer = new Layer(mRenderThread.renderState(), 0, 0);
+
+ VkLayer* layer = new VkLayer(mRenderThread.renderState(), 0, 0);
return new DeferredLayerUpdater(layer);
}
diff --git a/libs/hwui/renderstate/RenderState.cpp b/libs/hwui/renderstate/RenderState.cpp
index 72af7c9..17ee390 100644
--- a/libs/hwui/renderstate/RenderState.cpp
+++ b/libs/hwui/renderstate/RenderState.cpp
@@ -13,6 +13,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+#include "GlLayer.h"
+#include "VkLayer.h"
#include <GpuMemoryTracker.h>
#include "renderstate/RenderState.h"
@@ -40,7 +42,7 @@
void RenderState::onGLContextCreated() {
LOG_ALWAYS_FATAL_IF(mBlend || mMeshState || mScissor || mStencil,
"State object lifecycle not managed correctly");
- GpuMemoryTracker::onGLContextCreated();
+ GpuMemoryTracker::onGpuContextCreated();
mBlend = new Blend();
mMeshState = new MeshState();
@@ -55,7 +57,9 @@
}
static void layerLostGlContext(Layer* layer) {
- layer->onGlContextLost();
+ LOG_ALWAYS_FATAL_IF(layer->getApi() != Layer::Api::OpenGL,
+ "layerLostGlContext on non GL layer");
+ static_cast<GlLayer*>(layer)->onGlContextLost();
}
void RenderState::onGLContextDestroyed() {
@@ -75,7 +79,29 @@
delete mStencil;
mStencil = nullptr;
- GpuMemoryTracker::onGLContextDestroyed();
+ GpuMemoryTracker::onGpuContextDestroyed();
+}
+
+void RenderState::onVkContextCreated() {
+ LOG_ALWAYS_FATAL_IF(mBlend || mMeshState || mScissor || mStencil,
+ "State object lifecycle not managed correctly");
+ GpuMemoryTracker::onGpuContextCreated();
+}
+
+static void layerDestroyedVkContext(Layer* layer) {
+ LOG_ALWAYS_FATAL_IF(layer->getApi() != Layer::Api::Vulkan,
+ "layerLostVkContext on non Vulkan layer");
+ static_cast<VkLayer*>(layer)->onVkContextDestroyed();
+}
+
+void RenderState::onVkContextDestroyed() {
+ mLayerPool.clear();
+ std::for_each(mActiveLayers.begin(), mActiveLayers.end(), layerDestroyedVkContext);
+ GpuMemoryTracker::onGpuContextDestroyed();
+}
+
+GrContext* RenderState::getGrContext() const {
+ return mRenderThread.getGrContext();
}
void RenderState::flush(Caches::FlushMode mode) {
diff --git a/libs/hwui/renderstate/RenderState.h b/libs/hwui/renderstate/RenderState.h
index 3d119dc..d183a15 100644
--- a/libs/hwui/renderstate/RenderState.h
+++ b/libs/hwui/renderstate/RenderState.h
@@ -35,6 +35,8 @@
#include <utils/RefBase.h>
#include <private/hwui/DrawGlInfo.h>
+class GrContext;
+
namespace android {
namespace uirenderer {
@@ -56,6 +58,9 @@
void onGLContextCreated();
void onGLContextDestroyed();
+ void onVkContextCreated();
+ void onVkContextDestroyed();
+
void flush(Caches::FlushMode flushMode);
void setViewport(GLsizei width, GLsizei height);
@@ -98,6 +103,8 @@
OffscreenBufferPool& layerPool() { return mLayerPool; }
+ GrContext* getGrContext() const;
+
void dump();
private:
diff --git a/libs/hwui/renderthread/OpenGLPipeline.cpp b/libs/hwui/renderthread/OpenGLPipeline.cpp
index df08599..df40a44 100644
--- a/libs/hwui/renderthread/OpenGLPipeline.cpp
+++ b/libs/hwui/renderthread/OpenGLPipeline.cpp
@@ -19,6 +19,7 @@
#include "DeferredLayerUpdater.h"
#include "EglManager.h"
#include "Frame.h"
+#include "GlLayer.h"
#include "ProfileRenderer.h"
#include "renderstate/RenderState.h"
#include "OpenGLReadback.h"
@@ -120,12 +121,13 @@
bool OpenGLPipeline::copyLayerInto(DeferredLayerUpdater* layer, SkBitmap* bitmap) {
ATRACE_CALL();
layer->apply();
- return OpenGLReadbackImpl::copyLayerInto(mRenderThread, *(layer->backingLayer()), bitmap);
+ return OpenGLReadbackImpl::copyLayerInto(mRenderThread,
+ static_cast<GlLayer&>(*layer->backingLayer()), bitmap);
}
DeferredLayerUpdater* OpenGLPipeline::createTextureLayer() {
mEglManager.initialize();
- Layer* layer = new Layer(mRenderThread.renderState(), 0, 0);
+ GlLayer* layer = new GlLayer(mRenderThread.renderState(), 0, 0);
Caches::getInstance().textureState().activateTexture(0);
layer->generateTexture();
diff --git a/libs/hwui/renderthread/VulkanManager.cpp b/libs/hwui/renderthread/VulkanManager.cpp
index 68c04af..2b90744 100644
--- a/libs/hwui/renderthread/VulkanManager.cpp
+++ b/libs/hwui/renderthread/VulkanManager.cpp
@@ -19,6 +19,7 @@
#include "DeviceInfo.h"
#include "Properties.h"
#include "RenderThread.h"
+#include "renderstate/RenderState.h"
#include <GrContext.h>
#include <GrTypes.h>
@@ -37,10 +38,14 @@
void VulkanManager::destroy() {
if (!hasVkContext()) return;
+ mRenderThread.renderState().onVkContextDestroyed();
+ mRenderThread.setGrContext(nullptr);
+
if (VK_NULL_HANDLE != mCommandPool) {
mDestroyCommandPool(mBackendContext->fDevice, mCommandPool, nullptr);
mCommandPool = VK_NULL_HANDLE;
}
+ mBackendContext.reset();
}
void VulkanManager::initialize() {
@@ -105,6 +110,8 @@
if (Properties::enablePartialUpdates && Properties::useBufferAge) {
mSwapBehavior = SwapBehavior::BufferAge;
}
+
+ mRenderThread.renderState().onVkContextCreated();
}
// Returns the next BackbufferInfo to use for the next draw. The function will make sure all
@@ -156,6 +163,9 @@
if (!createSwapchain(surface)) {
return nullptr;
}
+ backbuffer = getAvailableBackbuffer(surface);
+ res = mResetFences(mBackendContext->fDevice, 2, backbuffer->mUsageFences);
+ SkASSERT(VK_SUCCESS == res);
// acquire the image
res = mAcquireNextImageKHR(mBackendContext->fDevice, surface->mSwapchain, UINT64_MAX,
diff --git a/libs/hwui/tests/unit/DeferredLayerUpdaterTests.cpp b/libs/hwui/tests/unit/DeferredLayerUpdaterTests.cpp
index 0326aa9..f1b8882 100644
--- a/libs/hwui/tests/unit/DeferredLayerUpdaterTests.cpp
+++ b/libs/hwui/tests/unit/DeferredLayerUpdaterTests.cpp
@@ -15,6 +15,7 @@
*/
#include "DeferredLayerUpdater.h"
+#include "GlLayer.h"
#include "renderthread/OpenGLPipeline.h"
#include "tests/common/TestUtils.h"
@@ -32,7 +33,10 @@
// updates are deferred so the backing layer should still be in its default state
- EXPECT_EQ((uint32_t)GL_NONE, layerUpdater->backingLayer()->getRenderTarget());
+ if (layerUpdater->backingLayer()->getApi() == Layer::Api::OpenGL) {
+ GlLayer* glLayer = static_cast<GlLayer*>(layerUpdater->backingLayer());
+ EXPECT_EQ((uint32_t)GL_NONE, glLayer->getRenderTarget());
+ }
EXPECT_EQ(0u, layerUpdater->backingLayer()->getWidth());
EXPECT_EQ(0u, layerUpdater->backingLayer()->getHeight());
EXPECT_FALSE(layerUpdater->backingLayer()->getForceFilter());
@@ -45,7 +49,10 @@
layerUpdater->updateLayer(true, GL_TEXTURE_EXTERNAL_OES, scaledMatrix.data);
// the backing layer should now have all the properties applied.
- EXPECT_EQ((uint32_t)GL_TEXTURE_EXTERNAL_OES, layerUpdater->backingLayer()->getRenderTarget());
+ if (layerUpdater->backingLayer()->getApi() == Layer::Api::OpenGL) {
+ GlLayer* glLayer = static_cast<GlLayer*>(layerUpdater->backingLayer());
+ EXPECT_EQ((uint32_t)GL_TEXTURE_EXTERNAL_OES, glLayer->getRenderTarget());
+ }
EXPECT_EQ(100u, layerUpdater->backingLayer()->getWidth());
EXPECT_EQ(100u, layerUpdater->backingLayer()->getHeight());
EXPECT_TRUE(layerUpdater->backingLayer()->getForceFilter());
diff --git a/libs/hwui/tests/unit/FrameBuilderTests.cpp b/libs/hwui/tests/unit/FrameBuilderTests.cpp
index 21394ae..71c7516 100644
--- a/libs/hwui/tests/unit/FrameBuilderTests.cpp
+++ b/libs/hwui/tests/unit/FrameBuilderTests.cpp
@@ -19,6 +19,7 @@
#include <BakedOpState.h>
#include <DeferredLayerUpdater.h>
#include <FrameBuilder.h>
+#include <GlLayer.h>
#include <LayerUpdateQueue.h>
#include <RecordedOp.h>
#include <RecordingCanvas.h>
@@ -698,7 +699,10 @@
RENDERTHREAD_TEST(FrameBuilder, textureLayer_reject) {
auto layerUpdater = TestUtils::createTextureLayerUpdater(renderThread, 100, 100,
SkMatrix::MakeTrans(5, 5));
- layerUpdater->backingLayer()->setRenderTarget(GL_NONE); // Should be rejected
+ if (layerUpdater->backingLayer()->getApi() != Layer::Api::OpenGL) return;
+
+ GlLayer* glLayer = static_cast<GlLayer*>(layerUpdater->backingLayer());
+ glLayer->setRenderTarget(GL_NONE); // Should be rejected
auto node = TestUtils::createNode<RecordingCanvas>(0, 0, 200, 200,
[&layerUpdater](RenderProperties& props, RecordingCanvas& canvas) {
diff --git a/libs/hwui/tests/unit/GpuMemoryTrackerTests.cpp b/libs/hwui/tests/unit/GpuMemoryTrackerTests.cpp
index aa1dcb2..8cbd24e 100644
--- a/libs/hwui/tests/unit/GpuMemoryTrackerTests.cpp
+++ b/libs/hwui/tests/unit/GpuMemoryTrackerTests.cpp
@@ -51,7 +51,7 @@
TEST(GpuMemoryTracker, sizeCheck) {
destroyEglContext();
- GpuMemoryTracker::onGLContextCreated();
+ GpuMemoryTracker::onGpuContextCreated();
ASSERT_EQ(0, GpuMemoryTracker::getTotalSize(GpuObjectType::Texture));
ASSERT_EQ(0, GpuMemoryTracker::getInstanceCount(GpuObjectType::Texture));
{
@@ -66,5 +66,5 @@
}
ASSERT_EQ(0, GpuMemoryTracker::getTotalSize(GpuObjectType::Texture));
ASSERT_EQ(0, GpuMemoryTracker::getInstanceCount(GpuObjectType::Texture));
- GpuMemoryTracker::onGLContextDestroyed();
+ GpuMemoryTracker::onGpuContextDestroyed();
}
diff --git a/libs/hwui/tests/unit/RenderNodeDrawableTests.cpp b/libs/hwui/tests/unit/RenderNodeDrawableTests.cpp
index 0906cc8..f5ff058 100644
--- a/libs/hwui/tests/unit/RenderNodeDrawableTests.cpp
+++ b/libs/hwui/tests/unit/RenderNodeDrawableTests.cpp
@@ -392,7 +392,7 @@
sk_sp<SkSurface> onNewSurface(const SkImageInfo&) override {
return sk_sp<SkSurface>();
}
- sk_sp<SkImage> onNewImageSnapshot(SkBudgeted, SkCopyPixelsMode) override {
+ sk_sp<SkImage> onNewImageSnapshot(SkBudgeted) override {
return sk_sp<SkImage>();
}
void onCopyOnWrite(ContentChangeMode) override {}
diff --git a/libs/hwui/tests/unit/SkiaPipelineTests.cpp b/libs/hwui/tests/unit/SkiaPipelineTests.cpp
index f3a663e..494585a 100644
--- a/libs/hwui/tests/unit/SkiaPipelineTests.cpp
+++ b/libs/hwui/tests/unit/SkiaPipelineTests.cpp
@@ -201,16 +201,16 @@
template <typename T>
class DeferLayer : public SkSurface_Base {
public:
- DeferLayer()
- : SkSurface_Base(T().imageInfo(), nullptr) {
- }
+ DeferLayer() : SkSurface_Base(T().imageInfo(), nullptr) {}
+ virtual ~DeferLayer() {}
+
SkCanvas* onNewCanvas() override {
return new T();
}
sk_sp<SkSurface> onNewSurface(const SkImageInfo&) override {
return sk_sp<SkSurface>();
}
- sk_sp<SkImage> onNewImageSnapshot(SkBudgeted, SkCopyPixelsMode) override {
+ sk_sp<SkImage> onNewImageSnapshot(SkBudgeted) override {
return sk_sp<SkImage>();
}
T* canvas() { return static_cast<T*>(getCanvas()); }
diff --git a/libs/hwui/utils/GLUtils.h b/libs/hwui/utils/GLUtils.h
index 94818b2..c127478 100644
--- a/libs/hwui/utils/GLUtils.h
+++ b/libs/hwui/utils/GLUtils.h
@@ -18,7 +18,7 @@
#include "Debug.h"
-#include <cutils/log.h>
+#include <log/log.h>
namespace android {
namespace uirenderer {
diff --git a/libs/input/PointerController.cpp b/libs/input/PointerController.cpp
index 0b22ad5..7c60467 100644
--- a/libs/input/PointerController.cpp
+++ b/libs/input/PointerController.cpp
@@ -15,7 +15,6 @@
*/
#define LOG_TAG "PointerController"
-
//#define LOG_NDEBUG 0
// Log debug messages about pointer updates
@@ -23,8 +22,9 @@
#include "PointerController.h"
-#include <cutils/log.h>
+#include <log/log.h>
+// ToDo: Fix code to be warning free
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-parameter"
#include <SkBitmap.h>
diff --git a/libs/input/SpriteController.cpp b/libs/input/SpriteController.cpp
index 18ebd47..4991f04 100644
--- a/libs/input/SpriteController.cpp
+++ b/libs/input/SpriteController.cpp
@@ -15,15 +15,15 @@
*/
#define LOG_TAG "Sprites"
-
//#define LOG_NDEBUG 0
#include "SpriteController.h"
-#include <cutils/log.h>
+#include <log/log.h>
#include <utils/String8.h>
#include <gui/Surface.h>
+// ToDo: Fix code to be warning free
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-parameter"
#include <SkBitmap.h>
diff --git a/media/mca/filterpacks/native/base/geometry.cpp b/media/mca/filterpacks/native/base/geometry.cpp
index 7812d502..44b13e4 100644
--- a/media/mca/filterpacks/native/base/geometry.cpp
+++ b/media/mca/filterpacks/native/base/geometry.cpp
@@ -13,10 +13,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+#define LOG_TAG "geometry"
-#include <cutils/log.h>
#include <cmath>
+#include <log/log.h>
+
#include "geometry.h"
namespace android {
diff --git a/media/mca/filterpacks/native/base/time_util.cpp b/media/mca/filterpacks/native/base/time_util.cpp
index 1a78a95..7d383df 100644
--- a/media/mca/filterpacks/native/base/time_util.cpp
+++ b/media/mca/filterpacks/native/base/time_util.cpp
@@ -13,14 +13,16 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+#define LOG_TAG "time_util"
#include "time_util.h"
#include "utilities.h"
-#include <cutils/log.h>
#include <sys/time.h>
#include <map>
+#include <log/log.h>
+
namespace android {
namespace filterfw {
diff --git a/packages/BackupRestoreConfirmation/res/values-az-rAZ/strings.xml b/packages/BackupRestoreConfirmation/res/values-az/strings.xml
similarity index 100%
rename from packages/BackupRestoreConfirmation/res/values-az-rAZ/strings.xml
rename to packages/BackupRestoreConfirmation/res/values-az/strings.xml
diff --git a/packages/BackupRestoreConfirmation/res/values-be-rBY/strings.xml b/packages/BackupRestoreConfirmation/res/values-be/strings.xml
similarity index 100%
rename from packages/BackupRestoreConfirmation/res/values-be-rBY/strings.xml
rename to packages/BackupRestoreConfirmation/res/values-be/strings.xml
diff --git a/packages/BackupRestoreConfirmation/res/values-bn-rBD/strings.xml b/packages/BackupRestoreConfirmation/res/values-bn/strings.xml
similarity index 100%
rename from packages/BackupRestoreConfirmation/res/values-bn-rBD/strings.xml
rename to packages/BackupRestoreConfirmation/res/values-bn/strings.xml
diff --git a/packages/BackupRestoreConfirmation/res/values-bs-rBA/strings.xml b/packages/BackupRestoreConfirmation/res/values-bs/strings.xml
similarity index 100%
rename from packages/BackupRestoreConfirmation/res/values-bs-rBA/strings.xml
rename to packages/BackupRestoreConfirmation/res/values-bs/strings.xml
diff --git a/packages/BackupRestoreConfirmation/res/values-et-rEE/strings.xml b/packages/BackupRestoreConfirmation/res/values-et/strings.xml
similarity index 100%
rename from packages/BackupRestoreConfirmation/res/values-et-rEE/strings.xml
rename to packages/BackupRestoreConfirmation/res/values-et/strings.xml
diff --git a/packages/BackupRestoreConfirmation/res/values-eu-rES/strings.xml b/packages/BackupRestoreConfirmation/res/values-eu/strings.xml
similarity index 100%
rename from packages/BackupRestoreConfirmation/res/values-eu-rES/strings.xml
rename to packages/BackupRestoreConfirmation/res/values-eu/strings.xml
diff --git a/packages/BackupRestoreConfirmation/res/values-gl-rES/strings.xml b/packages/BackupRestoreConfirmation/res/values-gl/strings.xml
similarity index 100%
rename from packages/BackupRestoreConfirmation/res/values-gl-rES/strings.xml
rename to packages/BackupRestoreConfirmation/res/values-gl/strings.xml
diff --git a/packages/BackupRestoreConfirmation/res/values-gu-rIN/strings.xml b/packages/BackupRestoreConfirmation/res/values-gu/strings.xml
similarity index 100%
rename from packages/BackupRestoreConfirmation/res/values-gu-rIN/strings.xml
rename to packages/BackupRestoreConfirmation/res/values-gu/strings.xml
diff --git a/packages/BackupRestoreConfirmation/res/values-hy-rAM/strings.xml b/packages/BackupRestoreConfirmation/res/values-hy/strings.xml
similarity index 100%
rename from packages/BackupRestoreConfirmation/res/values-hy-rAM/strings.xml
rename to packages/BackupRestoreConfirmation/res/values-hy/strings.xml
diff --git a/packages/BackupRestoreConfirmation/res/values-is-rIS/strings.xml b/packages/BackupRestoreConfirmation/res/values-is/strings.xml
similarity index 100%
rename from packages/BackupRestoreConfirmation/res/values-is-rIS/strings.xml
rename to packages/BackupRestoreConfirmation/res/values-is/strings.xml
diff --git a/packages/BackupRestoreConfirmation/res/values-ka-rGE/strings.xml b/packages/BackupRestoreConfirmation/res/values-ka/strings.xml
similarity index 100%
rename from packages/BackupRestoreConfirmation/res/values-ka-rGE/strings.xml
rename to packages/BackupRestoreConfirmation/res/values-ka/strings.xml
diff --git a/packages/BackupRestoreConfirmation/res/values-kk-rKZ/strings.xml b/packages/BackupRestoreConfirmation/res/values-kk/strings.xml
similarity index 100%
rename from packages/BackupRestoreConfirmation/res/values-kk-rKZ/strings.xml
rename to packages/BackupRestoreConfirmation/res/values-kk/strings.xml
diff --git a/packages/BackupRestoreConfirmation/res/values-km-rKH/strings.xml b/packages/BackupRestoreConfirmation/res/values-km/strings.xml
similarity index 100%
rename from packages/BackupRestoreConfirmation/res/values-km-rKH/strings.xml
rename to packages/BackupRestoreConfirmation/res/values-km/strings.xml
diff --git a/packages/BackupRestoreConfirmation/res/values-kn-rIN/strings.xml b/packages/BackupRestoreConfirmation/res/values-kn/strings.xml
similarity index 100%
rename from packages/BackupRestoreConfirmation/res/values-kn-rIN/strings.xml
rename to packages/BackupRestoreConfirmation/res/values-kn/strings.xml
diff --git a/packages/BackupRestoreConfirmation/res/values-ky-rKG/strings.xml b/packages/BackupRestoreConfirmation/res/values-ky/strings.xml
similarity index 100%
rename from packages/BackupRestoreConfirmation/res/values-ky-rKG/strings.xml
rename to packages/BackupRestoreConfirmation/res/values-ky/strings.xml
diff --git a/packages/BackupRestoreConfirmation/res/values-lo-rLA/strings.xml b/packages/BackupRestoreConfirmation/res/values-lo/strings.xml
similarity index 100%
rename from packages/BackupRestoreConfirmation/res/values-lo-rLA/strings.xml
rename to packages/BackupRestoreConfirmation/res/values-lo/strings.xml
diff --git a/packages/BackupRestoreConfirmation/res/values-mk-rMK/strings.xml b/packages/BackupRestoreConfirmation/res/values-mk/strings.xml
similarity index 100%
rename from packages/BackupRestoreConfirmation/res/values-mk-rMK/strings.xml
rename to packages/BackupRestoreConfirmation/res/values-mk/strings.xml
diff --git a/packages/BackupRestoreConfirmation/res/values-ml-rIN/strings.xml b/packages/BackupRestoreConfirmation/res/values-ml/strings.xml
similarity index 100%
rename from packages/BackupRestoreConfirmation/res/values-ml-rIN/strings.xml
rename to packages/BackupRestoreConfirmation/res/values-ml/strings.xml
diff --git a/packages/BackupRestoreConfirmation/res/values-mn-rMN/strings.xml b/packages/BackupRestoreConfirmation/res/values-mn/strings.xml
similarity index 100%
rename from packages/BackupRestoreConfirmation/res/values-mn-rMN/strings.xml
rename to packages/BackupRestoreConfirmation/res/values-mn/strings.xml
diff --git a/packages/BackupRestoreConfirmation/res/values-mr-rIN/strings.xml b/packages/BackupRestoreConfirmation/res/values-mr/strings.xml
similarity index 100%
rename from packages/BackupRestoreConfirmation/res/values-mr-rIN/strings.xml
rename to packages/BackupRestoreConfirmation/res/values-mr/strings.xml
diff --git a/packages/BackupRestoreConfirmation/res/values-ms-rMY/strings.xml b/packages/BackupRestoreConfirmation/res/values-ms/strings.xml
similarity index 100%
rename from packages/BackupRestoreConfirmation/res/values-ms-rMY/strings.xml
rename to packages/BackupRestoreConfirmation/res/values-ms/strings.xml
diff --git a/packages/BackupRestoreConfirmation/res/values-my-rMM/strings.xml b/packages/BackupRestoreConfirmation/res/values-my/strings.xml
similarity index 100%
rename from packages/BackupRestoreConfirmation/res/values-my-rMM/strings.xml
rename to packages/BackupRestoreConfirmation/res/values-my/strings.xml
diff --git a/packages/BackupRestoreConfirmation/res/values-ne-rNP/strings.xml b/packages/BackupRestoreConfirmation/res/values-ne/strings.xml
similarity index 100%
rename from packages/BackupRestoreConfirmation/res/values-ne-rNP/strings.xml
rename to packages/BackupRestoreConfirmation/res/values-ne/strings.xml
diff --git a/packages/BackupRestoreConfirmation/res/values-pa-rIN/strings.xml b/packages/BackupRestoreConfirmation/res/values-pa/strings.xml
similarity index 100%
rename from packages/BackupRestoreConfirmation/res/values-pa-rIN/strings.xml
rename to packages/BackupRestoreConfirmation/res/values-pa/strings.xml
diff --git a/packages/BackupRestoreConfirmation/res/values-si-rLK/strings.xml b/packages/BackupRestoreConfirmation/res/values-si/strings.xml
similarity index 100%
rename from packages/BackupRestoreConfirmation/res/values-si-rLK/strings.xml
rename to packages/BackupRestoreConfirmation/res/values-si/strings.xml
diff --git a/packages/BackupRestoreConfirmation/res/values-sq-rAL/strings.xml b/packages/BackupRestoreConfirmation/res/values-sq/strings.xml
similarity index 100%
rename from packages/BackupRestoreConfirmation/res/values-sq-rAL/strings.xml
rename to packages/BackupRestoreConfirmation/res/values-sq/strings.xml
diff --git a/packages/BackupRestoreConfirmation/res/values-ta-rIN/strings.xml b/packages/BackupRestoreConfirmation/res/values-ta/strings.xml
similarity index 100%
rename from packages/BackupRestoreConfirmation/res/values-ta-rIN/strings.xml
rename to packages/BackupRestoreConfirmation/res/values-ta/strings.xml
diff --git a/packages/BackupRestoreConfirmation/res/values-te-rIN/strings.xml b/packages/BackupRestoreConfirmation/res/values-te/strings.xml
similarity index 100%
rename from packages/BackupRestoreConfirmation/res/values-te-rIN/strings.xml
rename to packages/BackupRestoreConfirmation/res/values-te/strings.xml
diff --git a/packages/BackupRestoreConfirmation/res/values-ur-rPK/strings.xml b/packages/BackupRestoreConfirmation/res/values-ur/strings.xml
similarity index 100%
rename from packages/BackupRestoreConfirmation/res/values-ur-rPK/strings.xml
rename to packages/BackupRestoreConfirmation/res/values-ur/strings.xml
diff --git a/packages/BackupRestoreConfirmation/res/values-uz-rUZ/strings.xml b/packages/BackupRestoreConfirmation/res/values-uz/strings.xml
similarity index 100%
rename from packages/BackupRestoreConfirmation/res/values-uz-rUZ/strings.xml
rename to packages/BackupRestoreConfirmation/res/values-uz/strings.xml
diff --git a/packages/CaptivePortalLogin/res/values-az-rAZ/strings.xml b/packages/CaptivePortalLogin/res/values-az/strings.xml
similarity index 100%
rename from packages/CaptivePortalLogin/res/values-az-rAZ/strings.xml
rename to packages/CaptivePortalLogin/res/values-az/strings.xml
diff --git a/packages/CaptivePortalLogin/res/values-be-rBY/strings.xml b/packages/CaptivePortalLogin/res/values-be/strings.xml
similarity index 100%
rename from packages/CaptivePortalLogin/res/values-be-rBY/strings.xml
rename to packages/CaptivePortalLogin/res/values-be/strings.xml
diff --git a/packages/CaptivePortalLogin/res/values-bn-rBD/strings.xml b/packages/CaptivePortalLogin/res/values-bn/strings.xml
similarity index 100%
rename from packages/CaptivePortalLogin/res/values-bn-rBD/strings.xml
rename to packages/CaptivePortalLogin/res/values-bn/strings.xml
diff --git a/packages/CaptivePortalLogin/res/values-bs-rBA/strings.xml b/packages/CaptivePortalLogin/res/values-bs/strings.xml
similarity index 100%
rename from packages/CaptivePortalLogin/res/values-bs-rBA/strings.xml
rename to packages/CaptivePortalLogin/res/values-bs/strings.xml
diff --git a/packages/CaptivePortalLogin/res/values-et-rEE/strings.xml b/packages/CaptivePortalLogin/res/values-et/strings.xml
similarity index 100%
rename from packages/CaptivePortalLogin/res/values-et-rEE/strings.xml
rename to packages/CaptivePortalLogin/res/values-et/strings.xml
diff --git a/packages/CaptivePortalLogin/res/values-eu-rES/strings.xml b/packages/CaptivePortalLogin/res/values-eu/strings.xml
similarity index 100%
rename from packages/CaptivePortalLogin/res/values-eu-rES/strings.xml
rename to packages/CaptivePortalLogin/res/values-eu/strings.xml
diff --git a/packages/CaptivePortalLogin/res/values-gl-rES/strings.xml b/packages/CaptivePortalLogin/res/values-gl/strings.xml
similarity index 100%
rename from packages/CaptivePortalLogin/res/values-gl-rES/strings.xml
rename to packages/CaptivePortalLogin/res/values-gl/strings.xml
diff --git a/packages/CaptivePortalLogin/res/values-gu-rIN/strings.xml b/packages/CaptivePortalLogin/res/values-gu/strings.xml
similarity index 100%
rename from packages/CaptivePortalLogin/res/values-gu-rIN/strings.xml
rename to packages/CaptivePortalLogin/res/values-gu/strings.xml
diff --git a/packages/CaptivePortalLogin/res/values-hy-rAM/strings.xml b/packages/CaptivePortalLogin/res/values-hy/strings.xml
similarity index 100%
rename from packages/CaptivePortalLogin/res/values-hy-rAM/strings.xml
rename to packages/CaptivePortalLogin/res/values-hy/strings.xml
diff --git a/packages/CaptivePortalLogin/res/values-is-rIS/strings.xml b/packages/CaptivePortalLogin/res/values-is/strings.xml
similarity index 100%
rename from packages/CaptivePortalLogin/res/values-is-rIS/strings.xml
rename to packages/CaptivePortalLogin/res/values-is/strings.xml
diff --git a/packages/CaptivePortalLogin/res/values-ka-rGE/strings.xml b/packages/CaptivePortalLogin/res/values-ka/strings.xml
similarity index 100%
rename from packages/CaptivePortalLogin/res/values-ka-rGE/strings.xml
rename to packages/CaptivePortalLogin/res/values-ka/strings.xml
diff --git a/packages/CaptivePortalLogin/res/values-kk-rKZ/strings.xml b/packages/CaptivePortalLogin/res/values-kk/strings.xml
similarity index 100%
rename from packages/CaptivePortalLogin/res/values-kk-rKZ/strings.xml
rename to packages/CaptivePortalLogin/res/values-kk/strings.xml
diff --git a/packages/CaptivePortalLogin/res/values-km-rKH/strings.xml b/packages/CaptivePortalLogin/res/values-km/strings.xml
similarity index 100%
rename from packages/CaptivePortalLogin/res/values-km-rKH/strings.xml
rename to packages/CaptivePortalLogin/res/values-km/strings.xml
diff --git a/packages/CaptivePortalLogin/res/values-kn-rIN/strings.xml b/packages/CaptivePortalLogin/res/values-kn/strings.xml
similarity index 100%
rename from packages/CaptivePortalLogin/res/values-kn-rIN/strings.xml
rename to packages/CaptivePortalLogin/res/values-kn/strings.xml
diff --git a/packages/CaptivePortalLogin/res/values-ky-rKG/strings.xml b/packages/CaptivePortalLogin/res/values-ky/strings.xml
similarity index 100%
rename from packages/CaptivePortalLogin/res/values-ky-rKG/strings.xml
rename to packages/CaptivePortalLogin/res/values-ky/strings.xml
diff --git a/packages/CaptivePortalLogin/res/values-lo-rLA/strings.xml b/packages/CaptivePortalLogin/res/values-lo/strings.xml
similarity index 100%
rename from packages/CaptivePortalLogin/res/values-lo-rLA/strings.xml
rename to packages/CaptivePortalLogin/res/values-lo/strings.xml
diff --git a/packages/CaptivePortalLogin/res/values-mk-rMK/strings.xml b/packages/CaptivePortalLogin/res/values-mk/strings.xml
similarity index 100%
rename from packages/CaptivePortalLogin/res/values-mk-rMK/strings.xml
rename to packages/CaptivePortalLogin/res/values-mk/strings.xml
diff --git a/packages/CaptivePortalLogin/res/values-ml-rIN/strings.xml b/packages/CaptivePortalLogin/res/values-ml/strings.xml
similarity index 100%
rename from packages/CaptivePortalLogin/res/values-ml-rIN/strings.xml
rename to packages/CaptivePortalLogin/res/values-ml/strings.xml
diff --git a/packages/CaptivePortalLogin/res/values-mn-rMN/strings.xml b/packages/CaptivePortalLogin/res/values-mn/strings.xml
similarity index 100%
rename from packages/CaptivePortalLogin/res/values-mn-rMN/strings.xml
rename to packages/CaptivePortalLogin/res/values-mn/strings.xml
diff --git a/packages/CaptivePortalLogin/res/values-mr-rIN/strings.xml b/packages/CaptivePortalLogin/res/values-mr/strings.xml
similarity index 100%
rename from packages/CaptivePortalLogin/res/values-mr-rIN/strings.xml
rename to packages/CaptivePortalLogin/res/values-mr/strings.xml
diff --git a/packages/CaptivePortalLogin/res/values-ms-rMY/strings.xml b/packages/CaptivePortalLogin/res/values-ms/strings.xml
similarity index 100%
rename from packages/CaptivePortalLogin/res/values-ms-rMY/strings.xml
rename to packages/CaptivePortalLogin/res/values-ms/strings.xml
diff --git a/packages/CaptivePortalLogin/res/values-my-rMM/strings.xml b/packages/CaptivePortalLogin/res/values-my/strings.xml
similarity index 100%
rename from packages/CaptivePortalLogin/res/values-my-rMM/strings.xml
rename to packages/CaptivePortalLogin/res/values-my/strings.xml
diff --git a/packages/CaptivePortalLogin/res/values-ne-rNP/strings.xml b/packages/CaptivePortalLogin/res/values-ne/strings.xml
similarity index 100%
rename from packages/CaptivePortalLogin/res/values-ne-rNP/strings.xml
rename to packages/CaptivePortalLogin/res/values-ne/strings.xml
diff --git a/packages/CaptivePortalLogin/res/values-pa-rIN/strings.xml b/packages/CaptivePortalLogin/res/values-pa/strings.xml
similarity index 100%
rename from packages/CaptivePortalLogin/res/values-pa-rIN/strings.xml
rename to packages/CaptivePortalLogin/res/values-pa/strings.xml
diff --git a/packages/CaptivePortalLogin/res/values-si-rLK/strings.xml b/packages/CaptivePortalLogin/res/values-si/strings.xml
similarity index 100%
rename from packages/CaptivePortalLogin/res/values-si-rLK/strings.xml
rename to packages/CaptivePortalLogin/res/values-si/strings.xml
diff --git a/packages/CaptivePortalLogin/res/values-sq-rAL/strings.xml b/packages/CaptivePortalLogin/res/values-sq/strings.xml
similarity index 100%
rename from packages/CaptivePortalLogin/res/values-sq-rAL/strings.xml
rename to packages/CaptivePortalLogin/res/values-sq/strings.xml
diff --git a/packages/CaptivePortalLogin/res/values-ta-rIN/strings.xml b/packages/CaptivePortalLogin/res/values-ta/strings.xml
similarity index 100%
rename from packages/CaptivePortalLogin/res/values-ta-rIN/strings.xml
rename to packages/CaptivePortalLogin/res/values-ta/strings.xml
diff --git a/packages/CaptivePortalLogin/res/values-te-rIN/strings.xml b/packages/CaptivePortalLogin/res/values-te/strings.xml
similarity index 100%
rename from packages/CaptivePortalLogin/res/values-te-rIN/strings.xml
rename to packages/CaptivePortalLogin/res/values-te/strings.xml
diff --git a/packages/CaptivePortalLogin/res/values-ur-rPK/strings.xml b/packages/CaptivePortalLogin/res/values-ur/strings.xml
similarity index 100%
rename from packages/CaptivePortalLogin/res/values-ur-rPK/strings.xml
rename to packages/CaptivePortalLogin/res/values-ur/strings.xml
diff --git a/packages/CaptivePortalLogin/res/values-uz-rUZ/strings.xml b/packages/CaptivePortalLogin/res/values-uz/strings.xml
similarity index 100%
rename from packages/CaptivePortalLogin/res/values-uz-rUZ/strings.xml
rename to packages/CaptivePortalLogin/res/values-uz/strings.xml
diff --git a/packages/DefaultContainerService/res/values-az-rAZ/strings.xml b/packages/DefaultContainerService/res/values-az/strings.xml
similarity index 100%
rename from packages/DefaultContainerService/res/values-az-rAZ/strings.xml
rename to packages/DefaultContainerService/res/values-az/strings.xml
diff --git a/packages/DefaultContainerService/res/values-be-rBY/strings.xml b/packages/DefaultContainerService/res/values-be/strings.xml
similarity index 100%
rename from packages/DefaultContainerService/res/values-be-rBY/strings.xml
rename to packages/DefaultContainerService/res/values-be/strings.xml
diff --git a/packages/DefaultContainerService/res/values-bn-rBD/strings.xml b/packages/DefaultContainerService/res/values-bn/strings.xml
similarity index 100%
rename from packages/DefaultContainerService/res/values-bn-rBD/strings.xml
rename to packages/DefaultContainerService/res/values-bn/strings.xml
diff --git a/packages/DefaultContainerService/res/values-bs-rBA/strings.xml b/packages/DefaultContainerService/res/values-bs/strings.xml
similarity index 100%
rename from packages/DefaultContainerService/res/values-bs-rBA/strings.xml
rename to packages/DefaultContainerService/res/values-bs/strings.xml
diff --git a/packages/DefaultContainerService/res/values-et-rEE/strings.xml b/packages/DefaultContainerService/res/values-et/strings.xml
similarity index 100%
rename from packages/DefaultContainerService/res/values-et-rEE/strings.xml
rename to packages/DefaultContainerService/res/values-et/strings.xml
diff --git a/packages/DefaultContainerService/res/values-eu-rES/strings.xml b/packages/DefaultContainerService/res/values-eu/strings.xml
similarity index 100%
rename from packages/DefaultContainerService/res/values-eu-rES/strings.xml
rename to packages/DefaultContainerService/res/values-eu/strings.xml
diff --git a/packages/DefaultContainerService/res/values-gl-rES/strings.xml b/packages/DefaultContainerService/res/values-gl/strings.xml
similarity index 100%
rename from packages/DefaultContainerService/res/values-gl-rES/strings.xml
rename to packages/DefaultContainerService/res/values-gl/strings.xml
diff --git a/packages/DefaultContainerService/res/values-gu-rIN/strings.xml b/packages/DefaultContainerService/res/values-gu/strings.xml
similarity index 100%
rename from packages/DefaultContainerService/res/values-gu-rIN/strings.xml
rename to packages/DefaultContainerService/res/values-gu/strings.xml
diff --git a/packages/DefaultContainerService/res/values-hy-rAM/strings.xml b/packages/DefaultContainerService/res/values-hy/strings.xml
similarity index 100%
rename from packages/DefaultContainerService/res/values-hy-rAM/strings.xml
rename to packages/DefaultContainerService/res/values-hy/strings.xml
diff --git a/packages/DefaultContainerService/res/values-is-rIS/strings.xml b/packages/DefaultContainerService/res/values-is/strings.xml
similarity index 100%
rename from packages/DefaultContainerService/res/values-is-rIS/strings.xml
rename to packages/DefaultContainerService/res/values-is/strings.xml
diff --git a/packages/DefaultContainerService/res/values-ka-rGE/strings.xml b/packages/DefaultContainerService/res/values-ka/strings.xml
similarity index 100%
rename from packages/DefaultContainerService/res/values-ka-rGE/strings.xml
rename to packages/DefaultContainerService/res/values-ka/strings.xml
diff --git a/packages/DefaultContainerService/res/values-kk-rKZ/strings.xml b/packages/DefaultContainerService/res/values-kk-rKZ/strings.xml
deleted file mode 100644
index 216d715..0000000
--- a/packages/DefaultContainerService/res/values-kk-rKZ/strings.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
-**
-** Copyright 2008, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="service_name" msgid="4841491635055379553">"Package Access Helper"</string>
-</resources>
diff --git a/packages/DefaultContainerService/res/values-ka-rGE/strings.xml b/packages/DefaultContainerService/res/values-kk/strings.xml
similarity index 100%
copy from packages/DefaultContainerService/res/values-ka-rGE/strings.xml
copy to packages/DefaultContainerService/res/values-kk/strings.xml
diff --git a/packages/DefaultContainerService/res/values-km-rKH/strings.xml b/packages/DefaultContainerService/res/values-km/strings.xml
similarity index 100%
rename from packages/DefaultContainerService/res/values-km-rKH/strings.xml
rename to packages/DefaultContainerService/res/values-km/strings.xml
diff --git a/packages/DefaultContainerService/res/values-kn-rIN/strings.xml b/packages/DefaultContainerService/res/values-kn/strings.xml
similarity index 100%
rename from packages/DefaultContainerService/res/values-kn-rIN/strings.xml
rename to packages/DefaultContainerService/res/values-kn/strings.xml
diff --git a/packages/DefaultContainerService/res/values-ky-rKG/strings.xml b/packages/DefaultContainerService/res/values-ky/strings.xml
similarity index 100%
rename from packages/DefaultContainerService/res/values-ky-rKG/strings.xml
rename to packages/DefaultContainerService/res/values-ky/strings.xml
diff --git a/packages/DefaultContainerService/res/values-lo-rLA/strings.xml b/packages/DefaultContainerService/res/values-lo/strings.xml
similarity index 100%
rename from packages/DefaultContainerService/res/values-lo-rLA/strings.xml
rename to packages/DefaultContainerService/res/values-lo/strings.xml
diff --git a/packages/DefaultContainerService/res/values-mk-rMK/strings.xml b/packages/DefaultContainerService/res/values-mk/strings.xml
similarity index 100%
rename from packages/DefaultContainerService/res/values-mk-rMK/strings.xml
rename to packages/DefaultContainerService/res/values-mk/strings.xml
diff --git a/packages/DefaultContainerService/res/values-ml-rIN/strings.xml b/packages/DefaultContainerService/res/values-ml/strings.xml
similarity index 100%
rename from packages/DefaultContainerService/res/values-ml-rIN/strings.xml
rename to packages/DefaultContainerService/res/values-ml/strings.xml
diff --git a/packages/DefaultContainerService/res/values-mn-rMN/strings.xml b/packages/DefaultContainerService/res/values-mn/strings.xml
similarity index 100%
rename from packages/DefaultContainerService/res/values-mn-rMN/strings.xml
rename to packages/DefaultContainerService/res/values-mn/strings.xml
diff --git a/packages/DefaultContainerService/res/values-mr-rIN/strings.xml b/packages/DefaultContainerService/res/values-mr/strings.xml
similarity index 100%
rename from packages/DefaultContainerService/res/values-mr-rIN/strings.xml
rename to packages/DefaultContainerService/res/values-mr/strings.xml
diff --git a/packages/DefaultContainerService/res/values-ms-rMY/strings.xml b/packages/DefaultContainerService/res/values-ms/strings.xml
similarity index 100%
rename from packages/DefaultContainerService/res/values-ms-rMY/strings.xml
rename to packages/DefaultContainerService/res/values-ms/strings.xml
diff --git a/packages/DefaultContainerService/res/values-my-rMM/strings.xml b/packages/DefaultContainerService/res/values-my/strings.xml
similarity index 100%
rename from packages/DefaultContainerService/res/values-my-rMM/strings.xml
rename to packages/DefaultContainerService/res/values-my/strings.xml
diff --git a/packages/DefaultContainerService/res/values-ne-rNP/strings.xml b/packages/DefaultContainerService/res/values-ne/strings.xml
similarity index 100%
rename from packages/DefaultContainerService/res/values-ne-rNP/strings.xml
rename to packages/DefaultContainerService/res/values-ne/strings.xml
diff --git a/packages/DefaultContainerService/res/values-pa-rIN/strings.xml b/packages/DefaultContainerService/res/values-pa/strings.xml
similarity index 100%
rename from packages/DefaultContainerService/res/values-pa-rIN/strings.xml
rename to packages/DefaultContainerService/res/values-pa/strings.xml
diff --git a/packages/DefaultContainerService/res/values-si-rLK/strings.xml b/packages/DefaultContainerService/res/values-si/strings.xml
similarity index 100%
rename from packages/DefaultContainerService/res/values-si-rLK/strings.xml
rename to packages/DefaultContainerService/res/values-si/strings.xml
diff --git a/packages/DefaultContainerService/res/values-sq-rAL/strings.xml b/packages/DefaultContainerService/res/values-sq/strings.xml
similarity index 100%
rename from packages/DefaultContainerService/res/values-sq-rAL/strings.xml
rename to packages/DefaultContainerService/res/values-sq/strings.xml
diff --git a/packages/DefaultContainerService/res/values-ta-rIN/strings.xml b/packages/DefaultContainerService/res/values-ta/strings.xml
similarity index 100%
rename from packages/DefaultContainerService/res/values-ta-rIN/strings.xml
rename to packages/DefaultContainerService/res/values-ta/strings.xml
diff --git a/packages/DefaultContainerService/res/values-te-rIN/strings.xml b/packages/DefaultContainerService/res/values-te/strings.xml
similarity index 100%
rename from packages/DefaultContainerService/res/values-te-rIN/strings.xml
rename to packages/DefaultContainerService/res/values-te/strings.xml
diff --git a/packages/DefaultContainerService/res/values-ur-rPK/strings.xml b/packages/DefaultContainerService/res/values-ur/strings.xml
similarity index 100%
rename from packages/DefaultContainerService/res/values-ur-rPK/strings.xml
rename to packages/DefaultContainerService/res/values-ur/strings.xml
diff --git a/packages/DefaultContainerService/res/values-uz-rUZ/strings.xml b/packages/DefaultContainerService/res/values-uz/strings.xml
similarity index 100%
rename from packages/DefaultContainerService/res/values-uz-rUZ/strings.xml
rename to packages/DefaultContainerService/res/values-uz/strings.xml
diff --git a/packages/ExternalStorageProvider/res/values-az-rAZ/strings.xml b/packages/ExternalStorageProvider/res/values-az/strings.xml
similarity index 100%
rename from packages/ExternalStorageProvider/res/values-az-rAZ/strings.xml
rename to packages/ExternalStorageProvider/res/values-az/strings.xml
diff --git a/packages/ExternalStorageProvider/res/values-be-rBY/strings.xml b/packages/ExternalStorageProvider/res/values-be/strings.xml
similarity index 100%
rename from packages/ExternalStorageProvider/res/values-be-rBY/strings.xml
rename to packages/ExternalStorageProvider/res/values-be/strings.xml
diff --git a/packages/ExternalStorageProvider/res/values-bn-rBD/strings.xml b/packages/ExternalStorageProvider/res/values-bn/strings.xml
similarity index 100%
rename from packages/ExternalStorageProvider/res/values-bn-rBD/strings.xml
rename to packages/ExternalStorageProvider/res/values-bn/strings.xml
diff --git a/packages/ExternalStorageProvider/res/values-bs-rBA/strings.xml b/packages/ExternalStorageProvider/res/values-bs/strings.xml
similarity index 100%
rename from packages/ExternalStorageProvider/res/values-bs-rBA/strings.xml
rename to packages/ExternalStorageProvider/res/values-bs/strings.xml
diff --git a/packages/ExternalStorageProvider/res/values-et-rEE/strings.xml b/packages/ExternalStorageProvider/res/values-et/strings.xml
similarity index 100%
rename from packages/ExternalStorageProvider/res/values-et-rEE/strings.xml
rename to packages/ExternalStorageProvider/res/values-et/strings.xml
diff --git a/packages/ExternalStorageProvider/res/values-eu-rES/strings.xml b/packages/ExternalStorageProvider/res/values-eu/strings.xml
similarity index 100%
rename from packages/ExternalStorageProvider/res/values-eu-rES/strings.xml
rename to packages/ExternalStorageProvider/res/values-eu/strings.xml
diff --git a/packages/ExternalStorageProvider/res/values-gl-rES/strings.xml b/packages/ExternalStorageProvider/res/values-gl/strings.xml
similarity index 100%
rename from packages/ExternalStorageProvider/res/values-gl-rES/strings.xml
rename to packages/ExternalStorageProvider/res/values-gl/strings.xml
diff --git a/packages/ExternalStorageProvider/res/values-gu-rIN/strings.xml b/packages/ExternalStorageProvider/res/values-gu/strings.xml
similarity index 100%
rename from packages/ExternalStorageProvider/res/values-gu-rIN/strings.xml
rename to packages/ExternalStorageProvider/res/values-gu/strings.xml
diff --git a/packages/ExternalStorageProvider/res/values-hy-rAM/strings.xml b/packages/ExternalStorageProvider/res/values-hy/strings.xml
similarity index 100%
rename from packages/ExternalStorageProvider/res/values-hy-rAM/strings.xml
rename to packages/ExternalStorageProvider/res/values-hy/strings.xml
diff --git a/packages/ExternalStorageProvider/res/values-is-rIS/strings.xml b/packages/ExternalStorageProvider/res/values-is/strings.xml
similarity index 100%
rename from packages/ExternalStorageProvider/res/values-is-rIS/strings.xml
rename to packages/ExternalStorageProvider/res/values-is/strings.xml
diff --git a/packages/ExternalStorageProvider/res/values-ka-rGE/strings.xml b/packages/ExternalStorageProvider/res/values-ka/strings.xml
similarity index 100%
rename from packages/ExternalStorageProvider/res/values-ka-rGE/strings.xml
rename to packages/ExternalStorageProvider/res/values-ka/strings.xml
diff --git a/packages/ExternalStorageProvider/res/values-kk-rKZ/strings.xml b/packages/ExternalStorageProvider/res/values-kk/strings.xml
similarity index 100%
rename from packages/ExternalStorageProvider/res/values-kk-rKZ/strings.xml
rename to packages/ExternalStorageProvider/res/values-kk/strings.xml
diff --git a/packages/ExternalStorageProvider/res/values-km-rKH/strings.xml b/packages/ExternalStorageProvider/res/values-km/strings.xml
similarity index 100%
rename from packages/ExternalStorageProvider/res/values-km-rKH/strings.xml
rename to packages/ExternalStorageProvider/res/values-km/strings.xml
diff --git a/packages/ExternalStorageProvider/res/values-kn-rIN/strings.xml b/packages/ExternalStorageProvider/res/values-kn/strings.xml
similarity index 100%
rename from packages/ExternalStorageProvider/res/values-kn-rIN/strings.xml
rename to packages/ExternalStorageProvider/res/values-kn/strings.xml
diff --git a/packages/ExternalStorageProvider/res/values-ky-rKG/strings.xml b/packages/ExternalStorageProvider/res/values-ky/strings.xml
similarity index 100%
rename from packages/ExternalStorageProvider/res/values-ky-rKG/strings.xml
rename to packages/ExternalStorageProvider/res/values-ky/strings.xml
diff --git a/packages/ExternalStorageProvider/res/values-lo-rLA/strings.xml b/packages/ExternalStorageProvider/res/values-lo/strings.xml
similarity index 100%
rename from packages/ExternalStorageProvider/res/values-lo-rLA/strings.xml
rename to packages/ExternalStorageProvider/res/values-lo/strings.xml
diff --git a/packages/ExternalStorageProvider/res/values-mk-rMK/strings.xml b/packages/ExternalStorageProvider/res/values-mk/strings.xml
similarity index 100%
rename from packages/ExternalStorageProvider/res/values-mk-rMK/strings.xml
rename to packages/ExternalStorageProvider/res/values-mk/strings.xml
diff --git a/packages/ExternalStorageProvider/res/values-ml-rIN/strings.xml b/packages/ExternalStorageProvider/res/values-ml/strings.xml
similarity index 100%
rename from packages/ExternalStorageProvider/res/values-ml-rIN/strings.xml
rename to packages/ExternalStorageProvider/res/values-ml/strings.xml
diff --git a/packages/ExternalStorageProvider/res/values-mn-rMN/strings.xml b/packages/ExternalStorageProvider/res/values-mn/strings.xml
similarity index 100%
rename from packages/ExternalStorageProvider/res/values-mn-rMN/strings.xml
rename to packages/ExternalStorageProvider/res/values-mn/strings.xml
diff --git a/packages/ExternalStorageProvider/res/values-mr-rIN/strings.xml b/packages/ExternalStorageProvider/res/values-mr/strings.xml
similarity index 100%
rename from packages/ExternalStorageProvider/res/values-mr-rIN/strings.xml
rename to packages/ExternalStorageProvider/res/values-mr/strings.xml
diff --git a/packages/ExternalStorageProvider/res/values-ms-rMY/strings.xml b/packages/ExternalStorageProvider/res/values-ms/strings.xml
similarity index 100%
rename from packages/ExternalStorageProvider/res/values-ms-rMY/strings.xml
rename to packages/ExternalStorageProvider/res/values-ms/strings.xml
diff --git a/packages/ExternalStorageProvider/res/values-my-rMM/strings.xml b/packages/ExternalStorageProvider/res/values-my/strings.xml
similarity index 100%
rename from packages/ExternalStorageProvider/res/values-my-rMM/strings.xml
rename to packages/ExternalStorageProvider/res/values-my/strings.xml
diff --git a/packages/ExternalStorageProvider/res/values-ne-rNP/strings.xml b/packages/ExternalStorageProvider/res/values-ne/strings.xml
similarity index 100%
rename from packages/ExternalStorageProvider/res/values-ne-rNP/strings.xml
rename to packages/ExternalStorageProvider/res/values-ne/strings.xml
diff --git a/packages/ExternalStorageProvider/res/values-pa-rIN/strings.xml b/packages/ExternalStorageProvider/res/values-pa/strings.xml
similarity index 100%
rename from packages/ExternalStorageProvider/res/values-pa-rIN/strings.xml
rename to packages/ExternalStorageProvider/res/values-pa/strings.xml
diff --git a/packages/ExternalStorageProvider/res/values-si-rLK/strings.xml b/packages/ExternalStorageProvider/res/values-si/strings.xml
similarity index 100%
rename from packages/ExternalStorageProvider/res/values-si-rLK/strings.xml
rename to packages/ExternalStorageProvider/res/values-si/strings.xml
diff --git a/packages/ExternalStorageProvider/res/values-sq-rAL/strings.xml b/packages/ExternalStorageProvider/res/values-sq/strings.xml
similarity index 100%
rename from packages/ExternalStorageProvider/res/values-sq-rAL/strings.xml
rename to packages/ExternalStorageProvider/res/values-sq/strings.xml
diff --git a/packages/ExternalStorageProvider/res/values-ta-rIN/strings.xml b/packages/ExternalStorageProvider/res/values-ta/strings.xml
similarity index 100%
rename from packages/ExternalStorageProvider/res/values-ta-rIN/strings.xml
rename to packages/ExternalStorageProvider/res/values-ta/strings.xml
diff --git a/packages/ExternalStorageProvider/res/values-te-rIN/strings.xml b/packages/ExternalStorageProvider/res/values-te/strings.xml
similarity index 100%
rename from packages/ExternalStorageProvider/res/values-te-rIN/strings.xml
rename to packages/ExternalStorageProvider/res/values-te/strings.xml
diff --git a/packages/ExternalStorageProvider/res/values-ur-rPK/strings.xml b/packages/ExternalStorageProvider/res/values-ur/strings.xml
similarity index 100%
rename from packages/ExternalStorageProvider/res/values-ur-rPK/strings.xml
rename to packages/ExternalStorageProvider/res/values-ur/strings.xml
diff --git a/packages/ExternalStorageProvider/res/values-uz-rUZ/strings.xml b/packages/ExternalStorageProvider/res/values-uz/strings.xml
similarity index 100%
rename from packages/ExternalStorageProvider/res/values-uz-rUZ/strings.xml
rename to packages/ExternalStorageProvider/res/values-uz/strings.xml
diff --git a/packages/FusedLocation/res/values-az-rAZ/strings.xml b/packages/FusedLocation/res/values-az/strings.xml
similarity index 100%
rename from packages/FusedLocation/res/values-az-rAZ/strings.xml
rename to packages/FusedLocation/res/values-az/strings.xml
diff --git a/packages/FusedLocation/res/values-be-rBY/strings.xml b/packages/FusedLocation/res/values-be/strings.xml
similarity index 100%
rename from packages/FusedLocation/res/values-be-rBY/strings.xml
rename to packages/FusedLocation/res/values-be/strings.xml
diff --git a/packages/FusedLocation/res/values-bn-rBD/strings.xml b/packages/FusedLocation/res/values-bn/strings.xml
similarity index 100%
rename from packages/FusedLocation/res/values-bn-rBD/strings.xml
rename to packages/FusedLocation/res/values-bn/strings.xml
diff --git a/packages/FusedLocation/res/values-bs-rBA/strings.xml b/packages/FusedLocation/res/values-bs/strings.xml
similarity index 100%
rename from packages/FusedLocation/res/values-bs-rBA/strings.xml
rename to packages/FusedLocation/res/values-bs/strings.xml
diff --git a/packages/FusedLocation/res/values-et-rEE/strings.xml b/packages/FusedLocation/res/values-et/strings.xml
similarity index 100%
rename from packages/FusedLocation/res/values-et-rEE/strings.xml
rename to packages/FusedLocation/res/values-et/strings.xml
diff --git a/packages/FusedLocation/res/values-eu-rES/strings.xml b/packages/FusedLocation/res/values-eu/strings.xml
similarity index 100%
rename from packages/FusedLocation/res/values-eu-rES/strings.xml
rename to packages/FusedLocation/res/values-eu/strings.xml
diff --git a/packages/FusedLocation/res/values-gl-rES/strings.xml b/packages/FusedLocation/res/values-gl/strings.xml
similarity index 100%
rename from packages/FusedLocation/res/values-gl-rES/strings.xml
rename to packages/FusedLocation/res/values-gl/strings.xml
diff --git a/packages/FusedLocation/res/values-gu-rIN/strings.xml b/packages/FusedLocation/res/values-gu/strings.xml
similarity index 100%
rename from packages/FusedLocation/res/values-gu-rIN/strings.xml
rename to packages/FusedLocation/res/values-gu/strings.xml
diff --git a/packages/FusedLocation/res/values-hy-rAM/strings.xml b/packages/FusedLocation/res/values-hy/strings.xml
similarity index 100%
rename from packages/FusedLocation/res/values-hy-rAM/strings.xml
rename to packages/FusedLocation/res/values-hy/strings.xml
diff --git a/packages/FusedLocation/res/values-is-rIS/strings.xml b/packages/FusedLocation/res/values-is/strings.xml
similarity index 100%
rename from packages/FusedLocation/res/values-is-rIS/strings.xml
rename to packages/FusedLocation/res/values-is/strings.xml
diff --git a/packages/FusedLocation/res/values-ka-rGE/strings.xml b/packages/FusedLocation/res/values-ka/strings.xml
similarity index 100%
rename from packages/FusedLocation/res/values-ka-rGE/strings.xml
rename to packages/FusedLocation/res/values-ka/strings.xml
diff --git a/packages/FusedLocation/res/values-kk-rKZ/strings.xml b/packages/FusedLocation/res/values-kk/strings.xml
similarity index 100%
rename from packages/FusedLocation/res/values-kk-rKZ/strings.xml
rename to packages/FusedLocation/res/values-kk/strings.xml
diff --git a/packages/FusedLocation/res/values-km-rKH/strings.xml b/packages/FusedLocation/res/values-km/strings.xml
similarity index 100%
rename from packages/FusedLocation/res/values-km-rKH/strings.xml
rename to packages/FusedLocation/res/values-km/strings.xml
diff --git a/packages/FusedLocation/res/values-kn-rIN/strings.xml b/packages/FusedLocation/res/values-kn/strings.xml
similarity index 100%
rename from packages/FusedLocation/res/values-kn-rIN/strings.xml
rename to packages/FusedLocation/res/values-kn/strings.xml
diff --git a/packages/FusedLocation/res/values-ky-rKG/strings.xml b/packages/FusedLocation/res/values-ky/strings.xml
similarity index 100%
rename from packages/FusedLocation/res/values-ky-rKG/strings.xml
rename to packages/FusedLocation/res/values-ky/strings.xml
diff --git a/packages/FusedLocation/res/values-lo-rLA/strings.xml b/packages/FusedLocation/res/values-lo/strings.xml
similarity index 100%
rename from packages/FusedLocation/res/values-lo-rLA/strings.xml
rename to packages/FusedLocation/res/values-lo/strings.xml
diff --git a/packages/FusedLocation/res/values-mk-rMK/strings.xml b/packages/FusedLocation/res/values-mk/strings.xml
similarity index 100%
rename from packages/FusedLocation/res/values-mk-rMK/strings.xml
rename to packages/FusedLocation/res/values-mk/strings.xml
diff --git a/packages/FusedLocation/res/values-ml-rIN/strings.xml b/packages/FusedLocation/res/values-ml/strings.xml
similarity index 100%
rename from packages/FusedLocation/res/values-ml-rIN/strings.xml
rename to packages/FusedLocation/res/values-ml/strings.xml
diff --git a/packages/FusedLocation/res/values-mn-rMN/strings.xml b/packages/FusedLocation/res/values-mn/strings.xml
similarity index 100%
rename from packages/FusedLocation/res/values-mn-rMN/strings.xml
rename to packages/FusedLocation/res/values-mn/strings.xml
diff --git a/packages/FusedLocation/res/values-mr-rIN/strings.xml b/packages/FusedLocation/res/values-mr/strings.xml
similarity index 100%
rename from packages/FusedLocation/res/values-mr-rIN/strings.xml
rename to packages/FusedLocation/res/values-mr/strings.xml
diff --git a/packages/FusedLocation/res/values-ms-rMY/strings.xml b/packages/FusedLocation/res/values-ms/strings.xml
similarity index 100%
rename from packages/FusedLocation/res/values-ms-rMY/strings.xml
rename to packages/FusedLocation/res/values-ms/strings.xml
diff --git a/packages/FusedLocation/res/values-my-rMM/strings.xml b/packages/FusedLocation/res/values-my/strings.xml
similarity index 100%
rename from packages/FusedLocation/res/values-my-rMM/strings.xml
rename to packages/FusedLocation/res/values-my/strings.xml
diff --git a/packages/FusedLocation/res/values-ne-rNP/strings.xml b/packages/FusedLocation/res/values-ne/strings.xml
similarity index 100%
rename from packages/FusedLocation/res/values-ne-rNP/strings.xml
rename to packages/FusedLocation/res/values-ne/strings.xml
diff --git a/packages/FusedLocation/res/values-pa-rIN/strings.xml b/packages/FusedLocation/res/values-pa/strings.xml
similarity index 100%
rename from packages/FusedLocation/res/values-pa-rIN/strings.xml
rename to packages/FusedLocation/res/values-pa/strings.xml
diff --git a/packages/FusedLocation/res/values-si-rLK/strings.xml b/packages/FusedLocation/res/values-si/strings.xml
similarity index 100%
rename from packages/FusedLocation/res/values-si-rLK/strings.xml
rename to packages/FusedLocation/res/values-si/strings.xml
diff --git a/packages/FusedLocation/res/values-sq-rAL/strings.xml b/packages/FusedLocation/res/values-sq/strings.xml
similarity index 100%
rename from packages/FusedLocation/res/values-sq-rAL/strings.xml
rename to packages/FusedLocation/res/values-sq/strings.xml
diff --git a/packages/FusedLocation/res/values-ta-rIN/strings.xml b/packages/FusedLocation/res/values-ta/strings.xml
similarity index 100%
rename from packages/FusedLocation/res/values-ta-rIN/strings.xml
rename to packages/FusedLocation/res/values-ta/strings.xml
diff --git a/packages/FusedLocation/res/values-te-rIN/strings.xml b/packages/FusedLocation/res/values-te/strings.xml
similarity index 100%
rename from packages/FusedLocation/res/values-te-rIN/strings.xml
rename to packages/FusedLocation/res/values-te/strings.xml
diff --git a/packages/FusedLocation/res/values-ur-rPK/strings.xml b/packages/FusedLocation/res/values-ur/strings.xml
similarity index 100%
rename from packages/FusedLocation/res/values-ur-rPK/strings.xml
rename to packages/FusedLocation/res/values-ur/strings.xml
diff --git a/packages/FusedLocation/res/values-uz-rUZ/strings.xml b/packages/FusedLocation/res/values-uz/strings.xml
similarity index 100%
rename from packages/FusedLocation/res/values-uz-rUZ/strings.xml
rename to packages/FusedLocation/res/values-uz/strings.xml
diff --git a/packages/InputDevices/res/values-az-rAZ/strings.xml b/packages/InputDevices/res/values-az/strings.xml
similarity index 100%
rename from packages/InputDevices/res/values-az-rAZ/strings.xml
rename to packages/InputDevices/res/values-az/strings.xml
diff --git a/packages/InputDevices/res/values-be-rBY/strings.xml b/packages/InputDevices/res/values-be/strings.xml
similarity index 100%
rename from packages/InputDevices/res/values-be-rBY/strings.xml
rename to packages/InputDevices/res/values-be/strings.xml
diff --git a/packages/InputDevices/res/values-bn-rBD/strings.xml b/packages/InputDevices/res/values-bn/strings.xml
similarity index 100%
rename from packages/InputDevices/res/values-bn-rBD/strings.xml
rename to packages/InputDevices/res/values-bn/strings.xml
diff --git a/packages/InputDevices/res/values-bs-rBA/strings.xml b/packages/InputDevices/res/values-bs/strings.xml
similarity index 100%
rename from packages/InputDevices/res/values-bs-rBA/strings.xml
rename to packages/InputDevices/res/values-bs/strings.xml
diff --git a/packages/InputDevices/res/values-et-rEE/strings.xml b/packages/InputDevices/res/values-et/strings.xml
similarity index 100%
rename from packages/InputDevices/res/values-et-rEE/strings.xml
rename to packages/InputDevices/res/values-et/strings.xml
diff --git a/packages/InputDevices/res/values-eu-rES/strings.xml b/packages/InputDevices/res/values-eu/strings.xml
similarity index 100%
rename from packages/InputDevices/res/values-eu-rES/strings.xml
rename to packages/InputDevices/res/values-eu/strings.xml
diff --git a/packages/InputDevices/res/values-gl-rES/strings.xml b/packages/InputDevices/res/values-gl/strings.xml
similarity index 100%
rename from packages/InputDevices/res/values-gl-rES/strings.xml
rename to packages/InputDevices/res/values-gl/strings.xml
diff --git a/packages/InputDevices/res/values-gu-rIN/strings.xml b/packages/InputDevices/res/values-gu/strings.xml
similarity index 100%
rename from packages/InputDevices/res/values-gu-rIN/strings.xml
rename to packages/InputDevices/res/values-gu/strings.xml
diff --git a/packages/InputDevices/res/values-hy-rAM/strings.xml b/packages/InputDevices/res/values-hy/strings.xml
similarity index 100%
rename from packages/InputDevices/res/values-hy-rAM/strings.xml
rename to packages/InputDevices/res/values-hy/strings.xml
diff --git a/packages/InputDevices/res/values-is-rIS/strings.xml b/packages/InputDevices/res/values-is/strings.xml
similarity index 100%
rename from packages/InputDevices/res/values-is-rIS/strings.xml
rename to packages/InputDevices/res/values-is/strings.xml
diff --git a/packages/InputDevices/res/values-ka-rGE/strings.xml b/packages/InputDevices/res/values-ka/strings.xml
similarity index 100%
rename from packages/InputDevices/res/values-ka-rGE/strings.xml
rename to packages/InputDevices/res/values-ka/strings.xml
diff --git a/packages/InputDevices/res/values-kk-rKZ/strings.xml b/packages/InputDevices/res/values-kk/strings.xml
similarity index 100%
rename from packages/InputDevices/res/values-kk-rKZ/strings.xml
rename to packages/InputDevices/res/values-kk/strings.xml
diff --git a/packages/InputDevices/res/values-km-rKH/strings.xml b/packages/InputDevices/res/values-km/strings.xml
similarity index 100%
rename from packages/InputDevices/res/values-km-rKH/strings.xml
rename to packages/InputDevices/res/values-km/strings.xml
diff --git a/packages/InputDevices/res/values-kn-rIN/strings.xml b/packages/InputDevices/res/values-kn/strings.xml
similarity index 100%
rename from packages/InputDevices/res/values-kn-rIN/strings.xml
rename to packages/InputDevices/res/values-kn/strings.xml
diff --git a/packages/InputDevices/res/values-ky-rKG/strings.xml b/packages/InputDevices/res/values-ky/strings.xml
similarity index 100%
rename from packages/InputDevices/res/values-ky-rKG/strings.xml
rename to packages/InputDevices/res/values-ky/strings.xml
diff --git a/packages/InputDevices/res/values-lo-rLA/strings.xml b/packages/InputDevices/res/values-lo/strings.xml
similarity index 100%
rename from packages/InputDevices/res/values-lo-rLA/strings.xml
rename to packages/InputDevices/res/values-lo/strings.xml
diff --git a/packages/InputDevices/res/values-mk-rMK/strings.xml b/packages/InputDevices/res/values-mk/strings.xml
similarity index 100%
rename from packages/InputDevices/res/values-mk-rMK/strings.xml
rename to packages/InputDevices/res/values-mk/strings.xml
diff --git a/packages/InputDevices/res/values-ml-rIN/strings.xml b/packages/InputDevices/res/values-ml/strings.xml
similarity index 100%
rename from packages/InputDevices/res/values-ml-rIN/strings.xml
rename to packages/InputDevices/res/values-ml/strings.xml
diff --git a/packages/InputDevices/res/values-mn-rMN/strings.xml b/packages/InputDevices/res/values-mn/strings.xml
similarity index 100%
rename from packages/InputDevices/res/values-mn-rMN/strings.xml
rename to packages/InputDevices/res/values-mn/strings.xml
diff --git a/packages/InputDevices/res/values-mr-rIN/strings.xml b/packages/InputDevices/res/values-mr/strings.xml
similarity index 100%
rename from packages/InputDevices/res/values-mr-rIN/strings.xml
rename to packages/InputDevices/res/values-mr/strings.xml
diff --git a/packages/InputDevices/res/values-ms-rMY/strings.xml b/packages/InputDevices/res/values-ms/strings.xml
similarity index 100%
rename from packages/InputDevices/res/values-ms-rMY/strings.xml
rename to packages/InputDevices/res/values-ms/strings.xml
diff --git a/packages/InputDevices/res/values-my-rMM/strings.xml b/packages/InputDevices/res/values-my/strings.xml
similarity index 100%
rename from packages/InputDevices/res/values-my-rMM/strings.xml
rename to packages/InputDevices/res/values-my/strings.xml
diff --git a/packages/InputDevices/res/values-ne-rNP/strings.xml b/packages/InputDevices/res/values-ne/strings.xml
similarity index 100%
rename from packages/InputDevices/res/values-ne-rNP/strings.xml
rename to packages/InputDevices/res/values-ne/strings.xml
diff --git a/packages/InputDevices/res/values-pa-rIN/strings.xml b/packages/InputDevices/res/values-pa/strings.xml
similarity index 100%
rename from packages/InputDevices/res/values-pa-rIN/strings.xml
rename to packages/InputDevices/res/values-pa/strings.xml
diff --git a/packages/InputDevices/res/values-si-rLK/strings.xml b/packages/InputDevices/res/values-si/strings.xml
similarity index 100%
rename from packages/InputDevices/res/values-si-rLK/strings.xml
rename to packages/InputDevices/res/values-si/strings.xml
diff --git a/packages/InputDevices/res/values-sq-rAL/strings.xml b/packages/InputDevices/res/values-sq/strings.xml
similarity index 100%
rename from packages/InputDevices/res/values-sq-rAL/strings.xml
rename to packages/InputDevices/res/values-sq/strings.xml
diff --git a/packages/InputDevices/res/values-ta-rIN/strings.xml b/packages/InputDevices/res/values-ta/strings.xml
similarity index 100%
rename from packages/InputDevices/res/values-ta-rIN/strings.xml
rename to packages/InputDevices/res/values-ta/strings.xml
diff --git a/packages/InputDevices/res/values-te-rIN/strings.xml b/packages/InputDevices/res/values-te/strings.xml
similarity index 100%
rename from packages/InputDevices/res/values-te-rIN/strings.xml
rename to packages/InputDevices/res/values-te/strings.xml
diff --git a/packages/InputDevices/res/values-ur-rPK/strings.xml b/packages/InputDevices/res/values-ur/strings.xml
similarity index 100%
rename from packages/InputDevices/res/values-ur-rPK/strings.xml
rename to packages/InputDevices/res/values-ur/strings.xml
diff --git a/packages/InputDevices/res/values-uz-rUZ/strings.xml b/packages/InputDevices/res/values-uz/strings.xml
similarity index 100%
rename from packages/InputDevices/res/values-uz-rUZ/strings.xml
rename to packages/InputDevices/res/values-uz/strings.xml
diff --git a/packages/Keyguard/res/values-az-rAZ/strings.xml b/packages/Keyguard/res/values-az/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-az-rAZ/strings.xml
rename to packages/Keyguard/res/values-az/strings.xml
diff --git a/packages/Keyguard/res/values-be-rBY/strings.xml b/packages/Keyguard/res/values-be/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-be-rBY/strings.xml
rename to packages/Keyguard/res/values-be/strings.xml
diff --git a/packages/Keyguard/res/values-bn-rBD/strings.xml b/packages/Keyguard/res/values-bn/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-bn-rBD/strings.xml
rename to packages/Keyguard/res/values-bn/strings.xml
diff --git a/packages/Keyguard/res/values-bs-rBA/strings.xml b/packages/Keyguard/res/values-bs/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-bs-rBA/strings.xml
rename to packages/Keyguard/res/values-bs/strings.xml
diff --git a/packages/Keyguard/res/values-et-rEE/strings.xml b/packages/Keyguard/res/values-et/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-et-rEE/strings.xml
rename to packages/Keyguard/res/values-et/strings.xml
diff --git a/packages/Keyguard/res/values-eu-rES/strings.xml b/packages/Keyguard/res/values-eu/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-eu-rES/strings.xml
rename to packages/Keyguard/res/values-eu/strings.xml
diff --git a/packages/Keyguard/res/values-gl-rES/strings.xml b/packages/Keyguard/res/values-gl/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-gl-rES/strings.xml
rename to packages/Keyguard/res/values-gl/strings.xml
diff --git a/packages/Keyguard/res/values-gu-rIN/strings.xml b/packages/Keyguard/res/values-gu/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-gu-rIN/strings.xml
rename to packages/Keyguard/res/values-gu/strings.xml
diff --git a/packages/Keyguard/res/values-hy-rAM/strings.xml b/packages/Keyguard/res/values-hy/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-hy-rAM/strings.xml
rename to packages/Keyguard/res/values-hy/strings.xml
diff --git a/packages/Keyguard/res/values-is-rIS/strings.xml b/packages/Keyguard/res/values-is/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-is-rIS/strings.xml
rename to packages/Keyguard/res/values-is/strings.xml
diff --git a/packages/Keyguard/res/values-ka-rGE/strings.xml b/packages/Keyguard/res/values-ka/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-ka-rGE/strings.xml
rename to packages/Keyguard/res/values-ka/strings.xml
diff --git a/packages/Keyguard/res/values-kk-rKZ/strings.xml b/packages/Keyguard/res/values-kk/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-kk-rKZ/strings.xml
rename to packages/Keyguard/res/values-kk/strings.xml
diff --git a/packages/Keyguard/res/values-km-rKH/strings.xml b/packages/Keyguard/res/values-km/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-km-rKH/strings.xml
rename to packages/Keyguard/res/values-km/strings.xml
diff --git a/packages/Keyguard/res/values-kn-rIN/strings.xml b/packages/Keyguard/res/values-kn/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-kn-rIN/strings.xml
rename to packages/Keyguard/res/values-kn/strings.xml
diff --git a/packages/Keyguard/res/values-ky-rKG/strings.xml b/packages/Keyguard/res/values-ky/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-ky-rKG/strings.xml
rename to packages/Keyguard/res/values-ky/strings.xml
diff --git a/packages/Keyguard/res/values-lo-rLA/strings.xml b/packages/Keyguard/res/values-lo/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-lo-rLA/strings.xml
rename to packages/Keyguard/res/values-lo/strings.xml
diff --git a/packages/Keyguard/res/values-mk-rMK/strings.xml b/packages/Keyguard/res/values-mk/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-mk-rMK/strings.xml
rename to packages/Keyguard/res/values-mk/strings.xml
diff --git a/packages/Keyguard/res/values-ml-rIN/strings.xml b/packages/Keyguard/res/values-ml/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-ml-rIN/strings.xml
rename to packages/Keyguard/res/values-ml/strings.xml
diff --git a/packages/Keyguard/res/values-mn-rMN/strings.xml b/packages/Keyguard/res/values-mn/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-mn-rMN/strings.xml
rename to packages/Keyguard/res/values-mn/strings.xml
diff --git a/packages/Keyguard/res/values-mr-rIN/strings.xml b/packages/Keyguard/res/values-mr/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-mr-rIN/strings.xml
rename to packages/Keyguard/res/values-mr/strings.xml
diff --git a/packages/Keyguard/res/values-ms-rMY/strings.xml b/packages/Keyguard/res/values-ms/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-ms-rMY/strings.xml
rename to packages/Keyguard/res/values-ms/strings.xml
diff --git a/packages/Keyguard/res/values-my-rMM/dimens.xml b/packages/Keyguard/res/values-my/dimens.xml
similarity index 100%
rename from packages/Keyguard/res/values-my-rMM/dimens.xml
rename to packages/Keyguard/res/values-my/dimens.xml
diff --git a/packages/Keyguard/res/values-my-rMM/strings.xml b/packages/Keyguard/res/values-my/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-my-rMM/strings.xml
rename to packages/Keyguard/res/values-my/strings.xml
diff --git a/packages/Keyguard/res/values-ne-rNP/strings.xml b/packages/Keyguard/res/values-ne/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-ne-rNP/strings.xml
rename to packages/Keyguard/res/values-ne/strings.xml
diff --git a/packages/Keyguard/res/values-pa-rIN/strings.xml b/packages/Keyguard/res/values-pa/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-pa-rIN/strings.xml
rename to packages/Keyguard/res/values-pa/strings.xml
diff --git a/packages/Keyguard/res/values-si-rLK/strings.xml b/packages/Keyguard/res/values-si/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-si-rLK/strings.xml
rename to packages/Keyguard/res/values-si/strings.xml
diff --git a/packages/Keyguard/res/values-sq-rAL/strings.xml b/packages/Keyguard/res/values-sq/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-sq-rAL/strings.xml
rename to packages/Keyguard/res/values-sq/strings.xml
diff --git a/packages/Keyguard/res/values-ta-rIN/strings.xml b/packages/Keyguard/res/values-ta/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-ta-rIN/strings.xml
rename to packages/Keyguard/res/values-ta/strings.xml
diff --git a/packages/Keyguard/res/values-te-rIN/strings.xml b/packages/Keyguard/res/values-te/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-te-rIN/strings.xml
rename to packages/Keyguard/res/values-te/strings.xml
diff --git a/packages/Keyguard/res/values-ur-rPK/strings.xml b/packages/Keyguard/res/values-ur/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-ur-rPK/strings.xml
rename to packages/Keyguard/res/values-ur/strings.xml
diff --git a/packages/Keyguard/res/values-uz-rUZ/strings.xml b/packages/Keyguard/res/values-uz/strings.xml
similarity index 100%
rename from packages/Keyguard/res/values-uz-rUZ/strings.xml
rename to packages/Keyguard/res/values-uz/strings.xml
diff --git a/packages/MtpDocumentsProvider/res/values-az-rAZ/strings.xml b/packages/MtpDocumentsProvider/res/values-az/strings.xml
similarity index 100%
rename from packages/MtpDocumentsProvider/res/values-az-rAZ/strings.xml
rename to packages/MtpDocumentsProvider/res/values-az/strings.xml
diff --git a/packages/MtpDocumentsProvider/res/values-be-rBY/strings.xml b/packages/MtpDocumentsProvider/res/values-be/strings.xml
similarity index 100%
rename from packages/MtpDocumentsProvider/res/values-be-rBY/strings.xml
rename to packages/MtpDocumentsProvider/res/values-be/strings.xml
diff --git a/packages/MtpDocumentsProvider/res/values-bn-rBD/strings.xml b/packages/MtpDocumentsProvider/res/values-bn/strings.xml
similarity index 100%
rename from packages/MtpDocumentsProvider/res/values-bn-rBD/strings.xml
rename to packages/MtpDocumentsProvider/res/values-bn/strings.xml
diff --git a/packages/MtpDocumentsProvider/res/values-bs-rBA/strings.xml b/packages/MtpDocumentsProvider/res/values-bs/strings.xml
similarity index 100%
rename from packages/MtpDocumentsProvider/res/values-bs-rBA/strings.xml
rename to packages/MtpDocumentsProvider/res/values-bs/strings.xml
diff --git a/packages/MtpDocumentsProvider/res/values-et-rEE/strings.xml b/packages/MtpDocumentsProvider/res/values-et/strings.xml
similarity index 100%
rename from packages/MtpDocumentsProvider/res/values-et-rEE/strings.xml
rename to packages/MtpDocumentsProvider/res/values-et/strings.xml
diff --git a/packages/MtpDocumentsProvider/res/values-eu-rES/strings.xml b/packages/MtpDocumentsProvider/res/values-eu/strings.xml
similarity index 100%
rename from packages/MtpDocumentsProvider/res/values-eu-rES/strings.xml
rename to packages/MtpDocumentsProvider/res/values-eu/strings.xml
diff --git a/packages/MtpDocumentsProvider/res/values-gl-rES/strings.xml b/packages/MtpDocumentsProvider/res/values-gl/strings.xml
similarity index 100%
rename from packages/MtpDocumentsProvider/res/values-gl-rES/strings.xml
rename to packages/MtpDocumentsProvider/res/values-gl/strings.xml
diff --git a/packages/MtpDocumentsProvider/res/values-gu-rIN/strings.xml b/packages/MtpDocumentsProvider/res/values-gu/strings.xml
similarity index 100%
rename from packages/MtpDocumentsProvider/res/values-gu-rIN/strings.xml
rename to packages/MtpDocumentsProvider/res/values-gu/strings.xml
diff --git a/packages/MtpDocumentsProvider/res/values-hy-rAM/strings.xml b/packages/MtpDocumentsProvider/res/values-hy/strings.xml
similarity index 100%
rename from packages/MtpDocumentsProvider/res/values-hy-rAM/strings.xml
rename to packages/MtpDocumentsProvider/res/values-hy/strings.xml
diff --git a/packages/MtpDocumentsProvider/res/values-is-rIS/strings.xml b/packages/MtpDocumentsProvider/res/values-is/strings.xml
similarity index 100%
rename from packages/MtpDocumentsProvider/res/values-is-rIS/strings.xml
rename to packages/MtpDocumentsProvider/res/values-is/strings.xml
diff --git a/packages/MtpDocumentsProvider/res/values-ka-rGE/strings.xml b/packages/MtpDocumentsProvider/res/values-ka/strings.xml
similarity index 100%
rename from packages/MtpDocumentsProvider/res/values-ka-rGE/strings.xml
rename to packages/MtpDocumentsProvider/res/values-ka/strings.xml
diff --git a/packages/MtpDocumentsProvider/res/values-kk-rKZ/strings.xml b/packages/MtpDocumentsProvider/res/values-kk/strings.xml
similarity index 100%
rename from packages/MtpDocumentsProvider/res/values-kk-rKZ/strings.xml
rename to packages/MtpDocumentsProvider/res/values-kk/strings.xml
diff --git a/packages/MtpDocumentsProvider/res/values-km-rKH/strings.xml b/packages/MtpDocumentsProvider/res/values-km/strings.xml
similarity index 100%
rename from packages/MtpDocumentsProvider/res/values-km-rKH/strings.xml
rename to packages/MtpDocumentsProvider/res/values-km/strings.xml
diff --git a/packages/MtpDocumentsProvider/res/values-kn-rIN/strings.xml b/packages/MtpDocumentsProvider/res/values-kn/strings.xml
similarity index 100%
rename from packages/MtpDocumentsProvider/res/values-kn-rIN/strings.xml
rename to packages/MtpDocumentsProvider/res/values-kn/strings.xml
diff --git a/packages/MtpDocumentsProvider/res/values-ky-rKG/strings.xml b/packages/MtpDocumentsProvider/res/values-ky/strings.xml
similarity index 100%
rename from packages/MtpDocumentsProvider/res/values-ky-rKG/strings.xml
rename to packages/MtpDocumentsProvider/res/values-ky/strings.xml
diff --git a/packages/MtpDocumentsProvider/res/values-lo-rLA/strings.xml b/packages/MtpDocumentsProvider/res/values-lo/strings.xml
similarity index 100%
rename from packages/MtpDocumentsProvider/res/values-lo-rLA/strings.xml
rename to packages/MtpDocumentsProvider/res/values-lo/strings.xml
diff --git a/packages/MtpDocumentsProvider/res/values-mk-rMK/strings.xml b/packages/MtpDocumentsProvider/res/values-mk/strings.xml
similarity index 100%
rename from packages/MtpDocumentsProvider/res/values-mk-rMK/strings.xml
rename to packages/MtpDocumentsProvider/res/values-mk/strings.xml
diff --git a/packages/MtpDocumentsProvider/res/values-ml-rIN/strings.xml b/packages/MtpDocumentsProvider/res/values-ml/strings.xml
similarity index 100%
rename from packages/MtpDocumentsProvider/res/values-ml-rIN/strings.xml
rename to packages/MtpDocumentsProvider/res/values-ml/strings.xml
diff --git a/packages/MtpDocumentsProvider/res/values-mn-rMN/strings.xml b/packages/MtpDocumentsProvider/res/values-mn/strings.xml
similarity index 100%
rename from packages/MtpDocumentsProvider/res/values-mn-rMN/strings.xml
rename to packages/MtpDocumentsProvider/res/values-mn/strings.xml
diff --git a/packages/MtpDocumentsProvider/res/values-mr-rIN/strings.xml b/packages/MtpDocumentsProvider/res/values-mr/strings.xml
similarity index 100%
rename from packages/MtpDocumentsProvider/res/values-mr-rIN/strings.xml
rename to packages/MtpDocumentsProvider/res/values-mr/strings.xml
diff --git a/packages/MtpDocumentsProvider/res/values-ms-rMY/strings.xml b/packages/MtpDocumentsProvider/res/values-ms/strings.xml
similarity index 100%
rename from packages/MtpDocumentsProvider/res/values-ms-rMY/strings.xml
rename to packages/MtpDocumentsProvider/res/values-ms/strings.xml
diff --git a/packages/MtpDocumentsProvider/res/values-my-rMM/strings.xml b/packages/MtpDocumentsProvider/res/values-my/strings.xml
similarity index 100%
rename from packages/MtpDocumentsProvider/res/values-my-rMM/strings.xml
rename to packages/MtpDocumentsProvider/res/values-my/strings.xml
diff --git a/packages/MtpDocumentsProvider/res/values-ne-rNP/strings.xml b/packages/MtpDocumentsProvider/res/values-ne/strings.xml
similarity index 100%
rename from packages/MtpDocumentsProvider/res/values-ne-rNP/strings.xml
rename to packages/MtpDocumentsProvider/res/values-ne/strings.xml
diff --git a/packages/MtpDocumentsProvider/res/values-pa-rIN/strings.xml b/packages/MtpDocumentsProvider/res/values-pa/strings.xml
similarity index 100%
rename from packages/MtpDocumentsProvider/res/values-pa-rIN/strings.xml
rename to packages/MtpDocumentsProvider/res/values-pa/strings.xml
diff --git a/packages/MtpDocumentsProvider/res/values-si-rLK/strings.xml b/packages/MtpDocumentsProvider/res/values-si/strings.xml
similarity index 100%
rename from packages/MtpDocumentsProvider/res/values-si-rLK/strings.xml
rename to packages/MtpDocumentsProvider/res/values-si/strings.xml
diff --git a/packages/MtpDocumentsProvider/res/values-sq-rAL/strings.xml b/packages/MtpDocumentsProvider/res/values-sq/strings.xml
similarity index 100%
rename from packages/MtpDocumentsProvider/res/values-sq-rAL/strings.xml
rename to packages/MtpDocumentsProvider/res/values-sq/strings.xml
diff --git a/packages/MtpDocumentsProvider/res/values-ta-rIN/strings.xml b/packages/MtpDocumentsProvider/res/values-ta/strings.xml
similarity index 100%
rename from packages/MtpDocumentsProvider/res/values-ta-rIN/strings.xml
rename to packages/MtpDocumentsProvider/res/values-ta/strings.xml
diff --git a/packages/MtpDocumentsProvider/res/values-te-rIN/strings.xml b/packages/MtpDocumentsProvider/res/values-te/strings.xml
similarity index 100%
rename from packages/MtpDocumentsProvider/res/values-te-rIN/strings.xml
rename to packages/MtpDocumentsProvider/res/values-te/strings.xml
diff --git a/packages/MtpDocumentsProvider/res/values-ur-rPK/strings.xml b/packages/MtpDocumentsProvider/res/values-ur/strings.xml
similarity index 100%
rename from packages/MtpDocumentsProvider/res/values-ur-rPK/strings.xml
rename to packages/MtpDocumentsProvider/res/values-ur/strings.xml
diff --git a/packages/MtpDocumentsProvider/res/values-uz-rUZ/strings.xml b/packages/MtpDocumentsProvider/res/values-uz/strings.xml
similarity index 100%
rename from packages/MtpDocumentsProvider/res/values-uz-rUZ/strings.xml
rename to packages/MtpDocumentsProvider/res/values-uz/strings.xml
diff --git a/packages/PrintSpooler/res/values-az-rAZ/strings.xml b/packages/PrintSpooler/res/values-az/strings.xml
similarity index 100%
rename from packages/PrintSpooler/res/values-az-rAZ/strings.xml
rename to packages/PrintSpooler/res/values-az/strings.xml
diff --git a/packages/PrintSpooler/res/values-be-rBY/strings.xml b/packages/PrintSpooler/res/values-be/strings.xml
similarity index 100%
rename from packages/PrintSpooler/res/values-be-rBY/strings.xml
rename to packages/PrintSpooler/res/values-be/strings.xml
diff --git a/packages/PrintSpooler/res/values-bn-rBD/strings.xml b/packages/PrintSpooler/res/values-bn/strings.xml
similarity index 100%
rename from packages/PrintSpooler/res/values-bn-rBD/strings.xml
rename to packages/PrintSpooler/res/values-bn/strings.xml
diff --git a/packages/PrintSpooler/res/values-bs-rBA/strings.xml b/packages/PrintSpooler/res/values-bs/strings.xml
similarity index 100%
rename from packages/PrintSpooler/res/values-bs-rBA/strings.xml
rename to packages/PrintSpooler/res/values-bs/strings.xml
diff --git a/packages/PrintSpooler/res/values-et-rEE/strings.xml b/packages/PrintSpooler/res/values-et/strings.xml
similarity index 100%
rename from packages/PrintSpooler/res/values-et-rEE/strings.xml
rename to packages/PrintSpooler/res/values-et/strings.xml
diff --git a/packages/PrintSpooler/res/values-eu-rES/strings.xml b/packages/PrintSpooler/res/values-eu/strings.xml
similarity index 100%
rename from packages/PrintSpooler/res/values-eu-rES/strings.xml
rename to packages/PrintSpooler/res/values-eu/strings.xml
diff --git a/packages/PrintSpooler/res/values-gl-rES/strings.xml b/packages/PrintSpooler/res/values-gl/strings.xml
similarity index 100%
rename from packages/PrintSpooler/res/values-gl-rES/strings.xml
rename to packages/PrintSpooler/res/values-gl/strings.xml
diff --git a/packages/PrintSpooler/res/values-gu-rIN/strings.xml b/packages/PrintSpooler/res/values-gu/strings.xml
similarity index 100%
rename from packages/PrintSpooler/res/values-gu-rIN/strings.xml
rename to packages/PrintSpooler/res/values-gu/strings.xml
diff --git a/packages/PrintSpooler/res/values-hy-rAM/strings.xml b/packages/PrintSpooler/res/values-hy/strings.xml
similarity index 100%
rename from packages/PrintSpooler/res/values-hy-rAM/strings.xml
rename to packages/PrintSpooler/res/values-hy/strings.xml
diff --git a/packages/PrintSpooler/res/values-is-rIS/strings.xml b/packages/PrintSpooler/res/values-is/strings.xml
similarity index 100%
rename from packages/PrintSpooler/res/values-is-rIS/strings.xml
rename to packages/PrintSpooler/res/values-is/strings.xml
diff --git a/packages/PrintSpooler/res/values-ka-rGE/strings.xml b/packages/PrintSpooler/res/values-ka/strings.xml
similarity index 100%
rename from packages/PrintSpooler/res/values-ka-rGE/strings.xml
rename to packages/PrintSpooler/res/values-ka/strings.xml
diff --git a/packages/PrintSpooler/res/values-kk-rKZ/strings.xml b/packages/PrintSpooler/res/values-kk/strings.xml
similarity index 100%
rename from packages/PrintSpooler/res/values-kk-rKZ/strings.xml
rename to packages/PrintSpooler/res/values-kk/strings.xml
diff --git a/packages/PrintSpooler/res/values-km-rKH/strings.xml b/packages/PrintSpooler/res/values-km/strings.xml
similarity index 100%
rename from packages/PrintSpooler/res/values-km-rKH/strings.xml
rename to packages/PrintSpooler/res/values-km/strings.xml
diff --git a/packages/PrintSpooler/res/values-kn-rIN/strings.xml b/packages/PrintSpooler/res/values-kn/strings.xml
similarity index 100%
rename from packages/PrintSpooler/res/values-kn-rIN/strings.xml
rename to packages/PrintSpooler/res/values-kn/strings.xml
diff --git a/packages/PrintSpooler/res/values-ky-rKG/strings.xml b/packages/PrintSpooler/res/values-ky/strings.xml
similarity index 100%
rename from packages/PrintSpooler/res/values-ky-rKG/strings.xml
rename to packages/PrintSpooler/res/values-ky/strings.xml
diff --git a/packages/PrintSpooler/res/values-lo-rLA/strings.xml b/packages/PrintSpooler/res/values-lo/strings.xml
similarity index 100%
rename from packages/PrintSpooler/res/values-lo-rLA/strings.xml
rename to packages/PrintSpooler/res/values-lo/strings.xml
diff --git a/packages/PrintSpooler/res/values-mk-rMK/strings.xml b/packages/PrintSpooler/res/values-mk/strings.xml
similarity index 100%
rename from packages/PrintSpooler/res/values-mk-rMK/strings.xml
rename to packages/PrintSpooler/res/values-mk/strings.xml
diff --git a/packages/PrintSpooler/res/values-ml-rIN/strings.xml b/packages/PrintSpooler/res/values-ml/strings.xml
similarity index 100%
rename from packages/PrintSpooler/res/values-ml-rIN/strings.xml
rename to packages/PrintSpooler/res/values-ml/strings.xml
diff --git a/packages/PrintSpooler/res/values-mn-rMN/strings.xml b/packages/PrintSpooler/res/values-mn/strings.xml
similarity index 100%
rename from packages/PrintSpooler/res/values-mn-rMN/strings.xml
rename to packages/PrintSpooler/res/values-mn/strings.xml
diff --git a/packages/PrintSpooler/res/values-mr-rIN/strings.xml b/packages/PrintSpooler/res/values-mr/strings.xml
similarity index 100%
rename from packages/PrintSpooler/res/values-mr-rIN/strings.xml
rename to packages/PrintSpooler/res/values-mr/strings.xml
diff --git a/packages/PrintSpooler/res/values-ms-rMY/strings.xml b/packages/PrintSpooler/res/values-ms/strings.xml
similarity index 100%
rename from packages/PrintSpooler/res/values-ms-rMY/strings.xml
rename to packages/PrintSpooler/res/values-ms/strings.xml
diff --git a/packages/PrintSpooler/res/values-my-rMM/strings.xml b/packages/PrintSpooler/res/values-my/strings.xml
similarity index 100%
rename from packages/PrintSpooler/res/values-my-rMM/strings.xml
rename to packages/PrintSpooler/res/values-my/strings.xml
diff --git a/packages/PrintSpooler/res/values-ne-rNP/strings.xml b/packages/PrintSpooler/res/values-ne/strings.xml
similarity index 100%
rename from packages/PrintSpooler/res/values-ne-rNP/strings.xml
rename to packages/PrintSpooler/res/values-ne/strings.xml
diff --git a/packages/PrintSpooler/res/values-pa-rIN/strings.xml b/packages/PrintSpooler/res/values-pa/strings.xml
similarity index 100%
rename from packages/PrintSpooler/res/values-pa-rIN/strings.xml
rename to packages/PrintSpooler/res/values-pa/strings.xml
diff --git a/packages/PrintSpooler/res/values-si-rLK/strings.xml b/packages/PrintSpooler/res/values-si/strings.xml
similarity index 100%
rename from packages/PrintSpooler/res/values-si-rLK/strings.xml
rename to packages/PrintSpooler/res/values-si/strings.xml
diff --git a/packages/PrintSpooler/res/values-sq-rAL/strings.xml b/packages/PrintSpooler/res/values-sq/strings.xml
similarity index 100%
rename from packages/PrintSpooler/res/values-sq-rAL/strings.xml
rename to packages/PrintSpooler/res/values-sq/strings.xml
diff --git a/packages/PrintSpooler/res/values-ta-rIN/strings.xml b/packages/PrintSpooler/res/values-ta/strings.xml
similarity index 100%
rename from packages/PrintSpooler/res/values-ta-rIN/strings.xml
rename to packages/PrintSpooler/res/values-ta/strings.xml
diff --git a/packages/PrintSpooler/res/values-te-rIN/strings.xml b/packages/PrintSpooler/res/values-te/strings.xml
similarity index 100%
rename from packages/PrintSpooler/res/values-te-rIN/strings.xml
rename to packages/PrintSpooler/res/values-te/strings.xml
diff --git a/packages/PrintSpooler/res/values-ur-rPK/strings.xml b/packages/PrintSpooler/res/values-ur/strings.xml
similarity index 100%
rename from packages/PrintSpooler/res/values-ur-rPK/strings.xml
rename to packages/PrintSpooler/res/values-ur/strings.xml
diff --git a/packages/PrintSpooler/res/values-uz-rUZ/strings.xml b/packages/PrintSpooler/res/values-uz/strings.xml
similarity index 100%
rename from packages/PrintSpooler/res/values-uz-rUZ/strings.xml
rename to packages/PrintSpooler/res/values-uz/strings.xml
diff --git a/packages/SettingsLib/res/values-az-rAZ/arrays.xml b/packages/SettingsLib/res/values-az/arrays.xml
similarity index 100%
rename from packages/SettingsLib/res/values-az-rAZ/arrays.xml
rename to packages/SettingsLib/res/values-az/arrays.xml
diff --git a/packages/SettingsLib/res/values-az-rAZ/strings.xml b/packages/SettingsLib/res/values-az/strings.xml
similarity index 100%
rename from packages/SettingsLib/res/values-az-rAZ/strings.xml
rename to packages/SettingsLib/res/values-az/strings.xml
diff --git a/packages/SettingsLib/res/values-be-rBY/arrays.xml b/packages/SettingsLib/res/values-be/arrays.xml
similarity index 100%
rename from packages/SettingsLib/res/values-be-rBY/arrays.xml
rename to packages/SettingsLib/res/values-be/arrays.xml
diff --git a/packages/SettingsLib/res/values-be-rBY/strings.xml b/packages/SettingsLib/res/values-be/strings.xml
similarity index 100%
rename from packages/SettingsLib/res/values-be-rBY/strings.xml
rename to packages/SettingsLib/res/values-be/strings.xml
diff --git a/packages/SettingsLib/res/values-bn-rBD/arrays.xml b/packages/SettingsLib/res/values-bn/arrays.xml
similarity index 100%
rename from packages/SettingsLib/res/values-bn-rBD/arrays.xml
rename to packages/SettingsLib/res/values-bn/arrays.xml
diff --git a/packages/SettingsLib/res/values-bn-rBD/strings.xml b/packages/SettingsLib/res/values-bn/strings.xml
similarity index 100%
rename from packages/SettingsLib/res/values-bn-rBD/strings.xml
rename to packages/SettingsLib/res/values-bn/strings.xml
diff --git a/packages/SettingsLib/res/values-bs-rBA/arrays.xml b/packages/SettingsLib/res/values-bs/arrays.xml
similarity index 100%
rename from packages/SettingsLib/res/values-bs-rBA/arrays.xml
rename to packages/SettingsLib/res/values-bs/arrays.xml
diff --git a/packages/SettingsLib/res/values-bs-rBA/strings.xml b/packages/SettingsLib/res/values-bs/strings.xml
similarity index 100%
rename from packages/SettingsLib/res/values-bs-rBA/strings.xml
rename to packages/SettingsLib/res/values-bs/strings.xml
diff --git a/packages/SettingsLib/res/values-et-rEE/arrays.xml b/packages/SettingsLib/res/values-et/arrays.xml
similarity index 100%
rename from packages/SettingsLib/res/values-et-rEE/arrays.xml
rename to packages/SettingsLib/res/values-et/arrays.xml
diff --git a/packages/SettingsLib/res/values-et-rEE/strings.xml b/packages/SettingsLib/res/values-et/strings.xml
similarity index 100%
rename from packages/SettingsLib/res/values-et-rEE/strings.xml
rename to packages/SettingsLib/res/values-et/strings.xml
diff --git a/packages/SettingsLib/res/values-eu-rES/arrays.xml b/packages/SettingsLib/res/values-eu/arrays.xml
similarity index 100%
rename from packages/SettingsLib/res/values-eu-rES/arrays.xml
rename to packages/SettingsLib/res/values-eu/arrays.xml
diff --git a/packages/SettingsLib/res/values-eu-rES/strings.xml b/packages/SettingsLib/res/values-eu/strings.xml
similarity index 100%
rename from packages/SettingsLib/res/values-eu-rES/strings.xml
rename to packages/SettingsLib/res/values-eu/strings.xml
diff --git a/packages/SettingsLib/res/values-gl-rES/arrays.xml b/packages/SettingsLib/res/values-gl/arrays.xml
similarity index 100%
rename from packages/SettingsLib/res/values-gl-rES/arrays.xml
rename to packages/SettingsLib/res/values-gl/arrays.xml
diff --git a/packages/SettingsLib/res/values-gl-rES/strings.xml b/packages/SettingsLib/res/values-gl/strings.xml
similarity index 100%
rename from packages/SettingsLib/res/values-gl-rES/strings.xml
rename to packages/SettingsLib/res/values-gl/strings.xml
diff --git a/packages/SettingsLib/res/values-gu-rIN/arrays.xml b/packages/SettingsLib/res/values-gu/arrays.xml
similarity index 100%
rename from packages/SettingsLib/res/values-gu-rIN/arrays.xml
rename to packages/SettingsLib/res/values-gu/arrays.xml
diff --git a/packages/SettingsLib/res/values-gu-rIN/strings.xml b/packages/SettingsLib/res/values-gu/strings.xml
similarity index 100%
rename from packages/SettingsLib/res/values-gu-rIN/strings.xml
rename to packages/SettingsLib/res/values-gu/strings.xml
diff --git a/packages/SettingsLib/res/values-hy-rAM/arrays.xml b/packages/SettingsLib/res/values-hy/arrays.xml
similarity index 100%
rename from packages/SettingsLib/res/values-hy-rAM/arrays.xml
rename to packages/SettingsLib/res/values-hy/arrays.xml
diff --git a/packages/SettingsLib/res/values-hy-rAM/strings.xml b/packages/SettingsLib/res/values-hy/strings.xml
similarity index 100%
rename from packages/SettingsLib/res/values-hy-rAM/strings.xml
rename to packages/SettingsLib/res/values-hy/strings.xml
diff --git a/packages/SettingsLib/res/values-is-rIS/arrays.xml b/packages/SettingsLib/res/values-is/arrays.xml
similarity index 100%
rename from packages/SettingsLib/res/values-is-rIS/arrays.xml
rename to packages/SettingsLib/res/values-is/arrays.xml
diff --git a/packages/SettingsLib/res/values-is-rIS/strings.xml b/packages/SettingsLib/res/values-is/strings.xml
similarity index 100%
rename from packages/SettingsLib/res/values-is-rIS/strings.xml
rename to packages/SettingsLib/res/values-is/strings.xml
diff --git a/packages/SettingsLib/res/values-ka-rGE/arrays.xml b/packages/SettingsLib/res/values-ka/arrays.xml
similarity index 100%
rename from packages/SettingsLib/res/values-ka-rGE/arrays.xml
rename to packages/SettingsLib/res/values-ka/arrays.xml
diff --git a/packages/SettingsLib/res/values-ka-rGE/strings.xml b/packages/SettingsLib/res/values-ka/strings.xml
similarity index 100%
rename from packages/SettingsLib/res/values-ka-rGE/strings.xml
rename to packages/SettingsLib/res/values-ka/strings.xml
diff --git a/packages/SettingsLib/res/values-kk-rKZ/arrays.xml b/packages/SettingsLib/res/values-kk/arrays.xml
similarity index 100%
rename from packages/SettingsLib/res/values-kk-rKZ/arrays.xml
rename to packages/SettingsLib/res/values-kk/arrays.xml
diff --git a/packages/SettingsLib/res/values-kk-rKZ/strings.xml b/packages/SettingsLib/res/values-kk/strings.xml
similarity index 100%
rename from packages/SettingsLib/res/values-kk-rKZ/strings.xml
rename to packages/SettingsLib/res/values-kk/strings.xml
diff --git a/packages/SettingsLib/res/values-km-rKH/arrays.xml b/packages/SettingsLib/res/values-km/arrays.xml
similarity index 100%
rename from packages/SettingsLib/res/values-km-rKH/arrays.xml
rename to packages/SettingsLib/res/values-km/arrays.xml
diff --git a/packages/SettingsLib/res/values-km-rKH/strings.xml b/packages/SettingsLib/res/values-km/strings.xml
similarity index 100%
rename from packages/SettingsLib/res/values-km-rKH/strings.xml
rename to packages/SettingsLib/res/values-km/strings.xml
diff --git a/packages/SettingsLib/res/values-kn-rIN/arrays.xml b/packages/SettingsLib/res/values-kn/arrays.xml
similarity index 100%
rename from packages/SettingsLib/res/values-kn-rIN/arrays.xml
rename to packages/SettingsLib/res/values-kn/arrays.xml
diff --git a/packages/SettingsLib/res/values-kn-rIN/strings.xml b/packages/SettingsLib/res/values-kn/strings.xml
similarity index 100%
rename from packages/SettingsLib/res/values-kn-rIN/strings.xml
rename to packages/SettingsLib/res/values-kn/strings.xml
diff --git a/packages/SettingsLib/res/values-ky-rKG/arrays.xml b/packages/SettingsLib/res/values-ky/arrays.xml
similarity index 100%
rename from packages/SettingsLib/res/values-ky-rKG/arrays.xml
rename to packages/SettingsLib/res/values-ky/arrays.xml
diff --git a/packages/SettingsLib/res/values-ky-rKG/strings.xml b/packages/SettingsLib/res/values-ky/strings.xml
similarity index 100%
rename from packages/SettingsLib/res/values-ky-rKG/strings.xml
rename to packages/SettingsLib/res/values-ky/strings.xml
diff --git a/packages/SettingsLib/res/values-lo-rLA/arrays.xml b/packages/SettingsLib/res/values-lo/arrays.xml
similarity index 100%
rename from packages/SettingsLib/res/values-lo-rLA/arrays.xml
rename to packages/SettingsLib/res/values-lo/arrays.xml
diff --git a/packages/SettingsLib/res/values-lo-rLA/strings.xml b/packages/SettingsLib/res/values-lo/strings.xml
similarity index 100%
rename from packages/SettingsLib/res/values-lo-rLA/strings.xml
rename to packages/SettingsLib/res/values-lo/strings.xml
diff --git a/packages/SettingsLib/res/values-mk-rMK/arrays.xml b/packages/SettingsLib/res/values-mk/arrays.xml
similarity index 100%
rename from packages/SettingsLib/res/values-mk-rMK/arrays.xml
rename to packages/SettingsLib/res/values-mk/arrays.xml
diff --git a/packages/SettingsLib/res/values-mk-rMK/strings.xml b/packages/SettingsLib/res/values-mk/strings.xml
similarity index 100%
rename from packages/SettingsLib/res/values-mk-rMK/strings.xml
rename to packages/SettingsLib/res/values-mk/strings.xml
diff --git a/packages/SettingsLib/res/values-ml-rIN/arrays.xml b/packages/SettingsLib/res/values-ml/arrays.xml
similarity index 100%
rename from packages/SettingsLib/res/values-ml-rIN/arrays.xml
rename to packages/SettingsLib/res/values-ml/arrays.xml
diff --git a/packages/SettingsLib/res/values-ml-rIN/strings.xml b/packages/SettingsLib/res/values-ml/strings.xml
similarity index 100%
rename from packages/SettingsLib/res/values-ml-rIN/strings.xml
rename to packages/SettingsLib/res/values-ml/strings.xml
diff --git a/packages/SettingsLib/res/values-mn-rMN/arrays.xml b/packages/SettingsLib/res/values-mn/arrays.xml
similarity index 100%
rename from packages/SettingsLib/res/values-mn-rMN/arrays.xml
rename to packages/SettingsLib/res/values-mn/arrays.xml
diff --git a/packages/SettingsLib/res/values-mn-rMN/strings.xml b/packages/SettingsLib/res/values-mn/strings.xml
similarity index 100%
rename from packages/SettingsLib/res/values-mn-rMN/strings.xml
rename to packages/SettingsLib/res/values-mn/strings.xml
diff --git a/packages/SettingsLib/res/values-mr-rIN/arrays.xml b/packages/SettingsLib/res/values-mr/arrays.xml
similarity index 100%
rename from packages/SettingsLib/res/values-mr-rIN/arrays.xml
rename to packages/SettingsLib/res/values-mr/arrays.xml
diff --git a/packages/SettingsLib/res/values-mr-rIN/strings.xml b/packages/SettingsLib/res/values-mr/strings.xml
similarity index 100%
rename from packages/SettingsLib/res/values-mr-rIN/strings.xml
rename to packages/SettingsLib/res/values-mr/strings.xml
diff --git a/packages/SettingsLib/res/values-ms-rMY/arrays.xml b/packages/SettingsLib/res/values-ms/arrays.xml
similarity index 100%
rename from packages/SettingsLib/res/values-ms-rMY/arrays.xml
rename to packages/SettingsLib/res/values-ms/arrays.xml
diff --git a/packages/SettingsLib/res/values-ms-rMY/strings.xml b/packages/SettingsLib/res/values-ms/strings.xml
similarity index 100%
rename from packages/SettingsLib/res/values-ms-rMY/strings.xml
rename to packages/SettingsLib/res/values-ms/strings.xml
diff --git a/packages/SettingsLib/res/values-my-rMM/arrays.xml b/packages/SettingsLib/res/values-my/arrays.xml
similarity index 100%
rename from packages/SettingsLib/res/values-my-rMM/arrays.xml
rename to packages/SettingsLib/res/values-my/arrays.xml
diff --git a/packages/SettingsLib/res/values-my-rMM/strings.xml b/packages/SettingsLib/res/values-my/strings.xml
similarity index 100%
rename from packages/SettingsLib/res/values-my-rMM/strings.xml
rename to packages/SettingsLib/res/values-my/strings.xml
diff --git a/packages/SettingsLib/res/values-ne-rNP/arrays.xml b/packages/SettingsLib/res/values-ne/arrays.xml
similarity index 100%
rename from packages/SettingsLib/res/values-ne-rNP/arrays.xml
rename to packages/SettingsLib/res/values-ne/arrays.xml
diff --git a/packages/SettingsLib/res/values-ne-rNP/strings.xml b/packages/SettingsLib/res/values-ne/strings.xml
similarity index 100%
rename from packages/SettingsLib/res/values-ne-rNP/strings.xml
rename to packages/SettingsLib/res/values-ne/strings.xml
diff --git a/packages/SettingsLib/res/values-pa-rIN/arrays.xml b/packages/SettingsLib/res/values-pa/arrays.xml
similarity index 100%
rename from packages/SettingsLib/res/values-pa-rIN/arrays.xml
rename to packages/SettingsLib/res/values-pa/arrays.xml
diff --git a/packages/SettingsLib/res/values-pa-rIN/strings.xml b/packages/SettingsLib/res/values-pa/strings.xml
similarity index 100%
rename from packages/SettingsLib/res/values-pa-rIN/strings.xml
rename to packages/SettingsLib/res/values-pa/strings.xml
diff --git a/packages/SettingsLib/res/values-si-rLK/arrays.xml b/packages/SettingsLib/res/values-si/arrays.xml
similarity index 100%
rename from packages/SettingsLib/res/values-si-rLK/arrays.xml
rename to packages/SettingsLib/res/values-si/arrays.xml
diff --git a/packages/SettingsLib/res/values-si-rLK/strings.xml b/packages/SettingsLib/res/values-si/strings.xml
similarity index 100%
rename from packages/SettingsLib/res/values-si-rLK/strings.xml
rename to packages/SettingsLib/res/values-si/strings.xml
diff --git a/packages/SettingsLib/res/values-sq-rAL/arrays.xml b/packages/SettingsLib/res/values-sq/arrays.xml
similarity index 100%
rename from packages/SettingsLib/res/values-sq-rAL/arrays.xml
rename to packages/SettingsLib/res/values-sq/arrays.xml
diff --git a/packages/SettingsLib/res/values-sq-rAL/strings.xml b/packages/SettingsLib/res/values-sq/strings.xml
similarity index 100%
rename from packages/SettingsLib/res/values-sq-rAL/strings.xml
rename to packages/SettingsLib/res/values-sq/strings.xml
diff --git a/packages/SettingsLib/res/values-ta-rIN/arrays.xml b/packages/SettingsLib/res/values-ta/arrays.xml
similarity index 100%
rename from packages/SettingsLib/res/values-ta-rIN/arrays.xml
rename to packages/SettingsLib/res/values-ta/arrays.xml
diff --git a/packages/SettingsLib/res/values-ta-rIN/strings.xml b/packages/SettingsLib/res/values-ta/strings.xml
similarity index 100%
rename from packages/SettingsLib/res/values-ta-rIN/strings.xml
rename to packages/SettingsLib/res/values-ta/strings.xml
diff --git a/packages/SettingsLib/res/values-te-rIN/arrays.xml b/packages/SettingsLib/res/values-te/arrays.xml
similarity index 100%
rename from packages/SettingsLib/res/values-te-rIN/arrays.xml
rename to packages/SettingsLib/res/values-te/arrays.xml
diff --git a/packages/SettingsLib/res/values-te-rIN/strings.xml b/packages/SettingsLib/res/values-te/strings.xml
similarity index 100%
rename from packages/SettingsLib/res/values-te-rIN/strings.xml
rename to packages/SettingsLib/res/values-te/strings.xml
diff --git a/packages/SettingsLib/res/values-ur-rPK/arrays.xml b/packages/SettingsLib/res/values-ur/arrays.xml
similarity index 100%
rename from packages/SettingsLib/res/values-ur-rPK/arrays.xml
rename to packages/SettingsLib/res/values-ur/arrays.xml
diff --git a/packages/SettingsLib/res/values-ur-rPK/strings.xml b/packages/SettingsLib/res/values-ur/strings.xml
similarity index 100%
rename from packages/SettingsLib/res/values-ur-rPK/strings.xml
rename to packages/SettingsLib/res/values-ur/strings.xml
diff --git a/packages/SettingsLib/res/values-uz-rUZ/arrays.xml b/packages/SettingsLib/res/values-uz/arrays.xml
similarity index 100%
rename from packages/SettingsLib/res/values-uz-rUZ/arrays.xml
rename to packages/SettingsLib/res/values-uz/arrays.xml
diff --git a/packages/SettingsLib/res/values-uz-rUZ/strings.xml b/packages/SettingsLib/res/values-uz/strings.xml
similarity index 100%
rename from packages/SettingsLib/res/values-uz-rUZ/strings.xml
rename to packages/SettingsLib/res/values-uz/strings.xml
diff --git a/packages/SettingsProvider/res/values-az-rAZ/defaults.xml b/packages/SettingsProvider/res/values-az/defaults.xml
similarity index 100%
rename from packages/SettingsProvider/res/values-az-rAZ/defaults.xml
rename to packages/SettingsProvider/res/values-az/defaults.xml
diff --git a/packages/SettingsProvider/res/values-az-rAZ/strings.xml b/packages/SettingsProvider/res/values-az/strings.xml
similarity index 100%
rename from packages/SettingsProvider/res/values-az-rAZ/strings.xml
rename to packages/SettingsProvider/res/values-az/strings.xml
diff --git a/packages/SettingsProvider/res/values-be-rBY/defaults.xml b/packages/SettingsProvider/res/values-be/defaults.xml
similarity index 100%
rename from packages/SettingsProvider/res/values-be-rBY/defaults.xml
rename to packages/SettingsProvider/res/values-be/defaults.xml
diff --git a/packages/SettingsProvider/res/values-be-rBY/strings.xml b/packages/SettingsProvider/res/values-be/strings.xml
similarity index 100%
rename from packages/SettingsProvider/res/values-be-rBY/strings.xml
rename to packages/SettingsProvider/res/values-be/strings.xml
diff --git a/packages/SettingsProvider/res/values-bn-rBD/defaults.xml b/packages/SettingsProvider/res/values-bn-rBD/defaults.xml
deleted file mode 100644
index 4a87a12..0000000
--- a/packages/SettingsProvider/res/values-bn-rBD/defaults.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2009, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="def_device_name" msgid="6309317409634339402">"%1$s %2$s"</string>
- <string name="def_device_name_simple" msgid="9037785625140748221">"%1$s"</string>
- <string name="def_nfc_payment_component" msgid="5861297439873026958"></string>
-</resources>
diff --git a/packages/SettingsProvider/res/values-be-rBY/defaults.xml b/packages/SettingsProvider/res/values-bn/defaults.xml
similarity index 100%
copy from packages/SettingsProvider/res/values-be-rBY/defaults.xml
copy to packages/SettingsProvider/res/values-bn/defaults.xml
diff --git a/packages/SettingsProvider/res/values-bn-rBD/strings.xml b/packages/SettingsProvider/res/values-bn/strings.xml
similarity index 100%
rename from packages/SettingsProvider/res/values-bn-rBD/strings.xml
rename to packages/SettingsProvider/res/values-bn/strings.xml
diff --git a/packages/SettingsProvider/res/values-bs-rBA/defaults.xml b/packages/SettingsProvider/res/values-bs-rBA/defaults.xml
deleted file mode 100644
index 4a87a12..0000000
--- a/packages/SettingsProvider/res/values-bs-rBA/defaults.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2009, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="def_device_name" msgid="6309317409634339402">"%1$s %2$s"</string>
- <string name="def_device_name_simple" msgid="9037785625140748221">"%1$s"</string>
- <string name="def_nfc_payment_component" msgid="5861297439873026958"></string>
-</resources>
diff --git a/packages/SettingsProvider/res/values-be-rBY/defaults.xml b/packages/SettingsProvider/res/values-bs/defaults.xml
similarity index 100%
copy from packages/SettingsProvider/res/values-be-rBY/defaults.xml
copy to packages/SettingsProvider/res/values-bs/defaults.xml
diff --git a/packages/SettingsProvider/res/values-bs-rBA/strings.xml b/packages/SettingsProvider/res/values-bs/strings.xml
similarity index 100%
rename from packages/SettingsProvider/res/values-bs-rBA/strings.xml
rename to packages/SettingsProvider/res/values-bs/strings.xml
diff --git a/packages/SettingsProvider/res/values-et-rEE/defaults.xml b/packages/SettingsProvider/res/values-et/defaults.xml
similarity index 100%
rename from packages/SettingsProvider/res/values-et-rEE/defaults.xml
rename to packages/SettingsProvider/res/values-et/defaults.xml
diff --git a/packages/SettingsProvider/res/values-et-rEE/strings.xml b/packages/SettingsProvider/res/values-et/strings.xml
similarity index 100%
rename from packages/SettingsProvider/res/values-et-rEE/strings.xml
rename to packages/SettingsProvider/res/values-et/strings.xml
diff --git a/packages/SettingsProvider/res/values-eu-rES/defaults.xml b/packages/SettingsProvider/res/values-eu/defaults.xml
similarity index 100%
rename from packages/SettingsProvider/res/values-eu-rES/defaults.xml
rename to packages/SettingsProvider/res/values-eu/defaults.xml
diff --git a/packages/SettingsProvider/res/values-eu-rES/strings.xml b/packages/SettingsProvider/res/values-eu/strings.xml
similarity index 100%
rename from packages/SettingsProvider/res/values-eu-rES/strings.xml
rename to packages/SettingsProvider/res/values-eu/strings.xml
diff --git a/packages/SettingsProvider/res/values-gl-rES/defaults.xml b/packages/SettingsProvider/res/values-gl/defaults.xml
similarity index 100%
rename from packages/SettingsProvider/res/values-gl-rES/defaults.xml
rename to packages/SettingsProvider/res/values-gl/defaults.xml
diff --git a/packages/SettingsProvider/res/values-gl-rES/strings.xml b/packages/SettingsProvider/res/values-gl/strings.xml
similarity index 100%
rename from packages/SettingsProvider/res/values-gl-rES/strings.xml
rename to packages/SettingsProvider/res/values-gl/strings.xml
diff --git a/packages/SettingsProvider/res/values-gu-rIN/defaults.xml b/packages/SettingsProvider/res/values-gu-rIN/defaults.xml
deleted file mode 100644
index 4a87a12..0000000
--- a/packages/SettingsProvider/res/values-gu-rIN/defaults.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2009, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="def_device_name" msgid="6309317409634339402">"%1$s %2$s"</string>
- <string name="def_device_name_simple" msgid="9037785625140748221">"%1$s"</string>
- <string name="def_nfc_payment_component" msgid="5861297439873026958"></string>
-</resources>
diff --git a/packages/SettingsProvider/res/values-gl-rES/defaults.xml b/packages/SettingsProvider/res/values-gu/defaults.xml
similarity index 100%
copy from packages/SettingsProvider/res/values-gl-rES/defaults.xml
copy to packages/SettingsProvider/res/values-gu/defaults.xml
diff --git a/packages/SettingsProvider/res/values-gu-rIN/strings.xml b/packages/SettingsProvider/res/values-gu/strings.xml
similarity index 100%
rename from packages/SettingsProvider/res/values-gu-rIN/strings.xml
rename to packages/SettingsProvider/res/values-gu/strings.xml
diff --git a/packages/SettingsProvider/res/values-hy-rAM/defaults.xml b/packages/SettingsProvider/res/values-hy/defaults.xml
similarity index 100%
rename from packages/SettingsProvider/res/values-hy-rAM/defaults.xml
rename to packages/SettingsProvider/res/values-hy/defaults.xml
diff --git a/packages/SettingsProvider/res/values-hy-rAM/strings.xml b/packages/SettingsProvider/res/values-hy/strings.xml
similarity index 100%
rename from packages/SettingsProvider/res/values-hy-rAM/strings.xml
rename to packages/SettingsProvider/res/values-hy/strings.xml
diff --git a/packages/SettingsProvider/res/values-is-rIS/defaults.xml b/packages/SettingsProvider/res/values-is/defaults.xml
similarity index 100%
rename from packages/SettingsProvider/res/values-is-rIS/defaults.xml
rename to packages/SettingsProvider/res/values-is/defaults.xml
diff --git a/packages/SettingsProvider/res/values-is-rIS/strings.xml b/packages/SettingsProvider/res/values-is/strings.xml
similarity index 100%
rename from packages/SettingsProvider/res/values-is-rIS/strings.xml
rename to packages/SettingsProvider/res/values-is/strings.xml
diff --git a/packages/SettingsProvider/res/values-ka-rGE/defaults.xml b/packages/SettingsProvider/res/values-ka/defaults.xml
similarity index 100%
rename from packages/SettingsProvider/res/values-ka-rGE/defaults.xml
rename to packages/SettingsProvider/res/values-ka/defaults.xml
diff --git a/packages/SettingsProvider/res/values-ka-rGE/strings.xml b/packages/SettingsProvider/res/values-ka/strings.xml
similarity index 100%
rename from packages/SettingsProvider/res/values-ka-rGE/strings.xml
rename to packages/SettingsProvider/res/values-ka/strings.xml
diff --git a/packages/SettingsProvider/res/values-kk-rKZ/defaults.xml b/packages/SettingsProvider/res/values-kk-rKZ/defaults.xml
deleted file mode 100644
index 4a87a12..0000000
--- a/packages/SettingsProvider/res/values-kk-rKZ/defaults.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2009, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="def_device_name" msgid="6309317409634339402">"%1$s %2$s"</string>
- <string name="def_device_name_simple" msgid="9037785625140748221">"%1$s"</string>
- <string name="def_nfc_payment_component" msgid="5861297439873026958"></string>
-</resources>
diff --git a/packages/SettingsProvider/res/values-ka-rGE/defaults.xml b/packages/SettingsProvider/res/values-kk/defaults.xml
similarity index 100%
copy from packages/SettingsProvider/res/values-ka-rGE/defaults.xml
copy to packages/SettingsProvider/res/values-kk/defaults.xml
diff --git a/packages/SettingsProvider/res/values-kk-rKZ/strings.xml b/packages/SettingsProvider/res/values-kk/strings.xml
similarity index 100%
rename from packages/SettingsProvider/res/values-kk-rKZ/strings.xml
rename to packages/SettingsProvider/res/values-kk/strings.xml
diff --git a/packages/SettingsProvider/res/values-km-rKH/defaults.xml b/packages/SettingsProvider/res/values-km-rKH/defaults.xml
deleted file mode 100644
index 4a87a12..0000000
--- a/packages/SettingsProvider/res/values-km-rKH/defaults.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2009, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="def_device_name" msgid="6309317409634339402">"%1$s %2$s"</string>
- <string name="def_device_name_simple" msgid="9037785625140748221">"%1$s"</string>
- <string name="def_nfc_payment_component" msgid="5861297439873026958"></string>
-</resources>
diff --git a/packages/SettingsProvider/res/values-ka-rGE/defaults.xml b/packages/SettingsProvider/res/values-km/defaults.xml
similarity index 100%
copy from packages/SettingsProvider/res/values-ka-rGE/defaults.xml
copy to packages/SettingsProvider/res/values-km/defaults.xml
diff --git a/packages/SettingsProvider/res/values-km-rKH/strings.xml b/packages/SettingsProvider/res/values-km/strings.xml
similarity index 100%
rename from packages/SettingsProvider/res/values-km-rKH/strings.xml
rename to packages/SettingsProvider/res/values-km/strings.xml
diff --git a/packages/SettingsProvider/res/values-kn-rIN/defaults.xml b/packages/SettingsProvider/res/values-kn-rIN/defaults.xml
deleted file mode 100644
index 4a87a12..0000000
--- a/packages/SettingsProvider/res/values-kn-rIN/defaults.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2009, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="def_device_name" msgid="6309317409634339402">"%1$s %2$s"</string>
- <string name="def_device_name_simple" msgid="9037785625140748221">"%1$s"</string>
- <string name="def_nfc_payment_component" msgid="5861297439873026958"></string>
-</resources>
diff --git a/packages/SettingsProvider/res/values-ka-rGE/defaults.xml b/packages/SettingsProvider/res/values-kn/defaults.xml
similarity index 100%
copy from packages/SettingsProvider/res/values-ka-rGE/defaults.xml
copy to packages/SettingsProvider/res/values-kn/defaults.xml
diff --git a/packages/SettingsProvider/res/values-kn-rIN/strings.xml b/packages/SettingsProvider/res/values-kn/strings.xml
similarity index 100%
rename from packages/SettingsProvider/res/values-kn-rIN/strings.xml
rename to packages/SettingsProvider/res/values-kn/strings.xml
diff --git a/packages/SettingsProvider/res/values-ky-rKG/defaults.xml b/packages/SettingsProvider/res/values-ky-rKG/defaults.xml
deleted file mode 100644
index 4a87a12..0000000
--- a/packages/SettingsProvider/res/values-ky-rKG/defaults.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2009, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="def_device_name" msgid="6309317409634339402">"%1$s %2$s"</string>
- <string name="def_device_name_simple" msgid="9037785625140748221">"%1$s"</string>
- <string name="def_nfc_payment_component" msgid="5861297439873026958"></string>
-</resources>
diff --git a/packages/SettingsProvider/res/values-ka-rGE/defaults.xml b/packages/SettingsProvider/res/values-ky/defaults.xml
similarity index 100%
copy from packages/SettingsProvider/res/values-ka-rGE/defaults.xml
copy to packages/SettingsProvider/res/values-ky/defaults.xml
diff --git a/packages/SettingsProvider/res/values-ky-rKG/strings.xml b/packages/SettingsProvider/res/values-ky/strings.xml
similarity index 100%
rename from packages/SettingsProvider/res/values-ky-rKG/strings.xml
rename to packages/SettingsProvider/res/values-ky/strings.xml
diff --git a/packages/SettingsProvider/res/values-lo-rLA/defaults.xml b/packages/SettingsProvider/res/values-lo/defaults.xml
similarity index 100%
rename from packages/SettingsProvider/res/values-lo-rLA/defaults.xml
rename to packages/SettingsProvider/res/values-lo/defaults.xml
diff --git a/packages/SettingsProvider/res/values-lo-rLA/strings.xml b/packages/SettingsProvider/res/values-lo/strings.xml
similarity index 100%
rename from packages/SettingsProvider/res/values-lo-rLA/strings.xml
rename to packages/SettingsProvider/res/values-lo/strings.xml
diff --git a/packages/SettingsProvider/res/values-mk-rMK/defaults.xml b/packages/SettingsProvider/res/values-mk/defaults.xml
similarity index 100%
rename from packages/SettingsProvider/res/values-mk-rMK/defaults.xml
rename to packages/SettingsProvider/res/values-mk/defaults.xml
diff --git a/packages/SettingsProvider/res/values-mk-rMK/strings.xml b/packages/SettingsProvider/res/values-mk/strings.xml
similarity index 100%
rename from packages/SettingsProvider/res/values-mk-rMK/strings.xml
rename to packages/SettingsProvider/res/values-mk/strings.xml
diff --git a/packages/SettingsProvider/res/values-ml-rIN/defaults.xml b/packages/SettingsProvider/res/values-ml-rIN/defaults.xml
deleted file mode 100644
index 4a87a12..0000000
--- a/packages/SettingsProvider/res/values-ml-rIN/defaults.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2009, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="def_device_name" msgid="6309317409634339402">"%1$s %2$s"</string>
- <string name="def_device_name_simple" msgid="9037785625140748221">"%1$s"</string>
- <string name="def_nfc_payment_component" msgid="5861297439873026958"></string>
-</resources>
diff --git a/packages/SettingsProvider/res/values-mk-rMK/defaults.xml b/packages/SettingsProvider/res/values-ml/defaults.xml
similarity index 100%
copy from packages/SettingsProvider/res/values-mk-rMK/defaults.xml
copy to packages/SettingsProvider/res/values-ml/defaults.xml
diff --git a/packages/SettingsProvider/res/values-ml-rIN/strings.xml b/packages/SettingsProvider/res/values-ml/strings.xml
similarity index 100%
rename from packages/SettingsProvider/res/values-ml-rIN/strings.xml
rename to packages/SettingsProvider/res/values-ml/strings.xml
diff --git a/packages/SettingsProvider/res/values-mn-rMN/defaults.xml b/packages/SettingsProvider/res/values-mn-rMN/defaults.xml
deleted file mode 100644
index 4a87a12..0000000
--- a/packages/SettingsProvider/res/values-mn-rMN/defaults.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2009, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="def_device_name" msgid="6309317409634339402">"%1$s %2$s"</string>
- <string name="def_device_name_simple" msgid="9037785625140748221">"%1$s"</string>
- <string name="def_nfc_payment_component" msgid="5861297439873026958"></string>
-</resources>
diff --git a/packages/SettingsProvider/res/values-mk-rMK/defaults.xml b/packages/SettingsProvider/res/values-mn/defaults.xml
similarity index 100%
copy from packages/SettingsProvider/res/values-mk-rMK/defaults.xml
copy to packages/SettingsProvider/res/values-mn/defaults.xml
diff --git a/packages/SettingsProvider/res/values-mn-rMN/strings.xml b/packages/SettingsProvider/res/values-mn/strings.xml
similarity index 100%
rename from packages/SettingsProvider/res/values-mn-rMN/strings.xml
rename to packages/SettingsProvider/res/values-mn/strings.xml
diff --git a/packages/SettingsProvider/res/values-mr-rIN/defaults.xml b/packages/SettingsProvider/res/values-mr-rIN/defaults.xml
deleted file mode 100644
index 4a87a12..0000000
--- a/packages/SettingsProvider/res/values-mr-rIN/defaults.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2009, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="def_device_name" msgid="6309317409634339402">"%1$s %2$s"</string>
- <string name="def_device_name_simple" msgid="9037785625140748221">"%1$s"</string>
- <string name="def_nfc_payment_component" msgid="5861297439873026958"></string>
-</resources>
diff --git a/packages/SettingsProvider/res/values-mk-rMK/defaults.xml b/packages/SettingsProvider/res/values-mr/defaults.xml
similarity index 100%
copy from packages/SettingsProvider/res/values-mk-rMK/defaults.xml
copy to packages/SettingsProvider/res/values-mr/defaults.xml
diff --git a/packages/SettingsProvider/res/values-mr-rIN/strings.xml b/packages/SettingsProvider/res/values-mr/strings.xml
similarity index 100%
rename from packages/SettingsProvider/res/values-mr-rIN/strings.xml
rename to packages/SettingsProvider/res/values-mr/strings.xml
diff --git a/packages/SettingsProvider/res/values-ms-rMY/defaults.xml b/packages/SettingsProvider/res/values-ms-rMY/defaults.xml
deleted file mode 100644
index 4a87a12..0000000
--- a/packages/SettingsProvider/res/values-ms-rMY/defaults.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2009, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="def_device_name" msgid="6309317409634339402">"%1$s %2$s"</string>
- <string name="def_device_name_simple" msgid="9037785625140748221">"%1$s"</string>
- <string name="def_nfc_payment_component" msgid="5861297439873026958"></string>
-</resources>
diff --git a/packages/SettingsProvider/res/values-mk-rMK/defaults.xml b/packages/SettingsProvider/res/values-ms/defaults.xml
similarity index 100%
copy from packages/SettingsProvider/res/values-mk-rMK/defaults.xml
copy to packages/SettingsProvider/res/values-ms/defaults.xml
diff --git a/packages/SettingsProvider/res/values-ms-rMY/strings.xml b/packages/SettingsProvider/res/values-ms/strings.xml
similarity index 100%
rename from packages/SettingsProvider/res/values-ms-rMY/strings.xml
rename to packages/SettingsProvider/res/values-ms/strings.xml
diff --git a/packages/SettingsProvider/res/values-my-rMM/defaults.xml b/packages/SettingsProvider/res/values-my-rMM/defaults.xml
deleted file mode 100644
index 4a87a12..0000000
--- a/packages/SettingsProvider/res/values-my-rMM/defaults.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2009, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="def_device_name" msgid="6309317409634339402">"%1$s %2$s"</string>
- <string name="def_device_name_simple" msgid="9037785625140748221">"%1$s"</string>
- <string name="def_nfc_payment_component" msgid="5861297439873026958"></string>
-</resources>
diff --git a/packages/SettingsProvider/res/values-mk-rMK/defaults.xml b/packages/SettingsProvider/res/values-my/defaults.xml
similarity index 100%
copy from packages/SettingsProvider/res/values-mk-rMK/defaults.xml
copy to packages/SettingsProvider/res/values-my/defaults.xml
diff --git a/packages/SettingsProvider/res/values-my-rMM/strings.xml b/packages/SettingsProvider/res/values-my/strings.xml
similarity index 100%
rename from packages/SettingsProvider/res/values-my-rMM/strings.xml
rename to packages/SettingsProvider/res/values-my/strings.xml
diff --git a/packages/SettingsProvider/res/values-ne-rNP/defaults.xml b/packages/SettingsProvider/res/values-ne/defaults.xml
similarity index 100%
rename from packages/SettingsProvider/res/values-ne-rNP/defaults.xml
rename to packages/SettingsProvider/res/values-ne/defaults.xml
diff --git a/packages/SettingsProvider/res/values-ne-rNP/strings.xml b/packages/SettingsProvider/res/values-ne/strings.xml
similarity index 100%
rename from packages/SettingsProvider/res/values-ne-rNP/strings.xml
rename to packages/SettingsProvider/res/values-ne/strings.xml
diff --git a/packages/SettingsProvider/res/values-pa-rIN/defaults.xml b/packages/SettingsProvider/res/values-pa/defaults.xml
similarity index 100%
rename from packages/SettingsProvider/res/values-pa-rIN/defaults.xml
rename to packages/SettingsProvider/res/values-pa/defaults.xml
diff --git a/packages/SettingsProvider/res/values-pa-rIN/strings.xml b/packages/SettingsProvider/res/values-pa/strings.xml
similarity index 100%
rename from packages/SettingsProvider/res/values-pa-rIN/strings.xml
rename to packages/SettingsProvider/res/values-pa/strings.xml
diff --git a/packages/SettingsProvider/res/values-si-rLK/defaults.xml b/packages/SettingsProvider/res/values-si/defaults.xml
similarity index 100%
rename from packages/SettingsProvider/res/values-si-rLK/defaults.xml
rename to packages/SettingsProvider/res/values-si/defaults.xml
diff --git a/packages/SettingsProvider/res/values-si-rLK/strings.xml b/packages/SettingsProvider/res/values-si/strings.xml
similarity index 100%
rename from packages/SettingsProvider/res/values-si-rLK/strings.xml
rename to packages/SettingsProvider/res/values-si/strings.xml
diff --git a/packages/SettingsProvider/res/values-sq-rAL/defaults.xml b/packages/SettingsProvider/res/values-sq-rAL/defaults.xml
deleted file mode 100644
index 4a87a12..0000000
--- a/packages/SettingsProvider/res/values-sq-rAL/defaults.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2009, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="def_device_name" msgid="6309317409634339402">"%1$s %2$s"</string>
- <string name="def_device_name_simple" msgid="9037785625140748221">"%1$s"</string>
- <string name="def_nfc_payment_component" msgid="5861297439873026958"></string>
-</resources>
diff --git a/packages/SettingsProvider/res/values-si-rLK/defaults.xml b/packages/SettingsProvider/res/values-sq/defaults.xml
similarity index 100%
copy from packages/SettingsProvider/res/values-si-rLK/defaults.xml
copy to packages/SettingsProvider/res/values-sq/defaults.xml
diff --git a/packages/SettingsProvider/res/values-sq-rAL/strings.xml b/packages/SettingsProvider/res/values-sq/strings.xml
similarity index 100%
rename from packages/SettingsProvider/res/values-sq-rAL/strings.xml
rename to packages/SettingsProvider/res/values-sq/strings.xml
diff --git a/packages/SettingsProvider/res/values-ta-rIN/defaults.xml b/packages/SettingsProvider/res/values-ta/defaults.xml
similarity index 100%
rename from packages/SettingsProvider/res/values-ta-rIN/defaults.xml
rename to packages/SettingsProvider/res/values-ta/defaults.xml
diff --git a/packages/SettingsProvider/res/values-ta-rIN/strings.xml b/packages/SettingsProvider/res/values-ta/strings.xml
similarity index 100%
rename from packages/SettingsProvider/res/values-ta-rIN/strings.xml
rename to packages/SettingsProvider/res/values-ta/strings.xml
diff --git a/packages/SettingsProvider/res/values-te-rIN/defaults.xml b/packages/SettingsProvider/res/values-te-rIN/defaults.xml
deleted file mode 100644
index 4a87a12..0000000
--- a/packages/SettingsProvider/res/values-te-rIN/defaults.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2009, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="def_device_name" msgid="6309317409634339402">"%1$s %2$s"</string>
- <string name="def_device_name_simple" msgid="9037785625140748221">"%1$s"</string>
- <string name="def_nfc_payment_component" msgid="5861297439873026958"></string>
-</resources>
diff --git a/packages/SettingsProvider/res/values-ta-rIN/defaults.xml b/packages/SettingsProvider/res/values-te/defaults.xml
similarity index 100%
copy from packages/SettingsProvider/res/values-ta-rIN/defaults.xml
copy to packages/SettingsProvider/res/values-te/defaults.xml
diff --git a/packages/SettingsProvider/res/values-te-rIN/strings.xml b/packages/SettingsProvider/res/values-te/strings.xml
similarity index 100%
rename from packages/SettingsProvider/res/values-te-rIN/strings.xml
rename to packages/SettingsProvider/res/values-te/strings.xml
diff --git a/packages/SettingsProvider/res/values-ur-rPK/defaults.xml b/packages/SettingsProvider/res/values-ur/defaults.xml
similarity index 100%
rename from packages/SettingsProvider/res/values-ur-rPK/defaults.xml
rename to packages/SettingsProvider/res/values-ur/defaults.xml
diff --git a/packages/SettingsProvider/res/values-ur-rPK/strings.xml b/packages/SettingsProvider/res/values-ur/strings.xml
similarity index 100%
rename from packages/SettingsProvider/res/values-ur-rPK/strings.xml
rename to packages/SettingsProvider/res/values-ur/strings.xml
diff --git a/packages/SettingsProvider/res/values-uz-rUZ/defaults.xml b/packages/SettingsProvider/res/values-uz-rUZ/defaults.xml
deleted file mode 100644
index 4a87a12..0000000
--- a/packages/SettingsProvider/res/values-uz-rUZ/defaults.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2009, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="def_device_name" msgid="6309317409634339402">"%1$s %2$s"</string>
- <string name="def_device_name_simple" msgid="9037785625140748221">"%1$s"</string>
- <string name="def_nfc_payment_component" msgid="5861297439873026958"></string>
-</resources>
diff --git a/packages/SettingsProvider/res/values-ur-rPK/defaults.xml b/packages/SettingsProvider/res/values-uz/defaults.xml
similarity index 100%
copy from packages/SettingsProvider/res/values-ur-rPK/defaults.xml
copy to packages/SettingsProvider/res/values-uz/defaults.xml
diff --git a/packages/SettingsProvider/res/values-uz-rUZ/strings.xml b/packages/SettingsProvider/res/values-uz/strings.xml
similarity index 100%
rename from packages/SettingsProvider/res/values-uz-rUZ/strings.xml
rename to packages/SettingsProvider/res/values-uz/strings.xml
diff --git a/packages/Shell/res/values-az-rAZ/strings.xml b/packages/Shell/res/values-az/strings.xml
similarity index 100%
rename from packages/Shell/res/values-az-rAZ/strings.xml
rename to packages/Shell/res/values-az/strings.xml
diff --git a/packages/Shell/res/values-be-rBY/strings.xml b/packages/Shell/res/values-be/strings.xml
similarity index 100%
rename from packages/Shell/res/values-be-rBY/strings.xml
rename to packages/Shell/res/values-be/strings.xml
diff --git a/packages/Shell/res/values-bn-rBD/strings.xml b/packages/Shell/res/values-bn/strings.xml
similarity index 100%
rename from packages/Shell/res/values-bn-rBD/strings.xml
rename to packages/Shell/res/values-bn/strings.xml
diff --git a/packages/Shell/res/values-bs-rBA/strings.xml b/packages/Shell/res/values-bs/strings.xml
similarity index 100%
rename from packages/Shell/res/values-bs-rBA/strings.xml
rename to packages/Shell/res/values-bs/strings.xml
diff --git a/packages/Shell/res/values-et-rEE/strings.xml b/packages/Shell/res/values-et/strings.xml
similarity index 100%
rename from packages/Shell/res/values-et-rEE/strings.xml
rename to packages/Shell/res/values-et/strings.xml
diff --git a/packages/Shell/res/values-eu-rES/strings.xml b/packages/Shell/res/values-eu/strings.xml
similarity index 100%
rename from packages/Shell/res/values-eu-rES/strings.xml
rename to packages/Shell/res/values-eu/strings.xml
diff --git a/packages/Shell/res/values-gl-rES/strings.xml b/packages/Shell/res/values-gl/strings.xml
similarity index 100%
rename from packages/Shell/res/values-gl-rES/strings.xml
rename to packages/Shell/res/values-gl/strings.xml
diff --git a/packages/Shell/res/values-gu-rIN/strings.xml b/packages/Shell/res/values-gu/strings.xml
similarity index 100%
rename from packages/Shell/res/values-gu-rIN/strings.xml
rename to packages/Shell/res/values-gu/strings.xml
diff --git a/packages/Shell/res/values-hy-rAM/strings.xml b/packages/Shell/res/values-hy/strings.xml
similarity index 100%
rename from packages/Shell/res/values-hy-rAM/strings.xml
rename to packages/Shell/res/values-hy/strings.xml
diff --git a/packages/Shell/res/values-is-rIS/strings.xml b/packages/Shell/res/values-is/strings.xml
similarity index 100%
rename from packages/Shell/res/values-is-rIS/strings.xml
rename to packages/Shell/res/values-is/strings.xml
diff --git a/packages/Shell/res/values-ka-rGE/strings.xml b/packages/Shell/res/values-ka/strings.xml
similarity index 100%
rename from packages/Shell/res/values-ka-rGE/strings.xml
rename to packages/Shell/res/values-ka/strings.xml
diff --git a/packages/Shell/res/values-kk-rKZ/strings.xml b/packages/Shell/res/values-kk/strings.xml
similarity index 100%
rename from packages/Shell/res/values-kk-rKZ/strings.xml
rename to packages/Shell/res/values-kk/strings.xml
diff --git a/packages/Shell/res/values-km-rKH/strings.xml b/packages/Shell/res/values-km/strings.xml
similarity index 100%
rename from packages/Shell/res/values-km-rKH/strings.xml
rename to packages/Shell/res/values-km/strings.xml
diff --git a/packages/Shell/res/values-kn-rIN/strings.xml b/packages/Shell/res/values-kn/strings.xml
similarity index 100%
rename from packages/Shell/res/values-kn-rIN/strings.xml
rename to packages/Shell/res/values-kn/strings.xml
diff --git a/packages/Shell/res/values-ky-rKG/strings.xml b/packages/Shell/res/values-ky/strings.xml
similarity index 100%
rename from packages/Shell/res/values-ky-rKG/strings.xml
rename to packages/Shell/res/values-ky/strings.xml
diff --git a/packages/Shell/res/values-lo-rLA/strings.xml b/packages/Shell/res/values-lo/strings.xml
similarity index 100%
rename from packages/Shell/res/values-lo-rLA/strings.xml
rename to packages/Shell/res/values-lo/strings.xml
diff --git a/packages/Shell/res/values-mk-rMK/strings.xml b/packages/Shell/res/values-mk/strings.xml
similarity index 100%
rename from packages/Shell/res/values-mk-rMK/strings.xml
rename to packages/Shell/res/values-mk/strings.xml
diff --git a/packages/Shell/res/values-ml-rIN/strings.xml b/packages/Shell/res/values-ml/strings.xml
similarity index 100%
rename from packages/Shell/res/values-ml-rIN/strings.xml
rename to packages/Shell/res/values-ml/strings.xml
diff --git a/packages/Shell/res/values-mn-rMN/strings.xml b/packages/Shell/res/values-mn/strings.xml
similarity index 100%
rename from packages/Shell/res/values-mn-rMN/strings.xml
rename to packages/Shell/res/values-mn/strings.xml
diff --git a/packages/Shell/res/values-mr-rIN/strings.xml b/packages/Shell/res/values-mr/strings.xml
similarity index 100%
rename from packages/Shell/res/values-mr-rIN/strings.xml
rename to packages/Shell/res/values-mr/strings.xml
diff --git a/packages/Shell/res/values-ms-rMY/strings.xml b/packages/Shell/res/values-ms/strings.xml
similarity index 100%
rename from packages/Shell/res/values-ms-rMY/strings.xml
rename to packages/Shell/res/values-ms/strings.xml
diff --git a/packages/Shell/res/values-my-rMM/strings.xml b/packages/Shell/res/values-my/strings.xml
similarity index 100%
rename from packages/Shell/res/values-my-rMM/strings.xml
rename to packages/Shell/res/values-my/strings.xml
diff --git a/packages/Shell/res/values-ne-rNP/strings.xml b/packages/Shell/res/values-ne/strings.xml
similarity index 100%
rename from packages/Shell/res/values-ne-rNP/strings.xml
rename to packages/Shell/res/values-ne/strings.xml
diff --git a/packages/Shell/res/values-pa-rIN/strings.xml b/packages/Shell/res/values-pa/strings.xml
similarity index 100%
rename from packages/Shell/res/values-pa-rIN/strings.xml
rename to packages/Shell/res/values-pa/strings.xml
diff --git a/packages/Shell/res/values-si-rLK/strings.xml b/packages/Shell/res/values-si/strings.xml
similarity index 100%
rename from packages/Shell/res/values-si-rLK/strings.xml
rename to packages/Shell/res/values-si/strings.xml
diff --git a/packages/Shell/res/values-sq-rAL/strings.xml b/packages/Shell/res/values-sq/strings.xml
similarity index 100%
rename from packages/Shell/res/values-sq-rAL/strings.xml
rename to packages/Shell/res/values-sq/strings.xml
diff --git a/packages/Shell/res/values-ta-rIN/strings.xml b/packages/Shell/res/values-ta/strings.xml
similarity index 100%
rename from packages/Shell/res/values-ta-rIN/strings.xml
rename to packages/Shell/res/values-ta/strings.xml
diff --git a/packages/Shell/res/values-te-rIN/strings.xml b/packages/Shell/res/values-te/strings.xml
similarity index 100%
rename from packages/Shell/res/values-te-rIN/strings.xml
rename to packages/Shell/res/values-te/strings.xml
diff --git a/packages/Shell/res/values-ur-rPK/strings.xml b/packages/Shell/res/values-ur/strings.xml
similarity index 100%
rename from packages/Shell/res/values-ur-rPK/strings.xml
rename to packages/Shell/res/values-ur/strings.xml
diff --git a/packages/Shell/res/values-uz-rUZ/strings.xml b/packages/Shell/res/values-uz/strings.xml
similarity index 100%
rename from packages/Shell/res/values-uz-rUZ/strings.xml
rename to packages/Shell/res/values-uz/strings.xml
diff --git a/packages/SystemUI/AndroidManifest.xml b/packages/SystemUI/AndroidManifest.xml
index 5574753..ff76c56 100644
--- a/packages/SystemUI/AndroidManifest.xml
+++ b/packages/SystemUI/AndroidManifest.xml
@@ -221,6 +221,15 @@
</intent-filter>
</receiver>
+ <receiver android:name=".SysuiRestartReceiver"
+ android:exported="false">
+ <intent-filter>
+ <action android:name="com.android.systemui.action.RESTART" />
+
+ <data android:scheme="package" />
+ </intent-filter>
+ </receiver>
+
<service android:name=".ImageWallpaper"
android:permission="android.permission.BIND_WALLPAPER"
android:exported="true" />
@@ -483,6 +492,21 @@
android:exported="true"
android:enabled="@bool/config_enableKeyguardService" />
+ <activity android:name=".keyguard.WorkLockActivity"
+ android:label="@string/accessibility_desc_work_lock"
+ android:permission="android.permission.MANAGE_USERS"
+ android:exported="false"
+ android:launchMode="singleTop"
+ android:excludeFromRecents="true"
+ android:stateNotNeeded="true"
+ android:resumeWhilePausing="true"
+ android:theme="@android:style/Theme.Black.NoTitleBar">
+ <intent-filter>
+ <action android:name="android.app.action.CONFIRM_DEVICE_CREDENTIAL_WITH_USER" />
+ <category android:name="android.intent.category.DEFAULT" />
+ </intent-filter>
+ </activity>
+
<activity android:name=".Somnambulator"
android:label="@string/start_dreams"
android:icon="@mipmap/ic_launcher_dreams"
diff --git a/packages/SystemUI/plugin/src/com/android/systemui/plugins/PluginInstanceManager.java b/packages/SystemUI/plugin/src/com/android/systemui/plugins/PluginInstanceManager.java
index 388c71d..7b8eae2 100644
--- a/packages/SystemUI/plugin/src/com/android/systemui/plugins/PluginInstanceManager.java
+++ b/packages/SystemUI/plugin/src/com/android/systemui/plugins/PluginInstanceManager.java
@@ -87,6 +87,21 @@
isDebuggable = debuggable;
}
+ public PluginInfo<T> getPlugin() {
+ if (Looper.myLooper() != Looper.getMainLooper()) {
+ throw new RuntimeException("Must be called from UI thread");
+ }
+ mPluginHandler.handleQueryPlugins(null /* All packages */);
+ if (mPluginHandler.mPlugins.size() > 0) {
+ mMainHandler.removeMessages(MainHandler.PLUGIN_CONNECTED);
+ PluginInfo<T> info = mPluginHandler.mPlugins.get(0);
+ PluginPrefs.setHasPlugins(mContext);
+ info.mPlugin.onCreate(mContext, info.mPluginContext);
+ return info;
+ }
+ return null;
+ }
+
public void loadAll() {
if (DEBUG) Log.d(TAG, "startListening");
mPluginHandler.sendEmptyMessage(PluginHandler.QUERY_ALL);
@@ -366,11 +381,11 @@
}
}
- private static class PluginInfo<T> {
+ static class PluginInfo<T> {
private final Context mPluginContext;
- private T mPlugin;
private String mClass;
- private String mPackage;
+ T mPlugin;
+ String mPackage;
public PluginInfo(String pkg, String cls, T plugin, Context pluginContext) {
mPlugin = plugin;
diff --git a/packages/SystemUI/plugin/src/com/android/systemui/plugins/PluginManager.java b/packages/SystemUI/plugin/src/com/android/systemui/plugins/PluginManager.java
index 6096eaf..4714547 100644
--- a/packages/SystemUI/plugin/src/com/android/systemui/plugins/PluginManager.java
+++ b/packages/SystemUI/plugin/src/com/android/systemui/plugins/PluginManager.java
@@ -14,7 +14,10 @@
package com.android.systemui.plugins;
+import android.app.Notification;
+import android.app.Notification.Action;
import android.app.NotificationManager;
+import android.app.PendingIntent;
import android.content.BroadcastReceiver;
import android.content.ComponentName;
import android.content.Context;
@@ -23,16 +26,20 @@
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
import android.content.pm.PackageManager.NameNotFoundException;
+import android.content.res.Resources;
import android.net.Uri;
import android.os.Build;
import android.os.HandlerThread;
import android.os.Looper;
import android.os.SystemProperties;
+import android.os.UserHandle;
import android.util.ArrayMap;
+import android.util.ArraySet;
import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.messages.nano.SystemMessageProto.SystemMessage;
import com.android.systemui.plugins.PluginInstanceManager.PluginContextWrapper;
+import com.android.systemui.plugins.PluginInstanceManager.PluginInfo;
import dalvik.system.PathClassLoader;
@@ -54,11 +61,14 @@
private final ArrayMap<PluginListener<?>, PluginInstanceManager> mPluginMap
= new ArrayMap<>();
private final Map<String, ClassLoader> mClassLoaders = new ArrayMap<>();
+ private final ArraySet<String> mOneShotPackages = new ArraySet<>();
private final Context mContext;
private final PluginInstanceManagerFactory mFactory;
private final boolean isDebuggable;
private final PluginPrefs mPluginPrefs;
private ClassLoaderFilter mParentClassLoader;
+ private boolean mListening;
+ private boolean mHasOneShot;
private PluginManager(Context context) {
this(context, new PluginInstanceManagerFactory(),
@@ -80,6 +90,27 @@
Thread.setDefaultUncaughtExceptionHandler(uncaughtExceptionHandler);
}
+ public <T extends Plugin> T getOneShotPlugin(String action, int version) {
+ if (!isDebuggable) {
+ // Never ever ever allow these on production builds, they are only for prototyping.
+ return null;
+ }
+ if (Looper.myLooper() != Looper.getMainLooper()) {
+ throw new RuntimeException("Must be called from UI thread");
+ }
+ PluginInstanceManager<T> p = mFactory.createPluginInstanceManager(mContext, action, null,
+ false, mBackgroundThread.getLooper(), version, this);
+ mPluginPrefs.addAction(action);
+ PluginInfo<T> info = p.getPlugin();
+ if (info != null) {
+ mOneShotPackages.add(info.mPackage);
+ mHasOneShot = true;
+ startListening();
+ return info.mPlugin;
+ }
+ return null;
+ }
+
public <T extends Plugin> void addPluginListener(String action, PluginListener<T> listener,
int version) {
addPluginListener(action, listener, version, false);
@@ -96,9 +127,7 @@
allowMultiple, mBackgroundThread.getLooper(), version, this);
p.loadAll();
mPluginMap.put(listener, p);
- if (mPluginMap.size() == 1) {
- startListening();
- }
+ startListening();
}
public void removePluginListener(PluginListener<?> listener) {
@@ -108,12 +137,12 @@
}
if (!mPluginMap.containsKey(listener)) return;
mPluginMap.remove(listener).destroy();
- if (mPluginMap.size() == 0) {
- stopListening();
- }
+ stopListening();
}
private void startListening() {
+ if (mListening) return;
+ mListening = true;
IntentFilter filter = new IntentFilter(Intent.ACTION_PACKAGE_ADDED);
filter.addAction(Intent.ACTION_PACKAGE_CHANGED);
filter.addAction(Intent.ACTION_PACKAGE_REMOVED);
@@ -126,6 +155,9 @@
}
private void stopListening() {
+ // Never stop listening if a one-shot is present.
+ if (!mListening || mHasOneShot) return;
+ mListening = false;
mContext.unregisterReceiver(this);
}
@@ -147,6 +179,34 @@
} else {
Uri data = intent.getData();
String pkg = data.getEncodedSchemeSpecificPart();
+ if (mOneShotPackages.contains(pkg)) {
+ int icon = mContext.getResources().getIdentifier("tuner", "drawable",
+ mContext.getPackageName());
+ int color = Resources.getSystem().getIdentifier(
+ "system_notification_accent_color", "color", "android");
+ String label = pkg;
+ try {
+ PackageManager pm = mContext.getPackageManager();
+ label = pm.getApplicationInfo(pkg, 0).loadLabel(pm).toString();
+ } catch (NameNotFoundException e) {
+ }
+ // Localization not required as this will never ever appear in a user build.
+ final Notification.Builder nb = new Notification.Builder(mContext)
+ .setSmallIcon(icon)
+ .setWhen(0)
+ .setShowWhen(false)
+ .setPriority(Notification.PRIORITY_MAX)
+ .setVisibility(Notification.VISIBILITY_PUBLIC)
+ .setColor(mContext.getColor(color))
+ .setContentTitle("Plugin \"" + label + "\" has updated")
+ .setContentText("Restart SysUI for changes to take effect.");
+ Intent i = new Intent("com.android.systemui.action.RESTART").setData(
+ Uri.parse("package://" + pkg));
+ PendingIntent pi = PendingIntent.getBroadcast(mContext, 0, i, 0);
+ nb.addAction(new Action.Builder(null, "Restart SysUI", pi).build());
+ mContext.getSystemService(NotificationManager.class).notifyAsUser(pkg,
+ SystemMessage.NOTE_PLUGIN, nb.build(), UserHandle.ALL);
+ }
clearClassLoader(pkg);
if (!Intent.ACTION_PACKAGE_REMOVED.equals(intent.getAction())) {
for (PluginInstanceManager manager : mPluginMap.values()) {
diff --git a/packages/SystemUI/res/layout/qs_customize_panel_content.xml b/packages/SystemUI/res/layout/qs_customize_panel_content.xml
index ca0248e..04d0e65 100644
--- a/packages/SystemUI/res/layout/qs_customize_panel_content.xml
+++ b/packages/SystemUI/res/layout/qs_customize_panel_content.xml
@@ -27,7 +27,7 @@
<android.support.v7.widget.RecyclerView
android:id="@android:id/list"
- android:layout_width="@dimen/notification_panel_width"
+ android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:scrollIndicators="top"
diff --git a/packages/SystemUI/res/values-az-rAZ-land/strings.xml b/packages/SystemUI/res/values-az-rAZ-land/strings.xml
deleted file mode 100644
index 8eb6978..0000000
--- a/packages/SystemUI/res/values-az-rAZ-land/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2010, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="toast_rotation_locked" msgid="7609673011431556092">"Hazırda ekran landşaft orientasiyasında kilidlənib."</string>
-</resources>
diff --git a/packages/SystemUI/res/values-az-rAZ/config.xml b/packages/SystemUI/res/values-az/config.xml
similarity index 100%
rename from packages/SystemUI/res/values-az-rAZ/config.xml
rename to packages/SystemUI/res/values-az/config.xml
diff --git a/packages/SystemUI/res/values-az-rAZ/strings.xml b/packages/SystemUI/res/values-az/strings.xml
similarity index 100%
rename from packages/SystemUI/res/values-az-rAZ/strings.xml
rename to packages/SystemUI/res/values-az/strings.xml
diff --git a/packages/SystemUI/res/values-az-rAZ/strings_car.xml b/packages/SystemUI/res/values-az/strings_car.xml
similarity index 100%
rename from packages/SystemUI/res/values-az-rAZ/strings_car.xml
rename to packages/SystemUI/res/values-az/strings_car.xml
diff --git a/packages/SystemUI/res/values-az-rAZ/strings_tv.xml b/packages/SystemUI/res/values-az/strings_tv.xml
similarity index 100%
rename from packages/SystemUI/res/values-az-rAZ/strings_tv.xml
rename to packages/SystemUI/res/values-az/strings_tv.xml
diff --git a/packages/SystemUI/res/values-be-rBY-land/strings.xml b/packages/SystemUI/res/values-be-rBY-land/strings.xml
deleted file mode 100644
index 9b0cf06..0000000
--- a/packages/SystemUI/res/values-be-rBY-land/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2010, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="toast_rotation_locked" msgid="7609673011431556092">"Цяпер экран заблакаваны ў альбомнай арыентацыі."</string>
-</resources>
diff --git a/packages/SystemUI/res/values-be-rBY/config.xml b/packages/SystemUI/res/values-be/config.xml
similarity index 100%
rename from packages/SystemUI/res/values-be-rBY/config.xml
rename to packages/SystemUI/res/values-be/config.xml
diff --git a/packages/SystemUI/res/values-be-rBY/strings.xml b/packages/SystemUI/res/values-be/strings.xml
similarity index 100%
rename from packages/SystemUI/res/values-be-rBY/strings.xml
rename to packages/SystemUI/res/values-be/strings.xml
diff --git a/packages/SystemUI/res/values-be-rBY/strings_car.xml b/packages/SystemUI/res/values-be/strings_car.xml
similarity index 100%
rename from packages/SystemUI/res/values-be-rBY/strings_car.xml
rename to packages/SystemUI/res/values-be/strings_car.xml
diff --git a/packages/SystemUI/res/values-be-rBY/strings_tv.xml b/packages/SystemUI/res/values-be/strings_tv.xml
similarity index 100%
rename from packages/SystemUI/res/values-be-rBY/strings_tv.xml
rename to packages/SystemUI/res/values-be/strings_tv.xml
diff --git a/packages/SystemUI/res/values-bn-rBD-land/strings.xml b/packages/SystemUI/res/values-bn-land/strings.xml
similarity index 100%
rename from packages/SystemUI/res/values-bn-rBD-land/strings.xml
rename to packages/SystemUI/res/values-bn-land/strings.xml
diff --git a/packages/SystemUI/res/values-bn-rWB-land/strings.xml b/packages/SystemUI/res/values-bn-rWB-land/strings.xml
deleted file mode 100644
index ac873fa..0000000
--- a/packages/SystemUI/res/values-bn-rWB-land/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2010, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="toast_rotation_locked" msgid="7609673011431556092">"এখন ভূদৃশ্য সজ্জাতে স্ক্রীণ লক করা হয়েছে৷"</string>
-</resources>
diff --git a/packages/SystemUI/res/values-bn-rBD/config.xml b/packages/SystemUI/res/values-bn/config.xml
similarity index 100%
rename from packages/SystemUI/res/values-bn-rBD/config.xml
rename to packages/SystemUI/res/values-bn/config.xml
diff --git a/packages/SystemUI/res/values-bn-rBD/strings.xml b/packages/SystemUI/res/values-bn/strings.xml
similarity index 100%
rename from packages/SystemUI/res/values-bn-rBD/strings.xml
rename to packages/SystemUI/res/values-bn/strings.xml
diff --git a/packages/SystemUI/res/values-bn-rBD/strings_car.xml b/packages/SystemUI/res/values-bn/strings_car.xml
similarity index 100%
rename from packages/SystemUI/res/values-bn-rBD/strings_car.xml
rename to packages/SystemUI/res/values-bn/strings_car.xml
diff --git a/packages/SystemUI/res/values-bn-rBD/strings_tv.xml b/packages/SystemUI/res/values-bn/strings_tv.xml
similarity index 100%
rename from packages/SystemUI/res/values-bn-rBD/strings_tv.xml
rename to packages/SystemUI/res/values-bn/strings_tv.xml
diff --git a/packages/SystemUI/res/values-bs-rBA-land/strings.xml b/packages/SystemUI/res/values-bs-land/strings.xml
similarity index 100%
rename from packages/SystemUI/res/values-bs-rBA-land/strings.xml
rename to packages/SystemUI/res/values-bs-land/strings.xml
diff --git a/packages/SystemUI/res/values-bs-rBA/config.xml b/packages/SystemUI/res/values-bs/config.xml
similarity index 100%
rename from packages/SystemUI/res/values-bs-rBA/config.xml
rename to packages/SystemUI/res/values-bs/config.xml
diff --git a/packages/SystemUI/res/values-bs-rBA/strings.xml b/packages/SystemUI/res/values-bs/strings.xml
similarity index 100%
rename from packages/SystemUI/res/values-bs-rBA/strings.xml
rename to packages/SystemUI/res/values-bs/strings.xml
diff --git a/packages/SystemUI/res/values-bs-rBA/strings_car.xml b/packages/SystemUI/res/values-bs/strings_car.xml
similarity index 100%
rename from packages/SystemUI/res/values-bs-rBA/strings_car.xml
rename to packages/SystemUI/res/values-bs/strings_car.xml
diff --git a/packages/SystemUI/res/values-bs-rBA/strings_tv.xml b/packages/SystemUI/res/values-bs/strings_tv.xml
similarity index 100%
rename from packages/SystemUI/res/values-bs-rBA/strings_tv.xml
rename to packages/SystemUI/res/values-bs/strings_tv.xml
diff --git a/packages/SystemUI/res/values-et-rEE-land/strings.xml b/packages/SystemUI/res/values-et-rEE-land/strings.xml
deleted file mode 100644
index 77b0ce1..0000000
--- a/packages/SystemUI/res/values-et-rEE-land/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2010, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="toast_rotation_locked" msgid="7609673011431556092">"Ekraan on nüüd lukustatud horisontaalasendisse."</string>
-</resources>
diff --git a/packages/SystemUI/res/values-et-rEE/config.xml b/packages/SystemUI/res/values-et/config.xml
similarity index 100%
rename from packages/SystemUI/res/values-et-rEE/config.xml
rename to packages/SystemUI/res/values-et/config.xml
diff --git a/packages/SystemUI/res/values-et-rEE/strings.xml b/packages/SystemUI/res/values-et/strings.xml
similarity index 100%
rename from packages/SystemUI/res/values-et-rEE/strings.xml
rename to packages/SystemUI/res/values-et/strings.xml
diff --git a/packages/SystemUI/res/values-et-rEE/strings_car.xml b/packages/SystemUI/res/values-et/strings_car.xml
similarity index 100%
rename from packages/SystemUI/res/values-et-rEE/strings_car.xml
rename to packages/SystemUI/res/values-et/strings_car.xml
diff --git a/packages/SystemUI/res/values-et-rEE/strings_tv.xml b/packages/SystemUI/res/values-et/strings_tv.xml
similarity index 100%
rename from packages/SystemUI/res/values-et-rEE/strings_tv.xml
rename to packages/SystemUI/res/values-et/strings_tv.xml
diff --git a/packages/SystemUI/res/values-eu-rES-land/strings.xml b/packages/SystemUI/res/values-eu-land/strings.xml
similarity index 100%
rename from packages/SystemUI/res/values-eu-rES-land/strings.xml
rename to packages/SystemUI/res/values-eu-land/strings.xml
diff --git a/packages/SystemUI/res/values-eu-rPV-land/strings.xml b/packages/SystemUI/res/values-eu-rPV-land/strings.xml
deleted file mode 100644
index c8640c7..0000000
--- a/packages/SystemUI/res/values-eu-rPV-land/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2010, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="toast_rotation_locked" msgid="7609673011431556092">"Pantaila horizontalki blokeatuta dago."</string>
-</resources>
diff --git a/packages/SystemUI/res/values-eu-rES/config.xml b/packages/SystemUI/res/values-eu/config.xml
similarity index 100%
rename from packages/SystemUI/res/values-eu-rES/config.xml
rename to packages/SystemUI/res/values-eu/config.xml
diff --git a/packages/SystemUI/res/values-eu-rES/strings.xml b/packages/SystemUI/res/values-eu/strings.xml
similarity index 100%
rename from packages/SystemUI/res/values-eu-rES/strings.xml
rename to packages/SystemUI/res/values-eu/strings.xml
diff --git a/packages/SystemUI/res/values-eu-rES/strings_car.xml b/packages/SystemUI/res/values-eu/strings_car.xml
similarity index 100%
rename from packages/SystemUI/res/values-eu-rES/strings_car.xml
rename to packages/SystemUI/res/values-eu/strings_car.xml
diff --git a/packages/SystemUI/res/values-eu-rES/strings_tv.xml b/packages/SystemUI/res/values-eu/strings_tv.xml
similarity index 100%
rename from packages/SystemUI/res/values-eu-rES/strings_tv.xml
rename to packages/SystemUI/res/values-eu/strings_tv.xml
diff --git a/packages/SystemUI/res/values-gl-rES-land/strings.xml b/packages/SystemUI/res/values-gl-land/strings.xml
similarity index 100%
rename from packages/SystemUI/res/values-gl-rES-land/strings.xml
rename to packages/SystemUI/res/values-gl-land/strings.xml
diff --git a/packages/SystemUI/res/values-gl-rGA-land/strings.xml b/packages/SystemUI/res/values-gl-rGA-land/strings.xml
deleted file mode 100644
index f0b7507..0000000
--- a/packages/SystemUI/res/values-gl-rGA-land/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2010, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="toast_rotation_locked" msgid="7609673011431556092">"Agora a pantalla está bloqueada en orientación horizontal."</string>
-</resources>
diff --git a/packages/SystemUI/res/values-gl-rES/config.xml b/packages/SystemUI/res/values-gl/config.xml
similarity index 100%
rename from packages/SystemUI/res/values-gl-rES/config.xml
rename to packages/SystemUI/res/values-gl/config.xml
diff --git a/packages/SystemUI/res/values-gl-rES/strings.xml b/packages/SystemUI/res/values-gl/strings.xml
similarity index 100%
rename from packages/SystemUI/res/values-gl-rES/strings.xml
rename to packages/SystemUI/res/values-gl/strings.xml
diff --git a/packages/SystemUI/res/values-gl-rES/strings_car.xml b/packages/SystemUI/res/values-gl/strings_car.xml
similarity index 100%
rename from packages/SystemUI/res/values-gl-rES/strings_car.xml
rename to packages/SystemUI/res/values-gl/strings_car.xml
diff --git a/packages/SystemUI/res/values-gl-rES/strings_tv.xml b/packages/SystemUI/res/values-gl/strings_tv.xml
similarity index 100%
rename from packages/SystemUI/res/values-gl-rES/strings_tv.xml
rename to packages/SystemUI/res/values-gl/strings_tv.xml
diff --git a/packages/SystemUI/res/values-gu-rIN-land/strings.xml b/packages/SystemUI/res/values-gu-land/strings.xml
similarity index 100%
rename from packages/SystemUI/res/values-gu-rIN-land/strings.xml
rename to packages/SystemUI/res/values-gu-land/strings.xml
diff --git a/packages/SystemUI/res/values-gu-rIN/config.xml b/packages/SystemUI/res/values-gu/config.xml
similarity index 100%
rename from packages/SystemUI/res/values-gu-rIN/config.xml
rename to packages/SystemUI/res/values-gu/config.xml
diff --git a/packages/SystemUI/res/values-gu-rIN/strings.xml b/packages/SystemUI/res/values-gu/strings.xml
similarity index 100%
rename from packages/SystemUI/res/values-gu-rIN/strings.xml
rename to packages/SystemUI/res/values-gu/strings.xml
diff --git a/packages/SystemUI/res/values-gu-rIN/strings_car.xml b/packages/SystemUI/res/values-gu/strings_car.xml
similarity index 100%
rename from packages/SystemUI/res/values-gu-rIN/strings_car.xml
rename to packages/SystemUI/res/values-gu/strings_car.xml
diff --git a/packages/SystemUI/res/values-gu-rIN/strings_tv.xml b/packages/SystemUI/res/values-gu/strings_tv.xml
similarity index 100%
rename from packages/SystemUI/res/values-gu-rIN/strings_tv.xml
rename to packages/SystemUI/res/values-gu/strings_tv.xml
diff --git a/packages/SystemUI/res/values-hy-rAM-land/strings.xml b/packages/SystemUI/res/values-hy-rAM-land/strings.xml
deleted file mode 100644
index 7c0535c..0000000
--- a/packages/SystemUI/res/values-hy-rAM-land/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2010, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="toast_rotation_locked" msgid="7609673011431556092">"Էկրանն այժմ կողպված է հորիզոնական դիրքավորման մեջ:"</string>
-</resources>
diff --git a/packages/SystemUI/res/values-hy-rAM/config.xml b/packages/SystemUI/res/values-hy/config.xml
similarity index 100%
rename from packages/SystemUI/res/values-hy-rAM/config.xml
rename to packages/SystemUI/res/values-hy/config.xml
diff --git a/packages/SystemUI/res/values-hy-rAM/strings.xml b/packages/SystemUI/res/values-hy/strings.xml
similarity index 100%
rename from packages/SystemUI/res/values-hy-rAM/strings.xml
rename to packages/SystemUI/res/values-hy/strings.xml
diff --git a/packages/SystemUI/res/values-hy-rAM/strings_car.xml b/packages/SystemUI/res/values-hy/strings_car.xml
similarity index 100%
rename from packages/SystemUI/res/values-hy-rAM/strings_car.xml
rename to packages/SystemUI/res/values-hy/strings_car.xml
diff --git a/packages/SystemUI/res/values-hy-rAM/strings_tv.xml b/packages/SystemUI/res/values-hy/strings_tv.xml
similarity index 100%
rename from packages/SystemUI/res/values-hy-rAM/strings_tv.xml
rename to packages/SystemUI/res/values-hy/strings_tv.xml
diff --git a/packages/SystemUI/res/values-is-rIS-land/strings.xml b/packages/SystemUI/res/values-is-land/strings.xml
similarity index 100%
rename from packages/SystemUI/res/values-is-rIS-land/strings.xml
rename to packages/SystemUI/res/values-is-land/strings.xml
diff --git a/packages/SystemUI/res/values-is-rIS/config.xml b/packages/SystemUI/res/values-is/config.xml
similarity index 100%
rename from packages/SystemUI/res/values-is-rIS/config.xml
rename to packages/SystemUI/res/values-is/config.xml
diff --git a/packages/SystemUI/res/values-is-rIS/strings.xml b/packages/SystemUI/res/values-is/strings.xml
similarity index 100%
rename from packages/SystemUI/res/values-is-rIS/strings.xml
rename to packages/SystemUI/res/values-is/strings.xml
diff --git a/packages/SystemUI/res/values-is-rIS/strings_car.xml b/packages/SystemUI/res/values-is/strings_car.xml
similarity index 100%
rename from packages/SystemUI/res/values-is-rIS/strings_car.xml
rename to packages/SystemUI/res/values-is/strings_car.xml
diff --git a/packages/SystemUI/res/values-is-rIS/strings_tv.xml b/packages/SystemUI/res/values-is/strings_tv.xml
similarity index 100%
rename from packages/SystemUI/res/values-is-rIS/strings_tv.xml
rename to packages/SystemUI/res/values-is/strings_tv.xml
diff --git a/packages/SystemUI/res/values-ka-rGE-land/strings.xml b/packages/SystemUI/res/values-ka-rGE-land/strings.xml
deleted file mode 100644
index 3f20938..0000000
--- a/packages/SystemUI/res/values-ka-rGE-land/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2010, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="toast_rotation_locked" msgid="7609673011431556092">"ეკრანი ამჟამად დაბლოკილია თარაზულ ორიენტაციაში"</string>
-</resources>
diff --git a/packages/SystemUI/res/values-ka-rGE/config.xml b/packages/SystemUI/res/values-ka/config.xml
similarity index 100%
rename from packages/SystemUI/res/values-ka-rGE/config.xml
rename to packages/SystemUI/res/values-ka/config.xml
diff --git a/packages/SystemUI/res/values-ka-rGE/strings.xml b/packages/SystemUI/res/values-ka/strings.xml
similarity index 100%
rename from packages/SystemUI/res/values-ka-rGE/strings.xml
rename to packages/SystemUI/res/values-ka/strings.xml
diff --git a/packages/SystemUI/res/values-ka-rGE/strings_car.xml b/packages/SystemUI/res/values-ka/strings_car.xml
similarity index 100%
rename from packages/SystemUI/res/values-ka-rGE/strings_car.xml
rename to packages/SystemUI/res/values-ka/strings_car.xml
diff --git a/packages/SystemUI/res/values-ka-rGE/strings_tv.xml b/packages/SystemUI/res/values-ka/strings_tv.xml
similarity index 100%
rename from packages/SystemUI/res/values-ka-rGE/strings_tv.xml
rename to packages/SystemUI/res/values-ka/strings_tv.xml
diff --git a/packages/SystemUI/res/values-kk-rKZ-land/strings.xml b/packages/SystemUI/res/values-kk-land/strings.xml
similarity index 100%
rename from packages/SystemUI/res/values-kk-rKZ-land/strings.xml
rename to packages/SystemUI/res/values-kk-land/strings.xml
diff --git a/packages/SystemUI/res/values-kk-rKZ/config.xml b/packages/SystemUI/res/values-kk/config.xml
similarity index 100%
rename from packages/SystemUI/res/values-kk-rKZ/config.xml
rename to packages/SystemUI/res/values-kk/config.xml
diff --git a/packages/SystemUI/res/values-kk-rKZ/strings.xml b/packages/SystemUI/res/values-kk/strings.xml
similarity index 100%
rename from packages/SystemUI/res/values-kk-rKZ/strings.xml
rename to packages/SystemUI/res/values-kk/strings.xml
diff --git a/packages/SystemUI/res/values-kk-rKZ/strings_car.xml b/packages/SystemUI/res/values-kk/strings_car.xml
similarity index 100%
rename from packages/SystemUI/res/values-kk-rKZ/strings_car.xml
rename to packages/SystemUI/res/values-kk/strings_car.xml
diff --git a/packages/SystemUI/res/values-kk-rKZ/strings_tv.xml b/packages/SystemUI/res/values-kk/strings_tv.xml
similarity index 100%
rename from packages/SystemUI/res/values-kk-rKZ/strings_tv.xml
rename to packages/SystemUI/res/values-kk/strings_tv.xml
diff --git a/packages/SystemUI/res/values-km-rKH-land/strings.xml b/packages/SystemUI/res/values-km-rKH-land/strings.xml
deleted file mode 100644
index f148cc3..0000000
--- a/packages/SystemUI/res/values-km-rKH-land/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2010, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="toast_rotation_locked" msgid="7609673011431556092">"ឥឡូវអេក្រង់ជាប់សោក្នុងទិសផ្ដេក។"</string>
-</resources>
diff --git a/packages/SystemUI/res/values-km-rKH/config.xml b/packages/SystemUI/res/values-km/config.xml
similarity index 100%
rename from packages/SystemUI/res/values-km-rKH/config.xml
rename to packages/SystemUI/res/values-km/config.xml
diff --git a/packages/SystemUI/res/values-km-rKH/strings.xml b/packages/SystemUI/res/values-km/strings.xml
similarity index 100%
rename from packages/SystemUI/res/values-km-rKH/strings.xml
rename to packages/SystemUI/res/values-km/strings.xml
diff --git a/packages/SystemUI/res/values-km-rKH/strings_car.xml b/packages/SystemUI/res/values-km/strings_car.xml
similarity index 100%
rename from packages/SystemUI/res/values-km-rKH/strings_car.xml
rename to packages/SystemUI/res/values-km/strings_car.xml
diff --git a/packages/SystemUI/res/values-km-rKH/strings_tv.xml b/packages/SystemUI/res/values-km/strings_tv.xml
similarity index 100%
rename from packages/SystemUI/res/values-km-rKH/strings_tv.xml
rename to packages/SystemUI/res/values-km/strings_tv.xml
diff --git a/packages/SystemUI/res/values-kn-rIN-land/strings.xml b/packages/SystemUI/res/values-kn-land/strings.xml
similarity index 100%
rename from packages/SystemUI/res/values-kn-rIN-land/strings.xml
rename to packages/SystemUI/res/values-kn-land/strings.xml
diff --git a/packages/SystemUI/res/values-kn-rKA-land/strings.xml b/packages/SystemUI/res/values-kn-rKA-land/strings.xml
deleted file mode 100644
index 640389f..0000000
--- a/packages/SystemUI/res/values-kn-rKA-land/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2010, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="toast_rotation_locked" msgid="7609673011431556092">"ಪರದೆಯು ಇದೀಗ ಲ್ಯಾಂಡ್ಸ್ಕೇಪ್ ಒರಿಯಂಟೇಶನ್ನಲ್ಲಿ ಲಾಕ್ ಆಗಿದೆ."</string>
-</resources>
diff --git a/packages/SystemUI/res/values-kn-rIN/config.xml b/packages/SystemUI/res/values-kn/config.xml
similarity index 100%
rename from packages/SystemUI/res/values-kn-rIN/config.xml
rename to packages/SystemUI/res/values-kn/config.xml
diff --git a/packages/SystemUI/res/values-kn-rIN/strings.xml b/packages/SystemUI/res/values-kn/strings.xml
similarity index 100%
rename from packages/SystemUI/res/values-kn-rIN/strings.xml
rename to packages/SystemUI/res/values-kn/strings.xml
diff --git a/packages/SystemUI/res/values-kn-rIN/strings_car.xml b/packages/SystemUI/res/values-kn/strings_car.xml
similarity index 100%
rename from packages/SystemUI/res/values-kn-rIN/strings_car.xml
rename to packages/SystemUI/res/values-kn/strings_car.xml
diff --git a/packages/SystemUI/res/values-kn-rIN/strings_tv.xml b/packages/SystemUI/res/values-kn/strings_tv.xml
similarity index 100%
rename from packages/SystemUI/res/values-kn-rIN/strings_tv.xml
rename to packages/SystemUI/res/values-kn/strings_tv.xml
diff --git a/packages/SystemUI/res/values-ky-rKG-land/strings.xml b/packages/SystemUI/res/values-ky-land/strings.xml
similarity index 100%
rename from packages/SystemUI/res/values-ky-rKG-land/strings.xml
rename to packages/SystemUI/res/values-ky-land/strings.xml
diff --git a/packages/SystemUI/res/values-ky-rKG/config.xml b/packages/SystemUI/res/values-ky/config.xml
similarity index 100%
rename from packages/SystemUI/res/values-ky-rKG/config.xml
rename to packages/SystemUI/res/values-ky/config.xml
diff --git a/packages/SystemUI/res/values-ky-rKG/strings.xml b/packages/SystemUI/res/values-ky/strings.xml
similarity index 100%
rename from packages/SystemUI/res/values-ky-rKG/strings.xml
rename to packages/SystemUI/res/values-ky/strings.xml
diff --git a/packages/SystemUI/res/values-ky-rKG/strings_car.xml b/packages/SystemUI/res/values-ky/strings_car.xml
similarity index 100%
rename from packages/SystemUI/res/values-ky-rKG/strings_car.xml
rename to packages/SystemUI/res/values-ky/strings_car.xml
diff --git a/packages/SystemUI/res/values-ky-rKG/strings_tv.xml b/packages/SystemUI/res/values-ky/strings_tv.xml
similarity index 100%
rename from packages/SystemUI/res/values-ky-rKG/strings_tv.xml
rename to packages/SystemUI/res/values-ky/strings_tv.xml
diff --git a/packages/SystemUI/res/values-lo-rLA-land/strings.xml b/packages/SystemUI/res/values-lo-rLA-land/strings.xml
deleted file mode 100644
index a838a15..0000000
--- a/packages/SystemUI/res/values-lo-rLA-land/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2010, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="toast_rotation_locked" msgid="7609673011431556092">"ໜ້າຈໍຕອນນີ້ຖືກລັອກໄວ້ໃນແບບລວງນອນ."</string>
-</resources>
diff --git a/packages/SystemUI/res/values-lo-rLA/config.xml b/packages/SystemUI/res/values-lo/config.xml
similarity index 100%
rename from packages/SystemUI/res/values-lo-rLA/config.xml
rename to packages/SystemUI/res/values-lo/config.xml
diff --git a/packages/SystemUI/res/values-lo-rLA/strings.xml b/packages/SystemUI/res/values-lo/strings.xml
similarity index 100%
rename from packages/SystemUI/res/values-lo-rLA/strings.xml
rename to packages/SystemUI/res/values-lo/strings.xml
diff --git a/packages/SystemUI/res/values-lo-rLA/strings_car.xml b/packages/SystemUI/res/values-lo/strings_car.xml
similarity index 100%
rename from packages/SystemUI/res/values-lo-rLA/strings_car.xml
rename to packages/SystemUI/res/values-lo/strings_car.xml
diff --git a/packages/SystemUI/res/values-lo-rLA/strings_tv.xml b/packages/SystemUI/res/values-lo/strings_tv.xml
similarity index 100%
rename from packages/SystemUI/res/values-lo-rLA/strings_tv.xml
rename to packages/SystemUI/res/values-lo/strings_tv.xml
diff --git a/packages/SystemUI/res/values-mk-rMK-land/strings.xml b/packages/SystemUI/res/values-mk-land/strings.xml
similarity index 100%
rename from packages/SystemUI/res/values-mk-rMK-land/strings.xml
rename to packages/SystemUI/res/values-mk-land/strings.xml
diff --git a/packages/SystemUI/res/values-mk-rMK/config.xml b/packages/SystemUI/res/values-mk/config.xml
similarity index 100%
rename from packages/SystemUI/res/values-mk-rMK/config.xml
rename to packages/SystemUI/res/values-mk/config.xml
diff --git a/packages/SystemUI/res/values-mk-rMK/strings.xml b/packages/SystemUI/res/values-mk/strings.xml
similarity index 100%
rename from packages/SystemUI/res/values-mk-rMK/strings.xml
rename to packages/SystemUI/res/values-mk/strings.xml
diff --git a/packages/SystemUI/res/values-mk-rMK/strings_car.xml b/packages/SystemUI/res/values-mk/strings_car.xml
similarity index 100%
rename from packages/SystemUI/res/values-mk-rMK/strings_car.xml
rename to packages/SystemUI/res/values-mk/strings_car.xml
diff --git a/packages/SystemUI/res/values-mk-rMK/strings_tv.xml b/packages/SystemUI/res/values-mk/strings_tv.xml
similarity index 100%
rename from packages/SystemUI/res/values-mk-rMK/strings_tv.xml
rename to packages/SystemUI/res/values-mk/strings_tv.xml
diff --git a/packages/SystemUI/res/values-ml-rIN-land/strings.xml b/packages/SystemUI/res/values-ml-land/strings.xml
similarity index 100%
rename from packages/SystemUI/res/values-ml-rIN-land/strings.xml
rename to packages/SystemUI/res/values-ml-land/strings.xml
diff --git a/packages/SystemUI/res/values-ml-rKL-land/strings.xml b/packages/SystemUI/res/values-ml-rKL-land/strings.xml
deleted file mode 100644
index 97338ee..0000000
--- a/packages/SystemUI/res/values-ml-rKL-land/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2010, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="toast_rotation_locked" msgid="7609673011431556092">"ലാൻഡ്സ്കേപ്പ് ഓറിയന്റേഷനിൽ സ്ക്രീൻ ലോക്കുചെയ്തു."</string>
-</resources>
diff --git a/packages/SystemUI/res/values-ml-rIN/config.xml b/packages/SystemUI/res/values-ml/config.xml
similarity index 100%
rename from packages/SystemUI/res/values-ml-rIN/config.xml
rename to packages/SystemUI/res/values-ml/config.xml
diff --git a/packages/SystemUI/res/values-ml-rIN/strings.xml b/packages/SystemUI/res/values-ml/strings.xml
similarity index 100%
rename from packages/SystemUI/res/values-ml-rIN/strings.xml
rename to packages/SystemUI/res/values-ml/strings.xml
diff --git a/packages/SystemUI/res/values-ml-rIN/strings_car.xml b/packages/SystemUI/res/values-ml/strings_car.xml
similarity index 100%
rename from packages/SystemUI/res/values-ml-rIN/strings_car.xml
rename to packages/SystemUI/res/values-ml/strings_car.xml
diff --git a/packages/SystemUI/res/values-ml-rIN/strings_tv.xml b/packages/SystemUI/res/values-ml/strings_tv.xml
similarity index 100%
rename from packages/SystemUI/res/values-ml-rIN/strings_tv.xml
rename to packages/SystemUI/res/values-ml/strings_tv.xml
diff --git a/packages/SystemUI/res/values-mn-rMN-land/strings.xml b/packages/SystemUI/res/values-mn-rMN-land/strings.xml
deleted file mode 100644
index ec4616f..0000000
--- a/packages/SystemUI/res/values-mn-rMN-land/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2010, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="toast_rotation_locked" msgid="7609673011431556092">"Дэлгэц хэвтээ чиглэлд түгжигдсэн."</string>
-</resources>
diff --git a/packages/SystemUI/res/values-mn-rMN/config.xml b/packages/SystemUI/res/values-mn/config.xml
similarity index 100%
rename from packages/SystemUI/res/values-mn-rMN/config.xml
rename to packages/SystemUI/res/values-mn/config.xml
diff --git a/packages/SystemUI/res/values-mn-rMN/strings.xml b/packages/SystemUI/res/values-mn/strings.xml
similarity index 100%
rename from packages/SystemUI/res/values-mn-rMN/strings.xml
rename to packages/SystemUI/res/values-mn/strings.xml
diff --git a/packages/SystemUI/res/values-mn-rMN/strings_car.xml b/packages/SystemUI/res/values-mn/strings_car.xml
similarity index 100%
rename from packages/SystemUI/res/values-mn-rMN/strings_car.xml
rename to packages/SystemUI/res/values-mn/strings_car.xml
diff --git a/packages/SystemUI/res/values-mn-rMN/strings_tv.xml b/packages/SystemUI/res/values-mn/strings_tv.xml
similarity index 100%
rename from packages/SystemUI/res/values-mn-rMN/strings_tv.xml
rename to packages/SystemUI/res/values-mn/strings_tv.xml
diff --git a/packages/SystemUI/res/values-mr-rIN-land/strings.xml b/packages/SystemUI/res/values-mr-land/strings.xml
similarity index 100%
rename from packages/SystemUI/res/values-mr-rIN-land/strings.xml
rename to packages/SystemUI/res/values-mr-land/strings.xml
diff --git a/packages/SystemUI/res/values-mr-rMH-land/strings.xml b/packages/SystemUI/res/values-mr-rMH-land/strings.xml
deleted file mode 100644
index fd3ba77..0000000
--- a/packages/SystemUI/res/values-mr-rMH-land/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2010, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="toast_rotation_locked" msgid="7609673011431556092">"स्क्रीन आता भूदृश्य अभिमुखतेत लॉक केली आहे."</string>
-</resources>
diff --git a/packages/SystemUI/res/values-mr-rIN/config.xml b/packages/SystemUI/res/values-mr/config.xml
similarity index 100%
rename from packages/SystemUI/res/values-mr-rIN/config.xml
rename to packages/SystemUI/res/values-mr/config.xml
diff --git a/packages/SystemUI/res/values-mr-rIN/strings.xml b/packages/SystemUI/res/values-mr/strings.xml
similarity index 100%
rename from packages/SystemUI/res/values-mr-rIN/strings.xml
rename to packages/SystemUI/res/values-mr/strings.xml
diff --git a/packages/SystemUI/res/values-mr-rIN/strings_car.xml b/packages/SystemUI/res/values-mr/strings_car.xml
similarity index 100%
rename from packages/SystemUI/res/values-mr-rIN/strings_car.xml
rename to packages/SystemUI/res/values-mr/strings_car.xml
diff --git a/packages/SystemUI/res/values-mr-rIN/strings_tv.xml b/packages/SystemUI/res/values-mr/strings_tv.xml
similarity index 100%
rename from packages/SystemUI/res/values-mr-rIN/strings_tv.xml
rename to packages/SystemUI/res/values-mr/strings_tv.xml
diff --git a/packages/SystemUI/res/values-ms-rMY-land/strings.xml b/packages/SystemUI/res/values-ms-rMY-land/strings.xml
deleted file mode 100644
index 175b0fa..0000000
--- a/packages/SystemUI/res/values-ms-rMY-land/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2010, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="toast_rotation_locked" msgid="7609673011431556092">"Skrin kini dikunci dalam orientasi landskap."</string>
-</resources>
diff --git a/packages/SystemUI/res/values-ms-rMY/config.xml b/packages/SystemUI/res/values-ms/config.xml
similarity index 100%
rename from packages/SystemUI/res/values-ms-rMY/config.xml
rename to packages/SystemUI/res/values-ms/config.xml
diff --git a/packages/SystemUI/res/values-ms-rMY/strings.xml b/packages/SystemUI/res/values-ms/strings.xml
similarity index 100%
rename from packages/SystemUI/res/values-ms-rMY/strings.xml
rename to packages/SystemUI/res/values-ms/strings.xml
diff --git a/packages/SystemUI/res/values-ms-rMY/strings_car.xml b/packages/SystemUI/res/values-ms/strings_car.xml
similarity index 100%
rename from packages/SystemUI/res/values-ms-rMY/strings_car.xml
rename to packages/SystemUI/res/values-ms/strings_car.xml
diff --git a/packages/SystemUI/res/values-ms-rMY/strings_tv.xml b/packages/SystemUI/res/values-ms/strings_tv.xml
similarity index 100%
rename from packages/SystemUI/res/values-ms-rMY/strings_tv.xml
rename to packages/SystemUI/res/values-ms/strings_tv.xml
diff --git a/packages/SystemUI/res/values-my-rMM-land/strings.xml b/packages/SystemUI/res/values-my-land/strings.xml
similarity index 100%
rename from packages/SystemUI/res/values-my-rMM-land/strings.xml
rename to packages/SystemUI/res/values-my-land/strings.xml
diff --git a/packages/SystemUI/res/values-my-rMM/config.xml b/packages/SystemUI/res/values-my/config.xml
similarity index 100%
rename from packages/SystemUI/res/values-my-rMM/config.xml
rename to packages/SystemUI/res/values-my/config.xml
diff --git a/packages/SystemUI/res/values-my-rMM/strings.xml b/packages/SystemUI/res/values-my/strings.xml
similarity index 100%
rename from packages/SystemUI/res/values-my-rMM/strings.xml
rename to packages/SystemUI/res/values-my/strings.xml
diff --git a/packages/SystemUI/res/values-my-rMM/strings_car.xml b/packages/SystemUI/res/values-my/strings_car.xml
similarity index 100%
rename from packages/SystemUI/res/values-my-rMM/strings_car.xml
rename to packages/SystemUI/res/values-my/strings_car.xml
diff --git a/packages/SystemUI/res/values-my-rMM/strings_tv.xml b/packages/SystemUI/res/values-my/strings_tv.xml
similarity index 100%
rename from packages/SystemUI/res/values-my-rMM/strings_tv.xml
rename to packages/SystemUI/res/values-my/strings_tv.xml
diff --git a/packages/SystemUI/res/values-ne-rNP-land/strings.xml b/packages/SystemUI/res/values-ne-rNP-land/strings.xml
deleted file mode 100644
index 8d5286e..0000000
--- a/packages/SystemUI/res/values-ne-rNP-land/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2010, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="toast_rotation_locked" msgid="7609673011431556092">"स्क्रिन अहिले ल्यान्डस्केप अवस्थामा बन्द छ।"</string>
-</resources>
diff --git a/packages/SystemUI/res/values-ne-rNP/config.xml b/packages/SystemUI/res/values-ne/config.xml
similarity index 100%
rename from packages/SystemUI/res/values-ne-rNP/config.xml
rename to packages/SystemUI/res/values-ne/config.xml
diff --git a/packages/SystemUI/res/values-ne-rNP/strings.xml b/packages/SystemUI/res/values-ne/strings.xml
similarity index 100%
rename from packages/SystemUI/res/values-ne-rNP/strings.xml
rename to packages/SystemUI/res/values-ne/strings.xml
diff --git a/packages/SystemUI/res/values-ne-rNP/strings_car.xml b/packages/SystemUI/res/values-ne/strings_car.xml
similarity index 100%
rename from packages/SystemUI/res/values-ne-rNP/strings_car.xml
rename to packages/SystemUI/res/values-ne/strings_car.xml
diff --git a/packages/SystemUI/res/values-ne-rNP/strings_tv.xml b/packages/SystemUI/res/values-ne/strings_tv.xml
similarity index 100%
rename from packages/SystemUI/res/values-ne-rNP/strings_tv.xml
rename to packages/SystemUI/res/values-ne/strings_tv.xml
diff --git a/packages/SystemUI/res/values-pa-rIN-land/strings.xml b/packages/SystemUI/res/values-pa-land/strings.xml
similarity index 100%
rename from packages/SystemUI/res/values-pa-rIN-land/strings.xml
rename to packages/SystemUI/res/values-pa-land/strings.xml
diff --git a/packages/SystemUI/res/values-pa-rIN/config.xml b/packages/SystemUI/res/values-pa/config.xml
similarity index 100%
rename from packages/SystemUI/res/values-pa-rIN/config.xml
rename to packages/SystemUI/res/values-pa/config.xml
diff --git a/packages/SystemUI/res/values-pa-rIN/strings.xml b/packages/SystemUI/res/values-pa/strings.xml
similarity index 100%
rename from packages/SystemUI/res/values-pa-rIN/strings.xml
rename to packages/SystemUI/res/values-pa/strings.xml
diff --git a/packages/SystemUI/res/values-pa-rIN/strings_car.xml b/packages/SystemUI/res/values-pa/strings_car.xml
similarity index 100%
rename from packages/SystemUI/res/values-pa-rIN/strings_car.xml
rename to packages/SystemUI/res/values-pa/strings_car.xml
diff --git a/packages/SystemUI/res/values-pa-rIN/strings_tv.xml b/packages/SystemUI/res/values-pa/strings_tv.xml
similarity index 100%
rename from packages/SystemUI/res/values-pa-rIN/strings_tv.xml
rename to packages/SystemUI/res/values-pa/strings_tv.xml
diff --git a/packages/SystemUI/res/values-pt-rBR-land/strings.xml b/packages/SystemUI/res/values-pt-rBR-land/strings.xml
deleted file mode 100644
index 7b04e7e..0000000
--- a/packages/SystemUI/res/values-pt-rBR-land/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2010, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="toast_rotation_locked" msgid="7609673011431556092">"A tela está bloqueada na orientação cenário."</string>
-</resources>
diff --git a/packages/SystemUI/res/values-si-rLK-land/strings.xml b/packages/SystemUI/res/values-si-rLK-land/strings.xml
deleted file mode 100644
index b5aba2a..0000000
--- a/packages/SystemUI/res/values-si-rLK-land/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2010, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="toast_rotation_locked" msgid="7609673011431556092">"තිරය දැන් තිරස් දිශානතිය අගුළු දමා ඇත."</string>
-</resources>
diff --git a/packages/SystemUI/res/values-si-rLK/config.xml b/packages/SystemUI/res/values-si/config.xml
similarity index 100%
rename from packages/SystemUI/res/values-si-rLK/config.xml
rename to packages/SystemUI/res/values-si/config.xml
diff --git a/packages/SystemUI/res/values-si-rLK/strings.xml b/packages/SystemUI/res/values-si/strings.xml
similarity index 100%
rename from packages/SystemUI/res/values-si-rLK/strings.xml
rename to packages/SystemUI/res/values-si/strings.xml
diff --git a/packages/SystemUI/res/values-si-rLK/strings_car.xml b/packages/SystemUI/res/values-si/strings_car.xml
similarity index 100%
rename from packages/SystemUI/res/values-si-rLK/strings_car.xml
rename to packages/SystemUI/res/values-si/strings_car.xml
diff --git a/packages/SystemUI/res/values-si-rLK/strings_tv.xml b/packages/SystemUI/res/values-si/strings_tv.xml
similarity index 100%
rename from packages/SystemUI/res/values-si-rLK/strings_tv.xml
rename to packages/SystemUI/res/values-si/strings_tv.xml
diff --git a/packages/SystemUI/res/values-sq-rAL-land/strings.xml b/packages/SystemUI/res/values-sq-land/strings.xml
similarity index 100%
rename from packages/SystemUI/res/values-sq-rAL-land/strings.xml
rename to packages/SystemUI/res/values-sq-land/strings.xml
diff --git a/packages/SystemUI/res/values-sq-rAL/config.xml b/packages/SystemUI/res/values-sq/config.xml
similarity index 100%
rename from packages/SystemUI/res/values-sq-rAL/config.xml
rename to packages/SystemUI/res/values-sq/config.xml
diff --git a/packages/SystemUI/res/values-sq-rAL/strings.xml b/packages/SystemUI/res/values-sq/strings.xml
similarity index 100%
rename from packages/SystemUI/res/values-sq-rAL/strings.xml
rename to packages/SystemUI/res/values-sq/strings.xml
diff --git a/packages/SystemUI/res/values-sq-rAL/strings_car.xml b/packages/SystemUI/res/values-sq/strings_car.xml
similarity index 100%
rename from packages/SystemUI/res/values-sq-rAL/strings_car.xml
rename to packages/SystemUI/res/values-sq/strings_car.xml
diff --git a/packages/SystemUI/res/values-sq-rAL/strings_tv.xml b/packages/SystemUI/res/values-sq/strings_tv.xml
similarity index 100%
rename from packages/SystemUI/res/values-sq-rAL/strings_tv.xml
rename to packages/SystemUI/res/values-sq/strings_tv.xml
diff --git a/packages/SystemUI/res/values-ta-rIN-land/strings.xml b/packages/SystemUI/res/values-ta-land/strings.xml
similarity index 100%
rename from packages/SystemUI/res/values-ta-rIN-land/strings.xml
rename to packages/SystemUI/res/values-ta-land/strings.xml
diff --git a/packages/SystemUI/res/values-ta-rTN-land/strings.xml b/packages/SystemUI/res/values-ta-rTN-land/strings.xml
deleted file mode 100644
index 6ad7229..0000000
--- a/packages/SystemUI/res/values-ta-rTN-land/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2010, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="toast_rotation_locked" msgid="7609673011431556092">"தற்போது திரை நிலைபரப்பு திசையமைப்பில் பூட்டப்பட்டுள்ளது."</string>
-</resources>
diff --git a/packages/SystemUI/res/values-ta-rIN/config.xml b/packages/SystemUI/res/values-ta/config.xml
similarity index 100%
rename from packages/SystemUI/res/values-ta-rIN/config.xml
rename to packages/SystemUI/res/values-ta/config.xml
diff --git a/packages/SystemUI/res/values-ta-rIN/strings.xml b/packages/SystemUI/res/values-ta/strings.xml
similarity index 100%
rename from packages/SystemUI/res/values-ta-rIN/strings.xml
rename to packages/SystemUI/res/values-ta/strings.xml
diff --git a/packages/SystemUI/res/values-ta-rIN/strings_car.xml b/packages/SystemUI/res/values-ta/strings_car.xml
similarity index 100%
rename from packages/SystemUI/res/values-ta-rIN/strings_car.xml
rename to packages/SystemUI/res/values-ta/strings_car.xml
diff --git a/packages/SystemUI/res/values-ta-rIN/strings_tv.xml b/packages/SystemUI/res/values-ta/strings_tv.xml
similarity index 100%
rename from packages/SystemUI/res/values-ta-rIN/strings_tv.xml
rename to packages/SystemUI/res/values-ta/strings_tv.xml
diff --git a/packages/SystemUI/res/values-te-rAP-land/strings.xml b/packages/SystemUI/res/values-te-land/strings.xml
similarity index 100%
rename from packages/SystemUI/res/values-te-rAP-land/strings.xml
rename to packages/SystemUI/res/values-te-land/strings.xml
diff --git a/packages/SystemUI/res/values-te-rIN-land/strings.xml b/packages/SystemUI/res/values-te-rIN-land/strings.xml
deleted file mode 100644
index cc9de13..0000000
--- a/packages/SystemUI/res/values-te-rIN-land/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Copyright (c) 2010, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="toast_rotation_locked" msgid="7609673011431556092">"స్క్రీన్ ఇప్పుడు ల్యాండ్స్కేప్ దృగ్విన్యాసంలో లాక్ చేయబడింది."</string>
-</resources>
diff --git a/packages/SystemUI/res/values-te-rIN/config.xml b/packages/SystemUI/res/values-te/config.xml
similarity index 100%
rename from packages/SystemUI/res/values-te-rIN/config.xml
rename to packages/SystemUI/res/values-te/config.xml
diff --git a/packages/SystemUI/res/values-te-rIN/strings.xml b/packages/SystemUI/res/values-te/strings.xml
similarity index 100%
rename from packages/SystemUI/res/values-te-rIN/strings.xml
rename to packages/SystemUI/res/values-te/strings.xml
diff --git a/packages/SystemUI/res/values-te-rIN/strings_car.xml b/packages/SystemUI/res/values-te/strings_car.xml
similarity index 100%
rename from packages/SystemUI/res/values-te-rIN/strings_car.xml
rename to packages/SystemUI/res/values-te/strings_car.xml
diff --git a/packages/SystemUI/res/values-te-rIN/strings_tv.xml b/packages/SystemUI/res/values-te/strings_tv.xml
similarity index 100%
rename from packages/SystemUI/res/values-te-rIN/strings_tv.xml
rename to packages/SystemUI/res/values-te/strings_tv.xml
diff --git a/packages/SystemUI/res/values-ur-rPK-land/strings.xml b/packages/SystemUI/res/values-ur-land/strings.xml
similarity index 100%
rename from packages/SystemUI/res/values-ur-rPK-land/strings.xml
rename to packages/SystemUI/res/values-ur-land/strings.xml
diff --git a/packages/SystemUI/res/values-ur-rPK/config.xml b/packages/SystemUI/res/values-ur/config.xml
similarity index 100%
rename from packages/SystemUI/res/values-ur-rPK/config.xml
rename to packages/SystemUI/res/values-ur/config.xml
diff --git a/packages/SystemUI/res/values-ur-rPK/strings.xml b/packages/SystemUI/res/values-ur/strings.xml
similarity index 100%
rename from packages/SystemUI/res/values-ur-rPK/strings.xml
rename to packages/SystemUI/res/values-ur/strings.xml
diff --git a/packages/SystemUI/res/values-ur-rPK/strings_car.xml b/packages/SystemUI/res/values-ur/strings_car.xml
similarity index 100%
rename from packages/SystemUI/res/values-ur-rPK/strings_car.xml
rename to packages/SystemUI/res/values-ur/strings_car.xml
diff --git a/packages/SystemUI/res/values-ur-rPK/strings_tv.xml b/packages/SystemUI/res/values-ur/strings_tv.xml
similarity index 100%
rename from packages/SystemUI/res/values-ur-rPK/strings_tv.xml
rename to packages/SystemUI/res/values-ur/strings_tv.xml
diff --git a/packages/SystemUI/res/values-uz-rUZ-land/strings.xml b/packages/SystemUI/res/values-uz-land/strings.xml
similarity index 100%
rename from packages/SystemUI/res/values-uz-rUZ-land/strings.xml
rename to packages/SystemUI/res/values-uz-land/strings.xml
diff --git a/packages/SystemUI/res/values-uz-rUZ/config.xml b/packages/SystemUI/res/values-uz/config.xml
similarity index 100%
rename from packages/SystemUI/res/values-uz-rUZ/config.xml
rename to packages/SystemUI/res/values-uz/config.xml
diff --git a/packages/SystemUI/res/values-uz-rUZ/strings.xml b/packages/SystemUI/res/values-uz/strings.xml
similarity index 100%
rename from packages/SystemUI/res/values-uz-rUZ/strings.xml
rename to packages/SystemUI/res/values-uz/strings.xml
diff --git a/packages/SystemUI/res/values-uz-rUZ/strings_car.xml b/packages/SystemUI/res/values-uz/strings_car.xml
similarity index 100%
rename from packages/SystemUI/res/values-uz-rUZ/strings_car.xml
rename to packages/SystemUI/res/values-uz/strings_car.xml
diff --git a/packages/SystemUI/res/values-uz-rUZ/strings_tv.xml b/packages/SystemUI/res/values-uz/strings_tv.xml
similarity index 100%
rename from packages/SystemUI/res/values-uz-rUZ/strings_tv.xml
rename to packages/SystemUI/res/values-uz/strings_tv.xml
diff --git a/packages/SystemUI/res/values/strings.xml b/packages/SystemUI/res/values/strings.xml
index 34a0397..05963ac 100644
--- a/packages/SystemUI/res/values/strings.xml
+++ b/packages/SystemUI/res/values/strings.xml
@@ -460,6 +460,8 @@
<string name="accessibility_desc_settings">Settings</string>
<!-- Content description for the recent apps panel (not shown on the screen). [CHAR LIMIT=NONE] -->
<string name="accessibility_desc_recent_apps">Overview.</string>
+ <!-- Content description for the graphic shown instead of an activity window while the activity is locked (not shown on the screen). [CHAR LIMIT=NONE] -->
+ <string name="accessibility_desc_work_lock">Work lock screen</string>
<!-- Content description for the close button in the zen mode panel introduction message. [CHAR LIMIT=NONE] -->
<string name="accessibility_desc_close">Close</string>
diff --git a/packages/SystemUI/src/com/android/systemui/SystemUIApplication.java b/packages/SystemUI/src/com/android/systemui/SystemUIApplication.java
index d109ae1..1988023 100644
--- a/packages/SystemUI/src/com/android/systemui/SystemUIApplication.java
+++ b/packages/SystemUI/src/com/android/systemui/SystemUIApplication.java
@@ -80,7 +80,6 @@
ShortcutKeyDispatcher.class,
VendorServices.class,
LatencyTester.class,
- DozeFactory.Initializer.class,
};
/**
diff --git a/packages/SystemUI/src/com/android/systemui/SysuiRestartReceiver.java b/packages/SystemUI/src/com/android/systemui/SysuiRestartReceiver.java
new file mode 100644
index 0000000..cdeef2f
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/SysuiRestartReceiver.java
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the
+ * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+package com.android.systemui;
+
+import android.app.NotificationManager;
+import android.content.BroadcastReceiver;
+import android.content.Context;
+import android.content.Intent;
+import android.os.Process;
+
+import com.android.internal.messages.nano.SystemMessageProto.SystemMessage;
+
+public class SysuiRestartReceiver extends BroadcastReceiver {
+
+ public static String ACTION = "com.android.systemui.action.RESTART";
+
+ @Override
+ public void onReceive(Context context, Intent intent) {
+ if (ACTION.equals(intent.getAction())) {
+ String pkg = intent.getData().toString().substring(10);
+ NotificationManager.from(context).cancel(pkg, SystemMessage.NOTE_PLUGIN);
+ Process.killProcess(Process.myPid());
+ }
+ }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/doze/DozeFactory.java b/packages/SystemUI/src/com/android/systemui/doze/DozeFactory.java
index 5b10756..aa22618 100644
--- a/packages/SystemUI/src/com/android/systemui/doze/DozeFactory.java
+++ b/packages/SystemUI/src/com/android/systemui/doze/DozeFactory.java
@@ -34,31 +34,10 @@
public class DozeFactory {
- private static DozeFactory sInstance;
+ private final DozeProvider mDozePlugin;
- private DozeProvider mDozePlugin;
-
- /** Returns the singleton instance. */
- public static DozeFactory getInstance(Context context) {
- if (sInstance == null) {
- sInstance = new DozeFactory();
- PluginManager.getInstance(context).addPluginListener(DozeProvider.ACTION,
- new PluginListener<DozeProvider>() {
- @Override
- public void onPluginConnected(DozeProvider plugin) {
- sInstance.mDozePlugin = plugin;
- }
-
- @Override
- public void onPluginDisconnected(DozeProvider plugin) {
- if (sInstance.mDozePlugin == plugin) {
- sInstance.mDozePlugin = null;
- }
- }
- },
- DozeProvider.VERSION, false /* Only one */);
- }
- return sInstance;
+ public DozeFactory(DozeProvider plugin) {
+ mDozePlugin = plugin;
}
/** Creates a DozeMachine with its parts for {@code dozeService}. */
@@ -173,7 +152,7 @@
}
}
- private static DozeHost getHost(DozeService service) {
+ public static DozeHost getHost(DozeService service) {
Application appCandidate = service.getApplication();
final SystemUIApplication app = (SystemUIApplication) appCandidate;
return app.getComponent(DozeHost.class);
@@ -202,13 +181,4 @@
return mInner.wrap(runnable);
}
}
-
- /** Hack: We need to initialize the plugin listener before doze actually starts.
- * This will be unnecessary once we have proper one-shot support */
- public static class Initializer extends SystemUI {
- @Override
- public void start() {
- getInstance(mContext);
- }
- }
}
diff --git a/packages/SystemUI/src/com/android/systemui/doze/DozeService.java b/packages/SystemUI/src/com/android/systemui/doze/DozeService.java
index 78b96b3..828728f 100644
--- a/packages/SystemUI/src/com/android/systemui/doze/DozeService.java
+++ b/packages/SystemUI/src/com/android/systemui/doze/DozeService.java
@@ -19,6 +19,10 @@
import android.service.dreams.DreamService;
import android.util.Log;
+import com.android.systemui.plugins.Plugin;
+import com.android.systemui.plugins.PluginManager;
+import com.android.systemui.plugins.doze.DozeProvider;
+
import java.io.FileDescriptor;
import java.io.PrintWriter;
@@ -38,7 +42,14 @@
setWindowless(true);
- mDozeMachine = DozeFactory.getInstance(getApplication()).assembleMachine(this);
+ if (DozeFactory.getHost(this) == null) {
+ finish();
+ return;
+ }
+
+ DozeProvider provider = PluginManager.getInstance(this)
+ .getOneShotPlugin(DozeProvider.ACTION, DozeProvider.VERSION);
+ mDozeMachine = new DozeFactory(provider).assembleMachine(this);
}
@Override
@@ -56,6 +67,8 @@
@Override
protected void dumpOnHandler(FileDescriptor fd, PrintWriter pw, String[] args) {
- mDozeMachine.dump(pw);
+ if (mDozeMachine != null) {
+ mDozeMachine.dump(pw);
+ }
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
index 8e5db97..ce89aab 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
@@ -326,6 +326,12 @@
*/
private boolean mPendingLock;
+ /**
+ * Controller for showing individual "work challenge" lock screen windows inside managed profile
+ * tasks when the current user has been unlocked but the profile is still locked.
+ */
+ private WorkLockActivityController mWorkLockController;
+
private boolean mLockLater;
private boolean mWakeAndUnlocking;
@@ -708,6 +714,8 @@
mHideAnimation = AnimationUtils.loadAnimation(mContext,
com.android.internal.R.anim.lock_screen_behind_enter);
+
+ mWorkLockController = new WorkLockActivityController(mContext);
}
@Override
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/WorkLockActivity.java b/packages/SystemUI/src/com/android/systemui/keyguard/WorkLockActivity.java
new file mode 100644
index 0000000..63d1cc2
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/WorkLockActivity.java
@@ -0,0 +1,167 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
+ */
+
+package com.android.systemui.keyguard;
+
+import static android.app.ActivityManager.TaskDescription;
+
+import android.annotation.ColorInt;
+import android.annotation.UserIdInt;
+import android.app.Activity;
+import android.app.ActivityManager;
+import android.app.ActivityOptions;
+import android.app.KeyguardManager;
+import android.app.PendingIntent;
+import android.app.admin.DevicePolicyManager;
+import android.content.BroadcastReceiver;
+import android.content.Context;
+import android.content.Intent;
+import android.content.IntentFilter;
+import android.graphics.Color;
+import android.os.Bundle;
+import android.os.RemoteException;
+import android.os.UserHandle;
+import android.util.Log;
+import android.view.View;
+
+/**
+ * Bouncer between work activities and the activity used to confirm credentials before unlocking
+ * a managed profile.
+ * <p>
+ * Shows a solid color when started, based on the organization color of the user it is supposed to
+ * be blocking. Once focused, it switches to a screen to confirm credentials and auto-dismisses if
+ * credentials are accepted.
+ */
+public class WorkLockActivity extends Activity {
+ private static final String TAG = "WorkLockActivity";
+
+ /**
+ * ID of the locked user that this activity blocks access to.
+ */
+ @UserIdInt
+ private int mUserId;
+
+ /**
+ * {@see KeyguardManager}
+ */
+ private KeyguardManager mKgm;
+
+ /**
+ * {@see DevicePolicyManager}
+ */
+ private DevicePolicyManager mDpm;
+
+ @Override
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+
+ mUserId = getIntent().getIntExtra(Intent.EXTRA_USER_ID, UserHandle.myUserId());
+ mDpm = (DevicePolicyManager) getSystemService(Context.DEVICE_POLICY_SERVICE);
+ mKgm = (KeyguardManager) getSystemService(Context.KEYGUARD_SERVICE);
+
+ final IntentFilter lockFilter = new IntentFilter();
+ lockFilter.addAction(Intent.ACTION_DEVICE_LOCKED_CHANGED);
+ registerReceiverAsUser(mLockEventReceiver, UserHandle.ALL, lockFilter,
+ /* permission */ null, /* scheduler */ null);
+
+ // Once the receiver is registered, check whether anything happened between now and the time
+ // when this activity was launched. If it did and the user is unlocked now, just quit.
+ if (!mKgm.isDeviceLocked(mUserId)) {
+ finish();
+ return;
+ }
+
+ // Get the organization color; this is a 24-bit integer provided by a DPC, guaranteed to
+ // be completely opaque.
+ final @ColorInt int color = mDpm.getOrganizationColorForUser(mUserId);
+
+ // Draw captions overlaid on the content view, so the whole window is one solid color.
+ setOverlayWithDecorCaptionEnabled(true);
+
+ // Match task description to the task stack we are replacing so it's still recognizably the
+ // original task stack with the same icon and title text.
+ setTaskDescription(new TaskDescription(null, null, color));
+
+ // Blank out the activity. When it is on-screen it will look like a Recents thumbnail with
+ // redaction switched on.
+ final View blankView = new View(this);
+ blankView.setBackgroundColor(color);
+ setContentView(blankView);
+ }
+
+ /**
+ * Respond to focus events by showing the prompt to confirm credentials.
+ * <p>
+ * We don't have anything particularly interesting to show here (just a solid-colored page) so
+ * there is no sense in sitting in the foreground doing nothing.
+ */
+ @Override
+ public void onWindowFocusChanged(boolean hasFocus) {
+ if (hasFocus) {
+ showConfirmCredentialActivity();
+ }
+ }
+
+ @Override
+ public void onDestroy() {
+ unregisterReceiver(mLockEventReceiver);
+ super.onDestroy();
+ }
+
+ @Override
+ public void onBackPressed() {
+ // Ignore back presses.
+ return;
+ }
+
+ private final BroadcastReceiver mLockEventReceiver = new BroadcastReceiver() {
+ @Override
+ public void onReceive(Context context, Intent intent) {
+ final int userId = intent.getIntExtra(Intent.EXTRA_USER_HANDLE, mUserId);
+ if (userId == mUserId && !mKgm.isDeviceLocked(mUserId)) {
+ finish();
+ }
+ }
+ };
+
+ private void showConfirmCredentialActivity() {
+ if (isFinishing() || !mKgm.isDeviceLocked(mUserId)) {
+ // Don't show the confirm credentials screen if we are already unlocked / unlocking.
+ return;
+ }
+
+ final Intent credential = mKgm.createConfirmDeviceCredentialIntent(null, null, mUserId);
+ if (credential == null) {
+ return;
+ }
+
+ final ActivityOptions options = ActivityOptions.makeBasic();
+ options.setLaunchTaskId(getTaskId());
+
+ // Bring this activity back to the foreground after confirming credentials.
+ final PendingIntent target = PendingIntent.getActivity(this, /* request */ -1, getIntent(),
+ PendingIntent.FLAG_CANCEL_CURRENT |
+ PendingIntent.FLAG_ONE_SHOT |
+ PendingIntent.FLAG_IMMUTABLE, options.toBundle());
+
+ credential.putExtra(Intent.EXTRA_INTENT, target.getIntentSender());
+ try {
+ ActivityManager.getService().startConfirmDeviceCredentialIntent(credential);
+ } catch (RemoteException e) {
+ Log.e(TAG, "Failed to start confirm credential intent", e);
+ }
+ }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/WorkLockActivityController.java b/packages/SystemUI/src/com/android/systemui/keyguard/WorkLockActivityController.java
new file mode 100644
index 0000000..22fceff
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/WorkLockActivityController.java
@@ -0,0 +1,61 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
+ */
+
+package com.android.systemui.keyguard;
+
+import android.app.Activity;
+import android.app.ActivityOptions;
+import android.app.KeyguardManager;
+import android.content.ComponentName;
+import android.content.Context;
+import android.content.Intent;
+import android.os.Bundle;
+import android.os.UserHandle;
+
+import com.android.systemui.recents.events.EventBus;
+import com.android.systemui.recents.misc.SystemServicesProxy;
+import com.android.systemui.recents.misc.SystemServicesProxy.TaskStackListener;
+
+public class WorkLockActivityController {
+ private final Context mContext;
+
+ public WorkLockActivityController(Context context) {
+ mContext = context;
+ EventBus.getDefault().register(this);
+ SystemServicesProxy.getInstance(context).registerTaskStackListener(mLockListener);
+ }
+
+ private void startWorkChallengeInTask(int taskId, int userId) {
+ Intent intent = new Intent(KeyguardManager.ACTION_CONFIRM_DEVICE_CREDENTIAL_WITH_USER)
+ .setComponent(new ComponentName(mContext, WorkLockActivity.class))
+ .putExtra(Intent.EXTRA_USER_ID, userId)
+ .addFlags(Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS
+ | Intent.FLAG_ACTIVITY_REORDER_TO_FRONT
+ | Intent.FLAG_ACTIVITY_SINGLE_TOP);
+
+ final ActivityOptions options = ActivityOptions.makeBasic();
+ options.setLaunchTaskId(taskId);
+ options.setTaskOverlay(true);
+ mContext.startActivityAsUser(intent, options.toBundle(), UserHandle.CURRENT);
+ }
+
+ private final TaskStackListener mLockListener = new TaskStackListener() {
+ @Override
+ public void onTaskProfileLocked(int taskId, int userId) {
+ startWorkChallengeInTask(taskId, userId);
+ }
+ };
+}
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/FlashlightTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/FlashlightTile.java
index d86aebf..416c7ce 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/FlashlightTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/FlashlightTile.java
@@ -47,13 +47,11 @@
public FlashlightTile(Host host) {
super(host);
mFlashlightController = host.getFlashlightController();
- mFlashlightController.addCallback(this);
}
@Override
protected void handleDestroy() {
super.handleDestroy();
- mFlashlightController.removeCallback(this);
}
@Override
@@ -63,6 +61,11 @@
@Override
public void setListening(boolean listening) {
+ if (listening) {
+ mFlashlightController.addCallback(this);
+ } else {
+ mFlashlightController.removeCallback(this);
+ }
}
@Override
diff --git a/packages/SystemUI/src/com/android/systemui/recents/misc/SystemServicesProxy.java b/packages/SystemUI/src/com/android/systemui/recents/misc/SystemServicesProxy.java
index ddffea2..7791132 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/misc/SystemServicesProxy.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/misc/SystemServicesProxy.java
@@ -154,6 +154,7 @@
public void onPinnedStackAnimationEnded() { }
public void onActivityForcedResizable(String packageName, int taskId) { }
public void onActivityDismissingDockedStack() { }
+ public void onTaskProfileLocked(int taskId, int userId) { }
}
/**
@@ -197,6 +198,11 @@
public void onActivityDismissingDockedStack() throws RemoteException {
mHandler.sendEmptyMessage(H.ON_ACTIVITY_DISMISSING_DOCKED_STACK);
}
+
+ @Override
+ public void onTaskProfileLocked(int taskId, int userId) {
+ mHandler.obtainMessage(H.ON_TASK_PROFILE_LOCKED, taskId, userId).sendToTarget();
+ }
};
/**
@@ -561,10 +567,10 @@
* Cancels the current window transtion to/from Recents for the given task id.
*/
public void cancelWindowTransition(int taskId) {
- if (mWm == null) return;
+ if (mIam == null) return;
try {
- WindowManagerGlobal.getWindowManagerService().cancelTaskWindowTransition(taskId);
+ mIam.cancelTaskWindowTransition(taskId);
} catch (RemoteException e) {
e.printStackTrace();
}
@@ -574,10 +580,10 @@
* Cancels the current thumbnail transtion to/from Recents for the given task id.
*/
public void cancelThumbnailTransition(int taskId) {
- if (mWm == null) return;
+ if (mIam == null) return;
try {
- WindowManagerGlobal.getWindowManagerService().cancelTaskThumbnailTransition(taskId);
+ mIam.cancelTaskThumbnailTransition(taskId);
} catch (RemoteException e) {
e.printStackTrace();
}
@@ -1155,6 +1161,7 @@
private static final int ON_PINNED_STACK_ANIMATION_ENDED = 4;
private static final int ON_ACTIVITY_FORCED_RESIZABLE = 5;
private static final int ON_ACTIVITY_DISMISSING_DOCKED_STACK = 6;
+ private static final int ON_TASK_PROFILE_LOCKED = 7;
@Override
public void handleMessage(Message msg) {
@@ -1196,6 +1203,12 @@
}
break;
}
+ case ON_TASK_PROFILE_LOCKED: {
+ for (int i = mTaskStackListeners.size() - 1; i >= 0; i--) {
+ mTaskStackListeners.get(i).onTaskProfileLocked(msg.arg1, msg.arg2);
+ }
+ break;
+ }
}
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java
index 8980580..173a110 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java
@@ -111,6 +111,7 @@
private ArrayList<View> mTranslateableViews;
private NotificationContentView mPublicLayout;
private NotificationContentView mPrivateLayout;
+ private NotificationContentView[] mLayouts;
private int mMaxExpandHeight;
private int mHeadsUpHeight;
private int mNotificationColor;
@@ -226,8 +227,9 @@
}
public void setIconAnimationRunning(boolean running) {
- setIconAnimationRunning(running, mPublicLayout);
- setIconAnimationRunning(running, mPrivateLayout);
+ for (NotificationContentView l : mLayouts) {
+ setIconAnimationRunning(running, l);
+ }
if (mIsSummaryWithChildren) {
setIconAnimationRunningForChild(running, mChildrenContainer.getHeaderView());
List<ExpandableNotificationRow> notificationChildren =
@@ -285,8 +287,9 @@
public void onNotificationUpdated(NotificationData.Entry entry) {
mEntry = entry;
mStatusBarNotification = entry.notification;
- mPrivateLayout.onNotificationUpdated(entry);
- mPublicLayout.onNotificationUpdated(entry);
+ for (NotificationContentView l : mLayouts) {
+ l.onNotificationUpdated(entry);
+ }
mShowingPublicInitialized = false;
updateNotificationColor();
if (mIsSummaryWithChildren) {
@@ -307,8 +310,9 @@
}
private void updateLimits() {
- updateLimitsForView(mPrivateLayout);
- updateLimitsForView(mPublicLayout);
+ for (NotificationContentView l : mLayouts) {
+ updateLimitsForView(l);
+ }
}
private void updateLimitsForView(NotificationContentView layout) {
@@ -685,8 +689,9 @@
addView(mSettingsIconRow, settingsIndex);
}
- mPrivateLayout.reInflateViews();
- mPublicLayout.reInflateViews();
+ for (NotificationContentView l : mLayouts) {
+ l.reInflateViews();
+ }
}
public void setContentBackground(int customBackgroundColor, boolean animate,
@@ -697,8 +702,9 @@
}
public void closeRemoteInput() {
- mPrivateLayout.closeRemoteInput();
- mPublicLayout.closeRemoteInput();
+ for (NotificationContentView l : mLayouts) {
+ l.closeRemoteInput();
+ }
}
/**
@@ -887,10 +893,10 @@
} else {
contentAlpha = 1.0f;
}
- mPublicLayout.setAlpha(contentAlpha);
- mPrivateLayout.setAlpha(contentAlpha);
- mPublicLayout.setTranslationY(translationY);
- mPrivateLayout.setTranslationY(translationY);
+ for (NotificationContentView l : mLayouts) {
+ l.setAlpha(contentAlpha);
+ l.setTranslationY(translationY);
+ }
if (mChildrenContainer != null) {
mChildrenContainer.setAlpha(contentAlpha);
mChildrenContainer.setTranslationY(translationY);
@@ -902,8 +908,9 @@
boolean visible = isChildInGroup()
|| (isBelowSpeedBump() && !NotificationShelf.SHOW_AMBIENT_ICONS)
|| mIconsVisible;
- mPublicLayout.setIconsVisible(visible);
- mPrivateLayout.setIconsVisible(visible);
+ for (NotificationContentView l : mLayouts) {
+ l.setIconsVisible(visible);
+ }
if (mChildrenContainer != null) {
mChildrenContainer.setIconsVisible(visible);
}
@@ -998,11 +1005,15 @@
protected void onFinishInflate() {
super.onFinishInflate();
mPublicLayout = (NotificationContentView) findViewById(R.id.expandedPublic);
- mPublicLayout.setContainingNotification(this);
mPrivateLayout = (NotificationContentView) findViewById(R.id.expanded);
- mPrivateLayout.setExpandClickListener(mExpandClickListener);
- mPrivateLayout.setContainingNotification(this);
- mPublicLayout.setExpandClickListener(mExpandClickListener);
+
+ mLayouts = new NotificationContentView[] {mPrivateLayout, mPublicLayout};
+
+ for (NotificationContentView l : mLayouts) {
+ l.setExpandClickListener(mExpandClickListener);
+ l.setContainingNotification(this);
+ }
+
mSettingsIconRowStub = (ViewStub) findViewById(R.id.settings_icon_row_stub);
mSettingsIconRowStub.setOnInflateListener(new ViewStub.OnInflateListener() {
@Override
@@ -1616,10 +1627,10 @@
mChildrenContainer.setAlpha(1.0f);
mChildrenContainer.setLayerType(LAYER_TYPE_NONE, null);
}
- mPrivateLayout.setAlpha(1.0f);
- mPrivateLayout.setLayerType(LAYER_TYPE_NONE, null);
- mPublicLayout.setAlpha(1.0f);
- mPublicLayout.setLayerType(LAYER_TYPE_NONE, null);
+ for (NotificationContentView l : mLayouts) {
+ l.setAlpha(1.0f);
+ l.setLayerType(LAYER_TYPE_NONE, null);
+ }
}
}
@@ -1639,8 +1650,9 @@
return;
}
int contentHeight = Math.max(getMinHeight(), height);
- mPrivateLayout.setContentHeight(contentHeight);
- mPublicLayout.setContentHeight(contentHeight);
+ for (NotificationContentView l : mLayouts) {
+ l.setContentHeight(contentHeight);
+ }
if (mIsSummaryWithChildren) {
mChildrenContainer.setActualHeight(height);
}
@@ -1682,8 +1694,9 @@
@Override
public void setClipTopAmount(int clipTopAmount) {
super.setClipTopAmount(clipTopAmount);
- mPrivateLayout.setClipTopAmount(clipTopAmount);
- mPublicLayout.setClipTopAmount(clipTopAmount);
+ for (NotificationContentView l : mLayouts) {
+ l.setClipTopAmount(clipTopAmount);
+ }
if (mGuts != null) {
mGuts.setClipTopAmount(clipTopAmount);
}
@@ -1693,8 +1706,9 @@
public void setClipBottomAmount(int clipBottomAmount) {
if (clipBottomAmount != mClipBottomAmount) {
super.setClipBottomAmount(clipBottomAmount);
- mPrivateLayout.setClipBottomAmount(clipBottomAmount);
- mPublicLayout.setClipBottomAmount(clipBottomAmount);
+ for (NotificationContentView l : mLayouts) {
+ l.setClipBottomAmount(clipBottomAmount);
+ }
if (mGuts != null) {
mGuts.setClipBottomAmount(clipBottomAmount);
}
@@ -1717,8 +1731,9 @@
@Override
public void setShowingLegacyBackground(boolean showing) {
super.setShowingLegacyBackground(showing);
- mPrivateLayout.setShowingLegacyBackground(showing);
- mPublicLayout.setShowingLegacyBackground(showing);
+ for (NotificationContentView l : mLayouts) {
+ l.setShowingLegacyBackground(showing);
+ }
}
@Override
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/FlingAnimationUtils.java b/packages/SystemUI/src/com/android/systemui/statusbar/FlingAnimationUtils.java
index bddd3e6..758fb7a 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/FlingAnimationUtils.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/FlingAnimationUtils.java
@@ -23,6 +23,7 @@
import android.view.animation.PathInterpolator;
import com.android.systemui.Interpolators;
+import com.android.systemui.statusbar.notification.NotificationUtils;
/**
* Utility class to calculate general fling animation when the finger is released.
@@ -30,28 +31,63 @@
public class FlingAnimationUtils {
private static final float LINEAR_OUT_SLOW_IN_X2 = 0.35f;
+ private static final float LINEAR_OUT_SLOW_IN_X2_MAX = 0.68f;
private static final float LINEAR_OUT_FASTER_IN_X2 = 0.5f;
private static final float LINEAR_OUT_FASTER_IN_Y2_MIN = 0.4f;
private static final float LINEAR_OUT_FASTER_IN_Y2_MAX = 0.5f;
private static final float MIN_VELOCITY_DP_PER_SECOND = 250;
private static final float HIGH_VELOCITY_DP_PER_SECOND = 3000;
- /**
- * Crazy math. http://en.wikipedia.org/wiki/B%C3%A9zier_curve
- */
- private static final float LINEAR_OUT_SLOW_IN_START_GRADIENT = 1.0f / LINEAR_OUT_SLOW_IN_X2;
-
- private Interpolator mLinearOutSlowIn;
+ private static final float LINEAR_OUT_SLOW_IN_START_GRADIENT = 0.75f;
+ private final float mSpeedUpFactor;
+ private final float mY2;
private float mMinVelocityPxPerSecond;
private float mMaxLengthSeconds;
private float mHighVelocityPxPerSecond;
+ private float mLinearOutSlowInX2;
private AnimatorProperties mAnimatorProperties = new AnimatorProperties();
+ private PathInterpolator mInterpolator;
+ private float mCachedStartGradient = -1;
+ private float mCachedVelocityFactor = -1;
public FlingAnimationUtils(Context ctx, float maxLengthSeconds) {
+ this(ctx, maxLengthSeconds, 0.0f);
+ }
+
+ /**
+ * @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.
+ */
+ public FlingAnimationUtils(Context ctx, float maxLengthSeconds, float speedUpFactor) {
+ this(ctx, maxLengthSeconds, speedUpFactor, -1.0f, 1.0f);
+ }
+
+ /**
+ * @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
+ */
+ public FlingAnimationUtils(Context ctx, float maxLengthSeconds, float speedUpFactor, float x2,
+ float y2) {
mMaxLengthSeconds = maxLengthSeconds;
- mLinearOutSlowIn = new PathInterpolator(0, 0, LINEAR_OUT_SLOW_IN_X2, 1);
+ mSpeedUpFactor = speedUpFactor;
+ if (x2 < 0) {
+ mLinearOutSlowInX2 = NotificationUtils.interpolate(LINEAR_OUT_SLOW_IN_X2,
+ LINEAR_OUT_SLOW_IN_X2_MAX,
+ mSpeedUpFactor);
+ } else {
+ mLinearOutSlowInX2 = x2;
+ }
+ mY2 = y2;
+
mMinVelocityPxPerSecond
= MIN_VELOCITY_DP_PER_SECOND * ctx.getResources().getDisplayMetrics().density;
mHighVelocityPxPerSecond
@@ -129,9 +165,14 @@
* Math.sqrt(Math.abs(endValue - currValue) / maxDistance));
float diff = Math.abs(endValue - currValue);
float velAbs = Math.abs(velocity);
- float durationSeconds = LINEAR_OUT_SLOW_IN_START_GRADIENT * diff / velAbs;
+ 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,
+ mY2 / mLinearOutSlowInX2, velocityFactor);
+ float durationSeconds = startGradient * diff / velAbs;
+ Interpolator slowInInterpolator = getInterpolator(startGradient, velocityFactor);
if (durationSeconds <= maxLengthSeconds) {
- mAnimatorProperties.interpolator = mLinearOutSlowIn;
+ mAnimatorProperties.interpolator = slowInInterpolator;
} else if (velAbs >= mMinVelocityPxPerSecond) {
// Cross fade between fast-out-slow-in and linear interpolator with current velocity.
@@ -139,7 +180,7 @@
VelocityInterpolator velocityInterpolator
= new VelocityInterpolator(durationSeconds, velAbs, diff);
InterpolatorInterpolator superInterpolator = new InterpolatorInterpolator(
- velocityInterpolator, mLinearOutSlowIn, mLinearOutSlowIn);
+ velocityInterpolator, slowInInterpolator, Interpolators.LINEAR_OUT_SLOW_IN);
mAnimatorProperties.interpolator = superInterpolator;
} else {
@@ -151,6 +192,19 @@
return mAnimatorProperties;
}
+ private Interpolator getInterpolator(float startGradient, float velocityFactor) {
+ if (startGradient != mCachedStartGradient
+ || velocityFactor != mCachedVelocityFactor) {
+ float speedup = mSpeedUpFactor * (1.0f - velocityFactor);
+ mInterpolator = new PathInterpolator(speedup,
+ speedup * startGradient,
+ mLinearOutSlowInX2, mY2);
+ mCachedStartGradient = startGradient;
+ mCachedVelocityFactor = velocityFactor;
+ }
+ return mInterpolator;
+ }
+
/**
* Applies the interpolator and length to the animator, such that the fling animation is
* consistent with the finger motion for the case when the animation is making something
@@ -212,7 +266,7 @@
VelocityInterpolator velocityInterpolator
= new VelocityInterpolator(durationSeconds, velAbs, diff);
InterpolatorInterpolator superInterpolator = new InterpolatorInterpolator(
- velocityInterpolator, mLinearOutFasterIn, mLinearOutSlowIn);
+ velocityInterpolator, mLinearOutFasterIn, Interpolators.LINEAR_OUT_SLOW_IN);
mAnimatorProperties.interpolator = superInterpolator;
} else {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationGuts.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationGuts.java
index 088f538..c7adb60 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationGuts.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationGuts.java
@@ -313,7 +313,7 @@
} else if (mHighImportanceButton.isChecked()) {
return NotificationManager.IMPORTANCE_HIGH;
} else {
- return NotificationManager.IMPORTANCE_NONE;
+ return NotificationManager.IMPORTANCE_UNSPECIFIED;
}
}
@@ -333,10 +333,10 @@
// Set to current importance setting
switch (importance) {
+ case NotificationManager.IMPORTANCE_UNSPECIFIED:
case NotificationManager.IMPORTANCE_NONE:
break;
case NotificationManager.IMPORTANCE_MIN:
- case NotificationManager.IMPORTANCE_UNSPECIFIED:
mMinImportanceButton.setChecked(true);
break;
case NotificationManager.IMPORTANCE_LOW:
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java
index 296c788..bc1b9fb 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java
@@ -66,6 +66,7 @@
private int mScrollFastThreshold;
private int mStatusBarState;
private float mMaxShelfEnd;
+ private int mRelativeOffset;
public NotificationShelf(Context context, AttributeSet attrs) {
super(context, attrs);
@@ -475,9 +476,21 @@
return super.shouldHideBackground() || mHideBackground;
}
- private void setOpenedAmount(float openedAmount) {
+ @Override
+ protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
+ super.onLayout(changed, left, top, right, bottom);
mCollapsedIcons.getLocationOnScreen(mTmp);
- int start = mTmp[0];
+ mRelativeOffset = mTmp[0];
+ getLocationOnScreen(mTmp);
+ mRelativeOffset -= mTmp[0];
+ }
+
+ private void setOpenedAmount(float openedAmount) {
+ if (!mAmbientState.isPanelFullWidth()) {
+ // We don't do a transformation at all, lets just assume we are fully opened
+ openedAmount = 1.0f;
+ }
+ int start = mRelativeOffset;
if (isLayoutRtl()) {
start = getWidth() - start - mCollapsedIcons.getWidth();
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
index 7f6322a..82a5cc2 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
@@ -210,6 +210,7 @@
private NotificationGroupManager mGroupManager;
private boolean mOpening;
private int mIndicationBottomPadding;
+ private boolean mIsFullWidth;
public NotificationPanelView(Context context, AttributeSet attrs) {
super(context, attrs);
@@ -302,6 +303,7 @@
@Override
protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
super.onLayout(changed, left, top, right, bottom);
+ setIsFullWidth(mNotificationStackScroller.getWidth() == getWidth());
// Update Clock Pivot
mKeyguardStatusView.setPivotX(getWidth() / 2);
@@ -340,6 +342,11 @@
updateMaxHeadsUpTranslation();
}
+ private void setIsFullWidth(boolean isFullWidth) {
+ mIsFullWidth = isFullWidth;
+ mNotificationStackScroller.setIsFullWidth(isFullWidth);
+ }
+
private void startQsSizeChangeAnimation(int oldHeight, final int newHeight) {
if (mQsSizeChangeAnimator != null) {
oldHeight = (int) mQsSizeChangeAnimator.getAnimatedValue();
@@ -736,7 +743,7 @@
@Override
protected float getOpeningHeight() {
- return mNotificationStackScroller.getMinExpansionHeight();
+ return mNotificationStackScroller.getOpeningHeight();
}
@Override
@@ -2000,12 +2007,9 @@
}
@Override
- protected float getCannedFlingDurationFactor() {
- if (mQsExpanded) {
- return 0.9f;
- } else {
- return 0.8f;
- }
+ protected boolean shouldUseDismissingAnimation() {
+ return mStatusBarState != StatusBarState.SHADE
+ && !mStatusBar.isKeyguardCurrentlySecure();
}
@Override
@@ -2288,7 +2292,15 @@
}
mNotificationStackScroller.setExpandedHeight(expandedHeight);
updateKeyguardBottomAreaAlpha();
- setOpening(expandedHeight <= getOpeningHeight());
+ setOpening(isFullWidth() && expandedHeight < getOpeningHeight());
+ }
+
+ /**
+ * @return whether the notifications are displayed full width and don't have any margins on
+ * the side.
+ */
+ public boolean isFullWidth() {
+ return mIsFullWidth;
}
private void setOpening(boolean opening) {
@@ -2401,12 +2413,11 @@
}
public boolean shouldHideNotificationIcons() {
- return !mOpening && !isFullyCollapsed();
+ return !isFullWidth() || (!mOpening && !isFullyCollapsed());
}
public boolean shouldAnimateIconHiding() {
- // TODO: handle this correctly, not completely working yet
- return mNotificationStackScroller.getTranslationX() != 0;
+ return !isFullWidth();
}
private final FragmentListener mFragmentListener = new FragmentListener() {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java
index 7bb075b..18e394e 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java
@@ -94,6 +94,7 @@
private VelocityTrackerInterface mVelocityTracker;
private FlingAnimationUtils mFlingAnimationUtils;
private FlingAnimationUtils mFlingAnimationUtilsClosing;
+ private FlingAnimationUtils mFlingAnimationUtilsDismissing;
private FalsingManager mFalsingManager;
/**
@@ -180,8 +181,13 @@
public PanelView(Context context, AttributeSet attrs) {
super(context, attrs);
- mFlingAnimationUtils = new FlingAnimationUtils(context, 0.6f);
- mFlingAnimationUtilsClosing = new FlingAnimationUtils(context, 0.4f);
+ mFlingAnimationUtils = new FlingAnimationUtils(context, 0.6f /* maxLengthSeconds */,
+ 0.6f /* speedUpFactor */);
+ mFlingAnimationUtilsClosing = new FlingAnimationUtils(context, 0.5f /* maxLengthSeconds */,
+ 0.6f /* speedUpFactor */);
+ mFlingAnimationUtilsDismissing = new FlingAnimationUtils(context,
+ 0.5f /* maxLengthSeconds */, 0.2f /* speedUpFactor */, 0.6f /* x2 */,
+ 0.84f /* y2 */);
mBounceInterpolator = new BounceInterpolator();
mFalsingManager = FalsingManager.getInstance(context);
}
@@ -700,13 +706,17 @@
animator.setDuration(350);
}
} else {
- mFlingAnimationUtilsClosing.apply(animator, mExpandedHeight, target, vel, getHeight());
+ if (shouldUseDismissingAnimation()) {
+ mFlingAnimationUtilsDismissing.apply(animator, mExpandedHeight, target, vel,
+ getHeight());
+ } else {
+ mFlingAnimationUtilsClosing
+ .apply(animator, mExpandedHeight, target, vel, getHeight());
+ }
// Make it shorter if we run a canned animation
if (vel == 0) {
- animator.setDuration((long)
- (animator.getDuration() * getCannedFlingDurationFactor()
- / collapseSpeedUpFactor));
+ animator.setDuration((long) (animator.getDuration() / collapseSpeedUpFactor));
}
}
animator.addListener(new AnimatorListenerAdapter() {
@@ -733,6 +743,8 @@
animator.start();
}
+ protected abstract boolean shouldUseDismissingAnimation();
+
@Override
protected void onAttachedToWindow() {
super.onAttachedToWindow();
@@ -1114,9 +1126,6 @@
public abstract void resetViews();
protected abstract float getPeekHeight();
-
- protected abstract float getCannedFlingDurationFactor();
-
/**
* @return whether "Clear all" button will be visible when the panel is fully expanded
*/
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/FlashlightControllerImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/FlashlightControllerImpl.java
index 008d837..f0cfa2c 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/FlashlightControllerImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/FlashlightControllerImpl.java
@@ -121,6 +121,8 @@
}
cleanUpListenersLocked(l);
mListeners.add(new WeakReference<>(l));
+ l.onFlashlightAvailabilityChanged(mTorchAvailable);
+ l.onFlashlightChanged(mFlashlightEnabled);
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/stack/AmbientState.java b/packages/SystemUI/src/com/android/systemui/statusbar/stack/AmbientState.java
index e1ff297..fe83dc4 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/stack/AmbientState.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/stack/AmbientState.java
@@ -58,6 +58,7 @@
private float mExpandingVelocity;
private boolean mPanelTracking;
private boolean mExpansionChanging;
+ private boolean mPanelFullWidth;
public AmbientState(Context context) {
reload(context);
@@ -287,4 +288,12 @@
public boolean isPanelTracking() {
return mPanelTracking;
}
+
+ public boolean isPanelFullWidth() {
+ return mPanelFullWidth;
+ }
+
+ public void setPanelFullWidth(boolean panelFullWidth) {
+ mPanelFullWidth = panelFullWidth;
+ }
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java b/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java
index e7c2507..06cd769 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java
@@ -4012,6 +4012,18 @@
mAmbientState.setExpandingVelocity(expandingVelocity);
}
+ public float getOpeningHeight() {
+ if (mEmptyShadeView.getVisibility() == GONE) {
+ return getMinExpansionHeight();
+ } else {
+ return getAppearEndPosition();
+ }
+ }
+
+ public void setIsFullWidth(boolean isFullWidth) {
+ mAmbientState.setPanelFullWidth(isFullWidth);
+ }
+
/**
* A listener that is notified when some child locations might have changed.
*/
diff --git a/packages/SystemUI/tests/src/com/android/systemui/plugins/PluginInstanceManagerTest.java b/packages/SystemUI/tests/src/com/android/systemui/plugins/PluginInstanceManagerTest.java
index 01fd97c..d529ee1 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/plugins/PluginInstanceManagerTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/plugins/PluginInstanceManagerTest.java
@@ -15,6 +15,7 @@
package com.android.systemui.plugins;
import static junit.framework.Assert.assertFalse;
+import static junit.framework.Assert.assertNotNull;
import static junit.framework.Assert.assertTrue;
import static org.mockito.Matchers.any;
@@ -39,11 +40,13 @@
import android.content.pm.ServiceInfo;
import android.os.HandlerThread;
import android.os.UserHandle;
+import android.support.test.annotation.UiThreadTest;
import android.support.test.runner.AndroidJUnit4;
import android.test.suitebuilder.annotation.SmallTest;
import com.android.internal.messages.nano.SystemMessageProto.SystemMessage;
import com.android.systemui.SysuiTestCase;
+import com.android.systemui.plugins.PluginInstanceManager.PluginInfo;
import org.junit.After;
import org.junit.Before;
@@ -92,6 +95,15 @@
sMockPlugin = null;
}
+ @UiThreadTest
+ @Test
+ public void testGetPlugin() throws Exception {
+ setupFakePmQuery();
+ PluginInfo p = mPluginInstanceManager.getPlugin();
+ assertNotNull(p.mPlugin);
+ verify(sMockPlugin).onCreate(any(), any());
+ }
+
@Test
public void testNoPlugins() throws Exception {
when(mMockPm.queryIntentServices(any(), anyInt())).thenReturn(
diff --git a/packages/SystemUI/tests/src/com/android/systemui/plugins/PluginManagerTest.java b/packages/SystemUI/tests/src/com/android/systemui/plugins/PluginManagerTest.java
index d5ada67..a58407b 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/plugins/PluginManagerTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/plugins/PluginManagerTest.java
@@ -13,6 +13,8 @@
*/
package com.android.systemui.plugins;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
import static org.mockito.Matchers.eq;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
@@ -24,11 +26,13 @@
import android.content.Intent;
import android.content.pm.PackageManager;
import android.net.Uri;
+import android.support.test.annotation.UiThreadTest;
import android.support.test.runner.AndroidJUnit4;
import android.test.suitebuilder.annotation.SmallTest;
import com.android.internal.messages.nano.SystemMessageProto.SystemMessage;
import com.android.systemui.SysuiTestCase;
+import com.android.systemui.plugins.PluginInstanceManager.PluginInfo;
import com.android.systemui.plugins.PluginManager.PluginInstanceManagerFactory;
import org.junit.Before;
@@ -66,6 +70,16 @@
mMockListener = mock(PluginListener.class);
}
+ @UiThreadTest
+ @Test
+ public void testOneShot() {
+ Plugin mockPlugin = mock(Plugin.class);
+ when(mMockPluginInstance.getPlugin()).thenReturn(new PluginInfo(null, null, mockPlugin,
+ null));
+ Plugin result = mPluginManager.getOneShotPlugin("myAction", 1);
+ assertTrue(result == mockPlugin);
+ }
+
@Test
public void testAddListener() {
mPluginManager.addPluginListener("myAction", mMockListener, 1);
@@ -86,9 +100,12 @@
mPluginManager = new PluginManager(getContext(), mMockFactory, false,
mMockExceptionHandler);
resetExceptionHandler();
- mPluginManager.addPluginListener("myAction", mMockListener, 1);
+ mPluginManager.addPluginListener("myAction", mMockListener, 1);
verify(mMockPluginInstance, Mockito.never()).loadAll();
+
+ assertNull(mPluginManager.getOneShotPlugin("myPlugin", 1));
+ verify(mMockPluginInstance, Mockito.never()).getPlugin();
}
@Test
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationGutsTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationGutsTest.java
index 2cd6dbd..c65f7150 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationGutsTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationGutsTest.java
@@ -210,6 +210,18 @@
@Test
@UiThreadTest
+ public void testCloseControls_DoesNotUpdateNotificationChannelIfUnspecified() throws Exception {
+ mNotificationChannel.setImportance(NotificationManager.IMPORTANCE_UNSPECIFIED);
+ mNotificationGuts.bindNotification(mMockPackageManager, mMockINotificationManager,
+ mMockStatusBarNotification, null, null, null);
+
+ mNotificationGuts.closeControls(-1, -1, true);
+ verify(mMockINotificationManager, never()).updateNotificationChannelForPackage(
+ anyString(), anyInt(), any());
+ }
+
+ @Test
+ @UiThreadTest
public void testCloseControls_CallsUpdateNotificationChannelIfChanged() throws Exception {
mNotificationChannel.setImportance(NotificationManager.IMPORTANCE_LOW);
mNotificationGuts.bindNotification(mMockPackageManager, mMockINotificationManager,
diff --git a/packages/VpnDialogs/res/values-az-rAZ/strings.xml b/packages/VpnDialogs/res/values-az/strings.xml
similarity index 100%
rename from packages/VpnDialogs/res/values-az-rAZ/strings.xml
rename to packages/VpnDialogs/res/values-az/strings.xml
diff --git a/packages/VpnDialogs/res/values-be-rBY/strings.xml b/packages/VpnDialogs/res/values-be/strings.xml
similarity index 100%
rename from packages/VpnDialogs/res/values-be-rBY/strings.xml
rename to packages/VpnDialogs/res/values-be/strings.xml
diff --git a/packages/VpnDialogs/res/values-bn-rBD/strings.xml b/packages/VpnDialogs/res/values-bn/strings.xml
similarity index 100%
rename from packages/VpnDialogs/res/values-bn-rBD/strings.xml
rename to packages/VpnDialogs/res/values-bn/strings.xml
diff --git a/packages/VpnDialogs/res/values-bs-rBA/strings.xml b/packages/VpnDialogs/res/values-bs/strings.xml
similarity index 100%
rename from packages/VpnDialogs/res/values-bs-rBA/strings.xml
rename to packages/VpnDialogs/res/values-bs/strings.xml
diff --git a/packages/VpnDialogs/res/values-et-rEE/strings.xml b/packages/VpnDialogs/res/values-et/strings.xml
similarity index 100%
rename from packages/VpnDialogs/res/values-et-rEE/strings.xml
rename to packages/VpnDialogs/res/values-et/strings.xml
diff --git a/packages/VpnDialogs/res/values-eu-rES/strings.xml b/packages/VpnDialogs/res/values-eu/strings.xml
similarity index 100%
rename from packages/VpnDialogs/res/values-eu-rES/strings.xml
rename to packages/VpnDialogs/res/values-eu/strings.xml
diff --git a/packages/VpnDialogs/res/values-gl-rES/strings.xml b/packages/VpnDialogs/res/values-gl/strings.xml
similarity index 100%
rename from packages/VpnDialogs/res/values-gl-rES/strings.xml
rename to packages/VpnDialogs/res/values-gl/strings.xml
diff --git a/packages/VpnDialogs/res/values-gu-rIN/strings.xml b/packages/VpnDialogs/res/values-gu/strings.xml
similarity index 100%
rename from packages/VpnDialogs/res/values-gu-rIN/strings.xml
rename to packages/VpnDialogs/res/values-gu/strings.xml
diff --git a/packages/VpnDialogs/res/values-hy-rAM/strings.xml b/packages/VpnDialogs/res/values-hy/strings.xml
similarity index 100%
rename from packages/VpnDialogs/res/values-hy-rAM/strings.xml
rename to packages/VpnDialogs/res/values-hy/strings.xml
diff --git a/packages/VpnDialogs/res/values-is-rIS/strings.xml b/packages/VpnDialogs/res/values-is/strings.xml
similarity index 100%
rename from packages/VpnDialogs/res/values-is-rIS/strings.xml
rename to packages/VpnDialogs/res/values-is/strings.xml
diff --git a/packages/VpnDialogs/res/values-ka-rGE/strings.xml b/packages/VpnDialogs/res/values-ka/strings.xml
similarity index 100%
rename from packages/VpnDialogs/res/values-ka-rGE/strings.xml
rename to packages/VpnDialogs/res/values-ka/strings.xml
diff --git a/packages/VpnDialogs/res/values-kk-rKZ/strings.xml b/packages/VpnDialogs/res/values-kk/strings.xml
similarity index 100%
rename from packages/VpnDialogs/res/values-kk-rKZ/strings.xml
rename to packages/VpnDialogs/res/values-kk/strings.xml
diff --git a/packages/VpnDialogs/res/values-km-rKH/strings.xml b/packages/VpnDialogs/res/values-km/strings.xml
similarity index 100%
rename from packages/VpnDialogs/res/values-km-rKH/strings.xml
rename to packages/VpnDialogs/res/values-km/strings.xml
diff --git a/packages/VpnDialogs/res/values-kn-rIN/strings.xml b/packages/VpnDialogs/res/values-kn/strings.xml
similarity index 100%
rename from packages/VpnDialogs/res/values-kn-rIN/strings.xml
rename to packages/VpnDialogs/res/values-kn/strings.xml
diff --git a/packages/VpnDialogs/res/values-ky-rKG/strings.xml b/packages/VpnDialogs/res/values-ky/strings.xml
similarity index 100%
rename from packages/VpnDialogs/res/values-ky-rKG/strings.xml
rename to packages/VpnDialogs/res/values-ky/strings.xml
diff --git a/packages/VpnDialogs/res/values-lo-rLA/strings.xml b/packages/VpnDialogs/res/values-lo/strings.xml
similarity index 100%
rename from packages/VpnDialogs/res/values-lo-rLA/strings.xml
rename to packages/VpnDialogs/res/values-lo/strings.xml
diff --git a/packages/VpnDialogs/res/values-mk-rMK/strings.xml b/packages/VpnDialogs/res/values-mk/strings.xml
similarity index 100%
rename from packages/VpnDialogs/res/values-mk-rMK/strings.xml
rename to packages/VpnDialogs/res/values-mk/strings.xml
diff --git a/packages/VpnDialogs/res/values-ml-rIN/strings.xml b/packages/VpnDialogs/res/values-ml/strings.xml
similarity index 100%
rename from packages/VpnDialogs/res/values-ml-rIN/strings.xml
rename to packages/VpnDialogs/res/values-ml/strings.xml
diff --git a/packages/VpnDialogs/res/values-mn-rMN/strings.xml b/packages/VpnDialogs/res/values-mn/strings.xml
similarity index 100%
rename from packages/VpnDialogs/res/values-mn-rMN/strings.xml
rename to packages/VpnDialogs/res/values-mn/strings.xml
diff --git a/packages/VpnDialogs/res/values-mr-rIN/strings.xml b/packages/VpnDialogs/res/values-mr/strings.xml
similarity index 100%
rename from packages/VpnDialogs/res/values-mr-rIN/strings.xml
rename to packages/VpnDialogs/res/values-mr/strings.xml
diff --git a/packages/VpnDialogs/res/values-ms-rMY/strings.xml b/packages/VpnDialogs/res/values-ms/strings.xml
similarity index 100%
rename from packages/VpnDialogs/res/values-ms-rMY/strings.xml
rename to packages/VpnDialogs/res/values-ms/strings.xml
diff --git a/packages/VpnDialogs/res/values-my-rMM/strings.xml b/packages/VpnDialogs/res/values-my/strings.xml
similarity index 100%
rename from packages/VpnDialogs/res/values-my-rMM/strings.xml
rename to packages/VpnDialogs/res/values-my/strings.xml
diff --git a/packages/VpnDialogs/res/values-ne-rNP/strings.xml b/packages/VpnDialogs/res/values-ne/strings.xml
similarity index 100%
rename from packages/VpnDialogs/res/values-ne-rNP/strings.xml
rename to packages/VpnDialogs/res/values-ne/strings.xml
diff --git a/packages/VpnDialogs/res/values-pa-rIN/strings.xml b/packages/VpnDialogs/res/values-pa/strings.xml
similarity index 100%
rename from packages/VpnDialogs/res/values-pa-rIN/strings.xml
rename to packages/VpnDialogs/res/values-pa/strings.xml
diff --git a/packages/VpnDialogs/res/values-si-rLK/strings.xml b/packages/VpnDialogs/res/values-si/strings.xml
similarity index 100%
rename from packages/VpnDialogs/res/values-si-rLK/strings.xml
rename to packages/VpnDialogs/res/values-si/strings.xml
diff --git a/packages/VpnDialogs/res/values-sq-rAL/strings.xml b/packages/VpnDialogs/res/values-sq/strings.xml
similarity index 100%
rename from packages/VpnDialogs/res/values-sq-rAL/strings.xml
rename to packages/VpnDialogs/res/values-sq/strings.xml
diff --git a/packages/VpnDialogs/res/values-ta-rIN/strings.xml b/packages/VpnDialogs/res/values-ta/strings.xml
similarity index 100%
rename from packages/VpnDialogs/res/values-ta-rIN/strings.xml
rename to packages/VpnDialogs/res/values-ta/strings.xml
diff --git a/packages/VpnDialogs/res/values-te-rIN/strings.xml b/packages/VpnDialogs/res/values-te/strings.xml
similarity index 100%
rename from packages/VpnDialogs/res/values-te-rIN/strings.xml
rename to packages/VpnDialogs/res/values-te/strings.xml
diff --git a/packages/VpnDialogs/res/values-ur-rPK/strings.xml b/packages/VpnDialogs/res/values-ur/strings.xml
similarity index 100%
rename from packages/VpnDialogs/res/values-ur-rPK/strings.xml
rename to packages/VpnDialogs/res/values-ur/strings.xml
diff --git a/packages/VpnDialogs/res/values-uz-rUZ/strings.xml b/packages/VpnDialogs/res/values-uz/strings.xml
similarity index 100%
rename from packages/VpnDialogs/res/values-uz-rUZ/strings.xml
rename to packages/VpnDialogs/res/values-uz/strings.xml
diff --git a/packages/WallpaperCropper/res/values-et-rEE/strings.xml b/packages/WallpaperCropper/res/values-et/strings.xml
similarity index 100%
rename from packages/WallpaperCropper/res/values-et-rEE/strings.xml
rename to packages/WallpaperCropper/res/values-et/strings.xml
diff --git a/packages/WallpaperCropper/res/values-hy-rAM/strings.xml b/packages/WallpaperCropper/res/values-hy/strings.xml
similarity index 100%
rename from packages/WallpaperCropper/res/values-hy-rAM/strings.xml
rename to packages/WallpaperCropper/res/values-hy/strings.xml
diff --git a/packages/WallpaperCropper/res/values-ka-rGE/strings.xml b/packages/WallpaperCropper/res/values-ka/strings.xml
similarity index 100%
rename from packages/WallpaperCropper/res/values-ka-rGE/strings.xml
rename to packages/WallpaperCropper/res/values-ka/strings.xml
diff --git a/packages/WallpaperCropper/res/values-km-rKH/strings.xml b/packages/WallpaperCropper/res/values-km/strings.xml
similarity index 100%
rename from packages/WallpaperCropper/res/values-km-rKH/strings.xml
rename to packages/WallpaperCropper/res/values-km/strings.xml
diff --git a/packages/WallpaperCropper/res/values-lo-rLA/strings.xml b/packages/WallpaperCropper/res/values-lo/strings.xml
similarity index 100%
rename from packages/WallpaperCropper/res/values-lo-rLA/strings.xml
rename to packages/WallpaperCropper/res/values-lo/strings.xml
diff --git a/packages/WallpaperCropper/res/values-mn-rMN/strings.xml b/packages/WallpaperCropper/res/values-mn/strings.xml
similarity index 100%
rename from packages/WallpaperCropper/res/values-mn-rMN/strings.xml
rename to packages/WallpaperCropper/res/values-mn/strings.xml
diff --git a/packages/WallpaperCropper/res/values-ms-rMY/strings.xml b/packages/WallpaperCropper/res/values-ms/strings.xml
similarity index 100%
rename from packages/WallpaperCropper/res/values-ms-rMY/strings.xml
rename to packages/WallpaperCropper/res/values-ms/strings.xml
diff --git a/proto/src/metrics_constants.proto b/proto/src/metrics_constants.proto
index bf3620e..21139da 100644
--- a/proto/src/metrics_constants.proto
+++ b/proto/src/metrics_constants.proto
@@ -3181,6 +3181,11 @@
// user accepted
ACTION_SKIP_DISCLAIMER_SELECTED = 760;
+ // Enclosing category for group of APP_TRANSITION_FOO events,
+ // logged when we execute an app transition.
+ APP_TRANSITION = 761;
+
+
// ---- End O Constants, all O constants go above this line ----
// Add new aosp constants above this line.
diff --git a/services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java b/services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java
index dafa3f6..0004fde 100644
--- a/services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java
+++ b/services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java
@@ -1172,6 +1172,7 @@
service.onAdded();
userState.mBoundServices.add(service);
userState.mComponentNameToServiceMap.put(service.mComponentName, service);
+ scheduleNotifyClientsOfServicesStateChange();
}
} catch (RemoteException re) {
/* do nothing */
@@ -1193,6 +1194,7 @@
Service boundService = userState.mBoundServices.get(i);
userState.mComponentNameToServiceMap.put(boundService.mComponentName, boundService);
}
+ scheduleNotifyClientsOfServicesStateChange();
}
/**
@@ -1357,10 +1359,15 @@
|| userState.mClients.getRegisteredCallbackCount() > 0)) {
userState.mLastSentClientState = clientState;
mMainHandler.obtainMessage(MainHandler.MSG_SEND_STATE_TO_CLIENTS,
- clientState, userState.mUserId) .sendToTarget();
+ clientState, userState.mUserId).sendToTarget();
}
}
+ private void scheduleNotifyClientsOfServicesStateChange() {
+ mMainHandler.obtainMessage(MainHandler.MSG_SEND_SERVICES_STATE_CHANGED_TO_CLIENTS)
+ .sendToTarget();
+ }
+
private void scheduleUpdateInputFilter(UserState userState) {
mMainHandler.obtainMessage(MainHandler.MSG_UPDATE_INPUT_FILTER, userState).sendToTarget();
}
@@ -2057,6 +2064,7 @@
public static final int MSG_SHOW_ENABLED_TOUCH_EXPLORATION_DIALOG = 7;
public static final int MSG_SEND_KEY_EVENT_TO_INPUT_FILTER = 8;
public static final int MSG_CLEAR_ACCESSIBILITY_FOCUS = 9;
+ public static final int MSG_SEND_SERVICES_STATE_CHANGED_TO_CLIENTS = 10;
public MainHandler(Looper looper) {
super(looper);
@@ -2121,6 +2129,10 @@
}
bridge.clearAccessibilityFocusNotLocked(windowId);
} break;
+
+ case MSG_SEND_SERVICES_STATE_CHANGED_TO_CLIENTS: {
+ notifyClientsOfServicesStateChange();
+ } break;
}
}
@@ -2164,6 +2176,26 @@
clients.finishBroadcast();
}
}
+
+ private void notifyClientsOfServicesStateChange() {
+ RemoteCallbackList<IAccessibilityManagerClient> clients;
+ synchronized (mLock) {
+ clients = getCurrentUserStateLocked().mClients;
+ }
+ try {
+ final int userClientCount = clients.beginBroadcast();
+ for (int i = 0; i < userClientCount; i++) {
+ IAccessibilityManagerClient client = clients.getBroadcastItem(i);
+ try {
+ client.notifyServicesStateChanged();
+ } catch (RemoteException re) {
+ /* ignore */
+ }
+ }
+ } finally {
+ clients.finishBroadcast();
+ }
+ }
}
private int findWindowIdLocked(IBinder token) {
@@ -2483,6 +2515,7 @@
}
UserState userState = getUserStateLocked(mUserId);
onUserStateChangedLocked(userState);
+ scheduleNotifyClientsOfServicesStateChange();
}
} finally {
Binder.restoreCallingIdentity(identity);
diff --git a/services/core/Android.mk b/services/core/Android.mk
index efadbef..1366b3b 100644
--- a/services/core/Android.mk
+++ b/services/core/Android.mk
@@ -24,7 +24,7 @@
android.hardware.power@1.0-java \
android.hardware.tv.cec@1.0-java
-LOCAL_STATIC_JAVA_LIBRARIES := tzdata_update
+LOCAL_STATIC_JAVA_LIBRARIES := tzdata_update2
ifneq ($(INCREMENTAL_BUILDS),)
LOCAL_PROGUARD_ENABLED := disabled
diff --git a/services/core/java/com/android/server/BluetoothManagerService.java b/services/core/java/com/android/server/BluetoothManagerService.java
index e7f1d16..2ca1b4e 100644
--- a/services/core/java/com/android/server/BluetoothManagerService.java
+++ b/services/core/java/com/android/server/BluetoothManagerService.java
@@ -218,6 +218,11 @@
@Override
public void onUserRestrictionsChanged(int userId, Bundle newRestrictions,
Bundle prevRestrictions) {
+ if (!newRestrictions.containsKey(UserManager.DISALLOW_BLUETOOTH)
+ && !prevRestrictions.containsKey(UserManager.DISALLOW_BLUETOOTH)) {
+ // The relevant restriction has not changed - do nothing.
+ return;
+ }
final boolean bluetoothDisallowed =
newRestrictions.getBoolean(UserManager.DISALLOW_BLUETOOTH);
if ((mEnable || mEnableExternal) && bluetoothDisallowed) {
@@ -228,6 +233,7 @@
e);
}
}
+ updateOppLauncherComponentState(bluetoothDisallowed);
}
};
@@ -953,7 +959,9 @@
UserManagerInternal userManagerInternal =
LocalServices.getService(UserManagerInternal.class);
userManagerInternal.addUserRestrictionsListener(mUserRestrictionsListener);
- if (isBluetoothDisallowed()) {
+ final boolean isBluetoothDisallowed = isBluetoothDisallowed();
+ updateOppLauncherComponentState(isBluetoothDisallowed);
+ if (isBluetoothDisallowed) {
return;
}
if (mEnableExternal && isBluetoothPersistedStateOnBluetooth()) {
@@ -2011,6 +2019,24 @@
}
}
+ /**
+ * Disables BluetoothOppLauncherActivity component, so the Bluetooth sharing option is not
+ * offered to the user if Bluetooth is disallowed. Puts the component to its default state if
+ * Bluetooth is not disallowed.
+ *
+ * @param bluetoothDisallowed whether the {@link UserManager.DISALLOW_BLUETOOTH} user
+ * restriction was set.
+ */
+ private void updateOppLauncherComponentState(boolean bluetoothDisallowed) {
+ final ComponentName oppLauncherComponent = new ComponentName("com.android.bluetooth",
+ "com.android.bluetooth.opp.BluetoothOppLauncherActivity");
+ final int newState = bluetoothDisallowed
+ ? PackageManager.COMPONENT_ENABLED_STATE_DISABLED
+ : PackageManager.COMPONENT_ENABLED_STATE_DEFAULT;
+ mContext.getPackageManager()
+ .setComponentEnabledSetting(oppLauncherComponent, newState, 0);
+ }
+
@Override
public void dump(FileDescriptor fd, PrintWriter writer, String[] args) {
mContext.enforceCallingOrSelfPermission(android.Manifest.permission.DUMP, TAG);
diff --git a/services/core/java/com/android/server/SystemServiceManager.java b/services/core/java/com/android/server/SystemServiceManager.java
index fb8a815..d879919 100644
--- a/services/core/java/com/android/server/SystemServiceManager.java
+++ b/services/core/java/com/android/server/SystemServiceManager.java
@@ -35,13 +35,15 @@
private final Context mContext;
private boolean mSafeMode;
+ private boolean mRuntimeRestarted;
+ private boolean mFirstBoot;
// Services that should receive lifecycle events.
private final ArrayList<SystemService> mServices = new ArrayList<SystemService>();
private int mCurrentPhase = -1;
- public SystemServiceManager(Context context) {
+ SystemServiceManager(Context context) {
mContext = context;
}
@@ -235,7 +237,7 @@
}
/** Sets the safe mode flag for services to query. */
- public void setSafeMode(boolean safeMode) {
+ void setSafeMode(boolean safeMode) {
mSafeMode = safeMode;
}
@@ -248,6 +250,28 @@
}
/**
+ * @return true if runtime was restarted, false if it's normal boot
+ */
+ public boolean isRuntimeRestarted() {
+ return mRuntimeRestarted;
+ }
+
+ void setRuntimeRestarted(boolean runtimeRestarted) {
+ mRuntimeRestarted = runtimeRestarted;
+ }
+
+ /**
+ * @return true if it's first boot after OTA
+ */
+ public boolean isFirstBoot() {
+ return mFirstBoot;
+ }
+
+ void setFirstBoot(boolean firstBoot) {
+ mFirstBoot = firstBoot;
+ }
+
+ /**
* Outputs the state of this manager to the System log.
*/
public void dump() {
diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java
index 3ab30f2..48a7e7c 100644
--- a/services/core/java/com/android/server/am/ActivityManagerService.java
+++ b/services/core/java/com/android/server/am/ActivityManagerService.java
@@ -367,6 +367,7 @@
import static com.android.server.am.ActivityManagerDebugConfig.TAG_AM;
import static com.android.server.am.ActivityManagerDebugConfig.TAG_WITH_CLASS_NAME;
import static com.android.server.am.ActivityStackSupervisor.ActivityContainer.FORCE_NEW_TASK_FLAGS;
+import static com.android.server.am.ActivityStackSupervisor.CREATE_IF_NEEDED;
import static com.android.server.am.ActivityStackSupervisor.DEFER_RESUME;
import static com.android.server.am.ActivityStackSupervisor.FORCE_FOCUS;
import static com.android.server.am.ActivityStackSupervisor.ON_TOP;
@@ -6414,6 +6415,7 @@
// the pid if we are running in multiple processes, or just pull the
// next app record if we are emulating process with anonymous threads.
ProcessRecord app;
+ long startTime = SystemClock.uptimeMillis();
if (pid != MY_PID && pid >= 0) {
synchronized (mPidsSelfLocked) {
app = mPidsSelfLocked.get(pid);
@@ -6492,6 +6494,8 @@
mHandler.sendMessageDelayed(msg, CONTENT_PROVIDER_PUBLISH_TIMEOUT);
}
+ checkTime(startTime, "attachApplicationLocked: before bindApplication");
+
if (!normalMode) {
Slog.i(TAG, "Launching preboot mode app: " + app);
}
@@ -6563,6 +6567,7 @@
.getSerial();
// }
+ checkTime(startTime, "attachApplicationLocked: immediately before bindApplication");
thread.bindApplication(processName, appInfo, providers, app.instrumentationClass,
profilerInfo, app.instrumentationArguments, app.instrumentationWatcher,
app.instrumentationUiAutomationConnection, testMode,
@@ -6573,7 +6578,9 @@
mCoreSettingsObserver.getCoreSettingsLocked(),
buildSerial);
+ checkTime(startTime, "attachApplicationLocked: immediately after bindApplication");
updateLruProcessLocked(app, false, null);
+ checkTime(startTime, "attachApplicationLocked: after updateLruProcessLocked");
app.lastRequestedGc = app.lastLowMemory = SystemClock.uptimeMillis();
} catch (Exception e) {
// todo: Yikes! What should we do? For now we will try to
@@ -6612,6 +6619,7 @@
if (!badApp) {
try {
didSomething |= mServices.attachApplicationLocked(app, processName);
+ checkTime(startTime, "attachApplicationLocked: after mServices.attachApplicationLocked");
} catch (Exception e) {
Slog.wtf(TAG, "Exception thrown starting services in " + app, e);
badApp = true;
@@ -6622,6 +6630,7 @@
if (!badApp && isPendingBroadcastProcessLocked(pid)) {
try {
didSomething |= sendPendingBroadcastsLocked(app);
+ checkTime(startTime, "attachApplicationLocked: after sendPendingBroadcastsLocked");
} catch (Exception e) {
// If the app died trying to launch the receiver we declare it 'bad'
Slog.wtf(TAG, "Exception thrown dispatching broadcasts in " + app, e);
@@ -6653,6 +6662,7 @@
if (!didSomething) {
updateOomAdjLocked();
+ checkTime(startTime, "attachApplicationLocked: after updateOomAdjLocked");
}
return true;
@@ -9527,12 +9537,7 @@
Slog.w(TAG, "setTaskResizeable: taskId=" + taskId + " not found");
return;
}
- if (task.mResizeMode != resizeableMode) {
- task.mResizeMode = resizeableMode;
- mWindowManager.setTaskResizeable(taskId, resizeableMode);
- mStackSupervisor.ensureActivitiesVisibleLocked(null, 0, !PRESERVE_WINDOWS);
- mStackSupervisor.resumeFocusedStackTopActivityLocked();
- }
+ task.setResizeMode(resizeableMode);
}
}
@@ -9565,13 +9570,12 @@
}
boolean preserveWindow = (resizeMode & RESIZE_MODE_PRESERVE_WINDOW) != 0;
if (stackId != task.getStackId()) {
- mStackSupervisor.moveTaskToStackUncheckedLocked(
- task, stackId, ON_TOP, !FORCE_FOCUS, "resizeTask");
+ mStackSupervisor.moveTaskToStackUncheckedLocked(task, stackId, ON_TOP,
+ !FORCE_FOCUS, "resizeTask", true /* allowStackOnTop */);
preserveWindow = false;
}
- mStackSupervisor.resizeTaskLocked(task, bounds, resizeMode, preserveWindow,
- false /* deferResume */);
+ task.resize(bounds, resizeMode, preserveWindow, false /* deferResume */);
}
} finally {
Binder.restoreCallingIdentity(ident);
@@ -9594,7 +9598,7 @@
if (task.getStack() != null) {
// Return the bounds from window manager since it will be adjusted for various
// things like the presense of a docked stack for tasks that aren't resizeable.
- mWindowManager.getTaskBounds(task.taskId, rect);
+ task.getWindowContainerBounds(rect);
} else {
// Task isn't in window manager yet since it isn't associated with a stack.
// Return the persist value from activity manager
@@ -9612,6 +9616,44 @@
}
@Override
+ public void cancelTaskWindowTransition(int taskId) {
+ enforceCallingPermission(MANAGE_ACTIVITY_STACKS, "cancelTaskWindowTransition()");
+ final long ident = Binder.clearCallingIdentity();
+ try {
+ synchronized (this) {
+ final TaskRecord task = mStackSupervisor.anyTaskForIdLocked(
+ taskId, !RESTORE_FROM_RECENTS, INVALID_STACK_ID);
+ if (task == null) {
+ Slog.w(TAG, "cancelTaskWindowTransition: taskId=" + taskId + " not found");
+ return;
+ }
+ task.cancelWindowTransition();
+ }
+ } finally {
+ Binder.restoreCallingIdentity(ident);
+ }
+ }
+
+ @Override
+ public void cancelTaskThumbnailTransition(int taskId) {
+ enforceCallingPermission(MANAGE_ACTIVITY_STACKS, "cancelTaskThumbnailTransition()");
+ final long ident = Binder.clearCallingIdentity();
+ try {
+ synchronized (this) {
+ final TaskRecord task = mStackSupervisor.anyTaskForIdLocked(
+ taskId, !RESTORE_FROM_RECENTS, INVALID_STACK_ID);
+ if (task == null) {
+ Slog.w(TAG, "cancelTaskThumbnailTransition: taskId=" + taskId + " not found");
+ return;
+ }
+ task.cancelThumbnailTransition();
+ }
+ } finally {
+ Binder.restoreCallingIdentity(ident);
+ }
+ }
+
+ @Override
public Bitmap getTaskDescriptionIcon(String filePath, int userId) {
if (userId != UserHandle.getCallingUserId()) {
enforceCallingPermission(android.Manifest.permission.INTERACT_ACROSS_USERS_FULL,
@@ -9949,7 +9991,7 @@
// Defer the resume so resume/pausing while moving stacks is dangerous.
mStackSupervisor.moveTaskToStackLocked(topTask.taskId, DOCKED_STACK_ID,
false /* toTop */, !FORCE_FOCUS, "swapDockedAndFullscreenStack",
- ANIMATE, true /* deferResume */);
+ ANIMATE, true /* deferResume */, true /* allowStackOnTop */);
final int size = tasks.size();
for (int i = 0; i < size; i++) {
final int id = tasks.get(i).taskId;
@@ -9958,7 +10000,8 @@
}
mStackSupervisor.moveTaskToStackLocked(id,
FULLSCREEN_WORKSPACE_STACK_ID, true /* toTop */, !FORCE_FOCUS,
- "swapDockedAndFullscreenStack", ANIMATE, true /* deferResume */);
+ "swapDockedAndFullscreenStack", ANIMATE, true /* deferResume */,
+ true /* allowStackOnTop */);
}
// Because we deferred the resume, to avoid conflicts with stack switches while
@@ -9999,7 +10042,7 @@
mWindowManager.setDockedStackCreateState(createMode, initialBounds);
final boolean moved = mStackSupervisor.moveTaskToStackLocked(
taskId, DOCKED_STACK_ID, toTop, !FORCE_FOCUS, "moveTaskToDockedStack",
- animate, DEFER_RESUME);
+ animate, DEFER_RESUME, true /* allowStackOnTop */);
if (moved) {
if (moveHomeStackFront) {
mStackSupervisor.moveHomeStackToFront("moveTaskToDockedStack");
@@ -10113,10 +10156,12 @@
synchronized (this) {
long ident = Binder.clearCallingIdentity();
try {
- if (DEBUG_STACK) Slog.d(TAG_STACK,
- "positionTaskInStack: positioning task=" + taskId
- + " in stackId=" + stackId + " at position=" + position);
- mStackSupervisor.positionTaskInStackLocked(taskId, stackId, position);
+ if (DEBUG_STACK) Slog.d(TAG_STACK, "positionTaskInStack: positioning task="
+ + taskId + " in stackId=" + stackId + " at position=" + position);
+ final ActivityStack stack = mStackSupervisor.getStack(stackId, CREATE_IF_NEEDED,
+ !ON_TOP);
+
+ stack.positionChildAt(taskId, position);
} finally {
Binder.restoreCallingIdentity(ident);
}
@@ -11839,20 +11884,20 @@
}
synchronized (this) {
- if (mStackSupervisor.isUserLockedProfile(userId)) {
- final long ident = Binder.clearCallingIdentity();
- try {
+ final long ident = Binder.clearCallingIdentity();
+ try {
+ if (mUserController.shouldConfirmCredentials(userId)) {
final int currentUserId = mUserController.getCurrentUserIdLocked();
- if (mUserController.isLockScreenDisabled(currentUserId)) {
- // If there is no device lock, we will show the profile's credential page.
- mActivityStarter.showConfirmDeviceCredential(userId);
+ if (!mKeyguardController.isKeyguardLocked()) {
+ // If the device is not locked, we will prompt for credentials immediately.
+ mStackSupervisor.lockAllProfileTasks(userId);
} else {
// Showing launcher to avoid user entering credential twice.
startHomeActivityLocked(currentUserId, "notifyLockedProfile");
}
- } finally {
- Binder.restoreCallingIdentity(ident);
}
+ } finally {
+ Binder.restoreCallingIdentity(ident);
}
}
}
@@ -12093,6 +12138,9 @@
case ActivityManager.BUGREPORT_OPTION_WEAR:
extraOptions = "bugreportwear";
break;
+ case ActivityManager.BUGREPORT_OPTION_TELEPHONY:
+ extraOptions = "bugreporttelephony";
+ break;
default:
throw new IllegalArgumentException("Provided bugreport type is not correct, value: "
+ bugreportType);
diff --git a/services/core/java/com/android/server/am/ActivityManagerShellCommand.java b/services/core/java/com/android/server/am/ActivityManagerShellCommand.java
index 0d13ac6..29a4781 100644
--- a/services/core/java/com/android/server/am/ActivityManagerShellCommand.java
+++ b/services/core/java/com/android/server/am/ActivityManagerShellCommand.java
@@ -818,6 +818,8 @@
while ((opt=getNextOption()) != null) {
if (opt.equals("--progress")) {
bugreportType = ActivityManager.BUGREPORT_OPTION_INTERACTIVE;
+ } else if (opt.equals("--telephony")) {
+ bugreportType = ActivityManager.BUGREPORT_OPTION_TELEPHONY;
} else {
getErrPrintWriter().println("Error: Unknown option: " + opt);
return -1;
@@ -2453,10 +2455,11 @@
pw.println(" above <HEAP-LIMIT> then a heap dump is collected for the user to report.");
pw.println(" clear-watch-heap");
pw.println(" Clear the previously set-watch-heap.");
- pw.println(" bug-report [--progress]");
+ pw.println(" bug-report [--progress | --telephony]");
pw.println(" Request bug report generation; will launch a notification");
pw.println(" when done to select where it should be delivered. Options are:");
pw.println(" --progress: will launch a notification right away to show its progress.");
+ pw.println(" --telephony: will dump only telephony sections.");
pw.println(" force-stop [--user <USER_ID> | all | current] <PACKAGE>");
pw.println(" Completely stop the given application package.");
pw.println(" kill [--user <USER_ID> | all | current] <PACKAGE>");
diff --git a/services/core/java/com/android/server/am/ActivityMetricsLogger.java b/services/core/java/com/android/server/am/ActivityMetricsLogger.java
index 3f166fe..e46d204 100644
--- a/services/core/java/com/android/server/am/ActivityMetricsLogger.java
+++ b/services/core/java/com/android/server/am/ActivityMetricsLogger.java
@@ -172,7 +172,7 @@
MetricsLogger.action(mContext, MetricsEvent.APP_TRANSITION_DEVICE_UPTIME_SECONDS,
(int) (SystemClock.uptimeMillis() / 1000));
- LogBuilder builder = new LogBuilder();
+ LogBuilder builder = new LogBuilder(MetricsEvent.APP_TRANSITION);
builder.addTaggedData(MetricsEvent.APP_TRANSITION_COMPONENT_NAME, componentName);
builder.addTaggedData(MetricsEvent.APP_TRANSITION_PROCESS_RUNNING, processRunning ? 1 : 0);
builder.addTaggedData(MetricsEvent.APP_TRANSITION_DEVICE_UPTIME_SECONDS,
diff --git a/services/core/java/com/android/server/am/ActivityRecord.java b/services/core/java/com/android/server/am/ActivityRecord.java
index 0e4ab96..2963ad1 100644
--- a/services/core/java/com/android/server/am/ActivityRecord.java
+++ b/services/core/java/com/android/server/am/ActivityRecord.java
@@ -41,7 +41,6 @@
import static android.content.pm.ActivityInfo.RESIZE_MODE_UNRESIZEABLE;
import static android.os.Build.VERSION_CODES.HONEYCOMB;
import static android.os.Process.SYSTEM_UID;
-import static android.view.Display.DEFAULT_DISPLAY;
import static com.android.server.am.ActivityManagerDebugConfig.DEBUG_CONFIGURATION;
import static com.android.server.am.ActivityManagerDebugConfig.DEBUG_SAVED_STATE;
import static com.android.server.am.ActivityManagerDebugConfig.DEBUG_SCREENSHOTS;
@@ -75,7 +74,6 @@
import android.content.res.Configuration;
import android.graphics.Bitmap;
import android.graphics.Rect;
-import android.os.Build;
import android.os.Bundle;
import android.os.Debug;
import android.os.IBinder;
@@ -103,6 +101,7 @@
import com.android.server.am.ActivityStackSupervisor.ActivityContainer;
import com.android.server.wm.AppWindowContainerController;
import com.android.server.wm.AppWindowContainerListener;
+import com.android.server.wm.TaskWindowContainerController;
import java.io.File;
import java.io.IOException;
@@ -724,6 +723,10 @@
null : ComponentName.unflattenFromString(aInfo.requestedVrComponent);
}
+ AppWindowContainerController getWindowContainerController() {
+ return mWindowContainerController;
+ }
+
void createWindowContainer() {
if (mWindowContainerController != null) {
throw new IllegalArgumentException("Window container=" + mWindowContainerController
@@ -734,9 +737,10 @@
inHistory = true;
task.updateOverrideConfigurationFromLaunchBounds();
+ final TaskWindowContainerController taskController = task.getWindowContainerController();
- mWindowContainerController = new AppWindowContainerController(appToken, this, task.taskId,
- Integer.MAX_VALUE /* add on top */, info.screenOrientation, fullscreen,
+ mWindowContainerController = new AppWindowContainerController(taskController, appToken,
+ this, Integer.MAX_VALUE /* add on top */, info.screenOrientation, fullscreen,
(info.flags & FLAG_SHOW_FOR_ALL_USERS) != 0, info.configChanges,
task.voiceSession != null, mLaunchTaskBehind, isAlwaysFocusable(),
appInfo.targetSdkVersion, mRotationAnimationHint,
@@ -749,12 +753,7 @@
void removeWindowContainer() {
mWindowContainerController.removeContainer(getDisplayId());
- }
-
- // TODO: Remove once task record is converted to use controller in which case we can use
- // positionChildAt()
- void positionWindowContainerAt(int index) {
- mWindowContainerController.positionAt(task.taskId, index);
+ mWindowContainerController = null;
}
private boolean isHomeIntent(Intent intent) {
diff --git a/services/core/java/com/android/server/am/ActivityStack.java b/services/core/java/com/android/server/am/ActivityStack.java
index f7c3cea..ab65eb1 100644
--- a/services/core/java/com/android/server/am/ActivityStack.java
+++ b/services/core/java/com/android/server/am/ActivityStack.java
@@ -737,7 +737,7 @@
task = topTask();
if (task != null) {
- mWindowManager.moveTaskToTop(task.taskId);
+ task.moveWindowContainerToTop(true /* includingParents */);
}
}
@@ -756,7 +756,7 @@
mTaskHistory.remove(task);
mTaskHistory.add(0, task);
updateTaskMovement(task, false);
- mWindowManager.moveTaskToBottom(task.taskId);
+ task.moveWindowContainerToBottom();
}
}
@@ -2557,10 +2557,16 @@
position = Math.min(position, maxPosition);
mTaskHistory.remove(task);
mTaskHistory.add(position, task);
+ task.positionWindowContainerAt(mStackId, position);
updateTaskMovement(task, true);
}
private void insertTaskAtTop(TaskRecord task, ActivityRecord newActivity) {
+ insertTaskAtTop(task, newActivity, true /* allowStackOnTop */);
+ }
+
+ private void insertTaskAtTop(TaskRecord task, ActivityRecord newActivity,
+ boolean allowStackOnTop) {
boolean isLastTaskOverHome = false;
// If the moving task is over home stack, transfer its return type to next task
if (task.isOverHomeStack()) {
@@ -2619,7 +2625,7 @@
}
mTaskHistory.add(taskNdx, task);
updateTaskMovement(task, true);
- mWindowManager.moveTaskToTop(task.taskId);
+ task.moveWindowContainerToTop(allowStackOnTop /* includingParents */);
}
final void startActivityLocked(ActivityRecord r, ActivityRecord focusedTopActivity,
@@ -2863,7 +2869,7 @@
targetTask.addActivityAtBottom(p);
}
- mWindowManager.moveTaskToBottom(targetTask.taskId);
+ targetTask.moveWindowContainerToBottom();
replyChainEnd = -1;
} else if (forceReset || finishOnTaskLaunch || clearWhenTaskReset) {
// If the activity should just be removed -- either
@@ -2999,7 +3005,7 @@
if (DEBUG_TASKS) Slog.v(TAG_TASKS, "Pulling activity " + p
+ " from " + srcPos + " in to resetting task " + task);
}
- mWindowManager.moveTaskToTop(taskId);
+ task.moveWindowContainerToTop(true /* includingParents */);
// Now we've moved it in to place... but what if this is
// a singleTop activity and we have put it on top of another
@@ -4368,7 +4374,7 @@
}
mWindowManager.prepareAppTransition(TRANSIT_TASK_TO_BACK, false);
- mWindowManager.moveTaskToBottom(taskId);
+ tr.moveWindowContainerToBottom();
final TaskRecord task = mResumedActivity != null ? mResumedActivity.task : null;
if (prevIsHome || (task == tr && canGoHome) || (numTasks <= 1 && isOnHomeDisplay())) {
@@ -4800,14 +4806,7 @@
*/
void removeTask(TaskRecord task, String reason, int mode) {
if (mode == REMOVE_TASK_MODE_DESTROYING) {
- mStackSupervisor.removeLockedTaskLocked(task);
- mWindowManager.removeTask(task.taskId);
- if (!StackId.persistTaskBounds(mStackId)) {
- // Reset current bounds for task whose bounds shouldn't be persisted so it uses
- // default configuration the next time it launches.
- task.updateOverrideConfiguration(null);
- }
- mService.mTaskChangeNotificationController.notifyTaskRemoved(task.taskId);
+ task.removeWindowContainer();
}
final ActivityRecord r = mResumedActivity;
@@ -4879,11 +4878,7 @@
&& !isLockscreenShown) {
task.updateOverrideConfiguration(mBounds);
}
- final Rect bounds = task.updateOverrideConfigurationFromLaunchBounds();
- final boolean showForAllUsers = (info.flags & FLAG_SHOW_FOR_ALL_USERS) != 0;
- mWindowManager.addTask(taskId, mStackId, task.userId, bounds,
- task.getOverrideConfiguration(), task.mResizeMode, task.isHomeTask(),
- task.isOnTopLauncher(), toTop, showForAllUsers);
+ task.createWindowContainer(toTop, (info.flags & FLAG_SHOW_FOR_ALL_USERS) != 0);
return task;
}
@@ -4900,11 +4895,16 @@
}
void addTask(final TaskRecord task, final boolean toTop, String reason) {
+ addTask(task, toTop, reason, true /* allowStackOnTop */);
+ }
+
+ void addTask(final TaskRecord task, final boolean toTop, String reason,
+ boolean allowStackOnTop) {
final ActivityStack prevStack = preAddTask(task, reason, toTop);
task.setStack(this);
if (toTop) {
- insertTaskAtTop(task, null);
+ insertTaskAtTop(task, null, allowStackOnTop);
} else {
mTaskHistory.add(0, task);
updateTaskMovement(task, false);
@@ -4912,13 +4912,20 @@
postAddTask(task, prevStack);
}
- /** @see ActivityManagerService#positionTaskInStack(int, int, int). */
- void positionTask(final TaskRecord task, int position) {
+ void positionChildAt(int taskId, int index) {
+ final TaskRecord task = mStackSupervisor.anyTaskForIdLocked(taskId);
+ if (task == null) {
+ Slog.w(TAG, "positionTaskInStackLocked: no task for id=" + taskId);
+ return;
+ }
+
+ task.updateOverrideConfigurationForStack(this);
+
final ActivityRecord topRunningActivity = task.topRunningActivityLocked();
final boolean wasResumed = topRunningActivity == task.getStack().mResumedActivity;
final ActivityStack prevStack = preAddTask(task, "positionTask", !ON_TOP);
task.setStack(this);
- insertTaskAtPosition(task, position);
+ insertTaskAtPosition(task, index);
postAddTask(task, prevStack);
if (wasResumed) {
if (mResumedActivity != null) {
@@ -4928,6 +4935,11 @@
}
mResumedActivity = topRunningActivity;
}
+
+ // The task might have already been running and its visibility needs to be synchronized with
+ // the visibility of the stack / windows.
+ ensureActivitiesVisibleLocked(null, 0, !PRESERVE_WINDOWS);
+ mStackSupervisor.resumeFocusedStackTopActivityLocked();
}
private ActivityStack preAddTask(TaskRecord task, String reason, boolean toTop) {
diff --git a/services/core/java/com/android/server/am/ActivityStackSupervisor.java b/services/core/java/com/android/server/am/ActivityStackSupervisor.java
index 8bd7c90..8cf0708 100644
--- a/services/core/java/com/android/server/am/ActivityStackSupervisor.java
+++ b/services/core/java/com/android/server/am/ActivityStackSupervisor.java
@@ -89,6 +89,8 @@
import static com.android.server.am.TaskRecord.LOCK_TASK_AUTH_PINNABLE;
import static com.android.server.am.TaskRecord.LOCK_TASK_AUTH_WHITELISTED;
import static com.android.server.wm.AppTransition.TRANSIT_DOCK_TASK_FROM_RECENTS;
+import static java.lang.Integer.MAX_VALUE;
+import static java.lang.Integer.MIN_VALUE;
import android.Manifest;
import android.annotation.NonNull;
@@ -175,7 +177,6 @@
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
-import java.util.Objects;
import java.util.Set;
public class ActivityStackSupervisor extends ConfigurationContainer implements DisplayListener {
@@ -763,43 +764,52 @@
}
/**
- * TODO: Handle freefom mode.
- * @return true when credential confirmation is needed for the user and there is any
- * activity started by the user in any visible stack.
+ * Detects whether we should show a lock screen in front of this task for a locked user.
+ * <p>
+ * We'll do this if either of the following holds:
+ * <ul>
+ * <li>The top activity explicitly belongs to {@param userId}.</li>
+ * <li>The top activity returns a result to an activity belonging to {@param userId}.</li>
+ * </ul>
+ *
+ * @return {@code true} if the top activity looks like it belongs to {@param userId}.
*/
- boolean isUserLockedProfile(@UserIdInt int userId) {
- if (!mService.mUserController.shouldConfirmCredentials(userId)) {
- return false;
- }
- final ActivityStack fullScreenStack = getStack(FULLSCREEN_WORKSPACE_STACK_ID);
- final ActivityStack dockedStack = getStack(DOCKED_STACK_ID);
- final ActivityStack[] activityStacks = new ActivityStack[] {fullScreenStack, dockedStack};
- for (final ActivityStack activityStack : activityStacks) {
- if (activityStack == null) {
- continue;
- }
- if (activityStack.topRunningActivityLocked() == null) {
- continue;
- }
- if (activityStack.getStackVisibilityLocked(null) == STACK_INVISIBLE) {
- continue;
- }
- if (activityStack.isDockedStack() && mIsDockMinimized) {
- continue;
- }
- final TaskRecord topTask = activityStack.topTask();
- if (topTask == null) {
- continue;
- }
- // To handle the case that work app is in the task but just is not the top one.
- for (int i = topTask.mActivities.size() - 1; i >= 0; i--) {
- final ActivityRecord activityRecord = topTask.mActivities.get(i);
- if (activityRecord.userId == userId) {
- return true;
+ private boolean taskTopActivityIsUser(TaskRecord task, @UserIdInt int userId) {
+ // To handle the case that work app is in the task but just is not the top one.
+ final ActivityRecord activityRecord = task.getTopActivity();
+ final ActivityRecord resultTo = (activityRecord != null ? activityRecord.resultTo : null);
+
+ return (activityRecord != null && activityRecord.userId == userId)
+ || (resultTo != null && resultTo.userId == userId);
+ }
+
+ /**
+ * Find all visible task stacks containing {@param userId} and intercept them with an activity
+ * to block out the contents and possibly start a credential-confirming intent.
+ *
+ * @param userId user handle for the locked managed profile.
+ */
+ void lockAllProfileTasks(@UserIdInt int userId) {
+ mWindowManager.deferSurfaceLayout();
+ try {
+ final List<ActivityStack> stacks = getStacks();
+ for (int stackNdx = stacks.size() - 1; stackNdx >= 0; stackNdx--) {
+ final List<TaskRecord> tasks = stacks.get(stackNdx).getAllTasks();
+ for (int taskNdx = tasks.size() - 1; taskNdx >= 0; taskNdx--) {
+ final TaskRecord task = tasks.get(taskNdx);
+
+ // Check the task for a top activity belonging to userId, or returning a result
+ // to an activity belonging to userId. Example case: a document picker for
+ // personal files, opened by a work app, should still get locked.
+ if (taskTopActivityIsUser(task, userId)) {
+ mService.mTaskChangeNotificationController.notifyTaskProfileLocked(
+ task.taskId, userId);
+ }
}
}
+ } finally {
+ mWindowManager.continueSurfaceLayout();
}
- return false;
}
void setNextTaskIdForUserLocked(int taskId, int userId) {
@@ -1923,7 +1933,7 @@
}
if (stackId != currentStack.mStackId) {
currentStack = moveTaskToStackUncheckedLocked(task, stackId, ON_TOP,
- !FORCE_FOCUS, reason);
+ !FORCE_FOCUS, reason, true /* allowStackOnTop */);
stackId = currentStack.mStackId;
// moveTaskToStackUncheckedLocked() should already placed the task on top,
// still need moveTaskToFrontLocked() below for any transition settings.
@@ -1936,9 +1946,7 @@
// WM resizeTask must be done after the task is moved to the correct stack,
// because Task's setBounds() also updates dim layer's bounds, but that has
// dependency on the stack.
- mWindowManager.resizeTask(task.taskId, task.mBounds,
- task.getOverrideConfiguration(), false /* relayout */,
- false /* forced */);
+ task.resizeWindowContainer();
}
}
}
@@ -2164,8 +2172,10 @@
continueUpdateBounds(HOME_STACK_ID);
for (int i = mResizingTasksDuringAnimation.size() - 1; i >= 0; i--) {
final int taskId = mResizingTasksDuringAnimation.valueAt(i);
- if (anyTaskForIdLocked(taskId, !RESTORE_FROM_RECENTS, INVALID_STACK_ID) != null) {
- mWindowManager.setTaskDockedResizing(taskId, false);
+ final TaskRecord task =
+ anyTaskForIdLocked(taskId, !RESTORE_FROM_RECENTS, INVALID_STACK_ID);
+ if (task != null) {
+ task.setTaskDockedResizing(false);
}
}
mResizingTasksDuringAnimation.clear();
@@ -2211,7 +2221,7 @@
// display because it no longer contains any tasks.
mAllowDockedStackResize = false;
}
- final ActivityStack fullscreenStack = getStack(FULLSCREEN_WORKSPACE_STACK_ID);
+ ActivityStack fullscreenStack = getStack(FULLSCREEN_WORKSPACE_STACK_ID);
final boolean isFullscreenStackVisible = fullscreenStack != null &&
fullscreenStack.getStackVisibilityLocked(null) == STACK_VISIBLE;
final ArrayList<TaskRecord> tasks = stack.getAllTasks();
@@ -2228,15 +2238,18 @@
}
moveTaskToStackLocked(tasks.get(i).taskId,
FULLSCREEN_WORKSPACE_STACK_ID, onTop, onTop /*forceFocus*/,
- "moveTasksToFullscreenStack", ANIMATE, DEFER_RESUME);
+ "moveTasksToFullscreenStack - onTop", ANIMATE, DEFER_RESUME,
+ true /* allowStackOnTop */);
}
ensureActivitiesVisibleLocked(null, 0, PRESERVE_WINDOWS);
resumeFocusedStackTopActivityLocked();
} else {
- for (int i = size - 1; i >= 0; i--) {
- positionTaskInStackLocked(tasks.get(i).taskId,
- FULLSCREEN_WORKSPACE_STACK_ID, 0 /* position */);
+ for (int i = 0; i < size; i++) {
+ moveTaskToStackLocked(tasks.get(i).taskId, FULLSCREEN_WORKSPACE_STACK_ID,
+ true /* onTop */, false /* forceFocus */,
+ "moveTasksToFullscreenStack - NOT_onTop", !ANIMATE, DEFER_RESUME,
+ false /* allowStackOnTop */);
}
}
} finally {
@@ -2337,71 +2350,6 @@
}
}
- boolean resizeTaskLocked(TaskRecord task, Rect bounds, int resizeMode, boolean preserveWindow,
- boolean deferResume) {
- if (!task.isResizeable()) {
- Slog.w(TAG, "resizeTask: task " + task + " not resizeable.");
- return true;
- }
-
- // If this is a forced resize, let it go through even if the bounds is not changing,
- // as we might need a relayout due to surface size change (to/from fullscreen).
- final boolean forced = (resizeMode & RESIZE_MODE_FORCED) != 0;
- if (Objects.equals(task.mBounds, bounds) && !forced) {
- // Nothing to do here...
- return true;
- }
- bounds = TaskRecord.validateBounds(bounds);
-
- if (!mWindowManager.isValidTaskId(task.taskId)) {
- // Task doesn't exist in window manager yet (e.g. was restored from recents).
- // All we can do for now is update the bounds so it can be used when the task is
- // added to window manager.
- task.updateOverrideConfiguration(bounds);
- if (task.getStackId() != FREEFORM_WORKSPACE_STACK_ID) {
- // re-restore the task so it can have the proper stack association.
- restoreRecentTaskLocked(task, FREEFORM_WORKSPACE_STACK_ID);
- }
- return true;
- }
-
- if (!task.canResizeToBounds(bounds)) {
- throw new IllegalArgumentException("resizeTaskLocked: Can not resize task=" + task
- + " to bounds=" + bounds + " resizeMode=" + task.mResizeMode);
- }
-
- // Do not move the task to another stack here.
- // This method assumes that the task is already placed in the right stack.
- // we do not mess with that decision and we only do the resize!
-
- Trace.traceBegin(TRACE_TAG_ACTIVITY_MANAGER, "am.resizeTask_" + task.taskId);
-
- final boolean updatedConfig = task.updateOverrideConfiguration(bounds);
- // This variable holds information whether the configuration didn't change in a significant
- // way and the activity was kept the way it was. If it's false, it means the activity had
- // to be relaunched due to configuration change.
- boolean kept = true;
- if (updatedConfig) {
- final ActivityRecord r = task.topRunningActivityLocked();
- if (r != null) {
- kept = r.ensureActivityConfigurationLocked(0 /* globalChanges */, preserveWindow);
-
- if (!deferResume) {
- // All other activities must be made visible with their correct configuration.
- ensureActivitiesVisibleLocked(r, 0, !PRESERVE_WINDOWS);
- if (!kept) {
- resumeFocusedStackTopActivityLocked();
- }
- }
- }
- }
- mWindowManager.resizeTask(task.taskId, task.mBounds, task.getOverrideConfiguration(), kept,
- forced);
-
- Trace.traceEnd(TRACE_TAG_ACTIVITY_MANAGER);
- return kept;
- }
-
ActivityStack createStackOnDisplay(int stackId, int displayId, boolean onTop) {
ActivityDisplay activityDisplay = mActivityDisplays.get(displayId);
if (activityDisplay == null) {
@@ -2415,7 +2363,7 @@
}
/**
- * Removes the stack associed with the given {@param stackId}. If the {@param stackId} is the
+ * Removes the stack associated with the given {@param stackId}. If the {@param stackId} is the
* pinned stack, then its tasks are not explicitly removed when the stack is destroyed, but
* instead moved back onto the fullscreen stack.
*/
@@ -2437,8 +2385,7 @@
final int insertPosition = isFullscreenStackVisible
? Math.max(0, fullscreenStack.getChildCount() - 1)
: fullscreenStack.getChildCount();
- positionTaskInStackLocked(tasks.get(i).taskId, FULLSCREEN_WORKSPACE_STACK_ID,
- insertPosition);
+ fullscreenStack.positionChildAt(tasks.get(i).taskId, insertPosition);
}
ensureActivitiesVisibleLocked(null, 0, !PRESERVE_WINDOWS);
resumeFocusedStackTopActivityLocked();
@@ -2568,7 +2515,7 @@
* or is not a static stack).
* @return true if the task has been restored successfully.
*/
- private boolean restoreRecentTaskLocked(TaskRecord task, int stackId) {
+ boolean restoreRecentTaskLocked(TaskRecord task, int stackId) {
if (!StackId.isStaticStack(stackId)) {
// If stack is not static (or stack id is invalid) - use the default one.
// This means that tasks that were on external displays will be restored on the
@@ -2603,10 +2550,8 @@
}
stack.addTask(task, false /* toTop */, "restoreRecentTask");
- final Rect bounds = task.updateOverrideConfigurationFromLaunchBounds();
- mWindowManager.addTask(task.taskId, stack.mStackId, task.userId, bounds,
- task.getOverrideConfiguration(), task.mResizeMode, task.isHomeTask(),
- task.isOnTopLauncher(), false /* toTop */, true /* showForAllUsers */);
+ // TODO: move call for creation here and other place into Stack.addTask()
+ task.createWindowContainer(false /* toTop */, true /* showForAllUsers */);
if (DEBUG_RECENTS) Slog.v(TAG_RECENTS,
"Added restored task=" + task + " to stack=" + stack);
final ArrayList<ActivityRecord> activities = task.mActivities;
@@ -2660,10 +2605,13 @@
* @param toTop True if the task should be placed at the top of the stack.
* @param forceFocus if focus should be moved to the new stack
* @param reason Reason the task is been moved.
+ * @param allowStackOnTop If stack movement should be moved to the top due to the addition of
+ * the task to the stack. E.g. Moving the stack to the front because it
+ * should be focused because it now contains the focused activity.
* @return The stack the task was moved to.
*/
- ActivityStack moveTaskToStackUncheckedLocked(
- TaskRecord task, int stackId, boolean toTop, boolean forceFocus, String reason) {
+ ActivityStack moveTaskToStackUncheckedLocked(TaskRecord task, int stackId, boolean toTop,
+ boolean forceFocus, String reason, boolean allowStackOnTop) {
if (StackId.isMultiWindowStack(stackId) && !mService.mSupportsMultiWindow) {
throw new IllegalStateException("moveTaskToStackUncheckedLocked: Device doesn't "
@@ -2694,15 +2642,15 @@
// if a docked stack is created below which will lead to the stack we are moving from and
// its resizeable tasks being resized.
task.mTemporarilyUnresizable = true;
- final ActivityStack stack = getStack(stackId, CREATE_IF_NEEDED, toTop);
+ final ActivityStack stack = getStack(stackId, CREATE_IF_NEEDED, toTop && allowStackOnTop);
task.mTemporarilyUnresizable = false;
- mWindowManager.moveTaskToStack(task.taskId, stack.mStackId, toTop);
- stack.addTask(task, toTop, reason);
+ task.reparentWindowContainer(stack.mStackId, toTop ? MAX_VALUE : MIN_VALUE);
+ stack.addTask(task, toTop, reason, allowStackOnTop);
// If the task had focus before (or we're requested to move focus),
// move focus to the new stack by moving the stack to the front.
stack.moveToFrontAndResumeStateIfNeeded(
- r, forceFocus || wasFocused || wasFront, wasResumed, reason);
+ r, allowStackOnTop && (forceFocus || wasFocused || wasFront), wasResumed, reason);
return stack;
}
@@ -2710,11 +2658,11 @@
boolean moveTaskToStackLocked(int taskId, int stackId, boolean toTop, boolean forceFocus,
String reason, boolean animate) {
return moveTaskToStackLocked(taskId, stackId, toTop, forceFocus, reason, animate,
- false /* deferResume */);
+ false /* deferResume */, true /* allowStackOnTop */);
}
boolean moveTaskToStackLocked(int taskId, int stackId, boolean toTop, boolean forceFocus,
- String reason, boolean animate, boolean deferResume) {
+ String reason, boolean animate, boolean deferResume, boolean allowStackOnTop) {
final TaskRecord task = anyTaskForIdLocked(taskId);
if (task == null) {
Slog.w(TAG, "moveTaskToStack: no task for id=" + taskId);
@@ -2754,7 +2702,7 @@
boolean kept = true;
try {
final ActivityStack stack = moveTaskToStackUncheckedLocked(
- task, stackId, toTop, forceFocus, reason + " moveTaskToStack");
+ task, stackId, toTop, forceFocus, reason + " moveTaskToStack", allowStackOnTop);
stackId = stack.mStackId;
if (!animate) {
@@ -2766,19 +2714,18 @@
// Make sure the task has the appropriate bounds/size for the stack it is in.
if (stackId == FULLSCREEN_WORKSPACE_STACK_ID && task.mBounds != null) {
- kept = resizeTaskLocked(task, stack.mBounds, RESIZE_MODE_SYSTEM,
- !mightReplaceWindow, deferResume);
+ kept = task.resize(stack.mBounds, RESIZE_MODE_SYSTEM, !mightReplaceWindow,
+ deferResume);
} else if (stackId == FREEFORM_WORKSPACE_STACK_ID) {
Rect bounds = task.getLaunchBounds();
if (bounds == null) {
stack.layoutTaskInStack(task, null);
bounds = task.mBounds;
}
- kept = resizeTaskLocked(task, bounds, RESIZE_MODE_FORCED, !mightReplaceWindow,
- deferResume);
+ kept = task.resize(bounds, RESIZE_MODE_FORCED, !mightReplaceWindow, deferResume);
} else if (stackId == DOCKED_STACK_ID || stackId == PINNED_STACK_ID) {
- kept = resizeTaskLocked(task, stack.mBounds, RESIZE_MODE_SYSTEM,
- !mightReplaceWindow, deferResume);
+ kept = task.resize(stack.mBounds, RESIZE_MODE_SYSTEM, !mightReplaceWindow,
+ deferResume);
}
} finally {
mWindowManager.continueSurfaceLayout();
@@ -2908,28 +2855,6 @@
return true;
}
- /** @see ActivityManagerService#positionTaskInStack(int, int, int). */
- void positionTaskInStackLocked(int taskId, int stackId, int position) {
- final TaskRecord task = anyTaskForIdLocked(taskId);
- if (task == null) {
- Slog.w(TAG, "positionTaskInStackLocked: no task for id=" + taskId);
- return;
- }
- final ActivityStack stack = getStack(stackId, CREATE_IF_NEEDED, !ON_TOP);
-
- task.updateOverrideConfigurationForStack(stack);
-
- // TODO: Return final position from WM for AM to use instead of duplicating computations in
- // ActivityStack#insertTaskAtPosition.
- mWindowManager.positionTaskInStack(
- taskId, stackId, position, task.mBounds, task.getOverrideConfiguration());
- stack.positionTask(task, position);
- // The task might have already been running and its visibility needs to be synchronized with
- // the visibility of the stack / windows.
- stack.ensureActivitiesVisibleLocked(null, 0, !PRESERVE_WINDOWS);
- resumeFocusedStackTopActivityLocked();
- }
-
ActivityRecord findTaskLocked(ActivityRecord r) {
mTmpFindTaskResult.r = null;
mTmpFindTaskResult.matchedByRootAffinity = false;
@@ -3352,7 +3277,7 @@
stack.switchUserLocked(userId);
TaskRecord task = stack.topTask();
if (task != null) {
- mWindowManager.moveTaskToTop(task.taskId);
+ task.moveWindowContainerToTop(true /* includingParents */);
}
}
}
@@ -3813,7 +3738,7 @@
: task.getTopActivity() != null ? task.getTopActivity().packageName
: "unknown";
taskBounds[i] = new Rect();
- mWindowManager.getTaskBounds(task.taskId, taskBounds[i]);
+ task.getWindowContainerBounds(taskBounds[i]);
taskUserIds[i] = task.userId;
}
info.taskIds = taskIds;
@@ -4768,11 +4693,11 @@
/**
* Puts a task into resizing mode during the next app transition.
*
- * @param taskId the id of the task to put into resizing mode
+ * @param task The task to put into resizing mode
*/
- private void setResizingDuringAnimation(int taskId) {
- mResizingTasksDuringAnimation.add(taskId);
- mWindowManager.setTaskDockedResizing(taskId, true);
+ private void setResizingDuringAnimation(TaskRecord task) {
+ mResizingTasksDuringAnimation.add(task.taskId);
+ task.setTaskDockedResizing(true);
}
final int startActivityFromRecentsInner(int taskId, Bundle bOptions) {
@@ -4837,7 +4762,7 @@
// the window renders full-screen with the background filling the void. Also only
// call this at the end to make sure that tasks exists on the window manager side.
if (launchStackId == DOCKED_STACK_ID) {
- setResizingDuringAnimation(taskId);
+ setResizingDuringAnimation(task);
}
mService.mActivityStarter.postStartActivityUncheckedProcessing(task.getTopActivity(),
@@ -4854,7 +4779,7 @@
int result = mService.startActivityInPackage(callingUid, callingPackage, intent, null,
null, null, 0, 0, bOptions, userId, null, task);
if (launchStackId == DOCKED_STACK_ID) {
- setResizingDuringAnimation(task.taskId);
+ setResizingDuringAnimation(task);
}
return result;
}
diff --git a/services/core/java/com/android/server/am/ActivityStarter.java b/services/core/java/com/android/server/am/ActivityStarter.java
index 007a478..61e3ad5 100644
--- a/services/core/java/com/android/server/am/ActivityStarter.java
+++ b/services/core/java/com/android/server/am/ActivityStarter.java
@@ -1770,8 +1770,8 @@
mInTask.updateOverrideConfiguration(mLaunchBounds);
int stackId = mInTask.getLaunchStackId();
if (stackId != mInTask.getStackId()) {
- final ActivityStack stack = mSupervisor.moveTaskToStackUncheckedLocked(
- mInTask, stackId, ON_TOP, !FORCE_FOCUS, "inTaskToFront");
+ final ActivityStack stack = mSupervisor.moveTaskToStackUncheckedLocked(mInTask,
+ stackId, ON_TOP, !FORCE_FOCUS, "inTaskToFront", true /* allowStackOnTop */);
stackId = stack.mStackId;
}
if (StackId.resizeStackWithLaunchBounds(stackId)) {
@@ -1824,7 +1824,7 @@
mSupervisor.getNextTaskIdForUserLocked(mStartActivity.userId), mStartActivity.info,
mIntent, null, null, true, mStartActivity.mActivityType);
mStartActivity.setTask(task, null);
- mWindowManager.moveTaskToTop(mStartActivity.task.taskId);
+ mStartActivity.task.moveWindowContainerToTop(true /* includingParents */);
if (DEBUG_TASKS) Slog.v(TAG_TASKS,
"Starting new activity " + mStartActivity + " in new guessed " + mStartActivity.task);
}
diff --git a/services/core/java/com/android/server/am/TaskChangeNotificationController.java b/services/core/java/com/android/server/am/TaskChangeNotificationController.java
index fd248c6..fbdbb1b 100644
--- a/services/core/java/com/android/server/am/TaskChangeNotificationController.java
+++ b/services/core/java/com/android/server/am/TaskChangeNotificationController.java
@@ -39,6 +39,7 @@
static final int NOTIFY_TASK_DESCRIPTION_CHANGED_LISTENERS_MSG = 11;
static final int NOTIFY_ACTIVITY_REQUESTED_ORIENTATION_CHANGED_LISTENERS = 12;
static final int NOTIFY_TASK_REMOVAL_STARTED_LISTENERS = 13;
+ static final int NOTIFY_TASK_PROFILE_LOCKED_LISTENERS_MSG = 14;
// Delay in notifying task stack change listeners (in millis)
static final int NOTIFY_TASK_STACK_CHANGE_LISTENERS_DELAY = 100;
@@ -110,6 +111,9 @@
case NOTIFY_ACTIVITY_DISMISSING_DOCKED_STACK_MSG:
forAllListeners((listener) -> listener.onActivityDismissingDockedStack());
break;
+ case NOTIFY_TASK_PROFILE_LOCKED_LISTENERS_MSG:
+ forAllListeners((listener) -> listener.onTaskProfileLocked(msg.arg1, msg.arg2));
+ break;
}
}
}
@@ -228,4 +232,13 @@
mHandler.obtainMessage(NOTIFY_TASK_REMOVAL_STARTED_LISTENERS, taskId, 0 /* unused */)
.sendToTarget();
}
+
+ /**
+ * Notify listeners that the task has been put in a locked state because one or more of the
+ * activities inside it belong to a managed profile user that has been locked.
+ */
+ void notifyTaskProfileLocked(int taskId, int userId) {
+ mHandler.obtainMessage(NOTIFY_TASK_PROFILE_LOCKED_LISTENERS_MSG, taskId, userId)
+ .sendToTarget();
+ }
}
diff --git a/services/core/java/com/android/server/am/TaskRecord.java b/services/core/java/com/android/server/am/TaskRecord.java
index a17cf3b..d0eac77 100644
--- a/services/core/java/com/android/server/am/TaskRecord.java
+++ b/services/core/java/com/android/server/am/TaskRecord.java
@@ -39,6 +39,7 @@
import android.os.Debug;
import android.os.ParcelFileDescriptor;
import android.os.RemoteException;
+import android.os.Trace;
import android.os.UserHandle;
import android.provider.Settings;
import android.service.voice.IVoiceInteractionSession;
@@ -48,6 +49,7 @@
import com.android.internal.app.IVoiceInteractor;
import com.android.internal.util.XmlUtils;
+import com.android.server.wm.TaskWindowContainerController;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
import org.xmlpull.v1.XmlSerializer;
@@ -58,6 +60,7 @@
import java.util.ArrayList;
import java.util.Objects;
+import static android.app.ActivityManager.RESIZE_MODE_FORCED;
import static android.app.ActivityManager.StackId.DOCKED_STACK_ID;
import static android.app.ActivityManager.StackId.FREEFORM_WORKSPACE_STACK_ID;
import static android.app.ActivityManager.StackId.FULLSCREEN_WORKSPACE_STACK_ID;
@@ -80,6 +83,7 @@
import static android.content.pm.ActivityInfo.RESIZE_MODE_RESIZEABLE;
import static android.content.pm.ActivityInfo.RESIZE_MODE_RESIZEABLE_VIA_SDK_VERSION;
import static android.content.pm.ApplicationInfo.PRIVATE_FLAG_PRIVILEGED;
+import static android.os.Trace.TRACE_TAG_ACTIVITY_MANAGER;
import static android.provider.Settings.Secure.USER_SETUP_COMPLETE;
import static com.android.server.am.ActivityManagerDebugConfig.DEBUG_ADD_REMOVE;
import static com.android.server.am.ActivityManagerDebugConfig.DEBUG_LOCKTASK;
@@ -95,6 +99,7 @@
import static com.android.server.am.ActivityRecord.HOME_ACTIVITY_TYPE;
import static com.android.server.am.ActivityRecord.RECENTS_ACTIVITY_TYPE;
import static com.android.server.am.ActivityRecord.STARTING_WINDOW_SHOWN;
+import static com.android.server.am.ActivityStackSupervisor.PRESERVE_WINDOWS;
final class TaskRecord extends ConfigurationContainer {
private static final String TAG = TAG_WITH_CLASS_NAME ? "TaskRecord" : TAG_AM;
@@ -280,6 +285,8 @@
/** Helper object used for updating override configuration. */
private Configuration mTmpConfig = new Configuration();
+ private TaskWindowContainerController mWindowContainerController;
+
TaskRecord(ActivityManagerService service, int _taskId, ActivityInfo info, Intent _intent,
IVoiceInteractionSession _voiceSession, IVoiceInteractor _voiceInteractor, int type) {
mService = service;
@@ -389,6 +396,155 @@
mService.mTaskChangeNotificationController.notifyTaskCreated(_taskId, realActivity);
}
+ TaskWindowContainerController getWindowContainerController() {
+ return mWindowContainerController;
+ }
+
+ void createWindowContainer(boolean onTop, boolean showForAllUsers) {
+ if (mWindowContainerController != null) {
+ throw new IllegalArgumentException("Window container=" + mWindowContainerController
+ + " already created for task=" + this);
+ }
+
+ final Rect bounds = updateOverrideConfigurationFromLaunchBounds();
+ final Configuration overrideConfig = getOverrideConfiguration();
+ mWindowContainerController = new TaskWindowContainerController(taskId, getStackId(), userId,
+ bounds, overrideConfig, mResizeMode, isHomeTask(), isOnTopLauncher(), onTop,
+ showForAllUsers);
+ }
+
+ void removeWindowContainer() {
+ mService.mStackSupervisor.removeLockedTaskLocked(this);
+ mWindowContainerController.removeContainer();
+ if (!StackId.persistTaskBounds(getStackId())) {
+ // Reset current bounds for task whose bounds shouldn't be persisted so it uses
+ // default configuration the next time it launches.
+ updateOverrideConfiguration(null);
+ }
+ mService.mTaskChangeNotificationController.notifyTaskRemoved(taskId);
+ mWindowContainerController = null;
+ }
+
+ void setResizeMode(int resizeMode) {
+ if (mResizeMode == resizeMode) {
+ return;
+ }
+ mResizeMode = resizeMode;
+ mWindowContainerController.setResizeable(resizeMode);
+ mService.mStackSupervisor.ensureActivitiesVisibleLocked(null, 0, !PRESERVE_WINDOWS);
+ mService.mStackSupervisor.resumeFocusedStackTopActivityLocked();
+ }
+
+ void setTaskDockedResizing(boolean resizing) {
+ mWindowContainerController.setTaskDockedResizing(resizing);
+ }
+
+ boolean resize(Rect bounds, int resizeMode, boolean preserveWindow, boolean deferResume) {
+ if (!isResizeable()) {
+ Slog.w(TAG, "resizeTask: task " + this + " not resizeable.");
+ return true;
+ }
+
+ // If this is a forced resize, let it go through even if the bounds is not changing,
+ // as we might need a relayout due to surface size change (to/from fullscreen).
+ final boolean forced = (resizeMode & RESIZE_MODE_FORCED) != 0;
+ if (Objects.equals(mBounds, bounds) && !forced) {
+ // Nothing to do here...
+ return true;
+ }
+ bounds = validateBounds(bounds);
+
+ if (mWindowContainerController == null) {
+ // Task doesn't exist in window manager yet (e.g. was restored from recents).
+ // All we can do for now is update the bounds so it can be used when the task is
+ // added to window manager.
+ updateOverrideConfiguration(bounds);
+ if (getStackId() != FREEFORM_WORKSPACE_STACK_ID) {
+ // re-restore the task so it can have the proper stack association.
+ mService.mStackSupervisor.restoreRecentTaskLocked(this,
+ FREEFORM_WORKSPACE_STACK_ID);
+ }
+ return true;
+ }
+
+ if (!canResizeToBounds(bounds)) {
+ throw new IllegalArgumentException("resizeTask: Can not resize task=" + this
+ + " to bounds=" + bounds + " resizeMode=" + mResizeMode);
+ }
+
+ // Do not move the task to another stack here.
+ // This method assumes that the task is already placed in the right stack.
+ // we do not mess with that decision and we only do the resize!
+
+ Trace.traceBegin(TRACE_TAG_ACTIVITY_MANAGER, "am.resizeTask_" + taskId);
+
+ final boolean updatedConfig = updateOverrideConfiguration(bounds);
+ // This variable holds information whether the configuration didn't change in a significant
+ // way and the activity was kept the way it was. If it's false, it means the activity had
+ // to be relaunched due to configuration change.
+ boolean kept = true;
+ if (updatedConfig) {
+ final ActivityRecord r = topRunningActivityLocked();
+ if (r != null) {
+ kept = r.ensureActivityConfigurationLocked(0 /* globalChanges */, preserveWindow);
+
+ if (!deferResume) {
+ // All other activities must be made visible with their correct configuration.
+ mService.mStackSupervisor.ensureActivitiesVisibleLocked(r, 0, !PRESERVE_WINDOWS);
+ if (!kept) {
+ mService.mStackSupervisor.resumeFocusedStackTopActivityLocked();
+ }
+ }
+ }
+ }
+ mWindowContainerController.resize(mBounds, getOverrideConfiguration(), kept, forced);
+
+ Trace.traceEnd(TRACE_TAG_ACTIVITY_MANAGER);
+ return kept;
+ }
+
+ // TODO: Investigate combining with the resize() method above.
+ void resizeWindowContainer() {
+ mWindowContainerController.resize(mBounds, getOverrideConfiguration(), false /* relayout */,
+ false /* forced */);
+ }
+
+ // TODO: Remove once we have a stack controller.
+ void positionWindowContainerAt(int stackId, int index) {
+ mWindowContainerController.positionAt(stackId, index, mBounds, getOverrideConfiguration());
+ }
+
+ // TODO: Replace with moveChildToTop?
+ void moveWindowContainerToTop(boolean includingParents) {
+ if (mWindowContainerController != null) {
+ mWindowContainerController.moveToTop(includingParents);
+ }
+ }
+
+ // TODO: Replace with moveChildToBottom?
+ void moveWindowContainerToBottom() {
+ if (mWindowContainerController != null) {
+ mWindowContainerController.moveToBottom();
+ }
+ }
+
+ void getWindowContainerBounds(Rect bounds) {
+ mWindowContainerController.getBounds(bounds);
+ }
+
+ // TODO: make this part of adding it to the stack?
+ void reparentWindowContainer(int stackId, int position) {
+ mWindowContainerController.reparent(stackId, position);
+ }
+
+ void cancelWindowTransition() {
+ mWindowContainerController.cancelWindowTransition();
+ }
+
+ void cancelThumbnailTransition() {
+ mWindowContainerController.cancelThumbnailTransition();
+ }
+
void touchActiveTime() {
lastActiveTime = System.currentTimeMillis();
if (firstActiveTime == 0) {
@@ -852,7 +1008,7 @@
// Sync. with window manager
updateOverrideConfigurationFromLaunchBounds();
- r.positionWindowContainerAt(index);
+ mWindowContainerController.positionChildAt(r.getWindowContainerController(), index);
r.onOverrideConfigurationSent();
}
@@ -1610,23 +1766,28 @@
boolean overrideWidth, boolean overrideHeight) {
mTmpNonDecorBounds.set(bounds);
mTmpStableBounds.set(bounds);
- subtractNonDecorInsets(
- mTmpNonDecorBounds, insetBounds != null ? insetBounds : bounds,
- overrideWidth, overrideHeight);
- subtractStableInsets(
- mTmpStableBounds, insetBounds != null ? insetBounds : bounds,
- overrideWidth, overrideHeight);
- // For calculating screenWidthDp, screenHeightDp, we use the stable inset screen area,
- // i.e. the screen area without the system bars.
- // Additionally task dimensions should not be bigger than its parents dimensions.
final Configuration parentConfig = getParent().getConfiguration();
config.unset();
final float density = parentConfig.densityDpi * DisplayMetrics.DENSITY_DEFAULT_SCALE;
- config.screenWidthDp =
- Math.min((int)(mTmpStableBounds.width() / density), parentConfig.screenWidthDp);
- config.screenHeightDp =
- Math.min((int)(mTmpStableBounds.height() / density), parentConfig.screenHeightDp);
+ final boolean isFloatingTask = mStack != null && StackId.tasksAreFloating(mStack.mStackId);
+ if (isFloatingTask) {
+ // Floating tasks should not be resized to the screen's bounds.
+ config.screenWidthDp = (int) (mTmpStableBounds.width() / density);
+ config.screenHeightDp = (int) (mTmpStableBounds.height() / density);
+ } else {
+ // For calculating screenWidthDp, screenWidthDp, we use the stable inset screen area,
+ // i.e. the screen area without the system bars.
+ // Additionally task dimensions should not be bigger than its parents dimensions.
+ subtractNonDecorInsets(mTmpNonDecorBounds, insetBounds != null ? insetBounds : bounds,
+ overrideWidth, overrideHeight);
+ subtractStableInsets(mTmpStableBounds, insetBounds != null ? insetBounds : bounds,
+ overrideWidth, overrideHeight);
+ config.screenWidthDp = Math.min(
+ (int) (mTmpStableBounds.width() / density), parentConfig.screenWidthDp);
+ config.screenHeightDp = Math.min(
+ (int) (mTmpStableBounds.height() / density), parentConfig.screenHeightDp);
+ }
// TODO: Orientation?
config.orientation = (config.screenWidthDp <= config.screenHeightDp)
diff --git a/services/core/java/com/android/server/am/UserController.java b/services/core/java/com/android/server/am/UserController.java
index 45e06b0..71ebad9 100644
--- a/services/core/java/com/android/server/am/UserController.java
+++ b/services/core/java/com/android/server/am/UserController.java
@@ -255,10 +255,11 @@
// storage is already unlocked.
if (uss.setState(STATE_BOOTING, STATE_RUNNING_LOCKED)) {
mInjector.getUserManagerInternal().setUserState(userId, uss.state);
-
- int uptimeSeconds = (int)(SystemClock.elapsedRealtime() / 1000);
- MetricsLogger.histogram(mInjector.getContext(), "framework_locked_boot_completed",
- uptimeSeconds);
+ if (!mInjector.isRuntimeRestarted() && !mInjector.isFirstBoot()) {
+ int uptimeSeconds = (int)(SystemClock.elapsedRealtime() / 1000);
+ MetricsLogger.histogram(mInjector.getContext(),
+ "framework_locked_boot_completed", uptimeSeconds);
+ }
mHandler.sendMessage(mHandler.obtainMessage(REPORT_LOCKED_BOOT_COMPLETE_MSG,
userId, 0));
@@ -429,9 +430,11 @@
}
Slog.d(TAG, "Sending BOOT_COMPLETE user #" + userId);
- int uptimeSeconds = (int)(SystemClock.elapsedRealtime() / 1000);
- MetricsLogger.histogram(mInjector.getContext(), "framework_boot_completed",
- uptimeSeconds);
+ if (!mInjector.isRuntimeRestarted() && !mInjector.isFirstBoot()) {
+ int uptimeSeconds = (int) (SystemClock.elapsedRealtime() / 1000);
+ MetricsLogger.histogram(mInjector.getContext(), "framework_boot_completed",
+ uptimeSeconds);
+ }
final Intent bootIntent = new Intent(Intent.ACTION_BOOT_COMPLETED, null);
bootIntent.putExtra(Intent.EXTRA_USER_HANDLE, userId);
bootIntent.addFlags(Intent.FLAG_RECEIVER_NO_ABORT
@@ -1696,6 +1699,14 @@
mService.mSystemServiceManager.stopUser(userId);
}
+ boolean isRuntimeRestarted() {
+ return mService.mSystemServiceManager.isRuntimeRestarted();
+ }
+
+ boolean isFirstBoot() {
+ return mService.mSystemServiceManager.isFirstBoot();
+ }
+
void sendPreBootBroadcast(int userId, boolean quiet, final Runnable onFinish) {
new PreBootBroadcaster(mService, userId, null, quiet) {
@Override
diff --git a/services/core/java/com/android/server/connectivity/Tethering.java b/services/core/java/com/android/server/connectivity/Tethering.java
index 6d96a10..79567d5 100644
--- a/services/core/java/com/android/server/connectivity/Tethering.java
+++ b/services/core/java/com/android/server/connectivity/Tethering.java
@@ -199,7 +199,8 @@
mTetherMasterSM = new TetherMasterSM("TetherMaster", mLooper);
mTetherMasterSM.start();
- mUpstreamNetworkMonitor = new UpstreamNetworkMonitor();
+ mUpstreamNetworkMonitor = new UpstreamNetworkMonitor(
+ mContext, mTetherMasterSM, TetherMasterSM.EVENT_UPSTREAM_CALLBACK);
mStateReceiver = new StateReceiver();
IntentFilter filter = new IntentFilter();
@@ -1027,38 +1028,6 @@
}
/**
- * A NetworkCallback class that relays information of interest to the
- * tethering master state machine thread for subsequent processing.
- */
- class UpstreamNetworkCallback extends NetworkCallback {
- @Override
- public void onAvailable(Network network) {
- mTetherMasterSM.sendMessage(TetherMasterSM.EVENT_UPSTREAM_CALLBACK,
- UpstreamNetworkMonitor.EVENT_ON_AVAILABLE, 0, network);
- }
-
- @Override
- public void onCapabilitiesChanged(Network network, NetworkCapabilities newNc) {
- mTetherMasterSM.sendMessage(TetherMasterSM.EVENT_UPSTREAM_CALLBACK,
- UpstreamNetworkMonitor.EVENT_ON_CAPABILITIES, 0,
- new NetworkState(null, null, newNc, network, null, null));
- }
-
- @Override
- public void onLinkPropertiesChanged(Network network, LinkProperties newLp) {
- mTetherMasterSM.sendMessage(TetherMasterSM.EVENT_UPSTREAM_CALLBACK,
- UpstreamNetworkMonitor.EVENT_ON_LINKPROPERTIES, 0,
- new NetworkState(null, newLp, null, network, null, null));
- }
-
- @Override
- public void onLost(Network network) {
- mTetherMasterSM.sendMessage(TetherMasterSM.EVENT_UPSTREAM_CALLBACK,
- UpstreamNetworkMonitor.EVENT_ON_LOST, 0, network);
- }
- }
-
- /**
* A class to centralize all the network and link properties information
* pertaining to the current and any potential upstream network.
*
@@ -1072,21 +1041,31 @@
* TODO: Investigate whether more "upstream-specific" logic/functionality
* could/should be moved here.
*/
- class UpstreamNetworkMonitor {
- static final int EVENT_ON_AVAILABLE = 1;
- static final int EVENT_ON_CAPABILITIES = 2;
- static final int EVENT_ON_LINKPROPERTIES = 3;
- static final int EVENT_ON_LOST = 4;
+ public class UpstreamNetworkMonitor {
+ public static final int EVENT_ON_AVAILABLE = 1;
+ public static final int EVENT_ON_CAPABILITIES = 2;
+ public static final int EVENT_ON_LINKPROPERTIES = 3;
+ public static final int EVENT_ON_LOST = 4;
- final HashMap<Network, NetworkState> mNetworkMap = new HashMap<>();
- NetworkCallback mDefaultNetworkCallback;
- NetworkCallback mDunTetheringCallback;
+ private final Context mContext;
+ private final StateMachine mTarget;
+ private final int mWhat;
+ private final HashMap<Network, NetworkState> mNetworkMap = new HashMap<>();
+ private ConnectivityManager mCM;
+ private NetworkCallback mDefaultNetworkCallback;
+ private NetworkCallback mDunTetheringCallback;
- void start() {
+ public UpstreamNetworkMonitor(Context ctx, StateMachine tgt, int what) {
+ mContext = ctx;
+ mTarget = tgt;
+ mWhat = what;
+ }
+
+ public void start() {
stop();
mDefaultNetworkCallback = new UpstreamNetworkCallback();
- getConnectivityManager().registerDefaultNetworkCallback(mDefaultNetworkCallback);
+ cm().registerDefaultNetworkCallback(mDefaultNetworkCallback);
final NetworkRequest dunTetheringRequest = new NetworkRequest.Builder()
.addTransportType(NetworkCapabilities.TRANSPORT_CELLULAR)
@@ -1094,29 +1073,28 @@
.addCapability(NetworkCapabilities.NET_CAPABILITY_DUN)
.build();
mDunTetheringCallback = new UpstreamNetworkCallback();
- getConnectivityManager().registerNetworkCallback(
- dunTetheringRequest, mDunTetheringCallback);
+ cm().registerNetworkCallback(dunTetheringRequest, mDunTetheringCallback);
}
- void stop() {
+ public void stop() {
if (mDefaultNetworkCallback != null) {
- getConnectivityManager().unregisterNetworkCallback(mDefaultNetworkCallback);
+ cm().unregisterNetworkCallback(mDefaultNetworkCallback);
mDefaultNetworkCallback = null;
}
if (mDunTetheringCallback != null) {
- getConnectivityManager().unregisterNetworkCallback(mDunTetheringCallback);
+ cm().unregisterNetworkCallback(mDunTetheringCallback);
mDunTetheringCallback = null;
}
mNetworkMap.clear();
}
- NetworkState lookup(Network network) {
+ public NetworkState lookup(Network network) {
return (network != null) ? mNetworkMap.get(network) : null;
}
- NetworkState processCallback(int arg1, Object obj) {
+ public NetworkState processCallback(int arg1, Object obj) {
switch (arg1) {
case EVENT_ON_AVAILABLE: {
final Network network = (Network) obj;
@@ -1128,7 +1106,7 @@
new NetworkState(null, null, null, network, null, null));
}
- final ConnectivityManager cm = getConnectivityManager();
+ final ConnectivityManager cm = cm();
if (mDefaultNetworkCallback != null) {
cm.requestNetworkCapabilities(mDefaultNetworkCallback);
@@ -1199,6 +1177,42 @@
return null;
}
}
+
+ // Fetch (and cache) a ConnectivityManager only if and when we need one.
+ private ConnectivityManager cm() {
+ if (mCM == null) {
+ mCM = mContext.getSystemService(ConnectivityManager.class);
+ }
+ return mCM;
+ }
+
+ /**
+ * A NetworkCallback class that relays information of interest to the
+ * tethering master state machine thread for subsequent processing.
+ */
+ private class UpstreamNetworkCallback extends NetworkCallback {
+ @Override
+ public void onAvailable(Network network) {
+ mTarget.sendMessage(mWhat, EVENT_ON_AVAILABLE, 0, network);
+ }
+
+ @Override
+ public void onCapabilitiesChanged(Network network, NetworkCapabilities newNc) {
+ mTarget.sendMessage(mWhat, EVENT_ON_CAPABILITIES, 0,
+ new NetworkState(null, null, newNc, network, null, null));
+ }
+
+ @Override
+ public void onLinkPropertiesChanged(Network network, LinkProperties newLp) {
+ mTarget.sendMessage(mWhat, EVENT_ON_LINKPROPERTIES, 0,
+ new NetworkState(null, newLp, null, network, null, null));
+ }
+
+ @Override
+ public void onLost(Network network) {
+ mTarget.sendMessage(mWhat, EVENT_ON_LOST, 0, network);
+ }
+ }
}
// Needed because the canonical source of upstream truth is just the
diff --git a/services/core/java/com/android/server/pm/PackageDexOptimizer.java b/services/core/java/com/android/server/pm/PackageDexOptimizer.java
index 2e0199b..8c4a95c 100644
--- a/services/core/java/com/android/server/pm/PackageDexOptimizer.java
+++ b/services/core/java/com/android/server/pm/PackageDexOptimizer.java
@@ -217,26 +217,11 @@
dexoptNeeded);
}
- final String dexoptType;
- String oatDir = null;
- boolean isOdexLocation = (dexoptNeeded < 0);
- switch (Math.abs(dexoptNeeded)) {
- case DexFile.NO_DEXOPT_NEEDED:
- continue;
- case DexFile.DEX2OAT_FROM_SCRATCH:
- case DexFile.DEX2OAT_FOR_BOOT_IMAGE:
- case DexFile.DEX2OAT_FOR_FILTER:
- case DexFile.DEX2OAT_FOR_RELOCATION:
- dexoptType = "dex2oat";
- oatDir = createOatDirIfSupported(pkg, dexCodeInstructionSet);
- break;
- case DexFile.PATCHOAT_FOR_RELOCATION:
- dexoptType = "patchoat";
- break;
- default:
- throw new IllegalStateException("Invalid dexopt:" + dexoptNeeded);
+ if (dexoptNeeded == DexFile.NO_DEXOPT_NEEDED) {
+ continue;
}
+ String oatDir = createOatDirIfSupported(pkg, dexCodeInstructionSet);
String sharedLibrariesPath = null;
if (sharedLibraries != null && sharedLibraries.length != 0) {
StringBuilder sb = new StringBuilder();
@@ -248,7 +233,7 @@
}
sharedLibrariesPath = sb.toString();
}
- Log.i(TAG, "Running dexopt (" + dexoptType + ") on: " + path + " pkg="
+ Log.i(TAG, "Running dexopt on: " + path + " pkg="
+ pkg.applicationInfo.packageName + " isa=" + dexCodeInstructionSet
+ " vmSafeMode=" + vmSafeMode + " debuggable=" + debuggable
+ " target-filter=" + targetCompilerFilter + " oatDir=" + oatDir
diff --git a/services/core/java/com/android/server/policy/PhoneWindowManager.java b/services/core/java/com/android/server/policy/PhoneWindowManager.java
index fa1d991..0a312f0 100644
--- a/services/core/java/com/android/server/policy/PhoneWindowManager.java
+++ b/services/core/java/com/android/server/policy/PhoneWindowManager.java
@@ -251,9 +251,9 @@
static final boolean DEBUG_INPUT = false;
static final boolean DEBUG_KEYGUARD = false;
static final boolean DEBUG_LAYOUT = false;
- static final boolean DEBUG_STARTING_WINDOW = false;
+ static final boolean DEBUG_SPLASH_SCREEN = false;
static final boolean DEBUG_WAKEUP = false;
- static final boolean SHOW_STARTING_ANIMATIONS = true;
+ static final boolean SHOW_SPLASH_SCREENS = true;
// Whether to allow dock apps with METADATA_DOCK_HOME to temporarily take over the Home key.
// No longer recommended for desk docks;
@@ -2794,10 +2794,10 @@
/** {@inheritDoc} */
@Override
- public View addStartingWindow(IBinder appToken, String packageName, int theme,
- CompatibilityInfo compatInfo, CharSequence nonLocalizedLabel, int labelRes,
- int icon, int logo, int windowFlags, Configuration overrideConfig) {
- if (!SHOW_STARTING_ANIMATIONS) {
+ public StartingSurface addSplashScreen(IBinder appToken, String packageName, int theme,
+ CompatibilityInfo compatInfo, CharSequence nonLocalizedLabel, int labelRes, int icon,
+ int logo, int windowFlags, Configuration overrideConfig) {
+ if (!SHOW_SPLASH_SCREENS) {
return null;
}
if (packageName == null) {
@@ -2809,7 +2809,7 @@
try {
Context context = mContext;
- if (DEBUG_STARTING_WINDOW) Slog.d(TAG, "addStartingWindow " + packageName
+ if (DEBUG_SPLASH_SCREEN) Slog.d(TAG, "addSplashScreen " + packageName
+ ": nonLocalizedLabel=" + nonLocalizedLabel + " theme="
+ Integer.toHexString(theme));
if (theme != context.getThemeResId() || labelRes != 0) {
@@ -2822,8 +2822,8 @@
}
if (overrideConfig != null && !overrideConfig.equals(EMPTY)) {
- if (DEBUG_STARTING_WINDOW) Slog.d(TAG, "addStartingWindow: creating context based"
- + " on overrideConfig" + overrideConfig + " for starting window");
+ if (DEBUG_SPLASH_SCREEN) Slog.d(TAG, "addSplashScreen: creating context based"
+ + " on overrideConfig" + overrideConfig + " for splash screen");
final Context overrideContext = context.createConfigurationContext(overrideConfig);
overrideContext.setTheme(theme);
final TypedArray typedArray = overrideContext.obtainStyledAttributes(
@@ -2833,7 +2833,7 @@
// We want to use the windowBackground for the override context if it is
// available, otherwise we use the default one to make sure a themed starting
// window is displayed for the app.
- if (DEBUG_STARTING_WINDOW) Slog.d(TAG, "addStartingWindow: apply overrideConfig"
+ if (DEBUG_SPLASH_SCREEN) Slog.d(TAG, "addSplashScreen: apply overrideConfig"
+ overrideConfig + " to starting window resId=" + resId);
context = overrideContext;
}
@@ -2895,19 +2895,19 @@
params.privateFlags |= WindowManager.LayoutParams.PRIVATE_FLAG_COMPATIBLE_WINDOW;
}
- params.setTitle("Starting " + packageName);
+ params.setTitle("Splash Screen " + packageName);
wm = (WindowManager)context.getSystemService(Context.WINDOW_SERVICE);
view = win.getDecorView();
- if (DEBUG_STARTING_WINDOW) Slog.d(TAG, "Adding starting window for "
+ if (DEBUG_SPLASH_SCREEN) Slog.d(TAG, "Adding splash screen window for "
+ packageName + " / " + appToken + ": " + (view.getParent() != null ? view : null));
wm.addView(view, params);
// Only return the view if it was successfully added to the
// window manager... which we can tell by it having a parent.
- return view.getParent() != null ? view : null;
+ return view.getParent() != null ? new SplashScreenSurface(view) : null;
} catch (WindowManager.BadTokenException e) {
// ignore
Log.w(TAG, appToken + " already running, starting window not displayed. " +
@@ -2929,13 +2929,13 @@
/** {@inheritDoc} */
@Override
- public void removeStartingWindow(IBinder appToken, View window) {
- if (DEBUG_STARTING_WINDOW) Slog.v(TAG, "Removing starting window for " + appToken + ": "
- + window + " Callers=" + Debug.getCallers(4));
+ public void removeSplashScreen(IBinder appToken, StartingSurface surface) {
+ if (DEBUG_SPLASH_SCREEN) Slog.v(TAG, "Removing splash screen window for " + appToken + ": "
+ + surface + " Callers=" + Debug.getCallers(4));
- if (window != null) {
+ if (surface != null) {
WindowManager wm = (WindowManager)mContext.getSystemService(Context.WINDOW_SERVICE);
- wm.removeView(window);
+ wm.removeView(((SplashScreenSurface) surface).view);
}
}
diff --git a/services/core/java/com/android/server/policy/SplashScreenSurface.java b/services/core/java/com/android/server/policy/SplashScreenSurface.java
new file mode 100644
index 0000000..d421291
--- /dev/null
+++ b/services/core/java/com/android/server/policy/SplashScreenSurface.java
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2016 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.policy;
+
+import android.view.View;
+import android.view.WindowManagerPolicy;
+import android.view.WindowManagerPolicy.StartingSurface;
+
+import com.android.internal.policy.DecorView;
+import com.android.internal.policy.PhoneWindow;
+
+/**
+ * Holds the contents of a splash screen starting window, i.e. the {@link DecorView} of a
+ * {@link PhoneWindow}. This is just a wrapper such that we can return it from
+ * {@link WindowManagerPolicy#addSplashScreen}.
+ */
+class SplashScreenSurface implements StartingSurface {
+
+ final View view;
+
+ SplashScreenSurface(View view) {
+ this.view = view;
+ }
+}
diff --git a/services/core/java/com/android/server/updates/TzDataInstallReceiver.java b/services/core/java/com/android/server/updates/TzDataInstallReceiver.java
index b260e4e..b704eb1 100644
--- a/services/core/java/com/android/server/updates/TzDataInstallReceiver.java
+++ b/services/core/java/com/android/server/updates/TzDataInstallReceiver.java
@@ -20,7 +20,7 @@
import java.io.File;
import java.io.IOException;
-import libcore.tzdata.update.TzDataBundleInstaller;
+import libcore.tzdata.update2.TimeZoneBundleInstaller;
/**
* An install receiver responsible for installing timezone data updates.
@@ -29,18 +29,19 @@
private static final String TAG = "TZDataInstallReceiver";
+ private static final File SYSTEM_TZ_DATA_FILE = new File("/system/usr/share/zoneinfo/tzdata");
private static final File TZ_DATA_DIR = new File("/data/misc/zoneinfo");
private static final String UPDATE_DIR_NAME = TZ_DATA_DIR.getPath() + "/updates/";
private static final String UPDATE_METADATA_DIR_NAME = "metadata/";
private static final String UPDATE_VERSION_FILE_NAME = "version";
private static final String UPDATE_CONTENT_FILE_NAME = "tzdata_bundle.zip";
- private final TzDataBundleInstaller installer;
+ private final TimeZoneBundleInstaller installer;
public TzDataInstallReceiver() {
super(UPDATE_DIR_NAME, UPDATE_CONTENT_FILE_NAME, UPDATE_METADATA_DIR_NAME,
UPDATE_VERSION_FILE_NAME);
- installer = new TzDataBundleInstaller(TAG, TZ_DATA_DIR);
+ installer = new TimeZoneBundleInstaller(TAG, SYSTEM_TZ_DATA_FILE, TZ_DATA_DIR);
}
@Override
diff --git a/services/core/java/com/android/server/wm/AppWindowContainerController.java b/services/core/java/com/android/server/wm/AppWindowContainerController.java
index 35004c2..7630984 100644
--- a/services/core/java/com/android/server/wm/AppWindowContainerController.java
+++ b/services/core/java/com/android/server/wm/AppWindowContainerController.java
@@ -27,21 +27,20 @@
import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_TOKEN_MOVEMENT;
import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_VISIBILITY;
import static com.android.server.wm.WindowManagerDebugConfig.TAG_WM;
-import static com.android.server.wm.WindowManagerService.H.ADD_STARTING;
-
-import android.graphics.Bitmap;
-import android.os.Trace;
-import com.android.server.AttributeCache;
import android.content.res.CompatibilityInfo;
import android.content.res.Configuration;
-import android.os.Binder;
+import android.graphics.Bitmap;
import android.os.Debug;
+import android.os.Handler;
import android.os.IBinder;
-import android.os.Message;
+import android.os.Looper;
+import android.os.Trace;
import android.util.Slog;
import android.view.IApplicationToken;
+import android.view.WindowManagerPolicy.StartingSurface;
+import com.android.server.AttributeCache;
/**
* Controller for the app window token container. This is created by activity manager to link
* activity records to the app window token container they use in window manager.
@@ -52,6 +51,7 @@
extends WindowContainerController<AppWindowToken, AppWindowContainerListener> {
private final IApplicationToken mToken;
+ private final Handler mHandler = new Handler(Looper.getMainLooper());
private final Runnable mOnWindowsDrawn = () -> {
if (mListener == null) {
@@ -80,20 +80,109 @@
mListener.onWindowsGone();
};
- public AppWindowContainerController(IApplicationToken token,
- AppWindowContainerListener listener, int taskId, int index, int requestedOrientation,
- boolean fullscreen, boolean showForAllUsers, int configChanges,
+ private final Runnable mAddStartingWindow = () -> {
+ final StartingData startingData;
+ final Configuration mergedOverrideConfiguration;
+
+ synchronized (mWindowMap) {
+ startingData = mContainer.startingData;
+ mergedOverrideConfiguration = mContainer.getMergedOverrideConfiguration();
+ }
+
+ if (startingData == null) {
+ // Animation has been canceled... do nothing.
+ return;
+ }
+
+ if (DEBUG_STARTING_WINDOW) Slog.v(TAG_WM, "Add starting "
+ + this + ": pkg=" + mContainer.startingData.pkg);
+
+ StartingSurface contents = null;
+ try {
+ contents = mService.mPolicy.addSplashScreen(mContainer.token, startingData.pkg,
+ startingData.theme, startingData.compatInfo, startingData.nonLocalizedLabel,
+ startingData.labelRes, startingData.icon, startingData.logo,
+ startingData.windowFlags, mergedOverrideConfiguration);
+ } catch (Exception e) {
+ Slog.w(TAG_WM, "Exception when adding starting window", e);
+ }
+ if (contents != null) {
+ boolean abort = false;
+
+ synchronized(mWindowMap) {
+ if (mContainer.removed || mContainer.startingData == null) {
+ // If the window was successfully added, then
+ // we need to remove it.
+ if (mContainer.startingWindow != null) {
+ if (DEBUG_STARTING_WINDOW) Slog.v(TAG_WM,
+ "Aborted starting " + mContainer
+ + ": removed=" + mContainer.removed
+ + " startingData=" + mContainer.startingData);
+ mContainer.startingWindow = null;
+ mContainer.startingData = null;
+ abort = true;
+ }
+ } else {
+ mContainer.startingSurface = contents;
+ }
+ if (DEBUG_STARTING_WINDOW && !abort) Slog.v(TAG_WM,
+ "Added starting " + mContainer
+ + ": startingWindow="
+ + mContainer.startingWindow + " startingView="
+ + mContainer.startingSurface);
+ }
+
+ if (abort) {
+ try {
+ mService.mPolicy.removeSplashScreen(mContainer.token, contents);
+ } catch (Exception e) {
+ Slog.w(TAG_WM, "Exception when removing starting window", e);
+ }
+ }
+ }
+ };
+
+ private final Runnable mRemoveStartingWindow = () -> {
+ IBinder token = null;
+ StartingSurface contents = null;
+ synchronized (mWindowMap) {
+ if (DEBUG_STARTING_WINDOW) Slog.v(TAG_WM, "Remove starting "
+ + mContainer + ": startingWindow="
+ + mContainer.startingWindow + " startingView="
+ + mContainer.startingSurface);
+ if (mContainer.startingWindow != null) {
+ contents = mContainer.startingSurface;
+ token = mContainer.token;
+ mContainer.startingData = null;
+ mContainer.startingSurface = null;
+ mContainer.startingWindow = null;
+ mContainer.startingDisplayed = false;
+ }
+ }
+ if (contents != null) {
+ try {
+ mService.mPolicy.removeSplashScreen(token, contents);
+ } catch (Exception e) {
+ Slog.w(TAG_WM, "Exception when removing starting window", e);
+ }
+ }
+ };
+
+ public AppWindowContainerController(TaskWindowContainerController taskController,
+ IApplicationToken token, AppWindowContainerListener listener, int index,
+ int requestedOrientation, boolean fullscreen, boolean showForAllUsers, int configChanges,
boolean voiceInteraction, boolean launchTaskBehind, boolean alwaysFocusable,
int targetSdkVersion, int rotationAnimationHint, long inputDispatchingTimeoutNanos) {
- this(token, listener, taskId, index, requestedOrientation, fullscreen, showForAllUsers,
+ this(taskController, token, listener, index, requestedOrientation, fullscreen,
+ showForAllUsers,
configChanges, voiceInteraction, launchTaskBehind, alwaysFocusable,
targetSdkVersion, rotationAnimationHint, inputDispatchingTimeoutNanos,
WindowManagerService.getInstance());
}
- public AppWindowContainerController(IApplicationToken token,
- AppWindowContainerListener listener, int taskId, int index, int requestedOrientation,
- boolean fullscreen, boolean showForAllUsers, int configChanges,
+ public AppWindowContainerController(TaskWindowContainerController taskController,
+ IApplicationToken token, AppWindowContainerListener listener, int index,
+ int requestedOrientation, boolean fullscreen, boolean showForAllUsers, int configChanges,
boolean voiceInteraction, boolean launchTaskBehind, boolean alwaysFocusable,
int targetSdkVersion, int rotationAnimationHint, long inputDispatchingTimeoutNanos,
WindowManagerService service) {
@@ -107,11 +196,10 @@
return;
}
- // TODO: Have the controller for the task passed in when task are changed to use
- // controller.
- final Task task = mService.mTaskIdToTask.get(taskId);
+ final Task task = taskController.mContainer;
if (task == null) {
- throw new IllegalArgumentException("addAppToken: invalid taskId=" + taskId);
+ throw new IllegalArgumentException("AppWindowContainerController: invalid "
+ + " controller=" + taskController);
}
atoken = new AppWindowToken(mService, token, voiceInteraction, task.getDisplayContent(),
@@ -119,47 +207,27 @@
requestedOrientation, rotationAnimationHint, configChanges, launchTaskBehind,
alwaysFocusable, this);
if (DEBUG_TOKEN_MOVEMENT || DEBUG_ADD_REMOVE) Slog.v(TAG_WM, "addAppToken: " + atoken
- + " task=" + taskId + " at " + index);
+ + " controller=" + taskController + " at " + index);
task.addChild(atoken, index);
}
}
public void removeContainer(int displayId) {
- final long origId = Binder.clearCallingIdentity();
- try {
- synchronized(mWindowMap) {
- final DisplayContent dc = mRoot.getDisplayContent(displayId);
- if (dc == null) {
- Slog.w(TAG_WM, "removeAppToken: Attempted to remove binder token: "
- + mToken + " from non-existing displayId=" + displayId);
- return;
- }
- dc.removeAppToken(mToken.asBinder());
- super.removeContainer();
+ synchronized(mWindowMap) {
+ final DisplayContent dc = mRoot.getDisplayContent(displayId);
+ if (dc == null) {
+ Slog.w(TAG_WM, "removeAppToken: Attempted to remove binder token: "
+ + mToken + " from non-existing displayId=" + displayId);
+ return;
}
- } finally {
- Binder.restoreCallingIdentity(origId);
+ dc.removeAppToken(mToken.asBinder());
+ super.removeContainer();
}
}
- // TODO: Move to task window controller when that is created and rename to positionChildAt()
- public void positionAt(int taskId, int index) {
- synchronized(mService.mWindowMap) {
- if (mContainer == null) {
- Slog.w(TAG_WM,
- "Attempted to position of non-existing app token: " + mToken);
- return;
- }
-
- // TODO: Should get the window container from this owner when the task owner stuff is
- // hooked-up.
- final Task task = mService.mTaskIdToTask.get(taskId);
- if (task == null) {
- throw new IllegalArgumentException("positionChildAt: invalid taskId=" + taskId);
- }
- task.addChild(mContainer, index);
- }
-
+ @Override
+ public void removeContainer() {
+ throw new UnsupportedOperationException("Use removeContainer(displayId) instead.");
}
public Configuration setOrientation(int requestedOrientation, int displayId,
@@ -393,19 +461,42 @@
if (DEBUG_STARTING_WINDOW) Slog.v(TAG_WM, "Creating StartingData");
mContainer.startingData = new StartingData(pkg, theme, compatInfo, nonLocalizedLabel,
labelRes, icon, logo, windowFlags);
- final Message m = mService.mH.obtainMessage(ADD_STARTING, mContainer);
- // Note: we really want to do sendMessageAtFrontOfQueue() because we
- // want to process the message ASAP, before any other queued
- // messages.
- if (DEBUG_STARTING_WINDOW) Slog.v(TAG_WM, "Enqueueing ADD_STARTING");
- mService.mH.sendMessageAtFrontOfQueue(m);
+ scheduleAddStartingWindow();
}
return true;
}
+ void scheduleAddStartingWindow() {
+
+ // Note: we really want to do sendMessageAtFrontOfQueue() because we
+ // want to process the message ASAP, before any other queued
+ // messages.
+ if (DEBUG_STARTING_WINDOW) Slog.v(TAG_WM, "Enqueueing ADD_STARTING");
+ mHandler.postAtFrontOfQueue(mAddStartingWindow);
+ }
+
public void removeStartingWindow() {
synchronized (mWindowMap) {
- mService.scheduleRemoveStartingWindowLocked(mContainer);
+ if (mHandler.hasCallbacks(mRemoveStartingWindow)) {
+ // Already scheduled.
+ return;
+ }
+
+ if (mContainer.startingWindow == null) {
+ if (mContainer.startingData != null) {
+ // Starting window has not been added yet, but it is scheduled to be added.
+ // Go ahead and cancel the request.
+ if (DEBUG_STARTING_WINDOW) Slog.v(TAG_WM,
+ "Clearing startingData for token=" + mContainer);
+ mContainer.startingData = null;
+ }
+ return;
+ }
+
+ if (DEBUG_STARTING_WINDOW) Slog.v(TAG_WM, Debug.getCallers(1)
+ + ": Schedule remove starting " + mContainer
+ + " startingWindow=" + mContainer.startingWindow);
+ mHandler.post(mRemoveStartingWindow);
}
}
@@ -458,9 +549,7 @@
"Attempted to freeze screen with non-existing app token: " + mContainer);
return;
}
- final long origId = Binder.clearCallingIdentity();
mContainer.startFreezingScreen();
- Binder.restoreCallingIdentity(origId);
}
}
@@ -469,11 +558,9 @@
if (mContainer == null) {
return;
}
- final long origId = Binder.clearCallingIdentity();
if (DEBUG_ORIENTATION) Slog.v(TAG_WM, "Clear freezing of " + mToken + ": hidden="
+ mContainer.hidden + " freezing=" + mContainer.mAppAnimator.freezingScreen);
mContainer.stopFreezingScreen(true, force);
- Binder.restoreCallingIdentity(origId);
}
}
@@ -508,19 +595,24 @@
void reportWindowsDrawn() {
- mService.mH.post(mOnWindowsDrawn);
+ mHandler.post(mOnWindowsDrawn);
}
void reportWindowsVisible() {
- mService.mH.post(mOnWindowsVisible);
+ mHandler.post(mOnWindowsVisible);
}
void reportWindowsGone() {
- mService.mH.post(mOnWindowsGone);
+ mHandler.post(mOnWindowsGone);
}
/** Calls directly into activity manager so window manager lock shouldn't held. */
boolean keyDispatchingTimedOut(String reason) {
return mListener != null && mListener.keyDispatchingTimedOut(reason);
}
+
+ @Override
+ public String toString() {
+ return "{AppWindowContainerController token=" + mToken + "}";
+ }
}
diff --git a/services/core/java/com/android/server/wm/AppWindowToken.java b/services/core/java/com/android/server/wm/AppWindowToken.java
index 0a48758..f4fa220 100644
--- a/services/core/java/com/android/server/wm/AppWindowToken.java
+++ b/services/core/java/com/android/server/wm/AppWindowToken.java
@@ -29,9 +29,9 @@
import static android.view.WindowManagerPolicy.FINISH_LAYOUT_REDO_ANIM;
import static android.view.WindowManagerPolicy.FINISH_LAYOUT_REDO_WALLPAPER;
import static com.android.server.wm.AppTransition.TRANSIT_UNSET;
+import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_ADD_REMOVE;
import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_ANIM;
import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_APP_TRANSITIONS;
-import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_ADD_REMOVE;
import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_FOCUS_LIGHT;
import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_LAYOUT_REPEATS;
import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_ORIENTATION;
@@ -47,22 +47,21 @@
import static com.android.server.wm.WindowManagerService.UPDATE_FOCUS_WILL_PLACE_SURFACES;
import static com.android.server.wm.WindowManagerService.logWithStack;
-import android.os.Debug;
-import com.android.internal.util.ToBooleanFunction;
-import com.android.server.input.InputApplicationHandle;
-import com.android.server.wm.WindowManagerService.H;
-
import android.annotation.NonNull;
import android.content.res.Configuration;
import android.graphics.Rect;
import android.os.Binder;
+import android.os.Debug;
import android.os.IBinder;
-import android.os.Message;
import android.os.SystemClock;
import android.util.Slog;
import android.view.IApplicationToken;
-import android.view.View;
import android.view.WindowManager;
+import android.view.WindowManagerPolicy.StartingSurface;
+
+import com.android.internal.util.ToBooleanFunction;
+import com.android.server.input.InputApplicationHandle;
+import com.android.server.wm.WindowManagerService.H;
import java.io.PrintWriter;
import java.util.ArrayDeque;
@@ -138,7 +137,7 @@
// Information about an application starting window if displayed.
StartingData startingData;
WindowState startingWindow;
- View startingView;
+ StartingSurface startingSurface;
boolean startingDisplayed;
boolean startingMoved;
boolean firstWindowDrawn;
@@ -213,8 +212,9 @@
// it from behind the starting window, so there is no need for it to also be doing its
// own stuff.
winAnimator.clearAnimation();
- winAnimator.mService.mFinishedStarting.add(this);
- winAnimator.mService.mH.sendEmptyMessage(H.FINISHED_STARTING);
+ if (getController() != null) {
+ getController().removeStartingWindow();
+ }
}
updateReportedVisibilityLocked();
}
@@ -439,8 +439,6 @@
}
void onRemovedFromDisplay() {
- AppWindowToken startingToken = null;
-
if (DEBUG_APP_TRANSITIONS) Slog.v(TAG_WM, "Removing app token: " + this);
boolean delayed = setVisibility(null, false, TRANSIT_UNSET, true, mVoiceInteraction);
@@ -461,6 +459,10 @@
if (DEBUG_ADD_REMOVE || DEBUG_TOKEN_MOVEMENT) Slog.v(TAG_WM, "removeAppToken: "
+ this + " delayed=" + delayed + " Callers=" + Debug.getCallers(4));
+ if (startingData != null && getController() != null) {
+ getController().removeStartingWindow();
+ }
+
final TaskStack stack = mTask.mStack;
if (delayed && !isEmpty()) {
// set the token aside because it has an active animation to be finished
@@ -477,9 +479,6 @@
}
removed = true;
- if (startingData != null) {
- startingToken = this;
- }
stopFreezingScreen(true, true);
if (mService.mFocusedApp == this) {
if (DEBUG_FOCUS_LIGHT) Slog.v(TAG_WM, "Removing focused app token:" + this);
@@ -491,9 +490,6 @@
if (!delayed) {
updateReportedVisibilityLocked();
}
-
- // Will only remove if startingToken non null.
- mService.scheduleRemoveStartingWindowLocked(startingToken);
}
void clearAnimatingFlags() {
@@ -557,7 +553,9 @@
mAppStopped = true;
destroySurfaces();
// Remove any starting window that was added for this app if they are still around.
- mTask.mService.scheduleRemoveStartingWindowLocked(this);
+ if (getController() != null) {
+ getController().removeStartingWindow();
+ }
}
/**
@@ -667,16 +665,20 @@
// TODO: Something smells about the code below...Is there a better way?
if (startingWindow == win) {
if (DEBUG_STARTING_WINDOW) Slog.v(TAG_WM, "Notify removed startingWindow " + win);
- mService.scheduleRemoveStartingWindowLocked(this);
+ if (getController() != null) {
+ getController().removeStartingWindow();
+ }
} else if (mChildren.size() == 0 && startingData != null) {
// If this is the last window and we had requested a starting transition window,
// well there is no point now.
if (DEBUG_STARTING_WINDOW) Slog.v(TAG_WM, "Nulling last startingWindow");
startingData = null;
- } else if (mChildren.size() == 1 && startingView != null) {
+ } else if (mChildren.size() == 1 && startingSurface != null) {
// If this is the last window except for a starting transition window,
// we need to get rid of the starting transition.
- mService.scheduleRemoveStartingWindowLocked(this);
+ if (getController() != null) {
+ getController().removeStartingWindow();
+ }
}
}
@@ -1015,7 +1017,7 @@
}
final WindowState tStartingWindow = fromToken.startingWindow;
- if (tStartingWindow != null && fromToken.startingView != null) {
+ if (tStartingWindow != null && fromToken.startingSurface != null) {
// In this case, the starting icon has already been displayed, so start
// letting windows get shown immediately without any more transitions.
mService.mSkipAppTransitionAnimation = true;
@@ -1027,13 +1029,13 @@
// Transfer the starting window over to the new token.
startingData = fromToken.startingData;
- startingView = fromToken.startingView;
+ startingSurface = fromToken.startingSurface;
startingDisplayed = fromToken.startingDisplayed;
fromToken.startingDisplayed = false;
startingWindow = tStartingWindow;
reportedVisible = fromToken.reportedVisible;
fromToken.startingData = null;
- fromToken.startingView = null;
+ fromToken.startingSurface = null;
fromToken.startingWindow = null;
fromToken.startingMoved = true;
tStartingWindow.mToken = this;
@@ -1080,10 +1082,9 @@
startingData = fromToken.startingData;
fromToken.startingData = null;
fromToken.startingMoved = true;
- final Message m = mService.mH.obtainMessage(H.ADD_STARTING, this);
- // Note: we really want to do sendMessageAtFrontOfQueue() because we want to process the
- // message ASAP, before any other queued messages.
- mService.mH.sendMessageAtFrontOfQueue(m);
+ if (getController() != null) {
+ getController().scheduleAddStartingWindow();
+ }
return true;
}
@@ -1421,10 +1422,10 @@
pw.print(" firstWindowDrawn="); pw.print(firstWindowDrawn);
pw.print(" mIsExiting="); pw.println(mIsExiting);
}
- if (startingWindow != null || startingView != null
+ if (startingWindow != null || startingSurface != null
|| startingDisplayed || startingMoved) {
pw.print(prefix); pw.print("startingWindow="); pw.print(startingWindow);
- pw.print(" startingView="); pw.print(startingView);
+ pw.print(" startingSurface="); pw.print(startingSurface);
pw.print(" startingDisplayed="); pw.print(startingDisplayed);
pw.print(" startingMoved="); pw.println(startingMoved);
}
diff --git a/services/core/java/com/android/server/wm/RootWindowContainer.java b/services/core/java/com/android/server/wm/RootWindowContainer.java
index dc06d12..6ac172b 100644
--- a/services/core/java/com/android/server/wm/RootWindowContainer.java
+++ b/services/core/java/com/android/server/wm/RootWindowContainer.java
@@ -322,7 +322,7 @@
if (!configChanged) {
return null;
}
- displayContent.onOverrideConfigurationChanged(currentConfig);
+ displayContent.onOverrideConfigurationChanged(newConfiguration);
if (displayId == DEFAULT_DISPLAY) {
// Override configuration of the default display duplicates global config. In this case
@@ -498,7 +498,10 @@
if (SHOW_TRANSACTIONS || SHOW_SURFACE_ALLOC) logSurface(winAnimator.mWin,
"RECOVER DESTROY", false);
winAnimator.destroySurface();
- mService.scheduleRemoveStartingWindowLocked(winAnimator.mWin.mAppToken);
+ if (winAnimator.mWin.mAppToken != null
+ && winAnimator.mWin.mAppToken.getController() != null) {
+ winAnimator.mWin.mAppToken.getController().removeStartingWindow();
+ }
}
try {
diff --git a/services/core/java/com/android/server/wm/Task.java b/services/core/java/com/android/server/wm/Task.java
index a468598..b1b7542 100644
--- a/services/core/java/com/android/server/wm/Task.java
+++ b/services/core/java/com/android/server/wm/Task.java
@@ -22,6 +22,7 @@
import static android.content.pm.ActivityInfo.RESIZE_MODE_FORCE_RESIZABLE_LANDSCAPE_ONLY;
import static android.content.pm.ActivityInfo.RESIZE_MODE_FORCE_RESIZABLE_PRESERVE_ORIENTATION;
import static android.content.pm.ActivityInfo.RESIZE_MODE_FORCE_RESIZABLE_PORTRAIT_ONLY;
+import static com.android.server.EventLogTags.WM_TASK_REMOVED;
import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_STACK;
import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_TASK_MOVEMENT;
import static com.android.server.wm.WindowManagerDebugConfig.TAG_WITH_CLASS_NAME;
@@ -89,8 +90,8 @@
private boolean mIsOnTopLauncher;
Task(int taskId, TaskStack stack, int userId, WindowManagerService service, Rect bounds,
- Configuration overrideConfig, boolean isOnTopLauncher, int resizeMode,
- boolean homeTask) {
+ Configuration overrideConfig, boolean isOnTopLauncher, int resizeMode, boolean homeTask,
+ TaskWindowContainerController controller) {
mTaskId = taskId;
mStack = stack;
mUserId = userId;
@@ -98,6 +99,7 @@
mIsOnTopLauncher = isOnTopLauncher;
mResizeMode = resizeMode;
mHomeTask = homeTask;
+ setController(controller);
setBounds(bounds, overrideConfig);
}
@@ -150,7 +152,7 @@
@Override
void removeImmediately() {
if (DEBUG_STACK) Slog.i(TAG, "removeTask: removing taskId=" + mTaskId);
- EventLog.writeEvent(EventLogTags.WM_TASK_REMOVED, mTaskId, "removeTask");
+ EventLog.writeEvent(WM_TASK_REMOVED, mTaskId, "removeTask");
mDeferRemoval = false;
// Make sure to remove dim layer user first before removing task its from parent.
@@ -160,19 +162,17 @@
}
super.removeImmediately();
- mService.mTaskIdToTask.delete(mTaskId);
}
- // TODO: Change to use re-parenting in WC.
- void moveTaskToStack(TaskStack stack, boolean toTop) {
+ void reparent(TaskStack stack, int position) {
if (stack == mStack) {
return;
}
- if (DEBUG_STACK) Slog.i(TAG, "moveTaskToStack: removing taskId=" + mTaskId
+ if (DEBUG_STACK) Slog.i(TAG, "reParentTask: removing taskId=" + mTaskId
+ " from stack=" + mStack);
- EventLog.writeEvent(EventLogTags.WM_TASK_REMOVED, mTaskId, "moveTask");
+ EventLog.writeEvent(WM_TASK_REMOVED, mTaskId, "reParentTask");
getParent().removeChild(this);
- stack.addTask(this, toTop);
+ stack.addTask(this, position, showForAllUsers(), false /* moveParents */);
}
/** @see com.android.server.am.ActivityManagerService#positionTaskInStack(int, int, int). */
@@ -188,12 +188,13 @@
// and add to top of the target stack. We will move it proper position afterwards.
if (DEBUG_STACK) Slog.i(TAG, "positionTaskInStack: removing taskId=" + mTaskId
+ " from stack=" + mStack);
- EventLog.writeEvent(EventLogTags.WM_TASK_REMOVED, mTaskId, "moveTask");
+ EventLog.writeEvent(WM_TASK_REMOVED, mTaskId, "positionTaskInStack");
mStack.removeChild(this);
- stack.addTask(this, true /* toTop */);
+ stack.addTask(this, position);
+ } else {
+ stack.positionChildAt(position, this, true /* includingParents */);
}
- stack.positionChildAt(position, this, true /* includingParents */);
resizeLocked(bounds, overrideConfig, false /* force */);
for (int activityNdx = mChildren.size() - 1; activityNdx >= 0; --activityNdx) {
@@ -225,7 +226,7 @@
super.removeChild(token);
if (mChildren.isEmpty()) {
- EventLog.writeEvent(EventLogTags.WM_TASK_REMOVED, mTaskId, "removeAppToken: last token");
+ EventLog.writeEvent(WM_TASK_REMOVED, mTaskId, "removeAppToken: last token");
if (mDeferRemoval) {
removeIfPossible();
}
diff --git a/services/core/java/com/android/server/wm/TaskStack.java b/services/core/java/com/android/server/wm/TaskStack.java
index d7c7cfa..eeea532 100644
--- a/services/core/java/com/android/server/wm/TaskStack.java
+++ b/services/core/java/com/android/server/wm/TaskStack.java
@@ -507,8 +507,8 @@
}
// TODO: Checkout the call points of this method and the ones below to see how they can fit in WC.
- void addTask(Task task, boolean toTop) {
- addTask(task, toTop, task.showForAllUsers());
+ void addTask(Task task, int position) {
+ addTask(task, position, task.showForAllUsers(), true /* moveParents */);
}
/**
@@ -516,10 +516,10 @@
* When task is added to top of the stack, the entire branch of the hierarchy (including stack
* and display) will be brought to top.
* @param task The task to add.
- * @param toTop Whether to add it to the top or bottom.
+ * @param position Target position to add the task to.
* @param showForAllUsers Whether to show the task regardless of the current user.
*/
- void addTask(Task task, boolean toTop, boolean showForAllUsers) {
+ void addTask(Task task, int position, boolean showForAllUsers, boolean moveParents) {
final TaskStack currentStack = task.mStack;
// TODO: We pass stack to task's constructor, but we still need to call this method.
// This doesn't make sense, mStack will already be set equal to "this" at this point.
@@ -529,14 +529,12 @@
+ ", but it is already attached to stackId=" + task.mStack.mStackId);
}
- final int targetPosition = toTop ? mChildren.size() : 0;
-
// Add child task.
task.mStack = this;
- addChild(task, targetPosition);
+ addChild(task, null);
// Move child to a proper position, as some restriction for position might apply.
- positionChildAt(targetPosition, task, true /* includingParents */, showForAllUsers);
+ positionChildAt(position, task, moveParents /* includingParents */, showForAllUsers);
}
@Override
@@ -546,7 +544,7 @@
/**
* Overridden version of {@link TaskStack#positionChildAt(int, Task, boolean)}. Used in
- * {@link TaskStack#addTask(Task, boolean, boolean showForAllUsers)}, as it can receive
+ * {@link TaskStack#addTask(Task, int, boolean showForAllUsers, boolean)}, as it can receive
* showForAllUsers param from {@link AppWindowToken} instead of {@link Task#showForAllUsers()}.
*/
private void positionChildAt(int position, Task child, boolean includingParents,
diff --git a/services/core/java/com/android/server/wm/TaskWindowContainerController.java b/services/core/java/com/android/server/wm/TaskWindowContainerController.java
new file mode 100644
index 0000000..9c303f8
--- /dev/null
+++ b/services/core/java/com/android/server/wm/TaskWindowContainerController.java
@@ -0,0 +1,245 @@
+/*
+ * Copyright (C) 2016 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.wm;
+
+import android.content.res.Configuration;
+import android.graphics.Rect;
+import android.util.EventLog;
+import android.util.Slog;
+
+import static com.android.server.EventLogTags.WM_TASK_CREATED;
+import static com.android.server.wm.DragResizeMode.DRAG_RESIZE_MODE_DOCKED_DIVIDER;
+import static com.android.server.wm.WindowContainer.POSITION_BOTTOM;
+import static com.android.server.wm.WindowContainer.POSITION_TOP;
+import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_STACK;
+import static com.android.server.wm.WindowManagerDebugConfig.TAG_WM;
+
+/**
+ * Controller for the task container. This is created by activity manager to link task records to
+ * the task container they use in window manager.
+ *
+ * Test class: {@link TaskWindowContainerControllerTests}
+ */
+public class TaskWindowContainerController
+ extends WindowContainerController<Task, WindowContainerListener> {
+
+ private final int mTaskId;
+
+ public TaskWindowContainerController(int taskId, int stackId, int userId, Rect bounds,
+ Configuration overrideConfig, int resizeMode, boolean homeTask, boolean isOnTopLauncher,
+ boolean toTop, boolean showForAllUsers) {
+ super(null, WindowManagerService.getInstance());
+ mTaskId = taskId;
+
+ synchronized(mWindowMap) {
+ if (DEBUG_STACK) Slog.i(TAG_WM, "TaskWindowContainerController: taskId=" + taskId
+ + " stackId=" + stackId + " bounds=" + bounds);
+
+ // TODO: Pass controller for the stack to get the container object when stack is
+ // switched to use controller.
+ final TaskStack stack = mService.mStackIdToStack.get(stackId);
+ if (stack == null) {
+ throw new IllegalArgumentException("TaskWindowContainerController: invalid stackId="
+ + stackId);
+ }
+ EventLog.writeEvent(WM_TASK_CREATED, taskId, stackId);
+ final Task task = new Task(taskId, stack, userId, mService, bounds, overrideConfig,
+ isOnTopLauncher, resizeMode, homeTask, this);
+ final int position = toTop ? POSITION_TOP : POSITION_BOTTOM;
+ stack.addTask(task, position, showForAllUsers, true /* moveParents */);
+ }
+ }
+
+ @Override
+ public void removeContainer() {
+ synchronized(mWindowMap) {
+ if (mContainer == null) {
+ if (DEBUG_STACK) Slog.i(TAG_WM, "removeTask: could not find taskId=" + mTaskId);
+ return;
+ }
+ mContainer.removeIfPossible();
+ super.removeContainer();
+ }
+ }
+
+ public void positionChildAt(AppWindowContainerController childController, int index) {
+ synchronized(mService.mWindowMap) {
+ final AppWindowToken aToken = childController.mContainer;
+ if (aToken == null) {
+ Slog.w(TAG_WM,
+ "Attempted to position of non-existing app : " + childController);
+ return;
+ }
+
+ final Task task = mContainer;
+ if (task == null) {
+ throw new IllegalArgumentException("positionChildAt: invalid task=" + this);
+ }
+ task.addChild(aToken, index);
+ }
+ }
+
+ public void reparent(int stackId, int position) {
+ synchronized (mWindowMap) {
+ if (DEBUG_STACK) Slog.i(TAG_WM, "reparent: moving taskId=" + mTaskId
+ + " to stackId=" + stackId + " at " + position);
+ if (mContainer == null) {
+ if (DEBUG_STACK) Slog.i(TAG_WM,
+ "reparent: could not find taskId=" + mTaskId);
+ return;
+ }
+ final TaskStack stack = mService.mStackIdToStack.get(stackId);
+ if (stack == null) {
+ if (DEBUG_STACK) Slog.i(TAG_WM,
+ "reparent: could not find stackId=" + stackId);
+ return;
+ }
+ mContainer.reparent(stack, position);
+ final DisplayContent displayContent = stack.getDisplayContent();
+ displayContent.setLayoutNeeded();
+ mService.mWindowPlacerLocked.performSurfacePlacement();
+ }
+ }
+
+ public void setResizeable(int resizeMode) {
+ synchronized (mWindowMap) {
+ if (mContainer != null) {
+ mContainer.setResizeable(resizeMode);
+ }
+ }
+ }
+
+ public void resize(Rect bounds, Configuration overrideConfig, boolean relayout,
+ boolean forced) {
+ synchronized (mWindowMap) {
+ if (mContainer == null) {
+ throw new IllegalArgumentException("resizeTask: taskId " + mTaskId + " not found.");
+ }
+
+ if (mContainer.resizeLocked(bounds, overrideConfig, forced) && relayout) {
+ mContainer.getDisplayContent().setLayoutNeeded();
+ mService.mWindowPlacerLocked.performSurfacePlacement();
+ }
+ }
+ }
+
+ // TODO: Move to positionChildAt() in stack controller once we have a stack controller.
+ public void positionAt(int stackId, int index, Rect bounds, Configuration overrideConfig) {
+ synchronized (mWindowMap) {
+ if (DEBUG_STACK) Slog.i(TAG_WM, "positionChildAt: positioning taskId=" + mTaskId
+ + " in stackId=" + stackId + " at " + index);
+ if (mContainer == null) {
+ if (DEBUG_STACK) Slog.i(TAG_WM,
+ "positionTaskInStack: could not find taskId=" + mTaskId);
+ return;
+ }
+ final TaskStack stack = mService.mStackIdToStack.get(stackId);
+ if (stack == null) {
+ if (DEBUG_STACK) Slog.i(TAG_WM,
+ "positionTaskInStack: could not find stackId=" + stackId);
+ return;
+ }
+ mContainer.positionTaskInStack(stack, index, bounds, overrideConfig);
+ final DisplayContent displayContent = stack.getDisplayContent();
+ displayContent.setLayoutNeeded();
+ mService.mWindowPlacerLocked.performSurfacePlacement();
+ }
+ }
+
+ // TODO: Replace with moveChildToTop in stack controller?
+ public void moveToTop(boolean includingParents) {
+ synchronized(mWindowMap) {
+ if (mContainer == null) {
+ Slog.e(TAG_WM, "moveToTop: taskId=" + mTaskId + " not found");
+ return;
+ }
+ final TaskStack stack = mContainer.mStack;
+ stack.positionChildAt(POSITION_TOP, mContainer, includingParents);
+
+ if (mService.mAppTransition.isTransitionSet()) {
+ mContainer.setSendingToBottom(false);
+ }
+ stack.getDisplayContent().layoutAndAssignWindowLayersIfNeeded();
+ }
+ }
+
+ // TODO: Replace with moveChildToBottom in stack controller?
+ public void moveToBottom() {
+ synchronized(mWindowMap) {
+ if (mContainer == null) {
+ Slog.e(TAG_WM, "moveTaskToBottom: taskId=" + mTaskId + " not found");
+ return;
+ }
+ final TaskStack stack = mContainer.mStack;
+ stack.positionChildAt(POSITION_BOTTOM, mContainer, false /* includingParents */);
+ if (mService.mAppTransition.isTransitionSet()) {
+ mContainer.setSendingToBottom(true);
+ }
+ stack.getDisplayContent().layoutAndAssignWindowLayersIfNeeded();
+ }
+ }
+
+ public void getBounds(Rect bounds) {
+ synchronized (mWindowMap) {
+ if (mContainer != null) {
+ mContainer.getBounds(bounds);
+ return;
+ }
+ bounds.setEmpty();
+ }
+ }
+
+ /**
+ * Puts this task into docked drag resizing mode. See {@link DragResizeMode}.
+ *
+ * @param resizing Whether to put the task into drag resize mode.
+ */
+ public void setTaskDockedResizing(boolean resizing) {
+ synchronized (mWindowMap) {
+ if (mContainer == null) {
+ Slog.w(TAG_WM, "setTaskDockedResizing: taskId " + mTaskId + " not found.");
+ return;
+ }
+ mContainer.setDragResizing(resizing, DRAG_RESIZE_MODE_DOCKED_DIVIDER);
+ }
+ }
+
+ public void cancelWindowTransition() {
+ synchronized (mWindowMap) {
+ if (mContainer == null) {
+ Slog.w(TAG_WM, "cancelWindowTransition: taskId " + mTaskId + " not found.");
+ return;
+ }
+ mContainer.cancelTaskWindowTransition();
+ }
+ }
+
+ public void cancelThumbnailTransition() {
+ synchronized (mWindowMap) {
+ if (mContainer == null) {
+ Slog.w(TAG_WM, "cancelThumbnailTransition: taskId " + mTaskId + " not found.");
+ return;
+ }
+ mContainer.cancelTaskThumbnailTransition();
+ }
+ }
+
+ @Override
+ public String toString() {
+ return "{TaskWindowContainerController taskId=" + mTaskId + "}";
+ }
+}
diff --git a/services/core/java/com/android/server/wm/WindowContainer.java b/services/core/java/com/android/server/wm/WindowContainer.java
index 0e6ecde..fd7ea6d 100644
--- a/services/core/java/com/android/server/wm/WindowContainer.java
+++ b/services/core/java/com/android/server/wm/WindowContainer.java
@@ -235,7 +235,7 @@
@CallSuper
void positionChildAt(int position, E child, boolean includingParents) {
if ((position < 0 && position != POSITION_BOTTOM)
- || (position >= mChildren.size() && position != POSITION_TOP)) {
+ || (position > mChildren.size() && position != POSITION_TOP)) {
throw new IllegalArgumentException("positionAt: invalid position=" + position
+ ", children number=" + mChildren.size());
}
@@ -248,7 +248,7 @@
switch (position) {
case POSITION_TOP:
- if (mChildren.getLast() != child) {
+ if (mChildren.peekLast() != child) {
mChildren.remove(child);
mChildren.addLast(child);
}
@@ -258,7 +258,7 @@
}
break;
case POSITION_BOTTOM:
- if (mChildren.getFirst() != child) {
+ if (mChildren.peekFirst() != child) {
mChildren.remove(child);
mChildren.addFirst(child);
}
diff --git a/services/core/java/com/android/server/wm/WindowManagerService.java b/services/core/java/com/android/server/wm/WindowManagerService.java
index 38cb543..048affb 100644
--- a/services/core/java/com/android/server/wm/WindowManagerService.java
+++ b/services/core/java/com/android/server/wm/WindowManagerService.java
@@ -707,8 +707,6 @@
private final BoundsAnimationController mBoundsAnimationController;
- SparseArray<Task> mTaskIdToTask = new SparseArray<>();
-
/** All of the TaskStacks in the window manager, unordered. For an ordered list call
* DisplayContent.getStacks(). */
// TODO: Don't believe this is needed with the WindowContainer model.
@@ -912,7 +910,6 @@
}
private static WindowManagerService sInstance;
-
static WindowManagerService getInstance() {
return sInstance;
}
@@ -2441,35 +2438,6 @@
}
}
- public void addTask(int taskId, int stackId, int userId, Rect bounds,
- Configuration overrideConfig, int resizeMode, boolean homeTask, boolean isOnTopLauncher,
- boolean toTop, boolean showForAllUsers) {
- if (!checkCallingPermission(MANAGE_APP_TOKENS, "addTask()")) {
- throw new SecurityException("Requires MANAGE_APP_TOKENS permission");
- }
-
- synchronized(mWindowMap) {
- Task task = mTaskIdToTask.get(taskId);
- if (task != null) {
- throw new IllegalArgumentException(
- "addTask: Attempt to add already existing task=" + task);
- }
-
- if (DEBUG_STACK) Slog.i(TAG_WM, "createTaskLocked: taskId=" + taskId
- + " stackId=" + stackId + " bounds=" + bounds);
-
- final TaskStack stack = mStackIdToStack.get(stackId);
- if (stack == null) {
- throw new IllegalArgumentException("addTask: invalid stackId=" + stackId);
- }
- EventLog.writeEvent(WM_TASK_CREATED, taskId, stackId);
- task = new Task(taskId, stack, userId, this, bounds, overrideConfig, isOnTopLauncher,
- resizeMode, homeTask);
- mTaskIdToTask.put(taskId, task);
- stack.addTask(task, toTop, showForAllUsers);
- }
- }
-
@Override
public Configuration updateOrientationFromAppTokens(Configuration currentConfig,
IBinder freezeThisOneIfNeeded, int displayId) {
@@ -2851,77 +2819,6 @@
}
}
- void scheduleRemoveStartingWindowLocked(AppWindowToken wtoken) {
- if (wtoken == null) {
- return;
- }
- if (mH.hasMessages(H.REMOVE_STARTING, wtoken)) {
- // Already scheduled.
- return;
- }
-
- if (wtoken.startingWindow == null) {
- if (wtoken.startingData != null) {
- // Starting window has not been added yet, but it is scheduled to be added.
- // Go ahead and cancel the request.
- if (DEBUG_STARTING_WINDOW) Slog.v(TAG_WM,
- "Clearing startingData for token=" + wtoken);
- wtoken.startingData = null;
- }
- return;
- }
-
- if (DEBUG_STARTING_WINDOW) Slog.v(TAG_WM, Debug.getCallers(1) +
- ": Schedule remove starting " + wtoken + (wtoken != null ?
- " startingWindow=" + wtoken.startingWindow : ""));
- Message m = mH.obtainMessage(H.REMOVE_STARTING, wtoken);
- mH.sendMessage(m);
- }
-
- public void moveTaskToTop(int taskId) {
- final long origId = Binder.clearCallingIdentity();
- try {
- synchronized(mWindowMap) {
- final Task task = mTaskIdToTask.get(taskId);
- if (task == null) {
- // Normal behavior, addAppToken will be called next and task will be created.
- return;
- }
- task.mStack.positionChildAt(POSITION_TOP, task, true /* includingParents */);
-
- if (mAppTransition.isTransitionSet()) {
- task.setSendingToBottom(false);
- }
- final DisplayContent displayContent = task.getDisplayContent();
- displayContent.layoutAndAssignWindowLayersIfNeeded();
- }
- } finally {
- Binder.restoreCallingIdentity(origId);
- }
- }
-
- public void moveTaskToBottom(int taskId) {
- final long origId = Binder.clearCallingIdentity();
- try {
- synchronized(mWindowMap) {
- final Task task = mTaskIdToTask.get(taskId);
- if (task == null) {
- Slog.e(TAG_WM, "moveTaskToBottom: taskId=" + taskId
- + " not found in mTaskIdToTask");
- return;
- }
- final TaskStack stack = task.mStack;
- stack.positionChildAt(POSITION_BOTTOM, task, false /* includingParents */);
- if (mAppTransition.isTransitionSet()) {
- task.setSendingToBottom(true);
- }
- stack.getDisplayContent().layoutAndAssignWindowLayersIfNeeded();
- }
- } finally {
- Binder.restoreCallingIdentity(origId);
- }
- }
-
boolean isStackVisibleLocked(int stackId) {
final TaskStack stack = mStackIdToStack.get(stackId);
return (stack != null && stack.isVisible());
@@ -3091,58 +2988,6 @@
}
}
- public void removeTask(int taskId) {
- synchronized (mWindowMap) {
- Task task = mTaskIdToTask.get(taskId);
- if (task == null) {
- if (DEBUG_STACK) Slog.i(TAG_WM, "removeTask: could not find taskId=" + taskId);
- return;
- }
- task.removeIfPossible();
- }
- }
-
- @Override
- public void cancelTaskWindowTransition(int taskId) {
- synchronized (mWindowMap) {
- Task task = mTaskIdToTask.get(taskId);
- if (task != null) {
- task.cancelTaskWindowTransition();
- }
- }
- }
-
- @Override
- public void cancelTaskThumbnailTransition(int taskId) {
- synchronized (mWindowMap) {
- Task task = mTaskIdToTask.get(taskId);
- if (task != null) {
- task.cancelTaskThumbnailTransition();
- }
- }
- }
-
- public void moveTaskToStack(int taskId, int stackId, boolean toTop) {
- synchronized (mWindowMap) {
- if (DEBUG_STACK) Slog.i(TAG_WM, "moveTaskToStack: moving taskId=" + taskId
- + " to stackId=" + stackId + " at " + (toTop ? "top" : "bottom"));
- Task task = mTaskIdToTask.get(taskId);
- if (task == null) {
- if (DEBUG_STACK) Slog.i(TAG_WM, "moveTaskToStack: could not find taskId=" + taskId);
- return;
- }
- TaskStack stack = mStackIdToStack.get(stackId);
- if (stack == null) {
- if (DEBUG_STACK) Slog.i(TAG_WM, "moveTaskToStack: could not find stackId=" + stackId);
- return;
- }
- task.moveTaskToStack(stack, toTop);
- final DisplayContent displayContent = stack.getDisplayContent();
- displayContent.setLayoutNeeded();
- mWindowPlacerLocked.performSurfacePlacement();
- }
- }
-
public void getStackDockedModeBounds(int stackId, Rect bounds, boolean ignoreVisibility) {
synchronized (mWindowMap) {
final TaskStack stack = mStackIdToStack.get(stackId);
@@ -3218,69 +3063,6 @@
}
}
- /** @see com.android.server.am.ActivityManagerService#positionTaskInStack(int, int, int). */
- public void positionTaskInStack(int taskId, int stackId, int position, Rect bounds,
- Configuration overrideConfig) {
- synchronized (mWindowMap) {
- if (DEBUG_STACK) Slog.i(TAG_WM, "positionTaskInStack: positioning taskId=" + taskId
- + " in stackId=" + stackId + " at " + position);
- Task task = mTaskIdToTask.get(taskId);
- if (task == null) {
- if (DEBUG_STACK) Slog.i(TAG_WM,
- "positionTaskInStack: could not find taskId=" + taskId);
- return;
- }
- TaskStack stack = mStackIdToStack.get(stackId);
- if (stack == null) {
- if (DEBUG_STACK) Slog.i(TAG_WM,
- "positionTaskInStack: could not find stackId=" + stackId);
- return;
- }
- task.positionTaskInStack(stack, position, bounds, overrideConfig);
- final DisplayContent displayContent = stack.getDisplayContent();
- displayContent.setLayoutNeeded();
- mWindowPlacerLocked.performSurfacePlacement();
- }
- }
-
- /**
- * Re-sizes the specified task and its containing windows.
- * Returns a {@link Configuration} object that contains configurations settings
- * that should be overridden due to the operation.
- */
- public void resizeTask(int taskId, Rect bounds, Configuration overrideConfig,
- boolean relayout, boolean forced) {
- synchronized (mWindowMap) {
- Task task = mTaskIdToTask.get(taskId);
- if (task == null) {
- throw new IllegalArgumentException("resizeTask: taskId " + taskId
- + " not found.");
- }
-
- if (task.resizeLocked(bounds, overrideConfig, forced) && relayout) {
- task.getDisplayContent().setLayoutNeeded();
- mWindowPlacerLocked.performSurfacePlacement();
- }
- }
- }
-
- /**
- * Puts a specific task into docked drag resizing mode. See {@link DragResizeMode}.
- *
- * @param taskId The id of the task to put into drag resize mode.
- * @param resizing Whether to put the task into drag resize mode.
- */
- public void setTaskDockedResizing(int taskId, boolean resizing) {
- synchronized (mWindowMap) {
- Task task = mTaskIdToTask.get(taskId);
- if (task == null) {
- Slog.w(TAG, "setTaskDockedResizing: taskId " + taskId + " not found.");
- return;
- }
- task.setDragResizing(resizing, DRAG_RESIZE_MODE_DOCKED_DIVIDER);
- }
- }
-
/**
* Starts deferring layout passes. Useful when doing multiple changes but to optimize
* performance, only one layout pass should be done. This can be called multiple times, and
@@ -3301,24 +3083,6 @@
}
}
- public void getTaskBounds(int taskId, Rect bounds) {
- synchronized (mWindowMap) {
- Task task = mTaskIdToTask.get(taskId);
- if (task != null) {
- task.getBounds(bounds);
- return;
- }
- bounds.setEmpty();
- }
- }
-
- /** Return true if the input task id represents a valid window manager task. */
- public boolean isValidTaskId(int taskId) {
- synchronized (mWindowMap) {
- return mTaskIdToTask.get(taskId) != null;
- }
- }
-
/**
* @return true if the activity contains windows that have
* {@link LayoutParams#FLAG_SHOW_WHEN_LOCKED} set
@@ -5578,9 +5342,6 @@
public static final int REPORT_FOCUS_CHANGE = 2;
public static final int REPORT_LOSING_FOCUS = 3;
public static final int DO_TRAVERSAL = 4;
- public static final int ADD_STARTING = 5;
- public static final int REMOVE_STARTING = 6;
- public static final int FINISHED_STARTING = 7;
public static final int WINDOW_FREEZE_TIMEOUT = 11;
public static final int APP_TRANSITION_TIMEOUT = 13;
@@ -5722,126 +5483,6 @@
}
} break;
- case ADD_STARTING: {
- final AppWindowToken wtoken = (AppWindowToken)msg.obj;
- final StartingData sd = wtoken.startingData;
-
- if (sd == null) {
- // Animation has been canceled... do nothing.
- return;
- }
-
- if (DEBUG_STARTING_WINDOW) Slog.v(TAG_WM, "Add starting "
- + wtoken + ": pkg=" + sd.pkg);
-
- View view = null;
- try {
- view = mPolicy.addStartingWindow(wtoken.token, sd.pkg, sd.theme,
- sd.compatInfo, sd.nonLocalizedLabel, sd.labelRes, sd.icon, sd.logo,
- sd.windowFlags, wtoken.getMergedOverrideConfiguration());
- } catch (Exception e) {
- Slog.w(TAG_WM, "Exception when adding starting window", e);
- }
-
- if (view != null) {
- boolean abort = false;
-
- synchronized(mWindowMap) {
- if (wtoken.removed || wtoken.startingData == null) {
- // If the window was successfully added, then
- // we need to remove it.
- if (wtoken.startingWindow != null) {
- if (DEBUG_STARTING_WINDOW) Slog.v(TAG_WM,
- "Aborted starting " + wtoken
- + ": removed=" + wtoken.removed
- + " startingData=" + wtoken.startingData);
- wtoken.startingWindow = null;
- wtoken.startingData = null;
- abort = true;
- }
- } else {
- wtoken.startingView = view;
- }
- if (DEBUG_STARTING_WINDOW && !abort) Slog.v(TAG_WM,
- "Added starting " + wtoken
- + ": startingWindow="
- + wtoken.startingWindow + " startingView="
- + wtoken.startingView);
- }
-
- if (abort) {
- try {
- mPolicy.removeStartingWindow(wtoken.token, view);
- } catch (Exception e) {
- Slog.w(TAG_WM, "Exception when removing starting window", e);
- }
- }
- }
- } break;
-
- case REMOVE_STARTING: {
- final AppWindowToken wtoken = (AppWindowToken)msg.obj;
- IBinder token = null;
- View view = null;
- synchronized (mWindowMap) {
- if (DEBUG_STARTING_WINDOW) Slog.v(TAG_WM, "Remove starting "
- + wtoken + ": startingWindow="
- + wtoken.startingWindow + " startingView="
- + wtoken.startingView);
- if (wtoken.startingWindow != null) {
- view = wtoken.startingView;
- token = wtoken.token;
- wtoken.startingData = null;
- wtoken.startingView = null;
- wtoken.startingWindow = null;
- wtoken.startingDisplayed = false;
- }
- }
- if (view != null) {
- try {
- mPolicy.removeStartingWindow(token, view);
- } catch (Exception e) {
- Slog.w(TAG_WM, "Exception when removing starting window", e);
- }
- }
- } break;
-
- case FINISHED_STARTING: {
- IBinder token = null;
- View view = null;
- while (true) {
- synchronized (mWindowMap) {
- final int N = mFinishedStarting.size();
- if (N <= 0) {
- break;
- }
- AppWindowToken wtoken = mFinishedStarting.remove(N-1);
-
- if (DEBUG_STARTING_WINDOW) Slog.v(TAG_WM,
- "Finished starting " + wtoken
- + ": startingWindow=" + wtoken.startingWindow
- + " startingView=" + wtoken.startingView);
-
- if (wtoken.startingWindow == null) {
- continue;
- }
-
- view = wtoken.startingView;
- token = wtoken.token;
- wtoken.startingData = null;
- wtoken.startingView = null;
- wtoken.startingWindow = null;
- wtoken.startingDisplayed = false;
- }
-
- try {
- mPolicy.removeStartingWindow(token, view);
- } catch (Exception e) {
- Slog.w(TAG_WM, "Exception when removing starting window", e);
- }
- }
- } break;
-
case WINDOW_FREEZE_TIMEOUT: {
// TODO(multidisplay): Can non-default displays rotate?
synchronized (mWindowMap) {
@@ -7348,21 +6989,6 @@
private void dumpTokensLocked(PrintWriter pw, boolean dumpAll) {
pw.println("WINDOW MANAGER TOKENS (dumpsys window tokens)");
mRoot.dumpTokens(pw, dumpAll);
- if (!mFinishedStarting.isEmpty()) {
- pw.println();
- pw.println(" Finishing start of application tokens:");
- for (int i=mFinishedStarting.size()-1; i>=0; i--) {
- WindowToken token = mFinishedStarting.get(i);
- pw.print(" Finished Starting #"); pw.print(i);
- pw.print(' '); pw.print(token);
- if (dumpAll) {
- pw.println(':');
- token.dump(pw, " ");
- } else {
- pw.println();
- }
- }
- }
if (!mOpeningApps.isEmpty() || !mClosingApps.isEmpty()) {
pw.println();
if (mOpeningApps.size() > 0) {
@@ -7992,15 +7618,6 @@
}
}
- public void setTaskResizeable(int taskId, int resizeMode) {
- synchronized (mWindowMap) {
- final Task task = mTaskIdToTask.get(taskId);
- if (task != null) {
- task.setResizeable(resizeMode);
- }
- }
- }
-
public void setForceResizableTasks(boolean forceResizableTasks) {
synchronized (mWindowMap) {
mForceResizableTasks = forceResizableTasks;
diff --git a/services/core/java/com/android/server/wm/WindowStateAnimator.java b/services/core/java/com/android/server/wm/WindowStateAnimator.java
index e5ed18d..19ef44c 100644
--- a/services/core/java/com/android/server/wm/WindowStateAnimator.java
+++ b/services/core/java/com/android/server/wm/WindowStateAnimator.java
@@ -461,16 +461,7 @@
mStackClip = STACK_CLIP_BEFORE_ANIM;
mWin.checkPolicyVisibilityChange();
mTransformation.clear();
- if (mDrawState == HAS_DRAWN
- && mWin.mAttrs.type == WindowManager.LayoutParams.TYPE_APPLICATION_STARTING
- && mWin.mAppToken != null
- && mWin.mAppToken.firstWindowDrawn
- && mWin.mAppToken.startingData != null) {
- if (DEBUG_STARTING_WINDOW) Slog.v(TAG, "Finish starting "
- + mWin.mToken + ": first real window done animating");
- mService.mFinishedStarting.add(mWin.mAppToken);
- mService.mH.sendEmptyMessage(H.FINISHED_STARTING);
- } else if (mAttrType == LayoutParams.TYPE_STATUS_BAR && mWin.mPolicyVisibility) {
+ if (mAttrType == LayoutParams.TYPE_STATUS_BAR && mWin.mPolicyVisibility) {
// Upon completion of a not-visible to visible status bar animation a relayout is
// required.
if (displayContent != null) {
diff --git a/services/core/java/com/android/server/wm/WindowSurfacePlacer.java b/services/core/java/com/android/server/wm/WindowSurfacePlacer.java
index 1aabd5e..4df1001 100644
--- a/services/core/java/com/android/server/wm/WindowSurfacePlacer.java
+++ b/services/core/java/com/android/server/wm/WindowSurfacePlacer.java
@@ -441,8 +441,9 @@
wtoken.deferClearAllDrawn = false;
// Ensure that apps that are mid-starting are also scheduled to have their
// starting windows removed after the animation is complete
- if (wtoken.startingWindow != null && !wtoken.startingWindow.mAnimatingExit) {
- mService.scheduleRemoveStartingWindowLocked(wtoken);
+ if (wtoken.startingWindow != null && !wtoken.startingWindow.mAnimatingExit
+ && wtoken.getController() != null) {
+ wtoken.getController().removeStartingWindow();
}
mService.mAnimator.mAppWindowAnimating |= appAnimator.isAnimating();
diff --git a/services/core/jni/com_android_server_connectivity_Vpn.cpp b/services/core/jni/com_android_server_connectivity_Vpn.cpp
index c54d732..4d85d9a 100644
--- a/services/core/jni/com_android_server_connectivity_Vpn.cpp
+++ b/services/core/jni/com_android_server_connectivity_Vpn.cpp
@@ -17,24 +17,25 @@
#define LOG_NDEBUG 0
#define LOG_TAG "VpnJni"
-#include <cutils/log.h>
-#include "netutils/ifc.h"
-#include <stdio.h>
-#include <string.h>
-#include <sys/ioctl.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
#include <arpa/inet.h>
#include <errno.h>
#include <fcntl.h>
-
#include <linux/if.h>
#include <linux/if_tun.h>
#include <linux/route.h>
#include <linux/ipv6_route.h>
+#include <netinet/in.h>
+#include <stdio.h>
+#include <string.h>
+#include <sys/ioctl.h>
+#include <sys/socket.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+
+#include <log/log.h>
+
+#include "netutils/ifc.h"
#include "jni.h"
#include "JNIHelp.h"
diff --git a/services/core/jni/com_android_server_location_GnssLocationProvider.cpp b/services/core/jni/com_android_server_location_GnssLocationProvider.cpp
index 5046265..fa6405a 100644
--- a/services/core/jni/com_android_server_location_GnssLocationProvider.cpp
+++ b/services/core/jni/com_android_server_location_GnssLocationProvider.cpp
@@ -894,11 +894,11 @@
* interface.
*/
struct AGnssRilCallback : IAGnssRilCallback {
- Return<void> requestSetIdCb(IAGnssRilCallback::ID setIdFlag) override;
+ Return<void> requestSetIdCb(uint32_t setIdFlag) override;
Return<void> requestRefLocCb() override;
};
-Return<void> AGnssRilCallback::requestSetIdCb(IAGnssRilCallback::ID setIdFlag) {
+Return<void> AGnssRilCallback::requestSetIdCb(uint32_t setIdFlag) {
JNIEnv* env = getJniEnv();
env->CallVoidMethod(mCallbacksObj, method_requestSetID, setIdFlag);
checkAndClearExceptionFromCallback(env, __FUNCTION__);
diff --git a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
index 9f66062..2e5b687 100644
--- a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
+++ b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
@@ -10097,6 +10097,7 @@
.setSmallIcon(R.drawable.ic_qs_network_logging)
.setContentTitle(mContext.getString(R.string.network_logging_notification_title))
.setContentText(mContext.getString(R.string.network_logging_notification_text))
+ .setTicker(mContext.getString(R.string.network_logging_notification_title))
.setShowWhen(true)
.setContentIntent(pendingIntent)
.build();
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java
index 283de42..68cb0c5 100644
--- a/services/java/com/android/server/SystemServer.java
+++ b/services/java/com/android/server/SystemServer.java
@@ -278,7 +278,7 @@
Slog.i(TAG, "Entered the Android system server!");
int uptimeMillis = (int) SystemClock.elapsedRealtime();
EventLog.writeEvent(EventLogTags.BOOT_PROGRESS_SYSTEM_RUN, uptimeMillis);
- if (!mRuntimeRestart) {
+ if (!mRuntimeRestart && !mFirstBoot) {
MetricsLogger.histogram(null, "boot_system_server_init", uptimeMillis);
// Also report when first stage of init has started
long initStartNs = SystemProperties.getLong("ro.boottime.init", -1);
@@ -352,6 +352,8 @@
// Create the system service manager.
mSystemServiceManager = new SystemServiceManager(mSystemContext);
+ mSystemServiceManager.setRuntimeRestarted(mRuntimeRestart);
+ mSystemServiceManager.setFirstBoot(mFirstBoot);
LocalServices.addService(SystemServiceManager.class, mSystemServiceManager);
// Prepare the thread pool for init tasks that can be parallelized
SystemServerInitThreadPool.get();
@@ -378,7 +380,7 @@
if (StrictMode.conditionallyEnableDebugLogging()) {
Slog.i(TAG, "Enabled StrictMode for system server main thread.");
}
- if (!mRuntimeRestart) {
+ if (!mRuntimeRestart && !mFirstBoot) {
MetricsLogger.histogram(null, "boot_system_server_ready",
(int) SystemClock.elapsedRealtime());
}
@@ -520,7 +522,7 @@
mFirstBoot = mPackageManagerService.isFirstBoot();
mPackageManager = mSystemContext.getPackageManager();
traceEnd();
- if (!mRuntimeRestart) {
+ if (!mRuntimeRestart && !mFirstBoot) {
MetricsLogger.histogram(null, "boot_package_manager_init_ready",
(int) SystemClock.elapsedRealtime());
}
diff --git a/services/tests/notification/Android.mk b/services/tests/notification/Android.mk
index 8aded60..bc37fef 100644
--- a/services/tests/notification/Android.mk
+++ b/services/tests/notification/Android.mk
@@ -32,7 +32,7 @@
LOCAL_CERTIFICATE := platform
# These are not normally accessible from apps so they must be explicitly included.
-LOCAL_JNI_SHARED_LIBRARIES := libservicestestsjni \
+LOCAL_JNI_SHARED_LIBRARIES := \
libbacktrace \
libbase \
libbinder \
diff --git a/services/tests/servicestests/Android.mk b/services/tests/servicestests/Android.mk
index f934d34..15c61f6 100644
--- a/services/tests/servicestests/Android.mk
+++ b/services/tests/servicestests/Android.mk
@@ -34,7 +34,7 @@
LOCAL_CERTIFICATE := platform
# These are not normally accessible from apps so they must be explicitly included.
-LOCAL_JNI_SHARED_LIBRARIES := libservicestestsjni \
+LOCAL_JNI_SHARED_LIBRARIES := \
libbacktrace \
libbase \
libbinder \
@@ -55,36 +55,3 @@
LOCAL_STATIC_JAVA_LIBRARIES += ub-uiautomator
include $(BUILD_PACKAGE)
-
-#########################################################################
-# Build JNI Shared Library
-#########################################################################
-
-LOCAL_PATH:= $(LOCAL_PATH)/jni
-
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_TAGS := tests
-
-LOCAL_CFLAGS := -Wall -Wextra -Werror
-
-LOCAL_C_INCLUDES := \
- libpcap \
- hardware/google/apf
-
-LOCAL_SRC_FILES := $(call all-cpp-files-under)
-
-LOCAL_SHARED_LIBRARIES := \
- libbinder \
- liblog \
- libcutils \
- libnativehelper \
- libnetdaidl
-
-LOCAL_STATIC_LIBRARIES := \
- libpcap \
- libapf
-
-LOCAL_MODULE := libservicestestsjni
-
-include $(BUILD_SHARED_LIBRARY)
diff --git a/services/tests/servicestests/src/com/android/server/AccessibilityManagerServiceTest.java b/services/tests/servicestests/src/com/android/server/AccessibilityManagerServiceTest.java
index 51e14d3..60842a6 100644
--- a/services/tests/servicestests/src/com/android/server/AccessibilityManagerServiceTest.java
+++ b/services/tests/servicestests/src/com/android/server/AccessibilityManagerServiceTest.java
@@ -285,7 +285,7 @@
}
@LargeTest
- public void testSendAccessibilityEvent_OneService_NotifivationAfterTimeout() throws Exception {
+ public void testSendAccessibilityEvent_OneService_NotificationAfterTimeout() throws Exception {
// enable the mock accessibility service
ensureOnlyMockServicesEnabled(mContext, true, false);
@@ -570,6 +570,8 @@
mState = state;
}
+ public void notifyServicesStateChanged() {}
+
public void setTouchExplorationEnabled(boolean enabled) {
}
}
diff --git a/services/tests/servicestests/src/com/android/server/wm/AppWindowContainerControllerTests.java b/services/tests/servicestests/src/com/android/server/wm/AppWindowContainerControllerTests.java
index 8a962e7..7f1c273 100644
--- a/services/tests/servicestests/src/com/android/server/wm/AppWindowContainerControllerTests.java
+++ b/services/tests/servicestests/src/com/android/server/wm/AppWindowContainerControllerTests.java
@@ -18,16 +18,22 @@
import org.junit.Test;
+import android.os.Binder;
+import android.os.IBinder;
import android.platform.test.annotations.Presubmit;
import android.support.test.filters.SmallTest;
import android.support.test.runner.AndroidJUnit4;
+import android.view.IApplicationToken;
+import static android.content.pm.ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE;
+import static android.content.pm.ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED;
+import static android.content.res.Configuration.EMPTY;
import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
/**
- * Test class for {@link WindowContainerController}.
+ * Test class for {@link AppWindowContainerController}.
*
* Build/Install/Run:
* bit FrameworksServicesTests:com.android.server.wm.AppWindowContainerControllerTests
@@ -36,7 +42,70 @@
@Presubmit
@org.junit.runner.RunWith(AndroidJUnit4.class)
public class AppWindowContainerControllerTests extends WindowTestsBase {
-// TODO Add tests once TaskWindowContainerController is created.
+
@Test
- public void dummyTest() throws Exception {}
+ public void testRemoveContainer() throws Exception {
+ final TestAppWindowContainerController controller = createAppWindowController();
+
+ // Assert token was added to display.
+ assertNotNull(sDisplayContent.getWindowToken(controller.mToken.asBinder()));
+ // Assert that the container was created and linked.
+ assertNotNull(controller.mContainer);
+
+ controller.removeContainer(sDisplayContent.getDisplayId());
+
+ // Assert token was remove from display.
+ assertNull(sDisplayContent.getWindowToken(controller.mToken.asBinder()));
+ // Assert that the container was removed.
+ assertNull(controller.mContainer);
+ }
+
+ @Test
+ public void testSetOrientation() throws Exception {
+ final TestAppWindowContainerController controller = createAppWindowController();
+
+ // Assert orientation is unspecified to start.
+ assertEquals(SCREEN_ORIENTATION_UNSPECIFIED, controller.getOrientation());
+
+ controller.setOrientation(SCREEN_ORIENTATION_LANDSCAPE, sDisplayContent.getDisplayId(),
+ EMPTY /* displayConfig */, false /* freezeScreenIfNeeded */);
+ assertEquals(SCREEN_ORIENTATION_LANDSCAPE, controller.getOrientation());
+
+ controller.removeContainer(sDisplayContent.getDisplayId());
+ // Assert orientation is unspecified to after container is removed.
+ assertEquals(SCREEN_ORIENTATION_UNSPECIFIED, controller.getOrientation());
+ }
+
+ private TestAppWindowContainerController createAppWindowController() {
+ final TaskStack stack = createTaskStackOnDisplay(sDisplayContent);
+ final TestTaskWindowContainerController taskController =
+ new TestTaskWindowContainerController(stack.mStackId);
+ final IApplicationToken token = new TestIApplicationToken();
+ return new TestAppWindowContainerController(taskController, token);
+ }
+
+ private class TestAppWindowContainerController extends AppWindowContainerController {
+
+ final IApplicationToken mToken;
+
+ TestAppWindowContainerController(TestTaskWindowContainerController taskController,
+ IApplicationToken token) {
+ super(taskController, token, null /* listener */, 0 /* index */,
+ SCREEN_ORIENTATION_UNSPECIFIED, true /* fullscreen */,
+ true /* showForAllUsers */, 0 /* configChanges */, false /* voiceInteraction */,
+ false /* launchTaskBehind */, false /* alwaysFocusable */,
+ 0 /* targetSdkVersion */, 0 /* rotationAnimationHint */,
+ 0 /* inputDispatchingTimeoutNanos */, sWm);
+ mToken = token;
+ }
+ }
+
+ private class TestIApplicationToken implements IApplicationToken {
+
+ private final Binder mBinder = new Binder();
+ @Override
+ public IBinder asBinder() {
+ return mBinder;
+ }
+ }
}
diff --git a/services/tests/servicestests/src/com/android/server/wm/DisplayContentTests.java b/services/tests/servicestests/src/com/android/server/wm/DisplayContentTests.java
index 786c2bb..85931e8 100644
--- a/services/tests/servicestests/src/com/android/server/wm/DisplayContentTests.java
+++ b/services/tests/servicestests/src/com/android/server/wm/DisplayContentTests.java
@@ -19,6 +19,7 @@
import org.junit.Test;
import org.junit.runner.RunWith;
+import android.content.res.Configuration;
import android.hardware.display.DisplayManagerGlobal;
import android.platform.test.annotations.Presubmit;
import android.support.test.filters.SmallTest;
@@ -208,6 +209,10 @@
voiceInteractionWindow.removeImmediately();
}
+ /**
+ * This tests stack movement between displays and proper stack's, task's and app token's display
+ * container references updates.
+ */
@Test
public void testMoveStackBetweenDisplays() throws Exception {
// Create second display.
@@ -238,4 +243,28 @@
assertEquals(sDisplayContent, task.getDisplayContent());
assertEquals(sDisplayContent, token.getDisplayContent());
}
+
+ /**
+ * This tests override configuration updates for display content.
+ */
+ @Test
+ public void testDisplayOverrideConfigUpdate() throws Exception {
+ final int displayId = sDisplayContent.getDisplayId();
+ final Configuration currentOverrideConfig = sDisplayContent.getOverrideConfiguration();
+
+ // Create new, slightly changed override configuration and apply it to the display.
+ final Configuration newOverrideConfig = new Configuration(currentOverrideConfig);
+ newOverrideConfig.densityDpi += 120;
+ newOverrideConfig.fontScale += 0.3;
+
+ sWm.setNewDisplayOverrideConfiguration(newOverrideConfig, displayId);
+
+ // Check that override config is applied.
+ assertEquals(newOverrideConfig, sDisplayContent.getOverrideConfiguration());
+
+ // Check that global configuration is updated, as we've updated default display's config.
+ final Configuration globalConfig = sWm.mRoot.getConfiguration();
+ assertEquals(newOverrideConfig.densityDpi, globalConfig.densityDpi);
+ assertEquals(newOverrideConfig.fontScale, globalConfig.fontScale, 0.1 /* delta */);
+ }
}
diff --git a/services/tests/servicestests/src/com/android/server/wm/TaskWindowContainerControllerTests.java b/services/tests/servicestests/src/com/android/server/wm/TaskWindowContainerControllerTests.java
new file mode 100644
index 0000000..0dd31c3
--- /dev/null
+++ b/services/tests/servicestests/src/com/android/server/wm/TaskWindowContainerControllerTests.java
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
+ */
+
+package com.android.server.wm;
+
+import org.junit.Test;
+
+import android.platform.test.annotations.Presubmit;
+import android.support.test.filters.SmallTest;
+import android.support.test.runner.AndroidJUnit4;
+
+/**
+ * Test class for {@link TaskWindowContainerController}.
+ *
+ * Build/Install/Run:
+ * bit FrameworksServicesTests:com.android.server.wm.TaskWindowContainerControllerTests
+ */
+@SmallTest
+@Presubmit
+@org.junit.runner.RunWith(AndroidJUnit4.class)
+public class TaskWindowContainerControllerTests extends WindowTestsBase {
+// TODO Add tests once StackWindowContainerController is created.
+ @Test
+ public void dummyTest() throws Exception {}
+}
diff --git a/services/tests/servicestests/src/com/android/server/wm/TestWindowManagerPolicy.java b/services/tests/servicestests/src/com/android/server/wm/TestWindowManagerPolicy.java
index 1853a65..c4fd722 100644
--- a/services/tests/servicestests/src/com/android/server/wm/TestWindowManagerPolicy.java
+++ b/services/tests/servicestests/src/com/android/server/wm/TestWindowManagerPolicy.java
@@ -16,29 +16,6 @@
package com.android.server.wm;
-import com.android.internal.policy.IKeyguardDismissCallback;
-import com.android.internal.policy.IShortcutService;
-import com.android.server.input.InputManagerService;
-
-import android.annotation.Nullable;
-import android.content.Context;
-import android.content.res.CompatibilityInfo;
-import android.content.res.Configuration;
-import android.graphics.Rect;
-import android.os.Bundle;
-import android.os.IBinder;
-import android.os.RemoteException;
-import android.util.Log;
-import android.view.Display;
-import android.view.IWindowManager;
-import android.view.KeyEvent;
-import android.view.View;
-import android.view.WindowManager;
-import android.view.WindowManagerPolicy;
-import android.view.animation.Animation;
-
-import java.io.PrintWriter;
-
import static android.view.WindowManager.LayoutParams.FIRST_APPLICATION_WINDOW;
import static android.view.WindowManager.LayoutParams.LAST_APPLICATION_WINDOW;
import static android.view.WindowManager.LayoutParams.TYPE_ACCESSIBILITY_OVERLAY;
@@ -62,8 +39,8 @@
import static android.view.WindowManager.LayoutParams.TYPE_NAVIGATION_BAR_PANEL;
import static android.view.WindowManager.LayoutParams.TYPE_PHONE;
import static android.view.WindowManager.LayoutParams.TYPE_POINTER;
-import static android.view.WindowManager.LayoutParams.TYPE_PRIORITY_PHONE;
import static android.view.WindowManager.LayoutParams.TYPE_PRESENTATION;
+import static android.view.WindowManager.LayoutParams.TYPE_PRIORITY_PHONE;
import static android.view.WindowManager.LayoutParams.TYPE_PRIVATE_PRESENTATION;
import static android.view.WindowManager.LayoutParams.TYPE_QS_DIALOG;
import static android.view.WindowManager.LayoutParams.TYPE_SCREENSHOT;
@@ -81,9 +58,30 @@
import static android.view.WindowManager.LayoutParams.TYPE_VOICE_INTERACTION_STARTING;
import static android.view.WindowManager.LayoutParams.TYPE_VOLUME_OVERLAY;
import static android.view.WindowManager.LayoutParams.TYPE_WALLPAPER;
-
import static org.mockito.Mockito.mock;
+import android.annotation.Nullable;
+import android.content.Context;
+import android.content.res.CompatibilityInfo;
+import android.content.res.Configuration;
+import android.graphics.Rect;
+import android.os.Bundle;
+import android.os.IBinder;
+import android.os.RemoteException;
+import android.util.Log;
+import android.view.Display;
+import android.view.IWindowManager;
+import android.view.KeyEvent;
+import android.view.WindowManager;
+import android.view.WindowManagerPolicy;
+import android.view.animation.Animation;
+
+import com.android.internal.policy.IKeyguardDismissCallback;
+import com.android.internal.policy.IShortcutService;
+import com.android.server.input.InputManagerService;
+
+import java.io.PrintWriter;
+
class TestWindowManagerPolicy implements WindowManagerPolicy {
private static final String TAG = "TestWindowManagerPolicy";
@@ -308,14 +306,14 @@
}
@Override
- public View addStartingWindow(IBinder appToken, String packageName, int theme,
+ public StartingSurface addSplashScreen(IBinder appToken, String packageName, int theme,
CompatibilityInfo compatInfo, CharSequence nonLocalizedLabel, int labelRes, int icon,
int logo, int windowFlags, Configuration overrideConfig) {
return null;
}
@Override
- public void removeStartingWindow(IBinder appToken, View window) {
+ public void removeSplashScreen(IBinder appToken, StartingSurface surface) {
}
diff --git a/services/tests/servicestests/src/com/android/server/wm/WindowFrameTests.java b/services/tests/servicestests/src/com/android/server/wm/WindowFrameTests.java
index ef6ee32..466da94 100644
--- a/services/tests/servicestests/src/com/android/server/wm/WindowFrameTests.java
+++ b/services/tests/servicestests/src/com/android/server/wm/WindowFrameTests.java
@@ -76,7 +76,7 @@
final Rect mInsetBounds = new Rect();
boolean mFullscreenForTest = true;
TaskWithBounds(Rect bounds) {
- super(0, mStubStack, 0, sWm, null, null, false, 0, false);
+ super(0, mStubStack, 0, sWm, null, null, false, 0, false, null);
mBounds = bounds;
}
@Override
diff --git a/services/tests/servicestests/src/com/android/server/wm/WindowTestsBase.java b/services/tests/servicestests/src/com/android/server/wm/WindowTestsBase.java
index fb3beb3..be080f5 100644
--- a/services/tests/servicestests/src/com/android/server/wm/WindowTestsBase.java
+++ b/services/tests/servicestests/src/com/android/server/wm/WindowTestsBase.java
@@ -27,6 +27,7 @@
import static android.app.ActivityManager.StackId.FIRST_DYNAMIC_STACK_ID;
import static android.app.AppOpsManager.OP_NONE;
+import static android.content.pm.ActivityInfo.RESIZE_MODE_UNRESIZEABLE;
import static android.content.res.Configuration.EMPTY;
import static android.view.WindowManager.LayoutParams.FIRST_APPLICATION_WINDOW;
import static android.view.WindowManager.LayoutParams.LAST_APPLICATION_WINDOW;
@@ -39,6 +40,7 @@
import static android.view.WindowManager.LayoutParams.TYPE_NAVIGATION_BAR;
import static android.view.WindowManager.LayoutParams.TYPE_STATUS_BAR;
import static android.view.WindowManager.LayoutParams.TYPE_WALLPAPER;
+import static com.android.server.wm.WindowContainer.POSITION_TOP;
import static org.mockito.Mockito.mock;
/**
@@ -144,8 +146,8 @@
/**Creates a {@link Task} and adds it to the specified {@link TaskStack}. */
Task createTaskInStack(TaskStack stack, int userId) {
final Task newTask = new Task(sNextTaskId++, stack, userId, sWm, null, EMPTY, false, 0,
- false);
- stack.addTask(newTask, true);
+ false, null);
+ stack.addTask(newTask, POSITION_TOP);
return newTask;
}
@@ -192,4 +194,17 @@
return mChildren.getLast();
}
}
+
+ /**
+ * Used so we can gain access to some protected members of {@link TaskWindowContainerController}
+ * class.
+ */
+ class TestTaskWindowContainerController extends TaskWindowContainerController {
+
+ TestTaskWindowContainerController(int stackId) {
+ super(sNextTaskId++, stackId, 0 /* userId */, null /* bounds */,
+ EMPTY /* overrideConfig*/, RESIZE_MODE_UNRESIZEABLE, false /* homeTask*/,
+ false /* isOnTopLauncher */, true /* toTop*/, true /* showForAllUsers */);
+ }
+ }
}
diff --git a/tools/layoutlib/bridge/src/android/view/AttachInfo_Accessor.java b/tools/layoutlib/bridge/src/android/view/AttachInfo_Accessor.java
index 85584d3..4445a22 100644
--- a/tools/layoutlib/bridge/src/android/view/AttachInfo_Accessor.java
+++ b/tools/layoutlib/bridge/src/android/view/AttachInfo_Accessor.java
@@ -51,4 +51,8 @@
view.dispatchDetachedFromWindow();
}
}
+
+ public static ViewRootImpl getRootView(View view) {
+ return view.mAttachInfo != null ? view.mAttachInfo.mViewRootImpl : null;
+ }
}
diff --git a/tools/layoutlib/bridge/src/android/view/IWindowManagerImpl.java b/tools/layoutlib/bridge/src/android/view/IWindowManagerImpl.java
index 71c1117..5e5ebd7 100644
--- a/tools/layoutlib/bridge/src/android/view/IWindowManagerImpl.java
+++ b/tools/layoutlib/bridge/src/android/view/IWindowManagerImpl.java
@@ -480,14 +480,6 @@
}
@Override
- public void cancelTaskWindowTransition(int taskId) {
- }
-
- @Override
- public void cancelTaskThumbnailTransition(int taskId) {
- }
-
- @Override
public void endProlongedAnimations() {
}
diff --git a/tools/layoutlib/bridge/src/android/view/ViewRootImpl_Accessor.java b/tools/layoutlib/bridge/src/android/view/ViewRootImpl_Accessor.java
new file mode 100644
index 0000000..0e15b97
--- /dev/null
+++ b/tools/layoutlib/bridge/src/android/view/ViewRootImpl_Accessor.java
@@ -0,0 +1,26 @@
+/*
+ * Copyright (C) 2016 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.view;
+
+/**
+ * Accessor to allow layoutlib to call {@link ViewRootImpl#dispatchApplyInsets} directly.
+ */
+public class ViewRootImpl_Accessor {
+ public static void dispatchApplyInsets(ViewRootImpl viewRoot, View host) {
+ viewRoot.dispatchApplyInsets(host);
+ }
+}
diff --git a/tools/layoutlib/bridge/src/android/view/accessibility/AccessibilityManager.java b/tools/layoutlib/bridge/src/android/view/accessibility/AccessibilityManager.java
index edb5eff..3ce7cab 100644
--- a/tools/layoutlib/bridge/src/android/view/accessibility/AccessibilityManager.java
+++ b/tools/layoutlib/bridge/src/android/view/accessibility/AccessibilityManager.java
@@ -92,6 +92,9 @@
new IAccessibilityManagerClient.Stub() {
public void setState(int state) {
}
+
+ public void notifyServicesStateChanged() {
+ }
};
/**
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/Layout.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/Layout.java
index 726ff22..2fe3ed5 100644
--- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/Layout.java
+++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/Layout.java
@@ -38,7 +38,10 @@
import android.graphics.drawable.Drawable;
import android.util.DisplayMetrics;
import android.util.TypedValue;
+import android.view.AttachInfo_Accessor;
import android.view.View;
+import android.view.ViewRootImpl;
+import android.view.ViewRootImpl_Accessor;
import android.widget.FrameLayout;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
@@ -302,6 +305,17 @@
return Bridge.getResourceId(ResourceType.ID, ID_PREFIX + name);
}
+ @Override
+ public void requestFitSystemWindows() {
+ // The framework call would usually bubble up to ViewRootImpl but, in layoutlib, Layout will
+ // act as view root for most purposes. That way, we can also save going through the Handler
+ // to dispatch the new applied insets.
+ ViewRootImpl root = AttachInfo_Accessor.getRootView(this);
+ if (root != null) {
+ ViewRootImpl_Accessor.dispatchApplyInsets(root, this);
+ }
+ }
+
/**
* A helper class to help initialize the Layout.
*/
diff --git a/tools/layoutlib/bridge/tests/res/testApp/MyApplication/src/main/myapplication.widgets/InsetsWidget.java b/tools/layoutlib/bridge/tests/res/testApp/MyApplication/src/main/myapplication.widgets/InsetsWidget.java
new file mode 100644
index 0000000..36e5c26
--- /dev/null
+++ b/tools/layoutlib/bridge/tests/res/testApp/MyApplication/src/main/myapplication.widgets/InsetsWidget.java
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2016 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.layoutlib.test.myapplication.widgets;
+
+import android.content.Context;
+import android.util.AttributeSet;
+import android.view.WindowInsets;
+import android.widget.TextView;
+
+public class InsetsWidget extends TextView {
+ public static boolean sApplyInsetsCalled = false;
+
+ public InsetsWidget(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ }
+
+ @Override
+ protected void onAttachedToWindow() {
+ super.onAttachedToWindow();
+
+ requestApplyInsets();
+ }
+
+ @Override
+ public WindowInsets onApplyWindowInsets(WindowInsets insets) {
+ sApplyInsetsCalled = true;
+ return super.onApplyWindowInsets(insets);
+ }
+}
diff --git a/tools/layoutlib/bridge/tests/res/testApp/MyApplication/src/main/res/layout/insets.xml b/tools/layoutlib/bridge/tests/res/testApp/MyApplication/src/main/res/layout/insets.xml
new file mode 100644
index 0000000..ff06d79
--- /dev/null
+++ b/tools/layoutlib/bridge/tests/res/testApp/MyApplication/src/main/res/layout/insets.xml
@@ -0,0 +1,12 @@
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:padding="16dp"
+ android:orientation="horizontal"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content">
+
+ <com.android.layoutlib.test.myapplication.widgets.InsetsWidget
+ android:text="Hello world"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:id="@+id/text1"/>
+</LinearLayout>
diff --git a/tools/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/Main.java b/tools/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/Main.java
index c813a12..cdcae89 100644
--- a/tools/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/Main.java
+++ b/tools/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/Main.java
@@ -53,7 +53,6 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
-import android.content.pm.PackageInstaller.Session;
import android.content.res.AssetManager;
import android.content.res.Configuration;
import android.content.res.Resources;
@@ -61,32 +60,17 @@
import java.io.File;
import java.io.IOException;
-import java.io.InputStream;
import java.lang.ref.WeakReference;
-import java.net.MalformedURLException;
+import java.lang.reflect.Field;
import java.net.URL;
-import java.net.URLClassLoader;
-import java.nio.file.CopyOption;
-import java.nio.file.FileVisitOption;
-import java.nio.file.Files;
-import java.nio.file.Path;
-import java.nio.file.StandardCopyOption;
-import java.nio.file.attribute.BasicFileAttributes;
import java.util.ArrayList;
import java.util.Arrays;
-import java.util.Comparator;
-import java.util.Enumeration;
-import java.util.List;
import java.util.concurrent.TimeUnit;
-import java.util.function.BiPredicate;
-import java.util.stream.Collectors;
-import java.util.stream.Stream;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipFile;
import com.google.android.collect.Lists;
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;
@@ -434,6 +418,30 @@
renderAndVerify(params, "simple_activity.png");
}
+ @Test
+ public void testOnApplyInsetsCall()
+ throws ClassNotFoundException, NoSuchFieldException, IllegalAccessException {
+ // We get the widget via reflection to avoid IntelliJ complaining about the class being
+ // located in the wrong package. (From the Bridge tests point of view, it is)
+ Class insetsWidgetClass = Class.forName("com.android.layoutlib.test.myapplication.widgets" +
+ ".InsetsWidget");
+ Field field = insetsWidgetClass.getDeclaredField("sApplyInsetsCalled");
+ assertFalse((Boolean)field.get(null));
+
+ LayoutPullParser parser = createLayoutPullParser("insets.xml");
+ LayoutLibTestCallback layoutLibCallback =
+ new LayoutLibTestCallback(getLogger(), mDefaultClassLoader);
+ layoutLibCallback.initResources();
+ SessionParams params = getSessionParams(parser, ConfigGenerator.NEXUS_5,
+ layoutLibCallback, "Theme.Material.Light.NoActionBar", false,
+ RenderingMode.NORMAL, 22);
+
+ render(params, -1);
+
+ assertTrue((Boolean)field.get(null));
+ field.set(null, false);
+ }
+
@AfterClass
public static void tearDown() {
sLayoutLibLog = null;
@@ -621,6 +629,37 @@
return new LayoutPullParser(APP_TEST_RES + "/layout/" + layoutPath);
}
+ @NonNull
+ private static RenderResult render(SessionParams params, long frameTimeNanos) {
+ // TODO: Set up action bar handler properly to test menu rendering.
+ // Create session params.
+ System_Delegate.setBootTimeNanos(TimeUnit.MILLISECONDS.toNanos(871732800000L));
+ System_Delegate.setNanosTime(TimeUnit.MILLISECONDS.toNanos(871732800000L));
+ RenderSession session = sBridge.createSession(params);
+
+ try {
+
+ if (frameTimeNanos != -1) {
+ session.setElapsedFrameTimeNanos(frameTimeNanos);
+ }
+
+ if (!session.getResult().isSuccess()) {
+ getLogger().error(session.getResult().getException(),
+ session.getResult().getErrorMessage());
+ }
+ // Render the session with a timeout of 50s.
+ Result renderResult = session.render(50000);
+ if (!renderResult.isSuccess()) {
+ getLogger().error(session.getResult().getException(),
+ session.getResult().getErrorMessage());
+ }
+
+ return RenderResult.getFromSession(session);
+ } finally {
+ session.dispose();
+ }
+ }
+
/**
* Create a new rendering session and test that rendering the given layout doesn't throw any
* exceptions and matches the provided image.
@@ -629,40 +668,19 @@
* how far in the future is.
*/
@Nullable
- private RenderResult renderAndVerify(SessionParams params, String goldenFileName, long frameTimeNanos)
+ private static RenderResult renderAndVerify(SessionParams params, String goldenFileName, long
+ frameTimeNanos)
throws ClassNotFoundException {
- // TODO: Set up action bar handler properly to test menu rendering.
- // Create session params.
- System_Delegate.setBootTimeNanos(TimeUnit.MILLISECONDS.toNanos(871732800000L));
- System_Delegate.setNanosTime(TimeUnit.MILLISECONDS.toNanos(871732800000L));
- RenderSession session = sBridge.createSession(params);
-
- if (frameTimeNanos != -1) {
- session.setElapsedFrameTimeNanos(frameTimeNanos);
- }
-
- if (!session.getResult().isSuccess()) {
- getLogger().error(session.getResult().getException(),
- session.getResult().getErrorMessage());
- }
- // Render the session with a timeout of 50s.
- Result renderResult = session.render(50000);
- if (!renderResult.isSuccess()) {
- getLogger().error(session.getResult().getException(),
- session.getResult().getErrorMessage());
- }
+ RenderResult result = Main.render(params, frameTimeNanos);
try {
String goldenImagePath = APP_TEST_DIR + "/golden/" + goldenFileName;
- ImageUtils.requireSimilar(goldenImagePath, session.getImage());
-
- return RenderResult.getFromSession(session);
+ assertNotNull(result.getImage());
+ ImageUtils.requireSimilar(goldenImagePath, result.getImage());
} catch (IOException e) {
getLogger().error(e, e.getMessage());
- } finally {
- session.dispose();
}
- return null;
+ return result;
}
/**
@@ -670,9 +688,9 @@
* exceptions and matches the provided image.
*/
@Nullable
- private RenderResult renderAndVerify(SessionParams params, String goldenFileName)
+ private static RenderResult renderAndVerify(SessionParams params, String goldenFileName)
throws ClassNotFoundException {
- return renderAndVerify(params, goldenFileName, -1);
+ return Main.renderAndVerify(params, goldenFileName, -1);
}
/**
diff --git a/tools/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/RenderResult.java b/tools/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/RenderResult.java
index 17b20f7..087478f 100644
--- a/tools/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/RenderResult.java
+++ b/tools/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/RenderResult.java
@@ -23,6 +23,7 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
+import java.awt.image.BufferedImage;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
@@ -31,19 +32,22 @@
private final List<ViewInfo> mRootViews;
private final List<ViewInfo> mSystemViews;
private final Result mRenderResult;
+ private BufferedImage mImage;
private RenderResult(@Nullable Result result, @Nullable List<ViewInfo> systemViewInfoList,
- @Nullable List<ViewInfo> rootViewInfoList) {
+ @Nullable List<ViewInfo> rootViewInfoList, @Nullable BufferedImage image) {
mSystemViews = systemViewInfoList == null ? Collections.emptyList() : systemViewInfoList;
mRootViews = rootViewInfoList == null ? Collections.emptyList() : rootViewInfoList;
mRenderResult = result;
+ mImage = image;
}
@NonNull
static RenderResult getFromSession(@NonNull RenderSession session) {
return new RenderResult(session.getResult(),
new ArrayList<>(session.getSystemRootViews()),
- new ArrayList<>(session.getRootViews()));
+ new ArrayList<>(session.getRootViews()),
+ session.getImage());
}
@Nullable
@@ -60,4 +64,9 @@
public List<ViewInfo> getSystemViews() {
return mSystemViews;
}
+
+ @Nullable
+ public BufferedImage getImage() {
+ return mImage;
+ }
}
diff --git a/wifi/java/android/net/wifi/aware/AttachCallback.java b/wifi/java/android/net/wifi/aware/AttachCallback.java
index 90216f3..c368b46 100644
--- a/wifi/java/android/net/wifi/aware/AttachCallback.java
+++ b/wifi/java/android/net/wifi/aware/AttachCallback.java
@@ -21,8 +21,6 @@
* {@link WifiAwareManager#attach(AttachCallback, android.os.Handler)}. These are callbacks
* applying to the Aware connection as a whole - not to specific publish or subscribe sessions -
* for that see {@link DiscoverySessionCallback}.
- *
- * @hide PROPOSED_AWARE_API
*/
public class AttachCallback {
/**
diff --git a/wifi/java/android/net/wifi/aware/Characteristics.java b/wifi/java/android/net/wifi/aware/Characteristics.java
index 1c3e390..70474fd 100644
--- a/wifi/java/android/net/wifi/aware/Characteristics.java
+++ b/wifi/java/android/net/wifi/aware/Characteristics.java
@@ -22,10 +22,8 @@
/**
* The characteristics of the Wi-Fi Aware implementation.
- *
- * @hide PROPOSED_AWARE_API
*/
-public class Characteristics implements Parcelable {
+public final class Characteristics implements Parcelable {
/** @hide */
public static final String KEY_MAX_SERVICE_NAME_LENGTH = "key_max_service_name_length";
/** @hide */
diff --git a/wifi/java/android/net/wifi/aware/DiscoverySession.java b/wifi/java/android/net/wifi/aware/DiscoverySession.java
index c89718f..adf189b 100644
--- a/wifi/java/android/net/wifi/aware/DiscoverySession.java
+++ b/wifi/java/android/net/wifi/aware/DiscoverySession.java
@@ -18,7 +18,6 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
-import android.annotation.SystemApi;
import android.net.wifi.RttManager;
import android.util.Log;
@@ -39,8 +38,6 @@
* </ul>
* The {@link #destroy()} method must be called to destroy discovery sessions once they are
* no longer needed.
- *
- * @hide PROPOSED_AWARE_API
*/
public class DiscoverySession {
private static final String TAG = "DiscoverySession";
@@ -230,7 +227,7 @@
* {@link android.net.wifi.RttManager.RttParams#bssid} member must be set to
* a peer ID - not to a MAC address.
* @param listener The listener to receive the results of the ranging session.
- * @hide PROPOSED_AWARE_SYSTEM_API
+ * @hide
* [TODO: b/28847998 - track RTT API & visilibity]
*/
public void startRanging(RttManager.RttParams[] params, RttManager.RttListener listener) {
diff --git a/wifi/java/android/net/wifi/aware/DiscoverySessionCallback.java b/wifi/java/android/net/wifi/aware/DiscoverySessionCallback.java
index 1fe449f..33da182 100644
--- a/wifi/java/android/net/wifi/aware/DiscoverySessionCallback.java
+++ b/wifi/java/android/net/wifi/aware/DiscoverySessionCallback.java
@@ -30,8 +30,6 @@
* android.os.Handler)}.
* <p>
* A single callback is set at session creation - it cannot be replaced.
- *
- * @hide PROPOSED_AWARE_API
*/
public class DiscoverySessionCallback {
/**
diff --git a/wifi/java/android/net/wifi/aware/IdentityChangedListener.java b/wifi/java/android/net/wifi/aware/IdentityChangedListener.java
index b0f97bd..cae8706 100644
--- a/wifi/java/android/net/wifi/aware/IdentityChangedListener.java
+++ b/wifi/java/android/net/wifi/aware/IdentityChangedListener.java
@@ -25,8 +25,6 @@
* interface may also be useful if the application uses alternative (non-Aware) discovery but needs
* to set up a Aware connection. The provided Aware discovery interface MAC address can then be used
* in {@link WifiAwareSession#createNetworkSpecifier(int, byte[], byte[])}.
- *
- * @hide PROPOSED_AWARE_API
*/
public class IdentityChangedListener {
/**
diff --git a/wifi/java/android/net/wifi/aware/PeerHandle.java b/wifi/java/android/net/wifi/aware/PeerHandle.java
index 777d9a3..bbe9f54 100644
--- a/wifi/java/android/net/wifi/aware/PeerHandle.java
+++ b/wifi/java/android/net/wifi/aware/PeerHandle.java
@@ -22,8 +22,6 @@
* when sending messages e,g, {@link PublishDiscoverySession#sendMessage(PeerHandle, int, byte[])},
* or when configuring a network link to a peer, e.g.
* {@link PublishDiscoverySession#createNetworkSpecifier(PeerHandle, byte[])}.
- *
- * @hide PROPOSED_AWARE_API
*/
public class PeerHandle {
/** @hide */
diff --git a/wifi/java/android/net/wifi/aware/PublishConfig.java b/wifi/java/android/net/wifi/aware/PublishConfig.java
index 1b8ef84..a996844 100644
--- a/wifi/java/android/net/wifi/aware/PublishConfig.java
+++ b/wifi/java/android/net/wifi/aware/PublishConfig.java
@@ -36,8 +36,6 @@
* {@link WifiAwareSession#publish(PublishConfig, DiscoverySessionCallback,
* android.os.Handler)} or updated using
* {@link PublishDiscoverySession#updatePublish(PublishConfig)}.
- *
- * @hide PROPOSED_AWARE_API
*/
public final class PublishConfig implements Parcelable {
/** @hide */
diff --git a/wifi/java/android/net/wifi/aware/PublishDiscoverySession.java b/wifi/java/android/net/wifi/aware/PublishDiscoverySession.java
index f2355b3..1c99c87 100644
--- a/wifi/java/android/net/wifi/aware/PublishDiscoverySession.java
+++ b/wifi/java/android/net/wifi/aware/PublishDiscoverySession.java
@@ -27,8 +27,6 @@
* baseline functionality of all discovery sessions in {@link DiscoverySession}. This
* object allows updating an existing/running publish discovery session using
* {@link #updatePublish(PublishConfig)}.
- *
- * @hide PROPOSED_AWARE_API
*/
public class PublishDiscoverySession extends DiscoverySession {
private static final String TAG = "PublishDiscoverySession";
diff --git a/wifi/java/android/net/wifi/aware/SubscribeConfig.java b/wifi/java/android/net/wifi/aware/SubscribeConfig.java
index a54a4f5..3397c4b 100644
--- a/wifi/java/android/net/wifi/aware/SubscribeConfig.java
+++ b/wifi/java/android/net/wifi/aware/SubscribeConfig.java
@@ -36,8 +36,6 @@
* {@link WifiAwareSession#subscribe(SubscribeConfig, DiscoverySessionCallback,
* android.os.Handler)} or
* {@link SubscribeDiscoverySession#updateSubscribe(SubscribeConfig)}.
- *
- * @hide PROPOSED_AWARE_API
*/
public final class SubscribeConfig implements Parcelable {
/** @hide */
diff --git a/wifi/java/android/net/wifi/aware/SubscribeDiscoverySession.java b/wifi/java/android/net/wifi/aware/SubscribeDiscoverySession.java
index 39db1c7..ca88a90 100644
--- a/wifi/java/android/net/wifi/aware/SubscribeDiscoverySession.java
+++ b/wifi/java/android/net/wifi/aware/SubscribeDiscoverySession.java
@@ -28,8 +28,6 @@
* See baseline functionality of all discovery sessions in {@link DiscoverySession}.
* This object allows updating an existing/running subscribe discovery session using
* {@link #updateSubscribe(SubscribeConfig)}.
- *
- * @hide PROPOSED_AWARE_API
*/
public class SubscribeDiscoverySession extends DiscoverySession {
private static final String TAG = "SubscribeDiscSession";
diff --git a/wifi/java/android/net/wifi/aware/WifiAwareManager.java b/wifi/java/android/net/wifi/aware/WifiAwareManager.java
index 8c0a3a0..043925ed 100644
--- a/wifi/java/android/net/wifi/aware/WifiAwareManager.java
+++ b/wifi/java/android/net/wifi/aware/WifiAwareManager.java
@@ -118,8 +118,6 @@
* {@link WifiAwareSession#createNetworkSpecifier(int, byte[], byte[])} or
* {@link DiscoverySession#createNetworkSpecifier(PeerHandle, byte[])}.
* </ul>
- *
- * @hide PROPOSED_AWARE_API
*/
public class WifiAwareManager {
private static final String TAG = "WifiAwareManager";
@@ -305,7 +303,6 @@
* limitations on configurations, e.g. the maximum service name length.
*
* @return An object specifying configuration limitations of Aware.
- * @hide PROPOSED_AWARE_API
*/
public Characteristics getCharacteristics() {
try {
diff --git a/wifi/java/android/net/wifi/aware/WifiAwareSession.java b/wifi/java/android/net/wifi/aware/WifiAwareSession.java
index e3ebe86..8696920 100644
--- a/wifi/java/android/net/wifi/aware/WifiAwareSession.java
+++ b/wifi/java/android/net/wifi/aware/WifiAwareSession.java
@@ -30,8 +30,6 @@
/**
* This class represents a Wi-Fi Aware session - an attachment to the Wi-Fi Aware service through
* which the app can execute discovery operations.
- *
- * @hide PROPOSED_AWARE_API
*/
public class WifiAwareSession {
private static final String TAG = "WifiAwareSession";
diff --git a/wifi/java/android/net/wifi/aware/package.html b/wifi/java/android/net/wifi/aware/package.html
index 1a990d8..d5d962f6 100644
--- a/wifi/java/android/net/wifi/aware/package.html
+++ b/wifi/java/android/net/wifi/aware/package.html
@@ -23,7 +23,7 @@
If your application only works with Wi-Fi Aware (i.e. it should only be installed on devices which
support Wi-Fi Aware), declare so with a <a
href="{@docRoot}guide/topics/manifest/uses-feature-element.html">
- {@code <uses-feature>}</a>
+ {@code <uses-feature>}</a>
element in the manifest file:</p>
<pre>
<manifest ...>